UNPKG

trellis

Version:

Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications

57 lines 1.66 kB
/** * Audit Trail for Sync Operations (TRL-336) * * Logs all sync operations to .trellis/sync-audit.jsonl for compliance * and security monitoring. */ export interface AuditEntry { timestamp: string; operation: 'connect' | 'disconnect' | 'send' | 'receive' | 'quarantine' | 'bootstrap'; peerId: string; details: { messageCount?: number; messageSize?: number; reason?: string; opCount?: number; success: boolean; error?: string; }; } export declare class SyncAuditTrail { private auditPath; private enabled; constructor(rootPath?: string, enabled?: boolean); /** * Log an audit entry. */ log(entry: AuditEntry): void; /** * Log connection event. */ logConnect(peerId: string, success: boolean, error?: string): void; /** * Log disconnect event. */ logDisconnect(peerId: string, success: boolean): void; /** * Log message send event. */ logSend(peerId: string, messageCount: number, messageSize: number, success: boolean, error?: string): void; /** * Log message receive event. */ logReceive(peerId: string, messageCount: number, messageSize: number, success: boolean, error?: string): void; /** * Log quarantine event. */ logQuarantine(peerId: string, reason: string, opCount: number): void; /** * Log bootstrap event. */ logBootstrap(peerId: string, opCount: number, success: boolean, error?: string): void; /** * Enable or disable audit logging. */ setEnabled(enabled: boolean): void; } //# sourceMappingURL=audit-trail.d.ts.map