@xmoon76/dsh-pi-tui 0.5.6 → 0.5.8

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.
Files changed (90) hide show
  1. package/LICENSE +33 -0
  2. package/README.en.md +103 -814
  3. package/README.md +102 -711
  4. package/cordis.patch.yml +186 -0
  5. package/dist/acp-preferences.d.mts +29 -0
  6. package/dist/acp-preferences.mjs +15 -0
  7. package/dist/{bootstrap-DQ4YPL-7.mjs → bootstrap-CMIjGyuk.mjs} +33515 -7587
  8. package/dist/builtins.mjs +3 -3
  9. package/dist/{client-bootstrap-Cr1JCaF5.mjs → client-bootstrap-BjGPc-DM.mjs} +4637 -492
  10. package/dist/client-extension-loader-probe-BUw7q8bJ.mjs +119 -0
  11. package/dist/command-trust-DChWUamk.mjs +406 -0
  12. package/dist/daemon-launcher-Dult7Jxv.mjs +1932 -0
  13. package/dist/daemon-launcher.d.mts +159 -0
  14. package/dist/daemon-launcher.mjs +2 -0
  15. package/dist/diagnostics-D5jwc-q1.d.mts +11 -0
  16. package/dist/{dist-CIsR7cz4.mjs → dist-BFgC-5tL.mjs} +938 -487
  17. package/dist/entry-control-DjNsE3I0.mjs +190 -0
  18. package/dist/extension/advanced.d.mts +1 -1
  19. package/dist/extension/unstable.d.mts +1 -1
  20. package/dist/extension-config-probe-BDdvutkG.mjs +95 -0
  21. package/dist/extension-config.d.mts +29 -0
  22. package/dist/extension-config.mjs +22 -0
  23. package/dist/{extensions-Bp0L37lP.mjs → extensions-B4uLpSTv.mjs} +1109 -100
  24. package/dist/{extensions-Bte3XOt5.d.mts → extensions-C8eAM0gX.d.mts} +1 -1
  25. package/dist/extensions.d.mts +2 -2
  26. package/dist/extensions.mjs +1 -1
  27. package/dist/{host-bootstrap-DilsvA6f.mjs → host-bootstrap-MVxks641.mjs} +129 -24
  28. package/dist/{host-foundation-probe--5jtvHVe.mjs → host-foundation-probe-DMNTmNrH.mjs} +2 -2
  29. package/dist/host-runtime.d.mts +11 -5
  30. package/dist/host-runtime.mjs +4171 -920
  31. package/dist/index.d.mts +86 -174
  32. package/dist/index.mjs +38087 -9967
  33. package/dist/local-acp-listener-B65J0Bx4.mjs +3115 -0
  34. package/dist/local-client.mjs +1158 -59
  35. package/dist/local-daemon-control-C14q9KnD.mjs +1588 -0
  36. package/dist/local-daemon-control-TCnERL7n.mjs +1424 -0
  37. package/dist/local-discovery-DOSsCh9q.mjs +2883 -0
  38. package/dist/local-discovery-egN4_gsQ.mjs +2 -0
  39. package/dist/local-discovery-uOBfFq5j.mjs +2764 -0
  40. package/dist/local-host.mjs +812 -89
  41. package/dist/local-profile-daemon-admin-BmQSdzT0.mjs +210 -0
  42. package/dist/local-scope-DamiMqPd.mjs +1340 -0
  43. package/dist/{local-transport-BVwFYq_Y.mjs → local-transport-Iwo0mtu3.mjs} +313 -38
  44. package/dist/local-web-control-DMrjwCkl.mjs +454 -0
  45. package/dist/local-workspace-object-D06GL0UO.mjs +248 -0
  46. package/dist/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  47. package/dist/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  48. package/dist/open-CmOBxSjN.mjs +63 -0
  49. package/dist/persisted-setting-probe-DWZLtWoB.mjs +145 -0
  50. package/dist/pi-tui-acp-access-contract-BdLwduU6.mjs +75 -0
  51. package/dist/pi-tui-remote-contribution-Do8ECrUy.mjs +1492 -0
  52. package/dist/pi-tui-terminal-progress-contract-B3RoEzjK.mjs +146 -0
  53. package/dist/preferences.d.mts +17 -0
  54. package/dist/preferences.mjs +20 -0
  55. package/dist/preset-BcWqOtY7.mjs +46 -0
  56. package/dist/profile-preferences-migration-BfUGdPZx.mjs +500 -0
  57. package/dist/profile-preferences-migration-CThz4rHH.mjs +2 -0
  58. package/dist/prompt-sections-DUKmWb8g.mjs +2232 -0
  59. package/dist/prompt-sections-DXmjB58H.mjs +634 -0
  60. package/dist/{public-types-Dgf1bDke.d.mts → public-types-C1YgFtwC.d.mts} +56 -3
  61. package/dist/row-id-DPbyt9Nn.mjs +24 -0
  62. package/dist/{runtime-status-Cj1nFOdS.mjs → runtime-status-v-FTnWcD.mjs} +49 -3
  63. package/dist/schema-BTGYn8_X.d.mts +54 -0
  64. package/dist/schema-qE_P09zJ.mjs +124 -0
  65. package/dist/{session-BKGXyh80.mjs → session-C6tSs86s.mjs} +9672 -7270
  66. package/dist/{session-CPt_U8_f.mjs → session-CstInGIA.mjs} +9674 -7273
  67. package/dist/startup-CarQxWwi.d.mts +213 -0
  68. package/dist/{startup-7BYWuvBU.mjs → startup-EG5UqIcd.mjs} +341 -26
  69. package/dist/startup.d.mts +2 -99
  70. package/dist/startup.mjs +2 -2
  71. package/dist/{terminal-progress-source-DrqQhtT8.mjs → terminal-progress-source-CpfpQO_h.mjs} +2038 -67
  72. package/dist/{pasted-path-range-CMnxuGPx.mjs → transcript-view-C1YtJ49Y.mjs} +11590 -6718
  73. package/dist/{pasted-path-range-r6qzV_tC.mjs → transcript-view-CuJYWkhp.mjs} +12296 -6923
  74. package/dist/version-B9yC7bBk.mjs +83 -0
  75. package/dist/visual-tools.d.mts +1 -1
  76. package/dist/visual-tools.mjs +1 -1
  77. package/dist/web-preferences.d.mts +1 -1
  78. package/dist/{web-roster-CjqnUXNk.mjs → web-roster-Dis7BhrA.mjs} +63 -3
  79. package/generated/dsh-presets/cordis.patch.yml +4 -2
  80. package/generated/dsh-presets/ptc.patch.yml +4 -0
  81. package/generated/dsh-presets/standard.patch.yml +7 -0
  82. package/generated/web-access/cordis.patch.yml +239 -0
  83. package/package.json +217 -170
  84. package/dist/entry-control-DnduyDiw.mjs +0 -92
  85. package/dist/local-discovery-C9VMjc0K.mjs +0 -759
  86. package/dist/local-discovery-CDaQHA_R.mjs +0 -2
  87. package/dist/pi-tui-remote-contribution-B0EQsP0N.mjs +0 -85
  88. package/dist/pi-tui-terminal-progress-contract-CdBH9j78.mjs +0 -70
  89. package/dist/pi-tui-terminal-progress-contract-MLXZ-i3t.mjs +0 -905
  90. package/dist/version-a-eF-QER.mjs +0 -80
package/README.en.md CHANGED
@@ -1,873 +1,162 @@
1
1
  # dsh-pi-tui
2
2
 
3
- [简体中文](README.md) | English
3
+ English | [简体中文](README.md)
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@xmoon76/dsh-pi-tui.svg)](https://www.npmjs.com/package/@xmoon76/dsh-pi-tui)
6
6
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
 
8
- A Pi-style terminal frontend for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
8
+ **A terminal frontend for DeepSeek Harness. One Host, with TUI, Web and ACP clients accessing the same Agent Session.**
9
9
 
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.
10
+ **Direct** remains the default, ready-to-use mode. Starting in **0.5.8**, Linux/macOS users can explicitly choose a **Daemon**: an independent local Host retains sessions and ongoing work as terminal Clients disconnect and reconnect. Other TUIs, the official Web frontend and an opt-in local ACP client can access sessions belonging to that same Host.
11
+
12
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) remains the authority for the Agent Loop, models, tools, persistence, permissions and concurrent writes. `dsh-pi-tui` is a third-party frontend, not a second Agent Runtime.
11
13
 
12
14
  ![dsh-pi-tui](docs/dsh-pi-tui.png)
13
15
 
16
+ ![Direct TUI and a daemon Host shared by TUI, Web and ACP clients](docs/dsh-pi-tui-shared-session.svg)
17
+
18
+ > **Shared Sessions, not shared terminal screens.** Multiple TUI clients can view the same Session; Web and ACP use the Host's official Session/Agent capabilities. Prompt admission, approvals, cancellation and writes remain subject to Host permission and concurrency rules. ACP permits at most one ACP View per Session at a time (without limiting TUI Views), and ACP v1 is a bounded protocol subset. Daemon access is **local, same-OS-user** functionality, not a public TCP remote service.
19
+
14
20
  ## Install into a DSH profile
15
21
 
16
22
  ### Stable / latest
17
23
 
18
- Stable releases are recommended for ordinary users. Install DSH first, then add
19
- the TUI to the `pi-tui` profile:
24
+ **0.5.8 is the current stable release (npm `@latest`).** The recommended DSH pairing is **0.2.2-rc.5**. Install DeepSeek Harness first, then the TUI bundle into the `pi-tui` profile:
20
25
 
21
- ```sh
22
- npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@latest
26
+ ~~~sh
27
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@0.2.2-rc.5
23
28
  dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
24
29
  dsh --profile pi-tui
25
- ```
30
+ ~~~
26
31
 
27
- ### Exact version pairing (0.5.6)
32
+ ### Exact version pairing (0.5.8)
28
33
 
29
- This release requires DSH `>=0.2.2-rc.1`, targets `0.2.2-rc.1` for exact validation, and requires Node.js `>=24.9.0`. Finish Agent turns and exit the old TUI/Host normally before installing or upgrading; hot upgrade is not supported.
34
+ **0.5.8 requires Node.js ≥24.9.0 and DSH ≥0.2.2-rc.3. DSH 0.2.2-rc.5 is recommended** (the exact qualification target for this release). For a reproducible installation, pin both package versions:
30
35
 
31
- ```sh
32
- npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@0.2.2-rc.1
33
- dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.5.6
36
+ ~~~sh
37
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@0.2.2-rc.5
38
+ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.5.8
34
39
  dsh --profile pi-tui
35
- ```
36
-
37
- ### Next / npm line (validation)
38
-
39
- Preview installation uses the DSH `alpha` channel and the TUI `next` channel.
40
- The DSH native install scripts must be explicitly allowed:
41
-
42
- ```sh
43
- npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@alpha
44
- dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
45
- dsh --profile pi-tui
46
- ```
47
-
48
- > **Next/alpha are independent moving pointers, not a guaranteed installable DSH/TUI pair.** Check the actual published versions and their peer/engines ranges before installing; do not mix incompatible DSH families. Use the pinned commands above for the exact 0.5.6 pairing. To qualify this checkout, run `pnpm compat:dsh:npm`.
49
-
50
- Use the isolated npm driver (it installs the exact DSH version declared by this
51
- checkout and exercises the full build/test/package path):
52
-
53
- ```sh
54
- pnpm compat:dsh:npm
55
- ```
56
-
57
- See the [compatibility guide](docs/guides/dsh-compatibility.md) for the stable minimum,
58
- next compatibility range, and fallback paths.
59
-
60
- ### Requirements
40
+ ~~~
61
41
 
62
- * DeepSeek Harness
63
- * Node.js `>=24.9.0`
64
-
65
- ### DSH/TUI version pairing (important)
66
-
67
- | TUI package line | Official DSH tags for the pairing | Notes |
42
+ | TUI | DSH | Status |
68
43
  |---|---|---|
69
- | `0.5.6` (stable / `@latest`) | `dsh-v0.2.2-rc.1` | Current stable release; minimum and exact validation target DSH is `0.2.2-rc.1`, Node.js `>=24.9.0`; incompatible with `0.2.1-rc.*` |
70
- | `0.5.5` (previous stable) | `dsh-v0.2.1-rc.2`, `dsh-v0.2.1-rc.3`, `dsh-v0.2.1-rc.4`, `dsh-v0.2.1-rc.5` | Previous stable release; minimum DSH version `0.2.1-rc.2` |
71
- | `0.5.4` (stable, previous) | `dsh-v0.2.1-rc.2`, `dsh-v0.2.1-rc.3`, `dsh-v0.2.1-rc.4` | Previous stable line; the minimum DSH version is 0.2.1-rc.2, and it passes the official preset assembly on all three DSH versions |
72
- | `0.5.3` (stable, previous) | `dsh-v0.2.1-rc.2`, `dsh-v0.2.1-rc.3`, `dsh-v0.2.1-rc.4` | Previous stable line; the minimum DSH version is 0.2.1-rc.2, and it passes the official preset assembly on all three DSH versions |
73
- | `0.5.1` (stable, previous) | `dsh-v0.2.0-rc.2` | Previous stable line; both the minimum and the exact validation target are the 0.2.0-rc.2 family |
74
- | `0.5.2-rc.1` (published next-channel preview) | `dsh-v0.2.0-rc.2` | Previous next preview: published to the npm `next` dist-tag on 2026-10-17; its whole peer floor stays `>=0.2.0-rc.2`, so it does not cover 0.2.1-rc.2 |
75
- | `dsh-v0.2.1-rc.1` (no paired TUI) | none | No released TUI in this matrix claims that intermediate release; never reuse `0.5.5` for it |
76
- | `0.5.0` (stable, previous) | `dsh-v0.1.7-rc.2`, `dsh-v0.2.0-rc.1` | Previous stable; 0.1.7-rc.2 minimum, exact validation target 0.2.0-rc.1 |
77
- | `0.4.9` (stable, previous) | `dsh-v0.1.7-rc.2` | Previous stable; the compatible TUI for a 0.1.7-rc.2 runtime |
78
- | `0.4.8` (stable, previous) | `dsh-v0.1.7-rc.1` | Previous stable; the compatible TUI for a 0.1.7-rc.1 runtime |
79
- | `0.4.6` (stable, previous) | `dsh-v0.1.5-rc.1`, `dsh-v0.1.5-rc.2` | Previous stable; the compatible TUI for a 0.1.5 runtime |
80
- | `0.4.7-alpha.2` (next, previous) | `dsh-v0.1.6-alpha.2` | Previous next line; the compatible TUI for a 0.1.6-alpha.2 runtime |
81
-
82
- Do not mix the stable and `@next` prerelease lines. `0.5.6` is the current stable release: it requires DSH `>=0.2.2-rc.1` and is not compatible with `0.2.1-rc.*`. Before upgrading, let turns and background work finish, exit the old TUI/Host normally, and back up the Profile/patch, raw Session logs, Workspace and necessary Host resources or credential references. Hot upgrade is not supported. Data written under 0.2.2 semantics is not guaranteed readable by rc5 in place; restore a backup to a separate directory and use the matching old DSH/TUI pair to roll back. Historical pairings are in the table above. See the [compatibility guide](docs/guides/dsh-compatibility.md) for matching and diagnosis, and the [next branch README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md) for its integration status.
83
-
84
- New agent sessions use the official roster's selected preset id. A custom DSH
85
- preset literally named `code` is valid and remains `code` when it exists in the
86
- current roster. DSH V3 migration owns historical session `code -> ptc`
87
- conversion, while the current projection preserves a legal custom `code`. An
88
- omitted legacy settings default is never aliased: with no matching declaration
89
- in the current roster it is simply an invalid preference.
90
-
91
- ### Profile management
92
-
93
- Update the installed TUI:
94
-
95
- ```sh
96
- dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
97
- ```
44
+ | `0.5.8` | `>=0.2.2-rc.3`; recommended `0.2.2-rc.5` | **Current latest** |
45
+ | `0.5.6` | `0.2.2-rc.1` | Previous release |
98
46
 
99
- List installed plugins:
100
-
101
- ```sh
102
- dsh plugin --profile pi-tui -- list
103
- ```
104
-
105
- Remove the plugin:
106
-
107
- ```sh
108
- dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
109
- ```
110
-
111
- Resume an existing Session:
112
-
113
- ```sh
114
- dsh --profile pi-tui --session <session-id>
115
- ```
116
-
117
- ## Features
47
+ **Fresh 0.5.8 install:** The DSH plugin command above installs the TUI without manually adding `@deepseek-ai/dsh-client-store`, `zustand` or `immer`. A failed Daemon Client startup reports its own `$DSH_HOME/logs/pi-tui-client/startup-*.log` file; `daemon logs` covers Host logs only.
118
48
 
119
- ### Conversation and tools
49
+ **Upgrade precaution:** Before changing the DSH Runtime, finish in-flight Turns/Jobs, stop the previous Host and back up Profiles, Sessions and required data. Cross-DSH schema downgrade in place is not guaranteed. Do not pair 0.5.8 with rc.2 or earlier. See the [compatibility guide](docs/guides/dsh-compatibility.md) for historical pairs and recovery.
120
50
 
121
- * Streaming Markdown output
122
- * Collapsible Thinking blocks
123
- * Tool Call cards with running / success / failure state
124
- * Collapsible Tool / System details
125
- * Full-text Transcript search
126
- * Folding for long Session history
127
- * Context, token, model, and runtime status
128
- * Full-screen Settings workspace: About status, Models / Account, Agent and dynamic Extensions
129
- * Approval and `ask_user_question` dialogs
130
- * Images: terminal-capability admission, JPEG/WebP previews, draft images and a read-only viewer
131
- * Chart/SVG tools, `present_visual` publication and inline final-answer rendering
132
- * Delivered-files tail and the `/deliverables` browser
133
- * Experimental TSP renderer: native tool cards, Work Hub, images and published figures
134
- * Host-wide Scheduled Task management in PiTui Direct
135
- * Plugin Manager: inspect and update third-party Registry bundles marked updatable by the Host
136
- * Agent guidance for file links, image references and `present` deliveries
137
- * Plan Review
138
- * Todo / Goal status
139
- * Human-readable terminal window titles
140
- * Bounded long-session windows with stable paging and live-follow position
141
- * Long user prompts collapse to head + marker + tail; `Ctrl+O` expands and collapses them in regular mode and in fullscreen outside Focus
142
- * No duplicate ghost Tool Cards after compaction / pruning
143
-
144
- `Ctrl+O` controls Tool and System details and expands/collapses long user prompts in regular mode and in fullscreen outside Focus — in fullscreen Focus it bulk-expands the recent Thought roots or collapses them all, while long user prompts are expanded by clicking the marker (or by a search hit) and collapsed with `Ctrl+O`. `Alt+T` controls Thinking separately.
145
-
146
- Tool approvals appear in the editor seat: the full Reason/Arguments body is readable in a scrollable area (no six-line preview), with `y` to allow once, `n` to reject, `Esc`/`Ctrl+C` to cancel, `c` to copy the raw arguments and `e` to expand. Fullscreen can click the actually painted Allow once / Reject / Cancel actions and wheel the body; regular mode stays keyboard-only. Short viewports show the real compact payload or `Resize to inspect more`, never a cropped decision.
147
-
148
- ### Conversation display
149
-
150
- `/display` switches between three presentation presets: `full` (default) is the normal Transcript projection; `focus` groups the current turn's Thinking, Tool Calls, and intermediate replies into a live Thought block; `compact` folds contiguous process into `Activity` spans with Header + `Think:` / `Action:` previews, keeps the session and assistant intermediate output visible in chronological order, renders injected notice / relay / recall entries separately (adjacent environment injections merge into an expandable Context cluster), and expands with a mouse click or `Ctrl+O`. The `Display` row in `/settings` offers the same values and persists the choice; `/focus` remains available as a compatibility command.
151
-
152
- The full process can still be expanded when needed. In fullscreen Focus, Thought roots can be expanded/collapsed in bulk or opened with an individual card click, and the viewport survives switches and resizes. Display presets only change presentation; they do not modify Session events.
153
-
154
- ### Communication policy
155
-
156
- `/settings` exposes two independent communication controls. **Progress updates** owns the mid-turn update cadence: `milestones` (default) posts a brief update only when a substantial phase completes, the direction materially changes, or required user input blocks progress — never for a freshly discovered partial finding; `frequent` keeps the user actively informed through longer multi-step work; `off` suppresses progress narration entirely. **Response style** owns the visible answer's density: `default` adds no extra guidance, `concise` is compact and result-first, `explanatory` adds rationale, architecture, and tradeoffs. Changes apply on the next prompt assembly without restarting the agent and are saved across sessions. Focus is a surface capability, not a third preference: while Focus is active the progress section is simply ineffective (progress-only intermediate messages are not generated) and the saved cadence is untouched; the response style stays active in Focus.
157
-
158
- ### Sessions
159
-
160
- Supports persisted DSH Sessions, including:
161
-
162
- * Creating and resuming Sessions
163
- * Session switching
164
- * Renaming
165
- * Forking
166
- * Rewind
167
- * Session lineage
168
- * `/export` — full Session archive (descendants + attachments) saved to a Client-local directory
169
- * `/transcript` — official DSH Session Markdown in Direct mode, saved to a Client-local directory
170
-
171
- Use:
172
-
173
- ```text
174
- /sessions
175
- /fork
176
- /rewind
177
- /export
178
- /transcript
179
- ```
180
-
181
- In Direct mode, `/transcript` reads official Host Session Markdown and saves a local `.md` file; user messages are blockquotes and process activity may be inside `<details>`. `/export` remains a separate ZIP archive.
182
-
183
- When the Agent is idle and the editor is empty, pressing `Esc` twice quickly also opens Rewind.
184
-
185
- Rewind creates a new Child Session from a selected historical User Turn and restores that Prompt into the editor. The original Session is unchanged. Ordinary Fork/Rewind Sessions are independent, not parent/child lineage; Session lineage represents Subagents.
186
-
187
- In PiTui, `/sessions`, `/search` and `/resume` open the fullscreen Session Workspace, grouped into Needs attention, Working and Recent. Filter by Current, a Workspace or Unassigned; `Space` opens a read-only Peek and `Enter` switches Sessions. In Direct mode, new Sessions including `/new` use the official Host Workspace. When the main editor owns the keyboard and the draft is strictly empty, two unmodified `←` presses within 600 ms open All workspaces; the first remains ordinary cursor movement.
188
-
189
- ### Input history
190
-
191
- `Ctrl+R` opens input history search.
192
-
193
- Three scopes are available:
194
-
195
- * Current session
196
- * Current directory
197
- * All directories
198
-
199
- History results include the Prompt, working directory, timestamp, and Session information. Selecting an entry restores it to the editor without submitting it.
200
-
201
- Regular `↑` / `↓` history recall is still available for recent input.
202
-
203
- ### Subagents and the Task Center
204
-
205
- `/tasks` opens the full Task Center, showing the work the current Session's
206
- Job Registry / Subagent catalog still tracks; the Footer's `↓` opens the
207
- lightweight Quick Tasks view for the current active work. Selecting a Job opens
208
- the fullscreen Job workspace: one status row with the Job identity, the themed
209
- status and the `[GAP]`/`[ERROR]`/`[SETTLED]` facts, followed by the real
210
- progress/detail, the command summary and the `Output` / `Command` reading tabs.
211
- Output is the official non-consuming live preview (scrollable, searchable and
212
- explicitly labelled as a retained tail rather than the full history), and the
213
- Command page shows and copies the original shell command. It never consumes the
214
- model's `job_output` cursor and never becomes session history.
215
-
216
- Task Center is a live tracked/control projection, not an execution-history
217
- list. `ACTIVE` / `TRACKED` are presentation scopes: `ACTIVE` shows only the
218
- currently active items, `TRACKED` shows everything the current authority
219
- still lists. DSH `0.1.7` temporarily registers a Job while an ordinary
220
- foreground `bash` / `pwsh` command runs, so it can be observed and stopped
221
- from the Task Center; if the command finishes inside the foreground wait,
222
- DSH removes that temporary record and the final result stays in the
223
- Transcript's tool card. Explicit `run_in_background: true` jobs (and jobs
224
- promoted to the background after a foreground timeout) remain visible in
225
- `TRACKED` after completion as long as the Job Registry keeps their record.
226
-
227
- `/plugins` is a deep link into `/settings → Plugins`: both take the SAME
228
- Settings fullscreen lease and the SAME Plugin Manager page — there is no
229
- separate plugin screen and no Session create/switch. The catalog is grouped as
230
- TUI & Extensions / Official DSH / Third-party / Experimental (the Experimental
231
- group is always last). At >=120 columns, and only while the frame can grant six
232
- real business-body rows, the frame shows
233
- `Categories | Plugin List | Details`; a shorter frame degrades to the pair or one
234
- column instead of squeezing the body. At 76-119 columns it shows
235
- `Categories | List` or `List | Details` depending on the keyboard owner — the pair
236
- again needs six real business-body rows, otherwise it degrades to one column; below
237
- 76 columns it is one column. Install, dangerous confirmations and Diagnostics
238
- always take the full width so risk text is never squeezed. Settings paints the
239
- shared header/metadata/rule/pane header and the single last-row action bar; the
240
- plugin page contributes only its business body. Search, status filters, provenance/status facts, official catalog installs, enablement and removal are available from the page; third-party Registry Profile bundles marked updatable by the Host can show available versions and be updated after explicit confirmation. The actual Host-reported version, restart requirement and errors are shown verbatim. The `dsh-pi-tui` bundle currently providing the surface is read-only and cannot be updated, disabled or removed from its own screen. The
241
- category preview and `/plugins` share one page instance and one background
242
- install request: `Esc` from the List returns to the Settings category and a
243
- second `Esc` closes the workspace. Press `d` inside the page
244
- for the read-only **Diagnostics** view: extension contribution health grouped by
245
- owner (`active/failed/shadowed` with the full `lastError`), live registry counts,
246
- the actual advertised capabilities, and contributions with no proven Loader-entry
247
- owner under `Unassociated extension contributions`. `c` copies the selected fact,
248
- `C` copies everything, `r` rereads and Esc returns. Diagnostics reads only the
249
- extension ledger; Host package state and install logs stay out of it. `copy`
250
- still proves emission only, never an OS-clipboard receipt.
251
-
252
- The 14 official rc.2 Experimental bundles carry a bounded, identity-exact
253
- Detail statement of their terminal surface and limits/risks (Web-only,
254
- Host-only, the B04 WEB_ONLY/Host-row-pending boundary accepted by the Owner,
255
- and the B13/B14 verified one-shot/provider boundaries). That copy never follows
256
- enablement and never claims a live Host capability PASS. Upgrade guidance is
257
- derived from Host facts only: shipped bundles upgrade with the DSH installation,
258
- profile-owned bundles require Remove followed by an explicit later install,
259
- missing entries use the official on-demand target, and the Current TUI bundle
260
- is managed outside the screen. There is no in-place update, version picker or
261
- silent reinstall.
262
-
263
- Subagents are shown using their complete lineage, including nested descendants:
264
-
265
- ```text
266
- main
267
- ├─ subagent A
268
- │ └─ subagent B
269
- └─ subagent C
270
- ```
271
-
272
- The browser distinguishes:
273
-
274
- * `continuable`
275
- * `one-shot`
276
- * running / inactive
277
- * nested descendants
278
- * Job Registry rows (including running foreground shell work)
279
-
280
- The Footer's `↓` opens Quick Tasks as a lightweight browsing view: it only
281
- supports arrow navigation, left/right expand/collapse, `Tab` type cycling,
282
- `Enter` open, and `Esc` close. The bottom “Open Task Center” row opens the full
283
- Task Center.
284
-
285
- The full Task Center additionally offers `A` to toggle Active / Tracked, `/` search,
286
- `Tab` / `Shift+Tab` to cycle types in both directions, `S` to stop the selected
287
- task after confirmation, and `R` to refresh/retry. Quick Tasks consumes only the
288
- whitelist above; every other keystroke is a no-op that never enters search, stop
289
- confirmation, or management state, so `Esc` always closes it in one layer.
290
-
291
- Completed one-shot Subagents remain available for persisted Transcript inspection.
292
-
293
- 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.
294
-
295
- Deeper nested Subagents are read-only by default.
296
-
297
- The official subagent model selection (the DSH `subagent-model-selection`
298
- setting) can be toggled and its allowlist maintained in `/settings`: once
299
- enabled, a NEW session's official `subagent` tool may pick the child
300
- provider/model per call (bounded by the allowlist). The setting is sampled at
301
- session composition and never rewrites the tools of an already-running
302
- session.
303
-
304
- ### Delivered files and `/deliverables`
305
-
306
- A final answer's `present` files render as a compact tail: at most four files,
307
- two rows each (path relative to the current display subject's workspace plus
308
- description), with `+N more · /deliverables` beyond four. On a fullscreen
309
- AltScreen, Full, Compact and Focus can click `Browse all` and per-file
310
- `Details`; a regular split keeps only the command entry.
311
-
312
- `/deliverables` opens the delivery panel for the currently displayed session
313
- (including a viewed child) with Files / Turns / Details: `↑↓` selects, `Enter`
314
- opens details, `/` filters by filename, full Host path and description, `T`
315
- switches among Turns with deliveries, `C` copies the raw Host path and `Esc`
316
- goes back or closes. `Enter Preview` on Details reads one 120-line page of UTF-8
317
- Host text; binary/document suffixes show that preview is unavailable without
318
- reading bytes; a file that changes between pages restarts from the beginning.
319
- Panel text is mouse-selectable, the panel is centered, and a terminal resize
320
- keeps the current page, filter, cursor and scroll position.
321
-
322
- ### Shell
323
-
324
- The editor supports two Shell modes:
325
-
326
- ```text
327
- ! git status
328
- ```
329
-
330
- Runs the command in the Host environment and submits its output into the current Session.
331
-
332
- ```text
333
- !! git status
334
- ```
335
-
336
- Runs the command in the Host environment as well; its output stays out of model context (card display only).
337
-
338
- `!` / `!!` are editor modes rather than plain text prefixes. The prompt and completion behavior switch together with the active mode.
339
-
340
- Shell cards show a bounded output preview by default. `Ctrl+O` expands the retained output — except in fullscreen Focus, where Ctrl+O owns the Thought roots and the shell cards keep their folded state.
341
-
342
- ### Git commit attribution (optional)
343
-
344
- When enabled, dsh-pi-tui instructs the Agent to add the official attribution trailers when it creates Git commits:
345
-
346
- ```text
347
- Co-Authored-By: @xmoon76/dsh-pi-tui <dsh-pi-tui@xmoon.org>
348
- ```
349
-
350
- It is **off by default**. Three modes are supported:
351
-
352
- ```text
353
- off no attribution guidance (default)
354
- product the official Co-Authored-By trailer
355
- product-model official trailer + Assisted-By: <provider>/<model>
356
- ```
357
-
358
- This is **Agent guidance (a prompt policy), not repository-level enforcement**:
359
- dsh-pi-tui installs no Git hooks, rewrites no `git commit` command, and probes
360
- no repository. The `provider`/`model` in `product-model` come straight from
361
- DSH's official model selection (a model switch takes effect on the next
362
- request).
363
-
364
- Boundaries:
365
-
366
- - `!` / `!!` user shell commands and commits from your own terminal are completely untouched;
367
- - no `prepare-commit-msg` hook is installed and existing hooks are never modified;
368
- - **not effective under the `minimal` preset**: its persona is a complete system prompt
369
- (`complete: true`) that replaces every other section — the same existing behavior for the
370
- other TUI guidance (progress updates, response style, focus);
371
- - no GitHub credentials or API are required; the Author/Committer identity is never modified;
372
- - a model may in theory ignore or mis-transcribe the instruction — this is the accepted tradeoff: low-intrusion guidance instead of a full Git lifecycle subsystem.
373
-
374
- ### File references and images
375
-
376
- Typing `@` opens workspace file search and completion:
377
-
378
- ```text
379
- @src/index.ts
380
- @"path with spaces/file.ts"
381
- ```
382
-
383
- `/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. In terminals with bracketed-paste support, a recognized local absolute image path can be staged as an attachment; sending is blocked while it is read, and a failed read keeps the path text.
384
-
385
- Resolvable relative paths are canonicalized before submission.
386
-
387
- Clipboard images can be added with `Ctrl+V` and persisted through the DSH Attachment service.
388
-
389
- ### Models and runtime settings
390
-
391
- The TUI uses DSH model and settings services.
392
-
393
- Common entry points:
394
-
395
- ```text
396
- /model
397
- /schedule
398
- /settings
399
- /status
400
- /deliverables
401
- /view-image
402
- /login
403
- /permission
404
- /plan
405
- /goal
406
- /compact
407
- /footer
408
- /statusline
409
- ```
410
-
411
- Model selection, Reasoning Effort, permission presets, Plan, and Goal all keep the corresponding DSH runtime semantics. `/model` candidates come only from the Host catalog: `deepseek-flash` is identified by the exact `(provider, model)` pair (the display name `DeepSeek-V4.1-Flash` is never the ID), and a selection writes the official Session/global default. A deployment catalog that no longer offers the ID shows no invented row.
412
-
413
- In PiTui Direct, `/schedule` opens the Host-wide task workspace without a Session. The Host owns its timer; stopping the Host stops background delivery.
414
-
415
- `/settings` and `/status` open the same full-screen settings workspace on the
416
- About home. Wide and medium terminals show a category rail plus the content
417
- column; narrow terminals (under 76 columns) show About directly. The fixed
418
- categories are About / Models / Account / Agent / Appearance / Conversation /
419
- Input & Terminal / Tools / Plugins, with Extensions appended only while the
420
- extension settings registry has rows. `Tab`/`Shift+Tab` move focus between
421
- regions, `Right`/`Enter` go one level deeper, `Left`/`Esc`/`Backspace` step
422
- back, and the outermost back closes the workspace; the Action Bar stays on the
423
- last row.
51
+ ### Next / npm line (validation)
424
52
 
425
- About shows the TUI/DSH versions, backend, captured session identity,
426
- whole-session statistics, TTFB/throughput and Context occupancy; `c` copies the
427
- selected fact's raw value, `C` copies the full report and `r` refreshes. The old
428
- `/status` page is gone; extension diagnostics moved to
429
- `Settings → Plugins → Diagnostics` (`d`).
53
+ The TUI `@next` channel and DSH `@alpha` channel are independent moving pointers. Verify their actual published versions and peer/engine ranges before combining them:
430
54
 
431
- Models lists the Host provider catalog, API-key presence (not a connectivity
432
- test), provider details, masked input and clear confirmations, the Add Provider
433
- wizard and provider-native sign-in; the home lists only configured providers,
434
- with unconfigured ones in the Add Provider catalog. Account shows sign-in state,
435
- the browser authorization URL, SSH tunnel guidance, independent wallets, exact
436
- attempt cancellation, refresh and a confirmed sign-out. `/login` and `/logout`
437
- open the matching page deep link. DeepSeek Account sign-in uses the official Host
438
- `host-webserver` loopback `/oauth/callback` on `127.0.0.1:0`; the TUI never
439
- receives a token or grant, and `--help` opens no port.
440
-
441
- Settings edits in place: Appearance (Icon style, Status line mode), Conversation
442
- (Transcript detail, Thinking detail, Progress updates, Response style, Submit
443
- while busy, Git attribution), Input & Terminal (Home/End keys, Fullscreen, wheel
444
- lines, notifications, Terminal progress, Footer layout, Keyboard shortcuts),
445
- Agent (approval policy, default permission, subagent model allowlist/selection,
446
- user shell sandbox), Tools (Web Search / Fetch, Visual tools) and Extensions
447
- (dynamic settings grouped by plugin). Every write needs explicit confirmation
448
- and reports `Verified` / `Not saved` / `Outcome unknown` from the authoritative
449
- read-back; `Fullscreen` applies after Settings closes normally. `/footer`,
450
- `/statusline`, bare `/keybindings` and `/plugins` are deep links into the same
451
- workspace; the legacy main settings editor and standalone plugin screen are
452
- gone.
453
-
454
- The **Visual tools** switch under `Settings → Tools` (default On) is the
455
- profile-wide `pi-tui-visual-tools.enabled` and controls `dsh_pi_tui_chart`,
456
- `dsh_pi_tui_svg` and `present_visual` together. After it is turned off, new
457
- model requests no longer see the three tools, while historical results remain
458
- displayable, copyable, searchable and exportable. Direct verifies the Host
459
- registry state before showing Verified; Remote only reports that the preference
460
- was saved.
461
-
462
- `Settings → Tools → Web Search / Fetch` is a page in the same workspace: search
463
- and fetch providers, result count, `Share Original Question`, HTTPS endpoint and
464
- a read-only API-key reference. Each value is written only by an explicit Enter
465
- confirmation and shows the Host's authoritative read-back. The two APIs are
466
- separately billed providers; the default Messages/HTTP pair calls no billed API.
467
-
468
- `Extensions` groups the live registration rows by owner with `Tab`/`Shift+Tab`
469
- cycling groups and arrows/Home/End/paging/wheel staying inside the group.
470
- Entries open native Detail/Choice; only an explicit Confirm writes to the
471
- running plugin, `Verified` requires a live read-back, and a same-id HMR
472
- re-registration inherits no old state. Extension settings never write the TUI
473
- settings document or a Host profile.
474
-
475
- ### Footer customization
476
-
477
- `/footer` opens the Footer editor inside the same full-screen Settings workspace
478
- (Appearance → Configure footer layout). You can combine builtin status items,
479
- change their side and order, choose a Style and Tone, edit Prefix/Suffix and
480
- Importance, and create your own Footer items.
481
-
482
- Four item sources are supported:
483
-
484
- - **Builtin Item** — Model, Context, Token, Tasks, Git branch, and other built-in status facts;
485
- - **Custom Text** — a user-created static text item;
486
- - **Custom Command Item** — a user-created dynamic command output that can be composed with other items;
487
- - **Extension Item** — a Footer item contributed by a plugin through the Stable Extension API.
488
-
489
- On narrow terminals, builtins with compact forms shorten before lower-importance content is dropped. Runtime compaction never rewrites the Style you saved.
490
-
491
- 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.
492
-
493
- For the full `/footer` workflow, Custom Text / Command items, YAML reference, security model, and troubleshooting, see:
494
-
495
- - [Footer customization guide](docs/guides/footer.md)
496
- - [Extension API for plugin authors](docs/extensions/stable.md)
497
-
498
- `/statusline` is an alias of `/footer`.
499
-
500
- ### Images
501
-
502
- Ctrl+V reads the system clipboard: an image becomes the canonical placeholder `[image #N (WxH)]` with draft thumbnails in one row above the composer (a short window lets the client hide that row, while typing and sending still work and the status line keeps reporting the real draft count); text is inserted at the live caret. `/image` and `/attach` can also add an image or a regular file to the current draft. A placeholder that appears several times shows several positions while the bytes are read and uploaded once.
503
-
504
- Images in user messages, assistant messages and tool results are shown inside their own card, in their original order: one identity line (name, pixel size, byte count) plus one image. The PiTUI viewer is described below; in the experimental TSP renderer, viewing and zooming are the Tern client's own affordances (moving between neighbouring images depends on the client's version and capabilities). When an image cannot be read, its format is unsupported, or it exceeds the 16 MiB single-image limit, the card states the identity and the real reason instead of drawing a fabricated image. On a native Kitty terminal, transcript thumbnails, the composer draft card and the fullscreen image viewer all first convert JPEG/WebP to a bounded PNG in the background before painting pixels (WebP uses only its first frame, EXIF orientation is applied, and the longest edge is capped at 768 pixels; the identity row and the viewer keep the original name, dimensions, media type and byte count; the draft card only derives the one last local image it is allowed to show). A collapsed occurrence never starts a conversion; while converting or after a failure only text is shown (a failure reads `Preview unavailable`), and only a body that really painted pixels is clickable. The fullscreen viewer shows that same bounded derivative rather than a full-resolution original; PNG, iTerm2, GIF, narrow and graphics-unsupported terminals keep their existing behavior.
505
-
506
- The rightmost three cells of a fullscreen image info row are `[-]`/`[+]`, folding only that image; clicking its body opens the read-only viewer. `/view-image` lists the images of the currently mounted transcript window; `Enter` views one and `Esc back` returns to the same list.
507
-
508
- ### Image protocol selection
509
-
510
- The default is `auto` (Direct/Zellij use Kitty > SIXEL > text; tmux keeps its live U1/Sxl relative priority). Choose a protocol explicitly at startup with the same `PI_IMAGE_PROTOCOL` variable:
511
-
512
- ```sh
513
- PI_IMAGE_PROTOCOL=auto # default; strict local Zellij + Windows Terminal avoids the known startup Kitty false positive
514
- PI_IMAGE_PROTOCOL=kitty # only an admitted Kitty transport, otherwise text
515
- PI_IMAGE_PROTOCOL=sixel # only an admitted SIXEL transport (Direct needs real DA1; Zellij/tmux keep their own gates), otherwise text
516
- PI_IMAGE_PROTOCOL=iterm2 # Direct legacy iTerm2 only; multiplexers never pretend to forward it
517
- PI_IMAGE_PROTOCOL=none # disable image pixels for every renderer; 0 is equivalent
518
- ```
519
-
520
- An explicit value is a protocol **selection**, not a promise for an unsupported terminal: tmux live-client/Sxl/U1 checks, Zellij DA1/version/Screen readiness and DCS ownership still apply. Invalid values fail startup. `none` only disables terminal pixel previews; image attachments, model input and sending are unchanged. The experimental TSP renderer's native images follow the same switch.
521
-
522
- ### TSP renderer (experimental)
523
-
524
- Set `DSH_PI_TUI_RENDERER=tsp` to enable the experimental Tern TSP renderer:
525
- native tool cards, Preparing rows, PTC child calls, the Work Hub
526
- (`/tasks`, `/subagents`), image paste and historical images, and native display
527
- with Copy for published charts/SVGs. The default renderer remains PiTui;
528
- Settings and Plugins pages that TSP cannot host are refused explicitly.
529
-
530
- ## Common keys
531
-
532
- | Key | Action |
533
- | ------------- | --------------------------------------------------- |
534
- | `Enter` | Submit input |
535
- | `Ctrl+Enter` | Submit with the OPPOSITE busy behavior (steers by default; queues when `busyEnter=steer`) |
536
- | `Shift+Enter` | Insert newline |
537
- | `Esc` | Cancel current interaction / interrupt running work |
538
- | `Esc Esc` | Open Rewind while idle |
539
- | `Ctrl+C` | Keyboard exit confirmation; clears the draft first |
540
- | `Ctrl+D` | Keyboard exit confirmation when empty; forward-delete with draft text |
541
- | `Ctrl+S` | Steer queued messages and the draft into the running turn |
542
- | `Ctrl+T` | Toggle the todo panel |
543
- | `Ctrl+R` | Search input history |
544
- | `Ctrl+F` | Search Transcript |
545
- | `Ctrl+End` | Jump to the latest Transcript output in fullscreen; a clickable `↓ Latest` appears after leaving the live tail |
546
- | `Ctrl+O` | Expand / collapse Tool and System details and long user prompts in regular/fullscreen-non-Focus; in fullscreen Focus, bulk-toggle the Thought roots (expand long user prompts by clicking the marker) |
547
- | `Alt+T` | Expand / collapse Thinking |
548
- | `Alt+V` | Select / cycle the current window's published charts or SVGs |
549
- | `Alt+C` | Copy the selected chart / SVG |
550
- | `Alt+O` | Open the selected SVG |
551
- | `Ctrl+G` | Edit current input in `$VISUAL`/`$EDITOR` |
552
- | `Ctrl+V` | Paste image |
553
- | `Tab` | Autocomplete slash commands and file paths |
554
- | `@` | File completion |
555
- | `!` | Enter Shell mode |
556
- | `!!` | Enter Session-excluded Shell mode |
557
-
558
- Use `/help` inside the TUI for the current command and keybinding list. The table above shows the defaults; after customization, `/help` and `/keybindings` show the effective keys.
559
-
560
- ### Customizing keybindings
561
-
562
- Host shortcuts are semantic actions (`app.*`) resolved through a
563
- context-aware keymap — the UI (footer hints, `/help`, `/keybindings`)
564
- always shows the EFFECTIVE keys, so a remap updates every hint. Configure
565
- them through the in-TUI `/keybindings` panel (it writes the `keybindings`
566
- field of the `tui-app` plugin's profile-owned configuration — since DSH
567
- 0.1.7 TUI preferences live on the profile Config, not the retired
568
- `dsh-pi-tui` settings namespace); apply with `/keybindings reload`
569
- (explicit — a configuration edit takes effect after the reload, no
570
- restart). Field shape:
571
-
572
- ```yaml
573
- keybindings:
574
- app.input.steer: ctrl+s # one key
575
- app.permission.cycle: [shift+tab, ctrl+shift+p] # several keys
576
- app.history.search: ctrl+r
577
- app.transcript.toggleThinking: false # disable the action's keys
578
- leader: ctrl+x # M6: leader sequences
579
- bindings:
580
- app.tasks.open: <leader>t
581
- ```
582
-
583
- - A plain printable key can never be bound to a Host action (it would
584
- swallow typing); a bad entry is a warning, never a startup failure
585
- (fail-soft).
586
- - Any user declaration REPLACES the action's builtin default keys:
587
- `app.input.steer: ctrl+x` makes Ctrl+X steer and Ctrl+S stop steering;
588
- a leader-only `app.todo.toggle: <leader>t` makes Leader T the only
589
- toggle trigger (Ctrl+T stops); `['ctrl+z', '<leader>s']` keeps both
590
- USER triggers; `false` removes every trigger of the action. Leader
591
- completions that the effective editor-owned submit key would consume (for
592
- example, `<leader>enter`) are rejected instead of being advertised as dead
593
- sequences.
594
- - `DSH_PI_TUI_SAFE_KEYBINDINGS=1` ignores all user overrides (builtin
595
- defaults only). The whole `/keybindings` editor is read-only while safe mode
596
- is active, so it cannot save a configuration that is only checked after safe
597
- mode is disabled.
598
- - In the editor, untouched default bindings that are still effective are
599
- selectable. `Add shortcut` materializes those surviving defaults plus the new
600
- key; shadowed definition defaults remain reference-only, and replacing or
601
- removing one surviving default preserves its siblings. Once an action has a
602
- user declaration, that declaration still replaces the builtin set as
603
- described above.
604
- - `/help` remains the key-first, read-only help surface; `/keybindings` is the
605
- action-first, editable Keyboard Shortcuts Editor: it groups actions by
606
- category, searches action IDs/descriptions/current keys/default keys, and
607
- marks customized, conflict, Unbound, Disabled, and fixed states. A standalone Leader key row also configures the global leader key.
608
- - `/settings` has one `Keyboard shortcuts…` entry that opens the same-lease
609
- full-screen page and the same persistence controller as bare `/keybindings`
610
- (no 88-column overlay).
611
- - The recorder reads a real terminal key, parses it with `parseKey`, and stores
612
- the canonical `KeyId`; known dead, typing-swallowing, terminal-ambiguous, and
613
- conflicting shortcuts are rejected before saving. Ordinary recording cancels
614
- on `Esc`; the direct Host interrupt recorder uses a short double-press window:
615
- one `Esc` cancels and two `Esc` press events assign physical Escape. Key
616
- repeats/releases do not count, and there is no single-letter shortcut;
617
- physical Escape remains reserved for Host lifecycle paths.
618
- - Conditional affordances are labeled separately in the editor (for example,
619
- `Down (conditional)` for the empty-editor task browser) instead of appearing
620
- as ordinary configured shortcuts.
621
- - `/keybindings conflicts` lists conflicts (same key + overlapping scope + same
622
- priority — never silent last-write-wins); `/keybindings reload` re-reads the
623
- settings (fail-soft: a bad entry is diagnosed and skipped, a throwing read
624
- is an error notice — never a crash; the keymap keeps the last-known-good
625
- configuration); `/keybindings reset` clears the overrides through the
626
- settings service and rebuilds the running keymap immediately.
627
- - The subagent viewer blocks PARENT actions by action id, so a remapped
628
- parent shortcut stays blocked inside the viewer.
629
- - Conditional affordances are ADDITIVE: binding `app.tasks.open: ctrl+x`
630
- ADDS a trigger — the empty-editor `↓` task-browser affordance still
631
- works; only `false` removes every trigger of an action.
632
-
633
-
634
- ## Running from source
635
-
636
- ```sh
637
- git clone https://github.com/XMoon/dsh-pi-tui
638
- cd dsh-pi-tui
639
-
640
- pnpm install
641
- pnpm build
642
- ```
643
-
644
- Install using `file:`:
645
-
646
- ```sh
647
- dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@file:$PWD
648
- ```
649
-
650
- `file:` copies the current build output at install time. After changing source, rebuild and add the package again.
651
-
652
- For continuous development, use `link:`:
653
-
654
- ```sh
655
- dsh plugin --profile pi-tui-dev -- add @xmoon76/dsh-pi-tui@link:$PWD
656
- dsh --profile pi-tui-dev
657
- ```
658
-
659
- After that, rebuilding is enough:
660
-
661
- ```sh
662
- pnpm build
663
- ```
664
-
665
- The development profile continues to point at the working tree.
666
-
667
- ## DeepSeek Harness integration
668
-
669
- `dsh-pi-tui` implements the terminal interaction layer only.
670
-
671
- The following capabilities are provided by DeepSeek Harness:
672
-
673
- * Agent Loop
674
- * LLM / Provider
675
- * Session Persistence
676
- * Tools
677
- * Skills
678
- * Approval
679
- * Permission Presets
680
- * Plan Mode
681
- * Goal
682
- * Jobs
683
- * Subagents
684
- * Credentials
685
- * Settings
686
-
687
- The TUI therefore does not maintain a separate model configuration, Session format, or Agent Runtime.
688
-
689
- It can coexist with other DSH surfaces using the same runtime data:
690
-
691
- ```sh
692
- dsh --profile web
693
- dsh --profile headless
55
+ ~~~sh
56
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@alpha
57
+ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
694
58
  dsh --profile pi-tui
695
- ```
696
-
697
- ## Extension API
698
-
699
- In addition to being used as a TUI, `dsh-pi-tui` exposes versioned Extension APIs for other Cordis / DSH plugins that need to extend terminal interaction.
700
-
701
- Three public entries are currently available:
702
-
703
- | Entry | Use | Stability |
704
- | ----------------------------------------- | ------------------------------- | --------- |
705
- | `@xmoon76/dsh-pi-tui/extensions` | General extensions | Stable |
706
- | `@xmoon76/dsh-pi-tui/extensions/advanced` | Deeper interaction capabilities | Advanced |
707
- | `@xmoon76/dsh-pi-tui/extensions/unstable` | Low-level capabilities | Unstable |
708
-
709
- Extension points include:
710
-
711
- * Header / Footer
712
- * Input Widget
713
- * Slash Command
714
- * Theme
715
- * Setting
716
- * Autocomplete
717
- * Keybinding
718
- * Message Renderer
719
- * Tool Renderer
720
- * Overlay
721
- * Interactive UI
722
- * Editor Control
723
- * Replacement Editor
724
-
725
- Plugins depend only on public entries and do not need to import internal types such as `TuiApp` or `TuiMainScreen`.
726
-
727
- Minimal example:
59
+ ~~~
728
60
 
729
- ```ts
730
- import {
731
- PI_TUI_EXTENSIONS_SERVICE,
732
- type PiTuiExtensionService,
733
- } from '@xmoon76/dsh-pi-tui/extensions'
734
-
735
- export const name = 'my-plugin'
736
- export const inject = ['tuiStartup', PI_TUI_EXTENSIONS_SERVICE]
737
-
738
- export function apply(ctx: Context): void {
739
- const service = ctx.get(
740
- PI_TUI_EXTENSIONS_SERVICE,
741
- ) as PiTuiExtensionService
742
-
743
- if (!service.api().capabilities.has('slot.chrome.header.badge')) {
744
- return
745
- }
746
-
747
- service.register(
748
- 'chrome.header.badge',
749
- {
750
- id: 'my-badge',
751
- order: 100,
752
- },
753
- {
754
- text: 'my-plugin',
755
- tone: 'info',
756
- },
757
- )
758
- }
759
- ```
760
-
761
- Documentation:
762
-
763
- * [Extension API](docs/extensions/stable.md)
764
- * [Extension tiers](docs/extensions/tiers.md)
765
- * [Advanced API](docs/extensions/advanced.md)
766
- * [Unstable API](docs/extensions/unstable.md)
767
- * [Plugin authoring](docs/extensions/authoring.md)
768
-
769
- ## Development
770
-
771
- ```sh
772
- pnpm install
773
- pnpm build
774
- pnpm typecheck
775
- pnpm test
776
- ```
777
-
778
- The test suite covers the Pi TUI fork, host / surface behavior, and Extension API fixtures and smoke tests.
779
-
780
- Terminal rendering and input routing are tested extensively with `@xterm/headless`, so most UI tests do not require a real TTY or a live model connection.
781
-
782
- Performance baseline:
783
-
784
- ```sh
785
- node --expose-gc scripts/bench.mts
786
- ```
61
+ ## Features
787
62
 
788
- The project is also developed against a dedicated `pi-tui-dev` profile:
63
+ ### Two modes, one DSH Session authority
789
64
 
790
- ```sh
791
- dsh plugin --profile pi-tui-dev -- add @xmoon76/dsh-pi-tui@link:$PWD
792
- dsh --profile pi-tui-dev
793
- ```
65
+ | | Direct (default) | Daemon (opt-in from 0.5.8) |
66
+ |---|---|---|
67
+ | Launch | `dsh --profile pi-tui` | `DSH_PI_TUI_BACKEND=daemon dsh --profile pi-tui` |
68
+ | Process | TUI and Host in one process | Independent Host; TUI is a detachable Client |
69
+ | Frontends | Current in-process terminal surface | Multiple TUIs + official Web + optional local ACP on one Host/Session |
70
+ | Exit | Ends the Direct application | Normally detaches only the Client; does not stop Host |
71
+ | Service | No separate management | Optional Linux systemd --user / macOS LaunchAgent |
794
72
 
795
- ## DSH compatibility and validation
73
+ You can also save `Daemon` under `/settings → General → Backend` for the **next cold launch**. `DSH_PI_TUI_BACKEND` overrides that preference for one launch without saving it. Selecting a backend does not hot-migrate a Host. Installing an OS user service is optional, not a prerequisite. Sessions and Agents remain Host-owned.
796
74
 
797
- This section contains DSH compatibility and CI validation details only; ordinary users do not need them to install the TUI.
75
+ ### Agents, tasks and sessions
798
76
 
799
- ### npm mode (current `next`)
77
+ - **Agent and tools:** streamed Markdown, Thinking / Tool / Context disclosure, approvals and Questions, model/reasoning-effort selection, Plan, Goal and Todo.
78
+ - **Sessions and workspaces:** `/sessions`, `/new`, `/resume`, `/fork`, `/rewind`, `--session` and `--continue`; browse by workspace and preview before resuming.
79
+ - **Team / Subagent / Job:** toggle Root Agent Team in `/model`; `/tasks` displays Work/Team, nested Subagents and Jobs. Subagents are expanded by default; retained Job history is optionally disclosed.
80
+ - **Input and shell:** `@file` completion, image and file attachments, `Ctrl+V` image paste, `!` / `!!` Host Shell, external editor, customizable Footer.
81
+ - **Reading and search:** `/display` Full / Focus / Compact, Transcript View / Full search, folding, `Ctrl+R` prompt history. Current Session recall spans working-directory changes.
82
+ - **Settings and plugins:** Provider authorization/credentials, approvals, MCP management, Web Search/Fetch, Plugin Manager, dynamic Extension Settings and Client-local `./tui` plugin loading.
83
+ - **Images and delivery:** terminal-gated image/static SVG/charts, `/view-image`, `/deliverables`, `/export`; Kitty, SIXEL and supported iTerm2 paths.
84
+ - **Optional experimental renderer:** `DSH_PI_TUI_RENDERER=tsp` enables a subset of Tern TSP native Transcript/Work Hub interactions; it does not replace every PiTui Settings/Plugins surface.
800
85
 
801
- The current compatibility-train line is npm mode: it targets the published
802
- `dsh-v0.2.0-rc.2` family declared by this checkout's `package.json` and
803
- resolved by its lockfile (the runtime peer floor is also `>=0.2.0-rc.2`). The
804
- isolated npm driver installs that exact
805
- family from the public registry and exercises the TUI build/test/package path:
86
+ ### Useful commands and default keys
806
87
 
807
- ```sh
808
- pnpm compat:dsh:npm
809
- ```
88
+ | Command / key | Use |
89
+ |---|---|
90
+ | `/sessions` · `/resume` · `/new` | Find or start sessions |
91
+ | `/model` · `/tasks` · `/plan` · `/goal` | Models, jobs and Agent modes |
92
+ | `/settings` · `/plugins` · `/keybindings` | Configuration and extensions |
93
+ | `/display` · `/export` · `/deliverables` | Reading and exporting |
94
+ | `Ctrl+F` · `Ctrl+Shift+F` | Rendered-view / available Session-history search |
95
+ | `Ctrl+R` · `Ctrl+G` | Prompt history / external editor |
96
+ | `Ctrl+O` · `Alt+T` | Tool/Context and Thinking disclosure |
97
+ | `Ctrl+C` · `Ctrl+D` | Cancel while busy, or follow idle exit confirmation |
98
+ | `!` · `!!` | Host Shell with / without Session persistence |
810
99
 
811
- ### Source Mode (validation only)
100
+ These are default mappings and common entries; `/keybindings` shows the **effective** keys after customizations. Type `/` to search and select commands and available Skills; use `/skill <name> [args]` to invoke a Skill explicitly (including when a same-named command would otherwise win), while bare `/skill` only prints its usage. `/transcript` currently uses the official Direct Markdown export; `/export` creates a separate ZIP archive saved on the Client filesystem. `PI_IMAGE_PROTOCOL=none` disables pixel previews, not attachments.
812
101
 
813
- Source Mode is the validation-only distribution for an unpublished DSH
814
- checkout, available for local compatibility checks and explicit
815
- source-boundary work. It reads the full commit pin in
816
- `test/compat/dsh-source.json`, builds the official DSH tarball family, installs
817
- it through temporary pnpm overrides, and removes the temporary state afterward.
818
- Do not write DSH source paths, `file:` dependencies, or workspace symlinks into
819
- a published package.
102
+ ## Daemon quick start (Linux / macOS)
820
103
 
821
- The published package already contains the Pi TUI fork required at runtime. No separate internal TUI package needs to be installed.
104
+ A system service is not required to start a standalone Host. Try one launch:
822
105
 
823
- ### CI validation policy
106
+ ~~~sh
107
+ DSH_PI_TUI_BACKEND=daemon dsh --profile pi-tui
108
+ ~~~
824
109
 
825
- 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 independent of the selected mode and always targets the published ecosystem (every run resolves `pi2dsh@latest` and the highest published DSH intersection from the registry); it does not accept a source pack and refuses `--distribution` with a non-zero error rather than reporting a pass. See [`docs/guides/dsh-compatibility.md`](docs/guides/dsh-compatibility.md) for the compatibility method.
110
+ The usual Daemon TUI `/exit` / `/quit` **detaches the Client, not the Host**. When the current Session is working, the TUI offers explicit exit choices. Management commands operate only on the selected Profile:
826
111
 
827
- ## Repository layout
112
+ ~~~sh
113
+ dsh --profile pi-tui daemon status
114
+ dsh --profile pi-tui daemon logs --lines 200
115
+ dsh --profile pi-tui daemon start
116
+ dsh --profile pi-tui daemon stop
117
+ dsh --profile pi-tui daemon restart
118
+ dsh --profile pi-tui daemon install
119
+ dsh --profile pi-tui daemon uninstall
120
+ ~~~
828
121
 
829
- The repository root is the npm package published as `@xmoon76/dsh-pi-tui`.
122
+ `daemon install` only creates/verifies the optional Profile-scoped OS user service definition; it does **not** start, enable or migrate the Host. `daemon stop` and `restart` can interrupt in-flight Turns/Jobs across connected Clients. A manager reporting “running” is not proof of authenticated Host readiness.
830
123
 
831
- The Pi TUI fork lives under:
124
+ Within the **same DSH Runtime and Profile**, update the installed TUI bundle through official plugin management. The old Host may continue serving existing work; explicitly run `daemon restart` when you want its static code replaced (with an interruption). Same-Profile older service definitions do not require a routine uninstall first. **Changing DSH Runtime** is not a hot upgrade; stop, back up and cold start a supported pair. See the [Daemon guide](docs/guides/daemon.md).
832
125
 
833
- ```text
834
- packages/pi-tui/
835
- ```
126
+ ## Web, ACP and other clients share the Host Session
836
127
 
837
- It is an internal build dependency bundled with the root package and does not need to be installed separately by users.
128
+ The **official Web frontend** and optional local ACP listener use the same Daemon Host and its official Session/Agent authority. The Web frontend is default-off and can be enabled on a running Host:
838
129
 
839
- Upstream provenance, version information, and local divergence are tracked in:
130
+ ~~~sh
131
+ dsh --profile pi-tui web enable
132
+ dsh --profile pi-tui web url
133
+ dsh --profile pi-tui web status
134
+ ~~~
840
135
 
841
- ```text
842
- packages/pi-tui/package.json
843
- packages/pi-tui/AGENTS.md
844
- ```
136
+ Also available: `web disable` / `web open`. The commands do **not** start a Host or create a Session. The `web url` output contains an authentication token: handle it as a secret. The official Web page lets users select sessions held by that Host.
845
137
 
846
- Contributor-oriented repository structure and development rules are documented in [AGENTS.md](AGENTS.md).
138
+ **ACP v1** is a default-off, same-user local Unix-socket interface. `/acp` in a Daemon TUI inspects/toggles the live listener; `/settings → General → Start ACP automatically` controls the next cold Host start. Headless clients can discover a positively verified `acp` status/socket via `daemon status`. ACP supports a bounded `initialize` / `session/new|resume|prompt|cancel|close` subset plus negotiated image input; it does not implement `session/list`, `session/load` or MCP Server configuration over ACP. One ACP connection has at most one Session View and each Session at most one ACP View, with no such restriction on TUI Views. An executable [ACP SDK example and connection procedure](docs/guides/daemon.md#local-acp-v1-sdk-client-example) is in the Daemon guide.
847
139
 
848
- ## Documentation
140
+ When launched inside [Herdr](https://github.com/herdrdev/herdr), the TUI can report Agent status and provide Profile-pinned recovery commands for durable Sessions where the Herdr Client supports them.
849
141
 
850
- | Document | Content |
851
- | ------------------------------------------------------ | --------------------------------- |
852
- | [docs/README.md](docs/README.md) | Documentation policy and index |
853
- | [docs/architecture/overview.md](docs/architecture/overview.md) | Architecture, layers and dependency direction |
854
- | [docs/architecture/host-client.md](docs/architecture/host-client.md) | Host/Client boundary and currentness contracts |
855
- | [docs/architecture/surface-behavior.md](docs/architecture/surface-behavior.md) | Workspace/task/plugin surface behavior |
856
- | [docs/guides/development.md](docs/guides/development.md) | Local development, worktrees and benchmark reruns |
857
- | [docs/extensions/stable.md](docs/extensions/stable.md) | Extension API |
858
- | [docs/guides/code-review.md](docs/guides/code-review.md) | Repository review checkpoints |
859
- | [AGENTS.md](AGENTS.md) | Contributor operating manual |
142
+ ## Settings, extensions and development
860
143
 
861
- ## Changelog
144
+ `/settings` is the shared fullscreen Settings workspace; `/plugins`, `/footer` and `/keybindings` open its relevant pages. `/keybindings conflicts` opens the same Keyboard shortcuts page directly in its Conflicts view; when the settings document cannot be read or that page cannot open, the command returns an error carrying the current conflict diagnostics. Host configuration writes use official authoritative readback; a package enabled in the Host is not necessarily an ACTIVE `./tui` extension in the current Client.
862
145
 
863
- 简体中文:
146
+ Public extensions have **Stable / Advanced / Unstable** tiers: see the [authoring guide](docs/extensions/authoring.md), [Stable API](docs/extensions/stable.md) and [tier contract](docs/extensions/tiers.md). Version 0.5.8 adds Client-local `./tui` loading and per-package persisted settings, but **does not deliver Forge or a Plugin Marketplace**.
864
147
 
865
- [CHANGELOG.md](CHANGELOG.md)
148
+ For development:
866
149
 
867
- English:
150
+ ~~~sh
151
+ mise install --locked
152
+ mise run setup
153
+ mise run build
154
+ mise run typecheck
155
+ ~~~
868
156
 
869
- [CHANGELOG.en.md](CHANGELOG.en.md)
157
+ Read [AGENTS.md](AGENTS.md), the [development guide](docs/guides/development.md) and [documentation index](docs/README.md). The [release checklist](docs/guides/releasing.md) owns full release verification.
870
158
 
871
- ## License
159
+ ## Changelog and license
872
160
 
873
- [MIT](LICENSE)
161
+ - [中文 CHANGELOG](CHANGELOG.md) / [English CHANGELOG](CHANGELOG.en.md)
162
+ - [MIT License](LICENSE)