提交一次代码

This commit is contained in:
andy
2026-07-12 09:57:54 +08:00
parent 9bd6bc1cd0
commit 6e47158d9e
46 changed files with 3524 additions and 48 deletions

View File

@@ -35,7 +35,7 @@ Debug EML 页面第一版只做一件事:
| 执行状态区 | loading、成功、失败、耗时、本次 `debug_run_id` | 提交后禁用按钮,避免重复点击;失败时展示安全错误摘要。 |
| SourceMessage 追溯区 | `source_message_id``source_provider``external_message_id``external_conversation_id` | 用于确认已写入 SourceMessage Inbox。 |
| 邮件内容预览区 | `html_body_sanitized`、纯文本、附件列表、内联图片列表 | HTML 展示必须优先使用 `html_body_sanitized`。 |
| SuperAgent 结果区 | `superagent_parsed_json``superagent_raw_answer``warnings[]` | JSON 可以格式化展示S000/S999 会被后端识别成结构化入口结果raw answer 用于排查其他非 JSON 输出。 |
| SuperAgent 结果区 | `superagent_parsed_json``superagent_raw_answer``warnings[]` | JSON 可以格式化展示;S000/S999 和新 S10/S99 入口通知都不应被前端当成普通解析失败raw answer 用于排查其他非 JSON 输出。 |
| 调试 Payload 区 | `agentbus_like_payload` | 只用于调试展示,不让用户编辑后重新提交。 |
## 4. 接口
@@ -122,7 +122,7 @@ export async function uploadDebugEml(input: {
| `superagent_session_id` | string | SuperAgent session ID。 |
| `superagent_run_id` | string | SuperAgent run ID。 |
| `superagent_raw_answer` | string | SuperAgent 最终原始文本回答。 |
| `superagent_parsed_json` | object/null | 后端尝试解析出的 JSONS000/S999 会返回识别后的对象,其他解析失败时可能为空。 |
| `superagent_parsed_json` | object/null | 后端尝试解析出的 JSONS000/S999 会返回识别后的对象,0711 P0 后续结构化 S10/S99 会直接作为 JSON 展示,其他解析失败时可能为空。 |
| `warnings[]` | string[] | 安全或解析警告,可在页面顶部或结果区展示。 |
| `status` | string | Debug run 状态。 |
@@ -145,9 +145,10 @@ export async function uploadDebugEml(input: {
- `agentbus_like_payload.source.original_message_id` 是原始邮件 `Message-ID`
- `external_message_id` 是 Debug 链路生成的独立 ID不等同于原始 `Message-ID`
- `superagent_parsed_json` 有值时优先展示格式化 JSON没有值时展示 `superagent_raw_answer`
- 如果 SuperAgent 返回 `S000,source_message_id``S999,source_message_id`,后端会把它识别为特殊入口结果,不会作为 JSON 解析失败处理。前端可在结果区展示 `entry_result_code``entry_result_source_message_id``entry_result_meaning``entry_result_description`
- 如果 SuperAgent 返回 `S000,source_message_id``S999,source_message_id`,后端会把它识别为特殊入口结果,不会作为 JSON 解析失败处理。前端可在结果区展示 `entry_result_code``entry_result_source_message_id``entry_result_meaning``entry_result_description`
- 如果 SuperAgent 返回 0711 P0 新结构化 `S10/S99`,前端应按 JSON 展示 `route_code``result_type=source_message_review_notification``agent_assessment``notification` 和 S99 的入口 `manual_review`
S000/S999 解析示例:
S000/S999 解析示例:
```json
{
@@ -158,6 +159,25 @@ S000/S999 解析示例:
}
```
V3 S10 结构化示例:
```json
{
"route_code": "S10",
"result_type": "source_message_review_notification",
"agent_assessment": {
"status": "no_booking_action_detected",
"reason_code": "no_booking_action_detected"
},
"notification": {
"notification_type": "source_message_review",
"show_source_message": true,
"requires_user_decision": true
},
"manual_review": null
}
```
## 6. 错误响应
错误响应结构: