@aiwayds/dsh-tui-pi 2.37.0 → 2.38.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.
- package/bin/boot.mjs +1 -0
- package/bin/onboard-core.mjs +26 -8
- package/package.json +14 -14
- package/scripts/postinstall.mjs +1 -1
package/bin/boot.mjs
CHANGED
|
@@ -54,6 +54,7 @@ console.log('dsh-tui-pi setup (first run / upgrade only):')
|
|
|
54
54
|
const setup = runOnboard({ log: (line) => console.log(line) })
|
|
55
55
|
if (!setup.ok) {
|
|
56
56
|
console.error(`\ndsh-tui-pi: setup stopped at "${setup.step}".`)
|
|
57
|
+
if (setup.detail) console.error(`dsh-tui-pi: ${setup.step} — ${setup.detail}`)
|
|
57
58
|
console.error(`dsh-tui-pi: ${setup.hint}`)
|
|
58
59
|
process.exit(1)
|
|
59
60
|
}
|
package/bin/onboard-core.mjs
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* step); npm itself is a prerequisite — when it is not on PATH we print
|
|
15
15
|
* what to install and stop instead of guessing;
|
|
16
16
|
* - all functions are synchronous and never throw past the boundary:
|
|
17
|
-
* failures come back as { ok: false, step, hint }
|
|
17
|
+
* failures come back as { ok: false, step, hint, detail } where detail
|
|
18
|
+
* carries how the underlying process died (exit code / signal / spawn
|
|
19
|
+
* error) — never swallowed behind a bare "stopped".
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
22
|
import { execFileSync, spawnSync } from 'node:child_process'
|
|
@@ -125,14 +127,28 @@ export function dshBinPath() {
|
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
// Global installs always go through npm — one predictable path, regardless
|
|
128
|
-
// of which package manager pulled this package in.
|
|
130
|
+
// of which package manager pulled this package in. Returns { ok, detail }:
|
|
131
|
+
// on failure detail carries exactly how the npm child died (spawn error,
|
|
132
|
+
// signal, exit code). npm can die without ever printing an error — the
|
|
133
|
+
// kernel OOM killer SIGKILLs it under memory pressure (observed: exit 137
|
|
134
|
+
// installing @deepseek-ai/dsh on a 2 GiB podman VM) and a spawnSync timeout
|
|
135
|
+
// surfaces as a signal too — so a bare boolean would leave the launcher
|
|
136
|
+
// reporting "setup stopped" with no actionable cause.
|
|
129
137
|
function installGlobal(name) {
|
|
130
138
|
const result = spawnSync('npm', ['install', '-g', name], {
|
|
131
139
|
stdio: 'inherit',
|
|
132
140
|
timeout: INSTALL_TIMEOUT_MS,
|
|
133
141
|
shell: process.platform === 'win32',
|
|
134
142
|
})
|
|
135
|
-
|
|
143
|
+
if (result.status === 0) return { ok: true, detail: null }
|
|
144
|
+
const parts = []
|
|
145
|
+
if (result.error) {
|
|
146
|
+
parts.push(result.error.code ? `${result.error.code} (${result.error.message})` : result.error.message)
|
|
147
|
+
}
|
|
148
|
+
if (result.signal) parts.push(`killed by signal ${result.signal}`)
|
|
149
|
+
if (result.status !== null) parts.push(`exit code ${result.status}`)
|
|
150
|
+
if (parts.length === 0) parts.push('npm exited without an exit code or signal')
|
|
151
|
+
return { ok: false, detail: parts.join(', ') }
|
|
136
152
|
}
|
|
137
153
|
|
|
138
154
|
// Newest of the `latest` (stable) and `next` (rc) dist-tags — the same
|
|
@@ -250,7 +266,7 @@ function approvePrintedBuilds() {
|
|
|
250
266
|
* 2/3 pnpm — the host's plugin manager shells out to it; installed
|
|
251
267
|
* globally when missing
|
|
252
268
|
* 3/3 tui profile — `dsh plugin --profile tui add` this package (+ companions)
|
|
253
|
-
* Returns { ok: true, dsh } or { ok: false, step, hint }.
|
|
269
|
+
* Returns { ok: true, dsh } or { ok: false, step, hint, detail }.
|
|
254
270
|
*/
|
|
255
271
|
export function runOnboard({ log = () => {} } = {}) {
|
|
256
272
|
let dsh = dshBinPath()
|
|
@@ -272,8 +288,9 @@ export function runOnboard({ log = () => {} } = {}) {
|
|
|
272
288
|
? `${foundVersion} is older than this plugin requires (>= ${minHostVersion()})`
|
|
273
289
|
: 'not found'
|
|
274
290
|
log(` [1/3] dsh host ${reason} — installing ${hostSpec} globally with npm (largest step, a few minutes)…`)
|
|
275
|
-
|
|
276
|
-
|
|
291
|
+
const hostInstall = installGlobal(hostSpec)
|
|
292
|
+
if (!hostInstall.ok) {
|
|
293
|
+
return { ok: false, step: 'dsh host install', hint: `install it with: npm install -g ${hostSpec} — then re-run dsh-tui-pi`, detail: hostInstall.detail }
|
|
277
294
|
}
|
|
278
295
|
dsh = dshBinPath()
|
|
279
296
|
if (!dsh) {
|
|
@@ -287,8 +304,9 @@ export function runOnboard({ log = () => {} } = {}) {
|
|
|
287
304
|
log(` [2/3] pnpm found ${queryVersion(pnpm, ['-v']) ?? ''}`)
|
|
288
305
|
} else {
|
|
289
306
|
log(' [2/3] pnpm not found — installing globally…')
|
|
290
|
-
|
|
291
|
-
|
|
307
|
+
const pnpmInstall = installGlobal('pnpm')
|
|
308
|
+
if (!pnpmInstall.ok) {
|
|
309
|
+
return { ok: false, step: 'pnpm install', hint: 'install it with: npm install -g pnpm — then re-run dsh-tui-pi', detail: pnpmInstall.detail }
|
|
292
310
|
}
|
|
293
311
|
log(` [2/3] pnpm installed ${queryVersion('pnpm', ['-v']) ?? ''}`)
|
|
294
312
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwayds/dsh-tui-pi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "A fully-featured pi-style terminal UI for DeepSeek Harness (dsh) — history look-back & fork-at-turn, guided preset switching, live subagent steering, model profiles & themes",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
"postinstall": "node scripts/postinstall.mjs"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aiwayds/dsh-ask-router": "^0.
|
|
71
|
-
"@aiwayds/dsh-dcp": "^0.
|
|
72
|
-
"@aiwayds/dsh-jev-core": "^0.
|
|
73
|
-
"@aiwayds/dsh-llm-proxy": "^0.
|
|
74
|
-
"@aiwayds/dsh-llm-stats": "^0.
|
|
75
|
-
"@aiwayds/dsh-mcp-adapter": "^0.
|
|
76
|
-
"@aiwayds/dsh-model-sync": "^0.
|
|
77
|
-
"@aiwayds/dsh-profile-switch": "^0.
|
|
78
|
-
"@aiwayds/dsh-subagent-registry": "^0.
|
|
79
|
-
"@aiwayds/dsh-web-search-anysearch": "^0.
|
|
70
|
+
"@aiwayds/dsh-ask-router": "^0.7.0",
|
|
71
|
+
"@aiwayds/dsh-dcp": "^0.14.0",
|
|
72
|
+
"@aiwayds/dsh-jev-core": "^0.2.0",
|
|
73
|
+
"@aiwayds/dsh-llm-proxy": "^0.8.0",
|
|
74
|
+
"@aiwayds/dsh-llm-stats": "^0.9.0",
|
|
75
|
+
"@aiwayds/dsh-mcp-adapter": "^0.8.0",
|
|
76
|
+
"@aiwayds/dsh-model-sync": "^0.9.0",
|
|
77
|
+
"@aiwayds/dsh-profile-switch": "^0.4.0",
|
|
78
|
+
"@aiwayds/dsh-subagent-registry": "^0.19.1",
|
|
79
|
+
"@aiwayds/dsh-web-search-anysearch": "^0.9.0",
|
|
80
80
|
"@earendil-works/pi-tui": "0.85.1"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@deepseek-ai/cordis": "4.1.0",
|
|
100
|
-
"@deepseek-ai/dsh-settings": "0.2.2-rc.
|
|
101
|
-
"@deepseek-ai/dsh-skill": "0.2.2-rc.
|
|
102
|
-
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.
|
|
100
|
+
"@deepseek-ai/dsh-settings": "0.2.2-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-skill": "0.2.2-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.2",
|
|
103
103
|
"@types/node": "^24.0.0",
|
|
104
104
|
"typescript": "~5.9.0"
|
|
105
105
|
},
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -43,7 +43,7 @@ try {
|
|
|
43
43
|
const { runOnboard } = await import('../bin/onboard-core.mjs')
|
|
44
44
|
const setup = runOnboard({ log: (line) => console.log(line) })
|
|
45
45
|
if (!setup.ok) {
|
|
46
|
-
console.log(`dsh-tui-pi: setup stopped at "${setup.step}" — ${setup.hint}`)
|
|
46
|
+
console.log(`dsh-tui-pi: setup stopped at "${setup.step}"${setup.detail ? ` — ${setup.detail}` : ''} — ${setup.hint}`)
|
|
47
47
|
console.log('dsh-tui-pi: it will complete automatically on first launch.')
|
|
48
48
|
} else {
|
|
49
49
|
console.log('dsh-tui-pi: ready — launch with `dsh-tui-pi` (short: `dst`).')
|