import type { Database } from "bun:sqlite";
export type TraceType = "tool_call" | "llm_call" | "error" | "handoff" | "custom";
export interface TaskTrace {
    id: string;
    task_id: string;
    agent_id: string | null;
    trace_type: TraceType;
    name: string | null;
    input_summary: string | null;
    output_summary: string | null;
    duration_ms: number | null;
    tokens: number | null;
    cost_usd: number | null;
    created_at: string;
}
export interface LogTraceInput {
    task_id: string;
    agent_id?: string;
    trace_type: TraceType;
    name?: string;
    input_summary?: string;
    output_summary?: string;
    duration_ms?: number;
    tokens?: number;
    cost_usd?: number;
}
export declare function logTrace(input: LogTraceInput, db?: Database): TaskTrace;
export declare function getTaskTraces(taskId: string, db?: Database): TaskTrace[];
export declare function getTraceStats(taskId: string, db?: Database): {
    total: number;
    tool_calls: number;
    llm_calls: number;
    errors: number;
    total_tokens: number;
    total_cost_usd: number;
    total_duration_ms: number;
};
//# sourceMappingURL=traces.d.ts.map