/** * Agent Chaos Testing — Inject chaos scenarios into agent environments. * Supports: api_latency, api_error, tool_failure, response_corruption, context_overflow. */ import type { AgentTrace } from './types'; export type ChaosType = 'api_latency' | 'api_error' | 'tool_failure' | 'response_corruption' | 'context_overflow' | 'tool_timeout' | 'rate_limit' | 'malformed_response'; export interface ChaosScenario { type: ChaosType; name?: string; target?: string; tool?: string; delay_ms?: number; error?: string | number; probability?: number; corrupt_tokens?: string; inject_tokens?: number; inject?: string; } export interface ChaosConfig { chaos: { scenarios: ChaosScenario[]; }; } export interface ChaosResult { scenario: ChaosScenario; applied: boolean; affectedSteps: number; description: string; } /** * Parse a chaos config from YAML file. */ export declare function parseChaosConfig(filePath: string): ChaosConfig; /** * Parse chaos config from a YAML string. */ export declare function parseChaosConfigString(yamlStr: string): ChaosConfig; /** * Get a specific scenario by type from config. */ export declare function getScenario(config: ChaosConfig, type: ChaosType): ChaosScenario | undefined; /** * Apply a chaos scenario to a trace (returns a modified copy). */ export declare function applyChaos(trace: AgentTrace, scenario: ChaosScenario): { trace: AgentTrace; result: ChaosResult; }; /** * Apply multiple chaos scenarios to a trace. */ export declare function applyAllChaos(trace: AgentTrace, scenarios: ChaosScenario[]): { trace: AgentTrace; results: ChaosResult[]; }; /** * Describe a chaos scenario in human-readable form. */ export declare function describeChaos(scenario: ChaosScenario): string; /** * Format chaos results as a report. */ export declare function formatChaosReport(results: ChaosResult[]): string; /** * Validate chaos config structure. */ export declare function validateChaosConfig(config: any): { valid: boolean; errors: string[]; }; //# sourceMappingURL=chaos.d.ts.map