import type { ApiProvider, CallApiContextParams, CallApiOptionsParams, ProviderResponse, RedteamFileConfig } from '../../../types';
import type { BaseRedteamMetadata } from '../../types';
import type { Message } from '../shared';
export declare const DEFAULT_MAX_TURNS = 10;
export declare const DEFAULT_MAX_BACKTRACKS = 10;
/**
 * Represents metadata for the Crescendo conversation process.
 */
export interface CrescendoMetadata extends BaseRedteamMetadata {
    crescendoRoundsCompleted: number;
    crescendoBacktrackCount: number;
    crescendoResult: boolean;
    crescendoConfidence: number | null;
    stopReason: 'Grader failed' | 'Internal evaluator success' | 'Max rounds reached' | 'Max backtracks reached';
    successfulAttacks?: Array<{
        turn: number;
        prompt: string;
        response: string;
    }>;
    totalSuccessfulAttacks?: number;
}
/**
 * Represents the complete response from a Crescendo conversation.
 */
export interface CrescendoResponse extends ProviderResponse {
    metadata: CrescendoMetadata;
}
interface CrescendoConfig {
    injectVar: string;
    maxTurns?: number;
    maxBacktracks?: number;
    redteamProvider: RedteamFileConfig['provider'];
    excludeTargetOutputFromAgenticAttackGeneration?: boolean;
    stateful?: boolean;
    continueAfterSuccess?: boolean;
}
export declare class MemorySystem {
    private conversations;
    addMessage(conversationId: string, message: Message): void;
    getConversation(conversationId: string): Message[];
    duplicateConversationExcludingLastTurn(conversationId: string): string;
}
export declare class CrescendoProvider implements ApiProvider {
    readonly config: CrescendoConfig;
    private readonly nunjucks;
    private userGoal;
    private redTeamProvider;
    private scoringProvider;
    private memory;
    private targetConversationId;
    private redTeamingChatConversationId;
    private maxTurns;
    private maxBacktracks;
    private stateful;
    private excludeTargetOutputFromAgenticAttackGeneration;
    private successfulAttacks;
    constructor(config: CrescendoConfig);
    private getRedTeamProvider;
    private getScoringProvider;
    id(): string;
    callApi(prompt: string, context?: CallApiContextParams, options?: CallApiOptionsParams): Promise<CrescendoResponse>;
    private runAttack;
    private getAttackPrompt;
    private sendPrompt;
    private getRefusalScore;
    private getEvalScore;
    private backtrackMemory;
    private logChatHistory;
    private recordSuccessfulAttack;
}
export default CrescendoProvider;
//# sourceMappingURL=index.d.ts.map