opencode/packages/llm/test
Kit Langton e101318f92 refactor(http-recorder): hide cassette format behind Cassette seam
The Cassette interface used to expose its JSON wrapper type (Cassette =
{ version, metadata, interactions }) through read/write/scan, plus a
path() method. Consumers had to know the file format to use the service.

New surface — domain types only:

  interface Interface {
    read:   (name) => Effect<readonly Interaction[], CassetteNotFoundError>
    append: (name, interaction, metadata?) => Effect<{ findings }>
    exists: (name) => Effect<boolean>
    list:   () => Effect<readonly string[]>
  }

What's gone from the public surface: path(), write(), scan(), the
Cassette wrapper type, Entry.path, the format helpers (cassetteFor,
formatCassette, parseCassette, cassettePath). All file-private to the
new fileSystem adapter.

Two adapters:
- Cassette.fileSystem({ directory? }) — file-backed (today's behavior,
  was Cassette.layer)
- Cassette.memory(initial?) — in-memory, used by the package's own
  tests to exercise replay without disk IO. Proves the seam works;
  not user-facing.

Drive-bys from the simplify pass:
- Errors converted to Data.TaggedError (CassetteNotFoundError,
  UnsafeCassetteError) for Effect-native equality + integration.
- storage.ts (5 LOC stub) merged into cassette.ts. hasCassetteSync
  is now exported from cassette.ts directly.
- Entry { name } collapsed to plain string.
- recorder.ts re-export indirection cleaned up; index.ts pulls
  CassetteNotFoundError from cassette.ts directly.
- httpInteractions / webSocketInteractions now take ReadonlyArray<Interaction>
  rather than Cassette (matches the new read shape).

External consumer in packages/llm/test/recorded-test.ts updated
(Cassette.layer → Cassette.fileSystem).
2026-05-10 12:21:48 -04:00
..
fixtures/recordings chore: generate 2026-05-08 20:57:36 +00:00
lib Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
provider refactor(http-recorder): Redactor + Recorder seams, README (#26636) 2026-05-10 10:49:22 -04:00
adapter.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
auth-options.types.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
auth.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
endpoint.test.ts chore: generate 2026-05-08 20:57:36 +00:00
executor.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
exports.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
generate-object.test.ts chore: generate 2026-05-08 20:57:36 +00:00
llm.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
provider.types.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-golden.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-runner.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-scenarios.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-test.ts refactor(http-recorder): hide cassette format behind Cassette seam 2026-05-10 12:21:48 -04:00
recorded-utils.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
recorded-websocket.ts feat(http-recorder): default mode to "auto" (#26719) 2026-05-10 16:05:11 +00:00
schema.test.ts chore: generate 2026-05-08 20:57:36 +00:00
tool-runtime.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
tool-stream.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
tool.types.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00