registry
Versioned, immutable, content-hashed tool registry. Stores tool definitions with schemas, cost hints, retry policies, network policies, and contracts. Registry versions are immutable after creation — changing tools requires creating a new version.
Used by cmd/worker, cmd/ui, cmd/run, cmd/seed-registry, cmd/backup.
Usage
import "cruvero/internal/registry"
Key Types / Interfaces
| Type | Source | Description |
|---|---|---|
ToolRegistry | types.go | Versioned tool collection with metadata and content hash |
ToolDefinition | types.go | Tool metadata: name, schema, cost hint, retry/network policies, contracts |
ToolContract | types.go | Pre/postconditions for contract-driven tool execution |
Condition | types.go | Single contract condition (field, operator, value) |
CostHint | types.go | Per-call cost estimate for a tool |
RetryPolicy | types.go | Exponential backoff retry configuration |
Store | store.go | Interface for registry persistence (Put, Get, List) |
PostgresStore | store.go | PostgreSQL-backed registry store |
Key Files
| File | Purpose |
|---|---|
types.go | All registry types: ToolRegistry, ToolDefinition, contracts |
store.go | Store interface and PostgresStore implementation |
hash.go | Content hashing for registry integrity |