/** * Shape-based secret redaction, applied at the logger compose point * (src/utils/logger.ts) so every sink — file, stderr, and the append- * failure fallback — emits redacted entries, plus (for ordering * semantics only) at the parse-miss preview call site in * task-session-manager/tool-execute-hooks.ts. * * A second, stricter mode — maskTaskOutputStructure, below — provides * structure-only disclosure for untrusted-format previews (the * parse-miss site): field/tag names survive, values are NEVER disclosed * there, not even partially. * * Threat model — honest limits: this is a best-effort barrier against * ACCIDENTAL leaks in short log previews (a credential that rides along * in a tool-output preview, error message, or data blob). It is NOT an * adversarial guarantee. Residual gaps, documented: unprefixed secrets * shorter than the generic 32-char run rule; secrets containing * run-breaking characters (spaces, colons, quotes); and chunked or * obfuscated content that never forms one contiguous matchable token. * * Masking keeps 4 leading + 2 trailing characters (enough to identify * the credential KIND and correlate occurrences) and replaces the * middle with an ellipsis. Rules are deliberately cheap and shape-based * (no heuristics about "suspicious" context): known vendor prefixes * first, then authorization schemes and URL credentials, then a generic * long opaque-run rule that catches high-entropy tokens of unknown * scheme. Benign short identifiers — session ids, short URLs, XML-ish * task output structure — pass through unchanged; long opaque * non-secrets (UUIDs, hashes, long paths) are masked as an accepted * false positive. */ export declare function redactSecretsForLog(input: string): string; /** * Structure-preserving value masking for untrusted-format task output * previews: XML-ish tags keep tag + attribute names with every attribute * value replaced by `[masked]`; prose `key:`/`key=` tokens keep the key * and mask the value run; everything else passes through * redactSecretsForLog (vendor/generic/URL-credential rules still apply * to free text). Deterministic — no wall-clock or randomness. */ export declare function maskTaskOutputStructure(input: string): string;