AgentEvalTool/.scratch/v1.0/issues/03-session-api.md
sinohqb 9cdbc41808 docs(intelligent-eval): commit v1.0 spec, tickets, and post-v1.0 improvements
All 8 tickets' acceptance criteria checked off (incl. the real OpenClaw
E2E verified on t480). Trivial import-sort fix from ruff included.
2026-08-05 14:01:24 +08:00

17 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 03 — 智能评估会话生命周期 API
**What to build:** 会话的创建、消息收发(含通道转发)、关闭 API。OpenClaw 通过这组接口驱动虚拟用户与被评对象的对话。
**Blocked by:** 02评估状态必须为 executing 才能创建会话)
**Acceptance criteria:**
- [x] `POST /api/intelligent-evals/{id}/sessions`创建会话body = persona, goal, dimension仅 executing 状态可创建
- [x] `POST /api/intelligent-evals/{id}/sessions/{sid}/messages`发送消息body = content平台通过 ChannelFactory 转发到被评对象,持久化双方消息,返回回复内容与 latency_ms
- [x] `POST /api/intelligent-evals/{id}/sessions/{sid}/close`关闭会话body = verdict JSON会话转 completed记录 closed_at
- [x] `GET /api/intelligent-evals/{id}/sessions`:会话列表
- [x] `GET /api/intelligent-evals/{id}/sessions/{sid}/messages`:单会话消息记录
- [x] 会话非 running 状态发消息返回 409
- [x] 评估非 executing 状态创建会话返回 409
- [x] turn_count 随消息自动递增
- [x] 集成测试覆盖:会话生命周期(创建 → 对话 → 关闭)、状态拒绝、消息持久化