Expand description
Test doubles and fixtures for okbot crates and third-party adapters.
ManualClock: a clock tests move by hand.conformance: behaviour every implementation of a port must show.- Small builders for common values (
conversation,user_message).
Modules§
- conformance
- Conformance suites: call them from an implementation’s tests.
Structs§
- Collect
Sink - An
InboundSinkthat keeps every event, for adapter tests. - Fake
Agent - An
AgentBackendfor tests: echoes, replies, fails or sleeps, and records its turns. - Fake
Channel - A
Channelfor tests: events are injected by the test, sent messages are recorded. - Manual
Clock - A clock that only moves when told to. Starts at 2026-01-01T00:00:00Z.
- Memory
Store - A
ConversationStorekept in memory, for runtime tests. - Memory
Tasks - A
TaskStorekept in memory, for runtime tests: every requester sees every task, ids aretasks/test/t-<n>, and no rule is checked. - Plain
Renderer - A
Rendererthat sends the Markdown unchanged as one message.
Functions§
- bot_
message - A bot message in
key. - conversation
- A conversation key for
channel(platform:instance) androom. - fake_
cli - Writes an executable shell script
dir/namethat prints1.0.0for--versionand runsbodyotherwise (Unix only). Mirrors agent-call’s test helper. - inbound
- An inbound text event from user
userinroomofchannel, with a unique event id. - turn
- A minimal turn with
prompt, the default tool policy and a temp working directory. - user_
message - A user message in
key, written by useru1(“Ana”).