@xmoon76/dsh-pi-tui 0.3.5 → 0.4.0-alpha.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.en.md +83 -126
- package/README.md +77 -108
- package/cordis.patch.yml +21 -17
- package/dist/builtins.mjs +1 -1
- package/dist/extensions.mjs +1 -1
- package/dist/index.d.mts +34 -7
- package/dist/index.mjs +2 -2
- package/dist/{src-B93JMbsv.mjs → src-syk6h8J9.mjs} +6513 -1987
- package/dist/startup.d.mts +13 -14
- package/dist/startup.mjs +20 -11
- package/package.json +105 -66
- package/scripts/repair-session.mjs +15 -3
- package/config/agent-presets/code/agent.cordis.yml +0 -263
- package/config/agent-presets/code/preset.yml +0 -3
- package/config/agent-presets/cordis/agent.cordis.yml +0 -263
- package/config/agent-presets/cordis/preset.yml +0 -3
- package/config/agent-presets/cordis/skills/cordis-plugin-development/SKILL.md +0 -420
- package/config/agent-presets/cordis/skills/editing-cordis-compositions/SKILL.md +0 -154
- package/config/agent-presets/minimal/agent.cordis.yml +0 -88
- package/config/agent-presets/minimal/preset.yml +0 -3
- package/config/agent-presets/standard/agent.cordis.yml +0 -252
- package/config/agent-presets/standard/preset.yml +0 -3
package/README.en.md
CHANGED
|
@@ -10,12 +10,24 @@ A Pi-style terminal frontend for [DeepSeek Harness](https://github.com/deepseek-
|
|
|
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
12
|
```sh
|
|
13
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui
|
|
13
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
14
14
|
dsh --profile pi-tui
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|

|
|
18
18
|
|
|
19
|
+
## DSH compatibility and source validation
|
|
20
|
+
|
|
21
|
+
The published package declares the lower-bound-only DSH peer contract `>=0.1.2-alpha.2`. Source validation does not change that contract or vendor DSH into this repository.
|
|
22
|
+
|
|
23
|
+
When the target DSH version is not yet available from npm, validate against the official checkout pinned by commit SHA:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
CI uses Source Mode for `next` and npm Mode for `main` and every tag. The source lane validates the complete official DSH tarball family, TUI presets, and the old-runtime boundary; the published `pi2dsh` ecosystem check is explicitly marked skipped until a compatible published combination exists. See [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md) for the full workflow.
|
|
30
|
+
|
|
19
31
|
## Features
|
|
20
32
|
|
|
21
33
|
### Conversation and tools
|
|
@@ -31,6 +43,7 @@ dsh --profile pi-tui
|
|
|
31
43
|
* Plan Review
|
|
32
44
|
* Todo / Goal status
|
|
33
45
|
* Human-readable terminal window titles
|
|
46
|
+
* Bounded long-session windows with stable paging and live-follow position
|
|
34
47
|
* No duplicate ghost Tool Cards after compaction / pruning
|
|
35
48
|
|
|
36
49
|
`Ctrl+O` controls Tool and System details — and in fullscreen Focus it bulk-expands the recent Thought roots or collapses them all. `Alt+T` controls Thinking separately.
|
|
@@ -135,6 +148,8 @@ Typing `@` opens workspace file search and completion:
|
|
|
135
148
|
@"path with spaces/file.ts"
|
|
136
149
|
```
|
|
137
150
|
|
|
151
|
+
`/image <path>` also completes files and directories; paths with spaces, quotes, or Windows separators preserve the input dialect, and directories can be expanded further.
|
|
152
|
+
|
|
138
153
|
Resolvable relative paths are canonicalized before submission.
|
|
139
154
|
|
|
140
155
|
Clipboard images can be added with `Ctrl+V` and persisted through the DSH Attachment service.
|
|
@@ -168,132 +183,25 @@ Slash Commands registered by other plugins through `ctx.commands` are discovered
|
|
|
168
183
|
|
|
169
184
|
### Footer customization
|
|
170
185
|
|
|
171
|
-
|
|
172
|
-
for the common cases.
|
|
173
|
-
|
|
174
|
-
`/settings` → Status line (or the `footer` key in the `dsh-pi-tui`
|
|
175
|
-
settings document) selects the preset:
|
|
176
|
-
|
|
177
|
-
| Value | Meaning |
|
|
178
|
-
|---|---|
|
|
179
|
-
| `default` (legacy `full`) | the classic two-row footer (status + stats) |
|
|
180
|
-
| `compact` | the status row only (stats line hidden) |
|
|
181
|
-
| `custom` | a versioned `footerLayout` (see below) |
|
|
182
|
-
| `command` | a user-configured command renders the status surface (see below) |
|
|
183
|
-
|
|
184
|
-
The first three values are selectable in the `/settings` panel; `command`
|
|
185
|
-
is NOT in the panel — it can only be enabled through the USER-layer
|
|
186
|
-
settings document (`footer: "command"` + `footerCommand`). The `/settings`
|
|
187
|
-
Status line row offers exactly `default / compact / custom`.
|
|
188
|
-
|
|
189
|
-
`/footer` is a hierarchical interactive configurator: pick a row first
|
|
190
|
-
(Row Selector), then edit that row's items — `↑/↓` walks every item of
|
|
191
|
-
the row in order (Left/Right are visual grouping only), `←/→` moves an
|
|
192
|
-
item across sides, `Space` removes it, `A` opens a searchable Add Picker
|
|
193
|
-
(filtered by label / id / description, with the highlighted item's
|
|
194
|
-
description below), `M` enters Move Mode to reorder, and `Enter` opens
|
|
195
|
-
the Item Editor (Style candidates previewed with the item's real render;
|
|
196
|
-
semantic tones; Advanced edits prefix / suffix / importance with a
|
|
197
|
-
one-keystroke Reset). The preview is composed by the real footer engine
|
|
198
|
-
and — with the contextual help — pinned to the top of the panel; it never
|
|
199
|
-
scrolls away at any terminal size. `S` on the Row Selector saves
|
|
200
|
-
(persisted); `Esc` walks back page by page and closes on the first page
|
|
201
|
-
without touching the active layout. Usable before any session exists.
|
|
202
|
-
|
|
203
|
-
The Add Picker also offers `+ Create Custom Text` for user-defined static text items. Their text, default semantic tone, display name, and deletion are editable; definitions are read and persisted only from the USER layer. The definition tone is separate from the placement Tone, and the item can otherwise be shown/hidden, moved, and reordered like any other footer item.
|
|
204
|
-
|
|
205
|
-
`footerLayout` is a nested settings object (schemaVersion 1, 1–2 rows,
|
|
206
|
-
left/right zones, a separator, finite formatters, semantic tones,
|
|
207
|
-
prefix/suffix, importance). The `/footer` configurator builds it
|
|
208
|
-
interactively; the YAML shape is:
|
|
186
|
+
`/footer` is the interactive Footer editor. You can combine builtin status items, change their side and order, choose a Style and Tone, edit Prefix/Suffix and Importance, and create your own Footer items.
|
|
209
187
|
|
|
210
|
-
|
|
211
|
-
footer: custom
|
|
212
|
-
footerLayout:
|
|
213
|
-
schemaVersion: 1
|
|
214
|
-
rows:
|
|
215
|
-
- left:
|
|
216
|
-
- id: agent-preset
|
|
217
|
-
format: compact
|
|
218
|
-
- id: model
|
|
219
|
-
- id: project
|
|
220
|
-
- id: context
|
|
221
|
-
format: full
|
|
222
|
-
- id: cache-hit
|
|
223
|
-
- id: token-usage
|
|
224
|
-
format: io
|
|
225
|
-
- id: performance
|
|
226
|
-
format: speed
|
|
227
|
-
- id: version
|
|
228
|
-
format: tui
|
|
229
|
-
right:
|
|
230
|
-
- id: focus-mode
|
|
231
|
-
separator:
|
|
232
|
-
text: " │ "
|
|
233
|
-
tone: textDim
|
|
234
|
-
```
|
|
188
|
+
Four item sources are supported:
|
|
235
189
|
|
|
236
|
-
Builtin
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
`percent` / `full`; Token usage `io` / `total` / `compact`; Cache hit `full` /
|
|
241
|
-
`compact`; Performance `full` / `speed` / `latency` measures average time
|
|
242
|
-
to first token; Turns/steps `both` / `turns` / `steps`; Version keeps `tui` / `dsh` /
|
|
243
|
-
`both`. Omitting `format` continues to use each item's legacy default.
|
|
244
|
-
|
|
245
|
-
Builtin item ids: `agent-preset`, `model`, `reasoning`,
|
|
246
|
-
`permission-preset`, `sandbox-mode`, `approval-policy`, `plan-state`,
|
|
247
|
-
`focus-mode`, `focused-seat`, `view-scope`, `cwd`, `project`,
|
|
248
|
-
`git-branch`, `run-state`, `queue`, `tasks`, `agents`, `todo`,
|
|
249
|
-
`context`, `cache-hit`, `token-usage`, `performance`, `turns-steps`,
|
|
250
|
-
`stats-line`, `version`, `ext:*` (the legacy extension segments).
|
|
251
|
-
An invalid `footerLayout` warns once and falls back to the default — the
|
|
252
|
-
TUI always starts.
|
|
253
|
-
|
|
254
|
-
`footer: command` hands the Status Surface to a user-configured command
|
|
255
|
-
(Claude/Kimi style): the current status snapshot is serialized to JSON on
|
|
256
|
-
the command's stdin (schemaVersion 1 — no secrets, no credentials, no
|
|
257
|
-
prompts), and the command's stdout (sanitized: SGR colors and OSC 8
|
|
258
|
-
hyperlinks only) renders the status surface. The Host's instruction
|
|
259
|
-
surface (e.g. the Ctrl+C exit hint) always survives on top.
|
|
190
|
+
- **Builtin Item** — Model, Context, Token, Tasks, Git branch, and other built-in status facts;
|
|
191
|
+
- **Custom Text** — a user-created static text item;
|
|
192
|
+
- **Custom Command Item** — a user-created dynamic command output that can be composed with other items;
|
|
193
|
+
- **Extension Item** — a Footer item contributed by a plugin through the Stable Extension API.
|
|
260
194
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
schemaVersion: 1
|
|
265
|
-
command: "~/.config/dsh/statusline.sh"
|
|
266
|
-
timeoutMs: 300 # default 300, max 1000
|
|
267
|
-
refreshIntervalMs: 1000 # min 1000
|
|
268
|
-
maxRows: 1 # 1..2
|
|
269
|
-
```
|
|
195
|
+
On narrow terminals, builtins with compact forms shorten before lower-importance content is dropped. Runtime compaction never rewrites the Style you saved.
|
|
196
|
+
|
|
197
|
+
A `/footer` Custom Command Item is different from `footer: command`: the former is one dynamic item that can sit next to Model, Context, and other items; the latter hands the whole Footer status surface to one user command.
|
|
270
198
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
### Extension footer items
|
|
279
|
-
|
|
280
|
-
Plugins can contribute **configurable footer items** through the Stable
|
|
281
|
-
extension API (`@xmoon76/dsh-pi-tui/extensions`): register a
|
|
282
|
-
`FooterItemContribution` on the `chrome.footer.item` slot — a label and a
|
|
283
|
-
plain-data `segment` (styled spans; the host strips any terminal control
|
|
284
|
-
sequence, plugins never style the terminal). Users show/hide, reorder and
|
|
285
|
-
zone-place the item in `/footer` exactly like a builtin item. Feature-detect
|
|
286
|
-
the `slot.chrome.footer.item` capability before registering (it is
|
|
287
|
-
advertised before any surface exists). The item's config identity is the
|
|
288
|
-
canonical key `ext:<owner>/<id>` where the owner is the plugin's stable
|
|
289
|
-
name — **stable across HMR**: a layout referencing an unloaded plugin's
|
|
290
|
-
item keeps the reference and recovers automatically when the plugin
|
|
291
|
-
reloads. An npm-scoped plugin name (`@scope/name`) is legal: its `/` is
|
|
292
|
-
percent-encoded via `encodeURIComponent` in the key
|
|
293
|
-
(`ext:%40scope%2Fname/<id>`); the id itself must
|
|
294
|
-
not contain `/`. The legacy `chrome.footer.status` slot is unchanged: its
|
|
295
|
-
segments aggregate into the single `ext:*` item. Full author guide:
|
|
296
|
-
[docs/extension-api.md](docs/extension-api.md).
|
|
199
|
+
For the full `/footer` workflow, Custom Text / Command items, YAML reference, security model, and troubleshooting, see:
|
|
200
|
+
|
|
201
|
+
- [Footer customization guide](docs/footer-customization.md)
|
|
202
|
+
- [Extension API for plugin authors](docs/extension-api.md)
|
|
203
|
+
|
|
204
|
+
`/statusline` is an alias of `/footer`.
|
|
297
205
|
|
|
298
206
|
## Common keys
|
|
299
207
|
|
|
@@ -310,6 +218,7 @@ segments aggregate into the single `ext:*` item. Full author guide:
|
|
|
310
218
|
| `Ctrl+T` | Toggle the todo panel |
|
|
311
219
|
| `Ctrl+R` | Search input history |
|
|
312
220
|
| `Ctrl+F` | Search Transcript |
|
|
221
|
+
| `Ctrl+End` | Jump to the latest Transcript output in fullscreen |
|
|
313
222
|
| `Ctrl+O` | Expand / collapse Tool and System details; in fullscreen Focus, bulk-toggle the Thought roots |
|
|
314
223
|
| `Alt+T` | Expand / collapse Thinking |
|
|
315
224
|
| `Ctrl+G` | Edit current input in `$VISUAL`/`$EDITOR` |
|
|
@@ -399,14 +308,52 @@ dsh-pi-tui:
|
|
|
399
308
|
* DeepSeek Harness
|
|
400
309
|
* Node.js `^22.19.0 || >=24`
|
|
401
310
|
|
|
402
|
-
|
|
311
|
+
### DSH/TUI version pairing (important)
|
|
312
|
+
|
|
313
|
+
| TUI package line | Matching DSH line | Notes |
|
|
314
|
+
|---|---|---|
|
|
315
|
+
| `0.4.0-alpha.1` (`@next`) | `>=0.1.2-alpha.2` | Current prerelease; each release validates its concrete DSH family |
|
|
316
|
+
| `0.3.x` (`@0.3`) | `0.1.1-rc.2` | Legacy runtime line |
|
|
317
|
+
|
|
318
|
+
Do not mix the two lines: DSH 0.1.1 is outside the 0.4 peer window and the
|
|
319
|
+
normal incompatible-runtime boundary will fail. The startup row prints upgrade
|
|
320
|
+
and rollback guidance when concurrent Loader ordering allows it, but that
|
|
321
|
+
friendly notice is best-effort rather than a startup-order guarantee. If you
|
|
322
|
+
keep DSH 0.1.1, use the 0.3 TUI line. For the current `0.4.0-alpha.1`, install
|
|
323
|
+
DSH first and then add the TUI to a profile:
|
|
324
|
+
|
|
325
|
+
```sh
|
|
326
|
+
npm install -g @deepseek-ai/dsh@0.1.2-alpha.3
|
|
327
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
328
|
+
dsh --profile pi-tui
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
If you need to keep the legacy DSH runtime:
|
|
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
|
+
The declared 0.4 support range is `>=0.1.2-alpha.2`; each release validates
|
|
340
|
+
its concrete DSH family. Running only `npm install -g @xmoon76/dsh-pi-tui` does
|
|
341
|
+
not install the plugin into a DSH profile; the `dsh plugin` command is still
|
|
342
|
+
required.
|
|
343
|
+
|
|
344
|
+
New agent sessions use the official roster's selected preset id. A custom DSH
|
|
345
|
+
preset literally named `code` is valid and remains `code` when it exists in the
|
|
346
|
+
current roster. Old persisted `code` defaults/session values fall back to `ptc`
|
|
347
|
+
only after the roster proves that no custom `code` preset exists.
|
|
403
348
|
|
|
404
349
|
### npm
|
|
405
350
|
|
|
406
|
-
Using a dedicated `pi-tui` profile is recommended
|
|
351
|
+
Using a dedicated `pi-tui` profile is recommended. Once a stable 0.4 release
|
|
352
|
+
exists, use the matching stable TUI channel (`@latest`); use `@next` for the
|
|
353
|
+
prerelease channel:
|
|
407
354
|
|
|
408
355
|
```sh
|
|
409
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui
|
|
356
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
410
357
|
dsh --profile pi-tui
|
|
411
358
|
```
|
|
412
359
|
|
|
@@ -416,6 +363,15 @@ Resume an existing Session:
|
|
|
416
363
|
dsh --profile pi-tui --session <session-id>
|
|
417
364
|
```
|
|
418
365
|
|
|
366
|
+
### Source Mode (validation only)
|
|
367
|
+
|
|
368
|
+
Source Mode is only for `next` CI and local compatibility validation. 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.
|
|
369
|
+
|
|
370
|
+
```sh
|
|
371
|
+
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
372
|
+
pnpm compat:dsh:npm
|
|
373
|
+
```
|
|
374
|
+
|
|
419
375
|
The published package already contains the Pi TUI fork required at runtime. No separate internal TUI package needs to be installed.
|
|
420
376
|
|
|
421
377
|
### Update
|
|
@@ -630,6 +586,7 @@ Contributor-oriented repository structure and development rules are documented i
|
|
|
630
586
|
| [docs/concurrency.md](docs/concurrency.md) | Session concurrency |
|
|
631
587
|
| [docs/failure-model.md](docs/failure-model.md) | Async failure / cancellation |
|
|
632
588
|
| [docs/perf-baseline.md](docs/perf-baseline.md) | Performance baseline |
|
|
589
|
+
| [docs/local-development.md](docs/local-development.md) | Local development and worktree policy |
|
|
633
590
|
| [docs/extension-api.md](docs/extension-api.md) | Extension API |
|
|
634
591
|
| [AGENTS.md](AGENTS.md) | Contributor operating manual |
|
|
635
592
|
|
package/README.md
CHANGED
|
@@ -10,12 +10,24 @@
|
|
|
10
10
|
`dsh-pi-tui` 作为独立的 dsh bundle 安装到 profile 中,提供流式对话、工具调用、会话管理、Subagent、历史搜索、Shell、审批与设置等终端交互。模型、工具、Session、权限、Skills、Plan、Goal、Subagent 等运行时能力仍由 DeepSeek Harness 提供。
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui
|
|
13
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
14
14
|
dsh --profile pi-tui
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|

|
|
18
18
|
|
|
19
|
+
## DSH 兼容性与源码验证
|
|
20
|
+
|
|
21
|
+
发布包通过 `package.json` peer contract 使用 DSH `>=0.1.2-alpha.2`;源码验证不会修改这个发布契约,也不会把 DSH vendor 进本仓库。
|
|
22
|
+
|
|
23
|
+
当目标 DSH 版本尚未发布到 npm 时,可以用固定 commit 的官方源码包做本地验证:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
CI 中 `next` 使用 Source Mode,`main` 和所有 tag 使用 npm Mode。源码 lane 会验证完整的官方 DSH tarball family、TUI 预设和旧 runtime 边界;依赖已发布 `pi2dsh` 的生态检查会明确标记为 skipped。详细流程见 [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md)。
|
|
30
|
+
|
|
19
31
|
## 功能
|
|
20
32
|
|
|
21
33
|
### 对话与工具
|
|
@@ -31,6 +43,7 @@ dsh --profile pi-tui
|
|
|
31
43
|
* Plan Review
|
|
32
44
|
* Todo / Goal 状态展示
|
|
33
45
|
* 可读的终端窗口标题
|
|
46
|
+
* 长会话按有界窗口浏览,并保留翻页与实时跟随位置
|
|
34
47
|
* Compaction / prune 后不会出现重复的幽灵 Tool Card
|
|
35
48
|
|
|
36
49
|
`Ctrl+O` 控制工具和系统详情;在全屏 Focus 下它整体展开最近几个 Thought root,或全部收起。`Alt+T` 单独控制 Thinking。
|
|
@@ -135,6 +148,8 @@ Shell 卡片默认只显示有限的输出预览,`Ctrl+O` 可以展开完整
|
|
|
135
148
|
@"path with spaces/file.ts"
|
|
136
149
|
```
|
|
137
150
|
|
|
151
|
+
`/image <path>` 也支持文件与目录补全;带空格、引号或 Windows 分隔符的路径会保留输入方言,目录可以继续展开。
|
|
152
|
+
|
|
138
153
|
能够解析的相对路径会在提交时转换为明确的文件路径。
|
|
139
154
|
|
|
140
155
|
支持通过 `Ctrl+V` 添加剪贴板图片,并使用 DSH Attachment 能力保存到 Session。
|
|
@@ -167,117 +182,25 @@ TUI 使用 DSH 提供的模型和设置服务。
|
|
|
167
182
|
|
|
168
183
|
### Footer 自定义
|
|
169
184
|
|
|
170
|
-
|
|
185
|
+
`/footer` 提供交互式 Footer 编辑器。你可以组合内置状态条目,调整左右位置、顺序、Style、Tone、Prefix/Suffix 和 Importance,也可以创建自己的 Footer 条目。
|
|
171
186
|
|
|
172
|
-
|
|
173
|
-
选择预设:
|
|
187
|
+
支持四类条目:
|
|
174
188
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
| `custom` | 版本化 `footerLayout`(见下) |
|
|
180
|
-
| `command` | 用户配置的命令渲染状态表面(见下) |
|
|
189
|
+
- **Builtin Item**:Model、Context、Token、Tasks、Git branch 等内置状态;
|
|
190
|
+
- **Custom Text**:用户创建的固定文本;
|
|
191
|
+
- **Custom Command Item**:用户创建的动态命令输出,可和其他条目一起排列;
|
|
192
|
+
- **Extension Item**:插件通过 Stable Extension API 提供的 Footer 条目。
|
|
181
193
|
|
|
182
|
-
|
|
183
|
-
通过 USER 层设置文档(`footer: "command"` + `footerCommand`)启用,
|
|
184
|
-
`/settings` 的 Status line 行只有 `default / compact / custom` 三个选项。
|
|
194
|
+
在窄终端中,支持 compact 的内置条目会先自动缩短;空间仍不足时再按 Importance 隐藏低优先级内容。运行时 compact 不会修改你保存的 Style。
|
|
185
195
|
|
|
186
|
-
`/footer`
|
|
187
|
-
条目——`↑/↓` 在整行条目间顺序移动(Left/Right 只是视觉分组),
|
|
188
|
-
`←/→` 左右换侧,`Space` 移除,`A` 打开可搜索的 Add Picker(按
|
|
189
|
-
label / id / 描述过滤,选中项下方显示描述),`M` 进入 Move Mode
|
|
190
|
-
排序,`Enter` 打开 Item Editor(Style 候选以条目的真实渲染作示例;
|
|
191
|
-
Tone 语义色;Advanced 编辑 prefix / suffix / importance 并可一键
|
|
192
|
-
Reset)。预览由真实 Footer 引擎合成,与 contextual help 一起固定在
|
|
193
|
-
面板顶部,任何终端尺寸下都不会随列表滚动消失。Row Selector 页 `S`
|
|
194
|
-
保存(持久化),`Esc` 逐页返回、在首页关闭且不影响当前生效布局。
|
|
195
|
-
无会话时也可使用。
|
|
196
|
+
`/footer` 的 Custom Command Item 和 `footer: command` 是两种不同能力:前者只是一个可以与 Model、Context 等混排的动态条目;后者把整个 Footer 状态表面交给一个用户命令。
|
|
196
197
|
|
|
197
|
-
|
|
198
|
+
完整的 `/footer` 使用方法、Custom Text / Command、YAML 配置、安全模型和排错说明见:
|
|
198
199
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
`/footer` 配置器可交互地构建它;YAML 形状如下:
|
|
200
|
+
- [Footer 自定义完整指南](docs/footer-customization.md)
|
|
201
|
+
- [Extension API(插件作者)](docs/extension-api.md)
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
footer: custom
|
|
205
|
-
footerLayout:
|
|
206
|
-
schemaVersion: 1
|
|
207
|
-
rows:
|
|
208
|
-
- left:
|
|
209
|
-
- id: agent-preset
|
|
210
|
-
format: compact
|
|
211
|
-
- id: model
|
|
212
|
-
- id: project
|
|
213
|
-
- id: context
|
|
214
|
-
format: full
|
|
215
|
-
- id: cache-hit
|
|
216
|
-
- id: token-usage
|
|
217
|
-
format: io
|
|
218
|
-
- id: performance
|
|
219
|
-
format: speed
|
|
220
|
-
- id: version
|
|
221
|
-
format: tui
|
|
222
|
-
right:
|
|
223
|
-
- id: focus-mode
|
|
224
|
-
separator:
|
|
225
|
-
text: " │ "
|
|
226
|
-
tone: textDim
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
内置 format 是有限集合,继续使用现有的 `format` 字段(不新增第二套
|
|
230
|
-
style schema):Model 为 `badge` / `plain` / `compact`;Permission preset
|
|
231
|
-
为 `badge` / `plain` / `compact`;Plan state 为 `badge` / `plain`;Working
|
|
232
|
-
directory 为 `short` / `basename` / `full`;Git branch 为 `plain` / `label`;
|
|
233
|
-
Context 为 `bar` / `percent` / `full`;Token usage 为 `io` / `total` /
|
|
234
|
-
`compact`;Cache hit 为 `full` / `compact`;Performance 为 `full` / `speed` /
|
|
235
|
-
`latency`(平均首 token 时间);Turns/steps 为 `both` / `turns` / `steps`;
|
|
236
|
-
Version 保留 `tui` / `dsh` / `both`。省略 `format` 时仍使用各条目的旧默认值。
|
|
237
|
-
|
|
238
|
-
内置条目 id:`agent-preset`、`model`、`reasoning`、
|
|
239
|
-
`permission-preset`、`sandbox-mode`、`approval-policy`、`plan-state`、
|
|
240
|
-
`focus-mode`、`focused-seat`、`view-scope`、`cwd`、`project`、
|
|
241
|
-
`git-branch`、`run-state`、`queue`、`tasks`、`agents`、`todo`、
|
|
242
|
-
`context`、`cache-hit`、`token-usage`、`performance`、`turns-steps`、
|
|
243
|
-
`stats-line`、`version`、`ext:*`(旧扩展段)。非法的 `footerLayout`
|
|
244
|
-
会警告一次并回退到默认布局——TUI 始终能启动。
|
|
245
|
-
|
|
246
|
-
`footer: command` 把状态表面交给用户配置的命令(Claude/Kimi 风格):
|
|
247
|
-
当前状态快照以 JSON 序列化到命令的 stdin(schemaVersion 1——不含
|
|
248
|
-
secret、凭据、提示词),命令的 stdout(经过净化:仅保留 SGR 颜色与
|
|
249
|
-
OSC 8 超链接)渲染状态表面。Host 的指令表面(如 Ctrl+C 退出提示)
|
|
250
|
-
始终叠加在最上层。
|
|
251
|
-
|
|
252
|
-
```yaml
|
|
253
|
-
footer: command
|
|
254
|
-
footerCommand:
|
|
255
|
-
schemaVersion: 1
|
|
256
|
-
command: "~/.config/dsh/statusline.sh"
|
|
257
|
-
timeoutMs: 300 # 默认 300,最大 1000
|
|
258
|
-
refreshIntervalMs: 1000 # 最小 1000
|
|
259
|
-
maxRows: 1 # 1..2
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**安全:** 只有当命令位于你的设置文档的 USER 层时才会被执行。
|
|
263
|
-
仓库/项目提供的 `footerCommand` 永远不会被执行——命令模式被禁用并
|
|
264
|
-
回退到原生布局。命令按 `refreshIntervalMs` 周期刷新,每次最多输出 2 行;失败(空输出、非零退出、超时)自动回退到原生布局。
|
|
265
|
-
|
|
266
|
-
### 扩展 Footer 条目
|
|
267
|
-
|
|
268
|
-
插件可以通过 Stable 扩展 API(`@xmoon76/dsh-pi-tui/extensions`)贡献
|
|
269
|
-
**可配置的 Footer 条目**:在 `chrome.footer.item` 槽位注册一个
|
|
270
|
-
`FooterItemContribution`——包含 label 与纯数据 `segment`(带样式的
|
|
271
|
-
span;Host 会剥离任何终端控制序列,插件永远不能直接给终端上样式)。
|
|
272
|
-
用户可在 `/footer` 中像内置条目一样开关、排序、左右放置。注册前请
|
|
273
|
-
先 feature-detect `slot.chrome.footer.item` 能力(该能力在任何 surface
|
|
274
|
-
存在之前就已声明)。条目的配置身份是规范键 `ext:<owner>/<id>`,其中
|
|
275
|
-
owner 是插件的稳定名称——**跨 HMR 稳定**:引用已卸载插件条目的布局
|
|
276
|
-
保留引用,插件重载后自动恢复。npm scoped 插件名(`@scope/name`)合法:
|
|
277
|
-
其 `/` 在键中按 `encodeURIComponent` 百分号编码(`ext:%40scope%2Fname/<id>`);
|
|
278
|
-
id 本身不得包含 `/`。旧的 `chrome.footer.status` 槽位不变:
|
|
279
|
-
其 segment 聚合为单一的 `ext:*` 条目。完整作者指南:
|
|
280
|
-
[docs/extension-api.md](docs/extension-api.md)。
|
|
203
|
+
`/statusline` 是 `/footer` 的别名。
|
|
281
204
|
|
|
282
205
|
## 常用按键
|
|
283
206
|
|
|
@@ -294,6 +217,7 @@ id 本身不得包含 `/`。旧的 `chrome.footer.status` 槽位不变:
|
|
|
294
217
|
| `Ctrl+T` | 切换 Todo 面板 |
|
|
295
218
|
| `Ctrl+R` | 搜索输入历史 |
|
|
296
219
|
| `Ctrl+F` | 搜索 Transcript |
|
|
220
|
+
| `Ctrl+End` | 全屏时跳到最新 Transcript 输出 |
|
|
297
221
|
| `Ctrl+O` | 展开 / 折叠工具和系统详情;全屏 Focus 下整体切换 Thought root |
|
|
298
222
|
| `Alt+T` | 展开 / 折叠 Thinking |
|
|
299
223
|
| `Ctrl+G` | 使用 `$VISUAL`/`$EDITOR` 编辑输入 |
|
|
@@ -373,14 +297,49 @@ dsh-pi-tui:
|
|
|
373
297
|
* DeepSeek Harness
|
|
374
298
|
* Node.js `^22.19.0 || >=24`
|
|
375
299
|
|
|
376
|
-
|
|
300
|
+
### DSH 与 TUI 版本对应(重要)
|
|
301
|
+
|
|
302
|
+
| TUI 包版本 | 对应 DSH 版本 | 说明 |
|
|
303
|
+
|---|---|---|
|
|
304
|
+
| `0.4.0-alpha.1`(`@next`) | `>=0.1.2-alpha.2` | 当前预发布线;按每个发布版本的具体 DSH family 验证 |
|
|
305
|
+
| `0.3.x`(`@0.3`) | `0.1.1-rc.2` | 旧运行时兼容线 |
|
|
306
|
+
|
|
307
|
+
不要把两条线混装:DSH 0.1.1 不在 0.4 的 peer 支持范围内,运行时会在
|
|
308
|
+
正常的不兼容边界以非零状态失败。启动行会在 Loader 并发挂载顺序允许时打印
|
|
309
|
+
升级和回退提示,但该友好提示是 best-effort,不是启动顺序保证;保留 DSH
|
|
310
|
+
0.1.1 时请使用 0.3。`0.4.0-alpha.1` 的推荐安装顺序如下(先装 DSH,再把
|
|
311
|
+
TUI 装入 profile):
|
|
312
|
+
|
|
313
|
+
```sh
|
|
314
|
+
npm install -g @deepseek-ai/dsh@0.1.2-alpha.3
|
|
315
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
316
|
+
dsh --profile pi-tui
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
如果需要保留旧 DSH:
|
|
320
|
+
|
|
321
|
+
```sh
|
|
322
|
+
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
|
|
323
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
324
|
+
dsh --profile pi-tui
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
`0.4` 的声明支持范围是 `>=0.1.2-alpha.2`;每个发布版本都会验证具体的
|
|
328
|
+
DSH family。仅执行 `npm install -g @xmoon76/dsh-pi-tui` 不会把插件安装进
|
|
329
|
+
DSH profile,实际使用仍应执行上面的 `dsh plugin` 命令。
|
|
330
|
+
|
|
331
|
+
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
|
|
332
|
+
`code` preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 `code`。
|
|
333
|
+
旧数据中省略请求的 `code` default/session 值只有在确认 roster 不含 `code` 后
|
|
334
|
+
才会回退到 `ptc`。
|
|
377
335
|
|
|
378
336
|
### npm
|
|
379
337
|
|
|
380
|
-
推荐使用单独的 `pi-tui` profile
|
|
338
|
+
推荐使用单独的 `pi-tui` profile。稳定版发布后,使用与 DSH 版本匹配的
|
|
339
|
+
TUI channel(稳定版用 `@latest`,预发布版用 `@next`):
|
|
381
340
|
|
|
382
341
|
```sh
|
|
383
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui
|
|
342
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
|
|
384
343
|
dsh --profile pi-tui
|
|
385
344
|
```
|
|
386
345
|
|
|
@@ -390,6 +349,15 @@ dsh --profile pi-tui
|
|
|
390
349
|
dsh --profile pi-tui --session <session-id>
|
|
391
350
|
```
|
|
392
351
|
|
|
352
|
+
### Source Mode(仅验证)
|
|
353
|
+
|
|
354
|
+
Source Mode 只用于 `next` 的 CI 和本地兼容性验证,不是发布或用户安装方式。它从 `test/compat/dsh-source.json` 的完整 commit SHA 构建官方 DSH tarball family,通过临时 pnpm overrides 安装,并在完成后清理临时状态。不要把 DSH 源码路径、`file:` 依赖或 workspace symlink 写入发布 package。
|
|
355
|
+
|
|
356
|
+
```sh
|
|
357
|
+
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
358
|
+
pnpm compat:dsh:npm
|
|
359
|
+
```
|
|
360
|
+
|
|
393
361
|
安装包已经包含运行所需的 Pi TUI fork,不需要额外安装内部的 TUI package。
|
|
394
362
|
|
|
395
363
|
### 更新
|
|
@@ -606,6 +574,7 @@ packages/pi-tui/AGENTS.md
|
|
|
606
574
|
| [docs/concurrency.md](docs/concurrency.md) | Session 并发 |
|
|
607
575
|
| [docs/failure-model.md](docs/failure-model.md) | Async failure / cancellation |
|
|
608
576
|
| [docs/perf-baseline.md](docs/perf-baseline.md) | 性能基线 |
|
|
577
|
+
| [docs/local-development.md](docs/local-development.md) | 本地开发环境与 worktree 约定 |
|
|
609
578
|
| [docs/extension-api.md](docs/extension-api.md) | Extension API |
|
|
610
579
|
| [AGENTS.md](AGENTS.md) | Contributor operating manual |
|
|
611
580
|
|
package/cordis.patch.yml
CHANGED
|
@@ -42,24 +42,23 @@
|
|
|
42
42
|
- id: authorization
|
|
43
43
|
name: '@deepseek-ai/dsh-authorization'
|
|
44
44
|
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
# (no `!!js` at boot time, no HMR race). The writable root is
|
|
51
|
-
# `dsh-agent-presets`' own default (`includeUserRoot`):
|
|
52
|
-
# `$DSH_HOME/.agent-presets`, where a person authors their own presets.
|
|
45
|
+
# Consume DSH 0.1.2's official shipped presets directly. The upstream
|
|
46
|
+
# service defaults includeShippedRoot/includeUserRoot to true, so this
|
|
47
|
+
# bundle deliberately owns no duplicate standard/ptc/minimal/cordis root.
|
|
48
|
+
# The legacy persisted id `code` is normalized at the data boundary to
|
|
49
|
+
# `ptc`; it is not another preset row.
|
|
53
50
|
- id: agent-presets
|
|
54
51
|
name: '@deepseek-ai/dsh-agent-presets'
|
|
55
|
-
inject: [tuiStartup]
|
|
56
52
|
config:
|
|
57
53
|
default: standard
|
|
58
|
-
roots:
|
|
59
|
-
- path: !!js ctx.tuiStartup.shippedPresetRoot
|
|
60
|
-
trust: system
|
|
61
54
|
|
|
62
|
-
#
|
|
55
|
+
# The official standard preset enables per-session subagent model
|
|
56
|
+
# selection. Its tool-subagent row requires this Host service when it
|
|
57
|
+
# mounts; without the row the default standard composition throws.
|
|
58
|
+
- id: subagent-model-selection-settings
|
|
59
|
+
name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
|
|
60
|
+
|
|
61
|
+
# Host-plane TypeScript runtime: the `ptc` preset's `tool-presentation`
|
|
63
62
|
# row waits for `codeRuntime` and fails the preset at mount without it
|
|
64
63
|
# (same host row the web bundle inserts).
|
|
65
64
|
- id: code-runtime
|
|
@@ -85,10 +84,12 @@
|
|
|
85
84
|
#
|
|
86
85
|
# Rows that STAY on the host plane (not listed): `tools` (registry), `shell-env`
|
|
87
86
|
# (publishes the DSH env the model's shell sees), `subagent` + its spawn/fork
|
|
88
|
-
# backends (process singletons), `tool-subagent-report` (host singleton),
|
|
89
|
-
# goal/jobs/compaction services and
|
|
90
|
-
# `
|
|
91
|
-
# `
|
|
87
|
+
# backends (process singletons), `tool-subagent-report` (host singleton),
|
|
88
|
+
# `subagent-model-selection-settings`, the goal/jobs/compaction services and
|
|
89
|
+
# their host infrastructure, `permission`, `approval`, `sandbox*`,
|
|
90
|
+
# `fs-observation-policy`, `spill*`, `timeout-policy`, `repeat-tool-reminder`,
|
|
91
|
+
# `session-*`, `token-meter`. `command-goal` is disabled below and reintroduced
|
|
92
|
+
# only by presets that own that command in their scoped composition.
|
|
92
93
|
|
|
93
94
|
- id: tool-bash
|
|
94
95
|
disabled: true
|
|
@@ -114,6 +115,9 @@
|
|
|
114
115
|
- id: tool-skill
|
|
115
116
|
disabled: true
|
|
116
117
|
|
|
118
|
+
- id: command-goal
|
|
119
|
+
disabled: true
|
|
120
|
+
|
|
117
121
|
- id: tool-goal
|
|
118
122
|
disabled: true
|
|
119
123
|
|
package/dist/builtins.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { H as PI_TUI_EXTENSIONS_SERVICE, L as dshVersion } from "./src-syk6h8J9.mjs";
|
|
1
2
|
import { TUI_STARTUP_SERVICE } from "./startup.mjs";
|
|
2
|
-
import { I as dshVersion, V as PI_TUI_EXTENSIONS_SERVICE } from "./src-B93JMbsv.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
//#region src/builtins.ts
|
package/dist/extensions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import { B as inject, H as PI_TUI_EXTENSIONS_SERVICE, U as API_VERSION, V as name, W as describeKey, z as apply } from "./src-syk6h8J9.mjs";
|
|
1
2
|
import "./startup.mjs";
|
|
2
|
-
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-B93JMbsv.mjs";
|
|
3
3
|
export { API_VERSION, PI_TUI_EXTENSIONS_SERVICE, apply, describeKey, inject, name };
|