/** * SKILL.md frontmatter resolution — Agent Skills standard compatibility layer. * * The Agent Skills standard (agentskills.io) allows exactly six top-level * frontmatter fields: name, description, license, compatibility, metadata, * allowed-tools. Anything else is rejected by the reference validator * (skills-ref) and by Anthropic's Skills API / package_skill.py, which fails * with "Unexpected key(s) in SKILL.md frontmatter". * * agents-market-specific fields therefore live in the `metadata` map under an * `io.agentsmarket/` reverse-DNS prefix. The standard defines metadata as * map, so every value is a quoted scalar; lists are encoded as * comma-separated strings. * * Top-level fields remain accepted as a legacy fallback so skills published * before this change keep working. */ /** The six top-level fields the Agent Skills standard permits. * * Sourced from the standard, not invented here: agentskills.io allows exactly * `name`, `description`, `license`, `compatibility`, `metadata` and * `allowed-tools`, and the reference validator (skills-ref) plus Anthropic's * package_skill.py reject anything else with "Unexpected key(s) in SKILL.md * frontmatter". `validateSkillContent` below enforces it, because our own * resolver does not — it ignores unrecognised keys, so a file carrying one * publishes cleanly here and is then refused by every consumer that validates * against the standard. That is precisely the failure `skill validate` exists * to catch before the upload, not after it. */ export declare const STANDARD_TOP_LEVEL_KEYS: readonly string[]; /** Split a SKILL.md into frontmatter and body. * * Lives here, next to `resolveSkillFrontmatter`, so that publishing and * validating parse the file the same way. It was a private helper inside * publish.ts; a validator with its own copy would be a validator that agrees * with publish until the two drift, which is exactly the failure it is supposed * to prevent. */ export declare function parseSkillFile(content: string): { frontmatter: Record; body: string; }; export interface ResolvedSkillFrontmatter { name: string; description: string; version?: string; priceUsdc: number; tags: string[]; isPrivate?: boolean; grantedTo?: string[]; publicPreview?: string; allowedTools?: string; executorUrl?: string; } /** * The version the file declares, if any. Never throws. * * The publisher and the "what do I have installed" scan both want the * version, and neither of them wants a malformed file to stop them: a skill * with no usable version is a skill with no version, not a broken tool. */ export declare function readSkillVersion(frontmatter: Record): string | undefined; export declare function resolveSkillFrontmatter(frontmatter: Record): ResolvedSkillFrontmatter;