/** * Execution trace for logging decisions and metrics. * Provides transparency into strategy execution for debugging, auditing, and human review. */ import type { ExecutionTraceExport } from "./types.js"; /** * Execution trace for logging decisions and metrics. * * Provides transparency into strategy execution for debugging, * auditing, and human review. * * @example * ```typescript * const trace = new ExecutionTrace(); * trace.recordDecision('Selected approach', 'Based on input complexity'); * trace.recordMetric('validationTime', 45, 'ms'); * const markdown = trace.toMarkdown(); * ``` */ export declare class ExecutionTrace { private readonly traceId; private readonly startTime; private readonly entries; private endTime?; constructor(startTime?: Date); /** * Record the start of execution. */ recordStart(data: Record): void; /** * Record a decision point with rationale. * * @param decision - What was decided * @param rationale - Why it was decided * @param data - Additional context */ recordDecision(decision: string, rationale: string, data?: Record): void; /** * Record a metric measurement. * * @param name - Metric name (e.g., 'validationTime') * @param value - Metric value * @param unit - Unit of measurement (e.g., 'ms', 'bytes') */ recordMetric(name: string, value: number, unit?: string): void; /** * Record an error that occurred during execution. */ recordError(error: Error | string, context?: Record): void; /** * Record a warning (non-blocking issue). */ recordWarning(message: string, data?: Record): void; /** * Record successful completion. */ recordSuccess(data: Record): void; /** * Export trace as JSON-serializable object. */ toJSON(): ExecutionTraceExport; /** * Export trace as Markdown for human review. */ toMarkdown(): string; /** * Get duration in milliseconds. */ getDuration(): number; private getSummary; private generateTraceId; private getEntryIcon; } //# sourceMappingURL=execution-trace.d.ts.map