import type { MastraMessageV2 } from '../../agent/message-list/index.js';
import type { MastraLanguageModel } from '../../llm/model/shared.types.js';
import type { ChunkType } from '../../stream/index.js';
import type { Processor } from '../index.js';
export interface SystemPromptScrubberOptions {
    /** Strategy to use when system prompts are detected: 'block' | 'warn' | 'filter' | 'redact' */
    strategy?: 'block' | 'warn' | 'filter' | 'redact';
    /** Custom patterns to detect system prompts (regex strings) */
    customPatterns?: string[];
    /** Whether to include detection details in warnings */
    includeDetections?: boolean;
    /** Custom instructions for the detection agent */
    instructions?: string;
    /** Redaction method: 'mask' | 'placeholder' | 'remove' */
    redactionMethod?: 'mask' | 'placeholder' | 'remove';
    /** Custom placeholder text for redaction */
    placeholderText?: string;
    /** Model to use for the detection agent */
    model: MastraLanguageModel;
}
export interface SystemPromptDetectionResult {
    /** Specific detections with locations */
    detections?: SystemPromptDetection[];
    /** Redacted content if available */
    redacted_content?: string;
    /** Reason for detection */
    reason?: string;
}
export interface SystemPromptDetection {
    /** Type of system prompt detected */
    type: string;
    /** The detected content */
    value: string;
    /** Confidence score (0-1) */
    confidence: number;
    /** Start position in text */
    start: number;
    /** End position in text */
    end: number;
    /** Redacted value if available */
    redacted_value?: string;
}
export declare class SystemPromptScrubber implements Processor {
    readonly name = "system-prompt-scrubber";
    private strategy;
    private customPatterns;
    private includeDetections;
    private instructions;
    private redactionMethod;
    private placeholderText;
    private model;
    private detectionAgent;
    constructor(options: SystemPromptScrubberOptions);
    /**
     * Process streaming chunks to detect and handle system prompts
     */
    processOutputStream(args: {
        part: ChunkType;
        streamParts: ChunkType[];
        state: Record<string, any>;
        abort: (reason?: string) => never;
    }): Promise<ChunkType | null>;
    /**
     * Process the final result (non-streaming)
     * Removes or redacts system prompts from assistant messages
     */
    processOutputResult({ messages, abort, }: {
        messages: MastraMessageV2[];
        abort: (reason?: string) => never;
    }): Promise<MastraMessageV2[]>;
    /**
     * Detect system prompts in text using the detection agent
     */
    private detectSystemPrompts;
    /**
     * Redact text based on detected system prompts
     */
    private redactText;
    /**
     * Extract text content from a message
     */
    private extractTextFromMessage;
    /**
     * Create a redacted message with the given text
     */
    private createRedactedMessage;
    /**
     * Get default instructions for the detection agent
     */
    private getDefaultInstructions;
}
//# sourceMappingURL=system-prompt-scrubber.d.ts.map