/** * TokenReceipt — an auditable, per-session ledger of how each answer was produced: * exact cache hit, semantic cache hit, file read, or fresh reasoning. * * The point is trust, not just savings: the user (or the model itself) can always * ask "where did that answer actually come from" and get a verifiable trail, * instead of taking a "X% tokens saved" claim on faith. */ export type ReceiptEventType = 'exact_cache_hit' | 'semantic_cache_hit' | 'file_read' | 'reasoning' | 'tool_call'; export interface ReceiptEvent { type: ReceiptEventType; label: string; timestamp: number; meta?: Record; } export declare function recordReceiptEvent(type: ReceiptEventType, label: string, meta?: Record): void; /** * Number of events recorded so far. The dispatcher samples this around a handler to * tell whether the handler already logged something specific (a cache hit, a miss) * before falling back to a generic tool_call entry. */ export declare function getLedgerLength(): number; export interface ReceiptSummary { totalEvents: number; byType: Record; recent: ReceiptEvent[]; } export declare function getReceiptSummary(limit?: number): ReceiptSummary; export declare function clearReceiptLedger(): void; //# sourceMappingURL=TokenReceipt.d.ts.map