export declare function autoCloseMarkdown(text: string): string; /** * What markdown context is *still open* at the end of `text`? Used to * decide what opening marker(s) the NEXT chunk needs prepended when we * split a long buffer across multiple platform messages mid-formatting * — without this, a chunk boundary inside a ` ```python … ``` ` block * would have the second message start with raw code that the platform * renders as plain text. */ export interface OpenMarkdownContext { /** If inside an unclosed fence, the language tag (may be ""). null otherwise. */ fenceLang: string | null; /** True if an unclosed single-backtick inline-code span is in flight. */ inlineCode: boolean; /** Bold/italic/strike markers still open, in stack order (outermost first). */ brackets: string[]; } export declare function detectOpenContext(text: string): OpenMarkdownContext; /** * Render the opener prefix for a continuation chunk so it can stand on * its own as a self-renderable markdown fragment. E.g. for an open * `` ```python `` fence, returns ` ```python\n `; for an open `**` bold, * returns `**`. */ export declare function renderContextOpener(ctx: OpenMarkdownContext): string; //# sourceMappingURL=auto-close-streaming.d.ts.map