feat: implement abort mechanism for workflows and subagents
This commit is contained in:
@@ -106,11 +106,13 @@ impl Tool for SpawnAgents {
|
||||
// by this tool call are isolated from any other concurrent
|
||||
// spawn_agents or workflow_run invocations.
|
||||
let findings: Arc<Mutex<Vec<String>>> = Arc::new(Mutex::new(Vec::new()));
|
||||
let no_abort: Option<std::sync::Arc<std::sync::atomic::AtomicBool>> = None;
|
||||
let results = crate::app::workflow::engine::execute_primitive(
|
||||
&wf.script,
|
||||
&HashMap::new(),
|
||||
max_concurrency,
|
||||
true,
|
||||
&no_abort,
|
||||
live.as_ref(),
|
||||
&ctx.session_dir,
|
||||
&ctx.workspaces,
|
||||
@@ -195,11 +197,13 @@ impl Tool for SpawnPipeline {
|
||||
// Per-invocation findings scope isolates this pipeline from any
|
||||
// other concurrent spawn_agents / spawn_pipeline / workflow_run.
|
||||
let findings: Arc<Mutex<Vec<String>>> = Arc::new(Mutex::new(Vec::new()));
|
||||
let no_abort: Option<std::sync::Arc<std::sync::atomic::AtomicBool>> = None;
|
||||
let results = crate::app::workflow::engine::execute_primitive(
|
||||
&wf.script,
|
||||
&HashMap::new(),
|
||||
1,
|
||||
false,
|
||||
&no_abort,
|
||||
live.as_ref(),
|
||||
&ctx.session_dir,
|
||||
&ctx.workspaces,
|
||||
|
||||
Reference in New Issue
Block a user