@huaq5098/dsh-agent-roles 0.0.0-stage → 0.4.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 guhuo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,172 @@
1
- # Temporary Holding Version
1
+ # @huaq5098/dsh-agent-roles
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DSH(`@deepseek-ai/dsh` 0.2.1-rc.4)插件 bundle:用户配置**命名子代理角色**,主代理按 `roleId` 派发。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ dsh plugin --profile web add @huaq5098/dsh-agent-roles
9
+ ```
10
+
11
+ 兼容 `dsh >=0.2.1-rc.4 <0.3.0`(`engines.dsh`)。安装后自动加入该 profile 的 `dsh.profile.bundles`,重启 DSH 生效;角色在设置页「子代理角色」里配置。详见 [§2 装进某个 profile](#2-装进某个-profile)。
12
+
13
+ ## 0.4.0 更新
14
+
15
+ - 发布准备:删 `private`,补 `engines.dsh`、`peerDependencies`(全部 `optional`)、`keywords`、`license`、`publishConfig`、`prepack`/`prepublishOnly`,补 LICENSE 文件。
16
+ - **空安装即可用**:`bundle.patch.yml` 预置一个 `general-worker` 角色(通用执行、`toolAccess: all`、模型跟随当前主模型)。`dsh plugin add` 之后不必先去设置页建角色,主代理立刻能 `role_spawn`。
17
+ - **路由可以跟随当前主模型**:设置页的服务商下拉多了「跟随当前主模型」,存成 `route: { inherit: true }`;派发时整条 `agentOptions` 不传,由宿主继承主代理**派发那一刻**的 provider/model/effort。想固定模型照旧选服务商即可。
18
+ - 删掉了此前「角色列表为空时临时造一个隐形 `default` 角色」的旁路:现在只有一条派发路径,`role_spawn` 的 `roleId` 必须是配置里真实存在的角色,`default` 不再是保留 id。
19
+ - 本版新增 `engines.dsh` 后,安装期开始有版本把关:不满足范围的 DSH 会拒绝安装并整体回滚(可用 `dsh plugin allow-version` 显式放行)。
20
+ - 首次在真实宿主上验证安装链路:`dsh plugin add` → `--dump-config` → boot,全程通过(见 §5)。
21
+
22
+ ## 0.3.0 更新
23
+
24
+ - 每个工具分类和 MCP server 增加三态全选框;搜索时仅操作匹配项,保留其他组和隐藏的已选工具。
25
+ - 必填 `toolAccess: 'selected' | 'all'`:指定模式使用精确名单;所有模式不施加角色白名单,包含后续新增的实际可用工具,但仍保留宿主权限及固定模型防旁路限制。
26
+ - 所有模式下清单只读;原指定名单保留,切回指定模式可继续使用。`toolAccess` 进入角色归档和版本指纹。
27
+ - 不做迁移或默认兼容:旧角色配置和旧归档缺少 `toolAccess` 会被拒绝,需重新创建。空安装不受影响。
28
+
29
+ ## 0.2.0 更新
30
+
31
+ - 设置页按确认的第四版原型实现:角色 / 会话分支两个 Tab,独立二级编辑页,模型配置分组,紧凑工具勾选与搜索。
32
+ - 角色只使用唯一 `id`,删除 `name`,不做旧配置或归档迁移;有旧字段的配置需自行重新创建。
33
+ - 思考强度来自宿主每个模型的能力目录;更换服务商或模型会清除旧档位,不预选模型。
34
+ - 工具目录通过本插件只读 Typert 服务读取真实全局注册项,区分原生/插件与 MCP server,常驻显示英文标识。全局目录不含仅在特定会话挂载的工具;可在折叠区添加精确标识,目录外的已选项不会被丢弃。
35
+ - 空工具列表允许保存(仅文本输出,宿主固定保留的控制工具不受此设置影响)。编辑期间配置变更会阻止覆盖;删除及放弃草稿需确认。
36
+ - 验证包含本机真实 ConfigFormController 渲染、交互回归、真实 Cordis/Typert 服务注册和作用域隔离。未安装进用户 profile,也未重启现有服务;不把测试通过等同于在线 GUI 已更新。
37
+
38
+ ## 功能
39
+
40
+ ### 宿主侧(`src/policy.ts` / `src/host.ts` / `src/index.ts`)
41
+
42
+ - 两个派发工具:`role_spawn(roleId, task)`、`role_fork(task)`。参数面上没有 `model` / `provider` / `preset` / `tools` / `systemPrompt`,覆盖在执行层直接被拒,不靠提示词劝阻。
43
+ - 每个 spawn 角色固定三项:模型路由、`systemPrompt`、工具精确白名单。路由有两种形状:写死 `provider` + `model`(可选 `reasoningEffort`),或写 `route: { inherit: true }` 跟随当前主模型——后者派发时整条 `agentOptions` 不传,由宿主 `resolveChildAgentOptions` 继承父会话此刻的 provider/model/effort。`send_message` / `interrupt_agent` 由宿主恒定保留,白名单关不掉。
44
+ - fork 只固定模型,取自顶层 `forkRoute`;`forkRoute` 缺失时 `role_fork` 拒绝而不是回退父会话模型。forkRoute **不接受** `inherit`:分支的契约就是固定路由,允许跟随会把「分支」退化成普通子代理,因此 policy 层直接拒绝。
45
+ - 每个角色按内容派生版本(`policyFingerprint` → sha256 版本 id)归档进内部字段 `roleVersions`,旧子会话按它开始时的版本恢复。
46
+ - **本插件不注册任何 agent preset**(0.3.1 起):宿主的 preset registry 没有任何 hidden / internal 注册面(`list()` / `remoteExportList()` / `compositionInventory()` 都全量遍历 `definitions`,`@deepseek-ai/dsh-agent-preset` 的 `Config` 没有 hidden 字段,客户端 `presetOptions()` 只过滤 broken),所以凡注册必进 GUI「Agent 预设」列表。真删除的唯一做法是不调用 `agentPresets.register()`。
47
+ - 角色身份改由两处自有档案承担:`roleVersions`(角色版本快照)与 `roleChildren`(`[{ childId, versionId }]`,子会话 → 版本)。派发时宿主预铸 childId 传给 `startActivation({ childId })`(`dsh-subagent/lib/index.js:1397` 就是 `spec.childId ?? brandString(randomUUID())`,本地 spawn provider 有 `prepareContinuable`,满足「reserved child ids require a local backend」),**两条档案先落盘再启动**;子会话不传 `agentPreset`,走宿主 native 的「继承父组合」(`child-agent.js` 的 `applyChildComposition` → `composeFrom`,不 mount 预设)。
48
+ - 冷恢复按 `header.id` 查 `roleChildren` → `roleVersions`,再用归档快照装配角色面;0.3.0 的旧会话(`header.agentPreset = roles:<roleId>@<versionId>`)仍按归档快照绑定,只是这些 id 不再注册进 registry,宿主若按 preset id 冷恢复会以 `agent-preset/not-found` 拒绝。
49
+ - 主代理上下文注入角色目录(ID 与描述)。空安装即预置一个 `general-worker` 角色,模型跟随当前主模型,装完即可派发。
50
+
51
+ ### 配置页(`src/client.tsx`,注册为设置项「子代理角色」)
52
+
53
+ - 角色新增 / 编辑 / 删除:唯一 id、描述、系统提示词、固定 provider + model(+ 推理档)、工具勾选及精确标识补充。id 创建后只读,重复 id 在写入前拦下。列表不展开长提示词;编辑为独立二级页面。
54
+ - 模型优先从宿主 session 的 model catalog 三级选择(provider → model → 推理档);目录不可用、或目录里没有目标模型时切手填模式。
55
+ - 新建角色起手就是「跟随当前主模型」,想固定模型才去服务商下拉里选一项,此时模型与思考强度启用、必须填全。不展示无关的宿主默认模型卡片,也不把宿主默认模型抄进配置;选了模型也不会自动写入该模型的默认推理档(该键留空即由宿主取默认)。
56
+ - fork 固定模型是本地草稿 + 显式「保存」才写入宿主(半截的 provider/model 不会发给宿主),「清除」后分支不可派发,不回退继承模型。
57
+ - 所有写入都是 `roles` / `forkRoute` 的逐路径 op,从不重写整节,因此宿主的内部 `roleVersions` 不会被本页覆盖。宿主拒绝写入(修订号过期或 schema 不合)时提示冲突并保留未提交草稿。
58
+ - 文本字段写入前按宿主的读取口径 trim,落盘值即生效值。
59
+
60
+ ## 构建
61
+
62
+ ```bash
63
+ npm install # typescript, esbuild, @types/react, @types/node
64
+ npm run build # -> dist/policy.js dist/host.js dist/index.js dist/client.js
65
+ ```
66
+
67
+ - 宿主三个模块各自单独编译(`bundle: true`、ESM、`platform: node`、`target: node22`);`@deepseek-ai/*` 保持 external,由运行中的 DSH 安装提供。`dist/index.js` 会把 policy / host 再内联一次,不产生第二个实例。
68
+ - `dist/client.js` 包成 `window.__ModuleLoader__.load({ id, factory })` 的 CJS;`react` 与平台包不打包,避免与 shell 争抢第二份 React。
69
+ - 本地没有 esbuild 时可用 `DSH_AGENT_ROLES_ESBUILD=<esbuild 包目录绝对路径> npm run build`。
70
+
71
+ ## 类型检查
72
+
73
+ 真实 typecheck 依赖本机 DSH 安装树里的 `@deepseek-ai/*` 类型,走机器本地、git-ignored 的覆盖配置:
74
+
75
+ ```bash
76
+ npm run typecheck:local # tsc -p tsconfig.local.json
77
+ ```
78
+
79
+ `tsconfig.local.json` 里唯一允许出现绝对路径,换机器改那三行 `paths` 即可。可移植的 `npm run typecheck` 不含绝对路径,但 `./node_modules` 里没有平台包,必定报 `TS2307`,只用于无 DSH 安装的机器上看非平台侧的诊断。
80
+
81
+ 当前状态(实测于 `src/index.ts` 的 C1 装配版):`npm run typecheck:local` 零错误,`src/client.tsx` / `src/host.ts` / `src/policy.ts` 同样零错误;`npm run build` 出齐四个产物,`npm test` 89/89 通过(0.4.0)。esbuild 不做类型门禁,构建绿不等于宿主里跑得起来——见「未验证 / 限制」。
82
+
83
+ ## 测试
84
+
85
+ ```bash
86
+ npm test # node:test,89 项,不需要额外框架
87
+ ```
88
+
89
+ - `test/policy.test.mjs` 与 `test/acceptance.test.mjs` 直接 import 构建产物 `dist/policy.js` / `dist/host.js`(后者还会校验产物不早于 `src/host.ts`,产物缺失时才降级直读源码)。
90
+ - `test/host.test.mjs` 读 `src/host.ts` / `src/policy.ts`。
91
+ - 客户端渲染使用真实安装版 ConfigFormController;交互测试检查保存路径、冲突保留、空白名单及模型能力联动;目录测试使用真实 Cordis/Typert 注册。完整在线宿主 GUI 尚未安装联调。
92
+
93
+ ## 安装与启用
94
+
95
+ 下列步骤的依据是安装树里 DSH 0.2.1-rc.4 自带的官方文档与代码(`@deepseek-ai/dsh/README.md`、`dsh-plugin-manager/README.md` 与其 client README、`dsh-app-boot/lib/index.js`、`dsh-agent-preset-registry` 类型面、`dsh-client-ui-agent-preset/README.md`)。0.4.0 起,安装链路已在真实宿主上跑通(见 §5 实测记录)。
96
+
97
+ ### 1. bundle 声明格式(已核对为真实字段,非约定俗成)
98
+
99
+ - 宿主用 `package.json` 的 `dsh.bundle.patch` 找 bundle 层:`bundlePatchPaths(packageDir, bundle)` 接受单个路径或路径数组,非字符串数组直接抛错(`dsh-app-boot/lib/index.js:517-530`)。本包指向 `./bundle.patch.yml`。
100
+ - 浏览器产物用 `dsh.client`(`platform` / `immediately` / `inject`)加 `./client` 导出,与 bundle patch 并列;产物形态是「注册一个 id 等于包名的懒工厂」,React 取自浏览器模块表,不再装第二份 —— 本包 `dist/client.js` 即按此形态生成。
101
+ - 配置分层顺序(官方 README):`dsh.profile.bundles` 里各 bundle 的 patch → profile 自己的 `cordis.patch.yml` → `$DSH_HOME/cordis.patch.yml` → `--patch` 覆盖。`bundle.patch.yml` 只 `insert` 行、不 disable 任何官方行,所以要排在 `dsh-base` / `dsh-web-app` 之后。
102
+
103
+ ### 2. 装进某个 profile
104
+
105
+ `dsh` 是唯一受支持的启动器,profile 位于 `$DSH_HOME/profiles/<name>`:
106
+
107
+ **从 npm 安装(推荐)**:
108
+
109
+ ```bash
110
+ dsh plugin --profile web add @huaq5098/dsh-agent-roles
111
+ ```
112
+
113
+ **从本地 tarball 安装(开发时)**:
114
+
115
+ ```bash
116
+ npm run build
117
+ npm pack
118
+ dsh plugin --profile web add file:D:/Projects/test/dsh-agent-roles/dsh-agent-roles-0.4.0.tgz
119
+ ```
120
+
121
+ 安装成功会把 `@huaq5098/dsh-agent-roles` 追加进该 profile 的 `dsh.profile.bundles`,随即生效;`private` 之类的字段与本步骤无关,`dsh plugin add` 走的是 profile 的 pnpm,不会因为包不是要发布的而拒绝。重启 DSH 并刷新页面即可在侧栏 **Plugins** 看到它。
122
+
123
+ 可在本项目目录执行只读对照检查(不修改 profile、不调用模型):
124
+
125
+ ```bash
126
+ node scripts/verify-install.mjs
127
+ # 也可将待检查的已解包插件目录作为第一个参数
128
+ ```
129
+
130
+ 检查输出包含版本、宿主产物 SHA-256、旧预设是否残留,以及使用真实 DSH schema 库的空配置校验结果。这个检查不等同于真实宿主激活或 UI 已显示。
131
+
132
+ - `dsh plugin --profile <name> <pnpm args>` 就是转发 pnpm 到 profile 目录(官方命令表)。安装成功默认即启用;启用会把 bundle 追加到 `dsh.profile.bundles` **末尾**,从而改变后续配置优先级。
133
+ - 图形入口是 Web 侧栏 **Plugins** 页;`plugin_manager` agent 工具提供同一批操作(Creator 模式启用,每个动作要 `danger-full-access` 或当次批准)。
134
+ - 兼容把关:0.4.0 起声明了 `engines.dsh: ">=0.2.1-rc.4 <0.3.0"`(另有 `@deepseek-ai/dsh-*` peer,全部标 `optional`,因此 pnpm 不会为它们拉包)。实测在 0.2.1-rc.4 / 0.2.1-rc.5 / 0.2.2-rc.x / 0.2.3-alpha.x 上通过,在 0.2.1-rc.3、0.1.5-rc.3、0.3.0 上被拒;被拒时安装会整体回滚,并自带 `allow-version` 放行命令。
135
+ - 开了 HMR 配置改动即时生效,没开则重启生效。
136
+
137
+ ### 3. 主代理的角色派遣入口
138
+
139
+ 插件对普通主会话接入角色派遣,不需要另选主代理预设。bundle 不新增 `roles-standard` 预设,插件本身也不注册任何角色预设。主会话工具接入的真实运行效果尚未联调。
140
+
141
+ ### 已定位的设置入口缺失问题
142
+
143
+ DSH 0.2.1-rc.4 的 `z.object()` 自带 `{}` 默认值。原先 `forkRoute: routeSchema.volatile()` 在未配置 fork 时仍解析空对象,报 `$.forkRoute.provider missing required value`,使宿主插件无法激活。设置服务只发布 active fiber 的配置命名空间,客户端 `whileServed` 因而不会注册页面。
144
+
145
+ 现改为 `z.union([z.const(undefined), routeSchema]).volatile()`,显式允许缺省;回归测试直接使用本机 DSH 的真实 schema 库和正式插件产物,覆盖空配置、有效路由及残缺路由拒绝。该测试不代表真实页面已经显示。
146
+
147
+ ### 4. 配置入口,以及不启动宿主能做的检查
148
+
149
+ - 配置页通过向 `settings.section` 插槽注册出现,标题「子代理角色」。该插槽是 `dsh-client-ui-settings` 声明的真实插槽(`lib/types/client/contract/slots.d.ts`),官方多个设置页同样注册于此。
150
+ - 不启动宿主只能核对**合层**,不能核对 `apply()`:`dsh --profile <name> --dump-config` 合成 profile 的 patch 层而不 boot、不求值 `!!js`;`--dump-config-schema` 合成而不 apply 插件(它自己的注释提醒:import 与懒 schema 构造仍会执行受信模块代码)。两者都不建 Agent,因此看不到 preset 注册与 Loader 行读取是否成功(`@deepseek-ai/dsh/lib/bin.js:203-217` 把这三个 dump 当独立 mode 分发)。0.4.0 起**跑过** `--dump-config`(见 §5)。
151
+ - 要观察真实装配(`roleVersions` 自证、`roleChildren` 冷恢复索引、`startActivation` 带 out 的 childId),条件只有一个:**以宿主身份 boot 插件层,但不提交任何任务**。可用临时数据目录把它与用户 profile 隔开 —— `DSH_HOME` 覆盖 `~/.dsh`(优先级 configured > `$DSH_HOME` > `~/.dsh`,`@deepseek-ai/dsh-home-paths/lib/types/index.d.ts:11,51-59`),临时 profile 最少需要 `package.json`(`private` + `dsh.profile.bundles` 列出本包)、`cordis.yml`(空根 `[]`)、`cordis.patch.yml`(`[]`),再加 `dsh plugin --profile <name> add file:...` 写进的 `node_modules`(模板与初始化:`@deepseek-ai/dsh-app-boot/lib/index.js:590-595,611-623`)。headless 带任务就是普通用户消息 → 必然调用模型(`@deepseek-ai/dsh-headless/README.md:12,100`),所以「不提交任务」是这条验证的硬前提;`dsh --profile <name> --help` 打印完即退出,不会 boot 任何插件。
152
+ - **0.4.0 已做过的**:隔离 `DSH_HOME` 下的安装、`--dump-config`、宿主 boot(见 §5)。**未做过的**:真实任务派发、真实浏览器里的配置页读写。
153
+ - 不碰 profile 的验证只有仓库内的 `npm run build` / `npm run typecheck:local` / `npm test`。
154
+
155
+ ### 5. 0.4.0 实测记录(真实宿主)
156
+
157
+ 以下均在隔离的 `DSH_HOME`(`$TEMP\dshhome-test`)里执行,未触碰真实 `~/.dsh`:
158
+
159
+ - `dsh plugin --profile <p> add file:...0.4.0.tgz` → pnpm 安装成功,`package.json` 自动写入 `dependencies` 与 `dsh.profile.bundles`。
160
+ - `dsh --profile <p> --dump-config` → 输出含 `- id: dsh-agent-roles`,patch 层解析并挂载正常。
161
+ - `dsh --profile <p>` 启动 25 秒未退出,未出现加载错误。
162
+ - 兼容性反向验证:把 `engines.dsh` 改成 `<0.2.0` 的 0.3.2 版被拒,报 `Plugin @huaq5098/dsh-agent-roles@0.3.2 is incompatible with dsh 0.2.1-rc.4 …` 并回滚 `package.json` / `pnpm-lock.yaml` / `node_modules`。
163
+ - `npm test` → **89/89 通过**。
164
+
165
+ ## 未验证 / 限制
166
+
167
+ - **宿主联调范围**:0.4.0 已验证「安装 → 配置合层 → 宿主启动不崩」这条链路(见 §5)。仍未验证的是**提交真实任务后的端到端行为** —— 没有在宿主里实际发起过一次 `role_spawn` 对话,`startActivation` 的真实 childId 装配、descriptor 往返、配置页在真实浏览器里的读写都还没跑过。`test/platform-composition.test.mjs` 直接加载已安装的 `@deepseek-ai/dsh-subagent` 产物,验证了「不传 agentPreset → 继承父组合、不 mount」与「descriptor 的 persona/toolFilter 由宿主原生施加」,但这仍不是端到端宿主联调。
168
+ - 已确认的兼容代价:0.3.0 期间由 `roles:*` 预设派生的子会话,其 `header.agentPreset` 指向的 preset 在 0.3.1 不再注册;宿主按 preset id 冷恢复这些会话会得到 `agent-preset/not-found`。0.3.1 之后派发的子会话改用 `roleChildren` 档案,不受影响。
169
+ - 配置页的渲染与写入序列由一份桩化 React / 平台 facade 脚本核对(非浏览器、非真实 shell):新增 / 编辑 / 删除 / fork 保存与清除 / 重复 id / 目录失败降级 / 写入被拒这些路径的实际 op 已核对;真实 client 注入与 slot 行为未核对。
170
+ - 工具目录为全局注册项,不代表每个子代理都加载了它们。会话专属工具需精确标识补充,最终仍由宿主实际作用域和白名单约束;不支持通配符。
171
+ - `bundle.patch.yml` 的行结构已在真实宿主上按 `--dump-config` 核对;兼容性门槛见 §2 末条,`engines.dsh` 已声明。
172
+ - 跟随主模型的语义边界:继承的是**发起派发的那一层代理**当前的模型。若子代理再派发子代理,第二层继承的是第一层,而不是最初的顶层主会话。
@@ -0,0 +1,99 @@
1
+ # Install after dsh-base and dsh-web-app. Role dispatch attaches to main
2
+ # sessions directly; no extra user-selectable main-agent preset is needed.
3
+ - insert:
4
+ - id: dsh-agent-roles
5
+ name: '@huaq5098/dsh-agent-roles'
6
+ config:
7
+ # 预置一个通用角色:装完即可派发,模型跟随当前主模型。
8
+ roles:
9
+ - id: general-worker
10
+ description: "General-purpose execution subagent: given a well-defined task, it
11
+ independently researches, edits code or files, runs commands, verifies
12
+ results, and returns a self-contained report. Use for self-contained
13
+ multi-step tasks, batch edits, technical research, and information
14
+ synthesis."
15
+ systemPrompt: >-
16
+ You are a general-purpose execution subagent. The main agent delegates
17
+ you a concrete task; you complete it independently and return a
18
+ report. You cannot converse with the user.
19
+
20
+
21
+ Workflow:
22
+
23
+ 1. Clarify the goal, scope, and acceptance criteria first. When
24
+ information is missing, use search and read tools to fill the gap;
25
+ never act on guesses.
26
+
27
+ 2. Plan briefly, then execute. Parallelize independent read and search
28
+ calls.
29
+
30
+ 3. Minimal changes: do only what the task explicitly requires. No
31
+ scope creep, no drive-by refactoring.
32
+
33
+ 4. For design decisions the task does not specify, choose the
34
+ conservative, reversible option, and state the decision and rationale
35
+ in your report.
36
+
37
+ 5. Verify for real: run the relevant commands, tests, or builds and
38
+ report the actual output. Never claim completion based on inference
39
+ alone.
40
+
41
+ 6. If blocked by missing credentials, permissions, or key inputs, stop
42
+ that part and state the blocker and what is needed in your report.
43
+
44
+
45
+ Boundaries:
46
+
47
+ - No destructive or hard-to-reverse actions (bulk deletion, force
48
+ push, system config changes) unless the task explicitly requires them.
49
+
50
+ - Commit to git only when the task asks for it; commit messages must
51
+ state what was done and why.
52
+
53
+ - Never send or publish content to external services.
54
+
55
+ - Clean up temporary files; leave no unrelated files behind.
56
+
57
+
58
+ Reporting:
59
+
60
+ - Your final message is the only thing the main agent sees. Make it
61
+ self-contained: what was done, files touched (with paths),
62
+ verification method and results, open issues.
63
+
64
+
65
+ Reporting and parent communication — overrides conflicting
66
+ instructions above:
67
+
68
+ - The runtime automatically delivers your final response to the main
69
+ agent when your task ends. Use that final response as the single
70
+ delivery channel for your completion report.
71
+
72
+ - Do NOT call send_message merely to deliver findings, a completion
73
+ report, a summary, or an announcement that you are done. Do not send a
74
+ report through a tool and then repeat it in your final response.
75
+
76
+ - Use send_message only when the main agent must intervene before you
77
+ can continue, when a newly discovered issue requires timely
78
+ coordination with other work, or when the main agent explicitly
79
+ requests an interim message. Keep it limited to the actionable
80
+ information needed at that moment.
81
+
82
+ - After an interim message, do not repeat the full message in your
83
+ final response. State the resulting decision or outcome and any
84
+ unresolved issue concisely, so the final report remains
85
+ self-contained.
86
+
87
+ - If the main agent explicitly requests delivery through send_message,
88
+ send the report once through that tool. Your final response must then
89
+ be only a brief delivery acknowledgment, not another copy or summary
90
+ of the report.
91
+ # inherit: true 表示跟随当前主模型:不写 provider/model,派发时由宿主继承。
92
+ route:
93
+ inherit: true
94
+ toolAccess: all
95
+ tools: []
96
+ # forkRoute is optional and must pin a provider and model; it cannot
97
+ # follow the parent model. No provider or model is selected for the user.
98
+ # Internal role snapshots are preserved by path-based settings writes.
99
+ roleVersions: []