/** * Code-point-safe text helpers shared by chat-style communication adapters, * which had each copied the same chunker, tail preview, and trailing * normalizer. Pure and transport-agnostic. */ /** Default per-message character budget for chat transports. */ export declare const DEFAULT_MAX_MESSAGE_CHARS = 3800; /** Default placeholder used when a finished response has no text. */ export declare const DEFAULT_EMPTY_FINAL_TEXT = "No response text was returned."; /** Trim trailing whitespace, falling back to a placeholder when empty. */ export declare function normalizeTrailing(text: string, fallback: string): string; /** * Split text into chunks of at most `maxChars` Unicode code points, so * multi-byte characters are never cut in half. */ export declare function splitTextByCodePoints(text: string, maxChars: number): string[]; /** * Split text into chunks of at most `maxChars` code points, cutting at a * paragraph, line, or word boundary when one is available near the end of the * window and falling back to a blind cut when none is. * * This is what a chat transport should use for a finished answer: * {@link splitTextByCodePoints} cuts mid-sentence, and leaving the text * unchunked hands the boundary to the channel — Slack silently breaks a long * `chat.postMessage` into several messages of its own choosing and returns only * the last fragment's id. * * Whitespace AT a chosen boundary is consumed, so a chunk never begins with the * newline it was split on. Every other character survives, in order, and the * indentation of the line after a break is preserved. */ export declare function splitTextForChat(text: string, maxChars: number): string[]; /** * Build a bounded "tail" preview for streaming edits: when text exceeds * `maxChars`, show a `prefix` marker followed by the most recent code points. */ export declare function buildStreamingTailPreview(text: string, maxChars: number, prefix?: string): string; //# sourceMappingURL=stream-text.d.ts.map