seed-registry
Seeds the tool registry with built-in tool definitions, retry policies, network policies, and optional composite tool pipelines. Creates an immutable, content-hashed registry version in PostgreSQL.
Key Files
| File | Purpose |
|---|---|
main.go | Entry point: builds tool list, applies policies, computes hash, stores registry |
Architecture
The seed process:
- Creates a
tools.Managerwith all built-in executors (HTTP, calculator, KV, memory, models, code execution, simulators) - Discovers MCP tools via the MCP bridge
- Applies per-tool retry policies and network policies
- Optionally merges composite tool definitions from a JSON file (with cycle detection)
- Computes a content hash over all definitions
- Stores the immutable registry version in PostgreSQL
Dependencies on Shared Packages
config, llm, mcp, memory, registry, tenant, tools
Configuration
See docs/manual/cli.md for all flags.
| Flag | Default | Description |
|---|---|---|
--id | default | Registry ID |
--version | v2.0.0 | Registry version |
--tenant | __global__ | Tenant owning this registry |
--composites | — | Path to JSON array of composite tool definitions |
Development
Run Locally
go run ./cmd/seed-registry --id default --version v2.0.0
go run ./cmd/seed-registry --composites ./my-composites.json --version v2.1.0
Run Tests
go test ./cmd/seed-registry/...