dsh-agent-team-presets 0.3.2 → 0.3.3

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 (101) hide show
  1. package/NOTICE +57 -3
  2. package/README.md +73 -398
  3. package/README.zh.md +79 -404
  4. package/assets/card-patches/catalog.json +20 -0
  5. package/assets/card-patches/dsh-context-0.85.0.client.js.gz +0 -0
  6. package/assets/card-patches/dsh-context-0.85.1.client.js.gz +0 -0
  7. package/assets/skills/agent-leader-communication/SKILL.md +100 -0
  8. package/assets/skills/agent-subagent-orchestration/SKILL.md +56 -0
  9. package/assets/skills/agent-subagent-orchestration/references/executor-parallel-execution.md +56 -0
  10. package/assets/skills/agent-subagent-orchestration/references/leader-discovery.md +53 -0
  11. package/assets/skills/agent-subagent-orchestration/references/subagent-communication.md +58 -0
  12. package/assets/skills/backend-architecture-workflow/SKILL.md +55 -0
  13. package/assets/skills/backend-architecture-workflow/references/README.md +9 -0
  14. package/assets/skills/backend-architecture-workflow/references/architecture-audit.md +70 -0
  15. package/assets/skills/backend-architecture-workflow/references/architecture-decay-risks.md +75 -0
  16. package/assets/skills/backend-architecture-workflow/references/architecture-design.md +151 -0
  17. package/assets/skills/backend-architecture-workflow/references/bugfix-regression.md +63 -0
  18. package/assets/skills/backend-architecture-workflow/references/complex-bug-diagnosis.md +104 -0
  19. package/assets/skills/executor-short-task-workflow/SKILL.md +48 -0
  20. package/assets/skills/executor-short-task-workflow/references/agent-communication.md +44 -0
  21. package/assets/skills/executor-short-task-workflow/references/verification-and-reporting.md +45 -0
  22. package/assets/skills/frontend-engineering-workflow/SKILL.md +47 -0
  23. package/assets/skills/frontend-engineering-workflow/references/README.md +7 -0
  24. package/assets/skills/frontend-engineering-workflow/references/frontend-implementation.md +46 -0
  25. package/assets/skills/frontend-engineering-workflow/references/visual-design.md +43 -0
  26. package/assets/skills/frontend-engineering-workflow/references/visual-qa.md +126 -0
  27. package/assets/skills/fullstack-advisor/SKILL.md +50 -0
  28. package/assets/skills/fullstack-advisor/references/brooks-principles.md +51 -0
  29. package/assets/skills/fullstack-advisor/references/consultant-communication.md +51 -0
  30. package/assets/skills/fullstack-advisor/references/consultation-workflow.md +71 -0
  31. package/assets/skills/git-release-hygiene/SKILL.md +33 -21
  32. package/assets/skills/git-release-hygiene/references/git-safety.md +66 -0
  33. package/assets/skills/git-release-hygiene/references/pr-changelog.md +98 -0
  34. package/assets/skills/git-release-hygiene/references/release-standard.md +139 -0
  35. package/assets/skills/git-release-hygiene/references/validation-checklist.md +42 -0
  36. package/assets/skills/github-repository-presentation/SKILL.md +49 -130
  37. package/assets/skills/github-repository-presentation/references/bilingual-writing.md +43 -0
  38. package/assets/skills/github-repository-presentation/references/documentation-architecture.md +156 -0
  39. package/assets/skills/github-repository-presentation/references/readme-standard.md +273 -0
  40. package/assets/skills/github-repository-presentation/references/release-notes.md +70 -0
  41. package/assets/skills/github-repository-presentation/references/validation-checklist.md +47 -0
  42. package/assets/skills/independent-code-review-workflow/SKILL.md +60 -0
  43. package/assets/skills/independent-code-review-workflow/references/README.md +9 -0
  44. package/assets/skills/independent-code-review-workflow/references/decay-risks.md +99 -0
  45. package/assets/skills/independent-code-review-workflow/references/review-checklist.md +53 -0
  46. package/assets/skills/independent-code-review-workflow/references/review-methodology.md +113 -0
  47. package/assets/skills/independent-code-review-workflow/references/review-severity.md +49 -0
  48. package/assets/skills/independent-code-review-workflow/references/test-quality-review.md +71 -0
  49. package/assets/skills/leader-long-task-orchestration/SKILL.md +49 -0
  50. package/assets/skills/leader-long-task-orchestration/references/delivery-plan-template.md +73 -0
  51. package/assets/skills/leader-long-task-orchestration/references/product-alignment.md +46 -0
  52. package/assets/skills/leader-long-task-orchestration/references/rolling-wave-planning.md +32 -0
  53. package/assets/skills/leader-long-task-orchestration/references/technical-decisions-and-escalation.md +34 -0
  54. package/assets/skills/leader-medium-task-workflow/SKILL.md +55 -0
  55. package/assets/skills/leader-medium-task-workflow/references/task-board-and-leader-todo.md +41 -0
  56. package/docs/builtin-team-skills.md +82 -0
  57. package/docs/builtin-team-skills.zh.md +82 -0
  58. package/docs/builtin-teams.md +62 -0
  59. package/docs/builtin-teams.zh.md +62 -0
  60. package/docs/developer/architecture.md +54 -0
  61. package/docs/developer/architecture.zh.md +54 -0
  62. package/docs/guide/install.md +86 -0
  63. package/docs/guide/install.zh.md +86 -0
  64. package/docs/guide/integrations.md +50 -0
  65. package/docs/guide/integrations.zh.md +50 -0
  66. package/docs/guide/team-skills.md +56 -0
  67. package/docs/guide/team-skills.zh.md +56 -0
  68. package/docs/guide/using-teams.md +92 -0
  69. package/docs/guide/using-teams.zh.md +92 -0
  70. package/docs/index.md +53 -0
  71. package/docs/index.zh.md +53 -0
  72. package/docs/reference/tools-and-permissions.md +62 -0
  73. package/docs/reference/tools-and-permissions.zh.md +62 -0
  74. package/docs/reference/troubleshooting.md +59 -0
  75. package/docs/reference/troubleshooting.zh.md +59 -0
  76. package/lib/client.js +515 -85
  77. package/lib/index.js +442 -87
  78. package/lib/typert.host.js +15 -15
  79. package/lib/typert.remote-client.d.ts.map +1 -1
  80. package/lib/typert.remote-client.js +15 -15
  81. package/lib/types/client/CardPatchView.js +21 -1
  82. package/lib/types/client/ComposerTeamSelect.js +24 -8
  83. package/lib/types/client/TeamAgentView.d.ts +1 -1
  84. package/lib/types/client/TeamAgentView.js +11 -6
  85. package/lib/types/client/TeamSkillsView.d.ts +2 -1
  86. package/lib/types/client/TeamSkillsView.js +10 -5
  87. package/lib/types/client/locales.d.ts +41 -2
  88. package/lib/types/client/locales.js +125 -0
  89. package/lib/types/index.js +52 -12
  90. package/lib/types/team-catalog.d.ts +50 -3
  91. package/lib/types/team-catalog.js +214 -43
  92. package/lib/types/team-mode.d.ts +48 -0
  93. package/lib/types/team-mode.js +64 -0
  94. package/lib/types/team-skills/index.d.ts +13 -3
  95. package/lib/types/team-skills/index.js +21 -2
  96. package/lib/types/team-skills/manager.d.ts +21 -12
  97. package/lib/types/team-skills/manager.js +88 -53
  98. package/lib/types/team-skills/service.js +18 -7
  99. package/lib/types/team-skills/store.d.ts +11 -0
  100. package/lib/types/team-skills/store.js +32 -1
  101. package/package.json +18 -2
@@ -0,0 +1,62 @@
1
+ # 工具与权限
2
+
3
+ 根会话向智能体开放六个工具,用于读取与维护团队预设及团队技能;队长与每个成员各自持有一套工具策略。本文记录这组工具面、两种策略模式、成员首轮所依赖的保证,以及白名单的边界在哪里。
4
+
5
+ [English](<tools-and-permissions.md>) · [文档索引](../index.zh.md) · [README](../../README.zh.md)
6
+
7
+ ## 面向智能体的工具
8
+
9
+ 根会话注册一组工具,在受工具策略允许时,智能体可直接以程序方式查询或维护预设及技能。
10
+
11
+ ### 预设管理工具
12
+
13
+ - **`get_team_preset`**:读取指定或当前选中的团队预设,返回其用途、角色描述、提示词、名册及设置修订号。
14
+ - **`update_team_preset`**:使用 CAS 修订号更新团队/队长描述及成员提示词、描述;需用户直接发起并由 Host 审批确认。若相关成员正在执行,则返回 `team-busy`。
15
+
16
+ ### 团队技能工具
17
+
18
+ - **`list_team_skills`**:列出私有库中已安装的团队技能、来源、依赖项及角色分配状态。
19
+ - **`assign_team_skill`**:为某个团队的角色分配一个团队技能(作用域限定在该 Agent)。
20
+ - **`unassign_team_skill`**:解除某个角色的团队技能分配。
21
+ - **`remove_team_skill`**:从私有库删除团队技能,受阻断规则保护。
22
+
23
+ 两个预设工具作用于当前 profile 配置中的团队记录,而不是随包目录:经 `update_team_preset` 的修改只改变本 profile 正在运行的团队,不会改写内置预设。技能工具作用于 [团队技能](../guide/team-skills.md) 所述的私有库,分配规则也由那里定义。
24
+
25
+ ## 策略模式
26
+
27
+ 队长与每个成员各自持有一套策略,共有两种模式:
28
+
29
+ | 模式 | 允许什么 |
30
+ |---|---|
31
+ | **默认所有工具** | 除部署权限与角色规则外,不增加额外白名单限制。 |
32
+ | **自定义可用工具** | 仅允许选中的工具。协作工具(`send_message`、`list_agents`、`team_task_*`)如需使用必须显式勾选。 |
33
+
34
+ 队长与成员策略完全独立:给队长放行的工具不会顺带放行给成员。
35
+
36
+ **`skill` 工具始终放行,且不作为可选项呈现。** 它只负责发布技能目录并加载指令文本,不授予能力;而宿主会把整个目录从看不到该工具的角色那里收起。因此自定义白名单无法移除它,设置页也不再列出它——一个永远不会生效的勾选框只会误导使用者。旧版本写入、仍包含该项的配置照常加载:该名字被隐式放行,不会被提示为"不可用",也不需要手动删除。
37
+
38
+ ## PTC 下的自定义工具白名单
39
+
40
+ **自定义工具白名单在 PTC 下通过给该会话一个自己的 native 面来工作。** 宿主无法在释放执行器后恢复继承,所以插件从不主动释放:在 PTC 预设下它把宿主自带的 native 工具执行器挂到该会话的 Agent 作用域,部署级执行器保持原样。代价是明确的:该会话此后不再使用 `run_code`,而其他会话与「所有工具」模式继续走 PTC。若挂载失败、或挂载后工具面仍暴露 PTC 传输,则应用被拒绝且不留残留——因为从未释放过任何执行器。
41
+
42
+ ## 成员首轮能保证什么
43
+
44
+ 已分配的团队技能只有在成员真正发问的那一轮能被加载才有意义,因此插件把注册放进成员创建流程,而不是留给后台:
45
+
46
+ - **成员**:创建边会等待该 Agent 自己的注册完成后才结束。角色持有已分配的团队技能、但本次部署无法发布它时(未组合技能服务、私有库不可读、注册被拒),创建会被**明确拒绝**并给出原因,而不是在空目录下启动、让所有界面仍显示"已分配"。没有任何分配的角色,在未组合技能服务的部署上照常创建。
47
+ - **队长**:同一注册在 Session 创建边、依赖的团队应用之后完成。队长分配发布失败不会拒队——已在运行的 Session 不能因此失去能力策略——失败会以该 Agent 身份被报告出来。
48
+ - **"库不可读"不等于"库为空"。** 私有库打不开时,插件无法枚举任何角色的绑定,因此按"不可知"拒绝成员创建,而不是把未知当成"没有分配"。修复库路径(或重新开始)即可恢复。
49
+
50
+ ## 安全边界
51
+
52
+ - 白名单**不是文件系统、进程或网络沙箱**。允许 bash 等具备执行能力的工具,它们仍保留其原生系统能力。请照常维护 Harness 的沙箱与审批策略。
53
+ - 自定义策略模式禁止通用 `run_code` 与普通 `subagent` / `workflow` 委派,以维持严格的策略契约。需要委派时请使用预设团队成员。
54
+ - 受管成员恢复时必须能读取其持久配置。记录缺失或损坏时严正拒绝,绝不回退为不受限的默认状态。
55
+
56
+ ## 相关
57
+
58
+ - [安装](../guide/install.md)——策略所依赖的环境要求,含上面的 PTC 约束
59
+ - [使用团队](../guide/using-teams.md)——在哪些页面编辑队长与各成员的工具策略
60
+ - [团队技能](../guide/team-skills.md)——这些工具读写的私有库
61
+ - [排障](troubleshooting.zh.md)——策略拒绝或依赖缺失导致工作无法继续时的排查
62
+ - [文档索引](../index.zh.md)——按主题查找全部文档
@@ -0,0 +1,59 @@
1
+ # Troubleshooting
2
+
3
+ This page collects the failure modes this plugin documents: an overridden configuration write, the troubleshooting skill it registers on the global layer, the issues that come up most often, and the one environment that has not been verified yet.
4
+
5
+ [中文](<troubleshooting.zh.md>) · [Documentation index](../index.md) · [README](../../README.md)
6
+
7
+ ## Configuration writes are overridden
8
+
9
+ If saving or selecting a Team reports:
10
+
11
+ ```text
12
+ Configuration for "agent-team-presets" is overridden by a home patch or command-line overlay
13
+ ```
14
+
15
+ Check profile patches, `$DSH_HOME/cordis.patch.yml`, and `--patch` overlays for duplicate hand-written `agent-team-presets` declarations. Remove duplicate declarations while preserving Host-managed settings rows.
16
+
17
+ The usual cause is a second loader declaration added by hand. The package already supplies its own bundle patch, so install the bundle and do not declare it again: duplicate hand-written declarations in profile patches can prevent settings from saving.
18
+
19
+ ## Built-in troubleshooting skill
20
+
21
+ The plugin registers `agent-team-presets-troubleshooting` on the global skill layer as soon as the profile composes the skill service. It is a host-level skill, not part of the private Team Skill library and not isolated per Agent: every Session can load it with the `skill` tool. Use it when a Team does not apply, a member cannot be summoned, a tool is refused, a member's model route is questioned, a Team Skill is invisible, or an install/upgrade behaves unexpectedly.
22
+
23
+ The guide also states the evidence order: `configuredRoute`, `model/selection`, `request/header.config`, and the member snapshot `route` outrank `subagent/descriptor` or roster display values.
24
+
25
+ ## Common issues
26
+
27
+ | Symptom | What to check |
28
+ |---|---|
29
+ | Settings page is absent or plugin pending | Confirm profile type, peer dependencies, subagent backends (default `spawn`/`fork`), and client services. |
30
+ | Skill deletion button is disabled | The skill is protected: inspect the blocker list in the modal (bound roles or dependencies must be unassigned first). |
31
+ | Skill assignment refused (`dependency-missing`) | A required executable declared by the skill is absent from host `PATH`. Note that declared MCP servers are reported for visibility and do not block assignment; ensure MCP servers are configured in your profile. |
32
+ | Member creation refused | Check storage domain availability, subagent execution backend (`spawn`/`fork`), model quota, and concurrency limits. |
33
+ | Model route display mismatch | `list_agents.model` can return an inherited or fallback model even when the member actually runs on its configured route. Verify actual routing via `spawn_team_member`'s `configuredRoute`, `model/selection`, the first `request/header.config`, and the member snapshot `route`. |
34
+ | A selected member's route is unusable | The Host refuses the application and keeps the Session's previous composition and model instead of falling back to the captain. Correct that member's provider/model (and reasoning effort) in **Settings → Agent team presets**, then reselect it. The composer reports missing members but does not display a Host refusal; check the member route and the deployment's provider catalogue. |
35
+
36
+ ### If the settings page never appears
37
+
38
+ Three environment facts decide whether the page can render at all, and each of them is visible before you install:
39
+
40
+ - **Host version.** The supported range is `>=0.2.2-rc.3 <0.3.0`; the plugin was verified against `0.2.2-rc.3`, and 0.2.2-rc.2 and older are refused. The plugin manager enforces `engines.dsh` in `package.json`.
41
+ - **Profile type.** Install into a Web or Desktop profile with Settings and the client services the page uses — typically `web` for the Web GUI or `desktop` for Desktop.
42
+ - **Backends.** Member creation is refused if the storage domain or the selected execution backend is unavailable; the default backend names are `spawn` and `fork`.
43
+
44
+ ## Known limitation: Windows verification
45
+
46
+ The path-separator and executable-resolution fixes are exercised by unit tests that normalize separators and by `ENOTDIR` cases, but no Windows machine was available here. Junction handling across volumes, `PATHEXT` resolution against a real `PATH`, and the full native build chain still need a Windows run before the release is described as Windows-verified.
47
+
48
+ ## Reporting an issue
49
+
50
+ If nothing above explains the refusal, include the exact text the Host printed, the Harness version, and the profile you installed into — those three are what make the report reproducible. Bug reports and pull requests are welcome at [GitHub Issues](https://github.com/bloodarea/dsh-agent-team-presets/issues).
51
+
52
+ ## Related
53
+
54
+ - [Install](../guide/install.md) — profile, version range, and backends referenced above
55
+ - [Team Skills](../guide/team-skills.md) — the dependency and deletion rules behind `dependency-missing` and a disabled delete button
56
+ - [Tools and permissions](tools-and-permissions.md) — what a tool policy admits, and why a call can be refused
57
+ - [Using Teams](../guide/using-teams.md) — member routes and Team application
58
+ - [Documentation index](../index.md) — every document by topic
59
+ - [README](../../README.md) — overview, requirements, install and upgrade
@@ -0,0 +1,59 @@
1
+ # 排障
2
+
3
+ 本文收集插件已记录的故障形态:被覆盖的配置写入、注册在全局层的排障 Skill、最常见的问题,以及唯一一个尚未验证的环境。
4
+
5
+ [English](<troubleshooting.md>) · [文档索引](../index.zh.md) · [README](../../README.zh.md)
6
+
7
+ ## 配置写入被覆盖
8
+
9
+ 若保存或选择团队时报:
10
+
11
+ ```text
12
+ Configuration for "agent-team-presets" is overridden by a home patch or command-line overlay
13
+ ```
14
+
15
+ 请检查 profile patch、`$DSH_HOME/cordis.patch.yml` 和 `--patch` 中是否有重复的手写 `agent-team-presets` 声明。移除重复项,同时保留 Host 管理的设置行。
16
+
17
+ 常见成因是手工多加了一条 loader 声明。本包自带 bundle patch,正确做法是安装 bundle 而不再重复声明:profile patch 里重复的手写声明会导致设置无法保存。
18
+
19
+ ## 插件内置排障 Skill
20
+
21
+ 插件在 profile 组合出 skill 服务后,会在全局 skill 层注册 `agent-team-presets-troubleshooting`。它是宿主级 skill,不属于私有 Team Skill 库,也不按 Agent 隔离;所有会话都可以通过 `skill` 工具加载。适用于团队不生效、成员无法召唤、工具被拒、成员模型路由存疑、Team Skill 不可见或安装/升级异常。
22
+
23
+ 该 Skill 也写明了证据优先级:`configuredRoute`、`model/selection`、`request/header.config` 和成员快照 `route` 高于 `subagent/descriptor` 或名册展示值。
24
+
25
+ ## 常见问题
26
+
27
+ | 现象 | 排查方向 |
28
+ |---|---|
29
+ | 看不到设置页或插件处于 pending | 检查 profile 类型、peer 依赖兼容性、subagent 后端(默认 `spawn`/`fork`)是否可用及客户端服务。 |
30
+ | 技能删除按钮置灰不可点击 | 技能受保护:查看弹窗中的阻断列表,需先在对应团队角色中取消分配。 |
31
+ | 技能分配被拒绝 (`dependency-missing`) | 技能声明的某个必需命令行程序在宿主 `PATH` 上未找到。注意声明的 MCP 服务仅供展示参考,不阻断分配;如需使用请确认 profile 中已正确配置并连接对应 MCP。 |
32
+ | 成员创建被拒绝 | 检查持久存储、执行后端(`spawn`/`fork`)、模型配额及并发限额。 |
33
+ | 成员显示的模型与配置不一致 | `list_agents.model` 可能返回继承或 fallback 模型,即使成员实际已按配置路由运行。实际路由以 `spawn_team_member` 的 `configuredRoute`、`model/selection`、首条 `request/header.config` 和成员快照 `route` 为准。 |
34
+ | 所选成员的模型路由不可用 | Host 会拒绝应用并保留会话原有组合与模型,不会静默回退到队长。请在 **设置 → 智能体团队预设** 中修正该成员的提供方/模型(及推理强度)后重新选择。输入区只提示成员不存在,不显示 Host 拒绝原因;请同时确认成员路由与部署的提供方目录。 |
35
+
36
+ ### 若设置页始终不出现
37
+
38
+ 能否渲染出该页面取决于三项环境事实,它们在安装之前就能确认:
39
+
40
+ - **宿主版本。** 支持范围是 `>=0.2.2-rc.3 <0.3.0`;本次实测版本为 `0.2.2-rc.3`,0.2.2-rc.2 及更旧版本会被拒绝。插件管理器按 `package.json` 中的 `engines.dsh` 判定。
41
+ - **profile 类型。** 安装到具备 Settings 与所需客户端服务的 Web 或 Desktop profile:Web GUI 通常为 `web`,Desktop 通常为 `desktop`。
42
+ - **后端。** 缺少 storage domain 或所选执行后端时,插件会拒绝创建成员;默认后端名为 `spawn` 和 `fork`。
43
+
44
+ ## 已知限制:Windows 验证
45
+
46
+ 路径分隔符与可执行文件解析的修复由归一化分隔符的单元测试和 `ENOTDIR` 用例覆盖,但本次没有可用的 Windows 机器。跨盘符 junction、真实 `PATH` 上的 `PATHEXT` 解析以及完整原生构建链仍需在 Windows 上跑一遍,才能称该版本"已通过 Windows 验证"。
47
+
48
+ ## 报告问题
49
+
50
+ 若上面都没有解释某次拒绝,请附上 Host 打印的原始文本、Harness 版本与所安装的 profile——这三项是问题可复现的前提。缺陷报告与 PR 欢迎提交到 [GitHub Issues](https://github.com/bloodarea/dsh-agent-team-presets/issues)。
51
+
52
+ ## 相关
53
+
54
+ - [安装](../guide/install.md)——上文涉及的 profile、版本范围与后端
55
+ - [团队技能](../guide/team-skills.md)——`dependency-missing` 与删除按钮置灰背后的依赖与删除规则
56
+ - [工具与权限](tools-and-permissions.zh.md)——策略允许什么,以及调用为何会被拒
57
+ - [使用团队](../guide/using-teams.md)——成员路由与团队应用
58
+ - [文档索引](../index.zh.md)——按主题查找全部文档
59
+ - [README](../../README.zh.md)——总览、环境要求、安装与升级