import type { GlobalStore } from "./state/globalStore.js"; export declare const REDACTED = "[REDACTED]"; /** * Build a `JSON.stringify` replacer bound to `globals` that swaps any value * marked `redact: true` for "[REDACTED]" and returns everything else * unchanged. * * Implemented as a replacer rather than a pre-copy deep-walk so it (a) runs * inside the single JSON.stringify statelog already performs — no second * traversal or deep copy — and (b) inherits JSON.stringify's native handling * of Date/URL/toJSON-bearing values. A value with a toJSON reaches the * replacer already converted to a primitive; `this[key]` still holds the * original object, which is what the value/reference tag lookup needs. This * mirrors `nativeTypeReplacer` (lib/runtime/revivers/index.ts). * * Cycles are left to JSON.stringify, which throws on them exactly as the * statelog stringify does today — the replacer adds no cycle handling because * a cyclic body could never have been serialized in the first place. */ export declare function makeRedactReplacer(globals: GlobalStore): (this: unknown, key: string, value: unknown) => unknown;