@fish-under-sea/dsh-agent-teams-fish 1.0.2 → 2.0.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 (179) hide show
  1. package/NOTICE.md +13 -7
  2. package/README.en.md +20 -12
  3. package/README.md +20 -12
  4. package/compatibility.json +82 -46
  5. package/icon.png +0 -0
  6. package/lib/artifacts.js +148 -25
  7. package/lib/client/ActivityPanel.js +26 -5
  8. package/lib/client/WorkspaceActivity.js +6 -4
  9. package/lib/client/activity-monitor.js +113 -41
  10. package/lib/client/locales.js +14 -0
  11. package/lib/client.js +433 -199
  12. package/lib/client.js.map +1 -1
  13. package/lib/command.js +7 -4
  14. package/lib/git-artifact-stamp.json +2 -2
  15. package/lib/harness-compat.js +120 -62
  16. package/lib/index.js +7 -10
  17. package/lib/mailbox.js +15 -5
  18. package/lib/members.js +221 -154
  19. package/lib/snapshot.js +15 -10
  20. package/lib/state.js +41 -8
  21. package/lib/tools.js +123 -64
  22. package/lib/types/artifacts.d.ts +6 -3
  23. package/lib/types/client/activity-monitor.d.ts +13 -4
  24. package/lib/types/client/locales.d.ts +14 -0
  25. package/lib/types/harness-compat.d.ts +63 -16
  26. package/lib/types/mailbox.d.ts +2 -0
  27. package/lib/types/members.d.ts +5 -17
  28. package/lib/types/snapshot.d.ts +12 -7
  29. package/lib/types/state.d.ts +10 -3
  30. package/lib/types/types.d.ts +5 -0
  31. package/lib/types/web-routes.d.ts +2 -0
  32. package/lib/types/workspace-audit-service.d.ts +35 -0
  33. package/lib/types/workspace-audit-worker.d.ts +1 -0
  34. package/lib/web-routes.js +31 -0
  35. package/lib/workspace-audit-service.js +165 -0
  36. package/lib/workspace-audit-worker.js +11 -0
  37. package/lib/workspace-audit.js +6 -5
  38. package/locale/en.json +6 -0
  39. package/locale/zh.json +6 -0
  40. package/package.json +69 -64
  41. package/pnpm-workspace.yaml +306 -273
  42. package/release-notes/v0.1.25.md +16 -0
  43. package/release-notes/v0.1.26.md +19 -0
  44. package/release-notes/v0.1.27.md +42 -0
  45. package/release-notes/v0.1.28.md +45 -0
  46. package/release-notes/v0.1.29.md +23 -0
  47. package/release-notes/v1.1.0.md +42 -0
  48. package/release-notes/v2.0.0.md +17 -0
  49. package/scripts/artwork-role-match.test.mjs +517 -0
  50. package/scripts/capabilities.test.mjs +301 -0
  51. package/scripts/check-install-channel.mjs +55 -0
  52. package/scripts/check-install-channel.test.mjs +39 -0
  53. package/scripts/clean-build.mjs +14 -0
  54. package/scripts/client-harness-migration.test.mjs +46 -0
  55. package/scripts/compatibility.mjs +20 -0
  56. package/scripts/compatibility.test.mjs +187 -0
  57. package/scripts/corrupt-teamjson.test.mjs +180 -0
  58. package/scripts/custom-artwork.test.mjs +273 -0
  59. package/scripts/fallback-tdd.mjs +61 -0
  60. package/scripts/fixtures/harness-benchmark-scope.mjs +16 -0
  61. package/scripts/fixtures/harness-benchmark-scope.test.mjs +18 -0
  62. package/scripts/fixtures/harness-complex-case.mjs +201 -0
  63. package/scripts/fixtures/harness-complex-case.test.mjs +21 -0
  64. package/scripts/fixtures/harness-complex-oracle.mjs +63 -0
  65. package/scripts/fixtures/harness-issue-case.mjs +51 -0
  66. package/scripts/fixtures/harness-issue159-case.mjs +28 -0
  67. package/scripts/fixtures/harness-model-case.mjs +127 -0
  68. package/scripts/fixtures/harness-model-case.test.mjs +37 -0
  69. package/scripts/fixtures/harness-model-driver.mjs +100 -0
  70. package/scripts/fixtures/harness-runtime-credentials.mjs +23 -0
  71. package/scripts/fixtures/harness-runtime-entry.mjs +171 -0
  72. package/scripts/fixtures/harness-runtime-idle.mjs +42 -0
  73. package/scripts/fixtures/harness-runtime-llm.mjs +193 -0
  74. package/scripts/fixtures/harness-runtime-protocol.mjs +187 -0
  75. package/scripts/fixtures/harness-runtime-resume.mjs +24 -0
  76. package/scripts/fixtures/harness-runtime-stability.mjs +282 -0
  77. package/scripts/fixtures/harness-runtime-tools.mjs +13 -0
  78. package/scripts/fixtures/harness-runtime-web-approval.mjs +341 -0
  79. package/scripts/fixtures/issue-336-audit-worker.mjs +18 -0
  80. package/scripts/git-artifacts.mjs +64 -0
  81. package/scripts/git-artifacts.test.mjs +32 -0
  82. package/scripts/harness-compat-tdd.mjs +492 -0
  83. package/scripts/harness-issue-verify.mjs +26 -0
  84. package/scripts/harness-model-benchmark.mjs +163 -0
  85. package/scripts/harness-runtime-platform.test.mjs +31 -0
  86. package/scripts/harness-runtime-scenarios.mjs +297 -0
  87. package/scripts/harness-runtime-verify.mjs +169 -0
  88. package/scripts/harness-source-verify.mjs +211 -0
  89. package/scripts/harness-source-verify.test.mjs +97 -0
  90. package/scripts/harness-validation.mjs +68 -0
  91. package/scripts/harness-validation.test.mjs +95 -0
  92. package/scripts/http-body.test.mjs +72 -0
  93. package/scripts/import-vendor-artwork.mjs +78 -0
  94. package/scripts/inline-plan-blank-optional-tdd.mjs +121 -0
  95. package/scripts/issue-159.test.mjs +78 -0
  96. package/scripts/issue-188.test.mjs +148 -0
  97. package/scripts/issue-189.test.mjs +100 -0
  98. package/scripts/issue-203-card.test.mjs +181 -0
  99. package/scripts/issue-205.test.mjs +163 -0
  100. package/scripts/issue-234.test.mjs +424 -0
  101. package/scripts/issue-236-stale-module.test.mjs +63 -0
  102. package/scripts/issue-236.test.mjs +59 -0
  103. package/scripts/issue-262.test.mjs +98 -0
  104. package/scripts/issue-336.test.mjs +404 -0
  105. package/scripts/legacy-session-source-repair.test.mjs +201 -0
  106. package/scripts/lifecycle-verify.mjs +1573 -0
  107. package/scripts/lineage-identity.test.mjs +77 -0
  108. package/scripts/member-failure-tdd.mjs +451 -0
  109. package/scripts/member-spawn-recovery.test.mjs +92 -0
  110. package/scripts/quality-gates-amend.test.mjs +161 -0
  111. package/scripts/quality-gates-content-bound.test.mjs +572 -0
  112. package/scripts/quality-gates-cross-binding.test.mjs +184 -0
  113. package/scripts/quality-gates-excluded-scope.test.mjs +163 -0
  114. package/scripts/quality-gates-repair-scope.test.mjs +143 -0
  115. package/scripts/quality-gates-repair-wiring.test.mjs +189 -0
  116. package/scripts/quality-gates-tdd.mjs +1238 -0
  117. package/scripts/quality-gates-work-order.test.mjs +494 -0
  118. package/scripts/readme-version.mjs +89 -0
  119. package/scripts/readme-version.test.mjs +77 -0
  120. package/scripts/release-metadata.mjs +45 -0
  121. package/scripts/release-metadata.test.mjs +66 -0
  122. package/scripts/scoped-release.test.mjs +52 -0
  123. package/scripts/stability-tdd.mjs +144 -0
  124. package/scripts/stress-verify.mjs +548 -0
  125. package/scripts/symlink-support.mjs +46 -0
  126. package/scripts/sync-skill.mjs +103 -0
  127. package/scripts/tool-policies.test.mjs +280 -0
  128. package/scripts/update-skills.mjs +105 -0
  129. package/scripts/update-skills.test.mjs +79 -0
  130. package/scripts/upgrade-status.mjs +66 -0
  131. package/scripts/upgrade-status.test.mjs +83 -0
  132. package/scripts/verify-package.mjs +73 -0
  133. package/scripts/verify.mjs +2199 -0
  134. package/scripts/web-routes-verify.mjs +142 -0
  135. package/scripts/workspace-activity.test.mjs +346 -0
  136. package/scripts/workspace-summary.test.mjs +49 -0
  137. package/src/artifacts.ts +487 -0
  138. package/src/artwork-source.ts +262 -0
  139. package/src/capabilities.ts +113 -0
  140. package/src/client/ActivityPanel.module.css +2390 -0
  141. package/src/client/ActivityPanel.tsx +1507 -0
  142. package/src/client/AgentTeamsCard.module.css +148 -0
  143. package/src/client/AgentTeamsCard.tsx +155 -0
  144. package/src/client/StagingPlanEditor.tsx +829 -0
  145. package/src/client/TeamChatEntry.tsx +27 -0
  146. package/src/client/WorkspaceActivity.module.css +41 -0
  147. package/src/client/WorkspaceActivity.tsx +137 -0
  148. package/src/client/activity-model.ts +372 -0
  149. package/src/client/activity-monitor.ts +440 -0
  150. package/src/client/agent-teams-card-definition.ts +250 -0
  151. package/src/client/artwork.ts +374 -0
  152. package/src/client/icons.tsx +17 -0
  153. package/src/client/index.tsx +140 -0
  154. package/src/client/locales.ts +481 -0
  155. package/src/client/panel-geometry.ts +194 -0
  156. package/src/client/session-navigation.ts +73 -0
  157. package/src/client/workspace-state.ts +52 -0
  158. package/src/command.ts +145 -0
  159. package/src/css-modules.d.ts +4 -0
  160. package/src/event-types.ts +177 -0
  161. package/src/events.ts +78 -0
  162. package/src/harness-compat.ts +570 -0
  163. package/src/index.ts +599 -0
  164. package/src/lineage.ts +248 -0
  165. package/src/mailbox.ts +185 -0
  166. package/src/members.ts +1230 -0
  167. package/src/profiles.ts +765 -0
  168. package/src/quality-gates.ts +2124 -0
  169. package/src/scheduler.ts +554 -0
  170. package/src/snapshot.ts +333 -0
  171. package/src/state.ts +1317 -0
  172. package/src/tool-names.ts +14 -0
  173. package/src/tool-policies.ts +219 -0
  174. package/src/tools.ts +2939 -0
  175. package/src/types.ts +414 -0
  176. package/src/web-routes.ts +128 -0
  177. package/src/workspace-audit-service.ts +182 -0
  178. package/src/workspace-audit-worker.ts +12 -0
  179. package/src/workspace-audit.ts +57 -0
package/NOTICE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 来源与署名(NOTICE)
2
2
 
3
- 本仓库是 **dsh-agent-teams** 插件的**补充版(fork)**,**不是原创项目**。
3
+ 本包是 **dsh-agent-teams** 插件的**补充版(fork)**,**不是原创项目**。自 2.0.0 起作为 [Fish-under-sea/dsh-fish](https://github.com/Fish-under-sea/dsh-fish) 聚合仓库的工作区成员 `packages/dsh-agent-teams-fish` 维护与发布。
4
4
 
5
5
  ## 原始项目
6
6
 
@@ -13,9 +13,9 @@
13
13
  | 原仓库 | <https://github.com/NanmiCoder/dsh-agent-teams> |
14
14
  | npm 包名 | `@nanmicoder/dsh-agent-teams` |
15
15
  | 许可证 | **MIT** |
16
- | 本版基线 | 上游 tag **v0.1.22**(commit `9cba4fe`) |
16
+ | 本版基线 | 上游 tag **v0.1.29**(commit `369c278`) |
17
17
 
18
- ## 本版(Fish-under-sea/dsh-agent-teams-fish)做了什么
18
+ ## 本版(dsh-agent-teams-fish)做了什么
19
19
 
20
20
  只做**增量补充**,未改动上游的团队协作逻辑(花名册、任务 DAG、调度、质量门、信箱、面板主体交互):
21
21
 
@@ -31,14 +31,20 @@
31
31
  10. **第二轮厂商素材**(2026-10-08)—— 厂商命名空间 9 → 15,厂商素材 108 → 265 张;`audio` / `video` 两个此前只登记、未出图的岗位桶补齐(10 个厂商);`member-<vendor>-v2.png` 与高清立绘全套换成新的 15 张全身立绘。素材分两档:10 个厂商有「厂商 × 岗位」全套,`meta` / `mistral` / `rwkv` / `seed` / `ernie` 只有通用图与立绘
32
32
  11. **高清预览族**(2026-10-08,同一轮)—— 点开的小图/大图拆成两份:列表仍是 256×256 PNG,点击放大改用**去背后的原分辨率**画面(岗位/队长 1024×1024、厂商立绘长边 ≤2048),编成 WebP(质量 92、带 alpha)。宿主端为 `member-` / `team-lead-` 族加了按扩展名探测,所以客户端请求的 `.png` 名字能命中随包的 `.webp`;原先 512×512 的 PNG 立绘被高清 WebP 取代
33
33
 
34
+ ## 2.0.0:并入 dsh-fish 聚合仓库
35
+
36
+ - 源码、构建产物(`lib/`)、美术素材、脚本与技能整体并入 `packages/dsh-agent-teams-fish`,成为与其它成员同等的工作区子包;包名保持 `@fish-under-sea/dsh-agent-teams-fish`,版本随聚合统一为 **2.0.0**。上游基线仍是 v0.1.29(commit `369c278`),本轮不同步新的上游代码。
37
+ - `repository` / `homepage` / `bugs` 指向聚合仓库;新增聚合图标 `icon.png` 与插件清单元数据 `locale/zh.json`、`locale/en.json`(meta.title / meta.description)。
38
+ - `scripts/git-artifacts.mjs` 的构建门禁容忍包级 `pnpm-lock.yaml` 缺失(聚合仓库的锁文件在根目录);`pnpm-workspace.yaml` 保留为 `scripts/compatibility.mjs` 与 doctor 的兼容性策略清单。团队协作逻辑未改动。
39
+
34
40
  ## 原作者的权利
35
41
 
36
42
  - 插件全部功能与代码的著作权归**原作者**所有。
37
- - 本仓库**完整保留**上游 `LICENSE` 原文与版权声明,未做任何修改。
43
+ - 本包**完整保留**上游 `LICENSE` 原文与版权声明,未做任何修改。
38
44
  - 上游原始 README 完整保留为 [`README.original.md`](README.original.md) 与 [`README_ZH.original.md`](README_ZH.original.md),未做任何修改。
39
- - 上游 `CONTRIBUTING.md` 原样保留。
45
+ - 上游 `CONTRIBUTING.md` 不随聚合分发;开发流程以聚合仓库为准。
40
46
  - 本版新增代码同样以 **MIT** 发布;再分发时请保留本文件与上游署名。
41
- - `package.json` 只改身份字段:包名为本版的 **`dsh-agent-teams-fish`**(上游包名 `@nanmicoder/dsh-agent-teams` 属原作者,本版无法沿用),`repository` / `homepage` / `bugs` 指向本仓库;**版本 `0.1.22`、`author`、`license` 保持上游不变**。
47
+ - `package.json` 只改身份字段:包名为本版的 **`@fish-under-sea/dsh-agent-teams-fish`**(上游包名 `@nanmicoder/dsh-agent-teams` 属原作者,本版无法沿用),`repository` / `homepage` / `bugs` 指向聚合仓库 dsh-fish;**版本 `2.0.0` 随聚合统一,`author`、`license` 的署名关系保持上游不变**。
42
48
  - 包名牵动三处必须同步,否则插件加载失败:`package.json` 的 `name`、`cordis.patch.yml` 的插件行 `name`、客户端包 `lib/client.js` 的注册 `id`(不一致会报 `loaded without registering`)。
43
49
 
44
50
  ## 美术素材与商标
@@ -46,4 +52,4 @@
46
52
  - **0.3.1 起本仓库随包分发美术素材**:`assets/agent-teams/` 含厂商素材(岗位头像 + 点击放大的高清图 + 厂商通用头像/立绘 + 队长头像/高清 + 商标 SVG)。2026-10-08 第二轮后共 **265 张厂商素材 / 约 28.6 MB**(100 张岗位头像 PNG + 100 张岗位高清 WebP + 15 张厂商通用 PNG + 15 张厂商立绘高清 WebP + 10 张队长头像 PNG + 10 张队长高清 WebP + 15 个商标 SVG),加上上游自带的 15 张内置素材,共 **280 个文件**。
47
53
  - 角色图是各家角色的 **AI 二次创作**;商标 SVG 是在 simple-icons(`minimax` / `meta` / `mistralai`)与 LobeHub icons(`rwkv` / `bytedance` / `wenxin`)等图标集的单色 path 上按各厂商品牌色着色的**各厂商商标**。两者**版权均归各厂商所有**,随包分发**仅供个人学习与本地使用**。
48
54
  - 若你**商用或再分发**(包括把本包再发布到公共 registry、镜像站、或打包进商业产品),请自行评估并取得相应授权 —— 本仓库不代为授权。
49
- - 想整套换画风仍可用 `artworkDir` 目录覆盖随包素材,命名与降级规则见 [`README.md`](README.md) 的「配置」与「美术系统」。
55
+ - 想整套换画风仍可用 `artworkDir` 目录覆盖随包素材,命名与降级规则见 [`README.md`](README.md) 与 `src/artwork-source.ts`。
package/README.en.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # @fish-under-sea/dsh-agent-teams-fish
2
2
 
3
- **1.0.2 · Durable teams with Fish vendor artwork**
3
+ **2.0.0 · Upstream v0.1.29 synced · dsh-fish bundle member · Durable teams with Fish vendor artwork**
4
4
 
5
5
  [简体中文](README.md)
6
6
 
7
7
  ## Installation and Compatibility
8
8
 
9
+ Since 2.0.0 this package lives in the [Fish-under-sea/dsh-fish](https://github.com/Fish-under-sea/dsh-fish) bundle repository as the workspace member `packages/dsh-agent-teams-fish`, built, versioned and released together with the other members; the former standalone repository no longer evolves separately.
10
+
9
11
  ```sh
10
- dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@1.0.2
12
+ # Bundle install (recommended, includes every member)
13
+ dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.0.0
14
+
15
+ # Or install this member alone
16
+ dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.0.0
11
17
  ```
12
18
 
13
- Also included in `@fish-under-sea/dsh-fish@1.0.2`; do not mount twice. Restart DSH after installation. Requires Node `^22.19.0 || >=24`. Recommended Host: `0.2.0-rc.2`; `0.2.1-rc.2` is preview-supported. [compatibility.json](compatibility.json) is the exact support authority; desktop and core versions are distinct.
19
+ The bundle already includes this member; do not mount twice. Restart DSH after installation. Requires Node `>=24.9`. Recommended Host: `0.2.2-rc.1`; older targets such as `0.2.1-rc.2` and `0.2.1-alpha.2` remain supported. [compatibility.json](compatibility.json) is the exact support authority; desktop and core versions are distinct.
14
20
 
15
21
  ## Features
16
22
 
@@ -22,29 +28,31 @@ Also included in `@fish-under-sea/dsh-fish@1.0.2`; do not mount twice. Restart D
22
28
 
23
29
  ## Migration and Configuration
24
30
 
25
- The old unscoped npm name `dsh-agent-teams-fish` moves to this scope. Update direct dependencies, bundle names and profile override `name` values, keeping `id: agent-teams`; never load both sources. State defaults to workspace `.agent-teams`, memberProvider to `spawn`; artworkDir is machine-local. The rename does not change configuration fields or team data format.
31
+ The old unscoped npm name `dsh-agent-teams-fish` moves to this scope. Update direct dependencies, bundle names and profile override `name` values, keeping `id: agent-teams`; never load both sources. State defaults to workspace `.agent-teams`, memberProvider to `spawn`; artworkDir is machine-local. Neither the rename nor the repository merge changes configuration fields or the team data format.
26
32
 
27
33
  Back up securely first. Members consume real model quota. Tool policies are deployment-owned and cannot be bypassed by renaming. The plugin does not auto-repair logs, delete historical events or replay interrupted work; diagnose old corruption separately.
28
34
 
29
35
  ## Development Checks
30
36
 
31
- Run these commands manually as needed. GitHub verification is manual-only, never triggered by pushes, PRs or releases. Tag publishing uses committed build artifacts without the test matrix, and skips npm versions already published. The local `prepublishOnly` build/verification hook is removed; maintainers decide when to build and check. Runtime approvals and optional quality-task rules are unchanged.
37
+ Build artifacts under `lib/` are committed with the source, so publishing does not depend on a local build; `src/` and the build configuration are kept in full for rebuilds. Inside the bundle repository, run these commands manually as needed:
32
38
 
33
39
  ```sh
34
40
  pnpm install --frozen-lockfile
35
- pnpm typecheck
36
- pnpm build
37
- pnpm verify
41
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish typecheck
42
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish build
43
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish verify
38
44
  ```
39
45
 
40
- The `dsh-agent-teams-doctor` command inspects manifests and dependency closure only; it does not prove runtime behavior or identify the current process. Real Host and UI acceptance are separate.
46
+ Maintainers decide when to build and check before a release. Runtime approvals and optional quality-task rules are unchanged. The `dsh-agent-teams-doctor` command inspects manifests and dependency closure only; it does not prove runtime behavior or identify the current process. Real Host and UI acceptance are separate.
41
47
 
42
48
  ## Attribution and History
43
49
 
44
- Based on [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) (original author Relakkes / 程序员阿江). MIT. Upstream READMEs, NOTICE and release history are preserved. 1.0.2 coordinates identity and version; it does not claim the latest upstream HEAD is merged.
50
+ Based on [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) (original author Relakkes / 程序员阿江). MIT. Upstream READMEs, NOTICE and release history are preserved. The source baseline follows upstream tag v0.1.29 (commit 369c278); since 2.0.0 the package is vendored into the dsh-fish bundle repository and versioned with it.
45
51
 
52
+ - [2.0.0](release-notes/v2.0.0.md)
53
+ - [1.1.0](release-notes/v1.1.0.md)
46
54
  - [1.0.2](release-notes/v1.0.2.md)
47
55
  - [1.0.1](release-notes/v1.0.1.md)
48
56
  - [1.0.0](release-notes/v1.0.0.md)
49
- - [Historical notes](https://github.com/Fish-under-sea/dsh-agent-teams-fish/tree/main/release-notes)
50
- - [NOTICE](NOTICE.md)
57
+ - [Historical notes](https://github.com/Fish-under-sea/dsh-fish/tree/main/packages/dsh-agent-teams-fish/release-notes)
58
+ - [NOTICE](NOTICE.md)
package/README.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # @fish-under-sea/dsh-agent-teams-fish
2
2
 
3
- **1.0.2 · 持久团队协作与 Fish 厂商美术**
3
+ **2.0.0 · 同步上游 v0.1.29 · dsh-fish 聚合成员 · 持久团队协作与 Fish 厂商美术**
4
4
 
5
5
  [English](README.en.md)
6
6
 
7
7
  ## 安装与兼容
8
8
 
9
+ 自 2.0.0 起,本包并入 [Fish-under-sea/dsh-fish](https://github.com/Fish-under-sea/dsh-fish) 聚合仓库,作为工作区成员 `packages/dsh-agent-teams-fish` 与其它成员统一构建、统一版本、统一发布;原独立仓库不再单独演进。
10
+
9
11
  ```sh
10
- dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@1.0.2
12
+ # 聚合安装(推荐,含全部成员)
13
+ dsh plugin --profile <profile> add @fish-under-sea/dsh-fish@2.0.0
14
+
15
+ # 或单独安装本成员
16
+ dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@2.0.0
11
17
  ```
12
18
 
13
- 也由 `@fish-under-sea/dsh-fish@1.0.2` 提供,不要重复挂载。安装后重启 DSH。Node 要求 `^22.19.0 || >=24`。推荐宿主 `0.2.0-rc.2`;`0.2.1-rc.2` 为预览支持。精确支持列表以 [compatibility.json](compatibility.json) 为唯一事实源,不以桌面应用版本推断核心版本。
19
+ 聚合已包含本成员,不要重复挂载。安装后重启 DSH。Node 要求 `>=24.9`。推荐宿主 `0.2.2-rc.1`;`0.2.1-rc.2`、`0.2.1-alpha.2` 等旧版本仍在支持列表内。精确支持列表以 [compatibility.json](compatibility.json) 为唯一事实源,不以桌面应用版本推断核心版本。
14
20
 
15
21
  ## 功能
16
22
 
@@ -22,29 +28,31 @@ dsh plugin --profile <profile> add @fish-under-sea/dsh-agent-teams-fish@1.0.2
22
28
 
23
29
  ## 迁移与配置
24
30
 
25
- 旧 npm 名 `dsh-agent-teams-fish` 改为当前 scoped 名。更新直接依赖、bundle 名和覆盖行的 `name`,保留 `id: agent-teams`;不要同时加载两个来源。状态目录默认是工作区 `.agent-teams`,memberProvider 默认 `spawn`,自定义 artworkDir 使用本机路径。配置字段与团队数据格式不因本次包名整理改变。
31
+ 旧 npm 名 `dsh-agent-teams-fish` 改为当前 scoped 名。更新直接依赖、bundle 名和覆盖行的 `name`,保留 `id: agent-teams`;不要同时加载两个来源。状态目录默认是工作区 `.agent-teams`,memberProvider 默认 `spawn`,自定义 artworkDir 使用本机路径。配置字段与团队数据格式不因包名整理或本次并入聚合仓库而改变。
26
32
 
27
33
  先安全备份再迁移。成员使用真实模型额度;工具策略由部署方声明,不能以改名绕过。不会自动修复损坏日志、删除历史事件或重发中断任务。旧会话损坏应独立诊断。
28
34
 
29
35
  ## 开发检查
30
36
 
31
- 以下命令按需手动执行。GitHub 验证仅保留手动触发,不再由 push、PR 或发布触发;标签发布直接使用已提交的构建产物,不依赖测试矩阵。已存在的 npm 版本跳过重复发布。本地 `prepublishOnly` 自动构建和验证钩子已移除,发布前是否构建与检查由维护者决定。插件运行时的权限确认与可选质量任务规则不变。
37
+ 构建产物 `lib/` 已随源码提交,发布不依赖本地构建;`src/` 与构建配置完整保留,可随时重建。在聚合仓库中按需手动执行:
32
38
 
33
39
  ```sh
34
40
  pnpm install --frozen-lockfile
35
- pnpm typecheck
36
- pnpm build
37
- pnpm verify
41
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish typecheck
42
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish build
43
+ pnpm --filter @fish-under-sea/dsh-agent-teams-fish verify
38
44
  ```
39
45
 
40
- 诊断器 `dsh-agent-teams-doctor` 只检查清单和依赖闭包,不证明运行行为或识别当前进程。真实宿主验收与 UI 检查需要另行执行。
46
+ 发布前是否构建与检查由维护者决定。插件运行时的权限确认与可选质量任务规则不变。诊断器 `dsh-agent-teams-doctor` 只检查清单和依赖闭包,不证明运行行为或识别当前进程。真实宿主验收与 UI 检查需要另行执行。
41
47
 
42
48
  ## 来源与记录
43
49
 
44
- 基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams) (原作者 Relakkes / 程序员阿江). MIT. 保留上游 README、NOTICE 和历史发布说明。1.0.2 统一包名与版本,不表示已合并上游最新 HEAD。
50
+ 基于 [NanmiCoder/dsh-agent-teams](https://github.com/NanmiCoder/dsh-agent-teams)(原作者 Relakkes / 程序员阿江)。MIT。保留上游 README、NOTICE 和历史发布说明。源码基线为上游 tag v0.1.29(commit 369c278);自 2.0.0 起并入 dsh-fish 聚合仓库,版本随聚合统一。
45
51
 
52
+ - [2.0.0](release-notes/v2.0.0.md)
53
+ - [1.1.0](release-notes/v1.1.0.md)
46
54
  - [1.0.2](release-notes/v1.0.2.md)
47
55
  - [1.0.1](release-notes/v1.0.1.md)
48
56
  - [1.0.0](release-notes/v1.0.0.md)
49
- - [历史记录](https://github.com/Fish-under-sea/dsh-agent-teams-fish/tree/main/release-notes)
50
- - [NOTICE](NOTICE.md)
57
+ - [历史记录](https://github.com/Fish-under-sea/dsh-fish/tree/main/packages/dsh-agent-teams-fish/release-notes)
58
+ - [NOTICE](NOTICE.md)
@@ -1,47 +1,83 @@
1
- {
2
- "schemaVersion": 1,
3
- "recommendedHost": "0.2.0-rc.2",
4
- "previewTag": "next",
5
- "supportedHosts": [
6
- {
7
- "version": "0.2.0-rc.2",
8
- "track": "recommended"
9
- },
10
- {
11
- "version": "0.2.1-rc.2",
12
- "track": "preview"
13
- },
14
- {
15
- "version": "0.2.1-alpha.2",
16
- "track": "preview"
17
- },
18
- {
19
- "version": "0.1.7-rc.2",
20
- "track": "legacy"
21
- },
22
- {
23
- "version": "0.1.5-rc.3",
24
- "track": "legacy"
25
- },
26
- {
27
- "version": "0.1.5-rc.2",
28
- "track": "legacy"
29
- },
30
- {
31
- "version": "0.1.5-rc.1",
32
- "track": "legacy"
33
- },
34
- {
35
- "version": "0.1.2-rc.1",
36
- "track": "legacy"
37
- },
38
- {
39
- "version": "0.1.2-alpha.5",
40
- "track": "preview"
41
- },
42
- {
43
- "version": "0.1.2-alpha.2",
44
- "track": "legacy"
45
- }
46
- ]
1
+ {
2
+ "schemaVersion": 1,
3
+ "recommendedHost": "0.2.2-rc.1",
4
+ "previewTag": "next",
5
+ "supportedHosts": [
6
+ {
7
+ "version": "0.2.2-rc.1",
8
+ "track": "recommended"
9
+ },
10
+ {
11
+ "version": "0.2.1-rc.2",
12
+ "track": "preview"
13
+ },
14
+ {
15
+ "version": "0.2.1-alpha.2",
16
+ "track": "preview"
17
+ },
18
+ {
19
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
20
+ "version": "0.1.7-rc.2",
21
+ "track": "legacy",
22
+ "platforms": [
23
+ "ubuntu-latest"
24
+ ]
25
+ },
26
+ {
27
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
28
+ "version": "0.1.5-rc.3",
29
+ "track": "legacy",
30
+ "platforms": [
31
+ "ubuntu-latest"
32
+ ]
33
+ },
34
+ {
35
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
36
+ "version": "0.1.5-rc.2",
37
+ "track": "legacy",
38
+ "platforms": [
39
+ "ubuntu-latest"
40
+ ]
41
+ },
42
+ {
43
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
44
+ "version": "0.1.5-rc.1",
45
+ "track": "legacy",
46
+ "platforms": [
47
+ "ubuntu-latest"
48
+ ]
49
+ },
50
+ {
51
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
52
+ "version": "0.1.2-rc.1",
53
+ "track": "legacy",
54
+ "platforms": [
55
+ "ubuntu-latest"
56
+ ]
57
+ },
58
+ {
59
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
60
+ "version": "0.1.2-alpha.5",
61
+ "track": "preview",
62
+ "platforms": [
63
+ "ubuntu-latest"
64
+ ]
65
+ },
66
+ {
67
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
68
+ "version": "0.2.0-rc.2",
69
+ "track": "legacy",
70
+ "platforms": [
71
+ "ubuntu-latest"
72
+ ]
73
+ },
74
+ {
75
+ "legacyDirectInstallReason": "Historical direct-fixture coverage only; native plugin-manager installation has not been qualified for this target.",
76
+ "version": "0.1.2-alpha.2",
77
+ "track": "legacy",
78
+ "platforms": [
79
+ "ubuntu-latest"
80
+ ]
81
+ }
82
+ ]
47
83
  }
package/icon.png ADDED
Binary file
package/lib/artifacts.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * @module dsh-agent-teams/artifacts
26
26
  */
27
27
  import { createHash } from 'node:crypto';
28
- import { closeSync, lstatSync, openSync, readSync, readdirSync, realpathSync, statSync } from 'node:fs';
28
+ import { closeSync, fstatSync, lstatSync, openSync, readSync, readdirSync, realpathSync, statSync } from 'node:fs';
29
29
  import { isAbsolute, join, relative, sep } from 'node:path';
30
30
  import { isDefaultExcludedPath, normalizeWorkspacePath } from "./quality-gates.js";
31
31
  /**
@@ -74,14 +74,36 @@ function resolvesInside(root, absolute) {
74
74
  * memory: a multi-gigabyte file would otherwise stall the host process.
75
75
  */
76
76
  const HASH_CHUNK_BYTES = 64 * 1024;
77
+ // These stamps only invalidate a read made in this audit. Matching timestamps
78
+ // never replace hashing, and no stamp/digest is reused by a later audit.
79
+ function fileVersion(stats) {
80
+ return [stats.dev, stats.ino, stats.mode, stats.size, stats.mtimeNs, stats.ctimeNs].join(':');
81
+ }
82
+ function changedDuringRead() {
83
+ return Object.assign(new Error('artifact changed while its bytes were being read'), { code: 'ESTALE' });
84
+ }
85
+ function pathStamp(workspaceRoot, absolute) {
86
+ const resolved = realpathSync(absolute);
87
+ if (!insideRoot(workspaceRoot, resolved))
88
+ throw changedDuringRead();
89
+ return `${resolved}\0${fileVersion(statSync(absolute, { bigint: true }))}`;
90
+ }
77
91
  /**
78
92
  * sha256 one file in constant memory (one reusable chunk buffer), never
79
93
  * loading the whole artifact. Throws the underlying filesystem error so the
80
94
  * caller can distinguish "cannot read" from "absent".
81
95
  */
82
- function hashFileConstantMemory(absolute) {
83
- const handle = openSync(absolute, 'r');
96
+ function hashFileConstantMemory(workspaceRoot, absolute) {
97
+ const resolved = realpathSync(absolute);
98
+ if (!insideRoot(workspaceRoot, resolved))
99
+ throw changedDuringRead();
100
+ const expected = statSync(resolved, { bigint: true });
101
+ const handle = openSync(resolved, 'r');
84
102
  try {
103
+ const before = fstatSync(handle, { bigint: true });
104
+ const stamp = `${resolved}\0${fileVersion(before)}`;
105
+ if (!before.isFile() || fileVersion(expected) !== fileVersion(before) || pathStamp(workspaceRoot, absolute) !== stamp)
106
+ throw changedDuringRead();
85
107
  const hash = createHash('sha256');
86
108
  const buffer = Buffer.allocUnsafe(HASH_CHUNK_BYTES);
87
109
  let size = 0;
@@ -93,7 +115,9 @@ function hashFileConstantMemory(absolute) {
93
115
  // `update` consumes the bytes synchronously, so the buffer is reused.
94
116
  hash.update(read === buffer.byteLength ? buffer : buffer.subarray(0, read));
95
117
  }
96
- return { sha256: hash.digest('hex'), size };
118
+ if (fileVersion(before) !== fileVersion(fstatSync(handle, { bigint: true })) || pathStamp(workspaceRoot, absolute) !== stamp)
119
+ throw changedDuringRead();
120
+ return { sha256: hash.digest('hex'), size, stamp, mtimeMs: Number(before.mtimeNs) / 1_000_000 };
97
121
  }
98
122
  finally {
99
123
  closeSync(handle);
@@ -135,15 +159,16 @@ function inspectPath(workspaceRoot, workspace, normalized) {
135
159
  if (!stats.isFile())
136
160
  return { kind: 'unreadable', reason: `${normalized} is not a regular file` };
137
161
  try {
138
- const { sha256, size } = hashFileConstantMemory(absolute);
162
+ const { sha256, size, stamp, mtimeMs } = hashFileConstantMemory(workspaceRoot, absolute);
139
163
  return {
140
164
  kind: 'file',
165
+ stamp,
141
166
  digest: {
142
167
  path: normalized,
143
168
  present: true,
144
169
  sha256,
145
170
  size,
146
- mtimeMs: stats.mtimeMs,
171
+ mtimeMs,
147
172
  },
148
173
  };
149
174
  }
@@ -154,6 +179,25 @@ function inspectPath(workspaceRoot, workspace, normalized) {
154
179
  function isSkipped(relativePath) {
155
180
  return relativePath.split('/').some((segment) => SKIPPED_SEGMENTS.has(segment)) || isDefaultExcludedPath(relativePath);
156
181
  }
182
+ /** Enumeration and revalidation must apply the same scope boundaries. */
183
+ function listScopeEntries(absolute, prefix) {
184
+ const entries = [];
185
+ for (const entry of readdirSync(absolute, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
186
+ const path = prefix === '' ? entry.name : `${prefix}/${entry.name}`;
187
+ // Traversal never follows symlinks: a symlinked directory can point
188
+ // outside the workspace or form a cycle.
189
+ if (entry.isSymbolicLink() || isSkipped(path))
190
+ continue;
191
+ if (entry.isDirectory())
192
+ entries.push({ path, directory: true });
193
+ else if (entry.isFile())
194
+ entries.push({ path, directory: false });
195
+ }
196
+ return entries;
197
+ }
198
+ function directorySignature(absolute, entries) {
199
+ return `${realpathSync(absolute)}\0${JSON.stringify(entries)}`;
200
+ }
157
201
  function walkDirectory(input) {
158
202
  // The prefix itself must be inside the workspace before it is enumerated:
159
203
  // `escape/` may be a symlink to an outside directory, and readdir would
@@ -189,32 +233,36 @@ function walkDirectory(input) {
189
233
  const current = queue.shift();
190
234
  let entries;
191
235
  try {
192
- entries = readdirSync(join(input.workspace, current), { withFileTypes: true });
236
+ const absolute = join(input.workspace, current);
237
+ // A queued child may have been replaced after its parent was listed.
238
+ // Recheck containment before enumeration and never follow a new nested
239
+ // symlink (an explicitly declared, in-workspace prefix remains allowed).
240
+ if (input.workspaceRoot === undefined || resolvesInside(input.workspaceRoot, absolute) !== true
241
+ || (current !== input.prefix && lstatSync(absolute).isSymbolicLink())) {
242
+ input.gap(`${input.pattern}: ${current || '.'} changed or cannot be resolved inside the workspace; refusing to enumerate it`);
243
+ continue;
244
+ }
245
+ entries = listScopeEntries(absolute, current);
246
+ if (resolvesInside(input.workspaceRoot, absolute) !== true) {
247
+ input.gap(`${input.pattern}: ${current || '.'} changed during enumeration; refusing to use its entries`);
248
+ continue;
249
+ }
250
+ input.observe(current, directorySignature(absolute, entries));
193
251
  }
194
252
  catch (error) {
195
253
  input.gap(`${input.pattern}: cannot list ${current === '' ? '.' : current} (${errorCode(error)})`);
196
254
  continue;
197
255
  }
198
- for (const entry of [...entries].sort((a, b) => a.name.localeCompare(b.name))) {
199
- const relativePath = `${current === '' ? '' : `${current}/`}${entry.name}`;
200
- // Traversal never follows symlinks: a symlinked directory can point
201
- // outside the workspace or form a cycle, and neither may become a read
202
- // or an unbounded walk.
203
- if (entry.isSymbolicLink())
204
- continue;
205
- if (isSkipped(relativePath))
206
- continue;
207
- if (entry.isDirectory()) {
208
- queue.push(relativePath);
256
+ for (const entry of entries) {
257
+ if (entry.directory) {
258
+ queue.push(entry.path);
209
259
  continue;
210
260
  }
211
- if (!entry.isFile())
212
- continue;
213
261
  if (input.full()) {
214
262
  input.gap(`${input.pattern}: stopped at the ${MAX_EXPANDED_ARTIFACTS}-file cap, so its contents are only partially recorded`);
215
263
  return;
216
264
  }
217
- input.push(relativePath);
265
+ input.push(entry.path);
218
266
  }
219
267
  }
220
268
  }
@@ -223,7 +271,7 @@ function walkDirectory(input) {
223
271
  * keep explicitly named paths even when they do not exist (a later creation is
224
272
  * drift too), and report every part that could not be fully resolved.
225
273
  */
226
- export function readArtifactScope(workspace, patterns) {
274
+ function readScope(workspace, patterns, inspect, observe) {
227
275
  const workspaceRoot = workspaceRootOf(workspace);
228
276
  const gaps = [];
229
277
  const concrete = [];
@@ -275,14 +323,14 @@ export function readArtifactScope(workspace, patterns) {
275
323
  gap(trimmed, `stopped at the ${MAX_EXPANDED_ARTIFACTS}-path cap, so its contents are only partially recorded`);
276
324
  continue;
277
325
  }
278
- walkDirectory({ workspace, workspaceRoot, pattern: trimmed, prefix: normalized, push, gap: (reason) => gap(trimmed, reason), full });
326
+ walkDirectory({ workspace, workspaceRoot, pattern: trimmed, prefix: normalized, push, gap: (reason) => gap(trimmed, reason), full, observe });
279
327
  }
280
328
  const artifacts = [];
281
329
  // Index-based: expanding an explicitly named directory appends its files to
282
330
  // `concrete`, and those must be digested in the same pass.
283
331
  for (let index = 0; index < concrete.length; index += 1) {
284
332
  const normalized = concrete[index];
285
- const outcome = inspectPath(workspaceRoot, workspace, normalized);
333
+ const outcome = inspect(normalized);
286
334
  if (outcome.kind === 'file') {
287
335
  artifacts.push(outcome.digest);
288
336
  continue;
@@ -290,7 +338,7 @@ export function readArtifactScope(workspace, patterns) {
290
338
  if (outcome.kind === 'directory') {
291
339
  // An explicitly named directory is expanded instead of being reported as
292
340
  // unreadable: `src/lib` and `src/lib/` must behave the same.
293
- walkDirectory({ workspace, workspaceRoot, pattern: normalized, prefix: normalized, push, gap: (reason) => gap(normalized, reason), full });
341
+ walkDirectory({ workspace, workspaceRoot, pattern: normalized, prefix: normalized, push, gap: (reason) => gap(normalized, reason), full, observe });
294
342
  continue;
295
343
  }
296
344
  if (outcome.kind === 'absent') {
@@ -301,6 +349,81 @@ export function readArtifactScope(workspace, patterns) {
301
349
  }
302
350
  return { artifacts: artifacts.sort((a, b) => a.path.localeCompare(b.path)), gaps };
303
351
  }
352
+ /**
353
+ * Read related scopes in one audit. Each scope retains its own expansion cap
354
+ * and gaps, but overlapping paths hash only once. A final revalidation rejects
355
+ * changed file identities and changed directory membership instead of handing
356
+ * out a mixture of revisions as complete evidence.
357
+ */
358
+ export function readArtifactScopes(workspace, scopes) {
359
+ const root = workspaceRootOf(workspace);
360
+ const paths = new Map();
361
+ const directories = new Map();
362
+ const changedDirectories = new Set();
363
+ const inspect = (normalized) => {
364
+ let outcome = paths.get(normalized);
365
+ if (outcome === undefined) {
366
+ outcome = inspectPath(root, workspace, normalized);
367
+ paths.set(normalized, outcome);
368
+ }
369
+ return outcome;
370
+ };
371
+ const observe = (prefix, signature) => {
372
+ const prior = directories.get(prefix);
373
+ if (prior !== undefined && prior !== signature)
374
+ changedDirectories.add(prefix);
375
+ directories.set(prefix, signature);
376
+ };
377
+ const reads = scopes.map(patterns => readScope(workspace, patterns, inspect, observe));
378
+ const changed = new Map();
379
+ for (const [path, outcome] of paths) {
380
+ try {
381
+ if (outcome.kind === 'file' && (root === undefined || pathStamp(root, join(workspace, path)) !== outcome.stamp)) {
382
+ changed.set(path, `${path} changed during the workspace audit; retry a stable revision`);
383
+ }
384
+ else if (outcome.kind === 'absent') {
385
+ try {
386
+ lstatSync(join(workspace, path));
387
+ changed.set(path, `${path} appeared during the workspace audit; retry a stable revision`);
388
+ }
389
+ catch (error) {
390
+ if (errorCode(error) !== 'ENOENT' && errorCode(error) !== 'ENOTDIR')
391
+ throw error;
392
+ }
393
+ }
394
+ }
395
+ catch {
396
+ changed.set(path, `${path} could not be revalidated after reading; the workspace audit is incomplete`);
397
+ }
398
+ }
399
+ const gaps = [];
400
+ for (const [prefix, signature] of directories) {
401
+ try {
402
+ const absolute = join(workspace, prefix);
403
+ if (root === undefined || resolvesInside(root, absolute) !== true
404
+ || directorySignature(absolute, listScopeEntries(absolute, prefix)) !== signature)
405
+ changedDirectories.add(prefix);
406
+ }
407
+ catch {
408
+ changedDirectories.add(prefix);
409
+ }
410
+ }
411
+ for (const prefix of changedDirectories)
412
+ gaps.push({ pattern: prefix || '.', reason: 'directory membership changed or could not be revalidated during the workspace audit; retry a stable revision' });
413
+ for (const [path, reason] of changed)
414
+ gaps.push({ pattern: path, reason });
415
+ for (const read of reads) {
416
+ read.artifacts = read.artifacts.map(artifact => changed.has(artifact.path)
417
+ ? { path: artifact.path, present: false, unreadable: true, reason: changed.get(artifact.path) }
418
+ : artifact);
419
+ read.gaps.push(...gaps);
420
+ }
421
+ return reads;
422
+ }
423
+ /** Read one scope without retaining byte identities for the next request. */
424
+ export function readArtifactScope(workspace, patterns) {
425
+ return readArtifactScopes(workspace, [patterns])[0];
426
+ }
304
427
  /**
305
428
  * Read the current bytes of workspace-relative paths (directories expand).
306
429
  * Illegal and unreadable paths are reported, never silently dropped.