/** Rotated files kept by the audit writer. */ export declare const REPORT_ROTATIONS = 5; /** Default window when no `--since` value is given. */ export declare const DEFAULT_REPORT_SINCE = "7d"; /** Upper bound on bytes read across the active log and its rotations. */ export declare const MAX_REPORT_BYTES: number; export interface EgressReportEntry { host: string; port: number; connects: number; allowed: number; denied: number; lastTs: number; } export interface EgressReport { /** Inclusive lower bound the records were filtered by. */ sinceTs: number; /** Timestamp used as "now" when the window was computed. */ untilTs: number; /** Number of log files that contributed. */ files: number; connects: number; denied: number; /** True when the byte budget stopped the oldest rotations from being read. */ truncated: boolean; /** Sorted by connect count, then host and port. */ entries: EgressReportEntry[]; } export interface CollectEgressReportOptions { since?: string | undefined; now?: number; maxBytes?: number; } /** * Parse a report window: `30s`, `15m`, `24h`, `7d`, or an ISO date. Returns * `undefined` for anything else so the caller can reject it instead of guessing. */ export declare function parseReportSince(value: string | undefined, now?: number): number | undefined; /** * Aggregate parsed audit lines. Malformed JSON and records from other phases or * events are skipped rather than counted, and `connect` is the only counted * event (a `close` record repeats the same tunnel). */ export declare function summarizeEgressLines(lines: Iterable, sinceTs: number): Pick; /** Rotation order oldest to newest, so a byte-budget cut drops the oldest. */ export declare function rotationCandidates(file: string): string[]; /** * Read the active audit log plus its rotations and aggregate egress connects * inside the requested window. Unreadable files are skipped: a missing log is * an empty report, not an error. */ export declare function collectEgressReport(auditPath: string, options?: CollectEgressReportOptions): Promise; /** * Suggested `egress` block for pasting into the profile patch. It is a * suggestion only: nothing is written to disk, and no destination is invented. */ export declare function egressReportYaml(report: EgressReport, limit?: number): string; //# sourceMappingURL=report.d.ts.map