Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(orchestration): import generic workflow definitions

Steven Enamakelcdc61a564621
diff --git a/.sdd-progress.md b/.sdd-progress.md
index 9cd84c3a7b..abed657593 100644
--- a/.sdd-progress.md
+++ b/.sdd-progress.md
@@ -12,7 +12,7 @@ in progress. They require direct imports with no compatibility shims and preserv
OpenHuman policy/security, persistence-root wiring, BUS/progress/RPC projection,
and concrete execution adapters.
-Orchestration O1-O2: complete locally; independent-review remediation and
+Orchestration O1-O4: complete locally; independent-review remediation and
verification are complete, pending paired commits. `tinyagents-orchestration`
is now a correctly spelled default workspace member with a tested one-way
dependency gate and no OpenHuman dependency. It
@@ -24,9 +24,16 @@ runtime injects its established `team:<team>:<member>` tracing sink. The prior
local `types`, `ops`, and `graph` modules and their
facades are deleted. OpenHuman retains its root-parent context, subagent
execution, message delivery/reconciliation, persistence-root selection and RPC
-schemas. `cargo test -p tinyagents-orchestration` (8 tests), metadata, and
-`cargo check -p openhuman` pass. O3-O6 remain: workflow types/scheduler,
-workflow execution/resume, host workflow adapters, and parallel/worktree cleanup.
+schemas. O3-O4 add direct `tinyagents_orchestration::workflow` definitions and
+validation, opaque host catalog metadata, phase state, a session-ledger
+`WorkflowStore`, injected async `WorkflowExecutor`, bounded `map_reduce`
+fan-out, cancellation, terminal persistence, resume skipping, upstream prompt
+context, synthesis fallback and scheduler topology. Its 19 focused tests cover
+the O3/O4 behavior matrix; fresh `cargo test -p tinyagents-orchestration` and
+root `cargo check -p openhuman` pass. Focused OpenHuman lib tests are currently
+blocked by unrelated fixture migration diagnostics outside workflow runs. O5-O6
+remain: switch the host child-spawn lifecycle fully onto the executor seam,
+then parallel/worktree cleanup.
Session extraction S1-S4: in progress. `tinyagents-session::transcript` owns
the neutral append-only JSONL codec, paths, display/model readers, metadata,
diff --git a/Cargo.lock b/Cargo.lock
index a66f407c71..1af499530a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6516,6 +6516,7 @@ name = "tinyagents-orchestration"
version = "2.1.2"
dependencies = [
"anyhow",
+ "async-trait",
"chrono",
"serde",
"serde_json",
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
index b394aaa7ba..1767db35a2 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs
@@ -11,10 +11,10 @@ use tinyagents_session::run_ledger::{
};
use super::super::ops::definition_by_id;
-use super::super::types::WorkflowDefinition;
use super::cancel::{clear_cancel_flag, lookup_cancel_flag, register_cancel_flag};
use super::state::{init_phase_states, persist};
use super::LOG_TARGET;
+use tinyagents_orchestration::workflow::WorkflowDefinition;
/// Start a new workflow run and return immediately.
///
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/phase_exec.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/phase_exec.rs
index b713993f3e..ec7e95dd1a 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/phase_exec.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/phase_exec.rs
@@ -11,12 +11,12 @@ use tinyagents_harness::TinyAgentsError;
use tinyagents_session::run_ledger::{get_workflow_run, WorkflowRunStatus};
-use super::super::types::{WorkflowDefinition, WorkflowPhase};
use super::cancel::lookup_cancel_token;
use super::state::{persist, phase_prompt, set_phase_reason, set_phase_status, upstream_outputs};
use super::state::{PHASE_COMPLETED, PHASE_FAILED, PHASE_RUNNING};
use super::LOG_TARGET;
use crate::config::Config;
+use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowPhase};
/// One worker's outcome from the intra-phase graph fan-out (see
/// [`execute_phase`]). Rides in the fan-out graph's typed state, so it is `Clone`.
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/scheduler.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/scheduler.rs
index 520d78003f..a798c331f3 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/scheduler.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/scheduler.rs
@@ -8,10 +8,10 @@ use anyhow::{anyhow, Result};
use tinyagents_session::run_ledger::{get_workflow_run, WorkflowRunStatus};
-use super::super::types::{WorkflowDefinition, WorkflowPhase};
use super::state::{all_phases_completed, next_runnable_phase, persist, synthesize_summary};
use super::LOG_TARGET;
use crate::config::Config;
+use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowPhase};
/// What the scheduler's `dispatch` step decided.
pub(crate) enum PhaseSelection {
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/state.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/state.rs
index f8a79d247e..032d12e987 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/state.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/state.rs
@@ -9,8 +9,8 @@ use tinyagents_session::run_ledger::{
upsert_workflow_run, WorkflowRun, WorkflowRunStatus, WorkflowRunUpsert,
};
-use super::super::types::{WorkflowDefinition, WorkflowPhase};
use crate::config::Config;
+use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowPhase};
/// Per-phase status stored inside the run's `phase_states` JSON column.
pub(super) const PHASE_PENDING: &str = "pending";
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs
index 84564aceb1..79797e7afd 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine_tests.rs
@@ -34,7 +34,8 @@ use tinyagents_session::run_ledger::{get_workflow_run, upsert_workflow_run, Work
use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use tinytools::Tool;
-use super::super::types::{WorkflowDefinition, WorkflowPhase, WorkflowSafetyTier};
+use std::collections::BTreeMap;
+use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowPhase};
// ── Mocks (mirrors agent_orchestration::ops_tests) ──────────────────────────
@@ -258,7 +259,7 @@ fn linear_def(concurrency: u32, max_children: u32, parallel_in_b: usize) -> Work
],
default_concurrency: concurrency,
max_children,
- safety_tier: WorkflowSafetyTier::ReadOnly,
+ extensions: BTreeMap::new(),
}
}
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/graph.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/graph.rs
index 100db5e906..17ed7db0af 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/graph.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/graph.rs
@@ -29,7 +29,7 @@ use crate::config::Config;
use tinyagents_session::run_ledger::get_workflow_run;
use super::engine::{execute_phase, select_next_phase, PhaseExecOutcome, PhaseSelection};
-use super::types::{WorkflowDefinition, WorkflowPhase};
+use tinyagents_orchestration::workflow::{WorkflowDefinition, WorkflowPhase};
/// Lift an engine-internal `anyhow` error into the scheduler graph's error type
/// so a ledger-write/spawn failure fails the run (and propagates back out via
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/mod.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/mod.rs
index 3de9d6eadf..2b2f0ccfe6 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/mod.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/mod.rs
@@ -24,20 +24,15 @@ mod engine;
mod graph;
mod ops;
mod schemas;
-pub mod types;
pub(crate) use graph::scheduler_graph_topology;
pub use engine::{resume_workflow_run, start_workflow_run, stop_workflow_run};
pub use ops::{
builtin_definitions, definition_by_id, get_run, list_definitions, list_runs,
- validate_definition, validate_structure, PARALLEL_RESEARCH_ID,
+ validate_definition, PARALLEL_RESEARCH_ID,
};
pub use schemas::{
all_controller_schemas as all_workflow_run_controller_schemas,
all_registered_controllers as all_workflow_run_registered_controllers,
};
-pub use types::{
- DefinitionError, WorkflowDefinition, WorkflowDefinitionListResponse, WorkflowPhase,
- WorkflowSafetyTier,
-};
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
index 32cfbebc16..627db19cd8 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
@@ -1,78 +1,52 @@
-//! Workflow-definition catalog + read surface over durable workflow runs.
+//! OpenHuman's workflow catalog and ledger read adapters.
//!
-//! PR1 scope: expose the builtin [`WorkflowDefinition`]s, validate them
-//! (structure + agent existence), and read durable [`WorkflowRun`]s from
-//! `tinyagents_session::run_ledger`. No execution engine yet — starting / stopping /
-//! resuming runs lands in a follow-up PR.
+//! Definitions, validation, scheduling and fan-out live in
+//! `tinyagents-orchestration`. This module retains only product catalog
+//! selection, live agent lookup and the configured persistence root.
-use anyhow::Result;
+use std::collections::BTreeMap;
-use crate::agent::harness::definition::AgentDefinitionRegistry;
-use crate::config::Config;
-use tinyagents_graph::dag::{validate_dag, DagIssue, DagNode};
+use anyhow::Result;
+use serde_json::json;
+use tinyagents_orchestration::workflow::{
+ validate_agents, validate_structure, DefinitionError, WorkflowDefinition,
+ WorkflowDefinitionListResponse, WorkflowPhase,
+};
use tinyagents_session::run_ledger::{
get_workflow_run, list_workflow_runs, WorkflowRun, WorkflowRunListRequest,
WorkflowRunListResponse,
};
-use super::types::{
- DefinitionError, WorkflowDefinition, WorkflowDefinitionListResponse, WorkflowPhase,
- WorkflowSafetyTier,
-};
+use crate::agent::harness::definition::AgentDefinitionRegistry;
+use crate::config::Config;
-/// Id of the first shipped (read-only) workflow.
pub const PARALLEL_RESEARCH_ID: &str = "parallel_research_cross_check";
-/// All builtin workflow definitions.
-///
-/// First (and only) shipped workflow is a read-only "parallel research with
-/// cross-checking" pipeline: decompose the question, fan out researchers,
-/// have a critic cross-check the claims, then synthesize a cited report.
+/// Product-selected workflow catalog. `safetyTier` remains opaque data here;
+/// the host's admission adapter remains responsible for policy enforcement.
pub fn builtin_definitions() -> Vec<WorkflowDefinition> {
vec![WorkflowDefinition {
- id: PARALLEL_RESEARCH_ID.to_string(),
- name: "Parallel research with cross-checking".to_string(),
- description: "Decompose a question into angles, research them in parallel, cross-check \
- the claims with a critic, then synthesize a cited report. Read-only."
- .to_string(),
+ id: PARALLEL_RESEARCH_ID.to_owned(),
+ name: "Parallel research with cross-checking".to_owned(),
+ description: "Decompose a question into angles, research them in parallel, cross-check the claims with a critic, then synthesize a cited report. Read-only.".to_owned(),
phases: vec![
- WorkflowPhase {
- name: "decompose".to_string(),
- description: "Break the question into independent research angles.".to_string(),
- agent_ids: vec!["planner".to_string()],
- depends_on: vec![],
- },
- WorkflowPhase {
- name: "research".to_string(),
- description: "Research each angle in parallel.".to_string(),
- agent_ids: vec!["researcher".to_string(), "researcher".to_string()],
- depends_on: vec!["decompose".to_string()],
- },
- WorkflowPhase {
- name: "cross_check".to_string(),
- description: "Adversarially cross-check the gathered claims.".to_string(),
- agent_ids: vec!["critic".to_string()],
- depends_on: vec!["research".to_string()],
- },
- WorkflowPhase {
- name: "synthesize".to_string(),
- description: "Synthesize a single cited report.".to_string(),
- agent_ids: vec!["summarizer".to_string()],
- depends_on: vec!["cross_check".to_string()],
- },
+ WorkflowPhase { name: "decompose".into(), description: "Break the question into independent research angles.".into(), agent_ids: vec!["planner".into()], depends_on: vec![] },
+ WorkflowPhase { name: "research".into(), description: "Research each angle in parallel.".into(), agent_ids: vec!["researcher".into(), "researcher".into()], depends_on: vec!["decompose".into()] },
+ WorkflowPhase { name: "cross_check".into(), description: "Adversarially cross-check the gathered claims.".into(), agent_ids: vec!["critic".into()], depends_on: vec!["research".into()] },
+ WorkflowPhase { name: "synthesize".into(), description: "Synthesize a single cited report.".into(), agent_ids: vec!["summarizer".into()], depends_on: vec!["cross_check".into()] },
],
default_concurrency: 2,
max_children: 8,
- safety_tier: WorkflowSafetyTier::ReadOnly,
+ extensions: BTreeMap::from([("safetyTier".to_owned(), json!("read_only"))]),
}]
}
-/// Look up one builtin definition by id.
pub fn definition_by_id(id: &str) -> Option<WorkflowDefinition> {
- builtin_definitions().into_iter().find(|d| d.id == id)
+ builtin_definitions()
+ .into_iter()
+ .find(|definition| definition.id == id)
}
-/// List available workflow definitions (builtins for now).
pub fn list_definitions() -> WorkflowDefinitionListResponse {
let definitions = builtin_definitions();
WorkflowDefinitionListResponse {
@@ -81,150 +55,22 @@ pub fn list_definitions() -> WorkflowDefinitionListResponse {
}
}
-/// Validate a definition's structure (registry-independent).
-///
-/// Checks: at least one phase; unique phase names; non-empty phases;
-/// `depends_on` references existing phases; no dependency cycles.
-pub fn validate_structure(def: &WorkflowDefinition) -> Vec<DefinitionError> {
- log::debug!(
- target: "workflow_run",
- "[workflow_run] validate_structure.entry id={} phases={}",
- def.id,
- def.phases.len()
- );
- let mut errors = Vec::new();
- if def.phases.is_empty() {
- errors.push(DefinitionError::NoPhases);
- log::debug!(target: "workflow_run", "[workflow_run] validate_structure.exit id={} errors=1 reason=no_phases", def.id);
- return errors;
- }
-
- for phase in &def.phases {
- if phase.agent_ids.is_empty() {
- errors.push(DefinitionError::EmptyPhase {
- phase: phase.name.clone(),
- });
- }
- }
-
- // Unique names, landed `depends_on` edges and acyclicity are the shared
- // dependency-DAG question; `tinyagents_graph::dag` owns the algorithm and
- // this maps its structural issues back onto the host's error vocabulary.
- // A self-dependency arrives as `DagIssue::Cycle`, which is what the
- // hand-rolled Kahn pass here reported too.
- let nodes: Vec<DagNode<'_>> = def
- .phases
- .iter()
- .map(|p| DagNode::new(p.name.as_str(), p.depends_on.iter().map(String::as_str)))
- .collect();
- for issue in validate_dag(&nodes) {
- errors.push(match issue {
- DagIssue::DuplicateNode { id } => DefinitionError::DuplicatePhase { name: id },
- DagIssue::UnknownDependency { node, depends_on } => {
- DefinitionError::UnknownDependency {
- phase: node,
- depends_on,
- }
- }
- DagIssue::Cycle => DefinitionError::CyclicDependency,
- });
- }
-
- if def.default_concurrency == 0 || def.max_children == 0 {
- errors.push(DefinitionError::InvalidConcurrency {
- default_concurrency: def.default_concurrency,
- max_children: def.max_children,
- });
- }
-
- log::debug!(
- target: "workflow_run",
- "[workflow_run] validate_structure.exit id={} errors={}",
- def.id,
- errors.len()
- );
- errors
-}
-
-/// Validate that every agent referenced by a definition is resolvable through
-/// the provided lookup. Kept generic so it is testable without the global
-/// registry.
-pub fn validate_agents<F>(def: &WorkflowDefinition, is_known: F) -> Vec<DefinitionError>
-where
- F: Fn(&str) -> bool,
-{
- log::debug!(
- target: "workflow_run",
- "[workflow_run] validate_agents.entry id={} phases={}",
- def.id,
- def.phases.len()
- );
- let mut errors = Vec::new();
- for phase in &def.phases {
- for agent_id in &phase.agent_ids {
- if !is_known(agent_id) {
- errors.push(DefinitionError::UnknownAgent {
- phase: phase.name.clone(),
- agent_id: agent_id.clone(),
- });
- }
- }
- }
- log::debug!(
- target: "workflow_run",
- "[workflow_run] validate_agents.exit id={} unknown={}",
- def.id,
- errors.len()
- );
- errors
-}
-
-/// Full validation against the live agent registry.
-///
-/// Always runs the structural checks. Agent-existence checks run only when the
-/// registry is initialized, so callers in a registry-less context (e.g. early
-/// boot, some tests) are not given false `UnknownAgent` errors.
-pub fn validate_definition(def: &WorkflowDefinition) -> Vec<DefinitionError> {
- log::debug!(target: "workflow_run", "[workflow_run] validate_definition.entry id={}", def.id);
- let mut errors = validate_structure(def);
- match AgentDefinitionRegistry::global() {
- Some(registry) => {
- errors.extend(validate_agents(def, |id| registry.get(id).is_some()));
- }
- None => {
- log::debug!(
- target: "workflow_run",
- "[workflow_run][registry] validate_definition.skip_agents id={} reason=registry_uninitialized",
- def.id
- );
- }
+pub fn validate_definition(definition: &WorkflowDefinition) -> Vec<DefinitionError> {
+ let mut errors = validate_structure(definition);
+ if let Some(registry) = AgentDefinitionRegistry::global() {
+ errors.extend(validate_agents(definition, |id| registry.get(id).is_some()));
}
- log::debug!(
- target: "workflow_run",
- "[workflow_run] validate_definition.exit id={} errors={}",
- def.id,
- errors.len()
- );
errors
}
-/// List durable workflow runs (delegates to the run ledger).
pub fn list_runs(
config: &Config,
request: &WorkflowRunListRequest,
) -> Result<WorkflowRunListResponse> {
- log::debug!(
- target: "workflow_run",
- "[workflow_run] list_runs.entry definition={:?} status={:?}",
- request.definition_id,
- request.status
- );
Ok(list_workflow_runs(&config.workspace_dir, request)?)
}
-/// Get one durable workflow run by id (delegates to the run ledger).
pub fn get_run(config: &Config, id: &str) -> Result<Option<WorkflowRun>> {
- log::debug!(target: "workflow_run", "[workflow_run] get_run.entry id={id}");
Ok(get_workflow_run(&config.workspace_dir, id)?)
}
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops_tests.rs
index d4e9ee281e..302c44e929 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops_tests.rs
@@ -1,4 +1,8 @@
use super::*;
+use std::collections::BTreeMap;
+use tinyagents_orchestration::workflow::{
+ validate_agents, validate_structure, DefinitionError, WorkflowDefinition, WorkflowPhase,
+};
fn good_def() -> WorkflowDefinition {
definition_by_id(PARALLEL_RESEARCH_ID).expect("builtin present")
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/types.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/types.rs
deleted file mode 100644
index 337503f5c4..0000000000
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/types.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-//! Declarative workflow-definition types for durable multi-agent runs (#3375).
-//!
-//! A [`WorkflowDefinition`] is a static, declarative phase graph — NOT an
-//! arbitrary script. Each phase names the agents it fans out to and the phases
-//! it depends on, so the runtime (added in a follow-up PR) can schedule phases
-//! in dependency order with bounded concurrency. Keeping definitions
-//! declarative avoids the security surface of arbitrary in-process script
-//! execution.
-//!
-//! This PR ships the definition model + the read surface (list definitions,
-//! list/get durable runs from `tinyagents_session::run_ledger`). The live execution
-//! engine is deferred to a follow-up.
-
-use serde::Serialize;
-
-/// Safety tier of a workflow — governs what its child agents may do.
-///
-/// Only [`WorkflowSafetyTier::ReadOnly`] workflows ship first; edit-capable
-/// tiers gate on explicit user approval once the engine lands.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
-#[serde(rename_all = "snake_case")]
-pub enum WorkflowSafetyTier {
- /// Child agents may only read / research — no file writes, no external
- /// side effects beyond fetching.
- ReadOnly,
- /// Child agents may take standard non-destructive actions.
- Standard,
- /// Child agents may edit files (requires worktree isolation + approval).
- EditCapable,
-}
-
-impl WorkflowSafetyTier {
- /// Stable wire string.
- pub fn as_str(self) -> &'static str {
- match self {
- WorkflowSafetyTier::ReadOnly => "read_only",
- WorkflowSafetyTier::Standard => "standard",
- WorkflowSafetyTier::EditCapable => "edit_capable",
- }
- }
-}
-
-/// One phase of a workflow: a set of agents fanned out in parallel once every
-/// phase it `depends_on` has completed.
-#[derive(Debug, Clone, PartialEq, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct WorkflowPhase {
- /// Phase name, unique within a definition; referenced by `depends_on`.
- pub name: String,
- /// Human-readable purpose of the phase.
- pub description: String,
- /// Agent definition ids spawned (in parallel) during this phase.
- pub agent_ids: Vec<String>,
- /// Names of phases that must complete before this one starts.
- pub depends_on: Vec<String>,
-}
-
-/// A declarative, repeatable workflow definition.
-#[derive(Debug, Clone, PartialEq, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct WorkflowDefinition {
- /// Stable definition id (e.g. `parallel_research_cross_check`).
- pub id: String,
- /// Display name.
- pub name: String,
- /// What the workflow does and when to use it.
- pub description: String,
- /// Ordered list of phases (dependency edges encoded via `depends_on`).
- pub phases: Vec<WorkflowPhase>,
- /// Default max agents run concurrently within a phase.
- pub default_concurrency: u32,
- /// Hard cap on total child agents across the whole run.
- pub max_children: u32,
- /// Safety tier (drives approval + isolation policy at run time).
- pub safety_tier: WorkflowSafetyTier,
-}
-
-/// Response wrapper for the list-definitions controller.
-#[derive(Debug, Clone, PartialEq, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct WorkflowDefinitionListResponse {
- /// Available workflow definitions (builtins for now).
- pub definitions: Vec<WorkflowDefinition>,
- /// Total count.
- pub count: usize,
-}
-
-/// A validation problem found in a [`WorkflowDefinition`].
-#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub enum DefinitionError {
- /// A phase referenced an agent id not present in the registry.
- UnknownAgent { phase: String, agent_id: String },
- /// A `depends_on` named a phase that does not exist.
- UnknownDependency { phase: String, depends_on: String },
- /// Two phases share the same name.
- DuplicatePhase { name: String },
- /// A phase has no agents.
- EmptyPhase { phase: String },
- /// The dependency graph contains a cycle.
- CyclicDependency,
- /// The definition declares no phases.
- NoPhases,
- /// `default_concurrency` or `max_children` is zero — an executor would
- /// deadlock or trivially fail to launch any child.
- InvalidConcurrency {
- default_concurrency: u32,
- max_children: u32,
- },
-}
diff --git a/vendor/tinyagents b/vendor/tinyagents
index 960d8e1edf..433b5f47ee 160000
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@ -1 +1 @@
-Subproject commit 960d8e1edf67c4b15470eaa0a9b445eb6c0ba683
+Subproject commit 433b5f47eeaf6179ac3e1056dcc607c05c04dc33