feat(workflow): add edge-tool routing and realtime runtime
This commit is contained in:
@@ -117,6 +117,12 @@ class WorkflowEngine:
|
||||
def global_prompt(self) -> str:
|
||||
return str(self.settings.get("globalPrompt") or "").strip()
|
||||
|
||||
def runtime_mode(self) -> str:
|
||||
return str(self.settings.get("runtimeMode") or "pipeline")
|
||||
|
||||
def llm_routing_mode(self) -> str:
|
||||
return str(self.settings.get("llmRoutingMode") or "llm_router")
|
||||
|
||||
def inherits_global_config(self, node_id: str) -> bool:
|
||||
"""Return the Agent's explicit configuration scope, defaulting to global."""
|
||||
return bool(self.data(node_id).get("inheritGlobalConfig", True))
|
||||
@@ -266,8 +272,17 @@ class WorkflowEngine:
|
||||
return default if include_default else None
|
||||
|
||||
def llm_edges(self, node_id: str) -> list[dict]:
|
||||
"""Edges considered by the compatibility dedicated router."""
|
||||
return [
|
||||
edge
|
||||
for edge in self.outgoing(node_id)
|
||||
if self.edge_mode(edge) in {"llm", "always"}
|
||||
]
|
||||
|
||||
def edge_tool_edges(self, node_id: str) -> list[dict]:
|
||||
"""Natural-language transitions exposed to the active Agent."""
|
||||
return [
|
||||
edge
|
||||
for edge in self.outgoing(node_id)
|
||||
if self.edge_mode(edge) == "llm"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user