@linxin666/dsh-client-ui-task-board-team 0.0.0-stage → 0.4.13

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 (65) hide show
  1. package/LICENSE +202 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +66 -2
  4. package/README.zh.md +67 -0
  5. package/cordis.patch.yml +14 -0
  6. package/icon.svg +3 -0
  7. package/lib/client.js +1117 -0
  8. package/lib/index.js +2968 -0
  9. package/lib/types/client/index.d.ts +58 -0
  10. package/lib/types/client/locales.d.ts +83 -0
  11. package/lib/types/client/optional-service.d.ts +22 -0
  12. package/lib/types/client/team/extension.d.ts +29 -0
  13. package/lib/types/client/team/sections.d.ts +38 -0
  14. package/lib/types/client/team/settings.d.ts +41 -0
  15. package/lib/types/client/team/summary.d.ts +34 -0
  16. package/lib/types/core/contract.d.ts +269 -0
  17. package/lib/types/core/hub-protocol.d.ts +175 -0
  18. package/lib/types/core/identity.d.ts +96 -0
  19. package/lib/types/core/mirror.d.ts +51 -0
  20. package/lib/types/core/question-report.d.ts +84 -0
  21. package/lib/types/core/settlement.d.ts +49 -0
  22. package/lib/types/core/task-record.d.ts +59 -0
  23. package/lib/types/core/timers.d.ts +20 -0
  24. package/lib/types/host/bindings.d.ts +92 -0
  25. package/lib/types/host/channel.d.ts +44 -0
  26. package/lib/types/host/credentials.d.ts +63 -0
  27. package/lib/types/host/extension.d.ts +57 -0
  28. package/lib/types/host/hub-client.d.ts +157 -0
  29. package/lib/types/host/questions.d.ts +105 -0
  30. package/lib/types/host/service.d.ts +209 -0
  31. package/lib/types/host/setup.d.ts +152 -0
  32. package/lib/types/host/tools.d.ts +19 -0
  33. package/lib/types/host/waterfall.d.ts +39 -0
  34. package/lib/types/index.d.ts +152 -0
  35. package/locale/en.json +6 -0
  36. package/locale/zh.json +6 -0
  37. package/package.json +83 -3
  38. package/src/client/css-modules.d.ts +5 -0
  39. package/src/client/index.ts +139 -0
  40. package/src/client/locales.ts +154 -0
  41. package/src/client/optional-service.ts +30 -0
  42. package/src/client/team/extension.ts +185 -0
  43. package/src/client/team/sections.tsx +159 -0
  44. package/src/client/team/settings.tsx +242 -0
  45. package/src/client/team/summary.ts +156 -0
  46. package/src/client/team/team.module.css +122 -0
  47. package/src/core/contract.ts +326 -0
  48. package/src/core/hub-protocol.ts +217 -0
  49. package/src/core/identity.ts +193 -0
  50. package/src/core/mirror.ts +88 -0
  51. package/src/core/question-report.ts +144 -0
  52. package/src/core/settlement.ts +84 -0
  53. package/src/core/task-record.ts +65 -0
  54. package/src/core/timers.ts +34 -0
  55. package/src/host/bindings.ts +211 -0
  56. package/src/host/channel.ts +97 -0
  57. package/src/host/credentials.ts +147 -0
  58. package/src/host/extension.ts +197 -0
  59. package/src/host/hub-client.ts +287 -0
  60. package/src/host/questions.ts +275 -0
  61. package/src/host/service.ts +1421 -0
  62. package/src/host/setup.ts +259 -0
  63. package/src/host/tools.ts +70 -0
  64. package/src/host/waterfall.ts +51 -0
  65. package/src/index.ts +452 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # node scripts/verify-docs.mjs --write <dir>
5
+ README.md: dcd1a5e5ffe66da82bd178eced7dbeb170fe8452
6
+ README.zh.md: df1834dd37c68b47b15d9e18bfec547ff6e95a72
package/README.md CHANGED
@@ -1,3 +1,67 @@
1
- # Temporary Holding Version
1
+ # dsh-task-board-team · Team collaboration provider for the DSH task board
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ English | [中文](README.zh.md)
4
+
5
+ An external provider extension for the DeepSeek Harness (DSH) task board (`@linxin666/dsh-client-ui-task-board`). It connects this machine to a cloud `team-hub`: issues the hub assigns to a dsh-agents member bound here are claimed under a lease, executed as mirror cards on this Host, and settled back to the hub, while decision questions, comments and review rejections travel between the team and the session that is doing the work. The board's columns, ledger and execution rules are untouched, and the plugin mounts through `cordis.patch.yml` and profiles without any DSH source change.
6
+
7
+ ## Features
8
+
9
+ - **Member bindings, not a shared queue**: the settings entry names dsh-agents member ids; the member definition supplies the name the hub resolves mentions by, the agent preset and the team workspace. An issue assigned to any other agent is never claimed here, even when the hub lists it.
10
+ - **Registration and heartbeat**: the Host registers at startup with its hostname, client version and agent definitions, then heartbeats every 15 s, which is the cadence the protocol fixes. A member name another Host already owns is skipped by the hub and reported as a visible problem instead of going missing silently.
11
+ - **Lease-based claiming**: a claim returns a lease token and an execution attempt id; the mirror card stores both in this extension's own `integrations` payload, and the lease is renewed every 20 s while the card executes.
12
+ - **Idempotent reconnect**: a reconnect re-registers, replays the channel from its last sequence number and re-claims with the attempt credentials the card still carries, which is only while the run executes here and the lease is held; a settled card releases both, so claiming that issue again is fresh and the hub mints the new attempt itself.
13
+ - **Settlement write-back**: a settled execution becomes `succeeded` (the issue moves to `in_review`) only when automated acceptance passed; a failure or a cancellation becomes `failed` with the recorded reason, and the summary is clipped to the protocol's 4000-character cap. Every write-back names the attempt that ran. A refusal that can never change — 412 `LEASE_EXPIRED`, or any other deterministic 4xx (with four exceptions) — is final: the Host drops the pending settlement instead of retrying it, clears the attempt and lease only when the refusal names the ones the card holds, and records a visible error; reporting a new outcome requires starting the card again. Anything that may still pass — a transport failure, a 5xx, and four 4xx exceptions (401: the Host Token is unrecognized or revoked, and can still land once the operator provides the right token; 408 and 429; and a 4xx without the hub's error envelope: such errors come from a CDN or firewall in front of the hub rather than the hub's own gates) — stays on the card, and the next sweep retries it before claiming that card, because a claim would mint an attempt nothing runs and the retry would then die against it.
14
+ - **Question routing**: a decision question asked through `ask_user_question` in a mirror card's session is reported to the hub and answered by the issue's reviewer; the answer, an expiry or a local cancellation ends the ask, and every other session on the machine keeps its own answerer.
15
+ - **Comments both ways**: the `team_comment` tool posts an agent comment on the issue behind a card, and a comment that mentions a bound agent is delivered into that card's session as a follow-up message.
16
+ - **Rework and retries**: a review rejection and a sweep share one claim per issue, and only a successful claim decides what runs — a pending rework re-runs the card in its existing session with the reviewer's instructions, and a card a human sent back with nothing running here is started again through the same entry a first claim uses. A refused claim starts nothing and records the refusal locally, and a fresh claim drops the settlement an earlier attempt left behind, because that attempt is gone and its retry can never land.
17
+ - **The run starts through the board's host face**: the provider contract has no "run" member, so a claimed card is started through the `taskBoard` host service's `apply` — the same in-process action seat the remote bridge drives the board with, and every run gate still applies.
18
+ - **Visible degradation**: follow-up delivery, rework and the execution trigger are probed at mount; a board revision that serves none of them loses that delivery, says so on the card and in the settings block, and keeps everything else working.
19
+ - **Three browser seats**: a task-detail section (issue, hub status including `in_review`, assignee, reviewer, comment thread, activity stream and open questions), a hub-status badge on the card, and a configuration block inside the board's own settings card that stays reachable while the extension is switched off.
20
+ - **One switch gates both halves**: turning the extension off stops the claim loop, the lease timers, the channel and the tool registration, drops the published summary and releases the rendering seats, without deleting a single card.
21
+
22
+ ## Install
23
+
24
+ Install this package into the profile and restart `dsh web`:
25
+
26
+ ```sh
27
+ dsh plugin --profile web add @linxin666/dsh-client-ui-task-board-team@latest
28
+ ```
29
+
30
+ ### Local development
31
+
32
+ ```sh
33
+ pnpm install
34
+ pnpm --filter @linxin666/dsh-client-ui-task-board-team build
35
+ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board-team
36
+ ```
37
+
38
+ ## Configure
39
+
40
+ Open the task board settings and find the **Team collaboration** block; it stores the hub URL and team id as this plugin's own volatile settings and sends a pasted Host Token to the host once.
41
+
42
+ - The Host Token is held in the harness credential store under `hostTokenRef` (default `DSH_TEAM_HUB_TOKEN`) or, failing that, in the environment variable of that name; no snapshot, summary or tool result carries its value.
43
+ - The member bindings are dsh-agents member ids (comma separated in the block). A binding that names a member the dsh-agents ledger no longer defines is reported in the block and skipped, and so is a member whose definition pins no agent preset: the hub requires a non-empty `preset_id`, and running such a member would silently fall back to the deployment default.
44
+
45
+ ```yaml
46
+ # profile patch equivalent
47
+ hubUrl: https://hub.example.com
48
+ teamId: team_01j7b5w8m4f9q2e3r6t1y8u4i5
49
+ hostTokenRef: DSH_TEAM_HUB_TOKEN
50
+ agents:
51
+ - memberId: mem_01j7b5w8m4f9q2e3r6t1y8u4i6
52
+ ```
53
+
54
+ ## Known limitations
55
+
56
+ - **A board that cannot pin the draft targets is refused, not guessed at**: the member's preset, model and reasoning effort travel with the `tasks.create` draft, and the created card is read back to confirm they survived. A board revision that drops them produces a mirror card that is left UNSTARTED with a visible note in the settings block, because running it under the deployment's default preset would not be the member's run.
57
+ - **Starting an execution needs the board's action seat**: the contract has no "run" capability, so the mount probes the board's in-process action applier and, when a deployment serves none, the claimed card is created for the operator to start instead.
58
+ - **The activity stream is what this Host observed**: `GET /issues/:id/activity` exists but only a member session may read it, and this Host authenticates with a Host Token, so the detail section renders the events this Host received over the channel since it started; the complete stream is in the Whale App.
59
+ - **Questions are reported one at a time**: a batch with several questions reports the first one and keeps the rest on this machine, because the hub's question schema stores a single question.
60
+ - **A claimed question holds the ask for two minutes**: after that window the ask returns to the local answerer and the hub question is withdrawn, so a team that never answers cannot stall a session for the hub's 24-hour TTL.
61
+
62
+ ## Security model
63
+
64
+ - **The Host Token never reaches the browser twice**: it is written once from the settings block into the credential store, read only by the host half, and reported afterwards as "configured" plus its source.
65
+ - **Tool permission approvals never enter the hub**: this provider subscribes to `user-questions/request` only; `approval/request` has no listener here, so a tool sandbox decision stays on this machine and never becomes a remote request.
66
+ - **Remote text is content, not authority**: an issue title, body or comment becomes card text, a summary field or a session message, and never a permission, a workspace identity, an agent preset or a `promptPrefix`.
67
+ - **Claims are bounded by the lease**: a claim that this machine cannot mirror or start is logged and left to expire, and the lease renews only while this Host still holds it.
package/README.zh.md ADDED
@@ -0,0 +1,67 @@
1
+ # dsh-task-board-team · DSH 任务看板的团队协作提供方
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 面向 DeepSeek Harness (DSH) 任务看板(`@linxin666/dsh-client-ui-task-board`)的外部提供方扩展。它把本机接入云端 `team-hub`:hub 上指派给本机绑定的 dsh-agents 成员的 issue 会在租约下被领取、作为镜像卡在本机执行,执行结束后写回 hub;决策问题、评论与返工请求则在团队与该执行会话之间往返。看板的列、账本与执行规则零改动,插件经 `cordis.patch.yml` 与 profile 挂载,不修改任何 DSH 源码。
6
+
7
+ ## 功能
8
+
9
+ - **按成员绑定,不是共享队列**:设置项填写 dsh-agents 成员 id,成员定义提供 hub 解析 @ 时使用的名字、Agent 预设与团队工作区。指派给其他 Agent 的 issue 即使被 hub 列出,本机也不会领取。
10
+ - **注册与心跳**:宿主启动时用主机名、客户端版本与 Agent 定义注册,随后每 15 秒心跳一次,这是协议固定的节奏。已被其他宿主占用的成员名由 hub 跳过,并作为可见问题列出,不会静默消失。
11
+ - **带租约的领取**:领取会拿到租约令牌与执行 attempt id,镜像卡把两者存在本扩展自己的 `integrations` 载荷里,卡片执行期间每 20 秒续租。
12
+ - **幂等的重连**:重连会重新注册、按最后收到的序号续传事件通道,并用卡片仍在的 attempt 凭证重新领取——这只发生在执行还在本机进行且仍持有租约时;结算之后的卡片两者都已释放,因此再次领取该 issue 是全新领取,新的 attempt 由 hub 生成。
13
+ - **结算写回**:只有自动验收通过的执行记为 `succeeded`(issue 进入 `in_review`),失败或取消记为 `failed` 并附原因,摘要截断到协议规定的 4000 字符。每次写回都带上产生结果的那次 attempt。永远无法改变结果的拒绝——412 `LEASE_EXPIRED` 或任何其他确定性的 4xx(但有四种例外)——属于终局:宿主丢弃待写回结算而不重试,仅当被拒的正是卡片当前那次 attempt 时才清掉 attempt 与租约凭据,并在卡片上记录一条可见错误;要报告新结果需重新启动该卡片。可能过去的失败——传输失败、5xx,以及四种 4xx 例外(401:Host Token 未被识别或已吊销,操作者换上正确的令牌后仍能送达;408 和 429;没有 hub 错误信封的 4xx:这类错误来自 hub 前面的 CDN 或防火墙,不是 hub 自身的门禁)——则留在卡片上,下一次轮询在领取该卡片之前先重试它,因为此时领卡只会拿到一个本机不执行的 attempt,随后的重试会被它判死。
14
+ - **问题路由**:镜像卡会话里通过 `ask_user_question` 提出的决策问题会上报 hub,由该 issue 的审阅人回答;回答、过期或本地取消都会结束提问,本机其他会话仍由各自的应答方处理。
15
+ - **双向评论**:`team_comment` 工具让 Agent 在卡片对应的 issue 上发表评论,而 @ 到本机 Agent 的评论会作为后续消息投递进该卡片的会话。
16
+ - **返工与重试**:审阅被拒与轮询共用同一个逐 issue 领取,只有领取成功才决定跑什么——待处理的返工用审阅人的说明在既有会话里重跑该卡片,而人工打回、本机没有在跑执行的卡片会经首次领取所用的同一入口重新启动。领取被拒则什么都不执行,只在本地记录这次拒绝;全新领取会丢弃上一轮 attempt 留下的待写回结算,因为那次 attempt 已被取代,它的重试永远落不了地。
17
+ - **运行通过 taskBoard 宿主服务面的 apply 启动**:提供方契约没有「运行」成员,因此领取到的卡片经 `taskBoard` 宿主服务的 `apply` 启动——与远程桥驱动看板的是同一个进程内动作面,运行门禁照旧全部生效。
18
+ - **可见的降级**:挂载时探测后续消息投递、返工与执行入口三项能力,缺少其中任何一项就失去对应的投递,并在卡片与设置区说明,其余功能照常工作。
19
+ - **三个浏览器席位**:任务详情区(issue、含 `in_review` 的 hub 状态、负责人、审阅人、评论线程、活动流与待答问题)、卡片上的 hub 状态徽标,以及看板自身设置卡内的配置区块——扩展关闭时该区块仍然可达。
20
+ - **一个开关同时收放两侧**:关闭扩展即停止领取轮询、租约定时器、事件通道与工具注册,清空已发布的摘要并撤下渲染席位,但不删除任何卡片。
21
+
22
+ ## 安装
23
+
24
+ 把本包装进 profile 后重启 `dsh web`:
25
+
26
+ ```sh
27
+ dsh plugin --profile web add @linxin666/dsh-client-ui-task-board-team@latest
28
+ ```
29
+
30
+ ### 本地开发
31
+
32
+ ```sh
33
+ pnpm install
34
+ pnpm --filter @linxin666/dsh-client-ui-task-board-team build
35
+ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board-team
36
+ ```
37
+
38
+ ## 配置
39
+
40
+ 打开任务看板设置,找到「团队协作」区块:hub 地址与团队 id 存在本插件自己的 volatile 设置里,粘贴的 Host Token 只向宿主发送一次。
41
+
42
+ - Host Token 保存在 harness 凭据库的 `hostTokenRef` 名下(默认 `DSH_TEAM_HUB_TOKEN`),没有凭据库时读同名环境变量;快照、摘要与工具结果都不携带它的值。
43
+ - 成员绑定是 dsh-agents 成员 id(区块内用逗号分隔)。绑定的成员已不在 dsh-agents 账本里时,区块会报出来并跳过它;成员定义没有钉住 Agent 预设时同样跳过——hub 要求 `preset_id` 非空,而跑这样的成员会静默退回部署默认预设。
44
+
45
+ ```yaml
46
+ # 对应的 profile patch 写法
47
+ hubUrl: https://hub.example.com
48
+ teamId: team_01j7b5w8m4f9q2e3r6t1y8u4i5
49
+ hostTokenRef: DSH_TEAM_HUB_TOKEN
50
+ agents:
51
+ - memberId: mem_01j7b5w8m4f9q2e3r6t1y8u4i6
52
+ ```
53
+
54
+ ## 已知限制
55
+
56
+ - **无法钉住建卡目标的看板会被拒绝,而不是被猜**:成员的预设、模型与思考档位随 `tasks.create` 草案一起下达,建卡后再读回卡片确认它们被保留。丢弃这些字段的看板版本会得到一张**不启动**的镜像卡,并在设置区给出可见提示——用部署默认预设跑它,就不是该成员的那次运行。
57
+ - **启动执行依赖看板的动作面**:契约没有「运行」能力,因此挂载时会探测看板的进程内动作应用器;部署不提供时,领取到的卡片被创建出来交由操作者自行启动。
58
+ - **活动流是本机观察到的事件**:`GET /issues/:id/activity` 存在,但只允许成员会话读取,而本宿主用 Host Token 认证,因此详情区渲染的是本宿主自启动以来从通道收到的事件;完整活动流在 Whale App 里看。
59
+ - **问题逐个上报**:一次提问携带多个问题时只上报第一个,其余留在本机,因为 hub 的问题表存储单个问题。
60
+ - **被认领的问题最多持有两分钟**:超过该窗口,提问交回本地应答方并从 hub 撤回,这样即使团队始终不回答,会话也不会被拖到 hub 的 24 小时 TTL。
61
+
62
+ ## 安全模型
63
+
64
+ - **Host Token 不会第二次到达浏览器**:它从设置区单向写入凭据库,只有宿主半区读取,之后只报告「已配置」与来源。
65
+ - **工具权限审批绝不进入 hub**:本提供方只订阅 `user-questions/request`,`approval/request` 在这里没有监听器,因此工具沙箱的决策留在本机,永远不会变成远端请求。
66
+ - **远端文本只是内容,不是权力**:issue 标题、正文或评论只会成为卡片文本、摘要字段或会话消息,绝不会变成权限、工作区身份、Agent 预设或 `promptPrefix`。
67
+ - **领取受租约约束**:本机无法镜像或无法启动的领取会被记录并任其过期,租约只在宿主仍持有它时续期。
@@ -0,0 +1,14 @@
1
+ # dsh-task-board-team bundle patch: inserts the team-hub provider extension row
2
+ # into the web profile roster. Applied as a profile bundle layer (the
3
+ # `dsh.bundle.patch` manifest field) over dsh-base; activate with
4
+ # `dsh plugin --profile <name> add link:<repo>/packages/dsh-task-board-team`.
5
+ #
6
+ # The row is a bare plugin by package name: the node half (exports ".") runs in
7
+ # the host process, and the `dsh.client` declaration in package.json makes the
8
+ # browser half (exports "./client") load in the web GUI. In the aggregate bundle
9
+ # this row is namespaced web-ui-task-board-team and must stay behind
10
+ # web-ui-task-board: the extension registers into the task board's provider
11
+ # surface, so the board has to be there first.
12
+ - insert:
13
+ - id: ui-task-board-team
14
+ name: '@linxin666/dsh-client-ui-task-board-team'
package/icon.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
+ <path fill="#4d6bfe" fill-rule="evenodd" d="M 67.5 120 L 70.5 120 L 72.5 121 L 80.5 129 L 81.5 129 L 84.5 132 L 85.5 132 L 90.5 136 L 93.5 137 L 95.5 139 L 101.5 142 L 103.5 142 L 106.5 144 L 111.5 145 L 112.5 146 L 115.5 146 L 119.5 148 Q 122.75 147.25 123.5 149 L 127.5 149 L 128.5 150 L 133.5 150 L 134.5 151 L 140.5 151 L 141.5 152 L 150.5 152 L 151.5 153 L 160.5 153 L 161.5 154 L 171.5 154 L 172.5 155 L 178.5 155 L 179.5 156 Q 183.5 155 184.5 157 L 189.5 157 Q 190.5 159 194.5 158 L 195.5 159 L 197.5 159 L 198.5 160 L 200.5 160 L 201.5 161 L 206.5 162 L 209.5 164 L 211.5 164 L 219.5 168 L 224.5 172 L 227.5 173 L 247 191.5 L 247 192.5 L 253 199.5 L 255.5 204 L 258 201.5 L 263 193.5 L 272.5 183 L 273.5 183 L 280.5 176 L 281.5 176 L 292.5 168 L 300.5 164 L 302.5 164 L 305.5 162 L 307.5 162 L 308.5 161 L 310.5 161 L 314.5 159 L 317.5 159 L 318.5 158 Q 321.75 158.75 322.5 157 L 326.5 157 L 327.5 156 L 331.5 156 L 332.5 155 L 337.5 155 L 338.5 154 L 348.5 154 L 349.5 153 L 358.5 153 L 359.5 152 L 368.5 152 L 369.5 151 L 376.5 151 L 377.5 150 L 383.5 150 L 384.5 149 L 388.5 149 L 389.5 148 L 392.5 148 L 393.5 147 L 396.5 147 L 397.5 146 L 399.5 146 L 400.5 145 L 405.5 144 L 423.5 135 L 426.5 132 L 431.5 129 L 439.5 121 L 441.5 120 L 444.5 120 L 448 123.5 L 448 140.5 L 447 141.5 L 447 149.5 L 446 150.5 L 446 154.5 L 445 155.5 Q 445.75 158.75 444 159.5 L 444 163.5 Q 442.25 164.25 443 167.5 L 440 173.5 L 439 178.5 L 435 185.5 L 435 187.5 L 432 193.5 L 430 195.5 L 429 198.5 L 427 200.5 L 425 204.5 L 419 211.5 L 419 212.5 L 402.5 229 L 401.5 229 L 394.5 235 L 393.5 235 L 388.5 239 L 385.5 240 L 383.5 242 L 371.5 248 L 369.5 248 L 364.5 251 L 362.5 251 L 361.5 252 L 359.5 252 L 358.5 253 L 356.5 253 L 355.5 254 L 353.5 254 L 349.5 256 L 342.5 257 L 338.5 259 L 335.5 259 L 334.5 260 L 327.5 261 L 326.5 262 L 324.5 262 L 323.5 263 L 321.5 263 L 320.5 264 L 318.5 264 L 317.5 265 L 312.5 266 L 309.5 268 L 307.5 268 L 295.5 275 L 288 282.5 Q 287.5 286 285 287.5 Q 285.5 290 284 290.5 L 284 293.5 L 283 294.5 L 283 311.5 L 284 312.5 L 284 318.5 L 285 319.5 L 285 323.5 L 286 324.5 L 286 328.5 Q 288 329.5 287 333.5 L 288 334.5 L 288 337.5 L 289 338.5 L 289 341.5 L 290 342.5 L 290 345.5 L 291 346.5 L 292 353.5 L 293 354.5 L 293 356.5 L 295 360.5 L 295 363.5 L 296 364.5 L 296 367.5 L 297 368.5 L 297 370.5 L 298 371.5 L 298 373.5 L 299 374.5 L 299 376.5 L 301 380.5 L 301 386.5 L 298.5 389 L 294.5 391 Q 292 390.5 291.5 392 L 286.5 392 L 285.5 393 L 272.5 393 L 271.5 394 L 240.5 394 L 239.5 393 L 227.5 393 L 226.5 392 L 221.5 392 Q 220.75 390.25 217.5 391 L 212 387.5 L 211 385.5 L 211 381.5 L 212 380.5 Q 211.5 378 213 377.5 L 213 374.5 L 214 373.5 L 214 371.5 L 216 367.5 L 216 364.5 L 217 363.5 L 217 361.5 L 219 357.5 L 219 354.5 L 221 350.5 L 221 347.5 L 222 346.5 L 222 343.5 L 223 342.5 L 223 339.5 L 224 338.5 L 224 335.5 L 225 334.5 Q 224.25 331.25 226 330.5 L 226 326.5 L 227 325.5 Q 226 321.5 228 320.5 L 228 315.5 L 229 314.5 L 229 292.5 L 228 291.5 L 227 286.5 L 225 284.5 L 223 280.5 L 219.5 277 L 218.5 277 L 212.5 272 L 202.5 267 L 200.5 267 L 197.5 265 L 194.5 265 L 193.5 264 L 191.5 264 L 190.5 263 L 188.5 263 L 184.5 261 L 181.5 261 L 180.5 260 L 173.5 259 L 172.5 258 L 170.5 258 L 166.5 256 L 159.5 255 L 158.5 254 L 156.5 254 L 155.5 253 L 150.5 252 L 147.5 250 L 145.5 250 L 142.5 248 L 140.5 248 L 128.5 242 L 123.5 238 L 120.5 237 L 109.5 228 L 108.5 228 L 95 214.5 L 95 213.5 L 87 204.5 L 84 198.5 L 82 196.5 L 80 191.5 L 77 187.5 L 77 185.5 L 72 175.5 L 72 173.5 L 71 172.5 L 71 170.5 L 69 166.5 L 69 163.5 L 68 162.5 Q 68.75 159.25 67 158.5 L 67 154.5 L 66 153.5 L 66 148.5 L 65 147.5 L 65 139.5 L 64 138.5 L 64 124.5 L 67.5 120 Z"/>
3
+ </svg>