Skip to main content

Module request

Module request 

Source
Expand description

Request-scoped tool construction.

The dev server (and any host that serves many agent runs) must build some tools per request because they carry per-run state — most notably the built-in task tool (crate::subagent::TaskTool), which owns the run’s cancellation token, event sink, and delegation budget. Reusing one across requests would cross-wire cancellation and events between concurrent runs.

ToolRequestContext bundles exactly the per-run inputs a tool factory needs, and ToolFactory is the type-erased closure a host stores to turn that context into a concrete tool list. See docs/DEV_CONFIG_UX_DESIGN.md.

Structs§

ToolRequestContext
Inputs needed to build a single request’s tool list. Passed by value into a ToolFactory so the factory can construct request-local tools (e.g. a fresh top-level TaskTool bound to this run’s cancel token + sink).

Type Aliases§

ToolFactory
Builds the full tool list for a single request.