koel_test library
Test fixtures, MockAgent, and ConformanceRunner for koel adapters.
Classes
- ConformanceFailure
- One per-event-type conformance miss produced by ConformanceRunner.runAgainst: the agent failed to reproduce the canonical fixture event for a single AG-UI type.
- ConformanceReport
-
The result of driving an
AbstractAgentthrough the synthesized type-coverage corpus: which AG-UI event types it reproduced, and which it missed. - ConformanceRunner
-
Drives an
AbstractAgentthrough every AG-UI event type and reports, per type, whether the agent reproduced the canonical event — the backend-agnostic conformance check (FR-G4). - FixtureLoader
-
Reads koel's bundled JSONL fixtures and decodes each into typed
AgUiEvents — the zero-setup load half ofkoel_test(the replay half isMockAgent). - FixtureSession
-
The typed
_sessionheader that opens every fixture.jsonl— the provenance of a captured or synthesized run. - MockAgent
-
A deterministic
AbstractAgenttest double that replays a fixedAgUiEventsequence through a real Stream. - MockAgentBuilder
- A mutable, fluent builder for a MockAgent.
- ToolHandlerTestHarness
-
A fluent,
koel_test-only builder that exercises a tool handler end-to-end in ~5 lines: register a handler, invoke it, assert on the resultingToolCallResultEvent(FR-G3).
Typedefs
-
ToolHandler
= FutureOr<
Object?> Function(Map<String, dynamic> args) -
A
koel_test-local tool-handler contract: one argument map in, one JSON-encodable value out.