/** * Redaction and stable serialization utilities. * * Provides deterministic JSON serialization (sorted keys) and deep-clone * redaction for preventing sensitive data leaks through event pipelines, * reporters, cache keys, and JSON output. */ /** * Policy specifying which fields to redact from serialized output. * * The `patterns` array contains glob-style field paths that identify * sensitive values (e.g. `'*.password'`, `'vars.db_*'`). When secrets * management lands, the inventory loader populates this from config * and threads it through the execution context. */ export type RedactionPolicy = { /** Glob-style field paths to redact (e.g. '*.password', 'vars.db_*'). */ patterns: string[]; /** Marker to replace redacted values with. Default: '[REDACTED]'. */ marker?: string | undefined; }; /** * Deterministic JSON serialization with sorted keys. * * Replaces `JSON.stringify()` where key order matters (cache keys, event * payloads, comparison). Handles nested objects, arrays, nulls, and * undefined values. Includes a circular reference guard. */ export declare function stableStringify(value: unknown): string; /** * Deep-clone a value, replacing fields matching the redaction policy * with the configured marker string (default: `'[REDACTED]'`). * * When no policy is provided or the policy has no patterns, the value * is returned as-is (no clone, backward compatible no-op). */ export declare function redact(value: unknown, policy?: RedactionPolicy): unknown; //# sourceMappingURL=serialize.d.ts.map