/** * Custom attack YAML loader * Allows users to define custom red team attacks in YAML format */ import type { Mutation } from './mutations'; /** * Schema for custom attack definition in YAML */ export interface CustomAttackDefinition { /** Unique name for the attack */ name: string; /** Description of what the attack tests */ description: string; /** Severity level */ severity: 'low' | 'medium' | 'high' | 'critical'; /** Attack templates - use {{prompt}} as placeholder for the original prompt */ templates: string[]; /** Optional: Variations to apply to templates */ variations?: { /** Placeholder name (e.g., 'role') */ name: string; /** Values to substitute */ values: string[]; }[]; } /** * Schema for custom attacks YAML file */ export interface CustomAttacksFile { /** File format version */ version: string; /** List of custom attack definitions */ attacks: CustomAttackDefinition[]; } /** * Custom mutation created from YAML definition */ export declare class CustomMutation implements Mutation { readonly name: string; readonly description: string; readonly severity: 'low' | 'medium' | 'high' | 'critical'; private templates; private variations; constructor(definition: CustomAttackDefinition); mutate(prompt: string): string; } /** * Load custom attacks from a YAML file */ export declare function loadCustomAttacks(filePath: string): CustomMutation[]; /** * Load custom attacks from a YAML string */ export declare function parseCustomAttacks(yamlContent: string): CustomMutation[]; /** * Generate an example custom attacks YAML file */ export declare function generateExampleCustomAttacksYaml(): string; //# sourceMappingURL=custom-attacks.d.ts.map