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
+3 -3
View File
@@ -67,13 +67,13 @@ pub async fn run_agent(
// Limited iteration loop so we don't run forever
for iteration in 0..MAX_ITERATIONS {
let (response_msg, _usage) = client.chat_with_tools_non_streaming(
use zesdex_application::ports::ProviderService;
let (response_msg, _usage) = client.chat(
&messages,
Some(defs.clone()),
Some(4096),
None,
None,
)?;
).await?;
let content = response_msg.content.clone().unwrap_or_default();
let tool_calls = response_msg.tool_calls.unwrap_or_default();