Skip to content

Commit dce7ca5

Browse files
committed
feat(v0.55.0): 适配 dsh 0.2.2-rc.2 组合行
1 parent c6fed9d commit dce7ca5

11 files changed

Lines changed: 118 additions & 48 deletions

‎AGENTS.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
4) 发布 `gitBash` 宿主能力服务供 dsh-ptc-cordis-preset 联动。
5353

5454
## 核心不变量(改代码前必读)
55-
0. **声明式唯一路径(v0.32.0 起)**:宿主下限 `>=0.2.2-rc.1`(兼容门禁 `plugin-compatibility.ts` 优先读 `engines.dsh`,只要存在该字段就忽略 peer,`semver.satisfies` 以 `includePrerelease: true` 求值;peer 同步声明同一 range 并标 `peerDependenciesMeta.optional`,否则 autoInstallPeers 场景下对只有 prerelease 的 `@deepseek-ai/dsh` 解析失败),**era/物化/present/rows/detectPeerCoverage 已全部删除**——`apply()` 直走声明式注册 `runDeclarativeEra`(v0.35.0 起受 `variantPresets` 开关门控,默认关=desired 为空集,见 §4l),只保留这一代宿主路径。要点:四个变体由 `pluginsFor({ kind, skillsDir, pythonActive, hostExtras })` / `minimalPluginsFor({ bashPath })` 生成行集(`src/compositions.js`,单代镜像官方 `0.2.2-rc.1` standard/minimal/ptc/cordis + Git Bash 增量;可选行由 `hostExtras` 按包探测(见第 8 条);minimal 变体由 `minimalPluginsFor({ bashPath, hostExtras })` 生成;minimal 的 PTY 行 `bashPath` 由 index.js 经 `minimalPtyBashPath(readBashResolution)` 每次注册时懒解析喂入——解析失败兜底可见默认路径,见 §4h 的两条硬边界与 issue #15);cordis 变体的 skills 直接指向 `@deepseek-ai/dsh-agent-preset` 包旁目录(现场解析,不拷贝);**preset id 永不随官方改名**(`code-gitbash` 保持历史 id——会话钉在 id 上,改名即 preset not found);预设清单沿用行配置 `presets`(Config 的普通字段,改动触发重挂载);reconcile 必须**先退役再注册**(宿主 registry 拒绝重复 id,与 dsh-ptc-cordis-preset v0.16.0 的翻转教训同款)。**设置面**:host 半**顶层 await 经 `src/schemastery.js` 解析 schemastery** 并导出 `Config`(开关直接 `.volatile()`;拿不到 schemastery 时 `Config = undefined`,插件照常挂载;取哪一份由**语义能力**决定,见 §4k),apply 内 `makeLiveReader(ctx, config)` 供所有翻译层消费点(shellEnv 解析器、prompt 组装、tools/execute、post-execute、posix 指示闭包、adoptSidebar)逐次读取;client 半经 `configForms` 挂详情页设置卡;**挂载行 id `gitbash-shell`**(同时是 configForms key)。**绝不用顶层静态 peer import(v0.24.3 加固)**:`@deepseek-ai/schemastery` 是 peer,普通 Node 从本包位置解析不到它;顶层静态 import 一旦失败,dsh Loader 把插件行的导入失败当**非致命跳过**(`vendor/loader/src/config/entry.ts` `_init()`:logger.error + return,永不建 fiber)⇒ 本插件连 preset 变体、执行器接线与 client 半全部消失,而宿主日志全绿(与 dsh-better-workspace issue #9 同一失败类;已用"除静态 peer import 外完全相同"的夹具插件实证)。冒烟有"不得出现静态导入行"断言。**legacy settings 面已整体删除(v0.32.1)**:宿主侧的 namespace 注册块、makeLiveReader/dialectSettings 的 era 探测、四个 settings.get(ns) 读取器与 client 半的 settingsScope 注入 + settings.plugin.item 旧座位全部移除(宿主 settings 服务只余 describe/update;冒烟守卫「源码不得再出现 settings.register/SETTINGS_NAMESPACE」);设置面只剩行 Config + configForms 详情页卡这一条路。
55+
0. **声明式唯一路径(v0.32.0 起)**:宿主下限 `>=0.2.2-rc.1`(兼容门禁 `plugin-compatibility.ts` 优先读 `engines.dsh`,只要存在该字段就忽略 peer,`semver.satisfies` 以 `includePrerelease: true` 求值;peer 同步声明同一 range 并标 `peerDependenciesMeta.optional`,否则 autoInstallPeers 场景下对只有 prerelease 的 `@deepseek-ai/dsh` 解析失败),**era/物化/present/rows/detectPeerCoverage 已全部删除**——`apply()` 直走声明式注册 `runDeclarativeEra`(v0.35.0 起受 `variantPresets` 开关门控,默认关=desired 为空集,见 §4l),只保留这一代宿主路径。要点:四个变体由 `pluginsFor({ kind, skillsDir, pythonActive, hostExtras })` / `minimalPluginsFor({ bashPath })` 生成行集(`src/compositions.js`,单代镜像官方 `0.2.2-rc.2` standard/minimal/ptc/cordis + Git Bash 增量(rc.1 宿主只少可选行);可选行由 `hostExtras` 按包探测(见第 8 条);minimal 变体由 `minimalPluginsFor({ bashPath, hostExtras })` 生成;minimal 的 PTY 行 `bashPath` 由 index.js 经 `minimalPtyBashPath(readBashResolution)` 每次注册时懒解析喂入——解析失败兜底可见默认路径,见 §4h 的两条硬边界与 issue #15);cordis 变体的 skills 直接指向 `@deepseek-ai/dsh-agent-preset` 包旁目录(现场解析,不拷贝);**preset id 永不随官方改名**(`code-gitbash` 保持历史 id——会话钉在 id 上,改名即 preset not found);预设清单沿用行配置 `presets`(Config 的普通字段,改动触发重挂载);reconcile 必须**先退役再注册**(宿主 registry 拒绝重复 id,与 dsh-ptc-cordis-preset v0.16.0 的翻转教训同款)。**设置面**:host 半**顶层 await 经 `src/schemastery.js` 解析 schemastery** 并导出 `Config`(开关直接 `.volatile()`;拿不到 schemastery 时 `Config = undefined`,插件照常挂载;取哪一份由**语义能力**决定,见 §4k),apply 内 `makeLiveReader(ctx, config)` 供所有翻译层消费点(shellEnv 解析器、prompt 组装、tools/execute、post-execute、posix 指示闭包、adoptSidebar)逐次读取;client 半经 `configForms` 挂详情页设置卡;**挂载行 id `gitbash-shell`**(同时是 configForms key)。**绝不用顶层静态 peer import(v0.24.3 加固)**:`@deepseek-ai/schemastery` 是 peer,普通 Node 从本包位置解析不到它;顶层静态 import 一旦失败,dsh Loader 把插件行的导入失败当**非致命跳过**(`vendor/loader/src/config/entry.ts` `_init()`:logger.error + return,永不建 fiber)⇒ 本插件连 preset 变体、执行器接线与 client 半全部消失,而宿主日志全绿(与 dsh-better-workspace issue #9 同一失败类;已用"除静态 peer import 外完全相同"的夹具插件实证)。冒烟有"不得出现静态导入行"断言。**legacy settings 面已整体删除(v0.32.1)**:宿主侧的 namespace 注册块、makeLiveReader/dialectSettings 的 era 探测、四个 settings.get(ns) 读取器与 client 半的 settingsScope 注入 + settings.plugin.item 旧座位全部移除(宿主 settings 服务只余 describe/update;冒烟守卫「源码不得再出现 settings.register/SETTINGS_NAMESPACE」);设置面只剩行 Config + configForms 详情页卡这一条路。
5656

5757
1. **执行器替换 full-access argv;Windows 未验证受限能力必须 fail-closed**:
5858
沙箱/生命周期基础设施沿用 `@deepseek-ai/dsh-bash-sandbox`;full-access 必须显式 Git for Windows
@@ -406,9 +406,11 @@
406406
(standard/ptc 关、cordis 随 profileContext);alpha.3 已把 `schedule_*` 从 subagent 的
407407
`toolFilter.deny` 移除 ⇒ 插件侧**不再产出任何 toolFilter**。宿主下限已是 `0.2.2-rc.1`,
408408
但这四行仍由 `probeHostExtras(ctx)` 从 **`ctx.baseUrl`**(行挂载同一解析基准)逐包 `require.resolve`
409-
探测(time-context、tool-schedule、plugin-market/tools、compaction-basic),可用才加行
409+
探测(time-context、tool-schedule、plugin-market/tools、compaction-basic、tool-office),可用才加行
410410
(`timeContext`/`toolSchedule`/`pluginMarket` 仅 standard/ptc/cordis 三个 kind,`compaction`
411-
仅 minimal);探测每 boot 一次、reconcile 重注册复用;任何解析异常降级为「不可用」。**不要**把这些行
411+
仅 minimal,`office` 仅 standard/ptc);`office` 探针同时兼作 rc.2 行方言探针:只有它能解析时
412+
才给 `tool-subagent-control` 写 `interrupt: false` 并追加 `tool-office` 行,rc.1 不写未知键。
413+
探测每 boot 一次、reconcile 重注册复用;任何解析异常降级为「不可用」。**不要**把这些行
412414
写成无条件(包缺失会拒绝整棵挂载)。官方下一版再加行时:先重跑
413415
`tests/align-official.mjs`(pins 换新 sha)再决定是否新增探测位。
414416
**官方 mcp-client 的运行时桥接口子(v0.35.0 追记)**:本插件 `src/fastctx-bridge.js` 的

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
44
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
55
6+
## v0.55.0 — 2026-11-12
7+
8+
**类型**:feat(适配 dsh 0.2.2-rc.2 的 preset 行)
9+
10+
- **官方行对齐 rc.2**:`src/compositions.js` 文件头改为 0.2.2-rc.2;standard 的 `skill-filesystem` 在能解析官方 preset 包旁 skills 时带 `config: { customSkillDirs: [...] }`;standard / ptc 在 present 之后携带 `tool-office`,其 `tool-subagent-control` 行带 `config: { interrupt: false }`。
11+
- **探测降级**:`src/index.js` 的 `probeHostExtras` 新增 `tool-office` 探针并返回 `office`;office 探针兼作 rc.2 行方言探针,rc.1 宿主没有该包时不写 `interrupt` 与 `tool-office`,不会被未知配置键拒绝。
12+
- **兼容声明**:`package.json` 的 `dsh.compatibility.dshReleases` 追加 `0.2.2-rc.2`。
13+
- **测试**:`tests/align-official.mjs` 的 `PRESET_SHA256` 更新为 rc.2 四个 preset(`standard` / `cordis` / `ptc` / `minimal`);冒烟新增 office 探针门控用例。完整 `npm test` **417 项 / 416 pass / 0 fail / 1 platform skip**;`node tests/align-official.mjs /Users/kanna/project/deepseek-harness` 四项 OK。
14+
615
## v0.54.1 — 2026-11-12
716

817
**类型**: fix(适配 dsh-ops 0.5.3+ 的 OPS (PTC) 模式)

‎README.md‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,28 @@ dsh-ptc-cordis-preset 的 `PTC 创造模式` 用户 preset 均不受影响、自
9090
### 宿主要求与 preset 对齐
9191

9292
自 v0.49.0 起宿主下限为 **dsh >= 0.2.2-rc.1**:门禁读 `engines.dsh`(rc.1 的 `app-boot` 只要见到该字段就忽略 peer,`semver` 以 `includePrerelease: true` 求值),`peerDependencies` 同步声明并标 `optional`;只服务这一代宿主。四个变体的行集是 `src/compositions.js`
93-
里已提交的 JS 数据,镜像官方 0.2.2-rc.1 的 standard/minimal/ptc/cordis 行切分并叠加
94-
Git Bash 增量;跟随 dsh 升级的对齐由冒烟测试
93+
里已提交的 JS 数据,镜像官方 0.2.2-rc.2 的 standard/minimal/ptc/cordis 行切分并叠加
94+
Git Bash 增量(rc.1 宿主只少可选行,由探测降级);跟随 dsh 升级的对齐由冒烟测试
9595
`compositions: dsh >=0.2.2-rc.1 executor shape and profile-context gates` 锁住。
9696
**preset id 保持 `code-gitbash` 不变**——会话钉在 id 上,dsh 0.1.2 把内置 `code`
9797
改名 `ptc` 时本插件的变体 id 就没有跟随(改名会让已固定的会话报 preset not found)。
9898

9999
**可选官方行按包探测接入**:rc.1 全工具 preset 自带时间上下文(`time-context`)与
100100
提醒工具(`schedule_*`),极简 preset 自带 image-only `tool-fs` 与专属 compaction 组,
101-
全工具 preset 另有插件市场(`tool-plugin-market`)。本插件在挂载时按 `ctx.baseUrl`
102-
探测这些包,可用才纳入对应变体;剥掉某个包的 profile 只降级该行,不会拒绝整棵
103-
preset 挂载。
101+
全工具 preset 另有插件市场(`tool-plugin-market`);rc.2 又新增原生 Office 工具
102+
(`tool-office`)。本插件在挂载时按 `ctx.baseUrl` 探测这些包,可用才纳入对应变体;
103+
剥掉某个包的 profile 只降级该行,不会拒绝整棵 preset 挂载。`tool-office` 探针同时
104+
兼作 rc.2 行方言探针:只有能解析该包时才给 `tool-subagent-control` 写
105+
`config: { interrupt: false }`,rc.1 不会收到这个新配置键。
104106

105-
**0.2.2-rc.1 基线**:官方全工具 preset 的 `tool-fs` 行带
107+
**0.2.2-rc.2 基线**:官方全工具 preset 的 `tool-fs` 行带
106108
`config: { applyPatch: false }`,本插件的 standard/cordis/ptc 变体同步,极简变体不加;
107-
插件管理/市场行按 rc.1 门控(cordis 两者跟 `profileContext`,standard 仅 manager 跟
108-
`profileContext`,ptc 两者恒禁用)。`dsh.compatibility.dshReleases` 只登记
109-
0.2.2-rc.1。
109+
standard 的 `skill-filesystem` 行在解析到官方 preset 包旁 skills 时带
110+
`customSkillDirs`;standard/ptc 在 present 之后携带 `tool-office`,其
111+
`tool-subagent-control` 行带 `interrupt: false`。rc.1 宿主由探测降级:没有 office
112+
包就不写该行与 interrupt 键。插件管理/市场行按 rc.1 门控(cordis 两者跟
113+
`profileContext`,standard 仅 manager 跟 `profileContext`,ptc 两者恒禁用)。
114+
`dsh.compatibility.dshReleases` 登记 0.2.2-rc.1 与 0.2.2-rc.2。
110115

111116
## 安装(公开 npm 插件,推荐)
112117

‎README_EN.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,23 @@ Since v0.49.0 the host floor is **dsh >= 0.2.2-rc.1**: the gate reads
2323
`engines.dsh` (rc.1 `app-boot` ignores the peer whenever that field exists;
2424
`semver` evaluates with `includePrerelease: true`). `peerDependencies` mirrors
2525
the same range and stays `optional`; this plugin serves that one generation. The four variants are committed JS row sets in
26-
`src/compositions.js`, mirroring the official 0.2.2-rc.1 standard/minimal/ptc/cordis
27-
split plus the Git Bash delta; upgrade alignment is locked by the smoke test
26+
`src/compositions.js`, mirroring the official 0.2.2-rc.2 standard/minimal/ptc/cordis
27+
split plus the Git Bash delta (an rc.1 host merely probes fewer optional rows); upgrade alignment is locked by the smoke test
2828
`compositions: dsh >=0.2.2-rc.1 executor shape and profile-context gates`. **Preset ids
2929
never change** (`code-gitbash` kept its historical id when dsh 0.1.2 renamed
3030
the built-in `code` to `ptc` — sessions are pinned to ids, and a rename would
3131
orphan them).
3232

33+
Optional official rows are package-probed from `ctx.baseUrl`: `time-context`,
34+
`tool-schedule`, `tool-plugin-market`, the minimal-only compaction group, and —
35+
new in rc.2 — `tool-office`. A missing package only drops that row. The office
36+
probe doubles as the rc.2 row-dialect probe: `tool-subagent-control` gets
37+
`config: { interrupt: false }` and standard/ptc get the `tool-office` row only
38+
when the package resolves, so an rc.1 host never receives an unknown config key.
39+
On rc.2 the standard preset also carries `customSkillDirs` on its
40+
`skill-filesystem` row. `dsh.compatibility.dshReleases` records 0.2.2-rc.1 and
41+
0.2.2-rc.2.
42+
3343
## Install (public npm package)
3444

3545
```sh

‎dsh.plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dsh-external/dsh-gitbash-shell",
3-
"version": "0.54.1",
3+
"version": "0.55.0",
44
"main": "./src/index.js",
55
"description": "Windows 全模式 Git Bash:自带 bash 工具(私有 Git Bash 执行器实例,官方 PowerShell 执行器原样保留),官方四个模式经行内工具补位直接获得 Git Bash(v0.35.0 起;v0.39.0 起不再替换宿主执行器),四个 *·Git Bash 变体 preset 可开关;官方 pwsh 工具默认隐藏、开关可见(真 PowerShell);附带 gb_* FastCtx 文件工具;检测到 dsh-ops 0.5.0 单行时给四个内置模式写 bash:false,只留一份 bash。联动:dsh-ptc-cordis-preset(PTC 创造模式带 Git Bash 行且可去重)+ dsh-better-sidebar(终端标签自动切 Git Bash)。",
66
"engines": {

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dsh-gitbash-shell",
3-
"version": "0.54.1",
3+
"version": "0.55.0",
44
"description": "Windows 上给 agent 一个真正的 Git Bash 命令工具:私有 Git Bash 执行器实例(官方 PowerShell 执行器原样保留),统一 MSYS 盘根路径方言,官方 pwsh 工具默认隐藏可开关,物化四个内置预设的 Git Bash 变体,侧栏终端接管可开关。· Give agents a real Git Bash tool on Windows: a private Git Bash executor instance (the official PowerShell executor stays untouched), a unified MSYS drive-root path dialect, an opt-in official pwsh tool, and four Git Bash preset variants.",
55
"type": "module",
66
"repository": {
@@ -34,7 +34,8 @@
3434
"compatibility": {
3535
"dsh": ">=0.2.2-rc.1",
3636
"dshReleases": {
37-
"0.2.2-rc.1": "compatible"
37+
"0.2.2-rc.1": "compatible",
38+
"0.2.2-rc.2": "compatible"
3839
}
3940
}
4041
},

0 commit comments

Comments
 (0)