/** * Utilities for formatting skills for HTTP endpoints. * * These utilities provide formatted output for: * - /llm.txt - Compact skill summaries * - /llm_full.txt - Full skills with instructions and tool schemas * - /skills API - JSON responses */ import type { SkillContent, SkillEntry } from '../common'; import type ToolRegistry from '../tool/tool.registry'; import type { SkillVisibility, SkillResources } from '../common/metadata/skill.metadata'; import type { SkillRegistryInterface as SkillRegistryInterfaceType } from './skill.registry'; /** * Compact skill summary for /llm.txt endpoint. */ export interface CompactSkillSummary { name: string; description: string; tools?: string[]; tags?: string[]; } /** * Format skills for compact /llm.txt output. * Returns a plain text format suitable for LLM consumption. * * @param skills - Array of skill entries to format * @returns Formatted plain text string * * @example Output format * ``` * # review-pr * Review a GitHub pull request * Tools: github_get_pr, github_add_comment * Tags: github, code-review * * --- * * # deploy-app * Deploy application to production * Tools: docker_build, k8s_apply * Tags: deployment, kubernetes * ``` */ export declare function formatSkillsForLlmCompact(skills: SkillEntry[]): string; /** * Format skills with full instructions AND tool schemas for /llm_full.txt. * Loads full skill content and includes complete tool schemas. * * @param registry - Skill registry to load skills from * @param toolRegistry - Tool registry to get tool schemas * @param visibility - Optional visibility filter ('http' or 'both') * @returns Formatted plain text with full skill details */ export declare function formatSkillsForLlmFull(registry: SkillRegistryInterfaceType, toolRegistry: ToolRegistry, visibility?: SkillVisibility): Promise; /** * Format a skill with FULL tool schemas (input/output) - not just names. * Used by /llm_full.txt and enhanced loadSkill response. * * @param skill - The loaded skill content * @param availableTools - List of available tool names * @param missingTools - List of missing tool names * @param toolRegistry - Tool registry for schema lookup * @returns Formatted markdown string */ export declare function formatSkillForLLMWithSchemas(skill: SkillContent, availableTools: string[], missingTools: string[], toolRegistry: ToolRegistry): string; /** * Skill API response structure. */ export interface SkillApiResponse { id: string; name: string; description: string; tags: string[]; tools: string[]; parameters?: Array<{ name: string; description?: string; required: boolean; type: string; }>; priority: number; visibility: SkillVisibility; license?: string; compatibility?: string; specMetadata?: Record; allowedTools?: string; resources?: SkillResources; availableTools?: string[]; missingTools?: string[]; isComplete?: boolean; } /** * Convert a skill entry to a JSON-serializable summary. * Used by the /skills API endpoint. * * @param skill - The skill entry * @param loadResult - Optional load result with tool availability info * @returns JSON-serializable object */ export declare function skillToApiResponse(skill: SkillEntry, loadResult?: { availableTools: string[]; missingTools: string[]; isComplete: boolean; }): SkillApiResponse; /** * Filter skills by visibility for a given context. * * @param skills - Array of skill entries * @param context - The context requesting skills ('mcp' or 'http') * @returns Filtered array of skills visible in the given context */ export declare function filterSkillsByVisibility(skills: SkillEntry[], context: 'mcp' | 'http'): SkillEntry[]; //# sourceMappingURL=skill-http.utils.d.ts.map