dsh-gitbash-shell 0.7.1 → 0.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-gitbash-shell",
3
- "version": "0.7.1",
3
+ "version": "0.7.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.7.1",
3
+ "version": "0.7.2",
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
@@ -428,15 +428,25 @@ export async function apply(ctx, config = {}) {
428
428
 
429
429
  // The shim rides along every mount of this plugin and degrades silently if
430
430
  // the upstream shape differs from what we verified.
431
- let shim = { installed: false, restore: () => {} }
431
+ //
432
+ // INSTALL TIMING (aligned with dsh-ptc-cordis-preset 0.6.3): the host
433
+ // runner row activates AFTER this plugin's row, so a one-shot
434
+ // installRegisterShim(ctx.get('cordisInspect')) sampled a service that was
435
+ // not provided yet and silently installed nothing — every later mount of a
436
+ // second cordis-mode preset (e.g. 'cordis · Git Bash' beside the built-in
437
+ // Creation mode) kept dying with 'Host Cordis inspect provider "Service"
438
+ // is already registered' for the rest of the process. ctx.inject schedules
439
+ // the install for the moment the service actually appears — independent of
440
+ // row activation order, and still a no-op in a runner-less deployment.
432
441
  try {
433
- shim = installRegisterShim(ctx.get('cordisInspect'))
434
- } catch {
435
- /* never block startup */
436
- }
437
- if (shim.installed) {
438
- ctx.effect(() => () => shim.restore(), 'dsh-gitbash-shell: inspect-registry shim')
439
- console.log(`${TAG} inspect-registry compatibility shim active (multiple cordis-mode sessions supported)`)
442
+ ctx.inject(['cordisInspect'], (inspectCtx) => {
443
+ const shim = installRegisterShim(inspectCtx.get('cordisInspect'))
444
+ if (!shim.installed) return
445
+ inspectCtx.effect(() => () => shim.restore(), 'dsh-gitbash-shell: inspect-registry shim')
446
+ console.log(`${TAG} inspect-registry compatibility shim active (multiple cordis-mode sessions supported)`)
447
+ })
448
+ } catch (error) {
449
+ console.log(`${TAG} inspect-registry shim wiring failed: ${error?.message ?? error}`)
440
450
  }
441
451
 
442
452
  // ── cooperation capability ────────────────────────────────────────────────