Documentation
¶
Overview ¶
Package registry resolves tool/extension/MCP/skill manifests by name.
MVP scope: scans a root directory laid out as
<root>/tools/<name>/manifest.yaml <root>/extensions/<name>/manifest.yaml
Post-MVP, the registry will also resolve installed manifests from ~/.agent-controller/registry/ — same shape, different root.
Every manifest is validated against schemas/manifest.v1.json during scan. Invalid manifests cause Scan to return an error and a nil index — surfacing the schema authority at compile time, not at first run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManifestIndex ¶
type ManifestIndex struct {
// contains filtered or unexported fields
}
ManifestIndex stores manifests keyed by (kind, name).
func Scan ¶
func Scan(root string) (*ManifestIndex, error)
Scan walks <root>/tools, <root>/extensions, <root>/skills, and <root>/agents and returns an index of every manifest found.
Tools and extensions: each directory must contain manifest.yaml, validated against the embedded manifest schema. The first invalid manifest aborts the scan with a descriptive error. Entrypoint paths are rewritten to absolute paths anchored at the manifest's directory.
Skills: each directory under <root>/skills must contain SKILL.md. No manifest.yaml is required; the registry synthesises a Manifest with Kind="Skill" and Entrypoint pointing to the SKILL.md file. The directory name is used as the skill name. This matches Pi's loadSkillsFromDir discovery rule (a directory containing SKILL.md is treated as a skill root).
Agents (Subagent kind): each <root>/agents/<slug>.md file is treated as an agent definition. No manifest.yaml is required. The registry synthesises a Manifest with Kind="Subagent" and Entrypoint pointing to the .md file. This matches Pi's subagent extension discovery rule (discoverAgents reads .md files from a directory).
type Spec ¶
type Spec struct {
Entrypoint string `json:"entrypoint"`
InputSchema map[string]any `json:"inputSchema,omitempty"`
OutputSchema map[string]any `json:"outputSchema,omitempty"`
ConfigSchema map[string]any `json:"configSchema,omitempty"`
Hooks []string `json:"hooks,omitempty"`
RiskLevel string `json:"riskLevel,omitempty"`
RequiredPermissions []string `json:"requiredPermissions,omitempty"`
SupportsDryRun bool `json:"supportsDryRun,omitempty"`
}