/** * agentAuditLog.ts — Forensic audit trail for every agent tool call. * * Architecture: * PRIMARY: Local JSONL append at ~/.careervivid/agent-audit.log * Fast, offline, zero network dependency. * Each line is a self-contained JSON record. * * SECONDARY: Firebase Firestore (jastalk-firebase / agent_audit_logs) * Written fire-and-forget (non-blocking). Fails silently. * Gives cloud visibility and cross-device forensics via the web dashboard. * * Usage (in repl.ts): * import { auditLog, flushAuditLog } from "./agentAuditLog.js"; * auditLog({ sessionId, tool: name, args, result, durationMs }); * // On session end: * await flushAuditLog(); */ export interface AuditEntry { ts: string; sessionId: string; tool: string; args: Record; resultSummary: string; durationMs: number; ok: boolean; } export declare let SESSION_ID: string; /** Call once at startup so the session summary records the correct mode and model. */ export declare function initSessionContext(mode: string, model: string): void; export declare function auditLog(entry: { sessionId?: string; tool: string; args: Record; result: string; durationMs: number; }): void; export declare function flushAuditLog(): Promise; export declare function writeSessionSummary(stats: { turns: number; mutations: number; toolCalls: number; creditsUsed?: number; }): Promise; //# sourceMappingURL=agentAuditLog.d.ts.map