@xmoon76/dsh-pi-tui 0.4.0 → 0.4.3-alpha.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.en.md +124 -107
- package/README.md +110 -103
- package/cordis.patch.yml +0 -3
- package/dist/builtins.mjs +1 -1
- package/dist/extensions.mjs +1 -1
- package/dist/index.d.mts +31 -42
- package/dist/index.mjs +2 -2
- package/dist/{src-zkySYmLZ.mjs → src-BL4AomX5.mjs} +6097 -3273
- package/dist/startup.d.mts +5 -1
- package/dist/startup.mjs +8 -26
- package/package.json +96 -94
- package/scripts/repair-core.mjs +0 -672
- package/scripts/repair-session.mjs +0 -486
package/README.en.md
CHANGED
|
@@ -9,24 +9,99 @@ A Pi-style terminal frontend for [DeepSeek Harness](https://github.com/deepseek-
|
|
|
9
9
|
|
|
10
10
|
`dsh-pi-tui` is installed as an independent dsh bundle inside a profile. It provides terminal interaction for streaming conversations, tool calls, session management, subagents, history search, shell commands, approvals, and settings. Models, tools, Sessions, permissions, Skills, Plan, Goal, and Subagent runtime behavior are still provided by DeepSeek Harness.
|
|
11
11
|
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Install into a DSH profile
|
|
15
|
+
|
|
16
|
+
### Stable / latest
|
|
17
|
+
|
|
18
|
+
Stable releases are recommended for ordinary users. Install DSH first, then add
|
|
19
|
+
the TUI to the `pi-tui` profile:
|
|
20
|
+
|
|
12
21
|
```sh
|
|
13
|
-
|
|
22
|
+
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
23
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
14
24
|
dsh --profile pi-tui
|
|
15
25
|
```
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
### Next / npm line (validation)
|
|
28
|
+
|
|
29
|
+
The current `next` line targets the published npm release `dsh-v0.1.3-alpha.2`.
|
|
30
|
+
Use the isolated npm driver (installs the exact DSH version declared by this
|
|
31
|
+
checkout and exercises the full build/test/package path):
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pnpm compat:dsh:npm
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The startup notice on an old runtime suggests the exact npm upgrade:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Requirements
|
|
44
|
+
|
|
45
|
+
* DeepSeek Harness
|
|
46
|
+
* Node.js `^22.19.0 || >=24`
|
|
47
|
+
|
|
48
|
+
### DSH/TUI version pairing (important)
|
|
49
|
+
|
|
50
|
+
| TUI package line | Matching DSH line | Notes |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `0.4.1` (published `@latest`) | `>=0.1.2-rc.1` | Historical stable; validated against the rc.1 family |
|
|
53
|
+
| Current `next` npm line (this checkout; version `0.4.3-alpha.2`) | `>=0.1.3-alpha.2` | Published npm alpha.2 target; validated against the exact 0.1.3-alpha.2 family |
|
|
54
|
+
| `0.3.x` (`@0.3`) | `0.1.1-rc.2` | Legacy runtime line |
|
|
55
|
+
|
|
56
|
+
Do not mix the stable and `next` lines. The published 0.4.1 stable line
|
|
57
|
+
still uses the 0.1.2-rc.1 family; if you keep a legacy DSH runtime, use the 0.3
|
|
58
|
+
compatibility line below. This `next` checkout declares the published
|
|
59
|
+
`0.1.3-alpha.2` npm floor, and older runtimes fail at the normal
|
|
60
|
+
incompatible-runtime boundary. The startup row's compatibility notice is
|
|
61
|
+
best-effort rather than a Loader startup-order guarantee; the suggested upgrade
|
|
62
|
+
target is a published npm version.
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
|
|
66
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
67
|
+
dsh --profile pi-tui
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The published `0.4.1` stable line declares `>=0.1.2-rc.1`; this checkout's
|
|
71
|
+
`next` npm line declares `>=0.1.3-alpha.2`. `npm install -g` is only for
|
|
72
|
+
installing a published DSH; to install dsh-pi-tui into a DSH profile, you must
|
|
73
|
+
use the `dsh plugin` command.
|
|
18
74
|
|
|
19
|
-
|
|
75
|
+
New agent sessions use the official roster's selected preset id. A custom DSH
|
|
76
|
+
preset literally named `code` is valid and remains `code` when it exists in the
|
|
77
|
+
current roster. Old persisted `code` defaults/session values fall back to `ptc`
|
|
78
|
+
only after the roster proves that no custom `code` preset exists.
|
|
79
|
+
|
|
80
|
+
### Profile management
|
|
81
|
+
|
|
82
|
+
Update the installed TUI:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
|
|
86
|
+
```
|
|
20
87
|
|
|
21
|
-
|
|
88
|
+
List installed plugins:
|
|
22
89
|
|
|
23
|
-
|
|
90
|
+
```sh
|
|
91
|
+
dsh plugin --profile pi-tui -- list
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Remove the plugin:
|
|
24
95
|
|
|
25
96
|
```sh
|
|
26
|
-
|
|
97
|
+
dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
|
|
27
98
|
```
|
|
28
99
|
|
|
29
|
-
|
|
100
|
+
Resume an existing Session:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
dsh --profile pi-tui --session <session-id>
|
|
104
|
+
```
|
|
30
105
|
|
|
31
106
|
## Features
|
|
32
107
|
|
|
@@ -94,7 +169,8 @@ Regular `↑` / `↓` history recall is still available for recent input.
|
|
|
94
169
|
|
|
95
170
|
### Subagents and background tasks
|
|
96
171
|
|
|
97
|
-
`/tasks` opens the
|
|
172
|
+
`/tasks` opens the full Task Center for all background work in the current
|
|
173
|
+
Session; the Footer's `↓` opens the lightweight Quick Tasks view for running work.
|
|
98
174
|
|
|
99
175
|
Subagents are shown using their complete lineage, including nested descendants:
|
|
100
176
|
|
|
@@ -113,6 +189,12 @@ The browser distinguishes:
|
|
|
113
189
|
* nested descendants
|
|
114
190
|
* background Jobs
|
|
115
191
|
|
|
192
|
+
The two views share the same runtime state: `A` toggles Active / All scope,
|
|
193
|
+
`Tab` changes type filters, `/` enters search, `S` stops the selected task after
|
|
194
|
+
confirmation, and `N` / `Shift+N` moves between running tasks. In Quick Tasks,
|
|
195
|
+
`T` or the bottom “View all” row opens the full Task Center, and `Esc` returns
|
|
196
|
+
one layer at a time.
|
|
197
|
+
|
|
116
198
|
Completed one-shot Subagents remain available for persisted Transcript inspection.
|
|
117
199
|
|
|
118
200
|
A direct `continuable` Child can be opened in an interactive viewer and sent follow-up messages directly (through DSH's official `subagents.prompt()` human channel — queued in order as the Child's own next turn, with user provenance). The Child has its own Transcript, Draft, and runtime state, without modifying the main Session input.
|
|
@@ -155,7 +237,7 @@ Typing `@` opens workspace file search and completion:
|
|
|
155
237
|
@"path with spaces/file.ts"
|
|
156
238
|
```
|
|
157
239
|
|
|
158
|
-
`/image <path>`
|
|
240
|
+
`/attach <path>` is the unified Client-local image/file intake; `/image <path>` keeps its image-only compatibility semantics. Both complete files and directories; paths with spaces, quotes, or Windows separators preserve the input dialect, and directories can be expanded further.
|
|
159
241
|
|
|
160
242
|
Resolvable relative paths are canonicalized before submission.
|
|
161
243
|
|
|
@@ -219,8 +301,8 @@ For the full `/footer` workflow, Custom Text / Command items, YAML reference, se
|
|
|
219
301
|
| `Shift+Enter` | Insert newline |
|
|
220
302
|
| `Esc` | Cancel current interaction / interrupt running work |
|
|
221
303
|
| `Esc Esc` | Open Rewind while idle |
|
|
222
|
-
| `Ctrl+C` |
|
|
223
|
-
| `Ctrl+D` |
|
|
304
|
+
| `Ctrl+C` | Keyboard exit confirmation; clears the draft first |
|
|
305
|
+
| `Ctrl+D` | Keyboard exit confirmation when empty; forward-delete with draft text |
|
|
224
306
|
| `Ctrl+S` | Steer queued messages and the draft into the running turn |
|
|
225
307
|
| `Ctrl+T` | Toggle the todo panel |
|
|
226
308
|
| `Ctrl+R` | Search input history |
|
|
@@ -308,102 +390,6 @@ dsh-pi-tui:
|
|
|
308
390
|
works; only `false` removes every trigger of an action.
|
|
309
391
|
|
|
310
392
|
|
|
311
|
-
## Installation
|
|
312
|
-
|
|
313
|
-
### Requirements
|
|
314
|
-
|
|
315
|
-
* DeepSeek Harness
|
|
316
|
-
* Node.js `^22.19.0 || >=24`
|
|
317
|
-
|
|
318
|
-
### DSH/TUI version pairing (important)
|
|
319
|
-
|
|
320
|
-
| TUI package line | Matching DSH line | Notes |
|
|
321
|
-
|---|---|---|
|
|
322
|
-
| `0.4.0` (`@latest`) | `>=0.1.2-rc.1` | Current stable; validated against the rc.1 family |
|
|
323
|
-
| `0.4.x-alpha` (`@next`) | `>=0.1.2-rc.1` | Subsequent prerelease; each release validates its concrete DSH family |
|
|
324
|
-
| `0.4.0-alpha.2` (published) | `>=0.1.2-alpha.4` | Previous 0.4 prerelease; its releases validated the alpha.4/alpha.5 family |
|
|
325
|
-
| `0.4.0-alpha.1` (published) | `>=0.1.2-alpha.2` | Earlier 0.4 prerelease; accepts the alpha.2/alpha.3 runtime |
|
|
326
|
-
| `0.3.x` (`@0.3`) | `0.1.1-rc.2` | Legacy runtime line |
|
|
327
|
-
|
|
328
|
-
Do not mix the lines: DSH 0.1.1 is outside the 0.4 peer window and the
|
|
329
|
-
normal incompatible-runtime boundary will fail. The startup row prints upgrade
|
|
330
|
-
and rollback guidance when concurrent Loader ordering allows it, but that
|
|
331
|
-
friendly notice is best-effort rather than a startup-order guarantee. If you
|
|
332
|
-
keep DSH 0.1.1, use the 0.3 TUI line; if you keep the alpha.2/alpha.3
|
|
333
|
-
baseline, use `@xmoon76/dsh-pi-tui@0.4.0-alpha.1`; if you keep the
|
|
334
|
-
alpha.4/alpha.5 baseline, use `@xmoon76/dsh-pi-tui@0.4.0-alpha.2`. For the
|
|
335
|
-
current 0.4 stable release, install the matching DSH first and then add the
|
|
336
|
-
TUI to a profile:
|
|
337
|
-
|
|
338
|
-
```sh
|
|
339
|
-
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
340
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
341
|
-
dsh --profile pi-tui
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
If you need to keep the legacy DSH runtime:
|
|
345
|
-
|
|
346
|
-
```sh
|
|
347
|
-
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
|
|
348
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
349
|
-
dsh --profile pi-tui
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
The current 0.4 line declares `>=0.1.2-rc.1`; each release validates
|
|
353
|
-
its concrete DSH family. Running only `npm install -g @xmoon76/dsh-pi-tui` does
|
|
354
|
-
not install the plugin into a DSH profile; the `dsh plugin` command is still
|
|
355
|
-
required.
|
|
356
|
-
|
|
357
|
-
New agent sessions use the official roster's selected preset id. A custom DSH
|
|
358
|
-
preset literally named `code` is valid and remains `code` when it exists in the
|
|
359
|
-
current roster. Old persisted `code` defaults/session values fall back to `ptc`
|
|
360
|
-
only after the roster proves that no custom `code` preset exists.
|
|
361
|
-
|
|
362
|
-
### npm
|
|
363
|
-
|
|
364
|
-
Using a dedicated `pi-tui` profile is recommended. Use the TUI channel that
|
|
365
|
-
matches your DSH line: `@latest` for stable releases, `@next` for prereleases:
|
|
366
|
-
|
|
367
|
-
```sh
|
|
368
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
369
|
-
dsh --profile pi-tui
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
Resume an existing Session:
|
|
373
|
-
|
|
374
|
-
```sh
|
|
375
|
-
dsh --profile pi-tui --session <session-id>
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### Source Mode (validation only)
|
|
379
|
-
|
|
380
|
-
Source Mode is the validation-only distribution selected by the tracked policy for `next` CI and available for local compatibility checks. It reads the full commit pin in `test/compat/dsh-source.json`, builds the official DSH tarball family, installs it through temporary pnpm overrides, and removes the temporary state afterward. Do not write DSH source paths, `file:` dependencies, or workspace symlinks into a published package.
|
|
381
|
-
|
|
382
|
-
```sh
|
|
383
|
-
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
384
|
-
pnpm compat:dsh:npm
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
The published package already contains the Pi TUI fork required at runtime. No separate internal TUI package needs to be installed.
|
|
388
|
-
|
|
389
|
-
### Update
|
|
390
|
-
|
|
391
|
-
```sh
|
|
392
|
-
dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
List installed plugins:
|
|
396
|
-
|
|
397
|
-
```sh
|
|
398
|
-
dsh plugin --profile pi-tui -- list
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
Remove:
|
|
402
|
-
|
|
403
|
-
```sh
|
|
404
|
-
dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
|
|
405
|
-
```
|
|
406
|
-
|
|
407
393
|
## Running from source
|
|
408
394
|
|
|
409
395
|
```sh
|
|
@@ -566,6 +552,37 @@ dsh plugin --profile pi-tui-dev -- add @xmoon76/dsh-pi-tui@link:$PWD
|
|
|
566
552
|
dsh --profile pi-tui-dev
|
|
567
553
|
```
|
|
568
554
|
|
|
555
|
+
## DSH compatibility and validation
|
|
556
|
+
|
|
557
|
+
This section contains DSH compatibility and CI validation details only; ordinary users do not need them to install the TUI.
|
|
558
|
+
|
|
559
|
+
### npm mode (current `next`)
|
|
560
|
+
|
|
561
|
+
The current `next` line is npm mode: it targets the published
|
|
562
|
+
`dsh-v0.1.3-alpha.2` family declared by this checkout's `package.json` and
|
|
563
|
+
resolved by its frozen lockfile. The isolated npm driver installs that exact
|
|
564
|
+
family from the public registry and exercises the TUI build/test/package path:
|
|
565
|
+
|
|
566
|
+
```sh
|
|
567
|
+
pnpm compat:dsh:npm
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### Source Mode (validation only)
|
|
571
|
+
|
|
572
|
+
Source Mode is the validation-only distribution for an unpublished DSH
|
|
573
|
+
checkout, available for local compatibility checks and explicit
|
|
574
|
+
source-boundary work. It reads the full commit pin in
|
|
575
|
+
`test/compat/dsh-source.json`, builds the official DSH tarball family, installs
|
|
576
|
+
it through temporary pnpm overrides, and removes the temporary state afterward.
|
|
577
|
+
Do not write DSH source paths, `file:` dependencies, or workspace symlinks into
|
|
578
|
+
a published package.
|
|
579
|
+
|
|
580
|
+
The published package already contains the Pi TUI fork required at runtime. No separate internal TUI package needs to be installed.
|
|
581
|
+
|
|
582
|
+
### CI validation policy
|
|
583
|
+
|
|
584
|
+
CI follows the tracked `test/compat/dsh-mode.json` policy for pushes to `next` and pull requests targeting `next`; `main` and every tag use npm Mode. Source Mode reads the source target from `test/compat/dsh-source.json` and validates the complete official DSH tarball family, TUI presets, and the old-runtime boundary; npm Mode uses the DSH version declared by the checkout's `package.json` and frozen lockfile to run the registry lane. The published `pi2dsh` ecosystem check is explicitly marked skipped for an unpublished source family. See [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md) for the full workflow.
|
|
585
|
+
|
|
569
586
|
## Repository layout
|
|
570
587
|
|
|
571
588
|
The repository root is the npm package published as `@xmoon76/dsh-pi-tui`.
|
package/README.md
CHANGED
|
@@ -9,24 +9,96 @@
|
|
|
9
9
|
|
|
10
10
|
`dsh-pi-tui` 作为独立的 dsh bundle 安装到 profile 中,提供流式对话、工具调用、会话管理、Subagent、历史搜索、Shell、审批与设置等终端交互。模型、工具、Session、权限、Skills、Plan、Goal、Subagent 等运行时能力仍由 DeepSeek Harness 提供。
|
|
11
11
|
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## 安装到 DSH Profile
|
|
15
|
+
|
|
16
|
+
### Stable / latest
|
|
17
|
+
|
|
18
|
+
稳定版是普通用户的推荐渠道。请先安装 DSH,再将 TUI 添加到 `pi-tui` profile:
|
|
19
|
+
|
|
12
20
|
```sh
|
|
13
|
-
|
|
21
|
+
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
22
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
14
23
|
dsh --profile pi-tui
|
|
15
24
|
```
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
### Next / npm 线(验证)
|
|
27
|
+
|
|
28
|
+
当前 `next` 线以已发布的 npm 版本 `dsh-v0.1.3-alpha.2` 为兼容目标。使用
|
|
29
|
+
隔离的 npm 驱动验证(安装 checkout 声明的精确 DSH 版本并跑完整
|
|
30
|
+
build/test/package 路径):
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pnpm compat:dsh:npm
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
旧 runtime 的启动提示会给出精确的 npm 升级命令:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 环境要求
|
|
43
|
+
|
|
44
|
+
* DeepSeek Harness
|
|
45
|
+
* Node.js `^22.19.0 || >=24`
|
|
46
|
+
|
|
47
|
+
### DSH 与 TUI 版本对应(重要)
|
|
48
|
+
|
|
49
|
+
| TUI 包版本 | 对应 DSH 版本 | 说明 |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `0.4.1`(已发布 `@latest`) | `>=0.1.2-rc.1` | 历史稳定版;按 0.1.2-rc.1 family 验证 |
|
|
52
|
+
| 当前 `next` npm 线(本 checkout;版本 `0.4.3-alpha.2`) | `>=0.1.3-alpha.2` | 已发布的 npm alpha.2 目标;按精确 0.1.3-alpha.2 family 验证 |
|
|
53
|
+
| `0.3.x`(`@0.3`) | `0.1.1-rc.2` | 旧运行时兼容线 |
|
|
54
|
+
|
|
55
|
+
不要把稳定线与 `next` 线混装。已发布的 0.4.1 稳定线仍按
|
|
56
|
+
0.1.2-rc.1 family 使用;保留旧 DSH 时请使用下方的 0.3 兼容线。当前
|
|
57
|
+
`next` checkout 的 peer floor 是 `>=0.1.3-alpha.2`,旧 runtime 会在正常的
|
|
58
|
+
不兼容边界以非零状态失败。启动行的兼容提示是 best-effort,不是 Loader
|
|
59
|
+
启动顺序保证;它建议的升级目标是已发布的 npm 版本。
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
|
|
63
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
64
|
+
dsh --profile pi-tui
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
已发布的 `0.4.1` 稳定线声明支持范围是 `>=0.1.2-rc.1`;本 checkout 的
|
|
68
|
+
`next` npm 线则声明 `>=0.1.3-alpha.2`。`npm install -g` 仅用于
|
|
69
|
+
安装已发布的 DSH;要将 dsh-pi-tui 安装进 DSH profile,必须使用
|
|
70
|
+
`dsh plugin` 命令。
|
|
18
71
|
|
|
19
|
-
|
|
72
|
+
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
|
|
73
|
+
`code` preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 `code`。
|
|
74
|
+
旧数据中省略请求的 `code` default/session 值只有在确认 roster 不含 `code` 后
|
|
75
|
+
才会回退到 `ptc`。
|
|
76
|
+
|
|
77
|
+
### Profile management
|
|
78
|
+
|
|
79
|
+
更新已安装的 TUI:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
|
|
83
|
+
```
|
|
20
84
|
|
|
21
|
-
|
|
85
|
+
查看已安装插件:
|
|
22
86
|
|
|
23
|
-
|
|
87
|
+
```sh
|
|
88
|
+
dsh plugin --profile pi-tui -- list
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
卸载:
|
|
24
92
|
|
|
25
93
|
```sh
|
|
26
|
-
|
|
94
|
+
dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
|
|
27
95
|
```
|
|
28
96
|
|
|
29
|
-
|
|
97
|
+
恢复已有 Session:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
dsh --profile pi-tui --session <session-id>
|
|
101
|
+
```
|
|
30
102
|
|
|
31
103
|
## 功能
|
|
32
104
|
|
|
@@ -155,7 +227,7 @@ Shell 卡片默认只显示有限的输出预览,`Ctrl+O` 可以展开完整
|
|
|
155
227
|
@"path with spaces/file.ts"
|
|
156
228
|
```
|
|
157
229
|
|
|
158
|
-
`/image <path>`
|
|
230
|
+
`/attach <path>` 是统一的 Client-local 图片/文件入口;`/image <path>` 保持图片专用兼容语义。两者都支持文件与目录补全;带空格、引号或 Windows 分隔符的路径会保留输入方言,目录可以继续展开。
|
|
159
231
|
|
|
160
232
|
能够解析的相对路径会在提交时转换为明确的文件路径。
|
|
161
233
|
|
|
@@ -218,8 +290,8 @@ TUI 使用 DSH 提供的模型和设置服务。
|
|
|
218
290
|
| `Shift+Enter` | 换行 |
|
|
219
291
|
| `Esc` | 取消当前交互 / 中断运行 |
|
|
220
292
|
| `Esc Esc` | 空闲时打开 Rewind |
|
|
221
|
-
| `Ctrl+C` |
|
|
222
|
-
| `Ctrl+D` |
|
|
293
|
+
| `Ctrl+C` | 键盘退出确认;首次清空草稿 |
|
|
294
|
+
| `Ctrl+D` | 空草稿时键盘退出确认;有内容时向前删除 |
|
|
223
295
|
| `Ctrl+S` | Steer:把队列消息和草稿一起发送到正在运行的回合 |
|
|
224
296
|
| `Ctrl+T` | 切换 Todo 面板 |
|
|
225
297
|
| `Ctrl+R` | 搜索输入历史 |
|
|
@@ -297,99 +369,6 @@ dsh-pi-tui:
|
|
|
297
369
|
移除某 action 的全部触发。
|
|
298
370
|
|
|
299
371
|
|
|
300
|
-
## 安装
|
|
301
|
-
|
|
302
|
-
### 环境要求
|
|
303
|
-
|
|
304
|
-
* DeepSeek Harness
|
|
305
|
-
* Node.js `^22.19.0 || >=24`
|
|
306
|
-
|
|
307
|
-
### DSH 与 TUI 版本对应(重要)
|
|
308
|
-
|
|
309
|
-
| TUI 包版本 | 对应 DSH 版本 | 说明 |
|
|
310
|
-
|---|---|---|
|
|
311
|
-
| `0.4.0`(`@latest`) | `>=0.1.2-rc.1` | 当前稳定版;按 0.1.2-rc.1 family 验证 |
|
|
312
|
-
| `0.4.x-alpha`(`@next`) | `>=0.1.2-rc.1` | 后续预发布线;按每个发布版本的具体 DSH family 验证 |
|
|
313
|
-
| `0.4.0-alpha.2`(已发布) | `>=0.1.2-alpha.4` | 上一条 0.4 预发布线;其发布版本按 alpha.4/alpha.5 family 验证 |
|
|
314
|
-
| `0.4.0-alpha.1`(已发布) | `>=0.1.2-alpha.2` | 更早的 0.4 预发布线;接受 alpha.2/alpha.3 运行时 |
|
|
315
|
-
| `0.3.x`(`@0.3`) | `0.1.1-rc.2` | 旧运行时兼容线 |
|
|
316
|
-
|
|
317
|
-
不要把两条线混装:DSH 0.1.1 不在 0.4 的 peer 支持范围内,运行时会在
|
|
318
|
-
正常的不兼容边界以非零状态失败。启动行会在 Loader 并发挂载顺序允许时打印
|
|
319
|
-
升级和回退提示,但该友好提示是 best-effort,不是启动顺序保证;保留 DSH
|
|
320
|
-
0.1.1 时请使用 0.3,保留 alpha.2/alpha.3 时请使用
|
|
321
|
-
`@xmoon76/dsh-pi-tui@0.4.0-alpha.1`,保留 alpha.4/alpha.5 时请使用
|
|
322
|
-
`@xmoon76/dsh-pi-tui@0.4.0-alpha.2`。当前 0.4 稳定版的推荐安装顺序如下
|
|
323
|
-
(先装 DSH,再把 TUI 装入 profile):
|
|
324
|
-
|
|
325
|
-
```sh
|
|
326
|
-
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
327
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
328
|
-
dsh --profile pi-tui
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
如果需要保留旧 DSH:
|
|
332
|
-
|
|
333
|
-
```sh
|
|
334
|
-
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
|
|
335
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
336
|
-
dsh --profile pi-tui
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
`0.4` 当前线的声明支持范围是 `>=0.1.2-rc.1`;每个发布版本都会验证
|
|
340
|
-
具体的 DSH family。仅执行 `npm install -g @xmoon76/dsh-pi-tui` 不会把插件安装进
|
|
341
|
-
DSH profile,实际使用仍应执行上面的 `dsh plugin` 命令。
|
|
342
|
-
|
|
343
|
-
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
|
|
344
|
-
`code` preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 `code`。
|
|
345
|
-
旧数据中省略请求的 `code` default/session 值只有在确认 roster 不含 `code` 后
|
|
346
|
-
才会回退到 `ptc`。
|
|
347
|
-
|
|
348
|
-
### npm
|
|
349
|
-
|
|
350
|
-
推荐使用单独的 `pi-tui` profile。使用与 DSH 版本匹配的
|
|
351
|
-
TUI channel(稳定版用 `@latest`,预发布版用 `@next`):
|
|
352
|
-
|
|
353
|
-
```sh
|
|
354
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
355
|
-
dsh --profile pi-tui
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
恢复已有 Session:
|
|
359
|
-
|
|
360
|
-
```sh
|
|
361
|
-
dsh --profile pi-tui --session <session-id>
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
### Source Mode(仅验证)
|
|
365
|
-
|
|
366
|
-
Source Mode 是 `next` CI 按跟踪策略选用的、并可用于本地兼容性检查的验证专用 distribution。它从 `test/compat/dsh-source.json` 的完整 commit SHA 构建官方 DSH tarball family,通过临时 pnpm overrides 安装,并在完成后清理临时状态。不要把 DSH 源码路径、`file:` 依赖或 workspace symlink 写入发布 package。
|
|
367
|
-
|
|
368
|
-
```sh
|
|
369
|
-
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
370
|
-
pnpm compat:dsh:npm
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
安装包已经包含运行所需的 Pi TUI fork,不需要额外安装内部的 TUI package。
|
|
374
|
-
|
|
375
|
-
### 更新
|
|
376
|
-
|
|
377
|
-
```sh
|
|
378
|
-
dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
查看已安装插件:
|
|
382
|
-
|
|
383
|
-
```sh
|
|
384
|
-
dsh plugin --profile pi-tui -- list
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
卸载:
|
|
388
|
-
|
|
389
|
-
```sh
|
|
390
|
-
dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
|
|
391
|
-
```
|
|
392
|
-
|
|
393
372
|
## 从源码运行
|
|
394
373
|
|
|
395
374
|
```sh
|
|
@@ -552,6 +531,34 @@ dsh plugin --profile pi-tui-dev -- add @xmoon76/dsh-pi-tui@link:$PWD
|
|
|
552
531
|
dsh --profile pi-tui-dev
|
|
553
532
|
```
|
|
554
533
|
|
|
534
|
+
## DSH 兼容性与验证
|
|
535
|
+
|
|
536
|
+
以下内容仅介绍 DSH 兼容性与 CI 验证细节;普通用户无需了解即可安装 TUI。
|
|
537
|
+
|
|
538
|
+
### npm 模式(当前 `next`)
|
|
539
|
+
|
|
540
|
+
当前 `next` 线是 npm 模式:以本 checkout 的 `package.json` 声明、冻结
|
|
541
|
+
lockfile 解析的已发布 `dsh-v0.1.3-alpha.2` family 为兼容目标。隔离的 npm
|
|
542
|
+
驱动从公共 registry 安装该精确 family,并跑完整 build/test/package 路径:
|
|
543
|
+
|
|
544
|
+
```sh
|
|
545
|
+
pnpm compat:dsh:npm
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### Source Mode(仅验证)
|
|
549
|
+
|
|
550
|
+
Source Mode 是面向未发布 DSH checkout 的验证专用 distribution,用于本地
|
|
551
|
+
兼容性检查与显式的 source 边界工作。它从 `test/compat/dsh-source.json` 的
|
|
552
|
+
完整 commit SHA 构建官方 DSH tarball family,通过临时 pnpm overrides 安装,
|
|
553
|
+
并在完成后清理临时状态。不要把 DSH 源码路径、`file:` 依赖或 workspace
|
|
554
|
+
symlink 写入发布 package。
|
|
555
|
+
|
|
556
|
+
安装包已经包含运行所需的 Pi TUI fork,不需要额外安装内部的 TUI package。
|
|
557
|
+
|
|
558
|
+
### CI 验证策略
|
|
559
|
+
|
|
560
|
+
CI 对 push 到 `next` 以及目标为 `next` 的 PR 遵循跟踪的 `test/compat/dsh-mode.json` 策略;`main` 和所有 tag 使用 npm Mode。Source Mode 从 `test/compat/dsh-source.json` 读取 source target 并验证完整的官方 DSH tarball family、TUI 预设和旧 runtime 边界;npm Mode 则使用 checkout 的 `package.json`/冻结 lockfile 中声明的 DSH 版本运行 registry lane。对于尚未发布的 source family,已发布 `pi2dsh` 的生态检查会明确标记为 skipped。详细流程见 [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md)。
|
|
561
|
+
|
|
555
562
|
## 项目结构
|
|
556
563
|
|
|
557
564
|
仓库根目录是发布到 npm 的 `@xmoon76/dsh-pi-tui` bundle。
|
package/cordis.patch.yml
CHANGED
package/dist/builtins.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as dshVersion, V as PI_TUI_EXTENSIONS_SERVICE } from "./src-BL4AomX5.mjs";
|
|
2
2
|
import { TUI_STARTUP_SERVICE } from "./startup.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
package/dist/extensions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as name, H as API_VERSION, R as apply, U as describeKey, V as PI_TUI_EXTENSIONS_SERVICE, z as inject } from "./src-BL4AomX5.mjs";
|
|
2
2
|
import "./startup.mjs";
|
|
3
3
|
export { API_VERSION, PI_TUI_EXTENSIONS_SERVICE, apply, describeKey, inject, name };
|
package/dist/index.d.mts
CHANGED
|
@@ -86,36 +86,6 @@ interface DraftImageStoreLike {
|
|
|
86
86
|
values(): readonly DraftImage[];
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region src/diag.d.ts
|
|
90
|
-
interface Diag {
|
|
91
|
-
debug(message: string, fields?: Record<string, unknown>): void;
|
|
92
|
-
info(message: string, fields?: Record<string, unknown>): void;
|
|
93
|
-
warn(message: string, fields?: Record<string, unknown>): void;
|
|
94
|
-
error(message: string, fields?: Record<string, unknown>): void;
|
|
95
|
-
/** Release the file handle, if one is open. */
|
|
96
|
-
dispose(): void;
|
|
97
|
-
}
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region src/tui-app.d.ts
|
|
100
|
-
/** The compaction lifecycle phase the working row advertises: idle (no
|
|
101
|
-
* compaction), summarizing (compaction/start seen, the summary is being
|
|
102
|
-
* generated), or applying (the summary landed, the compacted surface is
|
|
103
|
-
* being committed). Derived by the runner from compaction/start →
|
|
104
|
-
* compaction/summary → compaction/end (foldCompactionEvent). */
|
|
105
|
-
type CompactionPhase = 'idle' | 'summarizing' | 'applying';
|
|
106
|
-
/** One queued inbox row for the queue pane (mirrors the agent Inbox's lists). */
|
|
107
|
-
interface QueueItem {
|
|
108
|
-
/** The pending message id (agent inbox identity). */
|
|
109
|
-
id: string;
|
|
110
|
-
/** The message text, single-line display form. */
|
|
111
|
-
text: string;
|
|
112
|
-
/** next-turn followup vs next-step steer. */
|
|
113
|
-
mode: 'followup' | 'steer';
|
|
114
|
-
/** Plugin notice (e.g. a background-job completion): NOT steerable — it
|
|
115
|
-
* renders with its own marker and the hint drops the steer verbs. */
|
|
116
|
-
notice?: boolean;
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
89
|
//#region src/skill-catalog.d.ts
|
|
120
90
|
/**
|
|
121
91
|
* The standing-scope skill catalog adapter: the SINGLE narrow seam between
|
|
@@ -153,6 +123,36 @@ interface HumanSkillCatalog {
|
|
|
153
123
|
readonly complete: boolean;
|
|
154
124
|
}
|
|
155
125
|
//#endregion
|
|
126
|
+
//#region src/diag.d.ts
|
|
127
|
+
interface Diag {
|
|
128
|
+
debug(message: string, fields?: Record<string, unknown>): void;
|
|
129
|
+
info(message: string, fields?: Record<string, unknown>): void;
|
|
130
|
+
warn(message: string, fields?: Record<string, unknown>): void;
|
|
131
|
+
error(message: string, fields?: Record<string, unknown>): void;
|
|
132
|
+
/** Release the file handle, if one is open. */
|
|
133
|
+
dispose(): void;
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/tui-app.d.ts
|
|
137
|
+
/** The compaction lifecycle phase the working row advertises: idle (no
|
|
138
|
+
* compaction), summarizing (compaction/start seen, the summary is being
|
|
139
|
+
* generated), or applying (the summary landed, the compacted surface is
|
|
140
|
+
* being committed). Derived by the runner from compaction/start →
|
|
141
|
+
* compaction/summary → compaction/end (foldCompactionEvent). */
|
|
142
|
+
type CompactionPhase = 'idle' | 'summarizing' | 'applying';
|
|
143
|
+
/** One queued inbox row for the queue pane (mirrors the agent Inbox's lists). */
|
|
144
|
+
interface QueueItem {
|
|
145
|
+
/** The pending message id (agent inbox identity). */
|
|
146
|
+
id: string;
|
|
147
|
+
/** The message text, single-line display form. */
|
|
148
|
+
text: string;
|
|
149
|
+
/** next-turn followup vs next-step steer. */
|
|
150
|
+
mode: 'followup' | 'steer';
|
|
151
|
+
/** Plugin notice (e.g. a background-job completion): NOT steerable — it
|
|
152
|
+
* renders with its own marker and the hint drops the steer verbs. */
|
|
153
|
+
notice?: boolean;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
156
|
//#region src/surface-catalog.d.ts
|
|
157
157
|
/** One effective command's discovery metadata (the official descriptor's
|
|
158
158
|
* display fields; never a handler or a definition). */
|
|
@@ -584,17 +584,6 @@ declare function runningProfile(argv?: readonly string[], fallback?: string): st
|
|
|
584
584
|
* @returns the resume command line, or undefined without a session.
|
|
585
585
|
*/
|
|
586
586
|
declare function resumeCommand(profile: string, sessionId: string): string | undefined;
|
|
587
|
-
/**
|
|
588
|
-
* A launch-time open-lock refusal: the requested session is held by another
|
|
589
|
-
* live dsh process (or its lock cannot be verified). Unlike a stale/missing
|
|
590
|
-
* session id, this is NOT recoverable by falling back to a fresh session —
|
|
591
|
-
* the user asked for a specific session and must resolve the holder first.
|
|
592
|
-
* Thrown from the resume path and re-thrown past the resume catch so the
|
|
593
|
-
* runner exits with the refusal as the error message.
|
|
594
|
-
*/
|
|
595
|
-
declare class SessionLockRefusedError extends Error {
|
|
596
|
-
constructor(message: string);
|
|
597
|
-
}
|
|
598
587
|
/** One fold of a compaction lifecycle event over the runner's in-flight
|
|
599
588
|
* compaction state. Pure (the firehose applies the returned surface
|
|
600
589
|
* effects): dsh-compaction is not a peer, so the event is read
|
|
@@ -762,4 +751,4 @@ declare function recomposeBlank(ctx: Context, agent: {
|
|
|
762
751
|
*/
|
|
763
752
|
declare function apply(ctx: Context, config: Config): void;
|
|
764
753
|
//#endregion
|
|
765
|
-
export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS,
|
|
754
|
+
export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, ViewerOpenToken, apply, busyAfterTurnBoundary, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, interruptAgent, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, normalizeSkillInvocation, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure, teardownViewerForSessionSwap, viewerActionCapability };
|