/** * Skills System - Prompt expansions for specialized agent behavior * * Skills are reusable prompt templates that can be invoked to provide * specialized capabilities to agents. They allow you to define * domain-specific instructions that can be dynamically added to conversations. */ /** * Skill definition */ export interface Skill { /** * Unique identifier for the skill */ name: string; /** * Human-readable description of what the skill does */ description: string; /** * The prompt content that will be expanded when the skill is invoked */ prompt: string; /** * Optional tags for categorization */ tags?: string[]; /** * Optional version string */ version?: string; /** * Whether this skill is enabled (default: true) */ enabled?: boolean; } /** * Result of invoking a skill */ export interface SkillInvocationResult { /** * The skill that was invoked */ skill: Skill; /** * The expanded prompt content */ prompt: string; /** * Whether the invocation was successful */ success: boolean; /** * Error message if invocation failed */ error?: string; } /** * Options for skill invocation */ export interface SkillInvokeOptions { /** * Variables to interpolate into the skill prompt * Use {{variable}} syntax in the prompt template */ variables?: Record; /** * Additional context to prepend to the prompt */ context?: string; } /** * Skill Registry - Manages skill registration and invocation */ export declare class SkillRegistry { private readonly skills; /** * Register a new skill */ register(skill: Skill): void; /** * Register multiple skills at once */ registerAll(skills: Skill[]): void; /** * Get a skill by name */ get(name: string): Skill | undefined; /** * Check if a skill exists */ has(name: string): boolean; /** * Get all registered skills */ getAll(): Skill[]; /** * Get all enabled skills */ getEnabled(): Skill[]; /** * Get skills by tag */ getByTag(tag: string): Skill[]; /** * Get skill names */ getNames(): string[]; /** * Remove a skill */ remove(name: string): boolean; /** * Clear all skills */ clear(): void; /** * Enable a skill */ enable(name: string): boolean; /** * Disable a skill */ disable(name: string): boolean; /** * Invoke a skill by name */ invoke(name: string, options?: SkillInvokeOptions): SkillInvocationResult; /** * Get skill count */ get size(): number; } /** * Helper function to define a skill */ export declare function defineSkill(options: { name: string; description: string; prompt: string; tags?: string[]; version?: string; enabled?: boolean; }): Skill; /** * Create a new skill registry */ export declare function createSkillRegistry(): SkillRegistry; /** * Built-in skills that are commonly useful */ export declare const builtinSkills: Skill[]; /** * Get the default skill registry */ export declare function getDefaultSkillRegistry(): SkillRegistry; /** * Reset the default registry to built-in skills only */ export declare function resetDefaultSkillRegistry(): void;