import type { FastifyInstance } from "fastify"; import type { CollectorConfig } from "./config.js"; import type { CollectorStore } from "./store.js"; /** * Register the audit hooks on `app`: * * - `preSerialization` captures the row count when a handler returned an array * (streamed/hijacked responses simply have none); * - `onResponse` writes the row for authenticated, non-dashboard requests. * * `internalDispatchToken` is the per-process token the hosted MCP transport * marks its own in-process reads with; when supplied, those rows are tagged * `mcp-http`. It is `undefined` unless `COLLECTOR_MCP_HTTP` is on. */ export declare function registerAuditHooks(app: FastifyInstance, store: CollectorStore, config: CollectorConfig, internalDispatchToken?: string): void; /** * Start the retention sweep: delete audit rows older than * `config.auditRetentionDays` now, then every {@link PRUNE_INTERVAL_MS}. The * delete is idempotent, so a restart loop or several collector instances * sharing one database cost nothing. Returns a stop function; the timer is * `unref`'d so it never keeps the process alive. * * `auditRetentionDays === 0` disables the sweep (keep rows indefinitely). */ export declare function startAuditRetention(app: FastifyInstance, store: CollectorStore, config: CollectorConfig): () => void; //# sourceMappingURL=audit.d.ts.map