/** * Server-side redaction of personal/project identifiers from feedback bodies * before they hit the elicitation prompt or the GitHub POST. Applied * unconditionally; the agent has no surface to bypass it and the user never * sees the pre-scrubbed bytes outside the in-process call stack. * * Threat model: feedback issues post to a public tracker. The body the agent * assembled may contain absolute paths, the OS username, the project name, * etc. None of those carry signal a reader needs to understand the issue, * and all of them carry privacy/confidentiality risk (NDA projects, machine * fingerprinting, doxxing). * * What gets redacted: * * - The absolute project root path → REDACTED_PROJECT_ROOT * - The OS home directory path → REDACTED_HOME * - The project name as a whole word → REDACTED_PROJECT * - The OS username as a whole word → REDACTED_USER * * Project/username matches use `\b` word boundaries (case-insensitive) so * "david" inside paths or sentences matches but "davidson" does not. Class, * component, and actor names are NOT redacted — the user can use the * "Revise first" path on the approval prompt to request specific further * redactions. */ export interface PrivacyScrubContext { /** Absolute path to the .uproject's containing directory. */ projectRoot?: string; /** Project name without the .uproject extension. */ projectName?: string; /** OS username. Defaults to os.userInfo().username; tests pass an explicit value. */ username?: string; /** OS home directory. Defaults to os.homedir(); tests pass an explicit value. */ homeDir?: string; } export interface PrivacyScrubResult { text: string; hits: Array<{ rule: string; count: number; }>; } export declare function privacyScrub(input: string, ctx?: PrivacyScrubContext): PrivacyScrubResult;