/**
 * Strips model-specific control tokens from streamed text.
 *
 * Used both server-side (in the streaming pipeline) and by the Glass UI
 * (as a defense-in-depth fallback).  The patterns here cover tokens known
 * to leak from Gemma 4 / vLLM; Claude output is left untouched.
 */
declare const GEMMA_TOKEN_PATTERNS: RegExp[];
declare function isGemmaModel(modelId: string): boolean;
/**
 * Strip known control tokens from text.  Only applies to Gemma-family models;
 * other models pass through unchanged.
 */
/**
 * Strip known control tokens from text.  Only applies to Gemma-family models;
 * other models pass through unchanged.  Used for streamed text output.
 */
export declare function stripModelTokens(text: string, modelId: string): string;
/**
 * Aggressively strip ALL token-like fragments from a string.  Used for tool
 * call arguments where any `<|` corruption causes downstream failures.
 * More aggressive than `stripModelTokens` — removes bare `<|` and `|>` fragments
 * that don't match any known token template.
 */
export declare function stripModelTokensAggressive(text: string, modelId: string): string;
/**
 * Clean residual fragments left after aggressive token stripping.
 * After `<|` and `|>` are removed, orphaned `<`, `"`, `|` can remain
 * at string boundaries (e.g., `<<|"|uname -a` → `<"uname -a`).
 *
 * Conservative: only trims leading junk before what looks like a command,
 * and trailing junk. Does NOT touch content in the middle of the string.
 * Preserves heredoc syntax (`<<EOF`, `<<"EOF"`) via negative lookahead.
 */
export declare function cleanResidualTokenFragments(text: string): string;
export { isGemmaModel, GEMMA_TOKEN_PATTERNS };
