/** * Audit — niemutowalny, append-only log wrażliwych akcji. * * Każda akcja z klasy `business` (submit transakcji, override compliance, * step-up, switch context, devtools open w prod) MUSI być zaudytowana. * * Retencja 5-7 lat zgodnie z MiFID II / KNF. Explainability — z logu da się * zrekonstruować DLACZEGO system dopuścił transakcję. * * Mock mode: audit sink zapisuje do /fixtures/audit/** (commitowalne). * Prod: dedykowany storage (WORM albo event store z hash-chain). */ import type { CorrelationId } from '../identity/index.js'; import type { SessionSubject } from '../session/index.js'; import type { ComplianceEvaluation } from '../compliance/index.js'; export interface AuditEvent { readonly id: string; readonly at: number; readonly correlationId: CorrelationId; readonly actor: SessionSubject; /** Dot-case event type — np. `fx.forward.submit`, `session.elevate`. */ readonly type: string; readonly payload: Readonly>; readonly complianceSnapshot?: ComplianceEvaluation; readonly result: 'success' | 'failure' | 'denied'; readonly reason?: string; readonly sessionId?: string; readonly clientIp?: string; readonly userAgent?: string; } export interface AuditSink { /** Zapis audit event. Nie rzuca — błąd zapisu sam jest audit-owany przez fallback. */ write(event: AuditEvent): Promise; } export declare const AUDIT_SINK: import("../index.js").EchelonToken; //# sourceMappingURL=index.d.ts.map