feat: organize tools and enable qwen realtime calls

This commit is contained in:
Xin Wang
2026-08-14 00:15:00 +08:00
parent eb111a3890
commit 5be21f5ccc
71 changed files with 5771 additions and 2026 deletions
+8 -12
View File
@@ -1,4 +1,4 @@
"""Pure Workflow v3 graph queries and deterministic edge evaluation."""
"""Pure Workflow v4 graph queries and deterministic edge evaluation."""
from __future__ import annotations
@@ -25,8 +25,8 @@ class AgentStageConfig:
vision_model_resource_id: str | None
vision_prompt_mode: str
vision_prompt: str
tool_ids: tuple[str, ...]
state_variable_names: tuple[str, ...]
tool_bindings: tuple[dict[str, Any], ...]
built_in_tools: dict[str, Any]
knowledge_base_id: str | None
knowledge_mode: str
knowledge_top_n: int
@@ -155,16 +155,12 @@ class WorkflowEngine:
),
vision_prompt_mode=str(source.get("visionPromptMode") or "runtime"),
vision_prompt=str(source.get("visionPrompt") or "").strip(),
tool_ids=tuple(str(tool_id) for tool_id in source.get("toolIds") or []),
# Variable write scope always belongs to the Agent node, even when
# its selected tool resources come from Workflow defaults.
state_variable_names=tuple(
dict.fromkeys(
str(name)
for name in data.get("stateVariableNames") or []
if str(name)
)
tool_bindings=tuple(
dict(binding)
for binding in source.get("toolBindings") or []
if isinstance(binding, dict) and binding.get("toolId")
),
built_in_tools=dict(source.get("builtInTools") or {}),
knowledge_base_id=knowledge_base_id or None,
knowledge_mode=(
str(source.get("knowledgeMode") or "automatic")