export type FrontmatterParseErrorCode = "invalid_frontmatter"; export declare class FrontmatterParseError extends Error { readonly code: FrontmatterParseErrorCode; constructor(code: FrontmatterParseErrorCode, message: string); } export interface ParsedBlock { frontmatter: Record; body: string; } export interface ParseOptions { /** When true, supports nested (indented) block keys as in workflow frontmatter. * When false, only flat key: value pairs are parsed (persona/skill frontmatter). */ allowNesting: boolean; } /** * Parse the YAML-like frontmatter block from a markdown string. * * Returns `{ frontmatter: {}, body: content }` if the content does not start with `---`. * Throws `FrontmatterParseError("invalid_frontmatter", …)` on malformed input. * * @param content Raw markdown string (may have CRLF line endings). * @param opts `allowNesting: false` → flat key:value only (persona/skill); * `allowNesting: true` → supports indented child blocks (workflow). */ export declare function parseFrontmatterBlock(content: string, opts: ParseOptions): ParsedBlock;