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.
- package/NOTICE +57 -3
- package/README.md +73 -398
- package/README.zh.md +79 -404
- package/assets/card-patches/catalog.json +20 -0
- package/assets/card-patches/dsh-context-0.85.0.client.js.gz +0 -0
- package/assets/card-patches/dsh-context-0.85.1.client.js.gz +0 -0
- package/assets/skills/agent-leader-communication/SKILL.md +100 -0
- package/assets/skills/agent-subagent-orchestration/SKILL.md +56 -0
- package/assets/skills/agent-subagent-orchestration/references/executor-parallel-execution.md +56 -0
- package/assets/skills/agent-subagent-orchestration/references/leader-discovery.md +53 -0
- package/assets/skills/agent-subagent-orchestration/references/subagent-communication.md +58 -0
- package/assets/skills/backend-architecture-workflow/SKILL.md +55 -0
- package/assets/skills/backend-architecture-workflow/references/README.md +9 -0
- package/assets/skills/backend-architecture-workflow/references/architecture-audit.md +70 -0
- package/assets/skills/backend-architecture-workflow/references/architecture-decay-risks.md +75 -0
- package/assets/skills/backend-architecture-workflow/references/architecture-design.md +151 -0
- package/assets/skills/backend-architecture-workflow/references/bugfix-regression.md +63 -0
- package/assets/skills/backend-architecture-workflow/references/complex-bug-diagnosis.md +104 -0
- package/assets/skills/executor-short-task-workflow/SKILL.md +48 -0
- package/assets/skills/executor-short-task-workflow/references/agent-communication.md +44 -0
- package/assets/skills/executor-short-task-workflow/references/verification-and-reporting.md +45 -0
- package/assets/skills/frontend-engineering-workflow/SKILL.md +47 -0
- package/assets/skills/frontend-engineering-workflow/references/README.md +7 -0
- package/assets/skills/frontend-engineering-workflow/references/frontend-implementation.md +46 -0
- package/assets/skills/frontend-engineering-workflow/references/visual-design.md +43 -0
- package/assets/skills/frontend-engineering-workflow/references/visual-qa.md +126 -0
- package/assets/skills/fullstack-advisor/SKILL.md +50 -0
- package/assets/skills/fullstack-advisor/references/brooks-principles.md +51 -0
- package/assets/skills/fullstack-advisor/references/consultant-communication.md +51 -0
- package/assets/skills/fullstack-advisor/references/consultation-workflow.md +71 -0
- package/assets/skills/git-release-hygiene/SKILL.md +33 -21
- package/assets/skills/git-release-hygiene/references/git-safety.md +66 -0
- package/assets/skills/git-release-hygiene/references/pr-changelog.md +98 -0
- package/assets/skills/git-release-hygiene/references/release-standard.md +139 -0
- package/assets/skills/git-release-hygiene/references/validation-checklist.md +42 -0
- package/assets/skills/github-repository-presentation/SKILL.md +49 -130
- package/assets/skills/github-repository-presentation/references/bilingual-writing.md +43 -0
- package/assets/skills/github-repository-presentation/references/documentation-architecture.md +156 -0
- package/assets/skills/github-repository-presentation/references/readme-standard.md +273 -0
- package/assets/skills/github-repository-presentation/references/release-notes.md +70 -0
- package/assets/skills/github-repository-presentation/references/validation-checklist.md +47 -0
- package/assets/skills/independent-code-review-workflow/SKILL.md +60 -0
- package/assets/skills/independent-code-review-workflow/references/README.md +9 -0
- package/assets/skills/independent-code-review-workflow/references/decay-risks.md +99 -0
- package/assets/skills/independent-code-review-workflow/references/review-checklist.md +53 -0
- package/assets/skills/independent-code-review-workflow/references/review-methodology.md +113 -0
- package/assets/skills/independent-code-review-workflow/references/review-severity.md +49 -0
- package/assets/skills/independent-code-review-workflow/references/test-quality-review.md +71 -0
- package/assets/skills/leader-long-task-orchestration/SKILL.md +49 -0
- package/assets/skills/leader-long-task-orchestration/references/delivery-plan-template.md +73 -0
- package/assets/skills/leader-long-task-orchestration/references/product-alignment.md +46 -0
- package/assets/skills/leader-long-task-orchestration/references/rolling-wave-planning.md +32 -0
- package/assets/skills/leader-long-task-orchestration/references/technical-decisions-and-escalation.md +34 -0
- package/assets/skills/leader-medium-task-workflow/SKILL.md +55 -0
- package/assets/skills/leader-medium-task-workflow/references/task-board-and-leader-todo.md +41 -0
- package/docs/builtin-team-skills.md +82 -0
- package/docs/builtin-team-skills.zh.md +82 -0
- package/docs/builtin-teams.md +62 -0
- package/docs/builtin-teams.zh.md +62 -0
- package/docs/developer/architecture.md +54 -0
- package/docs/developer/architecture.zh.md +54 -0
- package/docs/guide/install.md +86 -0
- package/docs/guide/install.zh.md +86 -0
- package/docs/guide/integrations.md +50 -0
- package/docs/guide/integrations.zh.md +50 -0
- package/docs/guide/team-skills.md +56 -0
- package/docs/guide/team-skills.zh.md +56 -0
- package/docs/guide/using-teams.md +92 -0
- package/docs/guide/using-teams.zh.md +92 -0
- package/docs/index.md +53 -0
- package/docs/index.zh.md +53 -0
- package/docs/reference/tools-and-permissions.md +62 -0
- package/docs/reference/tools-and-permissions.zh.md +62 -0
- package/docs/reference/troubleshooting.md +59 -0
- package/docs/reference/troubleshooting.zh.md +59 -0
- package/lib/client.js +515 -85
- package/lib/index.js +442 -87
- package/lib/typert.host.js +15 -15
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +15 -15
- package/lib/types/client/CardPatchView.js +21 -1
- package/lib/types/client/ComposerTeamSelect.js +24 -8
- package/lib/types/client/TeamAgentView.d.ts +1 -1
- package/lib/types/client/TeamAgentView.js +11 -6
- package/lib/types/client/TeamSkillsView.d.ts +2 -1
- package/lib/types/client/TeamSkillsView.js +10 -5
- package/lib/types/client/locales.d.ts +41 -2
- package/lib/types/client/locales.js +125 -0
- package/lib/types/index.js +52 -12
- package/lib/types/team-catalog.d.ts +50 -3
- package/lib/types/team-catalog.js +214 -43
- package/lib/types/team-mode.d.ts +48 -0
- package/lib/types/team-mode.js +64 -0
- package/lib/types/team-skills/index.d.ts +13 -3
- package/lib/types/team-skills/index.js +21 -2
- package/lib/types/team-skills/manager.d.ts +21 -12
- package/lib/types/team-skills/manager.js +88 -53
- package/lib/types/team-skills/service.js +18 -7
- package/lib/types/team-skills/store.d.ts +11 -0
- package/lib/types/team-skills/store.js +32 -1
- package/package.json +18 -2
package/lib/index.js
CHANGED
|
@@ -7807,16 +7807,131 @@ const OFFICIAL_REPOSITORY_SKILLS = [{
|
|
|
7807
7807
|
roleName: "repository-specialist"
|
|
7808
7808
|
}];
|
|
7809
7809
|
/**
|
|
7810
|
-
* The
|
|
7811
|
-
*
|
|
7810
|
+
* The leader workflow skills, assigned by default to the `team-lead` captain of
|
|
7811
|
+
* every software engineering Team: dispatching and reporting, the bounded
|
|
7812
|
+
* medium-task board, the long-running delivery plan, and the subagent
|
|
7813
|
+
* orchestration rules a captain needs before it may explore in parallel.
|
|
7812
7814
|
*/
|
|
7813
|
-
const
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7815
|
+
const OFFICIAL_LEADER_SKILLS = [
|
|
7816
|
+
{
|
|
7817
|
+
skillId: "agent-leader-communication",
|
|
7818
|
+
roleName: "team-lead"
|
|
7819
|
+
},
|
|
7820
|
+
{
|
|
7821
|
+
skillId: "leader-medium-task-workflow",
|
|
7822
|
+
roleName: "team-lead"
|
|
7823
|
+
},
|
|
7824
|
+
{
|
|
7825
|
+
skillId: "leader-long-task-orchestration",
|
|
7826
|
+
roleName: "team-lead"
|
|
7827
|
+
},
|
|
7828
|
+
{
|
|
7829
|
+
skillId: "agent-subagent-orchestration",
|
|
7830
|
+
roleName: "team-lead"
|
|
7831
|
+
}
|
|
7832
|
+
];
|
|
7833
|
+
/**
|
|
7834
|
+
* The advisory workflow skill, assigned by default to the `fullstack-advisor`
|
|
7835
|
+
* role. The advisor stays single-threaded, so it never receives the subagent
|
|
7836
|
+
* orchestration skill.
|
|
7837
|
+
*/
|
|
7838
|
+
const OFFICIAL_ADVISOR_SKILLS = [{
|
|
7839
|
+
skillId: "fullstack-advisor",
|
|
7840
|
+
roleName: "fullstack-advisor"
|
|
7819
7841
|
}];
|
|
7842
|
+
/**
|
|
7843
|
+
* The delivery skills, assigned by default to the `executor` role of software
|
|
7844
|
+
* engineering Teams: the bounded implementation workflow, the parallel
|
|
7845
|
+
* work-package orchestration rules, and the two repository delivery skills.
|
|
7846
|
+
*/
|
|
7847
|
+
const OFFICIAL_DEVELOPMENT_EXECUTOR_SKILLS = [
|
|
7848
|
+
{
|
|
7849
|
+
skillId: "executor-short-task-workflow",
|
|
7850
|
+
roleName: "executor"
|
|
7851
|
+
},
|
|
7852
|
+
{
|
|
7853
|
+
skillId: "agent-subagent-orchestration",
|
|
7854
|
+
roleName: "executor"
|
|
7855
|
+
},
|
|
7856
|
+
{
|
|
7857
|
+
skillId: "git-release-hygiene",
|
|
7858
|
+
roleName: "executor"
|
|
7859
|
+
},
|
|
7860
|
+
{
|
|
7861
|
+
skillId: "github-repository-presentation",
|
|
7862
|
+
roleName: "executor"
|
|
7863
|
+
}
|
|
7864
|
+
];
|
|
7865
|
+
/**
|
|
7866
|
+
* The default assignments of a software engineering Team that carries an
|
|
7867
|
+
* advisory role: leader, advisor, then executor. `agent-subagent-orchestration`
|
|
7868
|
+
* is deliberately bound to two roles and to no third one.
|
|
7869
|
+
*/
|
|
7870
|
+
const OFFICIAL_DEVELOPMENT_SKILLS = [
|
|
7871
|
+
...OFFICIAL_LEADER_SKILLS,
|
|
7872
|
+
...OFFICIAL_ADVISOR_SKILLS,
|
|
7873
|
+
...OFFICIAL_DEVELOPMENT_EXECUTOR_SKILLS
|
|
7874
|
+
];
|
|
7875
|
+
/**
|
|
7876
|
+
* The professional-role workflows, one main skill per specialist role: the
|
|
7877
|
+
* UI frontend engineer, the backend architect, and the independent reviewer.
|
|
7878
|
+
*
|
|
7879
|
+
* Each is a progressive-loading entry point — the detailed methods live in its
|
|
7880
|
+
* own `references/` folder and are read on demand, never registered as skills
|
|
7881
|
+
* of their own. The reviewer keeps the subagent orchestration rules because a
|
|
7882
|
+
* large, high-risk review may fan out; the two advisory-side roles never
|
|
7883
|
+
* dispatch.
|
|
7884
|
+
*/
|
|
7885
|
+
const OFFICIAL_PROFESSIONAL_SKILLS = [
|
|
7886
|
+
{
|
|
7887
|
+
skillId: "frontend-engineering-workflow",
|
|
7888
|
+
roleName: "ui-designer"
|
|
7889
|
+
},
|
|
7890
|
+
{
|
|
7891
|
+
skillId: "backend-architecture-workflow",
|
|
7892
|
+
roleName: "backend-architect"
|
|
7893
|
+
},
|
|
7894
|
+
{
|
|
7895
|
+
skillId: "independent-code-review-workflow",
|
|
7896
|
+
roleName: "reviewer"
|
|
7897
|
+
},
|
|
7898
|
+
{
|
|
7899
|
+
skillId: "agent-subagent-orchestration",
|
|
7900
|
+
roleName: "reviewer"
|
|
7901
|
+
}
|
|
7902
|
+
];
|
|
7903
|
+
/**
|
|
7904
|
+
* The reviewer's bindings alone.
|
|
7905
|
+
*
|
|
7906
|
+
* The 标准研发团队 has no specialist role, so it declares the leader, advisor,
|
|
7907
|
+
* executor, and reviewer defaults and nothing that names a role it does not
|
|
7908
|
+
* carry — a declaration with no matching role would never resolve, and the
|
|
7909
|
+
* catalog is what the Host reconciles against.
|
|
7910
|
+
*/
|
|
7911
|
+
const OFFICIAL_STANDARD_SKILLS = [
|
|
7912
|
+
...OFFICIAL_LEADER_SKILLS,
|
|
7913
|
+
...OFFICIAL_ADVISOR_SKILLS,
|
|
7914
|
+
{
|
|
7915
|
+
skillId: "independent-code-review-workflow",
|
|
7916
|
+
roleName: "reviewer"
|
|
7917
|
+
},
|
|
7918
|
+
{
|
|
7919
|
+
skillId: "agent-subagent-orchestration",
|
|
7920
|
+
roleName: "reviewer"
|
|
7921
|
+
},
|
|
7922
|
+
...OFFICIAL_DEVELOPMENT_EXECUTOR_SKILLS
|
|
7923
|
+
];
|
|
7924
|
+
/**
|
|
7925
|
+
* The default assignments of the 全栈软件研发团队, whose advisor work is split
|
|
7926
|
+
* into two specialist roles: leader, the frontend and backend workflows, the
|
|
7927
|
+
* reviewer pair, and the executor's own delivery skills. There is no single
|
|
7928
|
+
* `fullstack-advisor` binding, because that Team does not carry that role.
|
|
7929
|
+
*/
|
|
7930
|
+
const OFFICIAL_SPECIALIST_SKILLS = [
|
|
7931
|
+
...OFFICIAL_LEADER_SKILLS,
|
|
7932
|
+
...OFFICIAL_PROFESSIONAL_SKILLS,
|
|
7933
|
+
...OFFICIAL_DEVELOPMENT_EXECUTOR_SKILLS
|
|
7934
|
+
];
|
|
7820
7935
|
/** Every official Team, in install order: the three development Teams, then the six work modes. */
|
|
7821
7936
|
const BUILTIN_TEAM_CATALOG = [
|
|
7822
7937
|
{
|
|
@@ -7827,28 +7942,28 @@ const BUILTIN_TEAM_CATALOG = [
|
|
|
7827
7942
|
"version": 1,
|
|
7828
7943
|
"team": {
|
|
7829
7944
|
"name": "轻量研发团队",
|
|
7830
|
-
"description": "
|
|
7945
|
+
"description": "适合中小型功能迭代与多阶段开发。队长负责需求对齐、任务分级、并行探查与验收;顾问按需提供技术方案和验收契约;执行者负责并行实现、集成与验证。",
|
|
7831
7946
|
"captain": {
|
|
7832
7947
|
"name": "team-lead",
|
|
7833
|
-
"description": "
|
|
7834
|
-
"systemPrompt": "
|
|
7948
|
+
"description": "负责需求对齐、任务分级、团队调度、风险控制与最终验收。",
|
|
7949
|
+
"systemPrompt": "你是团队队长,负责需求对齐、任务分级、成员调度、结果整合与最终验收;仅在用户明确要求团队协作时召集成员。\n\n1. 确认目标、范围、验收、项目规则与权限。产品功能、流程、界面及重大范围由用户裁决;基线内技术方案由团队决定。\n2. 按规模路由:短程直接派发;中程用 `leader-medium-task-workflow`;长程用 `leader-long-task-orchestration`。通信使用 `agent-leader-communication`。\n3. 存在两个或以上独立工程探查方向时,必须用 `agent-subagent-orchestration` 并行探查,不得仅因即时委派成本而默认串行。\n4. 派发时明确任务范围、发现责任和验收;只传递必要事实、路径和符号,避免重复背景。多个独立编码工作包拆分后交执行者按其工作流处理。\n5. 父代理负责整合与最终验收;仅依据可复核证据报告完成,并列明未验证项、阻塞和风险。",
|
|
7835
7950
|
"color": "#4c8dff"
|
|
7836
7951
|
},
|
|
7837
7952
|
"members": [{
|
|
7838
7953
|
"name": "fullstack-advisor",
|
|
7839
|
-
"description": "
|
|
7840
|
-
"systemPrompt": "
|
|
7954
|
+
"description": "按需提供跨层技术决策、方案权衡、风险分析与可执行验收契约;不承担编码。",
|
|
7955
|
+
"systemPrompt": "你是全栈技术顾问,不负责编码、项目调度或产品裁决,保持单线程,不创建孙代理。使用 fullstack-advisor Skill 执行咨询工作流。\n1. 接收队长的决策问题、约束和事实来源;只调查影响判断的必要范围,复用已有调查。\n2. 输出首选方案、关键理由、主要权衡与风险、必要证据位置及可验证验收条件;区分事实、推断和假设。\n3. 功能、业务规则、用户流程和界面歧义交队长向用户确认;技术细节在已批准边界内自主分析。重大范围、兼容、预算或安全影响须标记升级。\n4. 默认只返回决策摘要,详细论证按需展开。不得修改生产代码、测试或脚本;不得把静态分析描述为运行验证。",
|
|
7841
7956
|
"color": "#e0a43c"
|
|
7842
7957
|
}, {
|
|
7843
7958
|
"name": "executor",
|
|
7844
|
-
"description": "
|
|
7845
|
-
"systemPrompt": "
|
|
7959
|
+
"description": "负责获派范围内的编码、调试、测试、修复与验证交接。",
|
|
7960
|
+
"systemPrompt": "你是研发执行者,负责获派范围内的实现、集成与验证。使用 executor-short-task-workflow 执行任务。\n1. 核对项目规则、任务范围、验收和接口契约;功能或界面歧义交队长。\n2. 存在两个或以上实质独立、可分别验收的编码工作包时,必须调用 agent-subagent-orchestration 并行执行,不得仅因即时委派开销而默认串行。先明确接口、文件所有权和局部验收。\n3. 按最小可验证切片实施,沿用项目技术栈,不改无关文件、不覆盖他人产物、不擅自扩大范围。孙代理不得继续派生;你负责检查 diff、集成、冲突处理和最终回归。\n4. 单一局部任务、强依赖或共享文件冲突时不强行并行;宿主能力/名额不足时说明原因并调整。运行与风险匹配的测试、lint、构建或真实链路,未运行不得报通过。\n5. 按 STATUS、TASK_ID、CHANGES、TESTS、BLOCKERS 汇报;证据提供路径和命令,长日志只给位置。Git/Release/仓库文档任务按需使用对应 Skill;push、发布和改写历史需单独授权。",
|
|
7846
7961
|
"color": "#4c8dff"
|
|
7847
7962
|
}]
|
|
7848
7963
|
}
|
|
7849
7964
|
},
|
|
7850
7965
|
metadata: {
|
|
7851
|
-
"summary": "
|
|
7966
|
+
"summary": "三角色协作的小型研发团队,支持按需并行探查与编码。",
|
|
7852
7967
|
"tags": [
|
|
7853
7968
|
"软件研发",
|
|
7854
7969
|
"小团队",
|
|
@@ -7860,44 +7975,90 @@ const BUILTIN_TEAM_CATALOG = [
|
|
|
7860
7975
|
"小范围重构"
|
|
7861
7976
|
],
|
|
7862
7977
|
"quickPrompts": ["为这个模块增加参数校验并补充测试", "修复这个已定位的缺陷并验证回归"],
|
|
7863
|
-
"notes": "
|
|
7978
|
+
"notes": "官方内置 Skill 共 9 项:队长 4 项、顾问 1 项、执行者 4 项。agent-subagent-orchestration 仅绑定队长与执行者;顾问保持单线程。grilling、research 不属于本团队绑定。"
|
|
7864
7979
|
},
|
|
7865
|
-
officialSkillBindings:
|
|
7980
|
+
officialSkillBindings: OFFICIAL_DEVELOPMENT_SKILLS
|
|
7866
7981
|
},
|
|
7867
7982
|
{
|
|
7868
7983
|
id: "builtin-standard",
|
|
7869
7984
|
series: "classic-development",
|
|
7870
7985
|
document: {
|
|
7871
7986
|
"format": "dsh-agent-team-preset",
|
|
7872
|
-
"version":
|
|
7987
|
+
"version": 2,
|
|
7873
7988
|
"team": {
|
|
7874
7989
|
"name": "标准研发团队",
|
|
7875
|
-
"description": "
|
|
7990
|
+
"description": "适合中型功能、重要重构与持续项目迭代。队长统筹;全栈顾问按需提供跨层技术决策与可执行验收契约;执行者持续研发;代码审查员对代码变更独立验收。",
|
|
7876
7991
|
"captain": {
|
|
7877
7992
|
"name": "team-lead",
|
|
7878
|
-
"description": "
|
|
7879
|
-
"
|
|
7880
|
-
"
|
|
7993
|
+
"description": "负责需求对齐、任务分级、团队调度、风险控制与最终验收。",
|
|
7994
|
+
"color": "#4c8dff",
|
|
7995
|
+
"systemPrompt": "你是团队队长,负责需求对齐、任务分级、成员调度、结果整合与最终验收;仅在用户明确要求团队协作时召集成员。\n\n1. 确认目标、范围、验收、项目规则与权限。产品功能、流程、界面及重大范围由用户裁决;基线内技术方案由团队决定。\n2. 按规模路由:短程直接派发;中程用 `leader-medium-task-workflow`;长程用 `leader-long-task-orchestration`。通信使用 `agent-leader-communication`。reviewer 对有代码变更的交付开展独立审查:高风险切片提前介入,修复后只复审改动差异与相关回归。\n3. 存在两个或以上独立工程探查方向时,必须用 `agent-subagent-orchestration` 并行探查,不得仅因即时委派成本而默认串行。\n4. 派发时明确任务范围、发现责任和验收;只传递必要事实、路径和符号,避免重复背景。多个独立编码工作包拆分后交执行者按其工作流处理。\n5. 父代理负责整合与最终验收;仅依据可复核证据报告完成,并列明未验证项、阻塞和风险。"
|
|
7881
7996
|
},
|
|
7882
7997
|
"members": [
|
|
7883
7998
|
{
|
|
7884
7999
|
"name": "fullstack-advisor",
|
|
7885
|
-
"description": "
|
|
7886
|
-
"systemPrompt": "
|
|
8000
|
+
"description": "全栈顾问:按需提供跨层技术决策、方案权衡、风险分析与可执行验收契约;不承担编码。",
|
|
8001
|
+
"systemPrompt": "你是团队全栈顾问,不负责常规编码、项目调度或产品裁决,保持单线程,不创建孙代理。使用 `fullstack-advisor` Skill 执行咨询工作流。\n1. 接收队长的决策问题、约束和事实来源;只调查影响判断的必要范围,复用已有调查。\n2. 输出首选方案、关键理由、主要权衡与风险、必要证据位置及可验证验收条件;区分事实、推断和假设。\n3. 功能、业务规则、用户流程和界面歧义交队长向用户确认;技术细节在已批准边界内自主分析。重大范围、兼容、预算或安全影响须标记升级。\n4. 默认只返回决策摘要,详细论证按需展开。不得修改生产代码、测试或脚本;不得把静态分析描述为运行验证。",
|
|
7887
8002
|
"color": "#e0a43c"
|
|
7888
8003
|
},
|
|
7889
8004
|
{
|
|
7890
8005
|
"name": "reviewer",
|
|
7891
|
-
"description": "
|
|
7892
|
-
"systemPrompt": "
|
|
8006
|
+
"description": "代码审查员:独立审查所有成员的实际代码变更,验证需求符合性、工程规范、测试有效性及安全/并发/兼容性风险。",
|
|
8007
|
+
"systemPrompt": "你是团队独立代码审查员,审查队长、UI 前端工程师与后端架构师的实际代码变更;保持只读,不修改被审查实现。使用 `independent-code-review-workflow` 作为审查入口,按风险按需加载参考资料。以项目规范和需求为依据,提交可复核的问题、证据及风险;不得将未经验证的判断写成缺陷,必要证据不足时明确说明。\n1. 围绕实际变更、关键调用链与约定的验收契约审查功能、安全权限、并发、兼容迁移和重要界面状态;不无目的扫描全仓。\n2. 确认测试到达目标路径、关键断言能捕获缺陷;mock、全绿和静态检查均不自动等于真实验证。独立复跑前确认权限与隔离范围,不污染共享文件。\n3. 将发现区分为已证实缺陷、待验证风险与建议;按 P0/P1/P2/P3 报告位置、触发条件、影响、证据和最小修复建议。复审聚焦修复差异与相关回归。\n4. 视觉判断需亲自读取实际截图;设计争议交队长协调。结论为通过、需修改或证据不足;必要项未验证不得放行,风险接受交队长裁决。\n5. 沿用既有团队通信规范提交审查结论:先给结论,再列可复核的证据位置、未验证项与待决风险。",
|
|
7893
8008
|
"color": "#8d6bff"
|
|
7894
8009
|
},
|
|
7895
8010
|
{
|
|
7896
8011
|
"name": "executor",
|
|
7897
|
-
"description": "
|
|
7898
|
-
"systemPrompt": "
|
|
8012
|
+
"description": "负责获派范围内的编码、调试、测试、修复与验证交接。",
|
|
8013
|
+
"systemPrompt": "你是研发执行者,负责获派范围内的实现、集成与验证。使用 executor-short-task-workflow 执行任务。\n1. 核对项目规则、任务范围、验收和接口契约;功能或界面歧义交队长。\n2. 存在两个或以上实质独立、可分别验收的编码工作包时,必须调用 agent-subagent-orchestration 并行执行,不得仅因即时委派开销而默认串行。先明确接口、文件所有权和局部验收。\n3. 按最小可验证切片实施,沿用项目技术栈,不改无关文件、不覆盖他人产物、不擅自扩大范围。孙代理不得继续派生;你负责检查 diff、集成、冲突处理和最终回归。\n4. 单一局部任务、强依赖或共享文件冲突时不强行并行;宿主能力/名额不足时说明原因并调整。运行与风险匹配的测试、lint、构建或真实链路,未运行不得报通过。\n5. 按 STATUS、TASK_ID、CHANGES、TESTS、BLOCKERS 汇报;证据提供路径和命令,长日志只给位置。Git/Release/仓库文档任务按需使用对应 Skill;push、发布和改写历史需单独授权。",
|
|
7899
8014
|
"color": "#4c8dff"
|
|
7900
8015
|
}
|
|
8016
|
+
],
|
|
8017
|
+
"officialSkills": [
|
|
8018
|
+
{
|
|
8019
|
+
"skillId": "agent-leader-communication",
|
|
8020
|
+
"roleName": "team-lead"
|
|
8021
|
+
},
|
|
8022
|
+
{
|
|
8023
|
+
"skillId": "leader-medium-task-workflow",
|
|
8024
|
+
"roleName": "team-lead"
|
|
8025
|
+
},
|
|
8026
|
+
{
|
|
8027
|
+
"skillId": "leader-long-task-orchestration",
|
|
8028
|
+
"roleName": "team-lead"
|
|
8029
|
+
},
|
|
8030
|
+
{
|
|
8031
|
+
"skillId": "agent-subagent-orchestration",
|
|
8032
|
+
"roleName": "team-lead"
|
|
8033
|
+
},
|
|
8034
|
+
{
|
|
8035
|
+
"skillId": "fullstack-advisor",
|
|
8036
|
+
"roleName": "fullstack-advisor"
|
|
8037
|
+
},
|
|
8038
|
+
{
|
|
8039
|
+
"skillId": "independent-code-review-workflow",
|
|
8040
|
+
"roleName": "reviewer"
|
|
8041
|
+
},
|
|
8042
|
+
{
|
|
8043
|
+
"skillId": "agent-subagent-orchestration",
|
|
8044
|
+
"roleName": "reviewer"
|
|
8045
|
+
},
|
|
8046
|
+
{
|
|
8047
|
+
"skillId": "executor-short-task-workflow",
|
|
8048
|
+
"roleName": "executor"
|
|
8049
|
+
},
|
|
8050
|
+
{
|
|
8051
|
+
"skillId": "agent-subagent-orchestration",
|
|
8052
|
+
"roleName": "executor"
|
|
8053
|
+
},
|
|
8054
|
+
{
|
|
8055
|
+
"skillId": "git-release-hygiene",
|
|
8056
|
+
"roleName": "executor"
|
|
8057
|
+
},
|
|
8058
|
+
{
|
|
8059
|
+
"skillId": "github-repository-presentation",
|
|
8060
|
+
"roleName": "executor"
|
|
8061
|
+
}
|
|
7901
8062
|
]
|
|
7902
8063
|
}
|
|
7903
8064
|
},
|
|
@@ -7914,50 +8075,100 @@ const BUILTIN_TEAM_CATALOG = [
|
|
|
7914
8075
|
"持续项目迭代"
|
|
7915
8076
|
],
|
|
7916
8077
|
"quickPrompts": ["实现这个中型功能并完成独立审查", "重构这个模块并保证测试全部通过"],
|
|
7917
|
-
"notes": "
|
|
8078
|
+
"notes": "四个成员(含队长):全栈顾问提供跨层技术决策与验收契约,执行者承担常规实施,代码审查员独立验收。"
|
|
7918
8079
|
},
|
|
7919
|
-
officialSkillBindings:
|
|
8080
|
+
officialSkillBindings: OFFICIAL_STANDARD_SKILLS
|
|
7920
8081
|
},
|
|
7921
8082
|
{
|
|
7922
8083
|
id: "builtin-fullstack",
|
|
7923
8084
|
series: "classic-development",
|
|
7924
8085
|
document: {
|
|
7925
8086
|
"format": "dsh-agent-team-preset",
|
|
7926
|
-
"version":
|
|
8087
|
+
"version": 2,
|
|
7927
8088
|
"team": {
|
|
7928
8089
|
"name": "全栈软件研发团队",
|
|
7929
|
-
"description": "
|
|
8090
|
+
"description": "面向复杂 Web、桌面与 Android 工程。队长调度并验收;UI 前端工程师与后端架构师分别承担前端与后端专业工作;执行者负责常规开发测试;代码审查员独立验收;按风险召集成员并按切片交接。",
|
|
7930
8091
|
"captain": {
|
|
7931
8092
|
"name": "team-lead",
|
|
7932
|
-
"description": "
|
|
7933
|
-
"
|
|
7934
|
-
"
|
|
8093
|
+
"description": "负责需求对齐、任务分级、团队调度、风险控制与最终验收。",
|
|
8094
|
+
"color": "#4c8dff",
|
|
8095
|
+
"systemPrompt": "你是团队队长,负责需求对齐、任务分级、成员调度、结果整合与最终验收;仅在用户明确要求团队协作时召集成员。\n\n1. 确认目标、范围、验收、项目规则与权限。产品功能、流程、界面及重大范围由用户裁决;基线内技术方案由团队决定。\n2. 按规模路由:短程直接派发;中程用 `leader-medium-task-workflow`;长程用 `leader-long-task-orchestration`。通信使用 `agent-leader-communication`。executor 持续实施、调试与测试;接口、安全或系统设计风险咨询 backend-architect;新交互或视觉争议咨询 ui-designer;reviewer 负责高风险阶段与交付前独立审查,顾问按需参与,不默认全员并行。\n3. 存在两个或以上独立工程探查方向时,必须用 `agent-subagent-orchestration` 并行探查,不得仅因即时委派成本而默认串行。\n4. 派发时明确任务范围、发现责任和验收;只传递必要事实、路径和符号,避免重复背景。多个独立编码工作包拆分后交执行者按其工作流处理。\n5. 父代理负责整合与最终验收;仅依据可复核证据报告完成,并列明未验证项、阻塞和风险。"
|
|
7935
8096
|
},
|
|
7936
8097
|
"members": [
|
|
7937
8098
|
{
|
|
7938
8099
|
"name": "backend-architect",
|
|
7939
|
-
"description": "
|
|
7940
|
-
"systemPrompt": "
|
|
7941
|
-
"color": "#
|
|
8100
|
+
"description": "后端架构师:负责后端与系统架构、技术契约、复杂后端 Bug 根因分析与修复,以及高风险技术攻坚。",
|
|
8101
|
+
"systemPrompt": "你是团队后端架构师,负责系统架构、技术契约及复杂后端问题攻坚;可在获派范围内直接修复复杂 Bug 和架构性缺陷。\n常规 API、CRUD、一般业务逻辑和局部易定位 Bug 由队长或其他获派成员承担。使用 `backend-architecture-workflow` 作为专业工作入口,按任务需要加载参考资料。\n\n与 UI 前端工程师对齐接口契约,并明确文件所有权。未经授权不部署、发布、修改生产数据或执行破坏性操作。沿用既有团队通信规范交付决策、证据和验证结果。",
|
|
8102
|
+
"color": "#2fa5b6"
|
|
7942
8103
|
},
|
|
7943
8104
|
{
|
|
7944
8105
|
"name": "ui-designer",
|
|
7945
|
-
"description": "
|
|
7946
|
-
"systemPrompt": "
|
|
8106
|
+
"description": "UI 前端工程师:负责视觉方向、设计系统、前端组件与交互实现、真实页面视觉 QA 和前端缺陷修复。",
|
|
8107
|
+
"systemPrompt": "你是团队 UI 前端工程师,负责视觉方向、设计系统、前端组件与交互实现、真实页面视觉 QA 和前端缺陷修复,可直接修改获派范围内的前端代码和测试。\n常规前端实施按复杂度分配,队长也可自行承担。你不修改后端、数据库或服务端契约;接口语义不清时咨询 backend-architect。\n\n使用 `frontend-engineering-workflow` 作为专业工作入口,按任务需要加载参考资料。与队长或其他写入者协作前明确文件所有权,沿用既有团队通信规范交接结果和验证证据。",
|
|
7947
8108
|
"color": "#2fbf71"
|
|
7948
8109
|
},
|
|
7949
8110
|
{
|
|
7950
8111
|
"name": "reviewer",
|
|
7951
|
-
"description": "
|
|
7952
|
-
"systemPrompt": "
|
|
8112
|
+
"description": "代码审查员:独立审查所有成员的实际代码变更,验证需求符合性、工程规范、测试有效性及安全/并发/兼容性风险。",
|
|
8113
|
+
"systemPrompt": "你是团队独立代码审查员,审查队长、UI 前端工程师与后端架构师的实际代码变更;保持只读,不修改被审查实现。使用 `independent-code-review-workflow` 作为审查入口,按风险按需加载参考资料。以项目规范和需求为依据,提交可复核的问题、证据及风险;不得将未经验证的判断写成缺陷,必要证据不足时明确说明。\n1. 围绕实际变更、关键调用链与约定的验收契约审查功能、安全权限、并发、兼容迁移和重要界面状态;不无目的扫描全仓。\n2. 确认测试到达目标路径、关键断言能捕获缺陷;mock、全绿和静态检查均不自动等于真实验证。独立复跑前确认权限与隔离范围,不污染共享文件。\n3. 将发现区分为已证实缺陷、待验证风险与建议;按 P0/P1/P2/P3 报告位置、触发条件、影响、证据和最小修复建议。复审聚焦修复差异与相关回归。\n4. 视觉判断需亲自读取实际截图;设计争议交队长协调。结论为通过、需修改或证据不足;必要项未验证不得放行,风险接受交队长裁决。\n5. 沿用既有团队通信规范提交审查结论:先给结论,再列可复核的证据位置、未验证项与待决风险。",
|
|
7953
8114
|
"color": "#8d6bff"
|
|
7954
8115
|
},
|
|
7955
8116
|
{
|
|
7956
8117
|
"name": "executor",
|
|
7957
|
-
"description": "
|
|
7958
|
-
"systemPrompt": "
|
|
8118
|
+
"description": "负责获派范围内的编码、调试、测试、修复与验证交接。",
|
|
8119
|
+
"systemPrompt": "你是研发执行者,负责获派范围内的实现、集成与验证。使用 executor-short-task-workflow 执行任务。\n1. 核对项目规则、任务范围、验收和接口契约;功能或界面歧义交队长。\n2. 存在两个或以上实质独立、可分别验收的编码工作包时,必须调用 agent-subagent-orchestration 并行执行,不得仅因即时委派开销而默认串行。先明确接口、文件所有权和局部验收。\n3. 按最小可验证切片实施,沿用项目技术栈,不改无关文件、不覆盖他人产物、不擅自扩大范围。孙代理不得继续派生;你负责检查 diff、集成、冲突处理和最终回归。\n4. 单一局部任务、强依赖或共享文件冲突时不强行并行;宿主能力/名额不足时说明原因并调整。运行与风险匹配的测试、lint、构建或真实链路,未运行不得报通过。\n5. 按 STATUS、TASK_ID、CHANGES、TESTS、BLOCKERS 汇报;证据提供路径和命令,长日志只给位置。Git/Release/仓库文档任务按需使用对应 Skill;push、发布和改写历史需单独授权。",
|
|
7959
8120
|
"color": "#4c8dff"
|
|
7960
8121
|
}
|
|
8122
|
+
],
|
|
8123
|
+
"officialSkills": [
|
|
8124
|
+
{
|
|
8125
|
+
"skillId": "agent-leader-communication",
|
|
8126
|
+
"roleName": "team-lead"
|
|
8127
|
+
},
|
|
8128
|
+
{
|
|
8129
|
+
"skillId": "leader-medium-task-workflow",
|
|
8130
|
+
"roleName": "team-lead"
|
|
8131
|
+
},
|
|
8132
|
+
{
|
|
8133
|
+
"skillId": "leader-long-task-orchestration",
|
|
8134
|
+
"roleName": "team-lead"
|
|
8135
|
+
},
|
|
8136
|
+
{
|
|
8137
|
+
"skillId": "agent-subagent-orchestration",
|
|
8138
|
+
"roleName": "team-lead"
|
|
8139
|
+
},
|
|
8140
|
+
{
|
|
8141
|
+
"skillId": "frontend-engineering-workflow",
|
|
8142
|
+
"roleName": "ui-designer"
|
|
8143
|
+
},
|
|
8144
|
+
{
|
|
8145
|
+
"skillId": "backend-architecture-workflow",
|
|
8146
|
+
"roleName": "backend-architect"
|
|
8147
|
+
},
|
|
8148
|
+
{
|
|
8149
|
+
"skillId": "independent-code-review-workflow",
|
|
8150
|
+
"roleName": "reviewer"
|
|
8151
|
+
},
|
|
8152
|
+
{
|
|
8153
|
+
"skillId": "agent-subagent-orchestration",
|
|
8154
|
+
"roleName": "reviewer"
|
|
8155
|
+
},
|
|
8156
|
+
{
|
|
8157
|
+
"skillId": "executor-short-task-workflow",
|
|
8158
|
+
"roleName": "executor"
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
"skillId": "agent-subagent-orchestration",
|
|
8162
|
+
"roleName": "executor"
|
|
8163
|
+
},
|
|
8164
|
+
{
|
|
8165
|
+
"skillId": "git-release-hygiene",
|
|
8166
|
+
"roleName": "executor"
|
|
8167
|
+
},
|
|
8168
|
+
{
|
|
8169
|
+
"skillId": "github-repository-presentation",
|
|
8170
|
+
"roleName": "executor"
|
|
8171
|
+
}
|
|
7961
8172
|
]
|
|
7962
8173
|
}
|
|
7963
8174
|
},
|
|
@@ -7974,9 +8185,9 @@ const BUILTIN_TEAM_CATALOG = [
|
|
|
7974
8185
|
"复杂重构"
|
|
7975
8186
|
],
|
|
7976
8187
|
"quickPrompts": ["为现有项目增加用户认证模块并验证", "统一 Web 与桌面端的设置页面交互"],
|
|
7977
|
-
"notes": "
|
|
8188
|
+
"notes": "五个成员(含队长):顾问职责拆成 UI 前端工程师与后端架构师两个专业角色,执行者承担常规实施,代码审查员独立验收;跨端一致性由队长裁定。"
|
|
7978
8189
|
},
|
|
7979
|
-
officialSkillBindings:
|
|
8190
|
+
officialSkillBindings: OFFICIAL_SPECIALIST_SKILLS
|
|
7980
8191
|
},
|
|
7981
8192
|
{
|
|
7982
8193
|
id: "builtin-discovery",
|
|
@@ -9651,6 +9862,69 @@ function registerPresetTools(ctx, agent, config, namespace, appliedTeamId = () =
|
|
|
9651
9862
|
for (const dispose of disposers.splice(0).reverse()) dispose();
|
|
9652
9863
|
};
|
|
9653
9864
|
}
|
|
9865
|
+
|
|
9866
|
+
|
|
9867
|
+
/**
|
|
9868
|
+
* Whether a Session's Team-themed tools follow the Team mode it was started in.
|
|
9869
|
+
*
|
|
9870
|
+
* The official `team_task_*` tools are declared only while a Session root has
|
|
9871
|
+
* Agent Teams turned on. This plugin's seven Team-themed tools — five that manage
|
|
9872
|
+
* the private skill library, two that read and edit the Team preset — answer the
|
|
9873
|
+
* same question the same way: with Team mode off a Session carries no Team, no
|
|
9874
|
+
* selected role, and no library to manage, so declaring those schemas there
|
|
9875
|
+
* spends context on capabilities the Session cannot use. The composer already
|
|
9876
|
+
* hides its Team control on the same fact, so gating the tools keeps the model
|
|
9877
|
+
* side and the page side describing one behaviour instead of two.
|
|
9878
|
+
*
|
|
9879
|
+
* WHY THIS IS A REGISTRATION DECISION, NOT A `when` CONDITION
|
|
9880
|
+
*
|
|
9881
|
+
* A conditional registration (`tools.register(def, { when })`) is not readable
|
|
9882
|
+
* outside a model step: `tools.executable()` answers undefined for it without a
|
|
9883
|
+
* step's admitted set. Three paths in this plugin read tool visibility outside a
|
|
9884
|
+
* step — the quarantine guard that decides what a paused Session may reach, the
|
|
9885
|
+
* `capabilityRefusal` preflight that proves a custom allow-list names tools this
|
|
9886
|
+
* Session composes, and the member-creation route resolution. Conditional
|
|
9887
|
+
* registrations would make those tools look absent at every one of them,
|
|
9888
|
+
* including the window while a Team is being applied, when the paused captain
|
|
9889
|
+
* must still reach its recovery tools.
|
|
9890
|
+
*
|
|
9891
|
+
* Withdrawing the registration instead keeps one answer per tool: a name is
|
|
9892
|
+
* either registered and readable from outside a step, or it is not installed at
|
|
9893
|
+
* all. Nothing observes a registered-but-unreadable half state.
|
|
9894
|
+
* @module dsh-agent-team-presets/team-mode
|
|
9895
|
+
*/
|
|
9896
|
+
/** The projection key the Agent Teams service publishes. */
|
|
9897
|
+
const TEAM_PROJECTION = "agentTeam";
|
|
9898
|
+
/**
|
|
9899
|
+
* Read the Agent Teams mode of one Session root from the session projections.
|
|
9900
|
+
* @param projections - the projection registry, when this deployment composes one.
|
|
9901
|
+
* @param agent - the Agent whose mode is being read.
|
|
9902
|
+
* @returns `true`/`false` when the mode is observable, `undefined` when it is not.
|
|
9903
|
+
*/
|
|
9904
|
+
function teamModeOf(projections, agent) {
|
|
9905
|
+
const registry = projections;
|
|
9906
|
+
if (registry?.snapshot === void 0) return void 0;
|
|
9907
|
+
let projection;
|
|
9908
|
+
try {
|
|
9909
|
+
projection = registry.snapshot(agent.session, [TEAM_PROJECTION]).values[TEAM_PROJECTION];
|
|
9910
|
+
} catch {
|
|
9911
|
+
return;
|
|
9912
|
+
}
|
|
9913
|
+
return projection === void 0 ? void 0 : projection.enabled === true;
|
|
9914
|
+
}
|
|
9915
|
+
/**
|
|
9916
|
+
* Whether the Team-themed tools belong on this Session right now.
|
|
9917
|
+
*
|
|
9918
|
+
* An unobservable mode keeps them installed: only a positively read "Team mode is
|
|
9919
|
+
* off" removes them, because a deployment that composes no Agent Teams service
|
|
9920
|
+
* has no switch to turn on and must keep the management surface it always had.
|
|
9921
|
+
* @param projections - the projection registry, when this deployment composes one.
|
|
9922
|
+
* @param agent - the Session root being adopted.
|
|
9923
|
+
* @returns whether to register the seven tools.
|
|
9924
|
+
*/
|
|
9925
|
+
function teamModeAdmitsTools(projections, agent) {
|
|
9926
|
+
return teamModeOf(projections, agent) !== false;
|
|
9927
|
+
}
|
|
9654
9928
|
/** A refusal carrying the path that produced it. */
|
|
9655
9929
|
var SkillPathError = class extends Error {
|
|
9656
9930
|
reason;
|
|
@@ -16876,9 +17150,20 @@ var TeamSkillStore = class {
|
|
|
16876
17150
|
get(assetId) {
|
|
16877
17151
|
return this.table.get(assetId);
|
|
16878
17152
|
}
|
|
17153
|
+
/**
|
|
17154
|
+
* Resolve one skill by its name rather than by asset identity.
|
|
17155
|
+
*
|
|
17156
|
+
* Several assets may legitimately share a name: the shipped copy, a local
|
|
17157
|
+
* override of it, and a skill the user imported under the same name. The
|
|
17158
|
+
* shipped copy wins, because a name denotes the skill the plugin ships — a
|
|
17159
|
+
* user's own copy must never shadow it for a caller that only said the name.
|
|
17160
|
+
* Callers that know which copy they mean pass the asset id instead.
|
|
17161
|
+
* @param skillId - kebab-case skill name.
|
|
17162
|
+
* @returns the shipped copy when it exists, else the best local one.
|
|
17163
|
+
*/
|
|
16879
17164
|
bySkillId(skillId) {
|
|
16880
17165
|
const candidates = this.list().filter((asset) => asset.skillId === skillId);
|
|
16881
|
-
return candidates.find((asset) => asset.origin === "override") ?? candidates.find((asset) => asset.origin === "custom") ?? candidates[0];
|
|
17166
|
+
return candidates.find((asset) => asset.origin === "builtin") ?? candidates.find((asset) => asset.origin === "override") ?? candidates.find((asset) => asset.origin === "custom") ?? candidates[0];
|
|
16882
17167
|
}
|
|
16883
17168
|
/** Commit all nested store mutations once; failures restore memory and version folders. */
|
|
16884
17169
|
async transaction(operation) {
|
|
@@ -16923,6 +17208,10 @@ var TeamSkillStore = class {
|
|
|
16923
17208
|
const checked = buildSkillPackage(input);
|
|
16924
17209
|
if (!checked.ok) throw new Error(`invalid skill package: ${checked.reason}`);
|
|
16925
17210
|
assetDirectoryName(package_.name);
|
|
17211
|
+
if (options.origin !== "builtin") {
|
|
17212
|
+
const clash = [...this.table.values()].find((asset) => asset.skillId === package_.name && asset.id !== options.id && !(options.origin === "override" && asset.origin === "builtin"));
|
|
17213
|
+
if (clash !== void 0) throw new Error(`the skill name "${package_.name}" already belongs to ${clash.id}; a skill name is the identity a binding uses`);
|
|
17214
|
+
}
|
|
16926
17215
|
const target = this.assetPath(options.id, options.version);
|
|
16927
17216
|
const manifest = this.manifestPath(options.id, options.version);
|
|
16928
17217
|
await assertNoSymlinks(target);
|
|
@@ -17352,6 +17641,19 @@ function seedOwner(key) {
|
|
|
17352
17641
|
} catch {}
|
|
17353
17642
|
}
|
|
17354
17643
|
/** The Team Skill library plus its role bindings. */
|
|
17644
|
+
/**
|
|
17645
|
+
* Whether two assets are the shipped copy and its own editable copy.
|
|
17646
|
+
*
|
|
17647
|
+
* They share a name because they ARE the same skill: the override is the shipped
|
|
17648
|
+
* body with the user's edits. Presenting that pair as a name clash made an
|
|
17649
|
+
* ordinary "I made a local copy" state read as a defect.
|
|
17650
|
+
* @param left - one asset.
|
|
17651
|
+
* @param right - the other asset.
|
|
17652
|
+
* @returns true when one is the shipped copy and the other its override.
|
|
17653
|
+
*/
|
|
17654
|
+
function sanctionedCopy(left, right) {
|
|
17655
|
+
return left.origin === "builtin" && right.origin === "override" && right.officialSkillId === left.skillId || right.origin === "builtin" && left.origin === "override" && left.officialSkillId === right.skillId;
|
|
17656
|
+
}
|
|
17355
17657
|
var TeamSkillManager = class {
|
|
17356
17658
|
store;
|
|
17357
17659
|
bindings = [];
|
|
@@ -17639,28 +17941,20 @@ var TeamSkillManager = class {
|
|
|
17639
17941
|
const memberRole = member === void 0 ? void 0 : member.id ?? member.name;
|
|
17640
17942
|
const roleId = isCaptain ? CAPTAIN_ROLE : memberRole === "captain" ? void 0 : memberRole;
|
|
17641
17943
|
if (roleId === void 0) continue;
|
|
17642
|
-
const assetId =
|
|
17643
|
-
if (assetId === void 0) continue;
|
|
17944
|
+
const assetId = `builtin:${declaration.skillId}`;
|
|
17945
|
+
if (this.store.get(assetId) === void 0) continue;
|
|
17644
17946
|
const key = JSON.stringify([
|
|
17645
17947
|
team.id,
|
|
17646
17948
|
roleId,
|
|
17647
|
-
|
|
17949
|
+
assetId
|
|
17648
17950
|
]);
|
|
17649
|
-
if (this.
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
teamId: team.id,
|
|
17655
|
-
roleId,
|
|
17656
|
-
assetId,
|
|
17657
|
-
...roleId === "captain" ? { captain: true } : {}
|
|
17658
|
-
};
|
|
17659
|
-
}
|
|
17660
|
-
continue;
|
|
17661
|
-
}
|
|
17951
|
+
if (this.bindings.some((row) => {
|
|
17952
|
+
if (row.teamId !== team.id || row.roleId !== roleId) return false;
|
|
17953
|
+
return this.store.get(row.assetId)?.skillId === declaration.skillId;
|
|
17954
|
+
})) continue;
|
|
17955
|
+
if (this.seeded.has(key)) continue;
|
|
17662
17956
|
this.seeded.add(key);
|
|
17663
|
-
|
|
17957
|
+
this.bindings.push({
|
|
17664
17958
|
teamId: team.id,
|
|
17665
17959
|
roleId,
|
|
17666
17960
|
assetId,
|
|
@@ -17671,23 +17965,30 @@ var TeamSkillManager = class {
|
|
|
17671
17965
|
if (JSON.stringify([this.bindings, [...this.seeded]]) !== before) await this.flush();
|
|
17672
17966
|
}
|
|
17673
17967
|
/**
|
|
17674
|
-
*
|
|
17968
|
+
* Move every role holding one asset onto another.
|
|
17675
17969
|
*
|
|
17676
|
-
*
|
|
17677
|
-
*
|
|
17678
|
-
*
|
|
17679
|
-
*
|
|
17680
|
-
*
|
|
17681
|
-
*
|
|
17682
|
-
* @param skillId - shipped skill identity the default names.
|
|
17683
|
-
* @returns the asset identity to bind, or undefined when neither copy exists.
|
|
17970
|
+
* Used by "restore to the built-in version": the roles reading a local copy
|
|
17971
|
+
* have to read the shipped one again, or the restore would only change bytes
|
|
17972
|
+
* nobody is bound to.
|
|
17973
|
+
* @param fromAssetId - asset the roles hold now.
|
|
17974
|
+
* @param toAssetId - asset they should hold.
|
|
17975
|
+
* @returns the number of bindings moved.
|
|
17684
17976
|
*/
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17977
|
+
async replaceAssetBindings(fromAssetId, toAssetId) {
|
|
17978
|
+
return this.mutate(async () => {
|
|
17979
|
+
if (this.store.get(toAssetId) === void 0) return 0;
|
|
17980
|
+
let moved = 0;
|
|
17981
|
+
this.bindings = this.bindings.map((row) => {
|
|
17982
|
+
if (row.assetId !== fromAssetId) return row;
|
|
17983
|
+
moved += 1;
|
|
17984
|
+
return {
|
|
17985
|
+
...row,
|
|
17986
|
+
assetId: toAssetId
|
|
17987
|
+
};
|
|
17988
|
+
});
|
|
17989
|
+
if (moved > 0) await this.flush();
|
|
17990
|
+
return moved;
|
|
17991
|
+
});
|
|
17691
17992
|
}
|
|
17692
17993
|
mutate(operation) {
|
|
17693
17994
|
const result = this.pending.then(async () => {
|
|
@@ -17815,12 +18116,24 @@ var TeamSkillManager = class {
|
|
|
17815
18116
|
*/
|
|
17816
18117
|
async restoreBuiltinBindings(teamIds) {
|
|
17817
18118
|
return this.mutate(async () => {
|
|
17818
|
-
const
|
|
18119
|
+
const requested = Array.isArray(teamIds) ? teamIds : [];
|
|
18120
|
+
const targets = new Set(requested.length === 0 ? BUILTIN_TEAM_IDS : requested);
|
|
17819
18121
|
this.seeded = new Set([...this.seeded].filter((key) => {
|
|
17820
18122
|
const owner = seedOwner(key);
|
|
17821
18123
|
return owner === void 0 || !targets.has(owner[0]);
|
|
17822
18124
|
}));
|
|
18125
|
+
this.bindings = this.bindings.map((row) => {
|
|
18126
|
+
if (!targets.has(row.teamId)) return row;
|
|
18127
|
+
const asset = this.store.get(row.assetId);
|
|
18128
|
+
if (asset?.origin !== "override" || asset.officialSkillId === void 0) return row;
|
|
18129
|
+
const builtinId = `builtin:${asset.officialSkillId}`;
|
|
18130
|
+
return this.store.get(builtinId) === void 0 ? row : {
|
|
18131
|
+
...row,
|
|
18132
|
+
assetId: builtinId
|
|
18133
|
+
};
|
|
18134
|
+
});
|
|
17823
18135
|
await this.reconcileNow();
|
|
18136
|
+
await this.flush();
|
|
17824
18137
|
});
|
|
17825
18138
|
}
|
|
17826
18139
|
/**
|
|
@@ -18223,10 +18536,29 @@ var TeamSkillRuntime = class {
|
|
|
18223
18536
|
* providers, and an explicit `skillRoot` config value always wins.
|
|
18224
18537
|
* @module dsh-agent-team-presets/team-skills
|
|
18225
18538
|
*/
|
|
18226
|
-
/**
|
|
18539
|
+
/**
|
|
18540
|
+
* The skills the package ships under `assets/skills`.
|
|
18541
|
+
*
|
|
18542
|
+
* The engineering workflow skills are bound to a role by `team-catalog.ts`; the
|
|
18543
|
+
* three professional-role workflows (`frontend-engineering-workflow`,
|
|
18544
|
+
* `backend-architecture-workflow`, `independent-code-review-workflow`) are the
|
|
18545
|
+
* progressive-loading entry points of the UI frontend engineer, the backend
|
|
18546
|
+
* architect, and the independent reviewer, whose detailed methods live in each
|
|
18547
|
+
* skill's `references/` folder; `grilling` and `research` are method skills the
|
|
18548
|
+
* work-mode Teams bind instead.
|
|
18549
|
+
*/
|
|
18227
18550
|
const OFFICIAL_SKILL_IDS = [
|
|
18551
|
+
"agent-leader-communication",
|
|
18552
|
+
"leader-medium-task-workflow",
|
|
18553
|
+
"leader-long-task-orchestration",
|
|
18554
|
+
"agent-subagent-orchestration",
|
|
18555
|
+
"fullstack-advisor",
|
|
18556
|
+
"executor-short-task-workflow",
|
|
18228
18557
|
"github-repository-presentation",
|
|
18229
18558
|
"git-release-hygiene",
|
|
18559
|
+
"frontend-engineering-workflow",
|
|
18560
|
+
"backend-architecture-workflow",
|
|
18561
|
+
"independent-code-review-workflow",
|
|
18230
18562
|
"grilling",
|
|
18231
18563
|
"research"
|
|
18232
18564
|
];
|
|
@@ -18320,7 +18652,7 @@ var TeamSkills = class {
|
|
|
18320
18652
|
entries.push({
|
|
18321
18653
|
skillId,
|
|
18322
18654
|
directory: join(directory, skillId),
|
|
18323
|
-
version: "
|
|
18655
|
+
version: "5"
|
|
18324
18656
|
});
|
|
18325
18657
|
} catch {
|
|
18326
18658
|
log(`the shipped skill "${skillId}" is not present in this installation`);
|
|
@@ -18759,7 +19091,7 @@ let TeamSkillService = (() => {
|
|
|
18759
19091
|
fileCount: asset.files.length,
|
|
18760
19092
|
totalBytes: asset.files.reduce((sum, file) => sum + file.size, 0),
|
|
18761
19093
|
mcpServers: asset.dependencies.mcpServers.map((server) => server.serverName),
|
|
18762
|
-
clashesWith: this.config.store.list().filter((other) => other.id !== asset.id && other.skillId === asset.skillId).map((other) => other.id),
|
|
19094
|
+
clashesWith: this.config.store.list().filter((other) => other.id !== asset.id && other.skillId === asset.skillId && !sanctionedCopy(asset, other)).map((other) => other.id),
|
|
18763
19095
|
bindings: this.config.manager.bindingSummaries(assetId)
|
|
18764
19096
|
};
|
|
18765
19097
|
}
|
|
@@ -19192,7 +19524,8 @@ let TeamSkillService = (() => {
|
|
|
19192
19524
|
detail: issue
|
|
19193
19525
|
};
|
|
19194
19526
|
try {
|
|
19195
|
-
await this.config.store.resetOverride(assetId);
|
|
19527
|
+
const reset = await this.config.store.resetOverride(assetId);
|
|
19528
|
+
if (reset.officialSkillId !== void 0) await this.config.manager.replaceAssetBindings(assetId, `builtin:${reset.officialSkillId}`);
|
|
19196
19529
|
} catch (error) {
|
|
19197
19530
|
return {
|
|
19198
19531
|
ok: false,
|
|
@@ -19321,6 +19654,7 @@ let TeamSkillService = (() => {
|
|
|
19321
19654
|
try {
|
|
19322
19655
|
await this.config.manager.restoreBuiltinBindings(teamIds);
|
|
19323
19656
|
} catch (error) {
|
|
19657
|
+
this.ctx.logger.warn("agent-team-presets: restoring built-in Team Skill bindings failed: %s", String(error));
|
|
19324
19658
|
return {
|
|
19325
19659
|
...await this.library(),
|
|
19326
19660
|
issue: String(error)
|
|
@@ -21342,8 +21676,21 @@ function apply(ctx, config) {
|
|
|
21342
21676
|
const selection = config.selections.get().find((row) => row.sessionId === agent.session.id);
|
|
21343
21677
|
const selectedId = selection?.teamId;
|
|
21344
21678
|
const selectedRole = selectedRoleId(selection);
|
|
21345
|
-
|
|
21346
|
-
|
|
21679
|
+
let projections;
|
|
21680
|
+
try {
|
|
21681
|
+
projections = ctx.get("sessionProjections");
|
|
21682
|
+
} catch {
|
|
21683
|
+
projections = void 0;
|
|
21684
|
+
}
|
|
21685
|
+
if (!teamModeAdmitsTools(projections, agent)) {
|
|
21686
|
+
presetTools.get(agent)?.();
|
|
21687
|
+
presetTools.delete(agent);
|
|
21688
|
+
skillTools.get(agent)?.();
|
|
21689
|
+
skillTools.delete(agent);
|
|
21690
|
+
} else {
|
|
21691
|
+
if (!presetTools.has(agent)) presetTools.set(agent, registerPresetTools(ctx, agent, config, NAMESPACE, (root) => applications.get(root)?.teamId));
|
|
21692
|
+
if (!skillTools.has(agent)) skillTools.set(agent, registerTeamSkillTools(ctx, agent, skillToolDeps));
|
|
21693
|
+
}
|
|
21347
21694
|
if (startingTask ? teammatesBusy(ctx, agent) : agent.status === "running" || teammatesBusy(ctx, agent)) {
|
|
21348
21695
|
if (!applications.has(agent)) {
|
|
21349
21696
|
const marked = hasTeamApplicationMarker(agent);
|
|
@@ -21572,6 +21919,14 @@ function apply(ctx, config) {
|
|
|
21572
21919
|
if (root === void 0) return;
|
|
21573
21920
|
reconcile(root, isSessionRoot(agent) && status === "running");
|
|
21574
21921
|
});
|
|
21922
|
+
ctx.on("session/event", (session, event) => {
|
|
21923
|
+
if (event.type !== "team/mode") return;
|
|
21924
|
+
const agent = ctx.agents.get(session.id);
|
|
21925
|
+
if (agent === void 0 || !isSessionRoot(agent)) return;
|
|
21926
|
+
queueMicrotask(() => {
|
|
21927
|
+
if (!disposed) reconcile(agent);
|
|
21928
|
+
});
|
|
21929
|
+
});
|
|
21575
21930
|
ctx.on("session/event", (session, event) => {
|
|
21576
21931
|
if (event.type !== "subagent/catalog") return;
|
|
21577
21932
|
const agent = ctx.agents.get(session.id);
|