Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox

# Conflicts:
#	api/core/workflow/graph_events/__init__.py
This commit is contained in:
yyh
2026-01-27 16:22:02 +08:00
124 changed files with 28915 additions and 778 deletions

View File

@ -47,6 +47,7 @@ from .node import (
NodeRunSucceededEvent,
ToolCall,
ToolResult,
is_node_result_event,
)
__all__ = [
@ -79,4 +80,5 @@ __all__ = [
"NodeRunSucceededEvent",
"ToolCall",
"ToolResult",
"is_node_result_event",
]

View File

@ -83,3 +83,26 @@ class NodeRunRetryEvent(NodeRunStartedEvent):
class NodeRunPauseRequestedEvent(GraphNodeEventBase):
reason: PauseReason = Field(..., description="pause reason")
def is_node_result_event(event: GraphNodeEventBase) -> bool:
"""
Check if an event is a final result event from node execution.
A result event indicates the completion of a node execution and contains
runtime information such as inputs, outputs, or error details.
Args:
event: The event to check
Returns:
True if the event is a node result event (succeeded/failed/paused), False otherwise
"""
return isinstance(
event,
(
NodeRunSucceededEvent,
NodeRunFailedEvent,
NodeRunPauseRequestedEvent,
),
)