MCPcopy Create free account
hub / github.com/cursor/plugins / redactDeep

Function redactDeep

orchestrate/skills/orchestrate/scripts/core/agent-manager.ts:2063–2073  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

2061}
2062
2063function redactDeep(value: unknown): unknown {
2064 if (Array.isArray(value)) return value.map(redactDeep);
2065 if (typeof value !== "object" || value === null) return value;
2066 const out: Record<string, unknown> = {};
2067 for (const [key, nested] of Object.entries(value)) {
2068 out[key] = /token|secret|password|api[_-]?key|authorization/i.test(key)
2069 ? "[redacted]"
2070 : redactDeep(nested);
2071 }
2072 return out;
2073}
2074
2075function summarizePayloadValue(value: unknown): unknown {
2076 const raw = JSON.stringify(value) ?? String(value);

Callers 1

redactToolCallPayloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected