MCPcopy
hub / github.com/BuilderIO/agent-native / collectSecretValues

Function collectSecretValues

packages/core/src/tools/proxy-security.ts:59–69  ·  view source on GitHub ↗
(
  ...groups: Array<Array<string> | undefined>
)

Source from the content-addressed store, hash-verified

57}
58
59export function collectSecretValues(
60 ...groups: Array<Array<string> | undefined>
61): string[] {
62 const values = new Set<string>();
63 for (const group of groups) {
64 for (const value of group ?? []) {
65 if (value) values.add(value);
66 }
67 }
68 return [...values].sort((a, b) => b.length - a.length);
69}
70
71export function redactSecrets<T>(value: T, secretValues: string[]): T {
72 if (secretValues.length === 0) return value;

Callers 3

createFetchToolEntryFunction · 0.85
handleProxyFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected