@xmoon76/dsh-pi-tui 0.2.0 → 0.2.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/README.md +421 -51
- package/README.zh-CN.md +417 -0
- package/dist/builtins.mjs +1 -1
- package/dist/extensions.mjs +1 -1
- package/dist/index.d.mts +16 -1
- package/dist/index.mjs +2 -2
- package/dist/{src-AgdnRnGA.mjs → src-BsSlpFFF.mjs} +917 -381
- package/package.json +20 -10
- package/scripts/naming-gate.mjs +33 -19
- package/scripts/tarball-smoke.mjs +3 -1
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmoon76/dsh-pi-tui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "The dsh-pi-tui bundle: a TUI surface for DeepSeek Harness profiles (dsh --profile pi-tui)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "XMoon <xmoonox@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/XMoon/dsh-pi-tui#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/XMoon/dsh-pi-tui.git"
|
|
11
|
-
"directory": "packages/dsh-pi-tui"
|
|
10
|
+
"url": "git+https://github.com/XMoon/dsh-pi-tui.git"
|
|
12
11
|
},
|
|
13
12
|
"bugs": {
|
|
14
13
|
"url": "https://github.com/XMoon/dsh-pi-tui/issues"
|
|
@@ -58,6 +57,7 @@
|
|
|
58
57
|
"scripts",
|
|
59
58
|
"cordis.patch.yml",
|
|
60
59
|
"README.md",
|
|
60
|
+
"README.zh-CN.md",
|
|
61
61
|
"LICENSE"
|
|
62
62
|
],
|
|
63
63
|
"publishConfig": {
|
|
@@ -141,23 +141,33 @@
|
|
|
141
141
|
"@deepseek-ai/dsh-attachment": "^0.1.0-rc.8",
|
|
142
142
|
"@deepseek-ai/dsh-brand": "^0.1.0-rc.8",
|
|
143
143
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
|
|
144
|
-
"@deepseek-ai/dsh-timeout": "^0.1.0-rc.8"
|
|
144
|
+
"@deepseek-ai/dsh-timeout": "^0.1.0-rc.8",
|
|
145
|
+
"tsx": "^4.23.12"
|
|
145
146
|
},
|
|
146
147
|
"engines": {
|
|
147
|
-
"node": "
|
|
148
|
+
"node": "^22.19.0 || >=24"
|
|
148
149
|
},
|
|
149
150
|
"scripts": {
|
|
150
|
-
"build": "tsdown",
|
|
151
|
-
"build:package": "pnpm --dir ../pi-tui build && pnpm build",
|
|
152
|
-
"typecheck": "pnpm build:package && tsc -p tsconfig.json --noEmit",
|
|
153
|
-
"test": "pnpm build:package && node --test test/*.test.ts test/*.test.mjs",
|
|
154
151
|
"clean": "rm -rf dist",
|
|
152
|
+
"clean:fork": "pnpm --dir packages/pi-tui clean",
|
|
153
|
+
"build:fork": "pnpm --dir packages/pi-tui build",
|
|
154
|
+
"build:bundle": "tsdown",
|
|
155
|
+
"build": "pnpm build:fork && pnpm build:bundle",
|
|
156
|
+
"typecheck:fork": "pnpm --dir packages/pi-tui typecheck",
|
|
157
|
+
"typecheck:bundle": "tsc -p tsconfig.json --noEmit",
|
|
158
|
+
"typecheck": "pnpm typecheck:fork && pnpm typecheck:bundle",
|
|
159
|
+
"test:fork": "pnpm --dir packages/pi-tui test",
|
|
160
|
+
"test:bundle": "node --test test/*.test.ts test/*.test.mjs",
|
|
161
|
+
"test:docs": "node --test docs/tmux/*.test.mjs",
|
|
162
|
+
"test": "pnpm test:fork && pnpm test:bundle && pnpm test:docs",
|
|
155
163
|
"smoke": "node scripts/tarball-smoke.mjs",
|
|
156
164
|
"smoke:fixture": "node scripts/extension-fixture-smoke.mjs",
|
|
157
165
|
"smoke:advanced": "node scripts/advanced-plugin-smoke.mjs",
|
|
158
166
|
"smoke:phase4": "node scripts/phase4-plugin-smoke.mjs",
|
|
159
167
|
"smoke:unstable": "node scripts/unstable-plugin-smoke.mjs",
|
|
168
|
+
"smoke:vim": "node scripts/vim-plugin-smoke.mjs",
|
|
160
169
|
"smoke:examples": "node scripts/examples-plugin-smoke.mjs",
|
|
161
|
-
"
|
|
170
|
+
"pack:release": "rm -f xmoon76-dsh-pi-tui-*.tgz && pnpm pack --pack-destination .",
|
|
171
|
+
"smoke:pack": "node scripts/tarball-smoke.mjs"
|
|
162
172
|
}
|
|
163
173
|
}
|
package/scripts/naming-gate.mjs
CHANGED
|
@@ -14,7 +14,9 @@ import { spawnSync } from 'node:child_process'
|
|
|
14
14
|
import { join, dirname } from 'node:path'
|
|
15
15
|
import { fileURLToPath } from 'node:url'
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// The repository root IS the @xmoon76/dsh-pi-tui package root (root-package
|
|
18
|
+
// migration): scripts/ sits directly under it.
|
|
19
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
18
20
|
const failures = []
|
|
19
21
|
const checks = []
|
|
20
22
|
|
|
@@ -28,35 +30,34 @@ function readJson(path) {
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
const rootPkg = readJson(join(ROOT, 'package.json'))
|
|
31
|
-
const bundlePkg = readJson(join(ROOT, 'packages', 'dsh-pi-tui', 'package.json'))
|
|
32
33
|
const forkPkg = readJson(join(ROOT, 'packages', 'pi-tui', 'package.json'))
|
|
33
34
|
|
|
34
35
|
// 1. Repository + profile naming: never the reserved `tui` / `dsh-tui` family.
|
|
35
|
-
check('root package name is dsh-pi-tui', rootPkg.name === 'dsh-pi-tui', rootPkg.name)
|
|
36
|
+
check('root package name is @xmoon76/dsh-pi-tui', rootPkg.name === '@xmoon76/dsh-pi-tui', rootPkg.name)
|
|
36
37
|
check('no @deepseek-ai/dsh-tui anywhere', !['@deepseek-ai/dsh-tui', 'dsh-tui'].some(name =>
|
|
37
|
-
[rootPkg,
|
|
38
|
-
for (const pkg of [rootPkg,
|
|
38
|
+
[rootPkg, forkPkg].some(pkg => pkg.name === name)))
|
|
39
|
+
for (const pkg of [rootPkg, forkPkg]) {
|
|
39
40
|
const manifest = JSON.stringify(pkg)
|
|
40
41
|
if (manifest.includes('@deepseek-ai/dsh-tui') || manifest.includes('"dsh-tui"')) {
|
|
41
42
|
check(`no dsh-tui references in ${pkg.name}`, false)
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
// The startup service keeps its stable id (internal Loader ids, fine as-is).
|
|
45
|
-
const patch = readFileSync(join(ROOT, '
|
|
46
|
+
const patch = readFileSync(join(ROOT, 'cordis.patch.yml'), 'utf8')
|
|
46
47
|
check('patch rows keep tui-startup/tui-app ids', patch.includes('id: tui-startup') && patch.includes('id: tui-app'))
|
|
47
48
|
check('startup service keeps TUI_STARTUP_SERVICE',
|
|
48
|
-
readFileSync(join(ROOT, '
|
|
49
|
+
readFileSync(join(ROOT, 'src', 'startup.ts'), 'utf8').includes("export const TUI_STARTUP_SERVICE = 'tuiStartup'"))
|
|
49
50
|
|
|
50
|
-
// 2. Package roles: the fork is private + bundled; the bundle is public.
|
|
51
|
+
// 2. Package roles: the fork is private + bundled; the root bundle is public.
|
|
51
52
|
check('fork package is private (@xmoon76/pi-tui)', forkPkg.private === true, `private=${String(forkPkg.private)}`)
|
|
52
|
-
check('bundle package is public (@xmoon76/dsh-pi-tui)',
|
|
53
|
-
check('bundle declares dsh.bundle.patch',
|
|
53
|
+
check('root bundle package is public (@xmoon76/dsh-pi-tui)', rootPkg.private !== true, `private=${String(rootPkg.private)}`)
|
|
54
|
+
check('root bundle declares dsh.bundle.patch', rootPkg.dsh?.bundle?.patch !== undefined, rootPkg.dsh?.bundle?.patch)
|
|
54
55
|
|
|
55
56
|
// 3. The fork is bundled, never a runtime dependency of the published package.
|
|
56
|
-
const tsdown = readFileSync(join(ROOT, '
|
|
57
|
+
const tsdown = readFileSync(join(ROOT, 'tsdown.config.ts'), 'utf8')
|
|
57
58
|
check('tsdown deps.onlyBundle includes @xmoon76/pi-tui',
|
|
58
59
|
tsdown.includes("onlyBundle") && tsdown.includes("'@xmoon76/pi-tui'"))
|
|
59
|
-
const runtimeDeps =
|
|
60
|
+
const runtimeDeps = rootPkg.dependencies ?? {}
|
|
60
61
|
check('@xmoon76/pi-tui is NOT a runtime dependency of the bundle',
|
|
61
62
|
!(runtimeDeps['@xmoon76/pi-tui'] !== undefined), runtimeDeps['@xmoon76/pi-tui'] ?? 'absent')
|
|
62
63
|
const forkDeps = forkPkg.dependencies ?? {}
|
|
@@ -68,14 +69,17 @@ check('fork repository.note records the vendored commit (single source of truth)
|
|
|
68
69
|
forkPkg.repository?.note ?? 'missing')
|
|
69
70
|
|
|
70
71
|
// 5. The tarball smoke + pack gate stay wired (stage G).
|
|
71
|
-
check('bundle prepack gate exists', (
|
|
72
|
-
check('bundle postpack smoke exists', (
|
|
72
|
+
check('bundle prepack gate exists', (rootPkg.scripts?.prepack ?? '').includes('pnpm build'))
|
|
73
|
+
check('bundle postpack smoke exists', (rootPkg.scripts?.postpack ?? '').includes('tarball-smoke'))
|
|
74
|
+
check('postpack keeps the pluginization smokes',
|
|
75
|
+
['extension-fixture-smoke', 'vim-plugin-smoke', 'examples-plugin-smoke'].every(name =>
|
|
76
|
+
(rootPkg.scripts?.postpack ?? '').includes(name)))
|
|
73
77
|
|
|
74
78
|
// 6. The workspace has no stray dist/ or tarballs COMMITTED (dist is
|
|
75
79
|
// gitignored by design; the gate checks git tracking, not the tree).
|
|
76
|
-
for (const
|
|
77
|
-
const tracked = spawnSync('git', ['ls-files',
|
|
78
|
-
check(
|
|
80
|
+
for (const [label, path] of [['root dist', 'dist'], ['packages/pi-tui/dist', 'packages/pi-tui/dist']]) {
|
|
81
|
+
const tracked = spawnSync('git', ['ls-files', path], { cwd: ROOT, encoding: 'utf8' }).stdout.trim()
|
|
82
|
+
check(`${label} is not committed`, tracked === '', tracked.split('\n').filter(Boolean).slice(0, 3).join(', '))
|
|
79
83
|
}
|
|
80
84
|
const tgz = spawnSync('git', ['ls-files', '*.tgz'], { cwd: ROOT, encoding: 'utf8' }).stdout.trim()
|
|
81
85
|
check('no tarballs committed', tgz === '', tgz.split('\n').filter(Boolean).slice(0, 3).join(', '))
|
|
@@ -103,7 +107,7 @@ for (const workflow of ['ci.yml', 'release.yml']) {
|
|
|
103
107
|
// crashes). `dsh-session-query` was removed by this rule: the picker
|
|
104
108
|
// types it structurally (src/sessions.ts) and reads the service off the
|
|
105
109
|
// live context, so it never needed the package.
|
|
106
|
-
const bundleSrc = join(ROOT, '
|
|
110
|
+
const bundleSrc = join(ROOT, 'src')
|
|
107
111
|
const srcFiles = (() => {
|
|
108
112
|
const out = []
|
|
109
113
|
const walk = (dir) => {
|
|
@@ -126,7 +130,7 @@ for (const file of srcFiles) {
|
|
|
126
130
|
// package that is ONLY read this way (never imported) has no place in
|
|
127
131
|
// the peer list — same rule as dsh-session-query.
|
|
128
132
|
}
|
|
129
|
-
const peers = new Set(Object.keys(
|
|
133
|
+
const peers = new Set(Object.keys(rootPkg.peerDependencies ?? {}))
|
|
130
134
|
for (const imported of [...srcImports].sort()) {
|
|
131
135
|
check(`peer declared for src import ${imported}`, peers.has(imported), peers.has(imported) ? '' : 'missing from peerDependencies')
|
|
132
136
|
}
|
|
@@ -135,6 +139,16 @@ for (const peer of [...peers].sort()) {
|
|
|
135
139
|
check(`peer ${peer} is imported by src/`, srcImports.has(peer), srcImports.has(peer) ? '' : 'no import in src/ (dead peer)')
|
|
136
140
|
}
|
|
137
141
|
|
|
142
|
+
// 9. The M0–M11 pluginization contract survives the root-package migration:
|
|
143
|
+
// the public SDK subpaths and their tsdown entries must all stay present.
|
|
144
|
+
const exportsMap = rootPkg.exports ?? {}
|
|
145
|
+
for (const subpath of ['./extensions', './extensions/advanced', './extensions/unstable', './builtins']) {
|
|
146
|
+
check(`exports keep ${subpath}`, exportsMap[subpath] !== undefined)
|
|
147
|
+
}
|
|
148
|
+
for (const entry of ['src/extensions.ts', 'src/builtins.ts', 'src/extension/advanced.ts', 'src/extension/unstable.ts']) {
|
|
149
|
+
check(`tsdown entry keeps ${entry}`, tsdown.includes(entry))
|
|
150
|
+
}
|
|
151
|
+
|
|
138
152
|
for (const line of checks) console.log(line)
|
|
139
153
|
if (failures.length > 0) {
|
|
140
154
|
console.error(`\nnaming-gate FAILED (${failures.length}):`)
|
|
@@ -180,7 +180,9 @@ function main() {
|
|
|
180
180
|
// the generic patterns: its source deliberately assembles the old
|
|
181
181
|
// /home/xmoon/ marker at runtime (the literal would otherwise trip the
|
|
182
182
|
// check on its own file). The dynamic-root checks still apply to it.
|
|
183
|
-
|
|
183
|
+
// After the root-package migration the repository root IS the package
|
|
184
|
+
// root, so both resolve from SCRIPT_DIR with a single `..`.
|
|
185
|
+
const repoRoot = realpathSync(join(SCRIPT_DIR, '..'))
|
|
184
186
|
const packageRoot = realpathSync(PACKAGE_ROOT)
|
|
185
187
|
// The bundle dist may be absent (a smoke run on a raw checkout); the
|
|
186
188
|
// structure checks below already fail loudly for that, so never crash
|