dsh-gitbash-shell 0.10.4 → 0.11.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.
@@ -4,10 +4,10 @@
4
4
  # preset's own agent.cordis.yml.
5
5
  # The `ptc` agent preset: the standard coding agent, presented as PTC mode.
6
6
  #
7
- # Everything in `standard` is here unchanged. What is added is the `tool-presentation`
8
- # row: instead of one tool call per action, the model writes a TypeScript
9
- # program against a generated SDK and `run_code` executes it, so a sequence
10
- # that would be five round trips becomes one.
7
+ # Most of `standard` is here unchanged. The deliberate exception is the
8
+ # general-purpose `workflow` tool: PTC mode uses `run_code` as its model-authored
9
+ # composition surface. The `tool-presentation` row turns the remaining registry
10
+ # into a generated SDK, so a sequence that would be five round trips becomes one.
11
11
  #
12
12
  # The registry itself stays on the host plane — the agent loop's scheduler and
13
13
  # the API proxy's presenters are its consumers — so what this preset owns is
@@ -199,8 +199,8 @@
199
199
 
200
200
  # Fork omits model selection so provider/model stay equal to the parent and
201
201
  # the inherited history remains eligible for KV Cache reuse. This preset
202
- # keeps fork continuable and accepts its child-scoped `report` additions invalidating
203
- # that prefix; issue #2124 tracks cache-preserving continuable fork.
202
+ # keeps fork continuable; parent and child inherit the same messaging tool,
203
+ # while the parent id and return guidance follow the inherited history.
204
204
  - id: tool-subagent-fork
205
205
  name: '@deepseek-ai/dsh-tool-subagent'
206
206
  config:
@@ -237,6 +237,9 @@
237
237
 
238
238
  - id: tool-workflow
239
239
  name: '@deepseek-ai/dsh-tool-workflow'
240
+ # Keep the engine above for `ralph`, but do not publish a second
241
+ # model-authored orchestration surface beside `run_code` in PTC mode.
242
+ disabled: true
240
243
 
241
244
  - id: tool-ralph
242
245
  name: '@deepseek-ai/dsh-tool-ralph'
@@ -1,3 +1,3 @@
1
1
  name: PTC 模式 · Git Bash
2
- description: 具备标准模式的全部能力,并通过 PTC 模式 SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。(Shell 使用 Git Bash)
2
+ description: 功能完整的编码 Agent,但默认不提供 workflow 工具;其他工具通过 PTC 模式 SDK 呈现,让模型用一个 TypeScript 程序组合多步操作。(Shell 使用 Git Bash)
3
3
  order: 2
@@ -158,12 +158,6 @@
158
158
  # `workflows` is different — nothing outside an agent reads it — so every row
159
159
  # that reaches it shares one entry-local realm here, and a consumer left
160
160
  # outside would resolve a host registry this preset does not populate.
161
- #
162
- # `tool-subagent-report` is host-plane for the same reason as the registry,
163
- # not because a preset may not want it: it registers a CONTINUABLE SETUP on
164
- # that singleton rather than a tool this agent calls, and the setup list is
165
- # not scope-aware — one copy per mounted preset means every child gets
166
- # `report` registered once per live session, which throws on the second.
167
161
  - id: delegation
168
162
  name: cordis:group
169
163
  group: true
@@ -186,8 +180,8 @@
186
180
 
187
181
  # Fork omits model selection so provider/model stay equal to the parent and
188
182
  # the inherited history remains eligible for KV Cache reuse. This preset
189
- # keeps fork continuable and accepts its child-scoped `report` additions invalidating
190
- # that prefix; issue #2124 tracks cache-preserving continuable fork.
183
+ # keeps fork continuable; parent and child inherit the same messaging tool,
184
+ # while the parent id and return guidance follow the inherited history.
191
185
  - id: tool-subagent-fork
192
186
  name: '@deepseek-ai/dsh-tool-subagent'
193
187
  config:
@@ -170,12 +170,6 @@
170
170
  # `workflows` is different — nothing outside an agent reads it — so every row
171
171
  # that reaches it shares one entry-local realm here, and a consumer left
172
172
  # outside would resolve a host registry this preset does not populate.
173
- #
174
- # `tool-subagent-report` is host-plane for the same reason as the registry,
175
- # not because a preset may not want it: it registers a CONTINUABLE SETUP on
176
- # that singleton rather than a tool this agent calls, and the setup list is
177
- # not scope-aware — one copy per mounted preset means every child gets
178
- # `report` registered once per live session, which throws on the second.
179
173
  - id: delegation
180
174
  name: cordis:group
181
175
  group: true
@@ -198,8 +192,8 @@
198
192
 
199
193
  # Fork omits model selection so provider/model stay equal to the parent and
200
194
  # the inherited history remains eligible for KV Cache reuse. This preset
201
- # keeps fork continuable and accepts its child-scoped `report` additions invalidating
202
- # that prefix; issue #2124 tracks cache-preserving continuable fork.
195
+ # keeps fork continuable; parent and child inherit the same messaging tool,
196
+ # while the parent id and return guidance follow the inherited history.
203
197
  - id: tool-subagent-fork
204
198
  name: '@deepseek-ai/dsh-tool-subagent'
205
199
  config:
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-gitbash-shell",
3
- "version": "0.10.4",
3
+ "version": "0.11.0",
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.10.4",
3
+ "version": "0.11.0",
4
4
  "description": "DSH plugin: run every agent shell command through Git for Windows bash on Windows instead of PowerShell. Replaces the pwsh executor with a Git Bash ctx.shell provider and materializes Git Bash variants of the standard/minimal/code/cordis agent presets into your user preset root at startup. On Windows it also adopts dsh-better-sidebar's terminal shell (UI tabs and the model-facing terminal_* tools) through the sidebar's official settings seam, and pairs with dsh-ptc-cordis-preset so the PTC Creation-mode preset materializes as its Git Bash variant. Ships both composition eras for dsh <= 0.1.1 (built-in preset id 'code') and dsh >= 0.1.2 (renamed id 'ptc') — the era is probed per boot and re-materialized automatically after a dsh upgrade, in either upgrade order; preset ids never change so pinned sessions stay valid.",
5
5
  "type": "module",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -304,6 +304,14 @@ const SETTINGS_NAMESPACE = 'gitbash-shell'
304
304
  /** The full directive text, injected only while posixPaths is on. */
305
305
  const POSIX_DIRECTIVE_TEXT = 'The working shell is Git for Windows bash: paths use MSYS drive roots (/c/Users/...), and every tool accepts that form directly.'
306
306
 
307
+ // Official runtime counterpart to the directive (v0.11.0): dsh-shell-env is
308
+ // the host-plane registry behind the model-visible $DSH_* facts, and the
309
+ // bash tool's schema tells the model to inspect them — so the dialect also
310
+ // lives there, verifiable at runtime instead of only stated in the prompt.
311
+ const PATH_DIALECT_KEY = 'DSH_PATH_DIALECT'
312
+ const PATH_DIALECT_VALUE = 'msys'
313
+ const PATH_DIALECT_DESCRIPTION = 'Path dialect for tool calls and tool results: MSYS drive roots (/c/Users/...); every tool accepts this form directly.'
314
+
307
315
  /** Read the posixPaths switch from the live settings service; never throws. */
308
316
  export function readPosixPaths(ctxLike) {
309
317
  try {
@@ -635,6 +643,41 @@ export async function apply(ctx, config = {}) {
635
643
  console.log(`${TAG} settings inject wiring failed: ${error?.message ?? error}`)
636
644
  }
637
645
 
646
+ // ── official shell-env fact: DSH_PATH_DIALECT (Windows only, gated; v0.11.0) ──
647
+ // dsh-shell-env owns the model-visible $DSH_* facts (host-plane service;
648
+ // the web composition injects it and publishes DSH_WEB_URL beside the
649
+ // built-ins), and the bash tool's schema points the model straight at them
650
+ // ("inspect them when needed"). While posixPaths is on, every shell call
651
+ // therefore also carries a runtime-verifiable dialect declaration: the
652
+ // prompt rewrite states the dialect once at the source, the environment
653
+ // answers on demand. The resolver reads the live switch per execution, so
654
+ // toggling the setting empties the variable without re-registration; the
655
+ // disposer rides the plugin fiber. ctx.inject keeps the wiring independent
656
+ // of row activation order and a silent no-op where the registry is absent.
657
+ if (process.platform === 'win32') {
658
+ try {
659
+ ctx.inject(['shellEnv'], (envCtx) => {
660
+ try {
661
+ const shellEnv = envCtx && envCtx.shellEnv
662
+ if (!shellEnv || typeof shellEnv.register !== 'function') return
663
+ const unregister = shellEnv.register({
664
+ name: 'gitbash-shell',
665
+ variables: { [PATH_DIALECT_KEY]: { description: PATH_DIALECT_DESCRIPTION } },
666
+ resolve() {
667
+ return readPosixPaths(envCtx) ? { [PATH_DIALECT_KEY]: PATH_DIALECT_VALUE } : {}
668
+ },
669
+ })
670
+ envCtx.effect(() => unregister, 'dsh-gitbash-shell: shellEnv path-dialect fact')
671
+ console.log(`${TAG} shellEnv fact registered: ${PATH_DIALECT_KEY} (gated by the posixPaths setting)`)
672
+ } catch (error) {
673
+ console.log(`${TAG} shellEnv fact registration failed: ${error?.message ?? error}`)
674
+ }
675
+ })
676
+ } catch (error) {
677
+ console.log(`${TAG} shellEnv wiring failed: ${error?.message ?? error}`)
678
+ }
679
+ }
680
+
638
681
  // ── prompt-assembly path dialect (Windows only, gated; v0.10.0) ────────
639
682
  // While posixPaths is on, EVERY Windows absolute path the model would
640
683
  // see — section text, context text, and prompt variables — is rewritten