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

Function authLayer

packages/opencode/test/session/llm-native-recorded.test.ts:240–247  ·  view source on GitHub ↗
(scenario: RecordedScenario)

Source from the content-addressed store, hash-verified

238 .replace(/"(access|access_token|refresh|refresh_token|accountId|account_id)"\s*:\s*"[^"]+"/g, '"$1":"redacted"')
239
240function authLayer(scenario: RecordedScenario) {
241 const replayAuth = shouldRecord ? scenario.recordAuth?.() : scenario.replayAuth
242 if (!replayAuth) return undefined
243 return Layer.mock(Auth.Service)({
244 get: (providerID) => Effect.succeed(providerID === scenario.providerID ? replayAuth : undefined),
245 all: () => Effect.succeed({ [scenario.providerID]: replayAuth }),
246 })
247}
248
249async function loadFixture(providerID: string, modelID: string) {
250 const data = await modelsFixture

Callers 1

recordedNativeLLMLayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected