/** * Runtime skill registration: the packaged bailian-kb SKILL.md joins the catalog * when a skills registry is composed. * * The file's YAML frontmatter is the single source of truth for the routing name * and description — duplicating them here drifts, and the copy that loses is the * one nobody reads. The frontmatter must also be STRIPPED from the registered * body: `SkillDefinition.content` is contractually the body a provider has * already cleaned of its own metadata, and `ctx.skills.register()` parses * nothing, so handing over the raw file ships the YAML block into the model's * context. */ import type { Context } from "@deepseek-ai/cordis"; /** The registrable fields carried by one skill file. */ export interface ParsedSkillFile { /** Kebab-case skill name from frontmatter. */ name: string; /** Routing description from frontmatter (the catalog truncates at 500 chars). */ description: string; /** Optional extra routing guidance. */ whenToUse?: string; /** Optional frontmatter `metadata` object. */ metadata?: Record; /** Markdown body with the frontmatter block removed. */ content: string; } /** * Parse one skill file into its registrable fields. * @param raw - the file's full text. * @returns the parsed fields, or undefined when the frontmatter is absent, unparsable, or missing name/description. */ export declare function parseSkillFile(raw: string): ParsedSkillFile | undefined; /** * Register the management skill when the skills registry is composed; headless * assemblies without the seam stay unaffected. An unreadable or malformed file * degrades to a warning — a broken bundled asset must not fail plugin load. * @param ctx - the plugin context. */ export declare function registerSkill(ctx: Context): void;