dsh-gitbash-shell 0.42.0 → 0.42.2
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 +29 -0
- package/README.md +8 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/fastctx-bridge.js +19 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
|
|
4
4
|
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
|
|
5
5
|
|
|
6
|
+
## [0.42.2] — 2026-10-20
|
|
7
|
+
|
|
8
|
+
### fix:gb_* 对 dsh-ops 0.4.0 渐进加载的退避检测(每会话首个 agent 会多挂一轮 gb_*)
|
|
9
|
+
|
|
10
|
+
- **上游变化**:dsh-ops 0.4.0 把 PTC 工具面改成渐进加载(T-Auto/dsh-ops #261)——agent 的第一个
|
|
11
|
+
face 只常驻 `ops_read_files` / `ops_result` / `ops_load_sdk` 三件,`ops_inspect_local_file` /
|
|
12
|
+
`ops_grep` / `ops_bash` 等高级 API 要到「owning session 的 committed step 结束、下一次 provider
|
|
13
|
+
schema 捕获前」才发布。
|
|
14
|
+
- **症状**:`src/fastctx-bridge.js` 的退避检测在 `agent/created` 时只认三个旧名字;0.4.0 下 face 1
|
|
15
|
+
三个都不在 ⇒ 检测落空 ⇒ gb_* 照发;下一步 ops 高级 API 到场后,gb_* 三件与 ops_* 文件工具冗余
|
|
16
|
+
并存(名字不冲突,但白占 token)。只有每会话第一个 agent 受影响(后续 agent 创建时旧名字已到场)。
|
|
17
|
+
- **修法**:退避名单提取为导出常量 `OPS_PRESENCE_MARKERS`(六个名字:三个经典标记 + 0.4.0 的三个
|
|
18
|
+
渐进常驻),`reconcile` 改为对名单求 `some/includes`;任何一个在场即整体撤下,语义与 §4l 的
|
|
19
|
+
「见 ops_* 即让位」不变量一致。
|
|
20
|
+
- **测试**:tests/bridge-regressions.mjs 新增两例——face schemas 只返回 0.4.0 渐进三件 ⇒
|
|
21
|
+
definitions 与 FastCtx payload 实例数都必须为 0(payload 不许启动);守卫锁死六个标记名。
|
|
22
|
+
- **ptc-preset 侧无需跟进**:`detectOpsPresence` 只认 dsh-ops-shell / dsh-ops-file 行 id,与渐进
|
|
23
|
+
加载无关。
|
|
24
|
+
|
|
25
|
+
## [0.42.1] — 2026-10-19
|
|
26
|
+
|
|
27
|
+
### Guarded
|
|
28
|
+
- **dsh-ops background/file tools are contractually out of reach** (user decision, 2026-10-19): the removal
|
|
29
|
+
list `OPS_SHELL_TOOLS` is now pinned by a guard test to exactly `ops_bash` + `ops_run` — it can never
|
|
30
|
+
grow to cover `ops_run_background` / `ops_job_*` (background jobs) or the `ops_*` file tools. Users who
|
|
31
|
+
enable the dsh-ops background component keep those global tools in every session, including PTC ones.
|
|
32
|
+
- README: documented the division of labor — bash belongs to gitbash, background jobs and file/PTC
|
|
33
|
+
enhancements belong to dsh-ops; neither side denies the other.
|
|
34
|
+
|
|
6
35
|
## v0.42.0 — 2026-10-19
|
|
7
36
|
|
|
8
37
|
### feat:dsh-ops 的 ops_bash 从模型 face 彻底移除(可见面,不再只是拒绝);插件停用/卸载自动还原该配置
|
package/README.md
CHANGED
|
@@ -52,10 +52,18 @@ POSIX 宿主上完整保留;
|
|
|
52
52
|
自带的 `publishBashTool` 开关(经官方 configEditor 通道写为 `false`):安装本插件时 `ops_bash`
|
|
53
53
|
不再出现在模型工具面;**ops 的 pwsh7 overlay(给官方 pwsh 工具供路径)与文件/后台增强不受影响**
|
|
54
54
|
——publishBashTool 的门只套在 `mountSessionBash` 上,pwsh 走 `mountBundledPwsh` 独立路径。
|
|
55
|
+
**`ops_run` 无需处理:它在 dsh-ops 的 bundle 装配中本就没有发布路径**——bundle 只有
|
|
56
|
+
shell/file/background/ptc 四行,全插件唯一一处 `new FastCtxTools` 只在 background 组件挂
|
|
57
|
+
后台四件套(`run_background`/`job_*`),前台 `ops_run` 只是未被任何调用点使用的默认参数;
|
|
58
|
+
本机 `dsh-ops-background` 行默认关闭,后台四件套同样不存在。
|
|
55
59
|
**停用或卸载本插件的瞬间自动还原**(dispose 钩子撤回覆盖,同 row 的其它设置原样保留),重新启用
|
|
56
60
|
又会自动接管。两个边界:①关机状态下卸载的残余覆盖,用 dsh-ops 设置卡「恢复默认」一键撤回;
|
|
57
61
|
②停用时若覆盖值已被你手动改回 `true`,视为你的选择、不动它。无设置开关——想用 `ops_bash`
|
|
58
62
|
就停用本插件,还原是自动的。
|
|
63
|
+
**后台任务与文件/PTC 增强全部让给 dsh-ops(2026-10-19 用户决策)**:剔除清单被守卫测试
|
|
64
|
+
锁死为 `ops_bash` + `ops_run` 两项,永不含 `ops_run_background`/`ops_job_*`——你启用
|
|
65
|
+
dsh-ops 的「后台任务」组件后,这组全局工具在普通会话与 PTC 创造模式下原样可见可用,
|
|
66
|
+
本插件不做任何 deny。bash 归 gitbash,后台与增强归 dsh-ops,职责互不越界。
|
|
59
67
|
|
|
60
68
|
四个「· Git Bash」**变体 preset 仍保留,默认关闭**(`variantPresets` 开关,
|
|
61
69
|
设置卡可开):开启后注册 `standard-gitbash`/`minimal-gitbash`/`code-gitbash`/
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.2",
|
|
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.42.
|
|
3
|
+
"version": "0.42.2",
|
|
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/fastctx-bridge.js
CHANGED
|
@@ -42,6 +42,24 @@ export const FASTCTX_FILE_TOOLS = Object.freeze(['inspect_local_file', 'grep', '
|
|
|
42
42
|
export const GB_PREFIX = 'gb_'
|
|
43
43
|
export const gbName = (raw) => GB_PREFIX + raw
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Any one of these names in the visible face means dsh-ops owns the file
|
|
47
|
+
* surface, so the whole gb_* bridge stands down. The first three are the
|
|
48
|
+
* classic markers; the 0.4.0 progressive PTC rollout (T-Auto/dsh-ops #261)
|
|
49
|
+
* keeps only `ops_read_files`/`ops_result`/`ops_load_sdk` resident in an
|
|
50
|
+
* agent's first face — checking the classic names alone let gb_* mount face 1
|
|
51
|
+
* and linger as redundant duplicates once the advanced APIs arrived a step
|
|
52
|
+
* later. Any single marker present is enough to stand down.
|
|
53
|
+
*/
|
|
54
|
+
export const OPS_PRESENCE_MARKERS = Object.freeze([
|
|
55
|
+
'ops_inspect_local_file',
|
|
56
|
+
'ops_grep',
|
|
57
|
+
'ops_bash',
|
|
58
|
+
'ops_read_files',
|
|
59
|
+
'ops_result',
|
|
60
|
+
'ops_load_sdk',
|
|
61
|
+
])
|
|
62
|
+
|
|
45
63
|
// The HOST registry rejects any tool without an `output` contract (issue #18,
|
|
46
64
|
// root cause 2) — the frozen schema + text renderer the pwsh7
|
|
47
65
|
// definition ships, reused so both families speak one tool-result contract.
|
|
@@ -466,7 +484,7 @@ export function mountFastctx(ctx, deps) {
|
|
|
466
484
|
try {
|
|
467
485
|
names = (tools(ctx)?.schemas?.(agent) ?? []).map((schema) => schema.name).filter((name) => typeof name === 'string')
|
|
468
486
|
} catch { /* a broken face reads as empty */ }
|
|
469
|
-
if (names.some((name) => name
|
|
487
|
+
if (names.some((name) => OPS_PRESENCE_MARKERS.includes(name))) {
|
|
470
488
|
if (!withdrawnByOps) {
|
|
471
489
|
withdrawnByOps = true
|
|
472
490
|
decided = true
|