@songtonyli/dsh-cli 0.1.9 → 0.1.11

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.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.i18n.yaml +2 -2
  4. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.md +1 -1
  5. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.zh.md +1 -1
  6. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/index.js +1 -0
  7. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.host.js +2 -1
  8. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.remote-client.js +1 -0
  9. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/index.js +1 -0
  10. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1 -0
  11. package/node_modules/@deepseek-ai/dsh-authorization/README.i18n.yaml +2 -2
  12. package/node_modules/@deepseek-ai/dsh-authorization/README.md +1 -1
  13. package/node_modules/@deepseek-ai/dsh-authorization/README.zh.md +1 -1
  14. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +1 -0
  15. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  16. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
  17. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +1 -1
  18. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +1 -1
  19. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +3 -1
  20. package/node_modules/@deepseek-ai/dsh-native-command/README.i18n.yaml +2 -2
  21. package/node_modules/@deepseek-ai/dsh-native-command/README.md +7 -2
  22. package/node_modules/@deepseek-ai/dsh-native-command/README.zh.md +7 -2
  23. package/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +93 -2
  24. package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -0
  25. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +2 -2
  26. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  27. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +47 -12
  28. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +47 -12
  29. package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +3 -2
  30. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +3087 -1012
  31. package/node_modules/@deepseek-ai/dsh-tui-app/lib/startup.js +3 -2
  32. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +2 -0
  33. package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +2 -77
  34. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -2
  35. package/node_modules/@types/node/README.md +1 -1
  36. package/node_modules/@types/node/package.json +2 -2
  37. package/package.json +2 -2
@@ -19,7 +19,7 @@ const TUI_STARTUP_SERVICE = "tuiStartup";
19
19
  * @returns a fresh program, so one process can parse more than once (tests).
20
20
  */
21
21
  function tuiCommand() {
22
- return new Command().name("dsh --profile tui").description("Talk to the agent in this terminal: streamed replies, tool cards, approvals, and slash commands.").helpOption("-h, --help", "show this help").option("--resume <session-id>", "continue a persisted session instead of starting a new one").argument("[prompt...]", "an optional first prompt; multiple words are joined by spaces").addHelpText("after", `
22
+ return new Command().name("dsh --profile tui").description("Talk to the agent in this terminal: streamed replies, tool cards, approvals, and slash commands.").helpOption("-h, --help", "show this help").option("--resume <session-id>", "continue a persisted session instead of starting a new one").option("--no-open", "print sign-in URLs instead of opening the default browser").argument("[prompt...]", "an optional first prompt; multiple words are joined by spaces").addHelpText("after", `
23
23
  Examples:
24
24
  dsh --profile tui start a new session and wait for input
25
25
  dsh --profile tui "explain this repo" start with a first prompt
@@ -43,7 +43,8 @@ function apply(ctx) {
43
43
  if (options.resume !== void 0 && options.resume.trim() === "") program.error("error: --resume needs a session id");
44
44
  ctx.provide(TUI_STARTUP_SERVICE, {
45
45
  prompt: prompt === "" ? void 0 : prompt,
46
- resume: options.resume
46
+ resume: options.resume,
47
+ openBrowser: options.open
47
48
  });
48
49
  });
49
50
  parseCmdline(ctx, program);
@@ -44,6 +44,8 @@
44
44
  "@deepseek-ai/dsh-file-reference": "0.1.6-alpha.1",
45
45
  "@deepseek-ai/dsh-file-reference-local": "0.1.6-alpha.1",
46
46
  "@deepseek-ai/dsh-host-plugin-inventory": "0.1.6-alpha.1",
47
+ "@deepseek-ai/dsh-launch-environment": "0.1.6-alpha.1",
48
+ "@deepseek-ai/dsh-native-command": "0.1.6-alpha.1",
47
49
  "@deepseek-ai/dsh-session-log-export": "0.1.6-alpha.1",
48
50
  "@deepseek-ai/dsh-session-reference": "0.1.6-alpha.1",
49
51
  "@deepseek-ai/dsh-session-stats": "0.1.6-alpha.1",
@@ -1,5 +1,4 @@
1
1
  import { createRequire } from "node:module";
2
- import { spawn } from "node:child_process";
3
2
  import { dirname, join } from "node:path";
4
3
  import { networkInterfaces } from "node:os";
5
4
  import { fileURLToPath } from "node:url";
@@ -7,7 +6,7 @@ import z from "@deepseek-ai/schemastery";
7
6
  import { addHarnessSourceSection, auditStartupEntries } from "@deepseek-ai/dsh-app-boot";
8
7
  import * as FrontendStatic from "@deepseek-ai/dsh-host-frontend-static";
9
8
  import { launchEnvironmentOf, launchedThroughSsh } from "@deepseek-ai/dsh-launch-environment";
10
- import { scrubbedParentEnv } from "@deepseek-ai/dsh-subprocess";
9
+ import { openNativeUrl } from "@deepseek-ai/dsh-native-command";
11
10
  //#region lib/types/index.js
12
11
  /**
13
12
  * @deepseek-ai/dsh-web-app — the browser-surface bundle's runtime glue plugin
@@ -41,35 +40,6 @@ const DSH_WEB_URL = "DSH_WEB_URL";
41
40
  const LOOPBACK_HOST = "127.0.0.1";
42
41
  /** The webserver schema's all-interfaces bind literal. */
43
42
  const ALL_INTERFACES_HOST = "0.0.0.0";
44
- const BROWSER_OPENER_MODULE = import.meta.resolve("open");
45
- const BROWSER_OPENER_PROGRAM = `
46
- try {
47
- const { default: open } = await import(${JSON.stringify(BROWSER_OPENER_MODULE)})
48
- const launcher = await open(process.argv[1])
49
- if (process.platform === 'win32') {
50
- // open resolves at PowerShell spawn; keep it referenced until that launcher hands the URL to Windows.
51
- const code = launcher.exitCode ?? await new Promise((resolve, reject) => {
52
- function onError(error) {
53
- launcher.off('close', onClose)
54
- reject(error)
55
- }
56
- function onClose(code) {
57
- launcher.off('error', onError)
58
- resolve(code)
59
- }
60
- launcher.ref()
61
- launcher.once('error', onError)
62
- launcher.once('close', onClose)
63
- })
64
- if (code !== 0) throw new Error('browser operating-system launcher exited with code ' + String(code))
65
- }
66
- process.exitCode = 0
67
- } catch (error) {
68
- // The parent turns this exit into the manual-URL warning.
69
- console.error(error)
70
- process.exitCode = 1
71
- }
72
- `;
73
43
  /**
74
44
  * Resolve one LAN-trust snapshot from the active server bind.
75
45
  *
@@ -113,55 +83,10 @@ function resolveDistIndex() {
113
83
  throw new Error("web-app: @deepseek-ai/dsh-web-frontend is not resolvable from this composition");
114
84
  }
115
85
  }
116
- /** Start the maintained platform opener without forwarding Harness credentials. */
117
- function spawnBrowserLauncher(url) {
118
- return spawn(process.execPath, [
119
- "--input-type=module",
120
- "--eval",
121
- BROWSER_OPENER_PROGRAM,
122
- "--",
123
- url
124
- ], {
125
- env: scrubbedParentEnv(),
126
- stdio: [
127
- "ignore",
128
- "inherit",
129
- "pipe"
130
- ]
131
- });
132
- }
133
- /** Hand one URL to the operating system's default browser. */
134
- async function openBrowser(url) {
135
- const launcher = spawnBrowserLauncher(url);
136
- let launcherStderr = "";
137
- launcher.stderr?.setEncoding("utf8");
138
- launcher.stderr?.on("data", (chunk) => {
139
- launcherStderr += chunk;
140
- });
141
- await new Promise((resolve, reject) => {
142
- function onError(error) {
143
- launcher.off("close", onClose);
144
- reject(error);
145
- }
146
- function onClose(code) {
147
- launcher.off("error", onError);
148
- if (code !== 0) {
149
- const firstLine = launcherStderr.trim().split(/\r?\n/u)[0];
150
- const reason = firstLine === void 0 || firstLine === "" ? `browser launcher exited with code ${String(code)}` : firstLine.replace(/^(?:[A-Za-z]*Error):\s*/u, "");
151
- reject(new Error(reason));
152
- return;
153
- }
154
- if (launcherStderr !== "") process.stderr.write(launcherStderr);
155
- resolve();
156
- }
157
- launcher.once("error", onError);
158
- launcher.once("close", onClose);
159
- });
160
- }
161
86
  /** Test hooks for the built dist and native browser handoff; production never mutates them. */
162
87
  const internals = {
163
88
  resolveDistIndex,
164
- openBrowser
89
+ openBrowser: openNativeUrl
165
90
  };
166
91
  /**
167
92
  * Mount the Web runtime: dist serving, surface prompt, the bash runtime
@@ -110,17 +110,16 @@
110
110
  "@deepseek-ai/dsh-host-webserver": "0.1.6-alpha.1",
111
111
  "@deepseek-ai/dsh-launch-environment": "0.1.6-alpha.1",
112
112
  "@deepseek-ai/dsh-message-feedback": "0.1.6-alpha.1",
113
+ "@deepseek-ai/dsh-native-command": "0.1.6-alpha.1",
113
114
  "@deepseek-ai/dsh-session-log-export": "0.1.6-alpha.1",
114
115
  "@deepseek-ai/dsh-session-reference": "0.1.6-alpha.1",
115
116
  "@deepseek-ai/dsh-session-stats": "0.1.6-alpha.1",
116
117
  "@deepseek-ai/dsh-session-turn-outline": "0.1.6-alpha.1",
117
- "@deepseek-ai/dsh-subprocess": "0.1.6-alpha.1",
118
118
  "@deepseek-ai/dsh-tool-subagent": "0.1.6-alpha.1",
119
119
  "@deepseek-ai/dsh-web-frontend": "0.1.6-alpha.1",
120
120
  "@deepseek-ai/dsh-workspace": "0.1.6-alpha.1",
121
121
  "@deepseek-ai/schemastery": "3.18.2",
122
122
  "commander": "^15.0.0",
123
- "open": "^11.0.0",
124
123
  "@deepseek-ai/dsh-api-terminal-controller": "0.1.6-alpha.1",
125
124
  "@deepseek-ai/dsh-client-ui-sidebar-terminal": "0.1.6-alpha.1"
126
125
  },
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 09 Sep 2026 18:05:03 GMT
11
+ * Last updated: Tue, 15 Sep 2026 20:33:28 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.20.2",
3
+ "version": "22.20.3",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -139,6 +139,6 @@
139
139
  "undici-types": "~6.21.0"
140
140
  },
141
141
  "peerDependencies": {},
142
- "typesPublisherContentHash": "8e6b0ce9d1f2dc282d7964257456bcffbdd45115e795462dde19073b17676daa",
142
+ "typesPublisherContentHash": "96f0a72c6119022091f6102f750c1a5d1b46ea12c877c15cd9614b20c51cdbc0",
143
143
  "typeScriptVersion": "5.6"
144
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "The dsh terminal agent: an interactive TUI over the DeepSeek Harness, with its whole Node runtime bundled in one install.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -341,7 +341,7 @@
341
341
  "@smithy/util-utf8": "2.3.0",
342
342
  "@stablelib/base64": "1.0.1",
343
343
  "@standard-schema/spec": "1.1.0",
344
- "@types/node": "22.20.2",
344
+ "@types/node": "22.20.3",
345
345
  "@types/retry": "0.12.0",
346
346
  "@vscode/ripgrep": "1.18.0",
347
347
  "@xterm/addon-serialize": "0.14.0",