MCPcopy Create free account
hub / github.com/TanStack/ai / isSecretRef

Function isSecretRef

packages/ai-sandbox/src/secrets.ts:53–59  ·  view source on GitHub ↗
(x: unknown)

Source from the content-addressed store, hash-verified

51
52/** Return true when `x` is a SecretRef. */
53export function isSecretRef(x: unknown): x is SecretRef {
54 return (
55 typeof x === 'object' &&
56 x !== null &&
57 typeof (x as Record<string, unknown>)['__secretName'] === 'string'
58 )
59}
60
61/** Resolve a SecretRef to its plaintext value using the secrets object. */
62export function resolveSecret(secrets: Secrets, ref: SecretRef): string {

Callers 11

isBearerMarkerFunction · 0.90
resolveHeaderValueFunction · 0.90
isBearerMarkerFunction · 0.90
resolveHeaderValueFunction · 0.90
secrets.test.tsFile · 0.90
isBearerMarkerFunction · 0.90
resolveHeaderValueFunction · 0.90
isBearerMarkerFunction · 0.90
resolveHeaderValueFunction · 0.90
isBearerMarkerFunction · 0.90
resolveHeaderValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected