dsh-gitbash-shell 0.24.0 → 0.24.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/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/compositions.js +27 -25
- package/src/index.js +9 -3
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "Windows 全模式 Git Bash:用 Git for Windows bash 替换 PowerShell 执行器,并物化 standard/minimal/code/cordis 的 Git Bash 变体 preset。双 era 适配 dsh <= 0.1.1(内置 id 'code')与 >= 0.1.2(改名 'ptc'),启动探测自动选择,preset id 永不变。联动:dsh-ptc-cordis-preset(两者同装时 PTC 创造模式自动物化为 Git Bash 版)+ dsh-better-sidebar(终端 UI 标签与模型 terminal_* 工具自动切到 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "Windows 上让 agent 的每条 shell 命令改经 Git for Windows bash 执行;物化四个内置预设的 Git Bash 变体,统一 MSYS 盘根路径方言,侧栏终端接管可开关。· Run every agent shell command through Git for Windows bash on Windows; materialize Git Bash variants of the built-in presets, unify the MSYS drive-root path dialect, and adopt the sidebar terminal behind a switch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/compositions.js
CHANGED
|
@@ -22,19 +22,18 @@ function off(value) {
|
|
|
22
22
|
return value === true ? { disabled: true } : {}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const PLAN_SECTION =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
].join('\n')
|
|
25
|
+
const PLAN_SECTION = `You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
26
|
+
|
|
27
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
28
|
+
|
|
29
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
30
|
+
|
|
31
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
32
|
+
|
|
33
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
34
|
+
|
|
35
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
36
|
+
`
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* The shared full-tool rows for standard / ptc / cordis variants (pure).
|
|
@@ -75,12 +74,10 @@ export function pluginsFor({ kind, gitBash, skillsDir }) {
|
|
|
75
74
|
config: { sampleOverCapGlobResults: false },
|
|
76
75
|
},
|
|
77
76
|
{ id: 'tool-jobs', name: '@deepseek-ai/dsh-tool-jobs' },
|
|
78
|
-
|
|
79
|
-
id: 'skill-filesystem',
|
|
80
|
-
name: '@deepseek-ai/dsh-skill
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
{ id: 'tool-skill', name: '@deepseek-ai/dsh-tool-skill' },
|
|
77
|
+
...((kind === 'standard' || kind === 'ptc') ? [
|
|
78
|
+
{ id: 'skill-filesystem', name: '@deepseek-ai/dsh-skill-filesystem' },
|
|
79
|
+
{ id: 'tool-skill', name: '@deepseek-ai/dsh-tool-skill' },
|
|
80
|
+
] : []),
|
|
84
81
|
{ id: 'command-goal', name: '@deepseek-ai/dsh-command-goal' },
|
|
85
82
|
{ id: 'tool-goal', name: '@deepseek-ai/dsh-tool-goal' },
|
|
86
83
|
{
|
|
@@ -178,6 +175,10 @@ export function pluginsFor({ kind, gitBash, skillsDir }) {
|
|
|
178
175
|
if (kind === 'cordis') {
|
|
179
176
|
rows.push({ id: 'tool-cordis', name: '@deepseek-ai/dsh-tool-cordis' })
|
|
180
177
|
}
|
|
178
|
+
if (kind === 'cordis') {
|
|
179
|
+
rows.push({ id: 'skill-filesystem', name: '@deepseek-ai/dsh-skill-filesystem', ...(skillsDir ? { config: { customSkillDirs: [skillsDir] } } : {}) })
|
|
180
|
+
rows.push({ id: 'tool-skill', name: '@deepseek-ai/dsh-tool-skill' })
|
|
181
|
+
}
|
|
181
182
|
rows.push({ id: 'present', name: '@deepseek-ai/dsh-tool-present' })
|
|
182
183
|
rows.push({
|
|
183
184
|
id: 'tool-plugin-manager',
|
|
@@ -253,13 +254,14 @@ export function minimalPluginsFor() {
|
|
|
253
254
|
config: {
|
|
254
255
|
timeoutMs: 300000,
|
|
255
256
|
description: [
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
"Run commands in a PowerShell shell",
|
|
258
|
+
"* When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.",
|
|
258
259
|
"* You don't have access to the internet via this tool.",
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
"* State is persistent across command calls and discussions with the user.",
|
|
261
|
+
"* Use native Windows paths (C:\\...) and $env:NAME variables; this is PowerShell, not bash.",
|
|
262
|
+
"* Please avoid commands that may produce a very large amount of output.",
|
|
263
|
+
"* Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.",
|
|
264
|
+
].join('\n') + '\n',
|
|
263
265
|
},
|
|
264
266
|
},
|
|
265
267
|
],
|
package/src/index.js
CHANGED
|
@@ -1649,8 +1649,14 @@ let reconcileSidebar = () => {}
|
|
|
1649
1649
|
* value is still ours, so a user's manual choice is never clobbered. The
|
|
1650
1650
|
* polling keeps the original ready-wait behavior: at boot the settings
|
|
1651
1651
|
* service may not be provided yet when this row's apply runs. Never throws.
|
|
1652
|
+
*
|
|
1653
|
+
* `readAdopt` is apply()'s era-aware gate getter (`() => liveSettings.
|
|
1654
|
+
* adoptSidebar()`), passed in because this module-level helper cannot see
|
|
1655
|
+
* that scope-local reader itself (v0.24.2 regression fix — referencing
|
|
1656
|
+
* `liveSettings` here threw `ReferenceError: liveSettings is not defined`
|
|
1657
|
+
* from `run()` and aborted the whole plugin mount).
|
|
1652
1658
|
*/
|
|
1653
|
-
function adoptSidebarShell(ctx, bashPath) {
|
|
1659
|
+
function adoptSidebarShell(ctx, bashPath, readAdopt) {
|
|
1654
1660
|
let adopted = false
|
|
1655
1661
|
let previous = ''
|
|
1656
1662
|
let tried = 0
|
|
@@ -1706,7 +1712,7 @@ function adoptSidebarShell(ctx, bashPath) {
|
|
|
1706
1712
|
|
|
1707
1713
|
const run = () => {
|
|
1708
1714
|
tried += 1
|
|
1709
|
-
const ok = reconcileSidebar(
|
|
1715
|
+
const ok = reconcileSidebar(readAdopt())
|
|
1710
1716
|
if (ok) {
|
|
1711
1717
|
// The namespace scope may register after the settings service; hook
|
|
1712
1718
|
// the live watch once it exists (idempotent via the effect disposer).
|
|
@@ -2250,7 +2256,7 @@ export async function apply(ctx, config = {}) {
|
|
|
2250
2256
|
// open; adopt it through that seam (see adoptSidebarShell for rationale).
|
|
2251
2257
|
// Disable with `betterSidebarShell: false` in the plugin row config.
|
|
2252
2258
|
if (config.betterSidebarShell !== false && process.platform === 'win32') {
|
|
2253
|
-
adoptSidebarShell(ctx, gitBashCapability.bashPath)
|
|
2259
|
+
adoptSidebarShell(ctx, gitBashCapability.bashPath, () => liveSettings.adoptSidebar())
|
|
2254
2260
|
}
|
|
2255
2261
|
|
|
2256
2262
|
// ── era split: declarative registration on dsh >= 0.1.7 ──────────────────
|