/** * One index of everything the agent can *acquire* — MCP tools, skills, slash * commands, subagents, and plugins available or installed. * * The problem this exists for: deferral already withholds MCP tool schemas, but * the model still needs some way to find a withheld tool, and the only one it * had was an exact name match against a catalog dumped in full into the * resolver's description. Those two are locked together — an exact-only matcher * *forces* the full dump, because a name you cannot guess is a tool you cannot * reach. Give the matcher retrieval and the dump becomes optional, which is * where the context saving actually lives. * * The producers are deliberately not coupled to it: each one hands over a flat * list of documents for its own kind and knows nothing about retrieval. That is * what lets skills and commands join later (§6.4 leaves them eager for now) * without touching the search side. * * See docs/plugin-system-architecture.md §6. */ export type CapabilityKind = "mcp-tool" | "skill" | "command" | "agent" | "plugin-available" | "plugin-installed" /** A heading-level slice of hoocode's own shipped documentation. */ | "doc"; export interface CapabilityDoc { /** Unique and stable within a session; `:` by convention. */ id: string; kind: CapabilityKind; /** How the model refers to it — a tool name, skill name, plugin id. */ name: string; description: string; /** Where it came from: MCP server, plugin id, marketplace name. */ source?: string; /** * Whether the expensive part (a JSON schema, a skill body) is currently * withheld from context. * * Recorded rather than derived because it is the policy knob of §6.3: it says * which entries retrieval is actually *for*. An eager capability is already * visible to the model, so surfacing it in search results is a convenience; * a deferred one is otherwise unreachable. */ deferred: boolean; } /** Replace every document of `kind`. Producers call this on load and on reload. */ export declare function registerCapabilities(kind: CapabilityKind, docs: readonly CapabilityDoc[]): void; /** Every registered document, in a stable order (kind, then id). */ export declare function getCapabilities(kinds?: readonly CapabilityKind[]): CapabilityDoc[]; /** Drop everything. Tests, and a full session reset. */ export declare function clearCapabilities(): void; /** * Content hash of the current capability set — the key a persistent index is * stored under. * * Hashes the text that gets embedded, not the count: two sessions with the same * tools should share an index, and one where a server changed a description * should not silently reuse vectors describing the old one. */ export declare function capabilitySetHash(docs?: readonly CapabilityDoc[]): string; //# sourceMappingURL=registry.d.ts.map