Skip to main content

Crate locode_engine

Crate locode_engine 

Source
Expand description

locode-engine — the sample→dispatch→append loop and the Session driving API (ADR-0005, ADR-0004, ADR-0014).

A Session drives one run to a terminal locode_protocol::Status against any locode_provider::Provider, dispatching tool calls through a locode_tools::Registry, emitting stream-json events to an EventSink, and returning one locode_protocol::Report. Proven end-to-end against MockProvider with zero network.

Structs§

EngineConfig
Everything the loop needs that isn’t the provider, registry, preamble, or sink.
FnSink
Forwards each event to a closure — e.g. a JSONL stdout writer for stream-json, or a Vec-pushing closure in tests.
NullSink
Drops every event — for the json/text output modes that only want the report.
Session
One driven agent session. Owns the conversation history for the run (ephemeral).

Traits§

EventSink
A sink for the loop’s Events. &mut self so a writer sink can buffer/flush; object-safe so locode-exec can pick one at runtime by --output-format.