import type { SkillRequirements } from "./types.js"; /** * Extract YAML frontmatter from a SKILL.md string. * * Frontmatter is delimited by leading `---` fences. Returns the parsed object, * or an empty object `{}` if no frontmatter block is found or if the YAML is malformed. * Errors are silently swallowed — callers should treat an empty result as "no requirements". * * @param content - Raw SKILL.md file content (full string, including `---` fences) * @returns Parsed frontmatter object, or `{}` on absence or parse failure * * @docLink packages/resolver/api-reference#parseskill-frontmatter */ export declare function parseSkillFrontmatter(content: string): Record; /** * Parse skill requirements from raw SKILL.md content into a `SkillRequirements` object. * * Supports two frontmatter formats: * 1. **New format** — `metadata.prerequisites` with explicit * `files`, `inputs_required`, `inputs_optional`, `reads`, `produces`, and `resources` arrays. * 2. **Legacy format** — `metadata.user_inputs.dialog[]` array, automatically promoted to * `inputs_required` / `inputs_optional` based on each entry's `required` flag. * * Returns empty requirements `{ files: [], inputs_required: [], inputs_optional: [], reads: [], produces: [], resources: [] }` * when no recognisable prerequisites section is found. * * @param content - Raw SKILL.md file content (full string, including `---` fences) * @returns Structured `SkillRequirements` (never throws) * * @docLink packages/resolver/api-reference#parseskill-requirements */ export declare function parseSkillRequirements(content: string): SkillRequirements; /** * Extract compaction directives from a SKILL.md markdown body. * * Scans the markdown body (not frontmatter) for a `## Compaction Directives` section * and returns each bullet point as a trimmed string. Compaction directives are hints * the agent uses to summarise context when the conversation history grows long. * Returns an empty array when the section is absent. * * @param content - Raw SKILL.md file content (full string including frontmatter and body) * @returns Array of directive strings extracted from the bullet list, or `[]` if none found * * @docLink packages/resolver/api-reference#parse-compaction-directives */ export declare function parseCompactionDirectives(content: string): string[]; //# sourceMappingURL=parser.d.ts.map