//#region src/feedback-sanitize.d.ts /** * Deterministic, regex-based redaction for agent-authored feedback text. * * Both agent surfaces (`@stll/anonymize-cli`, `@stll/anonymize-mcp`) can file a * bug or gap via feedback. The free-text title/body can accidentally carry a * client email, an id, an auth token, or an internal URL. This module strips the * obvious shapes before the text is ever shown to a human or placed into a * prefilled GitHub issue URL. It is a coarse safety net, not a guarantee: the * real control is human approval (nothing is published until the human opens and * submits the prefilled issue) and the fact that this surface never sends over * the network. The heavy WASM anonymization pipeline is deliberately not run * here: feedback is short free text, and regex plus human approval is the * accepted baseline (it also keeps this module runtime-free). * * Pass order is load-bearing: JWT/secret shapes run before URL so a secret in a * query string of a preserved public URL is still redacted while the URL is kept. */ export type SanitizeFeedbackResult = { text: string; redactions: number; }; /** * Redact the well-known sensitive shapes from one feedback field. Returns the * cleaned text and the number of substitutions made (surfaced to the human so * they can judge how much was stripped). Each pass replaces with a bracketed * placeholder, so a downstream pass never re-matches an earlier placeholder. */ export declare const sanitizeFeedbackText: (input: string) => SanitizeFeedbackResult; //#endregion //# sourceMappingURL=feedback-sanitize.d.mts.map