refine long-running task notices

This commit is contained in:
zenord
2026-08-17 16:35:23 +08:00
parent 680a449cd8
commit 947f19e3cd
4 changed files with 44 additions and 56 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ gori-agent list
- `src/core/gateway.ts`
- 入站 allowlist、群 mention、命令、per-chat lock、队列状态和回复。
- policy 后 `/status`、`/cancel`、`/help` 必须绕过 chat lock,`/new` 必须保持串行。
- 异步平台普通消息轮到后立即 prompt,不等待提示发送;15 秒内完成只发结果,否则按 queued/running 提示,queued 转 running 时补开始提示,并在入站后 60 秒、180 秒及之后每 300 秒结合 ACP `idleSeconds` 低频提醒;同步 webhook 不提示。
- 异步平台普通消息轮到后立即 prompt,不等待提示发送;15 秒内完成只发结果,否则按 queued/running 提示,queued 转 running 时补开始提示;主动提示从入站绝对时间按 15 秒、60 秒、180 秒、480 秒触发,之后每 600 秒一次,只使用用户可感知文案并隐藏 ACP、`phase`、`idleSeconds` 等内部指标,技术状态只保留在 `/status`;同步 webhook 不提示。
- 每条异步入站使用独立串行 ReplyStream,`replySequence` 从 1 动态递增;发送失败只写安全日志且不阻止任务或后续发送,runtime/delivery 错误分离,最终消息入流后释放 chat lock。
- 每条入站只维护一个基于绝对 deadline 的可取消 timer;完成先标记 finished 并清 timer,shutdown 清理全部 timer,生产 timer 必须 `unref`,Gateway 可注入 fake clock/schedule 供测试。
- `src/core/command-router.ts`