dsh-taskbridge 1.8.0 → 1.9.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +246 -231
  3. package/antigravity/agents/dsh-taskbridge.md +17 -14
  4. package/antigravity/skills/dsh-taskbridge/SKILL.md +40 -27
  5. package/bin/dsh-delegate-codex-agent.js +9 -4
  6. package/codex/skills/dsh-taskbridge/SKILL.md +131 -0
  7. package/codex/skills/dsh-taskbridge/rules-reference-96027c387cb9b7587efa4aa3836235d86db1108068e007dc08196e807ca25e5d.md +114 -0
  8. package/docs/INTRODUCTION.md +148 -119
  9. package/docs/INTRODUCTION.zh.md +151 -134
  10. package/docs/antigravity-integration.md +47 -42
  11. package/docs/assets/taskbridge-workflow.en.svg +72 -0
  12. package/docs/assets/taskbridge-workflow.zh.png +0 -0
  13. package/docs/claude-code.md +18 -18
  14. package/docs/codex-integration.md +139 -113
  15. package/docs/conversation-placement.md +7 -6
  16. package/docs/releases/1.8.0.zh.md +16 -16
  17. package/docs/releases/1.8.1.zh.md +24 -0
  18. package/docs/releases/1.9.0.zh.md +31 -0
  19. package/docs/runtime-compatibility.md +7 -9
  20. package/docs/silent-wait.md +17 -26
  21. package/docs/taskbridge-upgrade.md +4 -4
  22. package/lib/client.d.ts +74 -3
  23. package/lib/client.js +7 -7
  24. package/locale/en.json +7 -7
  25. package/locale/zh.json +7 -7
  26. package/package.json +11 -4
  27. package/src/antigravity/installer.js +1099 -1046
  28. package/src/antigravity/seam.js +142 -142
  29. package/src/client/api.js +258 -16
  30. package/src/client/index.jsx +130 -26
  31. package/src/client/task-cleanup.js +130 -5
  32. package/src/codex/agent-ownership.js +72 -12
  33. package/src/codex/installer.js +691 -268
  34. package/src/config/defaults.js +11 -15
  35. package/src/http/execution-plane.js +17 -0
  36. package/src/http/user-plane.js +17 -1
  37. package/src/index.d.ts +9 -1
  38. package/src/index.js +86 -64
  39. package/src/jobs/engine.js +279 -5
  40. package/src/jobs/history.js +18 -2
  41. package/src/jobs/plan-store.js +83 -0
  42. package/src/jobs/record-cleanup.js +714 -195
  43. package/src/mcp/server.js +271 -38
  44. package/src/mcp/wait.js +34 -15
  45. package/src/runtime/agent-runner.js +1 -0
  46. package/src/runtime/permissions.js +18 -0
  47. package/src/runtime/session-placement.js +36 -1
  48. package/src/runtime/worker-prompt.js +14 -9
  49. package/src/workspace/worktrees.js +155 -1
  50. package/codex/dsh-taskbridge.toml +0 -170
@@ -1,6 +1,6 @@
1
1
  # Codex integration contract
2
2
 
3
- Status: implemented in 1.8.0 (Antigravity integration added alongside Codex; Codex companion streamlined into a clean black-box contract while keeping full 1.7.1 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.
3
+ Status: implemented in 1.9.0 (Codex migrated from legacy subagent `agents/dsh-taskbridge.toml` to native skill `skills/dsh-taskbridge/SKILL.md`, with safe automatic retirement of untouched 0.1.6–1.8.x legacy subagents; 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
@@ -28,10 +28,38 @@ Review notes accept up to 8000 code points after trimming and are stored redacte
28
28
  See the [release notes](https://github.com/ranranyya/dsh-taskbridge/blob/master/docs/releases/1.4.1.zh.md) for validation boundaries.
29
29
 
30
30
  This document is the contract between the plugin's settings page (browser half),
31
- the host-side installer (`src/codex/installer.js`) and the two files it manages.
31
+ the host-side installer (`src/codex/installer.js`) and the skill files and MCP entry it manages.
32
32
  It is written so a reviewer can check the code against it without reading the
33
33
  README.
34
34
 
35
+ ## Native Codex Skill migration (1.9.0)
36
+
37
+ Starting in `1.9.0`, the managed Codex target is the native skill
38
+ `$CODEX_HOME/skills/dsh-taskbridge/SKILL.md` (with independent ownership digests in
39
+ `codex-skill-ownership`). Installing a native skill instead of a subagent allows the active
40
+ Codex session to read the workflow directly and drive one `delegate_submit` +
41
+ `delegate_wait` chain (using `tool_timeout_sec = 3660`) instead of wrapping dispatch in
42
+ `spawn_agent` + short-timeout `wait_agent` polling loops.
43
+
44
+ The generated entry carries the ordinary flow and links a same-directory rules reference for
45
+ multi-stage planning and uncommon events. Installation publishes the reference before switching
46
+ `SKILL.md`. Older references remain available to Codex sessions that already loaded a previous
47
+ entry. Startup restores a missing reference for an unchanged entry. An edited reference makes
48
+ both files operator-managed. Uninstall removes the unchanged active pair after proving ownership.
49
+
50
+ An explicit `install`, startup refresh, or `remove` inspects `$CODEX_HOME/agents/dsh-taskbridge.toml`
51
+ and `$CODEX_HOME/agents/dsh-delegate.toml` against both `KNOWN_AGENT_TEMPLATES` (`0.1.6`–`1.8.x`)
52
+ and historical `codex-agent-ownership` records. Untouched legacy managed subagent files are
53
+ unlinked ONLY after re-proving their exact bytes (and, on install/refresh, after confirming
54
+ `skills/dsh-taskbridge/SKILL.md` is ready). Any user-modified legacy file is preserved untouched
55
+ and surfaced via `LEGACY_AGENT_USER_MODIFIED`. Boundary checks cover `$CODEX_HOME`, `skills/`,
56
+ `skills/dsh-taskbridge/`, and `agents/`.
57
+
58
+ The action result's `changed` array reports `agent` for a write or removal of
59
+ `SKILL.md`, `legacyAgent` for removal of one or more managed legacy TOML files,
60
+ and `mcp` for a change to the MCP entry. An install that writes the skill and
61
+ retires a legacy file includes both `agent` and `legacyAgent`.
62
+
35
63
  ## TaskBridge companion migration (1.3.2)
36
64
 
37
65
  The public companion is now `dsh-taskbridge`, installed as
@@ -66,9 +94,9 @@ The goal is fixed at task creation. The completion summary exists only under `ho
66
94
 
67
95
  | Path | Owner | The plugin may | The plugin may never |
68
96
  | --- | --- | --- | --- |
69
- | `$CODEX_HOME/agents/dsh-taskbridge.toml` | managed copy of `codex/dsh-taskbridge.toml` | create it **exclusively** on explicit install when absent; refresh a byte-exact known build during plugin startup or explicit install; delete it on `remove` only after re-reading it and finding the same bytes it classified | overwrite or delete a file that is not that exact build — including a file with an old version line whose body was edited, and including a file that changed in the window between the status read and the write/removal |
97
+ | `$CODEX_HOME/skills/dsh-taskbridge/SKILL.md` | managed copy of `codex/skills/dsh-taskbridge/SKILL.md` | create it **exclusively** on explicit install (or legacy migration) when absent; refresh a byte-exact known build during plugin startup or explicit install; delete it on `remove` only after re-reading it and finding the same bytes it classified (and unlink untouched legacy `agents/dsh-taskbridge.toml` / `agents/dsh-delegate.toml` after re-proving their bytes) | overwrite or delete a file that is not that exact build — including a skill or legacy agent file whose body was edited, and including a file that changed in the window between the status read and the write/removal |
70
98
  | `$CODEX_HOME/config.toml`, table `mcp_servers.dsh-delegate` | operator, with one managed entry | add the entry when absent; update `command`/`args`/its own `env.DSH_DELEGATE_DISCOVERY_FILE` when the entry carries **the plugin marker** *and* is the exact shape this plugin writes; on an explicit `install`/`repair` only, adopt a recorded `args[0]` that is a PROVED real installation of this package (manifest `name` + `bin["dsh-delegate-mcp"]` mapping) | touch any other key, table, comment or ordering; adopt, update or delete an unmarked same-name entry, even one whose values coincide; adopt a differing script path from the automatic startup check |
71
- | `$CODEX_HOME` and `$CODEX_HOME/agents` | Codex | resolve and pin a normal root symlink/junction to its real directory; inspect the real root and agents directory; create missing agents (`0700`) | retarget or delete the root alias; follow a link in the agents subdirectory or final file; write through an unusable or unverified target |
99
+ | `$CODEX_HOME`, `$CODEX_HOME/skills`, `$CODEX_HOME/skills/dsh-taskbridge` and `$CODEX_HOME/agents` | Codex | resolve and pin a normal root symlink/junction to its real directory; inspect all 4 boundary levels in one batched Windows check; create missing `skills/dsh-taskbridge` (`0700`) on explicit install | retarget or delete the root alias; follow a link in `skills/`, `skills/dsh-taskbridge/`, `agents/` or the final file; write through an unusable or unverified target |
72
100
  | DSH local-call switch | operator | report it | change it |
73
101
 
74
102
  `$CODEX_HOME` resolution: `CODEX_HOME` when set and absolute; otherwise
@@ -78,16 +106,15 @@ nobody named.
78
106
 
79
107
  ### 1.1 Link boundaries
80
108
 
81
- `lstat` on the final file is not enough: if `$CODEX_HOME/agents` is a junction,
82
- `mkdir -p` and the file create walk *through* it and write
83
- `agents/dsh-taskbridge.toml` outside the Codex home entirely. Since 1.5.1 the selected HOME root is first pinned to its real directory; that real root and the agents subdirectory are then inspected as boundaries:
109
+ `lstat` on the final file is not enough: if `$CODEX_HOME/skills`, `$CODEX_HOME/skills/dsh-taskbridge`, or `$CODEX_HOME/agents` is a junction,
110
+ `mkdir -p` and the file create would walk *through* it and write outside the Codex home entirely. Since 1.5.1 the selected HOME root is first pinned to its real directory; since 1.9.0 that real root plus `skills/`, `skills/dsh-taskbridge/` and `agents/` are inspected together as boundaries:
84
111
 
85
- | `$CODEX_HOME` | `$CODEX_HOME/agents` | result |
112
+ | `$CODEX_HOME` | `skills/` · `skills/dsh-taskbridge/` · `agents/` | result |
86
113
  | --- | --- | --- |
87
- | real directory | missing | normal: install creates `agents` (`0700`) |
114
+ | real directory | missing | normal: explicit `install` creates `skills/dsh-taskbridge` (`0700`) |
88
115
  | real directory | real directory | normal |
89
- | real directory | link (symlink or junction) | `agent.state = conflict`, `reason = agents-dir-is-link`; install/repair/remove all refuse with `AGENT_PATH_CONFLICT` |
90
- | root symlink/junction with a real directory target | checked under the pinned real target | normal root alias; alias preserved, agents/file links still refused |
116
+ | real directory | link (symlink or junction) | `agent.state = conflict`, `reason = skills-dir-is-link` / `skill-dir-is-link` / `agents-dir-is-link`; install/repair/remove all refuse with `AGENT_PATH_CONFLICT` |
117
+ | root symlink/junction with a real directory target | checked under the pinned real target | normal root alias; alias preserved, subdirectory/file links still refused |
91
118
  | could not be verified | — | `agent.state = conflict`, `reason = boundary-unverified`; same refusal |
92
119
 
93
120
  A **junction** is the case `lstat` cannot see: Windows reports it as an ordinary
@@ -108,7 +135,7 @@ a temporary directory on Windows (and skips elsewhere), not only through the tes
108
135
  classifier hook.
109
136
 
110
137
  The status document reports this as `boundary: { blocked, link, unknown, home,
111
- agents }`. A **failed** verification is a refusal, not a pass: if the platform
138
+ skills, skillDir, agents }`. A **failed** verification is a refusal, not a pass: if the platform
112
139
  answer cannot be obtained (no spawnable shell, no PowerShell), the boundary is
113
140
  `unknown` and every action refuses, because "could not check" must never be read
114
141
  as "safe". The check is re-done at the start of every writing action from the
@@ -229,15 +256,15 @@ An `args[0]` that names `dsh-delegate-mcp.js` somewhere ELSE is a `conflict`
229
256
  (`args-shape-not-ours`) in a bare status read: the synchronous classifier cannot prove that
230
257
  a different path is this package, so it never labels one `outdated`. Only an explicit
231
258
  `install`/`repair` may adopt it, after the asynchronous proof below — and only with the
232
- config digest, the `$CODEX_HOME`/`agents` boundary and the current entry re-checked
259
+ config digest, the `$CODEX_HOME`/`skills`/`skills/dsh-taskbridge`/`agents` boundary and the current entry re-checked
233
260
  immediately before the write. A different script name, a different command or an extra
234
261
  argument stays `conflict` everywhere.
235
262
 
236
- When `$CODEX_HOME` or `$CODEX_HOME/agents` is a link (or cannot be verified), the MCP
237
- target is reported as `conflict` with `reason` `codex-home-is-link`,
238
- `agents-dir-is-link` or `boundary-unverified` — the same verdict the agent target gets.
263
+ When `$CODEX_HOME`, `$CODEX_HOME/skills`, `$CODEX_HOME/skills/dsh-taskbridge` or `$CODEX_HOME/agents` is a link (or cannot be verified), the MCP
264
+ target is reported as `conflict` with `reason` `codex-home-is-link`, `skills-dir-is-link`, `skill-dir-is-link`,
265
+ `agents-dir-is-link` or `boundary-unverified` — the same verdict the skill target gets.
239
266
  The entry is **not** read through the link, because a link bounds every write this
240
- module makes, not only the agent file.
267
+ module makes, not only the skill file.
241
268
 
242
269
  Two rules are deliberate:
243
270
 
@@ -347,11 +374,12 @@ rather than thrown at the operator.
347
374
 
348
375
  `refreshKnownAgentTemplate({ refreshMcp: true })` — reached through the seam as
349
376
  `refreshManagedIntegration({ startupTarget, backupDir })` and called once by plugin
350
- activation — performs two independent upgrades:
377
+ activation — checks the managed skill, legacy subagents and the MCP entry:
351
378
 
352
379
  | target | condition | write |
353
380
  | --- | --- | --- |
354
- | agent file | `outdated` (byte-exact published build) | replaced with this build's template |
381
+ | Codex skill | `outdated` (known template or matching ownership record) | replaced with this build's template |
382
+ | Legacy subagents | a `managed-legacy` file still matches the bytes read during inspection | installs the skill if absent, then retires the legacy file once the current or user-edited skill is present |
355
383
  | MCP entry | `outdated` **and** passing the write gate below | the owned values rewritten in place, in ONE atomic write |
356
384
 
357
385
  The automatic check only ever accepts THIS installation's exact entry point. The
@@ -387,10 +415,12 @@ because the proof is a filesystem one). There are exactly two accepted proofs:
387
415
  the same attribute read the boundary check uses);
388
416
  * `<root>/bin/dsh-delegate-mcp.js` is a regular, non-link file that IS the candidate
389
417
  (compared by `realpath`, so a link cannot smuggle in another program);
390
- * `<root>/package.json` is a regular, non-link file that BOTH declares
391
- `"name": "dsh-delegate"` AND maps `bin["dsh-delegate-mcp"]` to that very entry. A
418
+ * `<root>/package.json` is a regular, non-link file that declares one of this project's
419
+ own package names (`"dsh-taskbridge"`, `"dsh-taskdispatch"`, or `"dsh-delegate"`),
420
+ carries this project's GitHub repository provenance (`https://github.com/ranranyya/{dsh-taskbridge,dsh-taskdispatch,dsh-delegate}`),
421
+ AND maps `bin["dsh-delegate-mcp"]` to that very entry. A
392
422
  `./` prefix is allowed; an absolute path, a `..` segment, a trailing slash, a wrong
393
- mapping, a missing mapping or no `bin` object is refused.
423
+ mapping, a missing mapping, a foreign repository or no `bin` object is refused.
394
424
 
395
425
  The `<root>` is derived with the host's `dirname`/`basename` rules (`packageEntryRoot`), so
396
426
  a POSIX leading `/` is preserved: splitting on `/` and rejoining would turn
@@ -448,10 +478,10 @@ instead of writing. The original file is always left exactly as it was on any re
448
478
 
449
479
  * an absent entry stays absent — the plugin never creates `config.toml` or the table at
450
480
  startup, so an upgrade can never turn a non-installation into an installation, and the
451
- same is true of `agents/` and the agent file;
481
+ same is true of `skills/` when neither the skill nor a recognized legacy companion is present;
452
482
  * an unmarked entry, an operator-edited shape and any `conflict` are refused and left
453
483
  byte-identical (the outcome carries `MCP_ENTRY_CONFLICT` with the reason);
454
- * a link or unverifiable directory at `$CODEX_HOME` / `agents` is re-inspected immediately
484
+ * a link or unverifiable directory at `$CODEX_HOME` / `skills` / `skills/dsh-taskbridge` / `agents` is re-inspected immediately
455
485
  before the write and produces ONE `AGENT_PATH_CONFLICT` refusal for the whole check, even
456
486
  when the visible state shows nothing stale: an upgrade that cannot be proved safe must not
457
487
  look successful;
@@ -480,8 +510,8 @@ A REFUSED install records nothing, so a refusal cannot become the remembered tar
480
510
 
481
511
  In 1.5.1 the selected home root is pinned by the installer to its real target after this precedence resolution. A normal root symlink/junction is supported; an unresolvable or unverifiable target is refused. A missing home remains `no-codex-home`; a null startup target does not silently fall back to another tree. The root alias is preserved, and links below it in agents or the final files remain forbidden.
482
512
 
483
- The explicit 安装 / 更新 TaskBridge 智能体 button (action `install`) is unchanged and remains
484
- the way to *create* the two managed targets. `status` reports the drift (`mcp.drift`)
513
+ The explicit 「安装 / 更新 TaskBridge 技能」 button (action `install`) remains
514
+ the way to *create* the managed native skill (`skills/dsh-taskbridge/SKILL.md`) and MCP entry (and safely retire untouched legacy `agents/dsh-taskbridge.toml` / `agents/dsh-delegate.toml`). `status` reports the drift (`mcp.drift`)
485
515
  and, when an entry is `outdated`, a note naming exactly which owned facts are stale.
486
516
 
487
517
  ---
@@ -494,9 +524,9 @@ Reachable only through the authenticated user plane (section 4) or the CLI
494
524
  | action | writes | never writes |
495
525
  | --- | --- | --- |
496
526
  | `status` | nothing | anything |
497
- | `install` | agent file (absent / older managed build) + MCP entry (absent / `outdated`) | a user's agent file, a conflicting MCP entry, the DSH switch |
498
- | `repair` | the MCP entry only (absent / `outdated`), exactly as `install` would; plus the marker line for an `unmanaged-entry-exact` definition | the agent file: it is **not created, not refreshed and not deleted**, nor is `agents/` created; no owned value of an unmarked entry is ever rewritten |
499
- | `remove` | deletes only owned targets | a user's agent file, a conflicting entry |
527
+ | `install` | native skill `skills/dsh-taskbridge/SKILL.md` (absent / older managed build) + retires untouched legacy `.toml` subagents + MCP entry (absent / `outdated`) | a user-modified skill or legacy agent file, a conflicting MCP entry, the DSH switch |
528
+ | `repair` | the MCP entry only (absent / `outdated`), exactly as `install` would; plus the marker line for an `unmanaged-entry-exact` definition | the skill or legacy agent files: they are **not created, not refreshed and not deleted**, nor is `skills/` or `agents/` created; no owned value of an unmarked entry is ever rewritten |
529
+ | `remove` | deletes only owned skill, untouched legacy `.toml` files and owned MCP entry | a user-modified skill or legacy agent file, a conflicting entry |
500
530
 
501
531
  `install` is idempotent: a second run with nothing changed reports
502
532
  `changed: []` and does not rewrite either file.
@@ -528,10 +558,9 @@ The page's `init()` issues a `GET`; the three buttons are the only callers of th
528
558
 
529
559
  **The single write at plugin load is the integration refresh.** `apply()` calls the
530
560
  seam's `refreshManagedIntegration()` once — only when a Codex home directory exists — which
531
- refreshes `agents/dsh-taskbridge.toml` when its complete bytes equal one of the enumerated
532
- `KNOWN_AGENT_TEMPLATES` digests (section 5) **and** upgrades an already installed
561
+ refreshes `skills/dsh-taskbridge/SKILL.md` when its complete bytes match a known prior build or recorded digest (and migrates/retires untouched legacy `agents/dsh-taskbridge.toml` / `agents/dsh-delegate.toml` matching `KNOWN_AGENT_TEMPLATES` or `codex-agent-ownership`), **and** upgrades an already installed
533
562
  `mcp_servers.dsh-delegate` entry that is provably this plugin's and merely stale
534
- (section 2.4). Apart from migrating an existing recognized legacy companion to its new name in 1.3.2, it never creates a missing agent, never creates `agents/`, never creates
563
+ (section 2.4). It never performs a first-time install when neither the skill nor a recognized legacy companion is present, never creates
535
564
  the MCP entry, and never touches a `modified`/`conflict` file: everything else stays an
536
565
  explicit `install`. A refusal or failure is logged and startup continues, so a Codex
537
566
  problem cannot stop the plugin from loading.
@@ -562,12 +591,20 @@ successful diagnosis.
562
591
  ```jsonc
563
592
  {
564
593
  "codexHome": "…",
565
- "packageVersion": "1.8.0",
566
- "boundary": { "blocked": false, "link": null, "unknown": false, "home": "directory", "agents": "directory" },
567
- "agent": {
568
- "path": "…", "state": "installed", "installed": true, "managed": true,
594
+ "packageVersion": "1.9.0",
595
+ "boundary": {
596
+ "blocked": false, "link": null, "unknown": false,
597
+ "home": "directory", "skills": "directory", "skillDir": "directory", "agents": "directory"
598
+ },
599
+ "skill": {
600
+ "path": "…/skills/dsh-taskbridge/SKILL.md", "state": "installed", "installed": true, "managed": true,
569
601
  "reason": null, "expect": "<the exact bytes a refresh may replace>"
570
602
  },
603
+ "agent": {
604
+ "path": "…/skills/dsh-taskbridge/SKILL.md", "state": "installed", "installed": true, "managed": true,
605
+ "reason": null, "expect": "<compatibility alias of skill>"
606
+ },
607
+ "legacyAgents": { "state": "absent", "entries": [] },
571
608
  "mcp": {
572
609
  "path": "…", "exists": true, "serverName": "dsh-delegate",
573
610
  "state": "configured", "configured": true,
@@ -595,9 +632,9 @@ Boundary kinds: `directory`, `missing`, `link`, `other`, `unchecked` (for the le
595
632
  below a link, which is deliberately not inspected), and `unknown` when the platform
596
633
  answer could not be obtained.
597
634
 
598
- `boundary.blocked` is true when either directory is a link or could not be verified;
599
- `boundary.link` names the level (`codex-home` or `agents`) and is `null` otherwise.
600
- `agent.reason` carries `codex-home-is-link`, `agents-dir-is-link` or
635
+ `boundary.blocked` is true when any checked boundary directory is a link or could not be verified;
636
+ `boundary.link` names the level (`codex-home`, `skills`, `skillDir` or `agents`) and is `null` otherwise.
637
+ `agent.reason` carries `codex-home-is-link`, `skills-dir-is-link`, `skill-dir-is-link`, `agents-dir-is-link` or
601
638
  `boundary-unverified` in that case, so the page can say which boundary it refused.
602
639
 
603
640
  `agent.expect` and `mcp.marked` are the two ownership facts: `expect` is what a
@@ -609,9 +646,9 @@ when the entry carries the plugin marker (i.e. when a `remove` may delete it).
609
646
 
610
647
  ---
611
648
 
612
- ## 4.1 The preflight tool the agent depends on
649
+ ## 4.1 The preflight tool the skill depends on
613
650
 
614
- `delegate_preflight` is the fifth MCP tool and the only one that is not an
651
+ `delegate_preflight` is a strictly read-only MCP tool that is not an
615
652
  authorization at all: it is a read-only measurement of one workspace, added so a
616
653
  dispatcher learns *before* submitting that a checkout is dirty, is not a
617
654
  repository, or needs an isolation decision — instead of learning it from a job that
@@ -645,28 +682,27 @@ remain those selected in the plugin settings.
645
682
 
646
683
  ---
647
684
 
648
- ## 5. The agent file
685
+ ## 5. Skill ownership & historical legacy TOML identities
686
+
687
+ From `1.9.0`, the active shipped file is the Markdown skill `$CODEX_HOME/skills/dsh-taskbridge/SKILL.md`
688
+ (with `<!-- dsh-taskbridge-version: 1.9.0 -->` and its content-addressed `rules-reference-<sha256>.md`).
689
+ Earlier `0.1.6`–`1.8.x` releases shipped a custom-agent TOML file:
649
690
 
650
691
  ```toml
651
- version = "1.0.0" # stamped from package.json when written
692
+ version = "1.0.0" # stamped from package.json in 0.1.6–1.8.x legacy builds
652
693
  name = "dsh-delegate"
653
694
  description = "…"
654
695
  developer_instructions = """…"""
655
696
  ```
656
697
 
657
- The file is a custom-agent definition, not an MCP registration: it deliberately
658
- contains no `[mcp_servers.*]` table, because the agent inherits the parent Codex
659
- session's MCP tools, and a second definition would start a second server.
698
+ Neither the active `SKILL.md` nor the historical `.toml` files contain an `[mcp_servers.*]`
699
+ table, because the session/agent uses the parent Codex `config.toml` MCP registration, and a
700
+ second definition would start a second server.
660
701
 
661
702
  **Ownership is content identity, not a heuristic.** `readAgentState` reports:
662
703
 
663
- * `installed` — byte-identical to the file this build would write;
664
- * `outdated` — byte-identical to one of the enumerated `KNOWN_AGENT_TEMPLATES`
665
- digests (published builds only: `0.1.6`, both `0.1.7` builds, `0.1.8`, `0.1.9`,
666
- `0.1.10` in both its CRLF and LF byte forms, `0.1.11`, `0.1.12`, `0.1.13`, `0.1.14`,
667
- `1.0.0` and `1.1.0` in both byte forms, plus any later build listed when it is packed
668
- and verified) **or** byte-identical to a template this plugin recorded writing into THIS
669
- Codex home (section 5.0);
704
+ * `installed` — same text (admitting only `\r\n` vs `\n` line-terminator spelling, rejecting lone `\r`) as the `SKILL.md` this build renders, with an intact matching reference file;
705
+ * `outdated` — same text as one of the enumerated `KNOWN_SKILL_TEMPLATES` (`1.9.0` prereleases) or a recorded `codex-skill-ownership` digest for THIS Codex home (section 5.0); meanwhile `legacyAgents` classifies untouched `0.1.6`–`1.8.x` `.toml` files against `KNOWN_AGENT_TEMPLATES` and historical `codex-agent-ownership` records as `managed-legacy` for automatic retirement;
670
706
  * `modified`/`conflict` — everything else.
671
707
 
672
708
  Every release from `0.1.10` through `0.1.13` changes only the version line in the
@@ -723,22 +759,20 @@ digest was verified against `package/codex/dsh-delegate.toml` inside the packed
723
759
  `tests/fixtures/codex-agent-0.1.13.toml`, so the "unchanged `0.1.13` is refreshed" and
724
760
  "edited `0.1.13` is preserved" cases are both driven by real published bytes.
725
761
 
726
- **What the product does with line endings: nothing.** `readAgentState` and
727
- `refreshKnownAgent` read the file and hash it as it is; they never normalize CRLF to LF or
728
- the reverse, and never rewrite a file to change its endings. A digest taken over
729
- normalized text would not be an identity at all — it would let an edited file match a
730
- known build — so normalization is a defect, not a convenience. The earlier `0.1.10`
731
- entry `6583f08a…` was reported as a normalized digest; it is in fact the digest of the
732
- LF form of that release, which is why it is retained (not replaced) alongside the CRLF
733
- value. `tests/codex-integration.test.js` constructs both forms explicitly, pins each
734
- digest, and proves for each that a byte-exact file is refreshed while an edited one is
735
- refused.
762
+ **Line endings in classification vs. write/delete verification (`1.5.3+`).** Classification
763
+ (`sameAgentText` and `isKnownPriorTemplate`) folds `\r\n` to `\n` (while rejecting any leftover
764
+ lone `\r`, BOM, tab, trailing space, blank line or version edit) so uniform LF, uniform CRLF, and
765
+ mixed CRLF/LF spellings of the exact same published template are recognized without false conflicts;
766
+ new managed files are written in LF, and every overwrite or unlink still re-reads the file and
767
+ requires its exact raw bytes to match `expect`. Both LF and CRLF digests of historical releases
768
+ remain enumerated in `KNOWN_AGENT_TEMPLATES` / `KNOWN_SKILL_TEMPLATES` and pinned by
769
+ `tests/codex-integration.test.js` and `tests/codex-agent-line-endings.test.js`.
736
770
 
737
771
  A digest is added only for a build that was actually packed and verified, and the
738
772
  current template's digest is never in the list under an older label; the tests assert
739
773
  both facts (`tests/codex-integration.test.js`, `tests/package.test.js`).
740
774
 
741
- The 1.7.0 package recognizes these two earlier companion versions, each in both
775
+ The 1.7.0 package recognized these two earlier companion versions, each in both
742
776
  terminator spellings, and all four are exact identities like every entry above:
743
777
 
744
778
  | Release | Digest enumerated in `KNOWN_AGENT_TEMPLATES` |
@@ -748,11 +782,8 @@ terminator spellings, and all four are exact identities like every entry above:
748
782
  | `1.6.1-test.5` | `bf698c861e7e560c555f8350b711db88627dce4a8752b2cbebe8748b6d640d37` (the packed agent, LF) |
749
783
  | `1.6.1-test.5` | `a45e12d0b234e80854e69429518a2def2d00338f968c2ecfc689307b792e4426` (same file, CRLF) |
750
784
 
751
- Both carry the SAME instruction body — the one `codex/dsh-taskbridge.toml` still holds —
752
- and differ only in the stamped `version` line, which is exactly why each needs its own
753
- exact identity: without them an untouched `1.6.1` or `1.6.1-test.5` installation hashes to
754
- "unknown content" and is reported `modified`, i.e. "somebody else's file", which is the
755
- false conflict this package removes.
785
+ Both carried the SAME instruction body in the 1.6.1 sources and differed only in the
786
+ stamped `version` line, so enumerating both avoided false `modified` conflicts on upgrade.
756
787
 
757
788
  At plugin startup, an `outdated` agent is refreshed automatically only when its
758
789
  bytes still match a known shipped build. This does not create a missing agent or
@@ -777,9 +808,12 @@ table: after an **explicit `install`** or the startup **`refreshKnownAgentTempla
777
808
  the agent file, and only when the file it re-reads is exactly the template this build renders,
778
809
  the plugin stores the digest of those bytes.
779
810
 
780
- * Path: `<DSH_HOME>/data/dsh-delegate/codex-agent-ownership/<sha256 of the real home>.json` — one
811
+ * Path (1.9.0+ native skill): `<DSH_HOME>/data/dsh-delegate/codex-skill-ownership/<sha256 of the real home>.json` — one
781
812
  file per pinned Codex home, named by a digest of that home so no case equivalence is ever
782
- inferred and two homes can never collide.
813
+ inferred and two homes can never collide. Legacy `<DSH_HOME>/data/dsh-delegate/codex-agent-ownership/`
814
+ records remain readable so untouched pre-1.9.0 `.toml` subagents migrate cleanly.
815
+ * `npm run build:integrations` assembles `SKILL.md` and its rules reference from the shared
816
+ Layer 2 rules in `integrations/core/` through the Layer 1 Codex adapters.
783
817
  * Content: `{ "schemaVersion": 1, "codexHome": "<real home>", "templateLfSha256": "<64 hex>" }`.
784
818
  The digest is **LF-normalized** (the CRLF/LF spelling is not content, exactly as the table
785
819
  treats it), and it is the only digest. No template body, no `config.toml`, no model
@@ -818,9 +852,9 @@ The instructions must state all of the following. They are asserted in
818
852
  `tests/codex-integration.test.js` and `tests/package.test.js`, so an edit that drops
819
853
  one fails the build:
820
854
 
821
- 1. **Explicit assignment only.** Dispatch only when the parent request explicitly
822
- selects this agent (the exact mention `@dsh-taskbridge`, the agent picker, or an
823
- explicit instruction to delegate this implementation task to DSH).
855
+ 1. **Explicit assignment only.** Dispatch only when the user explicitly
856
+ selects this skill (`$dsh-taskbridge`) or explicitly asks to delegate a Git
857
+ repository code implementation or verification task to DSH / TaskBridge.
824
858
  2. **Mention is not dispatch.** Text that merely mentions DSH, DeepSeek,
825
859
  dsh-delegate, delegation or the agent while asking something else is not a
826
860
  dispatch request, and neither is a question about the plugin, its settings or
@@ -829,8 +863,8 @@ one fails the build:
829
863
  review-only, summarising and status questions are answered in Codex.
830
864
  4. **Ambiguity is a question.** If it is unclear whether the task was assigned, ask
831
865
  once instead of dispatching.
832
- 5. **Switch first, facts second.** Call `delegate_status` first; then call
833
- `delegate_preflight` with the exact authorized workspace path. If either fails,
866
+ 5. **Switch first, facts second.** Call `delegate_status` first (once per session); then call
867
+ `delegate_preflight` with the exact authorized workspace path (or pass `autoPreflight: true, wait: true` on `delegate_submit` for a normal single-repo dispatch, resuming via `delegate_wait` on `submitReceipt.taskId` if `submitted: true` returns with `waitError`). If either fails,
834
868
  the tool is missing, the switch is off, or the answer is ambiguous, stop and
835
869
  report the bounded refusal. Leave the switch as set and use only the authorized
836
870
  TaskBridge execution path.
@@ -882,10 +916,11 @@ one fails the build:
882
916
  handing it to the model, so normal progress never wakes Codex.
883
917
  The roughly 25-second internal observation cadence belongs to the program, not to the
884
918
  agent: it is not a polling rate the model should imitate.
885
- 10. **Each wait reason has a stated policy (1.1.0).**
886
- - `attention` — the run has been completely silent past the configured attention
887
- interval (ten minutes by default). It does **not** mean an ordinary wait ended: a
888
- wait ending is `wait-limit`. It is a QUESTION, not a verdict: read the compact
919
+ 10. **Each wait reason has a stated policy (1.1.0+; delivery interval 40 min default from 1.7.0).**
920
+ - `attention` — either the run progress check (no new result delivered back to the host for the
921
+ operator-configured progress-check interval — **40 minutes by default**, adjustable or
922
+ disableable) or a `repeated-tool-failure` reminder. It does **not** mean an ordinary wait
923
+ ended: a wait ending is `wait-limit`. It is a QUESTION, not a verdict: read the compact
889
924
  diagnostic (phase, last activity, current tool and its elapsed time, self-check
890
925
  verdict) and **default to waiting again** on the same task. Never cancel, never mark
891
926
  failed, and never resubmit merely because a task is quiet or one tool or test is
@@ -971,11 +1006,11 @@ one fails the build:
971
1006
  its exact `fingerprint`, passed to `delegate_permission_decide` with the `taskId`,
972
1007
  `requestId`, `decision` (`allow-once`/`reject`) and a bounded `reason`. An invalid or
973
1008
  stale allow grants nothing: re-read the current request and decide safely, and never
974
- retry under broader settings. Waiting the SAME task continues after the decision, a
975
- later request needs a fresh check, and an approval is one call only — never host
976
- acceptance and never a standing sandbox grant. When dispatching on behalf of a
977
- parent commander, the complete request evidence is preserved for that commander
978
- rather than involving a separate review model.
1009
+ retry under broader settings. Resume waiting on the same task after the decision.
1010
+ Each approval covers one call (`scope: "once"`). The release treats the preview
1011
+ value `scope: "task-command"` on an `allow-once` request as a single-call approval.
1012
+ Make a fresh decision for each subsequent approval request. When dispatching on
1013
+ behalf of a parent commander, preserve the complete request evidence for that commander.
979
1014
  14. **No local implementation while a delegated worker runs (1.1.0).** Neither the
980
1015
  dispatch companion nor the parent commander writes, patches or "just fixes" the
981
1016
  implementation while a delegated task is running, waiting, or awaiting review: that
@@ -994,8 +1029,8 @@ one fails the build:
994
1029
  by default; a directory-level reuse setting no longer exists. `continueFromTaskId`
995
1030
  is passed **only** for a follow-up change, correction or retry that belongs to one
996
1031
  earlier delegated task, and its value is the latest prior task id of that chain.
997
- An unrelated task, a new topic or a different workspace omits the field entirely:
998
- an id is never reused "to keep context" and never guessed. A follow-up to a
1032
+ An unrelated task, a new topic or a different workspace omits `continueFromTaskId` entirely:
1033
+ an id is never reused "to keep context" and never guessed. For a new dependent multi-stage subtask that starts a fresh DSH Session directly on an earlier accepted isolated worktree under the same source repository, pass `reuseWorktreeFromTaskId` instead (never combined with `continueFromTaskId`). A follow-up to a
999
1034
  `worktree` task keeps its original source `workspacePath` for preflight and
1000
1035
  submit; the plugin resolves the same internal tree and continues its earlier
1001
1036
  uncommitted changes there. Never send the tree's internal execution path as the
@@ -1005,25 +1040,16 @@ one fails the build:
1005
1040
  Corrections are consolidated into one follow-up submission rather than a scatter of
1006
1041
  new tasks.
1007
1042
 
1008
- ### 5.2 What the file cannot guarantee: `@` selection
1009
-
1010
- **This plugin does not claim that any Codex surface supports selecting the agent by
1011
- typing `@dsh-taskbridge`.** Only verified facts are stated:
1043
+ ### 5.2 Native Skill invocation (`$dsh-taskbridge`, 1.9.0+) vs. legacy `@` selection
1012
1044
 
1013
- * A custom-agent file at `$CODEX_HOME/agents/<name>.toml` is a Codex-recognised
1014
- definition, and the parent session's MCP tools are inherited by it — this is what
1015
- the installation relies on.
1016
- * Whether the *current* Codex Desktop / CLI input box offers an `@`-mention picker
1017
- for that file is a property of the Codex build, not of this plugin. No official
1018
- documentation or runtime evidence in this repository establishes it for the
1019
- versions under test, so the wording here (and in the settings page) says the
1020
- mention *may* select the agent, and claims no more.
1045
+ From `1.9.0`, TaskBridge installs a **native Codex Skill** at
1046
+ `$CODEX_HOME/skills/dsh-taskbridge/SKILL.md`. An explicit `$dsh-taskbridge` activation or request
1047
+ to delegate to DSH / TaskBridge loads the entry. The active Codex session calls `delegate_submit` + a single direct `delegate_wait` chain without spawning
1048
+ a `spawn_agent` / `wait_agent` polling wrapper.
1021
1049
 
1022
- Consequently the agent's own instructions treat `@dsh-taskbridge` as **one example**
1023
- of an explicit selection, alongside the agent picker and an explicit instruction to
1024
- delegate. If a Codex build does not offer `@` selection, the agent still works when
1025
- chosen through whatever selection mechanism that build does provide. A new Codex
1026
- session (or a restart) is required to load the new file and the new MCP entry.
1050
+ For pre-1.9.0 legacy subagent installations (`$CODEX_HOME/agents/dsh-taskbridge.toml`), this
1051
+ plugin never claimed `@dsh-taskbridge` picker support across all Codex builds. A new Codex session
1052
+ (or restart) is required after install or migration so Codex reloads the native skill and MCP entry.
1027
1053
 
1028
1054
  ---
1029
1055
 
@@ -1034,17 +1060,17 @@ session (or a restart) is required to load the new file and the new MCP entry.
1034
1060
  | `CODEX_HOME` relative | 400 `CODEX_HOME_INVALID`; nothing read or written |
1035
1061
  | `CODEX_HOME` unset | diagnosed against `~/.codex` |
1036
1062
  | `$CODEX_HOME` is a normal symlink or Windows junction | pin and verify its real directory target, preserve the root alias, then apply the same managed-content checks; broken or unverifiable targets are refused |
1037
- | `$CODEX_HOME/agents` is a symlink or a Windows junction | `conflict` (`agents-dir-is-link`); install/repair/remove refuse with `AGENT_PATH_CONFLICT` and no file is created outside the home |
1063
+ | `$CODEX_HOME/skills`, `skills/dsh-taskbridge`, or `agents` is a symlink or Windows junction | `conflict` (`skills-dir-is-link` / `skill-dir-is-link` / `agents-dir-is-link`); install/repair/remove refuse with `AGENT_PATH_CONFLICT` and no file is created outside the home |
1038
1064
  | an ordinary real Windows directory | `directory` in every spelling of the helper's boolean (`dir/False`, `dir/false`); never reported as a link |
1039
- | `repair` with the agent file missing or `outdated` | `changed: ["mcp"]` or `[]`; the agent file is not created and not refreshed, and `agents/` is not created |
1065
+ | `repair` with the skill file missing or `outdated` | `changed: ["mcp"]` or `[]`; the skill file is not created and not refreshed, and neither `skills/` nor `agents/` is created |
1040
1066
  | the boundary cannot be verified (no spawnable shell / no PowerShell) | `conflict` (`boundary-unverified`); everything refused, nothing assumed safe |
1041
- | agents dir missing | created on install (`0700`) when the boundary is clean |
1042
- | `agents/dsh-taskbridge.toml` is a symlink or a directory | `conflict`; untouched |
1043
- | a different agent file appears between status and install | `modified`; untouched (first install is exclusive) |
1044
- | an agent file is rewritten between the status read and `remove` | `AGENT_USER_MODIFIED` (`modified-before-removal`); the new bytes are kept |
1045
- | the agent path is replaced by a directory / a link before `remove` | `AGENT_PATH_CONFLICT`; the entry is left in place |
1046
- | an edited agent file with an old version line | `modified`; never refreshed, never removed |
1047
- | a byte-exact previously published agent file | `outdated`; refreshed on install, removed on remove |
1067
+ | `skills/dsh-taskbridge` dir missing | created on explicit `install` (`0700`) when the boundary is clean |
1068
+ | `skills/dsh-taskbridge/SKILL.md` is a symlink or a directory | `conflict`; untouched |
1069
+ | a different skill file appears between status and install | `modified`; untouched (first install is exclusive) |
1070
+ | a skill file is rewritten between the status read and `remove` | `AGENT_USER_MODIFIED` (`modified-before-removal`); the new bytes are kept |
1071
+ | the skill path is replaced by a directory / a link before `remove` | `AGENT_PATH_CONFLICT`; the entry is left in place |
1072
+ | an edited skill file with an old version comment | `modified` (`reason: edited` if body matches current template); never refreshed, never removed |
1073
+ | a byte-exact previously published skill or legacy `.toml` | `outdated` / `managed-legacy`; refreshed/migrated on install or startup refresh, removed on `remove` |
1048
1074
  | `config.toml` is a symlink | `unreadable`; refused |
1049
1075
  | `config.toml` > 1 MiB | refused (`other`), untouched |
1050
1076
  | `config.toml` contains a NUL / control character | `CODEX_CONFIG_UNSUPPORTED`, untouched |
@@ -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 through
27
- `workspaceController.rename({ workspaceId, title })`; an existing Workspace or
28
- an explicit follow-up retains its current name. Conflicting names receive a short
29
- task-id suffix. Naming needs no model call and does not change the execution
30
- directory, Git branch or task identity. Historical Workspaces are not renamed in
31
- bulk.
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
 
@@ -1,16 +1,16 @@
1
- # TaskBridge 1.8.0
2
-
3
- ## 核心更新
4
-
5
- - **新增 Antigravity 一键集成**:设置页新增独立「Antigravity 集成」标签页,可将自包含插件包安装至 `~/.gemini/config/plugins/dsh-taskbridge/`(内含 `plugin.json`、按需加载的 `SKILL.md`、仅保留只读与 MCP 工具的后台派工子智能体 `agents/dsh-taskbridge.md` 与独立 `mcp_config.json`),不修改 Antigravity 全局配置。支持安装/更新、仅修复 MCP、移除托管项与 DSH 启动自动刷新;按文件哈希逐文件保护自定义修改,不影响其余托管文件升级或补装。
6
- - **三层黑盒架构优化(Codex 端大幅瘦身)**:
7
- - 底层 `worker-prompt.js` 自动注入“共享或脏工作区保留已有未提交修改”与“测试读取后清理新建未追踪临时日志”约束。
8
- - 精简 `codex/dsh-taskbridge.toml`(移除顶层手管底层工作区与重复等待段落,篇幅缩减约 73%),保留完整 P0 规划、静默等待、单次审批、原生提问、派工回执核对(含 `agentTeamsOrigin` 与 `team.enabled`)、断线防重与检查点落盘纪律,并登记 `1.7.1` 原版哈希支持无感升级。
9
- - 去除顶层规则与设置页说明中对用户可配监控阈值(自检/运行进度检查分钟数)的硬编码,全部动态跟随 DSH 插件设置。
10
- - **润色中英文插件介绍与文档**:重写 `docs/INTRODUCTION.zh.md`、`docs/INTRODUCTION.md`、`README.md` 开头及 `locale/*.json`,新增 `docs/antigravity-integration.md`(含 Antigravity 首次调用 `delegate_*` 放行提示),统一同步 `1.7.0+` 实际监控计时口径与 2.0 Claude Code 接入规划。
11
- - **工程细节补齐**:补全 `ANTIGRAVITY_*` / `CODEX_*` 错误码映射与中文提示,对齐客户端导出面与 `lib/client.d.ts`。
12
-
13
- ## 安装与升级
14
-
15
- - 可通过 DSH **插件 → 添加插件** 安装 `dsh-taskbridge`,或下载下方 `dsh-taskbridge-1.8.0.tgz` 本地安装。
16
- - 从 `1.7.1` 升级时,DSH 启动后会自动刷新未修改过的 Codex 托管模板并保留自定义配置;如需接入 Antigravity,打开 **DSH TaskBridge 设置 → Antigravity 集成** 点击 **安装 / 更新 Antigravity 插件** 即可。
1
+ # TaskBridge 1.8.0
2
+
3
+ ## 核心更新
4
+
5
+ - **新增 Antigravity 一键集成**:设置页新增独立「Antigravity 集成」标签页,可将自包含插件包安装至 `~/.gemini/config/plugins/dsh-taskbridge/`(内含 `plugin.json`、按需加载的 `SKILL.md`、仅保留只读与 MCP 工具的后台派工子智能体 `agents/dsh-taskbridge.md` 与独立 `mcp_config.json`),不修改 Antigravity 全局配置。支持安装/更新、仅修复 MCP、移除托管项与 DSH 启动自动刷新;按文件哈希逐文件保护自定义修改,不影响其余托管文件升级或补装。
6
+ - **三层黑盒架构优化(Codex 端大幅瘦身)**:
7
+ - 底层 `worker-prompt.js` 自动注入“共享或脏工作区保留已有未提交修改”与“测试读取后清理新建未追踪临时日志”约束。
8
+ - 精简 `codex/dsh-taskbridge.toml`(移除顶层手管底层工作区与重复等待段落,篇幅缩减约 73%),保留完整 P0 规划、静默等待、单次审批、原生提问、派工回执核对(含 `agentTeamsOrigin` 与 `team.enabled`)、断线防重与检查点落盘纪律,并登记 `1.7.1` 原版哈希支持无感升级。
9
+ - 去除顶层规则与设置页说明中对用户可配监控阈值(自检/运行进度检查分钟数)的硬编码,全部动态跟随 DSH 插件设置。
10
+ - **润色中英文插件介绍与文档**:重写 `docs/INTRODUCTION.zh.md`、`docs/INTRODUCTION.md`、`README.md` 开头及 `locale/*.json`,新增 `docs/antigravity-integration.md`(含 Antigravity 首次调用 `delegate_*` 放行提示),统一同步 `1.7.0+` 实际监控计时口径与 2.0 Claude Code 接入规划。
11
+ - **工程细节补齐**:补全 `ANTIGRAVITY_*` / `CODEX_*` 错误码映射与中文提示,对齐客户端导出面与 `lib/client.d.ts`。
12
+
13
+ ## 安装与升级
14
+
15
+ - 可通过 DSH **插件 → 添加插件** 安装 `dsh-taskbridge`,或下载下方 `dsh-taskbridge-1.8.0.tgz` 本地安装。
16
+ - 从 `1.7.1` 升级时,DSH 启动后会自动刷新未修改过的 Codex 托管模板并保留自定义配置;如需接入 Antigravity,打开 **DSH TaskBridge 设置 → Antigravity 集成** 点击 **安装 / 更新 Antigravity 插件** 即可。
@@ -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 进程与最新子智能体配置。