/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** * Fetch response sanitizer. * * Implements three sanitization modes applied to HTTP response content before * it is returned to the caller. The mode is deterministic and auditable: * every result includes the `sanitization_tier` field indicating which mode * was applied. * * Modes: * - `none` , No sanitization. Content is returned as-is. Use only for * trusted internal hosts. * - `safe-text`, Default. Strips HTML script/style blocks and control * characters. Safe for general external content. * - `strict` , Aggressive: allows only printable ASCII and common Unicode * whitespace. Strips all HTML tags, script/style, and non- * printable characters. Use for untrusted or unknown hosts. */ /** * Sanitization mode applied to an HTTP response body. * * - `none` , No sanitization; content returned verbatim. * - `safe-text`, Strips script/style blocks and control characters. * - `strict` , Strips all HTML, allows only printable ASCII + whitespace. */ export type SanitizeMode = 'none' | 'safe-text' | 'strict'; /** * Result of applying a sanitizer to response content. */ export interface SanitizeResult { /** Sanitized content string. */ content: string; /** The sanitization mode that was applied. */ mode: SanitizeMode; /** Whether the content was modified by sanitization. */ modified: boolean; } /** * Apply the specified sanitization mode to response content. * * This function is deterministic: given the same `content` and `mode`, it * always produces the same output. The `modified` field in the result * indicates whether any transformation occurred. * * @param content - Raw response body string. * @param mode - Sanitization mode to apply. * @returns `SanitizeResult` with sanitized content, mode applied, and * whether the content was modified. */ export declare function applySanitizer(content: string, mode: SanitizeMode): SanitizeResult; /** * Resolve the effective sanitize mode, applying the rollback default. * * When no explicit mode is requested, defaults to `'safe-text'`, the * rollback-safe default for fetch sanitization. * * @param requested - Caller-supplied mode (may be undefined). * @returns Effective `SanitizeMode` to apply. */ export declare function resolveSanitizeMode(requested: SanitizeMode | undefined): SanitizeMode; //# sourceMappingURL=sanitizer.d.ts.map