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

Function resolveAutoMode

packages/http-recorder/src/recorder.ts:11–18  ·  view source on GitHub ↗
(
  cassette: CassetteService.Interface,
  name: string,
)

Source from the content-addressed store, hash-verified

9}
10
11export const resolveAutoMode = (
12 cassette: CassetteService.Interface,
13 name: string,
14): Effect.Effect<"record" | "replay" | "passthrough"> =>
15 Effect.gen(function* () {
16 if (isCI()) return "replay"
17 return (yield* cassette.exists(name)) ? "replay" : "record"
18 })
19
20export interface ReplayState<T> {
21 readonly claim: <E>(

Callers 3

recordingLayerFunction · 0.85
makeWebSocketExecutorFunction · 0.85
recordingLayerFunction · 0.85

Calls 2

isCIFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected