34 lines
1023 B
Markdown
34 lines
1023 B
Markdown
# Case: `update-accepts-body-file-and-artifact`
|
||
|
||
## 用例意义
|
||
|
||
验证 `update` 支持通过 `body-file` 与 artifact 发送结构化进度材料。
|
||
|
||
## 前置条件
|
||
|
||
- `worker-a` 已成功 `claim` 线程 `THREAD_ID`
|
||
- `TMPDIR/progress.md` 已存在
|
||
|
||
## 输入
|
||
|
||
```bash
|
||
inbox --db TMPDIR/coord.db --json update --agent worker-a --thread THREAD_ID --status in_progress --summary "Implementation started" --body-file TMPDIR/progress.md --artifact TMPDIR/progress.md --artifact-kind note
|
||
inbox --db TMPDIR/coord.db --json show --thread THREAD_ID
|
||
```
|
||
|
||
## 预期输出
|
||
|
||
- `update` 成功
|
||
- 对应消息 `body` 等于文件内容
|
||
- 对应消息包含 1 个 artifact,kind 为 `note`
|
||
|
||
## 断言结论
|
||
|
||
- `update` 的正文与 artifact 支持与 `send/reply/done/fail` 保持一致
|
||
|
||
## 补充约束
|
||
|
||
- `--body` 与 `--body-file` 互斥;读取 `body-file` 失败时应返回 `invalid_input`
|
||
- `artifact-kind` 与 `artifact-metadata-json` 不能脱离 `--artifact` 单独使用;数量不匹配时也应返回 `invalid_input`
|
||
|