dsh-gitbash-shell 0.40.0 → 0.40.1
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/CHANGELOG.md +9 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/native-tool.js +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
|
|
4
4
|
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
|
|
5
5
|
|
|
6
|
+
## v0.40.1 — 2026-10-15
|
|
7
|
+
|
|
8
|
+
### 清理 gitbash_native 的两个死配置读取(chore)
|
|
9
|
+
|
|
10
|
+
- 删除 `gitbash_native` 模块对 `config.enableRunInBackground`/`config.promoteOnTimeout` 的读取([v0.40.0 已知项](#v0400--2026-10-15)就此销账):该模块由 inline 接线**手动挂载在 agent scope**(`scope.ctx.plugin({...module})` 无参调用),行/执行器 Config 不可达,两个字段自 v0.40.0 起读到的恒为 undefined、按 `!== false` 恒开——是"没接线的开关面板"而非活门控。清理后行为一个字节不变:`background` 仅由 Jobs 注册表在场决定(这正是实际生效的逻辑),超时转 Job 跟随后台可用性;用户级开关仍是 `experimentalNative` 总闸(要关 native 后台只能整体关闭 native/path,官方 tool-bash 的同名活开关不受影响)。
|
|
11
|
+
- 模块 `apply(ctx)` 签名不再收 config,并加注释说明挂载差异与官方 tool-bash 的区别;`tests/native-preview.mjs` 装置同步(装置曾以 `plugin(mod, { promoteOnTimeout })` 作为**测试注入点**参数化 promote——删除后装置不再传第二参;唯一的 promote 场景(jobs 在场断言 promoted)清理前后行为一致)。**preview 改动待 Windows 真机复验**(本机 Node 24 无法运行 preview 套件;`npm test` 普通回归 235 pass + 1 skip / 0 fail)。
|
|
12
|
+
- 保留说明:`src/bash-tool.js` 的 `config?.enableRunInBackground ?? true` 防御式读取**不清理**——bash 工具是官方 tool-bash 的逐调用镜像物,这两个字段在官方行 Config 上真实存在且可关;我们的镜像接不到行 Config 时按 `?? true` 显式走官方默认,语义是"默认开"而非"假装可配"。
|
|
13
|
+
- 相关:[PR #26](https://github.com/KannaKuron/dsh-gitbash-shell/pull/26) 评审遗留清理。
|
|
14
|
+
|
|
6
15
|
## v0.40.0 — 2026-10-15
|
|
7
16
|
|
|
8
17
|
### PR #26 合并:实验原生执行 / fail-closed(feat / docs)
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"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 自动让位。联动:dsh-ptc-cordis-preset(PTC 创造模式带 Git Bash 行且可去重)+ dsh-better-sidebar(终端标签自动切 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/native-tool.js
CHANGED
|
@@ -104,13 +104,17 @@ export function createNativeToolModule(deps) {
|
|
|
104
104
|
if (typeof deps.toolsModule?.defineTool !== 'function') throw new Error('gitbash_native: host defineTool capability unavailable')
|
|
105
105
|
return {
|
|
106
106
|
inject: ['tools', 'subprocess', 'shellEnv'],
|
|
107
|
-
apply(ctx
|
|
107
|
+
apply(ctx) {
|
|
108
108
|
const executor = createNativeExecutor(ctx, deps)
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
// No Config gates here: this module is mounted by hand in an agent scope
|
|
110
|
+
// (`scope.ctx.plugin({...module})`), so row/executor Config fields are
|
|
111
|
+
// unreachable and would read as permanently-on dead switches. Background
|
|
112
|
+
// follows the job registry's presence alone; the user-level kill switch
|
|
113
|
+
// is experimentalNative (the official tool-bash keeps its own live
|
|
114
|
+
// enableRunInBackground/promoteOnTimeout on its row).
|
|
111
115
|
const definition = jobs => {
|
|
112
|
-
const background =
|
|
113
|
-
const promote = background
|
|
116
|
+
const background = jobs !== undefined
|
|
117
|
+
const promote = background
|
|
114
118
|
const startJob = (request, exec) => {
|
|
115
119
|
let proc
|
|
116
120
|
let finalFacts = ''
|
|
@@ -181,7 +185,6 @@ export function createNativeToolModule(deps) {
|
|
|
181
185
|
}
|
|
182
186
|
let currentJobs
|
|
183
187
|
const refresh = registerExperimentalTool(ctx, () => definition(currentJobs), deps.experimentalEnabled, { scope: deps.scope, log: deps.log })
|
|
184
|
-
if (!enabled) return
|
|
185
188
|
ctx.inject(['jobs'], jobCtx => {
|
|
186
189
|
currentJobs = jobCtx.jobs
|
|
187
190
|
refresh()
|