/** * SMI-883 / SMI-5615: Sensitive-data redaction, ported VERBATIM from the dead * `packages/mcp-server/src/logger.ts` (lines 11-107) into the shared * `@skillsmith/core` logging module. Same regex patterns, same behavior, * same test coverage (see `redact.test.ts`) — this is tested, working code * relocated, not rewritten. */ export declare function stripAnsi(text: string): string; /** * SMI-883: Redact sensitive data from text before logging * Exported for testing purposes */ export declare function redactSensitiveData(text: string): string; /** * SMI-883: Recursively redact sensitive data from objects * Exported for testing purposes * * SMI-5615 Mode-B diff-audit NEW-2: `seen` guards against circular * references. The original (dead) `mcp-server/src/logger.ts` version this was * ported from had no cycle guard — harmless there since it was never called * in production, but this module IS the production write path now, so a * circular `details`/`err` object (e.g. a thrown object with a `cause` cycle) * must degrade to `'[Circular]'` rather than stack-overflowing, which would * otherwise abort the whole record (including the redacted `msg` and * `correlationId`) and fall through to the raw-message console fallback. * * `seen` tracks only the CURRENT recursion path (ancestors), not every object * visited overall — each object is removed again once its own subtree * finishes (the `finally` below). This is deliberate: the same object * appearing twice at sibling positions (a shared, non-cyclic reference — a * DAG, not a cycle) must redact normally both times, not get falsely flagged * `'[Circular]'` just because it was visited once already elsewhere. */ export declare function redactSensitiveObject(obj: unknown, seen?: WeakSet): unknown; //# sourceMappingURL=redact.d.ts.map