MCPcopy Create free account
hub / github.com/anomalyco/opencode / credentialFromSecret

Function credentialFromSecret

packages/llm/src/route/auth.ts:76–83  ·  view source on GitHub ↗
(secret: Secret, source: string)

Source from the content-addressed store, hash-verified

74}
75
76const credentialFromSecret = (secret: Secret, source: string) => {
77 if (typeof secret === "string" || Redacted.isRedacted(secret)) return credential(secretEffect(secret, source))
78 return credential(
79 Effect.gen(function* () {
80 return yield* secretEffect(yield* secret, source)
81 }),
82 )
83}
84
85export const value = (secret: string, source = "value") => credentialFromSecret(secret, source)
86

Callers 4

valueFunction · 0.85
optionalFunction · 0.85
configFunction · 0.85
credentialInputFunction · 0.85

Calls 2

secretEffectFunction · 0.85
credentialFunction · 0.70

Tested by

no test coverage detected