712 B
712 B
case: show-mark-read-advances-read-cursor
用例意义
验证 show --mark-read 会推进调用 agent 的 read cursor,并影响后续 unread 查询。
前置条件
worker-e有一个未读线程THREAD_ID
输入
inbox --db TMPDIR/coord.db --agent worker-e --json show --thread THREAD_ID --mark-read
inbox --db TMPDIR/coord.db --json fetch --agent worker-e --status pending --unread
预期输出
show成功- 随后的
fetch --unread对该线程不再返回结果
断言结论
mark-read的副作用是推进该 agent 的last_read_message_id- 使用
--mark-read时必须提供 agent 身份,可通过根级--agent或命令参数传入