import type { SkillContent } from '../../common/interfaces'; import type { SkillMetadata } from '../../common/metadata'; import { type SkillIndexDocument, type SkillIndexEntry } from './sep-2640.constants'; /** * Input for building an index entry from a registered skill. */ export interface IndexEntryInput { name: string; description: string; /** * Multi-segment skill path. The final segment MUST equal `name`. Defaults * to `[name]` for flat skills. */ skillPathSegments?: string[]; } /** * Build a single `type: "skill-md"` entry. The `url` is always * `skill:///SKILL.md`. */ export declare function buildSkillMdIndexEntry(input: IndexEntryInput): SkillIndexEntry; /** * Build a `type: "mcp-resource-template"` entry for a parameterised skill * namespace. Per SEP-2640, the `url` is an RFC 6570 URI template that * resolves to `SKILL.md` resource URIs. */ export declare function buildResourceTemplateIndexEntry(description: string, uriTemplate: string): SkillIndexEntry; /** * Build a `type: "archive"` entry. The `url` is the resource URI of the * packed archive (`application/zip` or `application/x-tar`). */ export declare function buildArchiveIndexEntry(description: string, archiveUri: string, name?: string): SkillIndexEntry; /** * Wrap a list of entries in the SEP-2640 index document shape. */ export declare function buildSkillIndex(entries: SkillIndexEntry[]): SkillIndexDocument; /** * Serialise a SkillContent back to SKILL.md form (YAML frontmatter + body). * * This is what `resources/read` returns for `skill:///SKILL.md` so * hosts can parse the result identically to a filesystem skill — fulfilling * SEP-2640's "Unified Treatment of Filesystem and MCP Skills" guidance. * * Note: instructions may contain references / examples tables that the * SDK auto-appends when loading; for the SEP route we restore the *raw* * body. Callers that already have raw instructions (e.g. parsed from a * SKILL.md file) should pass `rawInstructions` to bypass any reconstructed * content. */ export declare function serializeSkillMd(skill: SkillContent, rawInstructions?: string): string; /** * Synthesize a SkillContent from raw SkillMetadata for cases where the * index needs metadata-only access (no instructions loaded yet). */ export declare function metadataToContentStub(metadata: SkillMetadata): IndexEntryInput; //# sourceMappingURL=sep-2640.builders.d.ts.map