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 AbstractAgent through the synthesized type-coverage corpus: which AG-UI event types it reproduced, and which it missed.
ConformanceRunner
Drives an AbstractAgent through 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 of koel_test (the replay half is MockAgent).
FixtureSession
The typed _session header that opens every fixture .jsonl — the provenance of a captured or synthesized run.
MockAgent
A deterministic AbstractAgent test double that replays a fixed AgUiEvent sequence 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 resulting ToolCallResultEvent (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.