/** * Jev — the single redaction choke point. * * Every byte that leaves this machine for the System One endpoint goes through * {@link redactSecrets} first: the client scrubs the serialized state before any * request, and the PreToolUse Bash guard scrubs the command text it scores. * One function, one set of patterns, one set of markers — a second copy is how a * key eventually ships. * * Layers, in order: * 1. the shared handoff scrubber (`sk-…`, `sk-or-…`, `ghp_`/`gho_`/`ghs_`, * `vsk_`, `xox[abp]-`, `AKIA…`/`ASIA…`, `Bearer …`, PEM headers, * `password=`, `api_key=`); * 2. key shapes it does not carry (`github_pat_…`, JWT-looking `eyJ….….…`); * 3. command-shaped secrets (`scheme:// USER : PASS @host`, `--otp=`/`--token …`, * `SOMETHING_TOKEN=value`). * * Later layers carry a `(?!\[REDACTED)` guard so an already-masked span is never * masked twice. Markers are normalised to `` at the end: masking * removes text, and removed text could otherwise turn a command the guard's * prefilter calls 'check' into one it calls 'skip' (`echo PASSWORD="x; rm -rf ~"` * → `echo PASSWORD=<…>`). `<` is in the prefilter's shell-power set, so a * redacted command always still reaches Jev. * * HEURISTIC, never a guarantee: zero redactions does not mean the text is clean. * That is why every Jev integration is opt-in and the docs state the export. * * @module core/jev/redact */ /** * Mask secret-shaped values before text leaves this machine. * * The markers keep the text's shape, so a command still scores the same way for * scope and destructiveness and a state object still reads the same way. * * @param text - anything about to be sent to the System One endpoint * @returns the redacted text and how many spans were masked (0 = nothing matched, * which is not the same as "clean") */ export declare function redactSecrets(text: string): { text: string; redactions: number; }; //# sourceMappingURL=redact.d.ts.map