adding ABANDON in multi-intent/intent-shift
This commit is contained in:
@@ -482,6 +482,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False)
|
||||
"route_decision": result.get("route_decision"),
|
||||
"supervisor_results": result.get("supervisor_results") or [],
|
||||
"agent_responses": result.get("agent_responses") or result.get("supervisor_results") or [],
|
||||
"operation_results": result.get("operation_results") or {},
|
||||
"domain": result.get("domain"),
|
||||
"mcp_tools": result.get("mcp_tools"),
|
||||
"mcp_results": result.get("mcp_results"),
|
||||
|
||||
@@ -46,6 +46,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
Binary file not shown.
@@ -761,6 +761,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def conversation_policy(self, state):
|
||||
@@ -978,6 +985,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -1062,6 +1070,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
Reference in New Issue
Block a user