/** * Per-block content sanitizer for orchestration wrapper leakage. * * Agent harnesses (OpenCode, Droid, ForgeCode, oh-my-opencode, etc.) inject * internal markup into message content — ``, ``, * ``, and similar tags. When the proxy flattens messages into * a text prompt for the Agent SDK, these tags become model-visible text that * can confuse the model or cause it to echo them back ("talking to itself"). * * This module strips known orchestration tags from **individual text blocks** * before flattening — not from the final concatenated string. Operating * per-block eliminates the cross-message regex risk that makes full-string * sanitization fragile. * * Pure module — no I/O, no imports from server.ts or session/. * * Fixes: https://github.com/rynfar/meridian/issues/167 */ export interface SanitizeOptions { /** Strip `` blocks. Enable for adapters (Droid) that leak * CWD/env through this tag. */ stripSystemReminder?: boolean; } /** * Strip orchestration wrappers from a single text string. * * Designed to be called on individual content blocks (not concatenated * prompt strings) to eliminate cross-block regex matching risk. */ export declare function sanitizeTextContent(text: string, opts?: SanitizeOptions): string; //# sourceMappingURL=sanitize.d.ts.map