feat(workflow): add edge-tool routing and realtime runtime

This commit is contained in:
Xin Wang
2026-08-04 22:29:04 +08:00
parent 1902ffc240
commit 59588ba88d
25 changed files with 1952 additions and 107 deletions

View File

@@ -24,6 +24,8 @@ export type MessageCompletionPolicy =
export type ActionResultAssignmentMode = "inherit" | "override" | "none";
export type ActionUserInputPolicy = "queue" | "block";
export type EdgeMode = "llm" | "expression" | "always";
export type WorkflowRuntimeMode = "pipeline" | "realtime";
export type WorkflowLlmRoutingMode = "llm_router" | "edge_tool";
export type ExpressionOperator =
| "eq"
| "neq"
@@ -202,7 +204,10 @@ export type NodeSpecMap = Record<string, RuntimeNodeSpec>;
export type WorkflowGraph = {
specVersion: 3;
settings: {
runtimeMode: WorkflowRuntimeMode;
llmRoutingMode: WorkflowLlmRoutingMode;
globalPrompt: string;
defaultRealtimeResourceId: string;
defaultLlmResourceId: string;
defaultAsrResourceId: string;
defaultTtsResourceId: string;
@@ -235,8 +240,11 @@ export function defaultGraph(): WorkflowGraph {
return {
specVersion: 3,
settings: {
runtimeMode: "pipeline",
llmRoutingMode: "edge_tool",
globalPrompt:
"你是一个友好、专业的语音助手。请使用简短、自然、适合口语表达的句子。",
defaultRealtimeResourceId: "",
defaultLlmResourceId: "",
defaultAsrResourceId: "",
defaultTtsResourceId: "",