@aiwayds/dsh-tui-pi 2.38.0 → 2.38.1
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/README.md +1 -1
- package/README.zh-CN.md +2 -0
- package/bin/boot.mjs +3 -3
- package/bin/onboard-core.mjs +13 -11
- package/package.json +7 -7
- package/scripts/link-dsh-closure.mjs +13 -9
- package/scripts/postinstall.mjs +0 -54
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ npm i -g @aiwayds/dsh-tui-pi
|
|
|
42
42
|
dsh-tui-pi # or the short form: dst
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
The
|
|
45
|
+
The package carries no install-time hook — the machine is set up on the first run of the launcher, which prints one progress line per step: it installs the `@deepseek-ai/dsh` host when missing (via npm, resolved as the newest of the `latest`/`next` dist-tags — the `latest` tag alone lags the rc line; if npm itself is not on PATH, it prints what to install and stops), installs pnpm, and creates the `tui` profile with this plugin and its bundled companions. The first run can take a few minutes — the host download is large. Host compatibility window: **0.2.2-rc.1 and newer** — a host at or above the floor is kept as-is; an older one is upgraded automatically. Whatever the first run cannot finish (e.g. an offline machine) completes automatically on a later launch. After a later `npm i -g` upgrade of this package, the profile's mounted copy is moved to the new version on the next launch — a profile that is newer than the global install (dev-upgraded ahead) is left untouched.
|
|
46
46
|
|
|
47
47
|
The manual steps do exactly what the onboarding runs, if you prefer them:
|
|
48
48
|
|
package/README.zh-CN.md
CHANGED
|
@@ -40,6 +40,8 @@ dsh plugin --profile tui add @aiwayds/dsh-tui-pi
|
|
|
40
40
|
dsh --profile tui # 启动(或:dsh-tui-pi)
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
本包不带任何安装期钩子——装机在启动器首次运行时完成,每步打一行进度:缺 `@deepseek-ai/dsh` 宿主时经 npm 全局安装(解析 `latest`/`next` 中更新的 dist-tag)、装 pnpm、创建带本插件与自带 companion 的 `tui` profile。首启要下载宿主,可能耗时数分钟;首次没装完的部分(如离线机器)下次启动自动补齐。之后升级本包,profile 的挂载副本在下次启动时随版本前移。
|
|
44
|
+
|
|
43
45
|
过去需要手工 patch 的一切——画布背景、`@deepseek-ai` 模块闭包、compaction 后端——现在都自动完成。发版后升级现有 profile:
|
|
44
46
|
|
|
45
47
|
```sh
|
package/bin/boot.mjs
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* SyntaxError, so the guard stops with the paths and the removal commands.
|
|
13
13
|
*
|
|
14
14
|
* Version follow: after `npm i -g` upgrades this package, the profile still
|
|
15
|
-
* holds the old copy; the next launch
|
|
16
|
-
* the
|
|
17
|
-
*
|
|
15
|
+
* holds the old copy; the next launch re-runs the add to move the profile to
|
|
16
|
+
* the new version. A profile that is NEWER than the global install
|
|
17
|
+
* (dev-upgraded ahead) is left untouched.
|
|
18
18
|
*
|
|
19
19
|
* See bin/onboard-core.mjs for the setup logic and its failure contract.
|
|
20
20
|
*/
|
package/bin/onboard-core.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* One-time onboarding for the `dsh-tui-pi` / `dst` launcher
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
2
|
+
* One-time onboarding for the `dsh-tui-pi` / `dst` launcher. The package
|
|
3
|
+
* carries no install hook — the historical `scripts/postinstall.mjs` was
|
|
4
|
+
* removed because pnpm 11's strictDepBuilds validation gates dependencies'
|
|
5
|
+
* install scripts (see docs/adr/0004-onboarding-first-launch-not-postinstall.md)
|
|
6
|
+
* — so `bin/boot.mjs` is the single entry point: it runs on the first
|
|
7
|
+
* `dsh-tui-pi` invocation and on any later one that finds the machine
|
|
8
|
+
* missing a piece (fresh machine, offline first run, profile behind after
|
|
9
|
+
* an upgrade, …).
|
|
9
10
|
*
|
|
10
11
|
* Contract:
|
|
11
12
|
* - idempotent: every step checks before it acts, so a re-run only prints
|
|
@@ -230,10 +231,11 @@ export function compareVersions(a, b) {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
// pnpm ≥10 fails a fresh `add` with ERR_PNPM_IGNORED_BUILDS when the added
|
|
233
|
-
// packages carry lifecycle scripts. The
|
|
234
|
-
// the closure
|
|
235
|
-
//
|
|
236
|
-
// approve-builds` would do interactively
|
|
234
|
+
// packages carry lifecycle scripts. The packages this suite ships declare
|
|
235
|
+
// none (the dev-tree closure linker is not wired as a hook in any published
|
|
236
|
+
// tarball), so filling the allowBuilds block approves nothing that can run
|
|
237
|
+
// unvetted — it is what `pnpm approve-builds` would do interactively, and it
|
|
238
|
+
// stays safe as companions evolve. pnpm sometimes records an
|
|
237
239
|
// allowBuilds skeleton in the profile's pnpm-workspace.yaml with a
|
|
238
240
|
// "set this to true or false" placeholder — fill those placeholders; when
|
|
239
241
|
// it does not (behavior varies by pnpm build and environment), write the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwayds/dsh-tui-pi",
|
|
3
|
-
"version": "2.38.
|
|
3
|
+
"version": "2.38.1",
|
|
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",
|
|
@@ -59,23 +59,23 @@
|
|
|
59
59
|
"scripts": {
|
|
60
60
|
"link-closure": "node scripts/link-dsh-closure.mjs",
|
|
61
61
|
"build": "tsc -p tsconfig.json",
|
|
62
|
+
"prebuild": "node scripts/link-dsh-closure.mjs",
|
|
62
63
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
63
64
|
"precheck": "node scripts/link-dsh-closure.mjs",
|
|
64
65
|
"pretest": "npm run build",
|
|
65
66
|
"test": "node --test test/*.test.mjs",
|
|
66
|
-
"smoke": "node scripts/smoke-boot.mjs"
|
|
67
|
-
"postinstall": "node scripts/postinstall.mjs"
|
|
67
|
+
"smoke": "node scripts/smoke-boot.mjs"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@aiwayds/dsh-ask-router": "^0.7.0",
|
|
71
71
|
"@aiwayds/dsh-dcp": "^0.14.0",
|
|
72
72
|
"@aiwayds/dsh-jev-core": "^0.2.0",
|
|
73
|
-
"@aiwayds/dsh-llm-proxy": "^0.8.
|
|
73
|
+
"@aiwayds/dsh-llm-proxy": "^0.8.1",
|
|
74
74
|
"@aiwayds/dsh-llm-stats": "^0.9.0",
|
|
75
|
-
"@aiwayds/dsh-mcp-adapter": "^0.8.
|
|
75
|
+
"@aiwayds/dsh-mcp-adapter": "^0.8.1",
|
|
76
76
|
"@aiwayds/dsh-model-sync": "^0.9.0",
|
|
77
|
-
"@aiwayds/dsh-profile-switch": "^0.4.
|
|
78
|
-
"@aiwayds/dsh-subagent-registry": "^0.
|
|
77
|
+
"@aiwayds/dsh-profile-switch": "^0.4.1",
|
|
78
|
+
"@aiwayds/dsh-subagent-registry": "^0.20.1",
|
|
79
79
|
"@aiwayds/dsh-web-search-anysearch": "^0.9.0",
|
|
80
80
|
"@earendil-works/pi-tui": "0.85.1"
|
|
81
81
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* global dsh closure.
|
|
2
|
+
* Dev-tree closure linker: point every `node_modules/@deepseek-ai/*` entry
|
|
3
|
+
* at the global dsh closure.
|
|
4
4
|
*
|
|
5
5
|
* Why this exists: dsh-tui-pi is a plugin that runs *inside* the installed
|
|
6
6
|
* dsh CLI, and its source imports the `@deepseek-ai/*` packages (cordis,
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
* (`Property 'settings' does not exist on type 'Context'`), so they must stay
|
|
18
18
|
* *undeclared*. pnpm then treats the closure links as extraneous — and, as
|
|
19
19
|
* it prunes entries it once managed, the links can still disappear after an
|
|
20
|
-
* install. This script re-creates them
|
|
20
|
+
* install. This script re-creates them after an install: in the dev tree it
|
|
21
|
+
* runs through the `link-closure` / `precheck` scripts — it is not wired as
|
|
22
|
+
* a lifecycle hook anywhere, and the published tarball carries no hooks at
|
|
23
|
+
* all (ADR 0004).
|
|
21
24
|
*
|
|
22
25
|
* It is a no-op (exit 0) when no global dsh install is found — a dev machine
|
|
23
26
|
* without dsh simply cannot typecheck against dsh types.
|
|
@@ -29,12 +32,13 @@ import { dirname, join } from 'node:path'
|
|
|
29
32
|
import { fileURLToPath } from 'node:url'
|
|
30
33
|
|
|
31
34
|
const repoRoot = dirname(dirname(fileURLToPath(import.meta.url)))
|
|
32
|
-
// Guard: this
|
|
33
|
-
// published tarball carries scripts/ but no
|
|
34
|
-
// consumer's node_modules (it would delete
|
|
35
|
-
// replace them with symlinks into their
|
|
36
|
-
//
|
|
37
|
-
//
|
|
35
|
+
// Guard: this linker is a dev-machine convenience for THIS repo, invoked
|
|
36
|
+
// only through the dev scripts. A published tarball carries scripts/ but no
|
|
37
|
+
// src/, and must never touch a consumer's node_modules (it would delete
|
|
38
|
+
// their @deepseek-ai packages and replace them with symlinks into their
|
|
39
|
+
// global dsh closure). npm would run a script wired under this name as a
|
|
40
|
+
// lifecycle hook — the published package wires none, and the guard stays as
|
|
41
|
+
// a hard boundary: exit silently outside the repo.
|
|
38
42
|
if (!existsSync(join(repoRoot, 'src'))) {
|
|
39
43
|
process.exit(0)
|
|
40
44
|
}
|
package/scripts/postinstall.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* npm postinstall for `@aiwayds/dsh-tui-pi` — two jobs, in order:
|
|
4
|
-
*
|
|
5
|
-
* 1. The repo's dev linker (link-dsh-closure.mjs). It self-guards: on a
|
|
6
|
-
* published tarball (no src/) it exits 0 without touching anything, so
|
|
7
|
-
* this is a no-op for consumers and the dev-machine behavior is
|
|
8
|
-
* unchanged.
|
|
9
|
-
*
|
|
10
|
-
* 2. Global installs then run the one-time onboarding — dsh host, pnpm and
|
|
11
|
-
* the `tui` profile are in place by the time npm prints "added 1
|
|
12
|
-
* package", so the first `dsh-tui-pi` (or `dst`) boots straight into the
|
|
13
|
-
* TUI. Anything this cannot finish (offline machine, no npm on PATH, a
|
|
14
|
-
* package manager that skips lifecycle scripts) is deferred to the
|
|
15
|
-
* launcher's first run, which re-runs the same idempotent onboarding.
|
|
16
|
-
*
|
|
17
|
-
* Guards:
|
|
18
|
-
* - local/dev installs (`npm i` inside a project, `pnpm link`, CI
|
|
19
|
-
* checkouts) skip the onboarding silently — it is only meaningful for a
|
|
20
|
-
* user-wide install;
|
|
21
|
-
* - this script NEVER fails the install: every failure path exits 0.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
import { spawnSync } from 'node:child_process'
|
|
25
|
-
import { dirname, join } from 'node:path'
|
|
26
|
-
import { fileURLToPath } from 'node:url'
|
|
27
|
-
|
|
28
|
-
const scriptDir = dirname(fileURLToPath(import.meta.url))
|
|
29
|
-
|
|
30
|
-
// 1) dev closure linker — self-guarding, always safe to run
|
|
31
|
-
const linker = spawnSync(process.execPath, [join(scriptDir, 'link-dsh-closure.mjs')], {
|
|
32
|
-
stdio: 'inherit',
|
|
33
|
-
})
|
|
34
|
-
if (linker.error) {
|
|
35
|
-
console.warn(`[postinstall] closure linker skipped: ${linker.error.message}`)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// 2) onboarding — global installs only, never fails the install
|
|
39
|
-
if (process.env.npm_config_global !== 'true') process.exit(0)
|
|
40
|
-
|
|
41
|
-
console.log('dsh-tui-pi: preparing the dsh host, pnpm and the "tui" profile…')
|
|
42
|
-
try {
|
|
43
|
-
const { runOnboard } = await import('../bin/onboard-core.mjs')
|
|
44
|
-
const setup = runOnboard({ log: (line) => console.log(line) })
|
|
45
|
-
if (!setup.ok) {
|
|
46
|
-
console.log(`dsh-tui-pi: setup stopped at "${setup.step}"${setup.detail ? ` — ${setup.detail}` : ''} — ${setup.hint}`)
|
|
47
|
-
console.log('dsh-tui-pi: it will complete automatically on first launch.')
|
|
48
|
-
} else {
|
|
49
|
-
console.log('dsh-tui-pi: ready — launch with `dsh-tui-pi` (short: `dst`).')
|
|
50
|
-
}
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.log(`dsh-tui-pi: setup skipped (${error?.message ?? error}) — it will run on first launch.`)
|
|
53
|
-
}
|
|
54
|
-
process.exit(0)
|