dsh-gitbash-shell 0.46.0 → 0.47.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/CHANGELOG.md +9 -0
- package/dsh.plugin.json +2 -2
- package/package.json +5 -11
- package/src/compositions.js +20 -31
- package/src/index.js +21 -25
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
|
+
## [0.47.0] — 2026-10-30
|
|
7
|
+
|
|
8
|
+
### feat:适配 dsh 0.2.2-alpha.2(下限抬到 alpha.2,清旧宿主回退)
|
|
9
|
+
|
|
10
|
+
- **宿主下限**:`engines.dsh`、peer `@deepseek-ai/dsh`、`dsh.compatibility.dsh` 统一到 `>=0.2.2-alpha.2`,`dshReleases` 只保留 alpha.2。本版组合只产出 alpha.2 形状,不再为 0.1.7–0.2.1 保留 `tool-presentation(mode: ptc)` 回退。
|
|
11
|
+
- **组合跟随(无条件)**:PTC 变体固定挂 `tool-executor-ptc`;`tool-subagent-list-agents` 行删除(list_agents 已并入 `tool-subagent-control`);`tool-subagent` 固定 `modelSelection` + `modelDiscovery`;`tool-plugin-manager` / `tool-plugin-market` 随 `profileContext` live 服务启停。time-context / tool-schedule / plugin-market 的包探针保留:包缺失只少行、不拒绝整棵挂载。
|
|
12
|
+
- **assemble 工具面**:0.2.2-alpha.2 的 `system-prompt/assemble` 只带 `toolSet`,不再带 `tools`;`runCodeHintFor` / `applyToolRouting` 改为读 `assembleContext.toolSet` 并调用 `ctx.get('tools').schemas(agent, toolSet)`,不再回退全量 `schemas(agent)`。
|
|
13
|
+
- **测试(342 pass + 1 平台 skip)**:compatibility-regressions 的监听器夹具改为 `toolSet` + `ctx.get('tools').schemas`;smoke 的旧宿主回退断言替换为 alpha.2 无条件形态;market 在无 profileContext 时默认 disabled。
|
|
14
|
+
|
|
6
15
|
## [0.46.0] — 2026-10-28
|
|
7
16
|
|
|
8
17
|
### fix:跟随 dsh-ops 0.4.3 的 preset-mode 行集(ops_bash 剥离不再失效)
|
package/dsh.plugin.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
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": {
|
|
7
|
-
"dsh": ">=0.
|
|
7
|
+
"dsh": ">=0.2.2-alpha.2"
|
|
8
8
|
},
|
|
9
9
|
"contributes": {
|
|
10
10
|
"tools": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
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": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=18",
|
|
20
|
-
"dsh": ">=0.
|
|
20
|
+
"dsh": ">=0.2.2-alpha.2"
|
|
21
21
|
},
|
|
22
22
|
"dsh": {
|
|
23
23
|
"bundle": {
|
|
@@ -32,15 +32,9 @@
|
|
|
32
32
|
"platform": "web"
|
|
33
33
|
},
|
|
34
34
|
"compatibility": {
|
|
35
|
-
"dsh": ">=0.
|
|
35
|
+
"dsh": ">=0.2.2-alpha.2",
|
|
36
36
|
"dshReleases": {
|
|
37
|
-
"0.2.
|
|
38
|
-
"0.2.1-alpha.1": "compatible",
|
|
39
|
-
"0.2.1-alpha.2": "compatible",
|
|
40
|
-
"0.2.1-alpha.3": "compatible",
|
|
41
|
-
"0.2.1-alpha.4": "compatible",
|
|
42
|
-
"0.2.1-alpha.5": "compatible",
|
|
43
|
-
"0.2.1-rc.1": "compatible"
|
|
37
|
+
"0.2.2-alpha.2": "compatible"
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
40
|
},
|
|
@@ -72,7 +66,7 @@
|
|
|
72
66
|
"license": "MIT",
|
|
73
67
|
"peerDependencies": {
|
|
74
68
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
75
|
-
"@deepseek-ai/dsh": ">=0.
|
|
69
|
+
"@deepseek-ai/dsh": ">=0.2.2-alpha.2",
|
|
76
70
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
77
71
|
},
|
|
78
72
|
"peerDependenciesMeta": {
|
package/src/compositions.js
CHANGED
|
@@ -90,19 +90,18 @@ export function pluginsFor({ kind, gitBash, skillsDir, pythonActive = false, hos
|
|
|
90
90
|
// toolFilter deny from the subagent/subagent_fork configs (official
|
|
91
91
|
// reminders reach subagents again — the deny was never load-bearing,
|
|
92
92
|
// nothing replaces it); alpha.4 added a tool-plugin-market row to every
|
|
93
|
-
// full preset. 0.2.2-alpha.2 then reworked the tool execution architecture
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
// `
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
const { timeContext = false, toolSchedule = false, pluginMarket = false, compaction = false, executorPlugin = false, profileContext = false } = hostExtras
|
|
93
|
+
// full preset. 0.2.2-alpha.2 then reworked the tool execution architecture:
|
|
94
|
+
// the official executors moved into explicit tool-executor-native/-ptc
|
|
95
|
+
// rows, the subagent config renamed `modelSelectionSettings` to
|
|
96
|
+
// `modelSelection` + opt-in `modelDiscovery`, list-agents folded into the
|
|
97
|
+
// tool-subagent-control row itself (its separate row is gone), and the
|
|
98
|
+
// manager/market rows enable only under a profile context. That shape is
|
|
99
|
+
// unconditional now — the plugin's lower bound is 0.2.2-alpha.2. Optional
|
|
100
|
+
// 0.2.1 additions still ride a host probe (index.js probeHostExtras,
|
|
101
|
+
// resolved from ctx.baseUrl — the base rows mount from). The minimal
|
|
102
|
+
// variant carries its own 0.2.1-alpha.3 delta (tool-fs + compaction) behind
|
|
103
|
+
// the compaction flag.
|
|
104
|
+
const { timeContext = false, toolSchedule = false, pluginMarket = false, compaction = false, profileContext = false } = hostExtras
|
|
106
105
|
const rows = [
|
|
107
106
|
{
|
|
108
107
|
id: 'persona',
|
|
@@ -176,14 +175,11 @@ export function pluginsFor({ kind, gitBash, skillsDir, pythonActive = false, hos
|
|
|
176
175
|
config: [
|
|
177
176
|
{ id: 'tool-subagent-control', name: '@deepseek-ai/dsh-tool-subagent-control' },
|
|
178
177
|
// 0.2.2-alpha.2 folded list_agents into the control row itself; the
|
|
179
|
-
// separate child row is gone
|
|
180
|
-
...(executorPlugin ? [] : [{ id: 'tool-subagent-list-agents', name: '@deepseek-ai/dsh-tool-subagent-control/list-agents' }]),
|
|
178
|
+
// separate child row is gone.
|
|
181
179
|
{
|
|
182
180
|
id: 'tool-subagent',
|
|
183
181
|
name: '@deepseek-ai/dsh-tool-subagent',
|
|
184
|
-
config:
|
|
185
|
-
? { provider: 'spawn', toolName: 'subagent', modelSelection: true, modelDiscovery: true, ...(timeContext ? {} : { backgroundMode: 'continuable' }) }
|
|
186
|
-
: { provider: 'spawn', toolName: 'subagent', modelSelectionSettings: true, ...(timeContext ? {} : { backgroundMode: 'continuable' }) },
|
|
182
|
+
config: { provider: 'spawn', toolName: 'subagent', modelSelection: true, modelDiscovery: true, ...(timeContext ? {} : { backgroundMode: 'continuable' }) },
|
|
187
183
|
},
|
|
188
184
|
{
|
|
189
185
|
id: 'tool-subagent-fork',
|
|
@@ -221,10 +217,8 @@ export function pluginsFor({ kind, gitBash, skillsDir, pythonActive = false, hos
|
|
|
221
217
|
// 0.2.2-alpha.2 replaced the deprecated presentation selector with the
|
|
222
218
|
// explicit PTC executor row (the base deployment keeps
|
|
223
219
|
// tool-executor-native; a scoped executor row overrides it for this
|
|
224
|
-
// agent).
|
|
225
|
-
rows.push(
|
|
226
|
-
? { id: 'tool-executor-ptc', name: '@deepseek-ai/dsh-tool-executor-ptc' }
|
|
227
|
-
: { id: 'tool-presentation', name: '@deepseek-ai/dsh-agent-tool-presentation', config: { mode: 'ptc' } })
|
|
220
|
+
// agent).
|
|
221
|
+
rows.push({ id: 'tool-executor-ptc', name: '@deepseek-ai/dsh-tool-executor-ptc' })
|
|
228
222
|
}
|
|
229
223
|
if (kind === 'cordis') {
|
|
230
224
|
rows.push({ id: 'tool-cordis', name: '@deepseek-ai/dsh-tool-cordis' })
|
|
@@ -237,20 +231,15 @@ export function pluginsFor({ kind, gitBash, skillsDir, pythonActive = false, hos
|
|
|
237
231
|
rows.push({
|
|
238
232
|
id: 'tool-plugin-manager',
|
|
239
233
|
name: '@deepseek-ai/dsh-plugin-manager/tools',
|
|
240
|
-
//
|
|
241
|
-
|
|
242
|
-
// 0.2.2-alpha.2 on every preset enables it exactly when a profile context
|
|
243
|
-
// exists, so the probe decides for all three variants.
|
|
244
|
-
...(executorPlugin ? off(!profileContext) : off(kind !== 'cordis')),
|
|
234
|
+
// Every preset enables it exactly when a profile context exists.
|
|
235
|
+
...off(!profileContext),
|
|
245
236
|
})
|
|
246
237
|
if (pluginMarket) {
|
|
247
238
|
rows.push({
|
|
248
|
-
// The official 0.2.1-alpha.4
|
|
249
|
-
// both architectures (alpha.4: disabled on standard/ptc, profile-gated
|
|
250
|
-
// on cordis; alpha.2 of 0.2.2: profile-gated everywhere).
|
|
239
|
+
// The official 0.2.1-alpha.4 row, profile-gated like the manager.
|
|
251
240
|
id: 'tool-plugin-market',
|
|
252
241
|
name: '@deepseek-ai/dsh-plugin-market/tools',
|
|
253
|
-
...
|
|
242
|
+
...off(!profileContext),
|
|
254
243
|
})
|
|
255
244
|
}
|
|
256
245
|
return rows
|
package/src/index.js
CHANGED
|
@@ -1807,14 +1807,12 @@ function cleanupLegacyTrees(presetIds) {
|
|
|
1807
1807
|
*
|
|
1808
1808
|
* `timeContext` / `toolSchedule` / `pluginMarket` / `compaction` are the
|
|
1809
1809
|
* 0.2.1 rows (durable clock readings, reminder tools, the plugin market row,
|
|
1810
|
-
* the minimal tool-fs + compaction delta).
|
|
1811
|
-
*
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
* `
|
|
1815
|
-
*
|
|
1816
|
-
* alpha.2 (`!!js "!ctx.get('profileContext')"`) — computed from the live
|
|
1817
|
-
* service, not the package set.
|
|
1810
|
+
* the minimal tool-fs + compaction delta). The 0.2.2-alpha.2 tool-execution
|
|
1811
|
+
* architecture is unconditional: the official presets mount
|
|
1812
|
+
* tool-executor-ptc for PTC, the subagent config uses `modelSelection` +
|
|
1813
|
+
* `modelDiscovery`, and list-agents folded into the control row.
|
|
1814
|
+
* `profileContext` is the live host fact the manager/market rows gate on
|
|
1815
|
+
* (`!!js "!ctx.get('profileContext')"`).
|
|
1818
1816
|
*
|
|
1819
1817
|
* A preset row whose package is absent rejects the WHOLE mount, so every row
|
|
1820
1818
|
* rides this probe: each is added only when its package resolves from the
|
|
@@ -1827,8 +1825,7 @@ function cleanupLegacyTrees(presetIds) {
|
|
|
1827
1825
|
* @param {Function} [resolve] - predicate override for tests; receives a
|
|
1828
1826
|
* package specifier, resolves like `require.resolve`, returns boolean.
|
|
1829
1827
|
* @returns {Promise<{timeContext: boolean, toolSchedule: boolean,
|
|
1830
|
-
* pluginMarket: boolean, compaction: boolean,
|
|
1831
|
-
* profileContext: boolean}>}
|
|
1828
|
+
* pluginMarket: boolean, compaction: boolean, profileContext: boolean}>}
|
|
1832
1829
|
*/
|
|
1833
1830
|
export async function probeHostExtras(ctx, resolve) {
|
|
1834
1831
|
let ok = resolve
|
|
@@ -1843,12 +1840,11 @@ export async function probeHostExtras(ctx, resolve) {
|
|
|
1843
1840
|
ok = () => false
|
|
1844
1841
|
}
|
|
1845
1842
|
}
|
|
1846
|
-
const [timeContext, toolSchedule, pluginMarket, compaction
|
|
1843
|
+
const [timeContext, toolSchedule, pluginMarket, compaction] = await Promise.all([
|
|
1847
1844
|
Promise.resolve(safeProbe(ok, '@deepseek-ai/dsh-time-context')).then(Boolean),
|
|
1848
1845
|
Promise.resolve(safeProbe(ok, '@deepseek-ai/dsh-tool-schedule')).then(Boolean),
|
|
1849
1846
|
Promise.resolve(safeProbe(ok, '@deepseek-ai/dsh-plugin-market/tools')).then(Boolean),
|
|
1850
1847
|
Promise.resolve(safeProbe(ok, '@deepseek-ai/dsh-compaction-basic')).then(Boolean),
|
|
1851
|
-
Promise.resolve(safeProbe(ok, '@deepseek-ai/dsh-tool-executor-ptc')).then(Boolean),
|
|
1852
1848
|
])
|
|
1853
1849
|
let profileContext = false
|
|
1854
1850
|
try {
|
|
@@ -1856,7 +1852,7 @@ export async function probeHostExtras(ctx, resolve) {
|
|
|
1856
1852
|
} catch {
|
|
1857
1853
|
profileContext = false
|
|
1858
1854
|
}
|
|
1859
|
-
return { timeContext, toolSchedule, pluginMarket, compaction,
|
|
1855
|
+
return { timeContext, toolSchedule, pluginMarket, compaction, profileContext }
|
|
1860
1856
|
}
|
|
1861
1857
|
|
|
1862
1858
|
/** Run one probe predicate; ANY failure reads as "absent" (a throwing
|
|
@@ -2304,18 +2300,18 @@ export async function apply(ctx, config = {}) {
|
|
|
2304
2300
|
const dialect = liveSettings.dialect()
|
|
2305
2301
|
const applies = dialectApplies(dialect, assembleContext && assembleContext.agent)
|
|
2306
2302
|
// dsh 0.2.2-alpha.2 narrowed this event to prompt PRESENTATION: it no
|
|
2307
|
-
// longer carries `tools` ("tool declarations remain provider-owned")
|
|
2308
|
-
//
|
|
2309
|
-
//
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2303
|
+
// longer carries `tools` ("tool declarations remain provider-owned").
|
|
2304
|
+
// Read the step's admitted set back from the tools service — the same
|
|
2305
|
+
// toolSet the agent loop resolved for this step, so conditional tools
|
|
2306
|
+
// are judged exactly as execution will judge them.
|
|
2307
|
+
const toolSet = assembleContext && assembleContext.toolSet
|
|
2308
|
+
const offeredTools = (() => {
|
|
2309
|
+
try {
|
|
2310
|
+
return ctx.get('tools')?.schemas?.(assembleContext && assembleContext.agent, toolSet) ?? []
|
|
2311
|
+
} catch {
|
|
2312
|
+
return []
|
|
2313
|
+
}
|
|
2314
|
+
})()
|
|
2319
2315
|
// Routing is dialect-independent and follows actual offered tools.
|
|
2320
2316
|
// PTC may expose only run_code here: its generic SDK decision rule
|
|
2321
2317
|
// relies on the registered bindings' own descriptions, not guessed
|