/**
 * Chat Sanitizer Service
 *
 * Masks sensitive metadata in chat messages before they are returned to
 * the frontend. Detects and redacts JWT tokens, file system paths,
 * API keys, and other secrets using pattern matching.
 *
 * @module services/chat/chat-sanitizer.service
 */
/**
 * Result of a sanitization operation.
 */
export interface SanitizeResult {
    /** The sanitized text with sensitive content masked */
    sanitized: string;
    /** Whether any content was actually masked */
    wasMasked: boolean;
    /** Names of the pattern types that matched (for logging/debugging) */
    matchedPatterns: string[];
}
/**
 * Sanitize a single text string by masking all detected sensitive content.
 *
 * Iterates through all known sensitive patterns and replaces matches with
 * the mask placeholder. Returns a result object indicating whether any
 * masking occurred and which pattern types matched.
 *
 * @param text - The text to sanitize
 * @returns SanitizeResult with sanitized text, masking flag, and matched patterns
 *
 * @example
 * ```typescript
 * const result = sanitizeText('Token: eyJhbGciOi...');
 * // result.sanitized === 'Token: ***'
 * // result.wasMasked === true
 * // result.matchedPatterns === ['jwt']
 * ```
 */
export declare function sanitizeText(text: string): SanitizeResult;
/**
 * Sanitize the metadata of a chat message object (shallow clone).
 *
 * Creates a shallow copy of the message and sanitizes:
 * - message.content (the user-visible text)
 * - message.metadata.rawOutput (if present — raw terminal output)
 *
 * Does NOT mutate the original message object.
 *
 * @param message - The chat message to sanitize (any object with content and optional metadata)
 * @returns A new message object with sensitive fields masked
 *
 * @example
 * ```typescript
 * const clean = sanitizeMessage(rawMessage);
 * // clean.content has secrets masked
 * // clean.metadata.rawOutput has secrets masked
 * ```
 */
export declare function sanitizeMessage<T extends {
    content: string;
    metadata?: Record<string, unknown>;
}>(message: T): T;
/**
 * Sanitize an array of chat messages.
 *
 * Convenience wrapper that applies sanitizeMessage to each message in the array.
 * Returns a new array — does not mutate the originals.
 *
 * @param messages - Array of chat messages to sanitize
 * @returns New array with all messages sanitized
 */
export declare function sanitizeMessages<T extends {
    content: string;
    metadata?: Record<string, unknown>;
}>(messages: T[]): T[];
//# sourceMappingURL=chat-sanitizer.service.d.ts.map