Skip to main content

Module response_loop

Module response_loop 

Source
Expand description

Multi-step Open Responses orchestration loop.

run_response_loop drives a multi-step response from pending to terminal state. It is a free function over the MultiStepStore and ToolExecutor traits — both already exist in onwards for other purposes, so the multi-step path adds no parallel execution abstraction.

§Wiring

  • StorageMultiStepStore handles CRUD + transition + chain walk + assembly.
  • Tool dispatchToolExecutor::tools declares the tools and their ToolKind; ToolExecutor::execute runs Http-kind tools. Agent-kind tools cause the loop to recurse into a sub-loop instead of calling execute.
  • Model calls — fired directly by the loop using the supplied reqwest::Client against the configured UpstreamTarget. No trait abstraction.

This means dwctl’s existing HttpToolExecutor (which already implements ToolExecutor) plugs straight in — no wrapping, no adapter, no parallel multi-step trait.

Structs§

LoopConfig
Configuration for run_response_loop’s safety caps.
UpstreamTarget
Where the loop should send model_call HTTP requests.

Enums§

LoopError
Errors returned by run_response_loop.

Functions§

run_response_loop
Drive a multi-step Open Responses request to a terminal state.