/** * Fault Injection — Chaos engineering for AI agents. * Wraps tool calls with configurable failure modes to test agent resilience. */ export type FaultType = 'error' | 'timeout' | 'slow' | 'corrupt'; export interface FaultConfig { type: FaultType; message?: string; delay_ms?: number; probability?: number; } export type FaultMap = Record; /** * FaultInjector wraps tool execution with configurable failure injection. */ export declare class FaultInjector { private faults; constructor(faults?: FaultMap); /** * Check if a fault should be injected for a given tool. */ shouldInject(toolName: string): boolean; /** * Get the fault config for a tool, or undefined if none. */ getFault(toolName: string): FaultConfig | undefined; /** * Wrap a tool call. Returns the result or throws/delays based on fault config. */ wrapToolCall(toolName: string, execute: () => Promise): Promise; /** * Get a summary of configured faults for reporting. */ summary(): string[]; } export declare class FaultInjectionError extends Error { toolName: string; fault: FaultConfig; constructor(message: string, toolName: string, fault: FaultConfig); } //# sourceMappingURL=faults.d.ts.map