/** * Persistence for stage-0 redaction counters (SEC-6). Counts + types only — * never the raw secret value. One row per (type, ingest) — see * migrations/005-security.sql for the `redaction_log` table. */ import type { DB } from './db.js'; import type { RedactionEvent } from '../redact/index.js'; export interface RedactionCountRow { type: string; count: number; } /** Collapse a flat event list into one row per type (count = occurrences). */ export declare function aggregateRedactionEvents(events: RedactionEvent[]): RedactionCountRow[]; /** * Write one `redaction_log` row per distinct type found in `events`. No-op * when `events` is empty (nothing to record, no wasted write). */ export declare function recordRedactionEvents(db: DB, events: RedactionEvent[], sessionId: string | null): void;