docs: update agent and UI protocol documentation

- Update api-endpoints.md with new agent endpoints
- Update run-agent-input.md with new input schemas
- Update sse-events.md with new event types
- Update ui-schema.md with schema changes
This commit is contained in:
qzl
2026-03-19 18:42:45 +08:00
parent 0abf51e837
commit 641d847008
5 changed files with 158 additions and 17 deletions
+13 -7
View File
@@ -84,7 +84,7 @@ data: <json>
"type": "STEP_STARTED",
"threadId": "...",
"runId": "...",
"stepName": "worker" | "memory"
"stepName": "router" | "worker" | "memory"
}
```
@@ -95,7 +95,7 @@ data: <json>
"type": "STEP_FINISHED",
"threadId": "...",
"runId": "...",
"stepName": "worker" | "memory"
"stepName": "router" | "worker" | "memory"
}
```
@@ -111,7 +111,7 @@ data: <json>
"messageId": "...",
"toolCallId": "...",
"toolCallName": "...",
"stage": "worker"
"stage": "worker" | "memory"
}
```
@@ -126,7 +126,7 @@ data: <json>
"toolCallId": "...",
"toolCallName": "...",
"args": {},
"stage": "worker"
"stage": "worker" | "memory"
}
```
@@ -140,7 +140,7 @@ data: <json>
"messageId": "...",
"toolCallId": "...",
"toolCallName": "...",
"stage": "worker"
"stage": "worker" | "memory"
}
```
@@ -153,7 +153,7 @@ data: <json>
"runId": "...",
"messageId": "...",
"role": "tool",
"stage": "worker",
"stage": "worker" | "memory",
"tool_name": "...",
"tool_call_id": "...",
"tool_call_args": {},
@@ -184,7 +184,7 @@ data: <json>
"runId": "...",
"messageId": "...",
"role": "assistant",
"stage": "worker",
"stage": "worker" | "memory",
"status": "success" | "partial_success" | "failed",
"answer": "...",
"key_points": [],
@@ -323,3 +323,9 @@ cost = uncached_prompt_tokens * input_cost_per_token
- `ui_schema`
这部分命名属于当前后端实现约束,文档与实现保持一致。
## 8) 可见性与上下文装载说明
- 持久化消息使用单字段 `visibility_mask`(位掩码)控制 consumer 可见性。
- `/history` 仅投影 `ui.history` 可见消息。
- 运行时上下文按当前 stage 对应 consumer 位过滤装载,不依赖前端展示可见性。