import { ToolContract } from "../tool/tool.mjs"; import { SkillRecord } from "./contracts/skill-record.type.mjs"; //#region ../ai/src/skills/save-skill-tool.d.ts /** Validated input of the `saveSkill` tool. */ type SaveSkillInput = { name: string; description: string; body: string; tags?: string[]; }; /** Result the `saveSkill` tool feeds back to the model. */ type SaveSkillResult = { saved: true; name: string; status: "candidate"; } | { error: string; }; /** Dependencies the `saveSkill` tool closes over. */ type SaveSkillToolDeps = { /** Write an INERT candidate; the returned record is `type: "candidate"`. */saveCandidate: (record: Omit) => Promise; /** Fired on a successful save (`type: "saved"`); errors swallowed by the sink wrapper. */ onSaved?: (record: SkillRecord) => void; }; /** * Build the **Phase 2** `saveSkill` tool — exposed ONLY when a `review` * gate is configured. It writes an INERT `type: "candidate"` record via * `saveCandidate`. A candidate is filtered out of the catalog and from * preload — it can NEVER be injected until the default-DENY review gate * promotes it. So `saveSkill` alone can never turn the model's own output * into an injected instruction; promotion is a separate, gated step. * * `execute` never throws — a store write failure surfaces as an error * result so the run continues. */ declare function saveSkillTool(deps: SaveSkillToolDeps): ToolContract; //#endregion export { SaveSkillInput, SaveSkillResult, SaveSkillToolDeps, saveSkillTool }; //# sourceMappingURL=save-skill-tool.d.mts.map