/**
 * Request/response trace logger for debugging OwlCoda proxy traffic.
 * Enable via OWLCODA_TRACE=1 env var or /trace REPL command.
 *
 * Trace entries are written as JSON files to ~/.owlcoda/trace/
 */
export interface TraceEntry {
    timestamp: string;
    direction: 'request' | 'response';
    method: string;
    endpoint: string;
    statusCode?: number;
    durationMs?: number;
    body: unknown;
    headers: Record<string, string>;
}
export interface TokenUsage {
    inputTokens: number;
    outputTokens: number;
    cacheReadTokens: number;
    cacheWriteTokens: number;
    requestCount: number;
    startedAt: string;
}
export declare function getTokenUsage(): TokenUsage;
export declare function addTokenUsage(input: number, output: number, cacheRead?: number, cacheWrite?: number): void;
export declare function resetTokenUsage(): void;
export declare function isTraceEnabled(): boolean;
export declare function setTraceEnabled(enabled: boolean): void;
export declare function traceRequest(method: string, endpoint: string, headers: Record<string, string | string[] | undefined>, body: unknown): Promise<string | null>;
export declare function traceResponse(traceId: string | null, method: string, endpoint: string, statusCode: number, durationMs: number, body: unknown): Promise<void>;
