/** * load_skill tool: loads a skill's full instructions into the agent's * active context. * * The skill body is read from the SkillRegistry, preprocessed (variable * substitution, shell commands, scripts), and pushed to the skill buffer. * The skill buffer is injected into ephemeral context via transformContext * on every subsequent LLM call within the current agentic loop. * * References: * - docs/cortex/skill-system.md * - docs/cortex/plans/phase-4-sub-agents-and-skills.md */ import { Type, type Static } from 'typebox'; import type { SkillRegistry } from './skill-registry.js'; import type { LoadedSkill } from './types.js'; export declare const LoadSkillParams: Type.TObject<{ name: Type.TString; arguments: Type.TOptional; }>; export type LoadSkillParamsType = Static; export declare const LOAD_SKILL_TOOL_NAME = "load_skill"; export interface LoadSkillToolConfig { /** The skill registry to load skills from. */ registry: SkillRegistry; /** Build the visible skills summary for the tool description. */ getAvailableSkillsSummary?: () => string; /** The skill buffer to push loaded skills into. */ getSkillBuffer: () => LoadedSkill[]; /** Push a loaded skill to the buffer (handles deduplication). */ pushToSkillBuffer: (skill: LoadedSkill) => void; } /** * Create the load_skill tool. * * Returns a Cortex-native tool. CortexAgent adapts it to pi-agent-core's * execute signature when synchronizing the tool inventory. * The tool description includes the available skills summary, which * updates when skills are added or removed from the registry. */ export declare function createLoadSkillTool(config: LoadSkillToolConfig): { name: string; description: string; parameters: typeof LoadSkillParams; execute: (args: unknown) => Promise; }; /** * Rebuild the load_skill tool's description with the current available * skills summary. Called when skills are added or removed. * * Returns a function that produces the updated description string. */ export declare function buildLoadSkillDescription(registry: SkillRegistry, availableSkillsSummary?: string): string; //# sourceMappingURL=skill-tool.d.ts.map