pub struct RunWorkflowTool { /* private fields */ }Expand description
The run_workflow tool: the agent picks a recipe by name + args.
Implementations§
Source§impl RunWorkflowTool
impl RunWorkflowTool
Sourcepub fn new(registry: WorkflowRegistry, provider: Arc<BoxedProvider>) -> Self
pub fn new(registry: WorkflowRegistry, provider: Arc<BoxedProvider>) -> Self
Build the tool over a registry and the shared provider used to run the
recipe’s flow/ agents.
Sourcepub fn with_agent_events(self, sink: Arc<OnEvent>) -> Self
pub fn with_agent_events(self, sink: Arc<OnEvent>) -> Self
Forward every recipe-internal agent’s event stream (tool calls, LLM
responses, run lifecycle) to sink — e.g. the TUI trace. Without this,
a recipe run is a single opaque tool call to any observer.
Sourcepub fn with_provider_factory(self, factory: Arc<ProviderFactory>) -> Self
pub fn with_provider_factory(self, factory: Arc<ProviderFactory>) -> Self
Install the per-call model resolver threaded into every recipe ctx —
lets recipes run stages on role-named models (.model("fast")).
Sourcepub fn with_workspace(self, root: PathBuf) -> Self
pub fn with_workspace(self, root: PathBuf) -> Self
Workspace (git repo root) threaded into every recipe ctx — required
for recipes whose agents ask for Isolation::Worktree.
Sourcepub fn with_journal_dir(self, dir: PathBuf) -> Self
pub fn with_journal_dir(self, dir: PathBuf) -> Self
Enable resume: each run journals its agent outputs under dir, keyed
by recipe + canonicalized args. Re-invoking the SAME call replays the
completed agents at zero cost and continues the rest — an interrupted
workflow picks up where it left off (scope the dir per session to avoid
stale cross-session replays).