Make background subagents observable as the slow lane of dual-speed tasks #125

Merged
weichen merged 1 commits from feature/dual-speed-tasks into main 2026-10-10 06:52:50 +00:00
Owner

Why: SR-B10(RDM requirements/01 V2.1,裁定 J-03)定义任务级快慢双速:快通道即时反馈,慢通道后台深度执行、进度可查、结果回投收件箱。基座已有后台派发/通知机制,但运行中与完成后用户侧均不可见,重任务只能同步干等。

改动:

  • runmgr.spawnBackground 在收件箱登记进度卡(关联子 run),完成后把结果摘要(含工件行)回投该卡;失败为 danger 态;cards==nil 时保持 no-op。
  • delegate_task 工具描述与 base-method 工作方法提示词加入快慢双速模式引导(重任务先反馈再后台)。
  • mock 新增 #background 演示路径,端到端走通快反馈→后台→进度卡→回投。

Evidence: go test ./... -count=1 全绿(32 包);新增 runmgr 测试覆盖成功/失败/未启用收件箱三条路径与 card.created/updated/status 事件。真实模型前后对照见 Dev 任务卡(feature/dual-speed-tasks)。

Refs: RDM docs/requirements/01 UR-27/SR-B10;.tmp 03-V2 §任务快慢双速通用模式;Dev 任务 feature/dual-speed-tasks。

Why: SR-B10(RDM requirements/01 V2.1,裁定 J-03)定义任务级快慢双速:快通道即时反馈,慢通道后台深度执行、进度可查、结果回投收件箱。基座已有后台派发/通知机制,但运行中与完成后用户侧均不可见,重任务只能同步干等。 改动: - runmgr.spawnBackground 在收件箱登记进度卡(关联子 run),完成后把结果摘要(含工件行)回投该卡;失败为 danger 态;cards==nil 时保持 no-op。 - delegate_task 工具描述与 base-method 工作方法提示词加入快慢双速模式引导(重任务先反馈再后台)。 - mock 新增 #background 演示路径,端到端走通快反馈→后台→进度卡→回投。 Evidence: go test ./... -count=1 全绿(32 包);新增 runmgr 测试覆盖成功/失败/未启用收件箱三条路径与 card.created/updated/status 事件。真实模型前后对照见 Dev 任务卡(feature/dual-speed-tasks)。 Refs: RDM docs/requirements/01 UR-27/SR-B10;.tmp 03-V2 §任务快慢双速通用模式;Dev 任务 feature/dual-speed-tasks。
weichen added 1 commit 2026-10-10 06:40:15 +00:00
Why: SR-B10 (RDM requirements/01 V2.1, ruling J-03) defines the task-level
dual-speed pattern: a fast lane gives immediate feedback while deep work runs
in background with queryable progress and results posted back to the inbox.
The base system had the background spawn/notice machinery but nothing the
user could see while it ran or collect afterwards, so heavy tasks just made
the user wait on a synchronous turn.
Evidence: go test ./... -count=1 green (32 pkgs); new runmgr tests cover the
card lifecycle on success (progress card -> done/ok with result summary and
artifact line, card.created/updated/status events) and on failure
(done/danger with the error), plus the cards==nil no-op path.
Impact: spawnBackground now registers an inbox progress card linked to the
child run and rewrites it with the result on completion; the delegate_task
description and base-method working prompt teach the fast-feedback-first
pattern; a #background mock demo exercises the whole path end to end.
Refs: RDM docs/requirements/01 UR-27/SR-B10; .tmp 03-V2 §任务快慢双速通用模式;
Dev task feature/dual-speed-tasks.
weichen merged commit d2bb936784 into main 2026-10-10 06:52:50 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#125