import type { ApiProvider, ProviderOptions } from '../types/providers';
import type { Plugin, Severity } from './constants';
export type Modifier = string | 'tone' | 'style' | 'context' | 'testGenerationInstructions';
export type Intent = string | string[];
export type RedteamObjectConfig = Record<string, unknown>;
export type PluginConfig = {
    examples?: string[];
    graderExamples?: {
        output: string;
        pass: boolean;
        score: number;
        reason: string;
    }[];
    severity?: Severity;
    language?: string;
    prompt?: string;
    purpose?: string;
    modifiers?: Partial<Record<Modifier, unknown>>;
    targetIdentifiers?: string[];
    targetSystems?: string[];
    mentions?: boolean;
    targetUrls?: string[];
    name?: string;
    multilingual?: boolean;
    indirectInjectionVar?: string;
    intent?: Intent | Intent[];
    policy?: string;
    systemPrompt?: string;
    excludeStrategies?: string[];
};
export type StrategyConfig = RedteamObjectConfig;
type ConfigurableObject = {
    id: string;
    config?: RedteamObjectConfig;
};
type WithNumTests = {
    numTests?: number;
};
type TestCase = {
    description?: string;
    vars?: Record<string, unknown>;
    provider?: string | ProviderOptions | ApiProvider;
    providerOutput?: string | Record<string, unknown>;
    assert?: any;
    options?: any;
};
export type RedteamPluginObject = ConfigurableObject & WithNumTests & {
    severity?: Severity;
    config?: PluginConfig;
};
export type RedteamPlugin = string | RedteamPluginObject;
export type RedteamStrategyObject = ConfigurableObject & {
    id: string;
    config?: {
        enabled?: boolean;
        plugins?: string[];
        [key: string]: unknown;
    };
};
export type RedteamStrategy = string | RedteamStrategyObject;
export interface PluginActionParams {
    provider: ApiProvider;
    purpose: string;
    injectVar: string;
    n: number;
    delayMs: number;
    config?: PluginConfig;
}
type CommonOptions = {
    injectVar?: string;
    language?: string;
    numTests?: number;
    plugins?: RedteamPluginObject[];
    provider?: string | ProviderOptions | ApiProvider;
    purpose?: string;
    strategies?: RedteamStrategy[];
    delay?: number;
    remote?: boolean;
    sharing?: boolean;
    excludeTargetOutputFromAgenticAttackGeneration?: boolean;
    testGenerationInstructions?: string;
    maxConcurrency?: number;
};
export interface RedteamCliGenerateOptions extends CommonOptions {
    cache: boolean;
    config?: string;
    defaultConfig: Record<string, unknown>;
    defaultConfigPath?: string;
    envFile?: string;
    maxConcurrency?: number;
    output?: string;
    force?: boolean;
    write: boolean;
    inRedteamRun?: boolean;
    verbose?: boolean;
    abortSignal?: AbortSignal;
    burpEscapeJson?: boolean;
    progressBar?: boolean;
}
export interface RedteamFileConfig extends CommonOptions {
    entities?: string[];
    severity?: Record<Plugin, Severity>;
    excludeTargetOutputFromAgenticAttackGeneration?: boolean;
}
export interface SynthesizeOptions extends CommonOptions {
    abortSignal?: AbortSignal;
    entities?: string[];
    language: string;
    maxConcurrency?: number;
    numTests: number;
    plugins: (RedteamPluginObject & {
        id: string;
        numTests: number;
    })[];
    prompts: [string, ...string[]];
    strategies: RedteamStrategyObject[];
    targetLabels: string[];
    showProgressBar?: boolean;
}
export type RedteamAssertionTypes = `promptfoo:redteam:${string}`;
export interface RedteamRunOptions {
    id?: string;
    config?: string;
    target?: string;
    output?: string;
    cache?: boolean;
    envPath?: string;
    maxConcurrency?: number;
    delay?: number;
    remote?: boolean;
    force?: boolean;
    filterProviders?: string;
    filterTargets?: string;
    verbose?: boolean;
    progressBar?: boolean;
    liveRedteamConfig?: any;
    logCallback?: (message: string) => void;
    progressCallback?: (completed: number, total: number, index: number | string, evalStep: any, // RunEvalOptions, but introduces circular dependency
    metrics: any) => void;
    abortSignal?: AbortSignal;
    loadedFromCloud?: boolean;
}
export interface SavedRedteamConfig {
    description: string;
    prompts: string[];
    target: ProviderOptions;
    plugins: (RedteamPlugin | {
        id: string;
        config?: any;
    })[];
    strategies: RedteamStrategy[];
    purpose?: string;
    extensions?: string[];
    numTests?: number;
    maxConcurrency?: number;
    applicationDefinition: {
        purpose?: string;
        features?: string;
        hasAccessTo?: string;
        doesNotHaveAccessTo?: string;
        userTypes?: string;
        securityRequirements?: string;
        exampleIdentifiers?: string;
        industry?: string;
        sensitiveDataTypes?: string;
        criticalActions?: string;
        forbiddenTopics?: string;
        competitors?: string;
        systemPrompt?: string;
        redteamUser?: string;
        accessToData?: string;
        forbiddenData?: string;
        accessToActions?: string;
        forbiddenActions?: string;
        connectedSystems?: string;
        attackConstraints?: string;
    };
    testGenerationInstructions?: string;
    entities: string[];
    defaultTest?: TestCase;
}
/**
 * Base metadata interface shared by all redteam providers
 */
export interface BaseRedteamMetadata {
    redteamFinalPrompt?: string;
    messages: Record<string, any>[];
    stopReason: string;
    redteamHistory?: {
        prompt: string;
        output: string;
    }[];
}
/**
 * Options for generating red team tests via the public API
 * This is a cleaner subset of RedteamCliGenerateOptions for external use
 */
export type RedteamGenerateOptions = Partial<RedteamCliGenerateOptions>;
export {};
//# sourceMappingURL=types.d.ts.map