import { type Token } from '@frontmcp/di'; import { type SkillInstructionSource, type SkillMetadata, type SkillRecord, type SkillType } from '../common'; import { type SkillContent, type SkillExampleInfo, type SkillReferenceInfo } from '../common/interfaces'; /** * Collect skill metadata from a decorated class. * * @param cls - The class to collect metadata from * @returns The skill metadata */ export declare function collectSkillMetadata(cls: SkillType): SkillMetadata; /** * Normalize any skill input to a SkillRecord. * * Handles: * - Class with @Skill decorator → SkillClassTokenRecord * - SkillValueRecord (from skill() helper) → passthrough * - SkillFileRecord → passthrough * * @param item - The skill input to normalize * @returns A normalized SkillRecord * @throws Error if the input is invalid */ export declare function normalizeSkill(item: unknown): SkillRecord; /** * Check if an object is a SkillRecord. */ export declare function isSkillRecord(item: unknown): item is SkillRecord; /** * Get dependency tokens from a skill record for DI graph validation. * * @param rec - The skill record * @returns Array of dependency tokens */ export declare function skillDiscoveryDeps(rec: SkillRecord): Token[]; /** * Load instructions from a skill instruction source. * * @param source - The instruction source (inline, file, or URL) * @param basePath - Base path for resolving relative file paths * @returns The loaded instructions as a string */ export declare function loadInstructions(source: SkillInstructionSource, basePath?: string): Promise; /** * Build SkillContent from metadata and resolved instructions. * * @param metadata - The skill metadata * @param instructions - The resolved instructions string * @param resolvedReferences - Optional resolved reference metadata from references/ directory * @returns The full skill content */ export declare function buildSkillContent(metadata: SkillMetadata, instructions: string, resolvedReferences?: SkillReferenceInfo[], resolvedExamples?: SkillExampleInfo[]): SkillContent; /** * Scan an examples/ directory for .md files organized by reference subdirectories. * Parses YAML frontmatter for name, description, reference, and level. * * @param examplesDir - Absolute path to the examples/ directory * @returns Array of resolved example info, or undefined if no examples */ export declare function resolveExamples(examplesDir: string): Promise; /** * Scan a references/ directory for .md files and extract metadata. * Parses YAML frontmatter for name/description, falls back to heading/paragraph. * * @param refsDir - Absolute path to the references/ directory * @returns Array of resolved reference info, or undefined if no references */ export declare function resolveReferences(refsDir: string): Promise; /** * Format a skill for LLM consumption. * * Creates a markdown-formatted string with the skill instructions, * tool information, and any warnings about missing tools. * * @param skill - The loaded skill content * @param availableTools - List of available tools * @param missingTools - List of missing tools * @returns Formatted skill content as markdown */ export declare function formatSkillForLLM(skill: SkillContent, availableTools: string[], missingTools: string[]): string; /** * Generate next steps guidance after loading skills. * * @param skills - Array of loaded skills with their tool availability * @param allToolsAvailable - Whether all tools across all skills are available * @returns Human-readable guidance string */ export declare function generateNextSteps(skills: Array<{ name: string; isComplete: boolean; tools: Array<{ name: string; available: boolean; }>; }>, allToolsAvailable: boolean): string; /** * Generate search guidance based on results. * * @param skills - Array of search results with executability info * @param query - The original search query * @returns Human-readable guidance string */ export declare function generateSearchGuidance(skills: Array<{ name: string; score: number; canExecute: boolean; }>, query: string): string; //# sourceMappingURL=skill.utils.d.ts.map