dsh-bash-terminal-ts 0.5.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-bash-terminal-ts",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "engines": {
33
33
  "node": ">=22",
34
- "dsh": ">=0.1.5-alpha.1 <0.2.0-0"
34
+ "dsh": ">=0.1.5-rc.1 <0.1.6-0"
35
35
  },
36
36
  "type": "module",
37
37
  "main": "lib/index.js",
@@ -45,6 +45,7 @@
45
45
  "dist",
46
46
  "src",
47
47
  "scripts",
48
+ "template",
48
49
  "tsconfig.json",
49
50
  "tsconfig.client.json",
50
51
  "tsconfig.test.json",
@@ -75,17 +76,17 @@
75
76
  },
76
77
  "peerDependencies": {
77
78
  "@deepseek-ai/cordis": "^4.0.2",
78
- "@deepseek-ai/dsh-tools": "^0.1.5-rc.1",
79
- "@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
80
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
81
- "@deepseek-ai/dsh-shell": "^0.1.5-rc.1",
82
- "@deepseek-ai/dsh-sandbox": "^0.1.5-rc.1",
83
- "@deepseek-ai/dsh-timeout": "^0.1.5-rc.1",
84
- "@deepseek-ai/dsh-client-store": "^0.1.5-rc.1",
85
- "@deepseek-ai/dsh-client-locale": "^0.1.5-rc.1",
86
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.5-rc.1",
87
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.1",
88
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.1",
79
+ "@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.1.6-0",
80
+ "@deepseek-ai/dsh-settings": ">=0.1.5-rc.1 <0.1.6-0",
81
+ "@deepseek-ai/dsh-llm": ">=0.1.5-rc.1 <0.1.6-0",
82
+ "@deepseek-ai/dsh-shell": ">=0.1.5-rc.1 <0.1.6-0",
83
+ "@deepseek-ai/dsh-sandbox": ">=0.1.5-rc.1 <0.1.6-0",
84
+ "@deepseek-ai/dsh-timeout": ">=0.1.5-rc.1 <0.1.6-0",
85
+ "@deepseek-ai/dsh-client-store": ">=0.1.5-rc.1 <0.1.6-0",
86
+ "@deepseek-ai/dsh-client-locale": ">=0.1.5-rc.1 <0.1.6-0",
87
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-rc.1 <0.1.6-0",
88
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-rc.1 <0.1.6-0",
89
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.5-rc.1 <0.1.6-0",
89
90
  "react": "^18.2.0"
90
91
  },
91
92
  "dependencies": {
package/screenshots.json CHANGED
@@ -1,3 +1,5 @@
1
1
  {
2
- "screenshots": []
2
+ "screenshots": [
3
+ "assets/shells.png"
4
+ ]
3
5
  }
@@ -1,4 +1,4 @@
1
- // Build the browser client bundle for dsh-bash-terminal.
1
+ // Build the browser client bundle for dsh-bash-terminal-ts.
2
2
  // Output: lib/client.js (primary, consumed by DSH loader/reload precheck) and
3
3
  // dist/client.js (legacy compatibility) — a __ModuleLoader__.load({ id, factory })
4
4
  // wrapper around the esbuild CJS bundle; shared deps (react, @deepseek-ai/*)
@@ -33,7 +33,7 @@ await build({
33
33
 
34
34
  const core = readFileSync(join(root, "dist", "client.core.js"), "utf8");
35
35
  const wrapper = `window.__ModuleLoader__.load({
36
- id: "dsh-bash-terminal",
36
+ id: "dsh-bash-terminal-ts",
37
37
  factory: (require) => {
38
38
  var module = { exports: {} };
39
39
  var exports = module.exports;
package/src/client.tsx CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-bash-terminal client plugin: a "Default terminal" preference row in the
1
+ // dsh-bash-terminal-ts client plugin: a "Default terminal" preference row in the
2
2
  // Web UI General settings, mirroring the shipped EnterBehaviorRow grammar
3
3
  // (row layout, capsule selector with chevron, --dsw-* tokens).
4
4
  //
@@ -32,7 +32,7 @@ const ROW_CSS =
32
32
  ".btChevron{flex:none}";
33
33
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"bash-terminal-row\"]") === null) {
34
34
  const tag = document.createElement("style");
35
- tag.dataset.plugin = "dsh-bash-terminal";
35
+ tag.dataset.plugin = "dsh-bash-terminal-ts";
36
36
  tag.dataset.pluginCss = "bash-terminal-row";
37
37
  tag.textContent = ROW_CSS;
38
38
  document.head.appendChild(tag);
package/src/dsh-types.ts CHANGED
@@ -294,7 +294,7 @@ export interface ApprovalSeam {
294
294
  // ---- plugin context (server side) ----------------------------------------------
295
295
 
296
296
  /**
297
- * The structural context face dsh-bash-terminal programs against: the union
297
+ * The structural context face dsh-bash-terminal-ts programs against: the union
298
298
  * of every `ctx.*` member touched by src/index.ts and src/terminal.ts.
299
299
  */
300
300
  export interface BashTerminalContext {
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-bash-terminal - one shell tool, four Windows terminals.
1
+ // dsh-bash-terminal-ts - one shell tool, four Windows terminals.
2
2
  //
3
3
  // Registers a model-facing shell tool. The terminal backend (powershell /
4
4
  // gitbash / msys2 / wsl) is chosen by the USER in the Web UI settings (default
@@ -321,7 +321,7 @@ function spawnSpec(resolved: SpawnResolution, argv: string[], env: Record<string
321
321
  function collectedOutput(handle: { collected: { stdout: unknown; stderr: unknown } }) {
322
322
  const { stdout, stderr } = handle.collected;
323
323
  if (!isCollectedStream(stdout) || !isCollectedStream(stderr)) {
324
- throw new Error("dsh-bash-terminal: subprocess implementation dropped a requested collect stream");
324
+ throw new Error("dsh-bash-terminal-ts: subprocess implementation dropped a requested collect stream");
325
325
  }
326
326
  return { stdout, stderr };
327
327
  }
@@ -392,7 +392,7 @@ async function runForeground(
392
392
  function requireSubprocess(ctx: BashTerminalContext) {
393
393
  const subprocess = ctx.subprocess;
394
394
  if (subprocess === null) {
395
- throw new Error("dsh-bash-terminal: ctx.subprocess seam unavailable (missing inject service)");
395
+ throw new Error("dsh-bash-terminal-ts: ctx.subprocess seam unavailable (missing inject service)");
396
396
  }
397
397
  return subprocess;
398
398
  }
@@ -666,14 +666,14 @@ const BACKGROUND_OUTPUT_PROPERTIES: Record<string, JsonSchemaNode> = {
666
666
 
667
667
  export function apply(ctx: BashTerminalContext, config: Partial<ConfigValues> = {}): void {
668
668
  if (process.platform !== "win32") {
669
- ctx.logger?.info?.("dsh-bash-terminal: only meaningful on win32; skipping tool registration");
669
+ ctx.logger?.info?.("dsh-bash-terminal-ts: only meaningful on win32; skipping tool registration");
670
670
  return;
671
671
  }
672
672
  const backgroundEnabled = true;
673
673
  const paths = resolveAllPaths(config);
674
674
  const defaultShell = config.defaultShell ?? DEFAULT_SHELL;
675
675
  if (!(SHELLS as readonly string[]).includes(defaultShell)) {
676
- throw new Error(`dsh-bash-terminal: invalid defaultShell ${JSON.stringify(defaultShell)}`);
676
+ throw new Error(`dsh-bash-terminal-ts: invalid defaultShell ${JSON.stringify(defaultShell)}`);
677
677
  }
678
678
  const settingsScope = ctx.settings.register(
679
679
  SETTINGS_NAMESPACE,
@@ -829,7 +829,7 @@ export function apply(ctx: BashTerminalContext, config: Partial<ConfigValues> =
829
829
  const shell = settingsScope.get().defaultShell;
830
830
  const argv0 = buildArgv(shell, v.command, paths, v.distro);
831
831
  if (argv0[0] === undefined) {
832
- throw new Error(`dsh-bash-terminal: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
832
+ throw new Error(`dsh-bash-terminal-ts: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
833
833
  }
834
834
  // Only element 0 (the resolved executable) can be undefined; guarded above.
835
835
  const argv = argv0 as string[];
package/src/terminal.ts CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-bash-terminal: interactive terminal tool over the official PTY seam.
1
+ // dsh-bash-terminal-ts: interactive terminal tool over the official PTY seam.
2
2
  // ctx.subprocess.spawnTerminal (node-pty under the hood) allocates a real
3
3
  // terminal; this module owns model-facing sessions: open / send / read /
4
4
  // signal (Ctrl+C etc.) / close. The backend follows the user's default