interface BunYaml { parse(text: string): unknown; stringify(value: unknown, replacer: null, indent: number): string; } /** The runtime's YAML (Bun's), or `undefined` when this process is not Bun. */ export declare function bunYaml(): BunYaml | undefined; export interface ClaudeFrontmatter { /** What the runtime reads as the frontmatter (`{}` when absent or unparseable). */ frontmatter: Record; /** The body after the frontmatter (the whole text when there is none). */ body: string; /** Whether the text HAS a frontmatter block by the runtime's own split. */ matched: boolean; /** Set when the block matched and failed to parse both ways (the runtime then reads `{}`). */ error?: string; } /** * The runtime's frontmatter SPLIT alone — no YAML needed: `head` is everything the runtime reads as the * frontmatter block (a leading BOM included), `body` is what it reads as content. With no block, `head` is * empty and `body` is the text as given. The body is exactly what the runtime scans for `@imports`, and * the Winter SDK's rule loader splits the same way. */ export declare function claudeFrontmatterSplit(text: string): { head: string; body: string; }; /** The runtime's reading of a markdown file's frontmatter. `undefined` when no YAML parser is available. */ export declare function parseClaudeFrontmatter(text: string): ClaudeFrontmatter | undefined; /** The block the strict split captures (its close on a line of its own), or `undefined` when it does not match. */ export declare function strictFrontmatterBlock(text: string): string | undefined; /** * Writes `frontmatter` + `body` as one markdown file and PROVES the runtime reads it back as exactly * that object and body — by its own split, by the strict split, and by its own parse. `undefined` when * the proof fails (the caller skips the item rather than hand a runtime a file it would read differently). */ export declare function serializeClaudeFrontmatter(frontmatter: Record, body: string): string | undefined; export {};