Expand description
The Harness, which runs one prompt for a Host and records the run.
A Host makes a pack::PackRegistry, calls each Plugin it links,
which inserts its Packs into the registry, and builds one
pack::HostContext over it, which builds every Pack the registry
holds. It builds them once and builds one Harness for each run.
Harness::new takes the Host’s recorder, inference broker, timer,
built Packs, and the run’s own services. Harness::run
runs the prompt to its end and returns its RunReport. While the run
goes on, the Host steers it through the RunControl it took from
Harness::control before the run started.
The crate’s run-prompt example runs one prompt from start to end.
Modules§
- pack
- The registry a Host’s Plugins insert Packs into, the context that builds every Pack the registry holds, the services maps a Host fills, and the Pack ids. The Plugin crates themselves are the Host’s own dependencies.
- plugin
- Inserting Plugins into the Pack registry: from the dynamic libraries in a Plugin directory, or linked into the Host, and what each insert loaded.
- record
- The recorder that receives every effect, answer, and event of a run, an in-memory recorder, and the seed each run’s meta records.
- vfs
- The handle to the virtual filesystem a Host gives each run, the access each tool call receives through its context, and the origin each file operation carries to say who asked for it.
Structs§
- Harness
- Drives one run of a prompt for a Host.
- Host
Snapshot - The Host state a run reads when it launches.
- RunControl
- A handle that drops a run’s in-flight round or cancels the run, from outside the future that drives it.
- RunReport
- How one run ended, and what it left at its declared output file.
- RunRequest
- The inputs to one run: the prompt’s source and arguments, its declared input text, the filesystem it works in, and the Host state it reads.
Enums§
- Current
Model Error - The reason a run failed to resolve its model at launch.
- Harness
Error - An error that stopped a run before
Harness::runcould report an outcome. - Output
Error - Why a run’s report omits its output text.
Traits§
- Inference
Broker - The model inference the Host supplies to the Harness.
- Timer
- The Host’s clock, which performs each
Timereffect as one sleep.
Functions§
- display_
chain - Renders an error’s text followed by the text of each cause in its
source()chain, separated by:.
Type Aliases§
- BoxFuture
- The boxed future a performer returns for the Harness to poll.