/** * Output redactor — the second line of defence behind the path blocker. * If a key somehow ends up in tool output (because the agent read a file * the blocker missed, or coaxed a key out of an API), redact it before it * reaches the model's context. * * This layer, not the path blocker, is what protects mixed-content files * like `.env`: we deliberately let the agent READ them (blocking every * `.env` would break ordinary work and give false assurance — secrets live * in many places), and instead strip the dangerous *values* out of the * output. So `cat .env` returns with PORT / DATABASE_URL intact and * PRIVATE_KEY / MNEMONIC redacted. * * The rules are deliberately strict — false positives are tolerable * (redacted noise in tool output is annoying; an exfiltrated key is fatal) — * except the mnemonic pass, which is checksum-validated precisely because a * loose "N words" rule would shred normal prose. */ export interface RedactionStat { reason: string; count: number; } export interface RedactionResult { text: string; redactions: RedactionStat[]; } export declare function redact(text: string): RedactionResult; //# sourceMappingURL=redactor.d.ts.map