dsh-taskbridge 1.7.1 → 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.
Files changed (84) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -21
  3. package/README.md +733 -877
  4. package/THIRD_PARTY_NOTICES.txt +23 -23
  5. package/antigravity/agents/dsh-taskbridge.md +32 -0
  6. package/antigravity/skills/dsh-taskbridge/SKILL.md +51 -0
  7. package/codex/dsh-taskbridge.toml +181 -631
  8. package/cordis.patch.yml +6 -6
  9. package/docs/INTRODUCTION.md +122 -295
  10. package/docs/INTRODUCTION.zh.md +134 -279
  11. package/docs/antigravity-integration.md +42 -0
  12. package/docs/auth-contract.md +138 -138
  13. package/docs/claude-code.md +6 -11
  14. package/docs/codex-integration.md +2 -2
  15. package/docs/contracts-stage-b.md +443 -443
  16. package/docs/conversation-placement.md +7 -6
  17. package/docs/plugin-market.md +30 -30
  18. package/docs/redaction-contract.md +170 -170
  19. package/docs/releases/1.7.0.zh.md +11 -11
  20. package/docs/releases/1.8.0.zh.md +16 -0
  21. package/docs/releases/1.8.1.zh.md +24 -0
  22. package/docs/runtime-compatibility.md +1 -1
  23. package/docs/taskbridge-upgrade.md +28 -28
  24. package/docs/taskdispatch-upgrade.md +25 -25
  25. package/docs/workspace-contract.md +538 -538
  26. package/docs/workspace-grouping.md +126 -126
  27. package/icon.svg +1 -1
  28. package/lib/client.d.ts +804 -699
  29. package/lib/client.js +7 -7
  30. package/locale/en.json +1 -1
  31. package/locale/zh.json +1 -1
  32. package/package.json +150 -144
  33. package/src/antigravity/installer.js +1068 -0
  34. package/src/antigravity/seam.js +142 -0
  35. package/src/auth/fence.js +361 -361
  36. package/src/auth/grants.js +789 -789
  37. package/src/client/api.js +266 -3
  38. package/src/client/index.jsx +224 -11
  39. package/src/client/sidebar.jsx +862 -862
  40. package/src/client/styles.js +624 -624
  41. package/src/client/task-cleanup.js +429 -304
  42. package/src/client/task-records-table.jsx +217 -217
  43. package/src/client/task-view.js +307 -307
  44. package/src/client/workspace-groups.js +482 -482
  45. package/src/client/workspaces-browser.jsx +770 -770
  46. package/src/codex/agent-ownership.js +270 -270
  47. package/src/codex/installer.js +6 -0
  48. package/src/codex/toml.js +784 -784
  49. package/src/config/defaults.js +11 -15
  50. package/src/config/redact.js +245 -245
  51. package/src/config/store.js +186 -186
  52. package/src/credentials/seam.js +202 -202
  53. package/src/http/respond.js +6 -5
  54. package/src/http/user-plane.js +83 -1
  55. package/src/index.js +25 -0
  56. package/src/jobs/diagnostics.js +15 -15
  57. package/src/jobs/engine.js +1 -0
  58. package/src/jobs/history.js +1 -1
  59. package/src/jobs/plan-store.js +1103 -1020
  60. package/src/jobs/record-cleanup.js +452 -7
  61. package/src/jobs/review-note.js +63 -63
  62. package/src/jobs/task-descriptions.js +82 -82
  63. package/src/jobs/task-display.js +73 -73
  64. package/src/jobs/task-tree.js +786 -786
  65. package/src/jobs/title.js +134 -134
  66. package/src/mcp/continuation.js +317 -317
  67. package/src/mcp/server.js +34 -27
  68. package/src/mcp/wait.js +34 -15
  69. package/src/model/connectivity.js +371 -371
  70. package/src/model/discovery.js +582 -582
  71. package/src/model/native-catalog.js +68 -68
  72. package/src/model/openai-adapter.js +671 -671
  73. package/src/model/probe.js +264 -264
  74. package/src/model/providers.js +756 -756
  75. package/src/model/routing.js +321 -321
  76. package/src/runtime/agent-runner.js +1 -0
  77. package/src/runtime/permissions.js +1619 -1619
  78. package/src/runtime/question-call.js +162 -162
  79. package/src/runtime/questions.js +909 -909
  80. package/src/runtime/session-placement.js +36 -1
  81. package/src/runtime/worker-prompt.js +61 -55
  82. package/src/workspace/audit.js +775 -775
  83. package/src/workspace/preflight.js +424 -424
  84. package/src/workspace/worktrees.js +833 -679
@@ -1,126 +1,126 @@
1
- # What the sidebar can do, and what it cannot (verified against the shipped host)
2
-
3
- This document replaces the earlier "grouped workspaces view" description. It states what the
4
- shipped DSH `0.2.2-rc.5` client actually publishes, what this plugin therefore does, and the
5
- interface gap that stops the requested arrangement from being built as asked.
6
-
7
- ## 1. The host contract, as read from the shipped client bundle
8
-
9
- `@deepseek-ai/dsh-client-ui-workspace` is the package that draws the sidebar's workspace area.
10
- Its registration, quoted from the bundle actually served by the desktop host (`plugins/??…/
11
- dsh-client-ui-workspace/client.js`, 205 kB):
12
-
13
- ```js
14
- ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register({
15
- name: 'sidebar.workspaces',
16
- children: {
17
- 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' },
18
- 'sidebar.workspaces.session.row.action': { kind: 'list', scope: 'root' },
19
- 'sidebar.session.row.leading': { kind: 'list', scope: 'root', inline: true },
20
- 'sidebar.session.row.trailing': { kind: 'list', scope: 'root', inline: true },
21
- 'sidebar.session.row.hover': { kind: 'list', scope: 'root' },
22
- },
23
- store: viewStore,
24
- inject: browserInjected,
25
- locale: NS,
26
- }, WorkspaceBrowser))
27
- ```
28
-
29
- The same bundle shows how the host itself uses the child slot:
30
-
31
- ```js
32
- ctx.slots.inject('sidebar.workspaces.session.row.action', function* () {
33
- yield ctx.slots.register({ name: '…session.row.action', id: 'archive', order: 100, … }, ArchiveSessionRowButton)
34
- yield ctx.slots.register({ name: '…session.row.action', id: 'pin', order: 200, … }, PinSessionRowButton)
35
- })
36
- ```
37
-
38
- Facts this establishes:
39
-
40
- | Fact | Consequence |
41
- | --- | --- |
42
- | `sidebar.workspaces` is a **single** slot: one entry renders, at priority `0`. | A registration there **replaces** the native rows. A sibling section *above* the browser inside the same cell is **not expressible**. That is why the earlier build made the native header and every `data-row-key` row disappear from an acceptance run. |
43
- | The entry publishes **child slots**, including `sidebar.workspaces.session.row.action` (`kind: 'list'`, `scope: 'root'`). | A plugin can add material **inside** each native session row. This is the supported seam, and it never replaces or reorders a native row. |
44
- | `workspaceController.create({ path })` registers/reuses **by path**, and no API names a parent Workspace. | One external shared directory cannot be given a second native Workspace, and a chain cannot be given a native TaskBridge parent. |
45
- | The native rows are the shipped component's own DOM (`data-row-key`, `[data-sidebar-workspace-header]`). | Filtering or hiding individual native rows from outside would mean patching the host's DOM, which this plugin does not do. |
46
-
47
- **Interface gap (stated, not worked around):** a vertically stacked "TaskBridge section above the
48
- native workspace list, in the same cell" needs either a second slot for that position or a
49
- published way to render the shipped browser from a foreign entry. Neither exists in `0.2.2-rc.5`.
50
-
51
- Minimal host extensions that would close it, in order of preference:
52
-
53
- 1. a sibling slot rendered **above** `sidebar.workspaces` (e.g. `sidebar.workspaces.before`), or
54
- 2. a documented row predicate/filter on the browser, if plugins are to suppress native rows, or
55
- 3. publishing the shipped `WorkspaceBrowser` component so a foreign entry can compose it.
56
-
57
- ## 2. What this plugin does instead
58
-
59
- 1. **The native workspace area is the host's.** `apply()` does **not** register on
60
- `sidebar.workspaces`. Every native Workspace keeps its name, order, search, session rows, and
61
- its open / new-session / rename / remove / archive / restore actions and menus — untouched,
62
- because the plugin draws none of them.
63
- 2. **Dispatched conversations are marked inside their own native row** through the published
64
- child slot `sidebar.workspaces.session.row.action`, as a list entry with id
65
- `dsh-taskbridge:dispatched` and `order: 900` — after the host's archive (100) and pin (200), so
66
- it never comes between the operator and a native control. The marker is one quiet inline word:
67
- `派工` for a shared run, `派工 · 隔离` for a worktree run, with the task title as its tooltip. A
68
- session this plugin did not dispatch renders **nothing**, so a native row is byte-identical.
69
- 3. **The grouping itself — TaskBridge → 任务工作区 → 对话 — is drawn on the plugin's own
70
- surfaces** (the TaskBridge content panel), where it can be complete and cannot disturb a native
71
- row. It is strictly three levels, one row per dispatched **chain**: two independent dispatches
72
- of one project are two task workspaces; a continuation keeps its parent's Workspace and Session
73
- and stays one row.
74
-
75
- ## 3. Ownership
76
-
77
- Proof, never appearance:
78
-
79
- | Question | Rule |
80
- | --- | --- |
81
- | Is this conversation TaskBridge's? | The durable map (`/session-map`) or the conversation's own task record names that exact **(session, workspace)** pair. A title alone never proves anything (it may *describe* a row, never claim one). |
82
- | Which project? | The recorded **source path**, canonicalised as `sessionPathKey` does — an external target's shared and worktree runs are one project; same-named directories elsewhere are two. |
83
- | Which task workspace? | The **chain**, resolved from the records' own `continueFromTaskId` links. |
84
- | What is never claimed? | Any Workspace whose conversations are not fully explained: empty, ordinary, the managed worktree root, or **mixed**. The native browser shows those. |
85
-
86
- A **mixed** Workspace (a dispatched conversation plus one the operator opened) appears in the
87
- grouping for its chain, but its node is marked `sharedWithOrdinary`: renaming or removing it would
88
- act on the operator's own conversation, so both are **refused with a stated reason** and the
89
- native row remains the place to manage it.
90
-
91
- ## 4. Actions
92
-
93
- | Row | Action | Call |
94
- | --- | --- | --- |
95
- | Conversation | open | `uiWorkspace.openSession(sessionId)` |
96
- | Conversation | archive | `workspaces.archiveSession(sessionId)` — the host's own protection (a running conversation) applies |
97
- | Archived conversation | restore | `workspaces.unarchiveSession(sessionId)` |
98
- | Task workspace | new conversation | `uiWorkspace.startSession(workspaceId)` |
99
- | Task workspace | rename | `workspaces.rename(workspaceId, title)` after the operator's text; refused when `sharedWithOrdinary` |
100
- | Task workspace | remove | `workspaces.delete(workspaceId)` after a confirmation; refused when `sharedWithOrdinary` |
101
-
102
- A TaskBridge or project row is a display node, never a Workspace record: it carries none of these.
103
-
104
- ## 5. Live behaviour
105
-
106
- * The marker and the grouping both subscribe to the host's own `workspaces.list`, so an archive, a
107
- restore or a new Workspace appears without a reload.
108
- * The durable map is read once per mount; a dispatch made afterwards is proven by its own task
109
- record, so a new chain is marked and grouped immediately.
110
- * Neither surface starts a read loop: the task panel and records page own that.
111
-
112
- ## 6. What is verified, and how
113
-
114
- | Claim | How |
115
- | --- | --- |
116
- | `apply` registers the child slot and never the parent | `tests/client.test.js`, `tests/workspaces-browser.test.js` (built bundle, fake ctx) |
117
- | The host really declares that child slot, as a list | quoted from the bundle the isolated desktop host serves (§1); the marker registers with matching `id`/`order` |
118
- | The marker appears only for dispatched sessions | `tests/workspaces-browser.test.js` (jsdom, real bundle) |
119
- | Strict three levels, one row per chain | `tests/workspace-groups.test.js`, `tests/workspaces-browser.test.js` |
120
- | A mixed Workspace is never renamed/removed as a whole | both files above |
121
- | The native area is not replaced | `apply` registers no parent entry; asserted in `tests/client.test.js` and `tests/entry.test.js` |
122
-
123
- Not verified by this work unit in a live desktop UI: the marker's exact position inside the host's
124
- own row (it depends on the host's row layout), and the grouping panel inside the real desktop
125
- window (the headless browser could not be launched in this environment — its mojo channel is
126
- denied by the sandbox). Both are asserted against the real bundle's contract and in jsdom.
1
+ # What the sidebar can do, and what it cannot (verified against the shipped host)
2
+
3
+ This document replaces the earlier "grouped workspaces view" description. It states what the
4
+ shipped DSH `0.2.2-rc.5` client actually publishes, what this plugin therefore does, and the
5
+ interface gap that stops the requested arrangement from being built as asked.
6
+
7
+ ## 1. The host contract, as read from the shipped client bundle
8
+
9
+ `@deepseek-ai/dsh-client-ui-workspace` is the package that draws the sidebar's workspace area.
10
+ Its registration, quoted from the bundle actually served by the desktop host (`plugins/??…/
11
+ dsh-client-ui-workspace/client.js`, 205 kB):
12
+
13
+ ```js
14
+ ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register({
15
+ name: 'sidebar.workspaces',
16
+ children: {
17
+ 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' },
18
+ 'sidebar.workspaces.session.row.action': { kind: 'list', scope: 'root' },
19
+ 'sidebar.session.row.leading': { kind: 'list', scope: 'root', inline: true },
20
+ 'sidebar.session.row.trailing': { kind: 'list', scope: 'root', inline: true },
21
+ 'sidebar.session.row.hover': { kind: 'list', scope: 'root' },
22
+ },
23
+ store: viewStore,
24
+ inject: browserInjected,
25
+ locale: NS,
26
+ }, WorkspaceBrowser))
27
+ ```
28
+
29
+ The same bundle shows how the host itself uses the child slot:
30
+
31
+ ```js
32
+ ctx.slots.inject('sidebar.workspaces.session.row.action', function* () {
33
+ yield ctx.slots.register({ name: '…session.row.action', id: 'archive', order: 100, … }, ArchiveSessionRowButton)
34
+ yield ctx.slots.register({ name: '…session.row.action', id: 'pin', order: 200, … }, PinSessionRowButton)
35
+ })
36
+ ```
37
+
38
+ Facts this establishes:
39
+
40
+ | Fact | Consequence |
41
+ | --- | --- |
42
+ | `sidebar.workspaces` is a **single** slot: one entry renders, at priority `0`. | A registration there **replaces** the native rows. A sibling section *above* the browser inside the same cell is **not expressible**. That is why the earlier build made the native header and every `data-row-key` row disappear from an acceptance run. |
43
+ | The entry publishes **child slots**, including `sidebar.workspaces.session.row.action` (`kind: 'list'`, `scope: 'root'`). | A plugin can add material **inside** each native session row. This is the supported seam, and it never replaces or reorders a native row. |
44
+ | `workspaceController.create({ path })` registers/reuses **by path**, and no API names a parent Workspace. | One external shared directory cannot be given a second native Workspace, and a chain cannot be given a native TaskBridge parent. |
45
+ | The native rows are the shipped component's own DOM (`data-row-key`, `[data-sidebar-workspace-header]`). | Filtering or hiding individual native rows from outside would mean patching the host's DOM, which this plugin does not do. |
46
+
47
+ **Interface gap (stated, not worked around):** a vertically stacked "TaskBridge section above the
48
+ native workspace list, in the same cell" needs either a second slot for that position or a
49
+ published way to render the shipped browser from a foreign entry. Neither exists in `0.2.2-rc.5`.
50
+
51
+ Minimal host extensions that would close it, in order of preference:
52
+
53
+ 1. a sibling slot rendered **above** `sidebar.workspaces` (e.g. `sidebar.workspaces.before`), or
54
+ 2. a documented row predicate/filter on the browser, if plugins are to suppress native rows, or
55
+ 3. publishing the shipped `WorkspaceBrowser` component so a foreign entry can compose it.
56
+
57
+ ## 2. What this plugin does instead
58
+
59
+ 1. **The native workspace area is the host's.** `apply()` does **not** register on
60
+ `sidebar.workspaces`. Every native Workspace keeps its name, order, search, session rows, and
61
+ its open / new-session / rename / remove / archive / restore actions and menus — untouched,
62
+ because the plugin draws none of them.
63
+ 2. **Dispatched conversations are marked inside their own native row** through the published
64
+ child slot `sidebar.workspaces.session.row.action`, as a list entry with id
65
+ `dsh-taskbridge:dispatched` and `order: 900` — after the host's archive (100) and pin (200), so
66
+ it never comes between the operator and a native control. The marker is one quiet inline word:
67
+ `派工` for a shared run, `派工 · 隔离` for a worktree run, with the task title as its tooltip. A
68
+ session this plugin did not dispatch renders **nothing**, so a native row is byte-identical.
69
+ 3. **The grouping itself — TaskBridge → 任务工作区 → 对话 — is drawn on the plugin's own
70
+ surfaces** (the TaskBridge content panel), where it can be complete and cannot disturb a native
71
+ row. It is strictly three levels, one row per dispatched **chain**: two independent dispatches
72
+ of one project are two task workspaces; a continuation keeps its parent's Workspace and Session
73
+ and stays one row.
74
+
75
+ ## 3. Ownership
76
+
77
+ Proof, never appearance:
78
+
79
+ | Question | Rule |
80
+ | --- | --- |
81
+ | Is this conversation TaskBridge's? | The durable map (`/session-map`) or the conversation's own task record names that exact **(session, workspace)** pair. A title alone never proves anything (it may *describe* a row, never claim one). |
82
+ | Which project? | The recorded **source path**, canonicalised as `sessionPathKey` does — an external target's shared and worktree runs are one project; same-named directories elsewhere are two. |
83
+ | Which task workspace? | The **chain**, resolved from the records' own `continueFromTaskId` links. |
84
+ | What is never claimed? | Any Workspace whose conversations are not fully explained: empty, ordinary, the managed worktree root, or **mixed**. The native browser shows those. |
85
+
86
+ A **mixed** Workspace (a dispatched conversation plus one the operator opened) appears in the
87
+ grouping for its chain, but its node is marked `sharedWithOrdinary`: renaming or removing it would
88
+ act on the operator's own conversation, so both are **refused with a stated reason** and the
89
+ native row remains the place to manage it.
90
+
91
+ ## 4. Actions
92
+
93
+ | Row | Action | Call |
94
+ | --- | --- | --- |
95
+ | Conversation | open | `uiWorkspace.openSession(sessionId)` |
96
+ | Conversation | archive | `workspaces.archiveSession(sessionId)` — the host's own protection (a running conversation) applies |
97
+ | Archived conversation | restore | `workspaces.unarchiveSession(sessionId)` |
98
+ | Task workspace | new conversation | `uiWorkspace.startSession(workspaceId)` |
99
+ | Task workspace | rename | `workspaces.rename(workspaceId, title)` after the operator's text; refused when `sharedWithOrdinary` |
100
+ | Task workspace | remove | `workspaces.delete(workspaceId)` after a confirmation; refused when `sharedWithOrdinary` |
101
+
102
+ A TaskBridge or project row is a display node, never a Workspace record: it carries none of these.
103
+
104
+ ## 5. Live behaviour
105
+
106
+ * The marker and the grouping both subscribe to the host's own `workspaces.list`, so an archive, a
107
+ restore or a new Workspace appears without a reload.
108
+ * The durable map is read once per mount; a dispatch made afterwards is proven by its own task
109
+ record, so a new chain is marked and grouped immediately.
110
+ * Neither surface starts a read loop: the task panel and records page own that.
111
+
112
+ ## 6. What is verified, and how
113
+
114
+ | Claim | How |
115
+ | --- | --- |
116
+ | `apply` registers the child slot and never the parent | `tests/client.test.js`, `tests/workspaces-browser.test.js` (built bundle, fake ctx) |
117
+ | The host really declares that child slot, as a list | quoted from the bundle the isolated desktop host serves (§1); the marker registers with matching `id`/`order` |
118
+ | The marker appears only for dispatched sessions | `tests/workspaces-browser.test.js` (jsdom, real bundle) |
119
+ | Strict three levels, one row per chain | `tests/workspace-groups.test.js`, `tests/workspaces-browser.test.js` |
120
+ | A mixed Workspace is never renamed/removed as a whole | both files above |
121
+ | The native area is not replaced | `apply` registers no parent entry; asserted in `tests/client.test.js` and `tests/entry.test.js` |
122
+
123
+ Not verified by this work unit in a live desktop UI: the marker's exact position inside the host's
124
+ own row (it depends on the host's row layout), and the grouping panel inside the real desktop
125
+ window (the headless browser could not be launched in this environment — its mojo channel is
126
+ denied by the sandbox). Both are asserted against the real bundle's contract and in jsdom.
package/icon.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><rect width="128" height="128" rx="28" fill="#14253b"/><path d="M30 43h58m-14-14 14 14-14 14M98 85H40m14-14L40 85l14 14" fill="none" stroke="#6dd6c5" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/><circle cx="29" cy="85" r="6" fill="#b9cfff"/><circle cx="99" cy="43" r="6" fill="#b9cfff"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><rect width="128" height="128" rx="28" fill="#14253b"/><path d="M30 43h58m-14-14 14 14-14 14M98 85H40m14-14L40 85l14 14" fill="none" stroke="#6dd6c5" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/><circle cx="29" cy="85" r="6" fill="#b9cfff"/><circle cx="99" cy="43" r="6" fill="#b9cfff"/></svg>