dsh-taskbridge 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +616 -619
- package/antigravity/agents/dsh-taskbridge.md +12 -11
- package/antigravity/skills/dsh-taskbridge/SKILL.md +15 -15
- package/codex/dsh-taskbridge.toml +22 -11
- package/docs/INTRODUCTION.md +18 -15
- package/docs/INTRODUCTION.zh.md +19 -19
- package/docs/codex-integration.md +2 -2
- package/docs/conversation-placement.md +7 -6
- package/docs/releases/1.8.1.zh.md +24 -0
- package/docs/runtime-compatibility.md +1 -1
- package/docs/taskbridge-upgrade.md +1 -1
- package/lib/client.d.ts +72 -1
- package/lib/client.js +7 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +4 -3
- package/src/antigravity/installer.js +23 -1
- package/src/client/api.js +123 -3
- package/src/client/index.jsx +111 -8
- package/src/client/task-cleanup.js +130 -5
- package/src/codex/installer.js +3 -0
- package/src/config/defaults.js +11 -15
- package/src/http/user-plane.js +11 -1
- package/src/jobs/engine.js +1 -0
- package/src/jobs/history.js +1 -1
- package/src/jobs/plan-store.js +83 -0
- package/src/jobs/record-cleanup.js +452 -7
- package/src/mcp/server.js +30 -26
- package/src/mcp/wait.js +34 -15
- package/src/runtime/agent-runner.js +1 -0
- package/src/runtime/session-placement.js +36 -1
- package/src/runtime/worker-prompt.js +2 -1
- package/src/workspace/worktrees.js +155 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dsh-taskbridge
|
|
3
|
-
description: 专职通过 DSH TaskBridge MCP 服务向 DSH
|
|
3
|
+
description: 专职通过 DSH TaskBridge MCP 服务向 DSH 提交单个工作包、在后台静默等待、处理常规审批/提问并回收精简交付证据给主智能体审查。
|
|
4
4
|
subagent: true
|
|
5
5
|
mainAgent: false
|
|
6
6
|
tools:
|
|
@@ -9,23 +9,24 @@ tools:
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
你是 DSH TaskBridge 的后台派工与等待子智能体(Dispatcher & Watcher)。
|
|
12
|
-
主智能体负责方案规划与最终验收;你只负责通过 `delegate_*` MCP 工具把给定工作包派发给 DSH
|
|
12
|
+
主智能体负责方案规划与最终验收;你只负责通过 `delegate_*` MCP 工具把给定工作包派发给 DSH、在后台静默等待任务结束,并把精简结构化交付证据回报给主智能体。不要在本地编写或修改目标业务代码。
|
|
13
13
|
|
|
14
14
|
## 执行步骤
|
|
15
|
-
1. **核对入参**:确认主智能体提供的授权 `workspacePath`、短标题 `title`、实施方案 `prompt`,以及可选的 `planNodeId`、`parentNodeId`、`continueFromTaskId`、`agentTeams`、`allowShared`。
|
|
15
|
+
1. **核对入参**:确认主智能体提供的授权 `workspacePath`、短标题 `title`、实施方案 `prompt`,以及可选的 `goalDescription`、`planNodeId`、`parentNodeId`、`continueFromTaskId`、`agentTeams`、`allowShared`。
|
|
16
16
|
2. **检查与预检(仅新任务链)**:
|
|
17
17
|
- 未传 `continueFromTaskId` 时,先调用 `delegate_status` 确认开关已开启,再调用 `delegate_preflight({ workspacePath })`。
|
|
18
|
+
- 无论隔离(`worktree`)还是共享(`shared`)模式,都要求 `workspacePath` 是**已初始化且至少有 1 次 commit 的 Git 仓库根目录**。
|
|
18
19
|
- `worktree` 直接省略 `overrides` 提交;若为 `PREFLIGHT_DIRTY_NEEDS_DECISION` 且主智能体已确认允许原地共享执行,再调用 `delegate_preflight({ workspacePath, allowShared: true })` 并传 `overrides: { isolation: "shared" }`。
|
|
19
|
-
-
|
|
20
|
+
- 若开关关闭、仓库被其他 `block` 原因(如 `PREFLIGHT_NOT_A_REPOSITORY`、`PREFLIGHT_NOT_A_REPOSITORY_ROOT`、`PREFLIGHT_NO_COMMITS`)拦截或风险不明确,立即回报原因码并停止,严禁擅自在本地改代码。
|
|
20
21
|
3. **提交、核对回执与静默等待**:
|
|
21
|
-
- 调用 `delegate_submit` 获取 `taskId`(切勿覆盖插件配置的提供方、模型或思考强度;未明确要求时不传 `agentTeams` 与 `overrides.timeoutSeconds
|
|
22
|
+
- 调用 `delegate_submit` 获取 `taskId`(切勿覆盖插件配置的提供方、模型或思考强度;未明确要求时不传 `agentTeams` 与 `overrides.timeoutSeconds`;若显式传 `agentTeams: true/false` 且宿主不支持并被拒,直接回报拒派原因,切勿改传另一值重试)。
|
|
22
23
|
- 从 `delegate_submit` 与首个可操作 `delegate_wait` / `delegate_result` 回执(切勿为此轮询运行中任务)核对来源仓库、实际执行目录(`executionWorkspacePath`)、隔离模式、DSH `workspaceId`/`sessionId` 归属(续接须确认沿用原会话),以及实际生效的 `agentTeams` / `agentTeamsOrigin` / `team.applied` / `team.enabled`;发现归属不符立即回报主智能体并暂停。
|
|
23
24
|
- 循环调用 `delegate_wait({ taskId })`(省略 `waitSeconds`):
|
|
24
|
-
- `wait-limit`、`heartbeat`、`interrupted`(`terminal: false`)或宿主单次工具调用超时:对同一 `taskId` 继续调用 `delegate_wait
|
|
25
|
-
- `permission`:核查具体命令、涉及路径与 `argumentsComplete: true` / `allowBlocked: null`。在方案范围内的安全单次操作调用 `delegate_permission_decide(..., decision: "allow-once", fingerprint, waitAfterDecision: true)
|
|
26
|
-
- `question`:在给定方案范围内调用 `delegate_question_answer(..., waitAfterAnswer: true)
|
|
25
|
+
- `wait-limit`、`heartbeat`、`interrupted`(`terminal: false` 且 `state` 为 `pending`/`running`)或宿主单次工具调用超时:对同一 `taskId` 继续调用 `delegate_wait`。若 `interrupted` 状态不明(无明确 `state` 或相互矛盾),先调一次 `delegate_result({ taskId })` 核实真实状态,切勿盲目假设运行中或已结束。
|
|
26
|
+
- `permission`:核查具体命令、涉及路径与 `argumentsComplete: true` / `completeness: "complete"` / `allowBlocked: null`。在方案范围内的安全单次操作调用 `delegate_permission_decide(..., decision: "allow-once", fingerprint, waitAfterDecision: true)`;越界、外部网络请求、破坏性或证据不完整操作传 `"reject"` 并写明原因。若 `decisionReceipt.applied === true` 且出现 `waitError`,不要重发决定,直接继续 `delegate_wait`;若 `decisionReceipt.confirmation === "unknown"`(`applied: null`),先调 `delegate_result` 核实后再决定,切勿盲目重发。
|
|
27
|
+
- `question`:在给定方案范围内调用 `delegate_question_answer(..., waitAfterAnswer: true)`(若 `questionAnswerable: false` 则拒绝回答);涉及范围或方案变更时通过 `send_message` 请示主智能体。若 `answerReceipt.applied === true` 且出现 `waitError`,不要重发回答,直接继续 `delegate_wait`;若 `confirmation === "unknown"` 则先调 `delegate_result` 核实。
|
|
27
28
|
- `attention`:`checkpoint: "failure"` 时通过 `delegate_wait({ taskId, ackFailureEventId })` 确认提醒,并视情况继续等待或回报主智能体;`checkpoint: "progress"`(按插件配置的「运行进度检查」间隔未收到新成果回传,DSH 内部仍在运行或本机自检不会重置该计时)时检查 `progress` 无实质异常则继续等待。
|
|
28
29
|
- 瞬时 DSH 断线或传输故障:在失败阶段最多顺序重试 3 次;提交回执丢失时先查只读事实确认任务是否已创建或在跑(切勿盲目重发导致重复派工);3 次仍失败时将完整检查点事实回报给主智能体保存到工作区并暂停。
|
|
29
|
-
4.
|
|
30
|
-
- 收到 `ready`、`failed`、`cancelled` 或终态 `interrupted`(`terminal: true`)后,调用一次 `delegate_result({ taskId })
|
|
31
|
-
-
|
|
30
|
+
4. **回收并精简回报交付证据**:
|
|
31
|
+
- 收到 `ready`、`failed`、`cancelled` 或终态 `interrupted`(`terminal: true` 且 `state: "interrupted"`)后,调用一次 `delegate_result({ taskId })`(若 `noteOmitted: true` 或 `completionSummaryOmitted: true` 按需分页读取)。
|
|
32
|
+
- 向主智能体回报**结构化精简摘要**(只报最终事实,切勿逐轮回放中间审批流水或大段原始终端日志):`taskId`、状态、实际模型/提供方、`agentTeams`/`agentTeamsOrigin`/`team.applied`/`team.enabled` 实际生效状态、实际执行目录与 DSH `workspaceId`/`sessionId`、审批次数与异常拦截摘要(如有)、变更文件列表、测试验证结果与关键 diff 摘要,交由主智能体完成审查与 `delegate_review`(除非主智能体明确授权代为落盘)。
|
|
@@ -10,18 +10,18 @@ description: >-
|
|
|
10
10
|
DSH TaskBridge 对本端而言是一个**黑盒代码执行服务**:底层 API 提供方、执行模型、思考强度、Git 工作树隔离与 DSH 原生会话放置均由 DSH 插件内部管理。
|
|
11
11
|
你作为**顶层指挥官**,负责理解需求、看代码定方案、拆分工作包、处理运行中的权限/提问决策,并在交付后审查验收;不要自行改写正在由 DSH 执行的目标代码。
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
14
|
-
- 仅在用户明确要求由 DSH
|
|
15
|
-
-
|
|
13
|
+
## 1. 触发边界与前置条件
|
|
14
|
+
- 仅在用户明确要求由 DSH 执行代码实现或验证任务(例如“交给 DSH 做”、“用 TaskBridge 派工”或 `@dsh-taskbridge`)时进入派工流程。
|
|
15
|
+
- **非代码/非验证类的普通问答**(如查时间、普通聊天、概念咨询,哪怕带了 `@dsh-taskbridge`)以及状态查询、方案讨论:先于预检直接在当前指挥端回答,并简短说明 TaskBridge 仅面向 Git 仓库的代码实现与验证任务,不要调用 `delegate_preflight` / `delegate_submit`。
|
|
16
|
+
- **仓库硬性前提**:无论是默认隔离工作区(`worktree`)还是共享工作区(`shared`),都要求授权目标目录是**已初始化且至少有 1 次 commit 的 Git 仓库根目录**。真正的代码/验证任务若因目录不合规被预检拦截,必须停止并向用户报告原因码,严禁指挥端擅自绕过 TaskBridge 在本地接管修改。
|
|
16
17
|
|
|
17
18
|
## 2. 派工前准备(P0 规划)
|
|
18
|
-
1. 先用 `read_file` 查看授权项目的源码与已有交付,明确本轮目标、复用策略、实施步骤、允许修改范围和验收检查,并将这份实施方案写入 `delegate_submit.prompt
|
|
19
|
+
1. 先用 `read_file` 查看授权项目的源码与已有交付,明确本轮目标、复用策略、实施步骤、允许修改范围和验收检查,并将这份实施方案写入 `delegate_submit.prompt`(可选配 `goalDescription` 记录高层目标说明)。
|
|
19
20
|
2. 简单内聚任务直接单包提交;多阶段大目标先调用 `delegate_plan`(`action: "create"`)创建总目标与子任务树,再按依赖顺序通过 `planNodeId` 关联并派发各子任务;所需子任务通过审查后,再调用 `delegate_plan`(`action: "review"`)记录总目标结论。
|
|
20
21
|
|
|
21
|
-
## 3.
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
调用 `invoke_subagent`(指定 `TypeName: "dsh-taskbridge"`;若当前会话子智能体需显式继承 MCP 工具,也可使用 `TypeName: "self"` 或通过 `define_subagent` 开启 `EnableMCPTools: true`),把授权 `workspacePath`、短标题 `title`、实施方案 `prompt`(及可选 `planNodeId`、`continueFromTaskId`、`agentTeams`)交给子智能体在后台完成预检、提交与静默等待;待其回报交付证据后,由主智能体完成第 5 节审查与验收。
|
|
22
|
+
## 3. 默认走轻量后台子智能体(隔离等待循环与审批上下文)
|
|
23
|
+
- **默认推荐(单任务与并发任务通用)**:主智能体完成第 2 节 P0 规划后,调用 `invoke_subagent({ TypeName: "dsh-taskbridge", Model: "flash", Role: "...", Prompt: "..." })`(除非用户明确要求其他模型或要求前台直调),把授权 `workspacePath`、短标题 `title`、实施方案 `prompt`(及可选 `goalDescription`、`planNodeId`、`continueFromTaskId`、`agentTeams`、`allowShared`)交给轻量后台子智能体完成预检、提交、静默等待与常规权限审批。这样可避免反复审批/等待载荷灌入主旗舰模型上下文;待子智能体回报精简结构化交付证据后,由主智能体直接完成第 5 节审查与 `delegate_review`。
|
|
24
|
+
- **前台直调(仅在用户明确要求前台执行,或仅需单次只读查询/补录 `delegate_review` 时)**:直接在主对话按第 4 节调用 `delegate_*` MCP 工具。
|
|
25
25
|
|
|
26
26
|
## 4. 标准 MCP 调用流
|
|
27
27
|
1. **检查与预检(每个新任务链首轮执行;同链 `continueFromTaskId` 续接可直接沿用已验证事实)**:
|
|
@@ -29,23 +29,23 @@ DSH TaskBridge 对本端而言是一个**黑盒代码执行服务**:底层 API
|
|
|
29
29
|
- 调用 `delegate_preflight({ workspacePath })`:
|
|
30
30
|
- 返回 `isolation: "worktree"`:提交时省略 `overrides`,沿用插件当前配置的隔离模式与项目覆盖。
|
|
31
31
|
- 返回 `isolation: "block"` 且 `decisionRequired: true`(`PREFLIGHT_DIRTY_NEEDS_DECISION`,工作区已有未提交改动):检查变更路径列表;确认原地执行安全且不会破坏现有改动时,说明理由并再次调用 `delegate_preflight({ workspacePath, allowShared: true })`,提交时仅传 `overrides: { isolation: "shared" }`;若风险不明确则先向用户确认。
|
|
32
|
-
- 其他 `block` 原因(如 `PREFLIGHT_NOT_A_REPOSITORY_ROOT
|
|
32
|
+
- 其他 `block` 原因(如 `PREFLIGHT_NOT_A_REPOSITORY`、`PREFLIGHT_NOT_A_REPOSITORY_ROOT`、`PREFLIGHT_NO_COMMITS`):停止并向用户报告原因码(不要擅自在本地接管编码)。
|
|
33
33
|
2. **提交工作包**:
|
|
34
|
-
- 调用 `delegate_submit({ workspacePath, title, prompt, ... })
|
|
34
|
+
- 调用 `delegate_submit({ workspacePath, title, prompt, ... })`(可按需附带 `goalDescription`)。
|
|
35
35
|
- `title` 使用简短自然语言描述实际工作;不要覆盖插件配置的提供方、模型、思考强度,也不要随意传 `overrides.timeoutSeconds`(默认无总时长上限)。
|
|
36
|
-
- `agentTeams`:仅在用户明确为本次派工指定开启或关闭时传 `true`/`false
|
|
36
|
+
- `agentTeams`:仅在用户明确为本次派工指定开启或关闭时传 `true`/`false`,否则省略以沿用插件默认或原任务链选择。若宿主不支持团队协作,显式传 `true` 或 `false` 均会被直接拒绝,须原样回报拒派原因,切勿改传另一值重试;默认关闭且未生效时报告 `applied: false`(切勿表述为已显式关闭团队)。
|
|
37
37
|
- **区分新任务与返工**:独立工作包不传 `continueFromTaskId`(开启新 DSH 会话);同一任务审查后的返工修正必须传最新 `continueFromTaskId` 与原授权 `workspacePath`。
|
|
38
38
|
- **核对派工回执**:从 `delegate_submit` 与首个可操作 `delegate_wait` / `delegate_result` 回执(切勿为此轮询运行中任务)核对来源仓库、实际执行目录(`executionWorkspacePath`)、隔离模式、DSH 工作区与会话归属(续接须确认沿用原会话),以及实际生效的 `agentTeams` / `agentTeamsOrigin` / `team.applied` / `team.enabled`;发现归属不符立即暂停后续依赖派工并回报。
|
|
39
39
|
3. **静默等待与事件响应**:
|
|
40
40
|
- 调用 `delegate_wait({ taskId })`(省略 `waitSeconds`),等待期间保持静默,不循环轮询 `delegate_result` 或 `delegate_status`,不自行修改目标代码。
|
|
41
41
|
- 按返回 `reason` 响应:
|
|
42
|
-
- `wait-limit`、`heartbeat`、`interrupted`(`terminal: false`)或宿主单次工具调用超时:任务仍在后台运行,直接对**同一 `taskId`** 再次调用 `delegate_wait
|
|
43
|
-
- `permission`:核查完整命令、路径与边界(`argumentsComplete: true`、`completeness: "complete"`、`allowBlocked: null`);仅批准本任务需要的安全单次操作,传精确 `fingerprint` 调用 `delegate_permission_decide({ taskId, requestId, decision: "allow-once" | "reject", fingerprint, reason, waitAfterDecision: true })`。若 `decisionReceipt.applied === true` 且附带 `waitError`,表示决定已生效,切勿重发决定,直接继续 `delegate_wait
|
|
44
|
-
- `question`:逐题回答 `question.questions[]`,调用 `delegate_question_answer({ taskId, requestId, answers, waitAfterAnswer: true })`;问答不授予权限,若 `questionAnswerable: false`
|
|
42
|
+
- `wait-limit`、`heartbeat`、`interrupted`(`terminal: false` 且 `state` 为 `pending`/`running`)或宿主单次工具调用超时:任务仍在后台运行,直接对**同一 `taskId`** 再次调用 `delegate_wait`,切勿重复提交、取消或本地接管。若 `interrupted` 为 `terminal: true` 且 `state: "interrupted"`,任务记录已因重启中断不会恢复,调一次 `delegate_result` 后停止等待;若状态缺失或矛盾(unknown),先调一次 `delegate_result` 核实,切勿盲目假设。
|
|
43
|
+
- `permission`:核查完整命令、路径与边界(`argumentsComplete: true`、`completeness: "complete"`、`allowBlocked: null`);仅批准本任务需要的安全单次操作,传精确 `fingerprint` 调用 `delegate_permission_decide({ taskId, requestId, decision: "allow-once" | "reject", fingerprint, reason, waitAfterDecision: true })`。若 `decisionReceipt.applied === true` 且附带 `waitError`,表示决定已生效,切勿重发决定,直接继续 `delegate_wait`;若 `decisionReceipt.confirmation === "unknown"`(`applied: null`),先调 `delegate_result` 核实真实状态,切勿自动重发。
|
|
44
|
+
- `question`:逐题回答 `question.questions[]`,调用 `delegate_question_answer({ taskId, requestId, answers, waitAfterAnswer: true })`;问答不授予权限,若 `questionAnswerable: false` 则拒绝回答。若 `answerReceipt.applied === true` 且附带 `waitError`,表示回答已生效,切勿重发回答,直接继续 `delegate_wait`;若 `confirmation === "unknown"` 则先调 `delegate_result` 核实。
|
|
45
45
|
- `attention`:`checkpoint: "failure"`(按插件配置的重复失败提醒)时决策后通过 `delegate_wait({ taskId, ackFailureEventId })` 确认事件 ID;`checkpoint: "progress"`(按插件配置的「运行进度检查」间隔未收到新成果回传,可调可关;DSH 内部仍在运行或本机自检不会重置该计时)时查看 `progress` 确认无实质异常则继续等待。
|
|
46
46
|
- **瞬时断线与故障恢复**:遇瞬时 DSH 故障或传输断线,在失败阶段最多顺序重试 3 次;若提交回执丢失,先查只读事实确认任务是否已创建或在跑(在跑则直接 `delegate_wait` 同 `taskId`,不确定先暂停,切勿盲目重发导致重复派工);3 次仍失败时,先将检查点事实(目标与验收、各次报错、`taskId`、来源/执行路径、隔离模式、DSH 工作区与会话 ID、已完成与剩余工作)保存到工作区再暂停。
|
|
47
47
|
|
|
48
48
|
## 5. 交付审查与闭环
|
|
49
|
-
1. `delegate_wait` 返回 `ready`(执行结束,不等于验收通过)或 `failed` / `cancelled` 时,调用一次 `delegate_result({ taskId })` 获取改动文件、diff 与验证证据(如 `noteOmitted: true` 可按 `reviewNoteOffset` 分页读取)。
|
|
49
|
+
1. `delegate_wait` 返回 `ready`(执行结束,不等于验收通过)或 `failed` / `cancelled` / 终态 `interrupted` 时,调用一次 `delegate_result({ taskId })` 获取改动文件、diff 与验证证据(如 `noteOmitted: true` 可按 `reviewNoteOffset`/`reviewNoteLimit` 分页读取;如 `completionSummaryOmitted: true` 可按 `completionSummaryOffset`/`completionSummaryLimit` 分页读取)。
|
|
50
50
|
2. 核对关键改动与测试结果后,**必须**调用 `delegate_review({ taskId, decision: "accepted" | "changes-requested", note, completionSummary })` 写回审查结论,并确认返回 `reviewPersistence.state === "saved"`(或已返回 `hostAcceptance`)。
|
|
51
51
|
3. 需要返工时,将全部问题合并为一轮整改清单,通过 `continueFromTaskId: taskId` 提交后续轮次;绝不跳过审查直接宣告完成。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# dsh-taskbridge Codex companion — managed by the DSH TaskBridge plugin settings page.
|
|
2
2
|
# Editing this file turns it into an operator-owned file: the plugin then never
|
|
3
3
|
# overwrites or removes it, and reports it as "modified" instead.
|
|
4
|
-
version = "1.8.
|
|
4
|
+
version = "1.8.1"
|
|
5
5
|
|
|
6
6
|
name = "dsh-taskbridge"
|
|
7
7
|
description = "Dispatch an explicitly assigned implementation task to DSH through the dsh-taskbridge MCP tools, then return evidence for Codex review."
|
|
@@ -13,9 +13,12 @@ inside the plugin). Do not edit files or implement anything locally.
|
|
|
13
13
|
|
|
14
14
|
ACTIVATION (check this before anything else)
|
|
15
15
|
1. Dispatch only when the parent request explicitly selects this agent or asks to delegate
|
|
16
|
-
this implementation task to DSH (e.g. `@dsh-taskbridge` or the agent picker).
|
|
17
|
-
2. Casual mention of DSH, DeepSeek, dsh-taskbridge or delegation — or a
|
|
18
|
-
|
|
16
|
+
this code implementation or verification task to DSH (e.g. `@dsh-taskbridge` or the agent picker).
|
|
17
|
+
2. Casual mention of DSH, DeepSeek, dsh-taskbridge or delegation — or a general non-code Q&A
|
|
18
|
+
(e.g. checking the time or ordinary chat, even if `@dsh-taskbridge` is mentioned), or a question
|
|
19
|
+
about planning, review, status, logs or settings — is NOT a dispatch request. Answer directly in
|
|
20
|
+
Codex (noting that TaskBridge is only for Git repository code/verification tasks) without calling
|
|
21
|
+
any `delegate_*` tool.
|
|
19
22
|
3. If assignment is ambiguous, ask one short clarifying question instead of dispatching.
|
|
20
23
|
|
|
21
24
|
P0: COMMANDER-OWNED PLANNING AND WORK PACKETS
|
|
@@ -50,10 +53,13 @@ DISPATCH CONTRACT
|
|
|
50
53
|
in-place execution is safe, state the reason, call `delegate_preflight` again with
|
|
51
54
|
`allowShared: true`. For a `shared` decision, pass only `overrides = { isolation = "shared" }`.
|
|
52
55
|
If risk or ownership is unclear, ask one focused question.
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
- Both `worktree` and `shared` isolation require an initialized Git repository root with at
|
|
57
|
+
least one commit. Any other `isolation: "block"` (e.g. `PREFLIGHT_NOT_A_REPOSITORY`,
|
|
58
|
+
`PREFLIGHT_NOT_A_REPOSITORY_ROOT`, `PREFLIGHT_NO_COMMITS`): stop and report the reason code
|
|
59
|
+
(naming any reported repository root when relevant), and never silently take over coding locally.
|
|
60
|
+
2. SUBMIT. Set `title` to a short work description in the operator's language (optionally pass
|
|
61
|
+
`goalDescription` for high-level goal context). Pass the authorized source `workspacePath` and
|
|
62
|
+
the P0 implementation brief in `prompt`.
|
|
57
63
|
- Never override the configured provider, model or reasoning effort, and never send
|
|
58
64
|
`overrides.timeoutSeconds` unless the operator explicitly asked for a cap (normal runs
|
|
59
65
|
have no default total execution timeout).
|
|
@@ -122,11 +128,16 @@ WAIT & EVENTS
|
|
|
122
128
|
covers one call only; the request you just decided is never re-asked.
|
|
123
129
|
- `question`: answer every asked question via `delegate_question_answer({ taskId, requestId,
|
|
124
130
|
answers, waitAfterAnswer: true })`. `grantsAccess` is always false; never answer omitted
|
|
125
|
-
or redacted questions (`questionAnswerable: false`).
|
|
131
|
+
or redacted questions (`questionAnswerable: false`). Read `answerReceipt`: if `applied: true`
|
|
132
|
+
and `waitError` is also returned, the answer WAS applied — never resend it, resume with
|
|
133
|
+
`delegate_wait`; if `applied: null` with `confirmation: "unknown"`, read the task with
|
|
134
|
+
`delegate_result` before sending anything again.
|
|
126
135
|
- `ready`: execution finished — this is not acceptance. Call `delegate_result` ONCE to read
|
|
127
136
|
the summary, changed files, diff and test evidence (paginate omitted notes via
|
|
128
|
-
`reviewNoteOffset`/`reviewNoteLimit
|
|
129
|
-
`
|
|
137
|
+
`reviewNoteOffset`/`reviewNoteLimit`, and omitted summaries via
|
|
138
|
+
`completionSummaryOffset`/`completionSummaryLimit` when `completionSummaryOmitted: true`).
|
|
139
|
+
Review in Codex, then call `delegate_review` with `accepted` or `changes-requested` (plus
|
|
140
|
+
`note` and optional `completionSummary`) and confirm `reviewPersistence.state === "saved"` (or
|
|
130
141
|
returned `hostAcceptance`). Consolidate defects into ONE follow-up via `continueFromTaskId`.
|
|
131
142
|
- `failed` / `cancelled`: call `delegate_result` ONCE and report. For a transient DSH outage
|
|
132
143
|
or transport failure, make up to 3 sequential retries on the failing stage: for an
|
package/docs/INTRODUCTION.md
CHANGED
|
@@ -11,28 +11,28 @@ Keep designing, breaking down work and reviewing diffs inside **Codex** or **Ant
|
|
|
11
11
|
|
|
12
12
|
Execution stays a **black box** to the commander: API connections, worker model, reasoning effort, Git worktree isolation and DSH native workspaces/sessions are managed inside the TaskBridge plugin. The commander focuses purely on planning, per-operation approvals and final review.
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
16
|
## Why TaskBridge
|
|
17
17
|
|
|
18
18
|
When you want Codex or Antigravity to drive architecture and code review, while delegating implementation to models already connected in DSH, copying prompts and diffs back and forth breaks down fast. TaskBridge bridges the two cleanly:
|
|
19
19
|
|
|
20
|
-
- **Clean layered black-box architecture:** Configure provider, model and reasoning effort once in DSH. Every commander talks to the same standard MCP surface without leaking low-level routing or workspace details into prompts.
|
|
21
|
-
- **Plan before dispatch:** The commander inspects code first and sends a concrete implementation brief and acceptance criteria (or builds a multi-step plan tree). DSH executes the plan and reports evidence back if a premise conflicts with the repository.
|
|
22
|
-
- **Quiet waiting
|
|
20
|
+
- **Clean layered black-box architecture:** Configure provider, model and reasoning effort once in DSH. Every commander talks to the same standard MCP surface (11 bounded tools, compact single-line JSON payloads) without leaking low-level routing or workspace details into prompts.
|
|
21
|
+
- **Plan before dispatch:** The commander inspects code first and sends a concrete implementation brief and acceptance criteria (or builds a multi-step plan tree). DSH executes the plan using native file/search tools first and reports evidence back if a premise conflicts with the repository.
|
|
22
|
+
- **Quiet waiting with low commander overhead:** A local wait loop tracks real worker activity without busy polling, and Antigravity delegates wait & routine approval loops to a lightweight `flash` background subagent so flagship context stays clean.
|
|
23
23
|
- **Same-session follow-ups:** Review diffs and test evidence together, record an explicit accept or rework verdict, and send consolidated fixes right back to the original DSH session and worktree.
|
|
24
|
-
- **Isolated parallel runs:** Default Git worktree isolation lets one project run multiple independent work packets in parallel
|
|
24
|
+
- **Isolated parallel runs & linked cleanup:** Default Git worktree isolation lets one project run multiple independent work packets in parallel, and **Task history** offers preset selection, linked worktree/session/plan cleanup, `interrupted` record removal and orphan residual sweeps.
|
|
25
25
|
|
|
26
26
|
## Key capabilities
|
|
27
27
|
|
|
28
28
|
| Capability | What you get |
|
|
29
29
|
| --- | --- |
|
|
30
|
-
| **Codex & Antigravity one-click setup** | Dedicated settings tabs to install, update, repair MCP only, or cleanly remove managed integrations while preserving any user edits. |
|
|
30
|
+
| **Codex & Antigravity one-click setup** | Dedicated settings tabs to install, update, repair MCP only, or cleanly remove managed integrations while preserving any user edits via content digests. |
|
|
31
31
|
| **Reuse DSH APIs & models** | Pick from providers already enabled in DSH with your chosen worker model and reasoning effort; credentials stay inside DSH. |
|
|
32
|
-
| **Task trees &
|
|
33
|
-
| **Worktree isolation & workspace tree** | Run isolated parallel worktrees (nested
|
|
32
|
+
| **Task trees, history & linked cleanup** | Plan multi-level goals and subtasks; filter task records by date, batch-select with presets (`All`, `Accepted`, `Failed / Cancelled / Interrupted`), inspect full review notes, jump to the native DSH session, and optionally archive sessions, remove isolated worktrees/workspaces, clean empty plan ancestors and sweep historical orphans (never touching source files or shared workspaces). |
|
|
33
|
+
| **Worktree isolation & workspace tree** | Run isolated parallel worktrees (nested automatically under DSH's `TaskBridge` sidebar root and titled per task) or explicit shared checkouts (reusing the project's native workspace and keeping its original name), with lightweight badges on dispatched sessions. |
|
|
34
34
|
| **Tiered silent monitoring** | No default total execution timeout. By default, a one-time local self-check runs 10 minutes after execution starts, and a commander check-in triggers after 40 minutes with no new delivery — plus deduplicated repeated-failure reminders (all adjustable or toggleable). |
|
|
35
|
-
| **Per-operation approvals & native questions** | Commands beyond workspace write require exact-fingerprint commander approval for that single call; native DSH questions forward cleanly and resume waiting in one call. |
|
|
35
|
+
| **Per-operation approvals & native questions** | Commands beyond workspace write require exact-fingerprint commander approval for that single call (omitting bulky monitoring blobs during interactive pauses); native DSH questions forward cleanly and resume waiting in one call. |
|
|
36
36
|
| **Optional Agent Teams** | Off by default; configurable as a new-task default or per dispatch, with continuations inheriting the chain's choice. |
|
|
37
37
|
| **Auto-save, presets & project overrides** | Changes save automatically; store reusable worker presets and per-project overrides. |
|
|
38
38
|
|
|
@@ -56,8 +56,8 @@ dsh-taskbridge
|
|
|
56
56
|
|
|
57
57
|
### 3. Connect a commander
|
|
58
58
|
|
|
59
|
-
- **Codex:** Open **Codex integration** and click **Install / update TaskBridge agent**, then reload Codex.
|
|
60
|
-
- **Antigravity:** Open **Antigravity integration** and click **Install / update Antigravity plugin**. This installs a self-contained bundle under `~/.gemini/config/plugins/dsh-taskbridge/` (`plugin.json`, on-demand `SKILL.md`, background dispatcher subagent, and plugin-scoped `mcp_config.json`) without modifying your global Antigravity config.
|
|
59
|
+
- **Codex:** Open **Codex integration** and click **Install / update TaskBridge agent**, then reload Codex and dispatch by naming `dsh-taskbridge` (or explicitly assigning the task to DSH / TaskBridge).
|
|
60
|
+
- **Antigravity:** Open **Antigravity integration** and click **Install / update Antigravity plugin**. This installs a self-contained bundle under `~/.gemini/config/plugins/dsh-taskbridge/` (`plugin.json`, on-demand `SKILL.md`, lightweight background dispatcher subagent, and plugin-scoped `mcp_config.json`) without modifying your global Antigravity config. When Antigravity prompts for external MCP confirmation on the first `delegate_*` call, choose **Always Allow** so quiet waiting is not interrupted.
|
|
61
61
|
|
|
62
62
|
### 4. Flip the switch and dispatch
|
|
63
63
|
|
|
@@ -73,10 +73,10 @@ The settings page has a top delegation switch and five tabs: **API management, E
|
|
|
73
73
|
|
|
74
74
|
### Isolation modes
|
|
75
75
|
|
|
76
|
-
- **Independent worktree (default):** Creates an isolated Git worktree from the committed baseline so candidate edits stay separate and independent tasks can run in parallel.
|
|
77
|
-
- **Shared workspace:** Runs directly inside the authorized checkout when uncommitted changes exist and in-place execution is explicitly approved after preflight.
|
|
76
|
+
- **Independent worktree (default):** Creates an isolated Git worktree from the committed baseline so candidate edits stay separate and independent tasks can run in parallel; automatically nested under DSH's `TaskBridge` sidebar node and named after the task title.
|
|
77
|
+
- **Shared workspace:** Runs directly inside the authorized checkout when uncommitted changes exist and in-place execution is explicitly approved after preflight; reuses the project's own native DSH workspace, preserves its original name, and is strictly protected from linked cleanup deletion.
|
|
78
78
|
|
|
79
|
-
> Accepting a review records your conclusion only — it never merges a worktree, commits or pushes automatically.
|
|
79
|
+
> **Git repository requirement:** Both **worktree** and **shared** modes require an initialized Git repository root with at least one commit (general non-code Q&A or plain folders are not dispatched through TaskBridge). Accepting a review records your conclusion only — it never merges a worktree, commits or pushes automatically.
|
|
80
80
|
|
|
81
81
|
### Quiet waiting & monitoring
|
|
82
82
|
|
|
@@ -90,7 +90,7 @@ The two clocks measure different boundaries (**execution start** vs. **time sinc
|
|
|
90
90
|
## FAQ
|
|
91
91
|
|
|
92
92
|
**Does installing TaskBridge make Codex or Antigravity send everything to DSH automatically?**
|
|
93
|
-
No. Dispatch only happens when the local delegation switch is enabled AND you explicitly assign a task to DSH / TaskBridge.
|
|
93
|
+
No. Dispatch only happens when the local delegation switch is enabled AND you explicitly assign a Git-repository code/verification task to DSH / TaskBridge. General Q&A (even if `@dsh-taskbridge` is mentioned) stays in the commander.
|
|
94
94
|
|
|
95
95
|
**Will plugin updates overwrite my custom edits to `dsh-taskbridge.toml` or `SKILL.md`?**
|
|
96
96
|
No. Ownership is verified by content digest: unmodified plugin-managed files refresh automatically on upgrade, while customized files are preserved and reported. Use **Repair MCP only** to refresh just the MCP connection.
|
|
@@ -98,6 +98,9 @@ No. Ownership is verified by content digest: unmodified plugin-managed files ref
|
|
|
98
98
|
**Does the Antigravity integration touch my global `mcp_config.json` or `config.json`?**
|
|
99
99
|
No. Everything lives inside `~/.gemini/config/plugins/dsh-taskbridge/` so Antigravity can enable, disable or remove it cleanly as one unit.
|
|
100
100
|
|
|
101
|
+
**How does TaskBridge reduce commander token usage?**
|
|
102
|
+
Planning, approvals, questions and final review still use the commander, while TaskBridge cuts overhead at three layers: (1) quiet local waiting with no intermediate polling; (2) Antigravity defaults to a lightweight `flash` background subagent for wait & approval loops, returning only a concise summary to the flagship model; and (3) worker prompts prefer native file/search tools over shell commands, paired with compact single-line JSON MCP responses that trim bulky monitoring blobs during interactive pauses.
|
|
103
|
+
|
|
101
104
|
## Client support & roadmap
|
|
102
105
|
|
|
103
106
|
| Client | Status | Integration |
|
package/docs/INTRODUCTION.zh.md
CHANGED
|
@@ -11,28 +11,28 @@ TaskBridge 是面向 **DeepSeek Harness(DSH)** 的多端任务派工插件
|
|
|
11
11
|
|
|
12
12
|
整个执行过程对指挥端是**黑盒**的——API 连接、执行模型、思考强度、Git 工作树隔离和 DSH 原生会话管理都在插件内统一收口,指挥端只管派工、审批和验收。
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
16
|
## 它解决什么问题
|
|
17
17
|
|
|
18
18
|
当你更信任 Codex / Antigravity 的架构规划和代码审查能力,同时想用 DSH 里接入的高性价比或专属模型来跑具体实现时,手工来回粘贴需求和代码很快就会失控。TaskBridge 直接打通两边:
|
|
19
19
|
|
|
20
|
-
- **黑盒分层,各司其职**:在 DSH
|
|
21
|
-
- **先定方案再派工**:指挥端先读代码、定步骤和验收标准,复杂目标可先建任务树再拆包派发;DSH
|
|
22
|
-
-
|
|
20
|
+
- **黑盒分层,各司其职**:在 DSH 插件里选一次提供方、模型和思考强度,所有指挥端共用同一套标准 MCP 接口(11 个有界工具、紧凑 JSON 载荷),不需要在提示词里反复交代模型或环境细节。
|
|
21
|
+
- **先定方案再派工**:指挥端先读代码、定步骤和验收标准,复杂目标可先建任务树再拆包派发;DSH 按方案落地,优先使用原生文件/搜索工具,遇到现场前提冲突先回报证据,不瞎改。
|
|
22
|
+
- **静默等待,省指挥端上下文**:执行期间由本机程序盯进度,Antigravity 默认由轻量 `flash` 后台子智能体承载静默等待与常规审批,避免多轮中间载荷灌入主旗舰模型上下文。
|
|
23
23
|
- **同会话续接,返工不丢上下文**:交付后由指挥端集中看 diff 和测试结果并落盘审查结论;需要修改时直接续接原来的 DSH 会话和工作树,不必从头讲一遍背景。
|
|
24
|
-
-
|
|
24
|
+
- **独立隔离与联动清理**:默认从 Git 基线拉出独立工作树并行执行,互不干扰;任务完成后可在「任务记录」按执行链一键联动清理历史、派工会话、隔离工作树与空规划节点。
|
|
25
25
|
|
|
26
26
|
## 核心能力
|
|
27
27
|
|
|
28
28
|
| 能力 | 说明 |
|
|
29
29
|
| --- | --- |
|
|
30
|
-
| **Codex & Antigravity 一键集成** | 设置页分别提供 Codex
|
|
30
|
+
| **Codex & Antigravity 一键集成** | 设置页分别提供 Codex(托管子智能体 + MCP)和 Antigravity(自包含插件包 + Skill + 轻量后台子智能体 + MCP)的安装、更新、仅修复 MCP 与卸载入口,按文件哈希完整保留用户自定义修改。 |
|
|
31
31
|
| **复用 DSH 已有 API 与模型** | 直接选用 DSH 已启用的接口、执行模型与思考强度;密钥仍由 DSH 托管,不导出、不回显。 |
|
|
32
|
-
|
|
|
33
|
-
| **隔离并行与原生工作区整合** | 默认独立 Git
|
|
34
|
-
| **分级静默监控** |
|
|
35
|
-
| **逐次权限审批与原生提问** |
|
|
32
|
+
| **多层任务树、任务记录与联动清理** | 支持规划总目标与子任务;「任务记录」支持日期筛选、快捷勾选预设(全部 / 仅已通过 / 仅失败·取消·中断)、查看完整审查意见与一键跳转原会话,并支持按需联动归档派工会话、移除隔离工作树/临时工作区、清理空规划父节点及扫除历史孤儿残留(主项目源码与共享工作区受保护绝不误删)。 |
|
|
33
|
+
| **隔离并行与原生工作区整合** | 默认独立 Git 工作树隔离(支持同项目多会话并行,自动折叠在 DSH 侧栏 `TaskBridge` 节点下并按任务标题命名),也支持显式共享目录执行(沿用项目原生工作区并保留项目原名);派工会话带轻量标识。 |
|
|
34
|
+
| **分级静默监控** | 普通任务无默认总执行时长上限;默认 DSH 开始运行满 10 分钟本机自检一次、指挥端连续 40 分钟未收到新成果时提醒检查,重复失败自动提醒并支持事件确认(均可调或关闭)。 |
|
|
35
|
+
| **逐次权限审批与原生提问** | 超出常规工作区权限的命令需经指挥端核验具体命令与路径后单次放行(审批暂停自动裁剪冗余监控字段以降低开销);DSH 原生提问直传指挥端,答复或审批后同调用无缝续等。 |
|
|
36
36
|
| **可选智能体团队协作** | 默认关闭,可在执行设置调整新任务默认开关,也可单次派工显式覆盖;续接沿用原会话选择。 |
|
|
37
37
|
| **设置自动保存与项目覆盖** | 选项改动即时保存,文本输入自动防抖落盘;支持保存常用预设和按项目路径单独覆盖执行配置。 |
|
|
38
38
|
|
|
@@ -56,8 +56,8 @@ dsh-taskbridge
|
|
|
56
56
|
|
|
57
57
|
### 3. 一键接入指挥端
|
|
58
58
|
|
|
59
|
-
- **接入 Codex**:切到 **Codex 集成**,点击 **安装 / 更新 TaskBridge 智能体**,完成后重启或新开 Codex
|
|
60
|
-
- **接入 Antigravity**:切到 **Antigravity 集成**,点击 **安装 / 更新 Antigravity 插件**。插件会写入独立的 `~/.gemini/config/plugins/dsh-taskbridge/`(内含 `SKILL.md
|
|
59
|
+
- **接入 Codex**:切到 **Codex 集成**,点击 **安装 / 更新 TaskBridge 智能体**,完成后重启或新开 Codex 会话,即可在指令中点名 `dsh-taskbridge`(或明确说明“交给 DSH / TaskBridge”)派工。
|
|
60
|
+
- **接入 Antigravity**:切到 **Antigravity 集成**,点击 **安装 / 更新 Antigravity 插件**。插件会写入独立的 `~/.gemini/config/plugins/dsh-taskbridge/`(内含 `SKILL.md`、轻量后台子智能体和插件内 `mcp_config.json`,不碰全局配置),Antigravity 加载后即可通过 `@[plugin:dsh-taskbridge]` / `@dsh-taskbridge` 或明确指令派工。首次调用 `delegate_*` MCP 工具时若弹出外部工具确认框,建议勾选 **Always Allow**,避免打断静默等待与审批续等。
|
|
61
61
|
|
|
62
62
|
### 4. 打开总开关,派发第一个任务
|
|
63
63
|
|
|
@@ -73,12 +73,12 @@ dsh-taskbridge
|
|
|
73
73
|
|
|
74
74
|
### 独立工作树 vs 共享工作区
|
|
75
75
|
|
|
76
|
-
| 模式 |
|
|
76
|
+
| 模式 | 修改位置与侧栏落点 | 适用场景 |
|
|
77
77
|
| --- | --- | --- |
|
|
78
|
-
| **独立工作树(默认)** | 从已提交的 Git 基线拉出隔离 worktree |
|
|
79
|
-
| **共享工作区** |
|
|
78
|
+
| **独立工作树(默认)** | 从已提交的 Git 基线拉出隔离 worktree;在 DSH 侧栏自动折叠于 `TaskBridge` 节点下并按任务标题命名 | 希望改动与主目录隔离,或同一项目同时并行跑多个独立任务,验收后再决定如何合入;清理时可连同工作树与临时工作区一并移除。 |
|
|
79
|
+
| **共享工作区** | 直接在授权的项目目录内修改;沿用项目自己的原生工作区并保留项目原名称(不落入 `TaskBridge` 节点下) | 当前目录已有未提交改动,且明确希望 DSH 基于现状继续修改(预检确认后才允许);联动清理绝不删除项目源码目录与共享工作区。 |
|
|
80
80
|
|
|
81
|
-
>
|
|
81
|
+
> **仓库硬性前提**:无论是独立工作树还是共享工作区,都要求授权目录是**已初始化且至少有 1 次 commit 的 Git 仓库根目录**(普通聊天问答或非仓库临时目录不走 TaskBridge)。审查通过只记录结论,不会自动合并工作树、创建提交或推送代码。
|
|
82
82
|
|
|
83
83
|
### 静默等待与分级监控
|
|
84
84
|
|
|
@@ -102,7 +102,7 @@ dsh-taskbridge
|
|
|
102
102
|
## 常见问题
|
|
103
103
|
|
|
104
104
|
**安装后,Codex 或 Antigravity 会偷偷把所有活都派给 DSH 吗?**
|
|
105
|
-
|
|
105
|
+
不会。必须同时满足两个条件:顶部本机调用开关已打开,且你在对话中明确指派将 Git 仓库中的代码实现或验证任务交给 DSH / TaskBridge 执行。普通问答(哪怕提到了 `@dsh-taskbridge`)、代码解读或未指派的本地改动都不会触发派工。
|
|
106
106
|
|
|
107
107
|
**我手工改过 `dsh-taskbridge.toml` 或 `SKILL.md`,升级插件会被覆盖吗?**
|
|
108
108
|
不会。TaskBridge 按文件内容哈希判定所有权:只有未改动过的托管文件才会在升级时自动刷新;你编辑过的文件会被标记为自定义并原样保留。如果只更新连接路径,点「仅修复 MCP 配置」即可。
|
|
@@ -110,8 +110,8 @@ dsh-taskbridge
|
|
|
110
110
|
**Antigravity 集成会修改我的全局 `mcp_config.json` 或 `config.json` 吗?**
|
|
111
111
|
不会。所有文件都收敛在 `~/.gemini/config/plugins/dsh-taskbridge/` 独立插件目录中,你可以在 Antigravity 插件页随时一键开关,卸载时也只清理插件自己写入的文件。
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
**静默等待与 `1.8.1` 的低耗设计是怎么省指挥端 token 的?**
|
|
114
|
+
规划方案、处理权限审批、回答提问和最终审查仍需要指挥端模型介入;TaskBridge 从三层压低额外消耗:① 执行期间静默等待,不反复查状态或拉中间代码;② Antigravity 默认使用轻量 `flash` 后台子智能体隔离等待和常规审批,只将精简摘要回传主旗舰模型;③ 底层提示 DSH 优先使用原生文件工具减少不必要的 Shell 审批弹窗,并采用单行紧凑 JSON 载荷及审批期裁剪。历史测量见 [等待阶段用量对照](https://github.com/ranranyya/dsh-taskbridge/blob/master/docs/releases/1.5.0-token-benchmark.zh.md)。
|
|
115
115
|
|
|
116
116
|
## 客户端支持路线
|
|
117
117
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Codex integration contract
|
|
2
2
|
|
|
3
|
-
Status: implemented in 1.8.
|
|
3
|
+
Status: implemented in 1.8.1 (Codex and Antigravity integrations both supported, with full 1.8.0 and earlier upgrade recognition). This automatic installer covers Codex; Antigravity integration is documented in `docs/antigravity-integration.md`, and Claude Code / Claude Desktop integration is planned for 2.0.
|
|
4
4
|
|
|
5
5
|
The 1.7.0 release also makes future managed upgrades self-recognising: the two exact
|
|
6
6
|
companions this machine really held (`1.6.1` in both terminator spellings and the local
|
|
@@ -562,7 +562,7 @@ successful diagnosis.
|
|
|
562
562
|
```jsonc
|
|
563
563
|
{
|
|
564
564
|
"codexHome": "…",
|
|
565
|
-
"packageVersion": "1.8.
|
|
565
|
+
"packageVersion": "1.8.1",
|
|
566
566
|
"boundary": { "blocked": false, "link": null, "unknown": false, "home": "directory", "agents": "directory" },
|
|
567
567
|
"agent": {
|
|
568
568
|
"path": "…", "state": "installed", "installed": true, "managed": true,
|
|
@@ -23,12 +23,13 @@ conversation is ever continued.
|
|
|
23
23
|
|
|
24
24
|
`delegate_submit.title` is an optional, short description of the actual work in
|
|
25
25
|
the operator's language. The engine derives a title from the prompt's goal when
|
|
26
|
-
older callers omit it. Only newly created Workspace groups are renamed
|
|
27
|
-
`workspaceController.rename({ workspaceId, title })`;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
older callers omit it. Only newly created **worktree** Workspace groups are renamed
|
|
27
|
+
through `workspaceController.rename({ workspaceId, title })`; a shared-mode run
|
|
28
|
+
executes inside the project's native source Workspace and preserves the project's
|
|
29
|
+
own Workspace name, and an existing Workspace or explicit follow-up retains its
|
|
30
|
+
current name. Conflicting names receive a short task-id suffix. Naming needs no
|
|
31
|
+
model call and does not change the execution directory, Git branch or task identity.
|
|
32
|
+
Historical Workspaces are not renamed in bulk.
|
|
32
33
|
|
|
33
34
|
## The two questions, and the two services that answer them
|
|
34
35
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# TaskBridge 1.8.1
|
|
2
|
+
|
|
3
|
+
## 核心更新
|
|
4
|
+
|
|
5
|
+
- **任务记录联动清理与历史孤儿扫除**:
|
|
6
|
+
- 设置页「任务记录」新增**快捷勾选预设**(全部可清理 / 仅已通过验收 / 仅失败·已取消·已中断)与三项按需勾选的**联动清理**能力:归档关联 DSH 派工会话、移除隔离工作树目录与临时工作区、递归清理已变空的规划父节点。
|
|
7
|
+
- **严格按隔离模式保护现场**:`worktree` 隔离任务可按需一并移除受管工作树与临时工作区;`shared` 共享任务绝不删除主项目源码目录与共享工作区,仅按勾选项归档对应派工会话。
|
|
8
|
+
- **支持清理重启中断记录**:将 `interrupted`(DSH 重启导致且永不恢复的终态历史记录)纳入可手动清理范围并归入「失败·取消·中断」快捷预设,同时打通底层 `HistoryStore.deleteMany` 原子删除。
|
|
9
|
+
- **一键扫除历史残留**:新增 `POST /api/dsh-delegate/tasks/cleanup-orphans` 与设置页入口,扫描并清理已删历史记录残留的孤儿隔离工作树目录、临时工作区与失效会话映射。
|
|
10
|
+
- **三重指挥端省 Token 优化**:
|
|
11
|
+
- **Antigravity 轻量后台子智能体隔离**:默认通过 `dsh-taskbridge` 子智能体(`Model: "flash"`)在后台承载预检、静默等待与常规权限审批,并仅回传结构化精简摘要,避免多轮中间载荷灌入主旗舰模型上下文;修正 YAML `tools:` 不应声明 `call_mcp_tool`(由 `mcp_config.json` 自动注入)的真机启动问题并加防回归断言。
|
|
12
|
+
- **Worker 原生文件工具优先**:底层 `worker-prompt.js` 明确要求读写、检索文件与日志优先使用原生工具而非 Shell(`pwsh`/`powershell`/`cmd`/`bash`),禁止未要求的外部网络请求,显著降低 Windows 沙箱内的无效审批回合。
|
|
13
|
+
- **MCP 载荷大幅瘦身**:全量 MCP 工具响应改为单行紧凑 JSON 序列化;`delegate_wait` / `delegate_permission_decide` / `delegate_question_answer` 在交互暂停回合剔除重复的 `task.activity`、`selfCheck`、`route`、`reviewPersistence` 监控大块(`attention` 与终态仍完整保留)。
|
|
14
|
+
- **共享模式工作区命名保护**:
|
|
15
|
+
- 仅在 `worktree` 隔离模式首次新建专属任务工作区时以 `delegate_submit.title` 命名;`shared` 共享模式首次为项目创建原生工作区时保留项目原有名称,不再被第一笔单次任务标题覆盖。
|
|
16
|
+
- **规则、MCP 握手契约、文档与全新架构图全面刷新**:
|
|
17
|
+
- 修正 MCP `initialize` 握手下发 `instructions`、`delegate_wait` 工具描述与兜底提示中的旧版 10 分钟静默口径,对齐 `1.7.0+` 实际进度检查与默认无总执行超时契约。
|
|
18
|
+
- 在双端规则、设置页与中英文介绍中写透“隔离与共享模式均要求已提交的 Git 仓库根目录”及非代码问答触发边界;补齐双端 `delegate_question_answer` 防重发、`confirmation: "unknown"` 复核、`interrupted` 三态区分与 `completionSummary` 分页对称性,并登记 `1.8.0` 精确升级哈希(Codex + Antigravity 均支持无感升级)。
|
|
19
|
+
- 替换 `v1.5.2` 旧配图为全新中英文高清多端黑盒架构图(`docs/assets/taskbridge-workflow.{zh,en}.png`),修复 `README.md` 全部 10 处断链并刷新折叠区技术参考。
|
|
20
|
+
|
|
21
|
+
## 安装与升级
|
|
22
|
+
|
|
23
|
+
- 可通过 DSH **插件 → 添加插件** 安装或升级 `dsh-taskbridge`,或下载下方 `dsh-taskbridge-1.8.1.tgz` 本地安装。
|
|
24
|
+
- 从 `1.8.0` 升级时,DSH 启动后会自动刷新未修改过的 Codex 与 Antigravity 托管规则文件并保留自定义编辑;升级完成后建议重连 MCP 或重启一次 Antigravity / Codex 会话以加载新版紧凑 JSON MCP 进程与最新子智能体配置。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Runtime compatibility
|
|
2
2
|
|
|
3
|
-
Build 1.8.
|
|
3
|
+
Build 1.8.1 retains the loading policy introduced in 1.4.2: **no DSH version whitelist**: it omits `engines.dsh`, declares
|
|
4
4
|
host-provided `@deepseek-ai/dsh-*` peers as `*`, and publishes no DSH engine range
|
|
5
5
|
in the custom plugin index. The plugin uses runtime capability checks rather than
|
|
6
6
|
rejecting a host solely by its version number. Node.js `>=24` is still required.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
1. 等待当前任务结束,关闭旧插件的本机调用开关。
|
|
8
8
|
2. 在 DSH 插件管理中停用并卸载本项目旧 `dsh-delegate` 或 `dsh-taskdispatch` 包。**保留 `<DSH_HOME>/data/dsh-delegate` 数据目录**;DSH 若提供删除数据选项,不要勾选。新旧包不能同时启用。
|
|
9
|
-
3. 在“添加插件”中输入 **`dsh-taskbridge`**。中国大陆镜像未同步时改选 npm 官方源。也可安装对应版本的本地包,例如 `dsh-taskbridge-1.8.
|
|
9
|
+
3. 在“添加插件”中输入 **`dsh-taskbridge`**。中国大陆镜像未同步时改选 npm 官方源。也可安装对应版本的本地包,例如 `dsh-taskbridge-1.8.1.tgz`,或添加本项目固定 Git 提交的自定义索引。不要手动修改 Desktop 保留的 profile。
|
|
10
10
|
4. 打开 **DSH TaskBridge** 配置页,核对 API、模型、思考强度和总开关。数据目录与旧版相同;安装前关闭旧开关,避免恢复之前保存的开启状态。
|
|
11
11
|
5. 在 Codex 集成中点击“安装 / 更新 TaskBridge 智能体”,更新智能体及 MCP,然后重新加载 Codex。未修改的旧 `dsh-delegate.toml` 会迁移为 `dsh-taskbridge.toml`;修改过的文件保留。只需修复 MCP 时可使用“仅修复 MCP 配置”。启动自检不会接管其他安装目录。
|
|
12
12
|
6. 若添加过旧索引,改用 `https://ranranyya.github.io/dsh-taskbridge/index.json`。
|
package/lib/client.d.ts
CHANGED
|
@@ -548,6 +548,17 @@ export interface DelegateCleanupCandidate {
|
|
|
548
548
|
parentNodeId: string | null;
|
|
549
549
|
nodeId: string | null;
|
|
550
550
|
nodeKind: string;
|
|
551
|
+
/**
|
|
552
|
+
* The host's status for the chain (`accepted`, `failed`, `cancelled`, …), or `null`
|
|
553
|
+
* when the projection stated none. It is what the preset shortcuts read; the page
|
|
554
|
+
* never derives it from a title or a time.
|
|
555
|
+
*/
|
|
556
|
+
nodeStatus?: string | null;
|
|
557
|
+
/**
|
|
558
|
+
* The chain's isolation (`worktree` or `shared`), when the projection stated one.
|
|
559
|
+
* It is descriptive only: the browser half never decides what may be deleted from it.
|
|
560
|
+
*/
|
|
561
|
+
isolation?: string | null;
|
|
551
562
|
selectable: boolean;
|
|
552
563
|
blockers: string[];
|
|
553
564
|
reason: string | null;
|
|
@@ -605,7 +616,63 @@ export declare function cleanupSelectionSummary(
|
|
|
605
616
|
export declare function cleanupRequest(
|
|
606
617
|
selection: Record<string, string[]>,
|
|
607
618
|
candidates: DelegateCleanupCandidate[],
|
|
608
|
-
|
|
619
|
+
options?: DelegateCleanupOptions,
|
|
620
|
+
): { body: DelegateCleanupRequest; problems: string[] };
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The linked cleanup choices of one batch. Each flag is independently opt-in and is
|
|
624
|
+
* absent from the request body unless it is `true`; the host treats an absent flag as
|
|
625
|
+
* "leave that alone".
|
|
626
|
+
*
|
|
627
|
+
* - `archiveSessions` archives the dispatched DSH conversation of each removed round.
|
|
628
|
+
* - `removeWorktrees` removes a `worktree`-isolated task's managed tree and its
|
|
629
|
+
* temporary Workspace; a `shared` task's directory and the source checkout are
|
|
630
|
+
* never touched.
|
|
631
|
+
* - `cleanPlans` removes planning nodes that no remaining task still references.
|
|
632
|
+
*/
|
|
633
|
+
export interface DelegateCleanupOptions {
|
|
634
|
+
archiveSessions?: boolean;
|
|
635
|
+
removeWorktrees?: boolean;
|
|
636
|
+
cleanPlans?: boolean;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/** The request body of `POST /api/dsh-delegate/tasks/cleanup`. */
|
|
640
|
+
export interface DelegateCleanupRequest {
|
|
641
|
+
chains: DelegateCleanupChain[];
|
|
642
|
+
archiveSessions?: true;
|
|
643
|
+
removeWorktrees?: true;
|
|
644
|
+
cleanPlans?: true;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/** Which status group one preset shortcut selects. */
|
|
648
|
+
export declare const CLEANUP_PRESETS: readonly ['all', 'accepted', 'failed-cancelled'];
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Batch-select the selectable chains matching a preset, optionally restricted to the
|
|
652
|
+
* chain ids currently visible under the page's own filters.
|
|
653
|
+
* @param candidates - current candidates.
|
|
654
|
+
* @param preset - `all`, `accepted` (chains the host accepted) or `failed-cancelled`.
|
|
655
|
+
* @param visibleChainIds - optional set/array of chain ids the filter leaves visible.
|
|
656
|
+
* @returns the selection map, bounded to `MAX_CLEANUP_CHAINS`.
|
|
657
|
+
*/
|
|
658
|
+
export declare function selectCleanupCandidatesByPreset(
|
|
659
|
+
candidates: DelegateCleanupCandidate[],
|
|
660
|
+
preset?: 'all' | 'accepted' | 'failed-cancelled',
|
|
661
|
+
visibleChainIds?: Set<string> | string[] | null,
|
|
662
|
+
): Record<string, string[]>;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* The confirmation sentence drawn above the confirm button, before anything is sent.
|
|
666
|
+
* @param summary - the selection's chain/round counts.
|
|
667
|
+
* @param options - the linked cleanup choices currently ticked.
|
|
668
|
+
*/
|
|
669
|
+
export declare function cleanupConfirmText(
|
|
670
|
+
summary: { chains: number; rounds: number },
|
|
671
|
+
options?: DelegateCleanupOptions,
|
|
672
|
+
): string;
|
|
673
|
+
|
|
674
|
+
/** Plain-Chinese description of one completed orphan worktree/session sweep. */
|
|
675
|
+
export declare function describeOrphanCleanupOutcome(outcome: unknown): string;
|
|
609
676
|
|
|
610
677
|
/** Stable fingerprint of a selection, for change detection across refreshes. */
|
|
611
678
|
export declare function cleanupSelectionKey(
|
|
@@ -679,6 +746,10 @@ export interface DelegateClientModule {
|
|
|
679
746
|
cleanupOutcome: typeof cleanupOutcome;
|
|
680
747
|
describeCleanupOutcome: typeof describeCleanupOutcome;
|
|
681
748
|
cleanupWarningText: typeof cleanupWarningText;
|
|
749
|
+
/** Linked cleanup: preset shortcuts, confirmation text and the orphan sweep summary. */
|
|
750
|
+
selectCleanupCandidatesByPreset: typeof selectCleanupCandidatesByPreset;
|
|
751
|
+
cleanupConfirmText: typeof cleanupConfirmText;
|
|
752
|
+
describeOrphanCleanupOutcome: typeof describeOrphanCleanupOutcome;
|
|
682
753
|
/** Execution choices: the new-task Agent Teams default and its origin labels. */
|
|
683
754
|
executionOf: typeof executionOf;
|
|
684
755
|
AGENT_TEAMS_DEFAULT_FOR_NEW_TASKS: typeof AGENT_TEAMS_DEFAULT_FOR_NEW_TASKS;
|