export interface Message { role: 'system' | 'user' | 'assistant' | 'tool'; content: string; tool_call_id?: string; tool_calls?: ToolCall[]; } export interface ToolCall { id: string; type: 'function'; function: { name: string; arguments: string; }; } export interface AgentTrace { id: string; timestamp: string; steps: TraceStep[]; metadata: Record; } export type StepType = 'llm_call' | 'tool_call' | 'tool_result' | 'thought' | 'output'; export interface TraceStep { type: StepType; timestamp: string; data: { model?: string; messages?: Message[]; tool_name?: string; tool_args?: Record; tool_result?: any; content?: string; tokens?: { input?: number; output?: number; }; }; duration_ms?: number; } export interface TestConfig { timeout_ms?: number; parallel?: boolean; max_concurrency?: number; strict?: boolean; env?: Record; } export interface HookConfig { command: string; } export interface SuiteHooks { beforeAll?: HookConfig; afterAll?: HookConfig; beforeEach?: HookConfig; afterEach?: HookConfig; } export interface AgentConfig { script?: string; command?: string; module?: string; entry?: string; } export interface TestSuite { name: string; description?: string; config?: TestConfig; hooks?: SuiteHooks; tests: TestCase[]; } export interface FaultSpec { type: 'error' | 'timeout' | 'slow' | 'corrupt'; message?: string; delay_ms?: number; probability?: number; } export interface JudgeSpec { criteria: string; model?: string; threshold?: number; } export interface JudgeRubricCriterion { criterion: string; weight: number; } export interface TestCase { name: string; id?: string; input: string; context?: Record; trace?: string; agent?: AgentConfig; fixture?: string; mocks?: Record; faults?: Record; tags?: string[]; each?: Array>; retries?: number; retry_delay_ms?: number; depends_on?: string | string[]; env?: Record; template?: string; template_params?: Record; timeout_ms?: number; replay_overrides?: Record; expect: Expectations; } export interface Expectations { tool_called?: string | string[]; tool_not_called?: string | string[]; output_contains?: string | string[]; output_not_contains?: string | string[]; output_matches?: string; max_steps?: number; max_tokens?: number; max_duration_ms?: number; tool_args_match?: Record; tool_sequence?: string[]; snapshot?: boolean; max_cost_usd?: number; custom?: string; judge?: JudgeSpec; judge_rubric?: JudgeRubricCriterion[] & { threshold?: number; }; not?: Partial>; all_of?: Expectations[]; any_of?: Expectations[]; none_of?: Expectations[]; chain?: ChainStep[]; custom_assertions?: CustomAssertionRef[]; } export interface ChainStep { tool_called?: string; output_contains?: string; then?: ChainStep; } export interface CustomAssertionRef { name: string; params?: Record; } export interface AssertionResult { name: string; passed: boolean; expected?: any; actual?: any; message?: string; } export interface TestResult { name: string; passed: boolean; assertions: AssertionResult[]; duration_ms: number; trace?: AgentTrace; error?: string; tags?: string[]; skipped?: boolean; skipReason?: string; attempts?: number; } export interface SuiteResult { name: string; passed: number; failed: number; total: number; duration_ms: number; results: TestResult[]; } export type ReportFormat = 'console' | 'json' | 'markdown' | 'html' | 'junit'; export interface RunOptions { updateSnapshots?: boolean; tags?: string[]; group?: string; coverage?: boolean; declaredTools?: string[]; envFile?: string; badge?: string; } export interface TestSuiteGroups { [groupName: string]: string[]; } //# sourceMappingURL=types.d.ts.map