Skip to main content

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

TypeSourceDescription
ToolRegistrytypes.goVersioned tool collection with metadata and content hash
ToolDefinitiontypes.goTool metadata: name, schema, cost hint, retry/network policies, contracts
ToolContracttypes.goPre/postconditions for contract-driven tool execution
Conditiontypes.goSingle contract condition (field, operator, value)
CostHinttypes.goPer-call cost estimate for a tool
RetryPolicytypes.goExponential backoff retry configuration
Storestore.goInterface for registry persistence (Put, Get, List)
PostgresStorestore.goPostgreSQL-backed registry store

Key Files

FilePurpose
types.goAll registry types: ToolRegistry, ToolDefinition, contracts
store.goStore interface and PostgresStore implementation
hash.goContent hashing for registry integrity