feat: 添加 Analytics 分析功能(行为追踪、错误码、协议更新)

This commit is contained in:
qzl
2026-04-02 11:52:23 +08:00
parent b101826de5
commit 7b6dbe72c3
24 changed files with 682 additions and 52 deletions
+7 -7
View File
@@ -110,7 +110,7 @@ data: <json>
"type": "STEP_STARTED",
"threadId": "...",
"runId": "...",
"stepName": "router" | "worker" | "memory"
"stepName": "router" | "worker"
}
```
@@ -121,7 +121,7 @@ data: <json>
"type": "STEP_FINISHED",
"threadId": "...",
"runId": "...",
"stepName": "router" | "worker" | "memory"
"stepName": "router" | "worker"
}
```
@@ -137,7 +137,7 @@ data: <json>
"messageId": "...",
"toolCallId": "...",
"toolCallName": "...",
"stage": "worker" | "memory"
"stage": "worker"
}
```
@@ -152,7 +152,7 @@ data: <json>
"toolCallId": "...",
"toolCallName": "...",
"args": {},
"stage": "worker" | "memory"
"stage": "worker"
}
```
@@ -166,7 +166,7 @@ data: <json>
"messageId": "...",
"toolCallId": "...",
"toolCallName": "...",
"stage": "worker" | "memory"
"stage": "worker"
}
```
@@ -179,7 +179,7 @@ data: <json>
"runId": "...",
"messageId": "...",
"role": "tool",
"stage": "worker" | "memory",
"stage": "worker",
"tool_name": "...",
"tool_call_id": "...",
"tool_call_args": {},
@@ -239,7 +239,7 @@ SSE 协议中的工具名字段保持后端原样,不做服务端翻译:
"runId": "...",
"messageId": "...",
"role": "assistant",
"stage": "worker" | "memory",
"stage": "worker",
"status": "success" | "partial_success" | "failed",
"answer": "...",
"key_points": [],