import type { Tracer, Span } from '../tracing'; import type { GoldenTrace } from './golden-trace'; import type { AgentResponse } from '../agent/agent'; /** * Recorder for capturing traces into golden trace format */ export declare class GoldenTraceRecorder { private tracer; private spans; private toolCalls; private handoffs; private routing; private message; private response?; private startTime; constructor(tracer: Tracer); /** * Set up automatic span capture using a callback-enabled tracer * This should be called if you want spans to be automatically captured * Returns a new tracer with the callback registered */ createTracerWithCallback(): Tracer; /** * Record a message being processed */ recordMessage(message: string): void; /** * Record routing information */ recordRouting(routing: { method: 'agent.utterance' | 'intent.matching' | 'default.agent'; agentId?: string; intentId?: string; confidence?: number; matchType?: 'exact' | 'regex' | 'semantic'; }): void; /** * Record a tool call */ recordToolCall(toolCall: { toolId: string; args: Record; result?: any; startTime: number; endTime: number; status: 'success' | 'error'; error?: string; }): void; /** * Record a handoff */ recordHandoff(handoff: { fromAgent?: string; toAgent: string; message: string; context?: Record; startTime: number; endTime: number; depth: number; }): void; /** * Record the final response */ recordResponse(response: AgentResponse): void; /** * Capture all spans from the tracer * This should be called after processing is complete */ captureSpans(): void; /** * Add a span to be recorded * Called automatically when spans are created/ended if using NoOpTracer with callback */ addSpan(span: Span): void; /** * Convert recorded data to golden trace format */ toGoldenTrace(): GoldenTrace; /** * Save golden trace to file */ saveToFile(outputPath: string): Promise; /** * Reset the recorder for a new trace */ reset(): void; } //# sourceMappingURL=recorder.d.ts.map