docs: 更新协议文档,删除废弃计划文档

- 更新 http-error-codes, user-points-chat-data-protocol
- 更新 divination-run-protocol, profile-protocol
- 删除废弃的后端和前端设计计划文档
This commit is contained in:
qzl
2026-04-08 17:23:02 +08:00
parent 49fc9a116f
commit e80a82bef4
57 changed files with 4117 additions and 2269 deletions
@@ -0,0 +1,29 @@
from __future__ import annotations
from v1.agent.schemas import HistoryMessage
def test_history_message_accepts_follow_up_error_payload() -> None:
payload = {
"id": "msg-1",
"threadId": "thread-1",
"seq": 2,
"role": "assistant",
"content": "补充回答",
"timestamp": "2026-04-08T07:31:24+00:00",
"agent_output": {
"status": "failed",
"answer": "需要补充信息",
"error": {
"code": "INVALID_INPUT",
"message": "输入内容不完整",
"retryable": True,
"details": {},
},
},
}
parsed = HistoryMessage.model_validate(payload)
assert parsed.agent_output is not None
assert parsed.agent_output.error is not None
assert parsed.agent_output.error.code == "INVALID_INPUT"