/** * Agent Debugger — Step-through debugging for agent traces * * Interactive debugger that lets you step through agent traces * like a traditional code debugger. * * @example * ```bash * agentprobe debug trace.json * # Step 1/7: User → Agent: "Find flights to Paris" * # [s]tep | [n]ext | [i]nspect | [b]reakpoint | [c]ontinue | [q]uit * ``` */ import type { AgentTrace, TraceStep } from './types'; export interface DebugBreakpoint { step?: number; toolName?: string; type?: string; condition?: (step: TraceStep, index: number) => boolean; } export interface DebugContext { totalTokens: number; totalCost: number; toolsAvailable: string[]; toolsCalled: string[]; stepDurations: number[]; variables: Record; } export interface DebugState { trace: AgentTrace; currentStep: number; breakpoints: DebugBreakpoint[]; context: DebugContext; paused: boolean; history: number[]; } /** * Format a trace step for display. */ export declare function formatStep(step: TraceStep, index: number, total: number): string; /** * Build the debug context from trace up to the given step. */ export declare function buildContext(trace: AgentTrace, upToStep: number): DebugContext; /** * Format debug context for display. */ export declare function formatContext(ctx: DebugContext): string; /** * Check if a step matches any breakpoint. */ export declare function matchesBreakpoint(step: TraceStep, index: number, breakpoints: DebugBreakpoint[]): boolean; /** * Parse a breakpoint command string. * Supports: "step=5", "tool=search", "type=llm_call" */ export declare function parseBreakpoint(input: string): DebugBreakpoint | null; /** * Create a new debug state for a trace. */ export declare function createDebugState(trace: AgentTrace): DebugState; /** * Process a debug command and return updated state + output. */ export declare function processCommand(state: DebugState, command: string): { state: DebugState; output: string; quit: boolean; }; /** * Format initial debug session header. */ export declare function formatDebugHeader(trace: AgentTrace): string; //# sourceMappingURL=debugger.d.ts.map