Refactor subagent and workflow domain models; migrate access tiers and events to domain module

- Moved `AccessTier` and `SubagentEvent` enums to `zesdex_domain::subagent`.
- Consolidated workflow-related types into `zesdex_domain::workflow`.
- Updated references across the codebase to use the new domain models.
- Refactored tool execution logic to utilize a new `ToolExecutor` trait.
- Enhanced `AgentTurnService` to handle tool calls and events more effectively.
- Adjusted API handlers and state management to align with new domain structure.
This commit is contained in:
asepharyana
2026-07-21 06:42:53 +07:00
parent 552bc5bc63
commit 802346f909
31 changed files with 968 additions and 870 deletions
+2 -5
View File
@@ -14,10 +14,7 @@ use crate::tools::{arg_str, Tool, ToolCtx};
use crate::workflow::engine::execution::execute_workflow;
use crate::workflow::hive_mind::cycle::execute_cycle;
use crate::workflow::hive_mind::synthesis::synthesize_consensus;
use crate::workflow::hive_mind::types::{
CognitiveCycle, NodeDirective, NodeOutput,
};
use crate::workflow::script::WorkflowScript;
use zesdex_domain::workflow::{CognitiveCycle, NodeDirective, NodeOutput, WorkflowScript};
/// Execute a multi-step workflow defined in YAML.
///
@@ -49,7 +46,7 @@ impl Tool for WorkflowRun {
#[instrument(skip(self, ctx, args))]
fn run(&self, ctx: &ToolCtx, args: &Value) -> Result<String> {
let yaml = arg_str(args, "workflow_yaml")?;
let script = WorkflowScript::parse(&yaml)?;
let script = crate::workflow::script::parse_workflow_script(&yaml)?;
info!(
"Workflow started: {} ({} phases)",
script.name,