Expand description
The Harness, which runs one prompt for a Host and records the run.
A Host adds its Plugin packages to a plugin::PackageRegistry,
builds one plugin::HostContext over it, and installs Plugins by
package name. It installs them once and builds one Harness for each
run. Harness::new takes the Host’s recorder, inference broker,
timer, installed Plugins, 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§
- plugin
- The registry a Host lists and installs packages from, the context a Host installs its Plugins in, the services maps a Host fills, and the names Plugins are installed under. The Plugin crates themselves are the Host’s own dependencies.
- 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.