@askdkc/dsh-cli 0.11.3 → 0.11.5

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 (37) hide show
  1. package/README.md +77 -81
  2. package/bin/dsh-tui.js +88 -88
  3. package/cordis.patch.yml +9 -9
  4. package/cordis.yml +8 -8
  5. package/lib/types/adapter/standard/descriptor.js +2 -2
  6. package/lib/types/components/LogoV2.d.ts +1 -1
  7. package/lib/types/components/LogoV2.js +2 -2
  8. package/lib/types/components/ModelPicker.d.ts +6 -0
  9. package/lib/types/components/ModelPicker.d.ts.map +1 -1
  10. package/lib/types/components/ModelPicker.js +9 -6
  11. package/lib/types/dsh-adapter/cli-registration.d.ts +17 -0
  12. package/lib/types/dsh-adapter/cli-registration.d.ts.map +1 -0
  13. package/lib/types/dsh-adapter/cli-registration.js +157 -0
  14. package/lib/types/dsh-adapter/invariant.js +1 -1
  15. package/lib/types/dsh-adapter/migrate/cli.js +9 -9
  16. package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -1
  17. package/lib/types/dsh-adapter/packaged-presets.js +3 -2
  18. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  19. package/lib/types/dsh-adapter/plugin.js +16 -0
  20. package/lib/types/i18n.d.ts +20 -4
  21. package/lib/types/i18n.d.ts.map +1 -1
  22. package/lib/types/i18n.js +5 -1
  23. package/lib/types/modelGroups.d.ts +2 -0
  24. package/lib/types/modelGroups.d.ts.map +1 -1
  25. package/lib/types/modelGroups.js +11 -0
  26. package/lib/types/screens/Chat.d.ts.map +1 -1
  27. package/lib/types/screens/Chat.js +147 -39
  28. package/lib/types/screens/chatOverlay.d.ts +6 -0
  29. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  30. package/lib/types/screens/chatOverlay.js +4 -0
  31. package/lib/types/screens/modelSearchInput.d.ts +4 -0
  32. package/lib/types/screens/modelSearchInput.d.ts.map +1 -0
  33. package/lib/types/screens/modelSearchInput.js +19 -0
  34. package/lib/types/update.d.ts +2 -2
  35. package/lib/types/update.d.ts.map +1 -1
  36. package/lib/types/update.js +33 -32
  37. package/package.json +5 -4
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/assets/readme/logo-en.svg" alt="dsh-TUI animated whale logo" width="560">
2
+ <img src="docs/assets/readme/logo-en.svg" alt="dsh-cli animated whale logo" width="560">
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -7,15 +7,13 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- <a href="https://www.npmjs.com/package/dsh-cli"><img alt="npm" src="https://img.shields.io/npm/v/dsh-cli?style=flat-square&color=4b6fff"></a>
11
- <a href="https://github.com/askdkc/dsh-TUI-fork/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/askdkc/dsh-TUI-fork/actions/workflows/ci.yml/badge.svg"></a>
10
+ <a href="https://github.com/askdkc/dsh-cli/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/askdkc/dsh-cli/actions/workflows/ci.yml/badge.svg"></a>
12
11
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-263146?style=flat-square"></a>
13
12
  <img alt="Public beta" src="https://img.shields.io/badge/status-public%20beta-7da1de?style=flat-square">
14
- <a href="https://github.com/askdkc/dsh-TUI-fork/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/askdkc/dsh-TUI-fork?style=flat-square&color=4b6fff"></a>
15
- <a href="https://www.npmjs.com/package/dsh-cli"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-cli?style=flat-square&color=4b6fff"></a>
13
+ <a href="https://github.com/askdkc/dsh-cli/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/askdkc/dsh-cli?style=flat-square&color=4b6fff"></a>
16
14
  </p>
17
15
 
18
- # dsh-TUI
16
+ # dsh-cli
19
17
 
20
18
  > An interactive terminal UI plugin for DeepSeek Harness. It ships a
21
19
  > pixel-whale header, live work status, streaming thinking, double-Esc time
@@ -45,13 +43,13 @@ Keys and commands: [Interaction and commands](docs/interaction.en.md). Everythin
45
43
  <div align="center">
46
44
  <picture>
47
45
  <source media="(max-width: 640px)" srcset="docs/assets/readme/preview-en-mobile.svg">
48
- <img src="docs/assets/readme/preview-en.svg" alt="Recorded dsh-TUI session: welcome, completion, help and typing, with animated pixel whale." width="78%">
46
+ <img src="docs/assets/readme/preview-en.svg" alt="Recorded dsh-cli session: welcome, completion, help and typing, with animated pixel whale." width="78%">
49
47
  </picture>
50
48
  </div>
51
49
 
52
50
  ## Featured & Listed
53
51
 
54
- Featured by the **DeepSeek Harness official WeChat account**, listed in the
52
+ The upstream dsh-TUI project was featured by the **DeepSeek Harness official WeChat account** and listed in the
55
53
  [dshfind](https://dshfind.com/en/plugins/ccch1mneyyy/dsh-TUI) plugin
56
54
  directory, and ranked **#7 on [GitHub Trending](https://trendshift.io/repositories/146168)
57
55
  daily** (TypeScript).
@@ -60,12 +58,12 @@ daily** (TypeScript).
60
58
  <table>
61
59
  <tr>
62
60
  <td align="center" valign="middle" width="50%">
63
- <img src="screenshots/wechat-official.png" alt="dsh-TUI featured by the DeepSeek Harness official WeChat account" width="480">
61
+ <img src="screenshots/wechat-official.png" alt="Upstream dsh-TUI featured by the DeepSeek Harness official WeChat account" width="480">
64
62
  <br>
65
63
  <strong>Featured by the official WeChat account</strong>
66
64
  </td>
67
65
  <td align="center" valign="middle" width="50%">
68
- <a href="https://dshfind.com/en/plugins/ccch1mneyyy/dsh-TUI"><img src="https://dshfind.com/api/card/ccch1mneyyy/dsh-TUI?lang=en" alt="dsh-TUI on dshfind" width="420"></a>
66
+ <a href="https://dshfind.com/en/plugins/ccch1mneyyy/dsh-TUI"><img src="https://dshfind.com/api/card/ccch1mneyyy/dsh-TUI?lang=en" alt="Upstream dsh-TUI on dshfind" width="420"></a>
69
67
  <br>
70
68
  <strong>Listed in the dshfind directory</strong>
71
69
  <br><br>
@@ -92,65 +90,76 @@ IDs. It requires matching profile dependencies with `@deepseek-ai/schemastery`
92
90
  3.18.3 or newer; an incompatible schema stops TUI startup with repair guidance
93
91
  instead of showing an uneditable settings page. Older hosts keep their legacy settings scope.
94
92
 
95
- ```sh
96
- # Install the CLI and this plugin globally (ships the dsh-tui command)
97
- npm install -g @deepseek-ai/dsh dsh-cli
93
+ Install this fork from source into the `dsh-cli` profile. Use Node
94
+ `^22.19 || >=24` and pnpm 11. The final two commands run in a DeepSeek
95
+ Harness source checkout whose dependencies are already installed:
98
96
 
99
- # Start (first run auto-initializes the profile; needs pnpm)
100
- dsh-tui
101
- # Both `dsh-tui` and the short `dst` alias start the same TUI.
102
- dst
103
- ```
97
+ ```sh
98
+ git clone --recurse-submodules https://github.com/askdkc/dsh-cli.git
99
+ cd dsh-cli
100
+ pnpm install --frozen-lockfile
101
+ TMPDIR=/tmp pnpm build
104
102
 
105
- Manual alternative: `dsh plugin --profile dsh-tui add dsh-cli`.
106
- The repo's `sh install.sh` runs that step and checks the required commands.
107
- Afterwards `dsh-tui` and `dsh --profile dsh-tui` are equivalent.
103
+ node scripts/with-publish-manifest.mjs npm pack --ignore-scripts
104
+ TARBALL="$PWD/askdkc-dsh-cli-$(node -p "require('./package.json').version").tgz"
108
105
 
109
- > **New-user note**: pnpm ≥11 blocks dependencies with install scripts by
110
- > default and reports `ERR_PNPM_IGNORED_BUILDS`. Updates skip foreign-platform
111
- > `@img/sharp-*` native packages, saving about 200MB of downloads. `/update`
112
- > and `dsh-tui update` write both settings automatically. No manual step
113
- > needed. Details:
114
- > [Getting started](docs/getting-started.en.md#pnpm-install-script-blocks-and-foreign-platform-natives).
106
+ cd ~/DIR/TO/deepseek-harness
107
+ pnpm dsh plugin --profile dsh-cli add "$TARBALL"
108
+ pnpm dsh --profile dsh-cli
109
+ ```
115
110
 
116
- After startup the TUI checks for newer versions in the background. It never
117
- blocks the first frame. Type `/update` for a one-shot upgrade. It restarts
118
- automatically and resumes the current session. See
119
- [Getting started](docs/getting-started.en.md) for the profile lifecycle,
120
- source builds, and troubleshooting, including migration from the former
121
- `dsh-cc-tui` package.
111
+ Replace `~/DIR/TO/deepseek-harness` with your checkout path. The tarball name
112
+ comes from the package's current name, `@askdkc/dsh-cli`, and version. The
113
+ first interactive `dsh --profile dsh-cli` launch registers `dsh-cli` in
114
+ `~/.local/bin` (Windows: `%LOCALAPPDATA%\dsh-cli\bin`) and adds that directory
115
+ to the user's PATH when needed. Open a new shell before using the command.
116
+ Registration supports zsh, bash, fish and Windows; an existing unrelated
117
+ `dsh-cli` command is left alone. Set `DSH_TUI_AUTO_REGISTER_CLI=0` to disable
118
+ it. The managed PATH block goes in `${ZDOTDIR:-$HOME}/.zshrc` for zsh;
119
+ `.bashrc` and the active login file for bash; or
120
+ `${XDG_CONFIG_HOME:-$HOME/.config}/fish/conf.d/dsh-cli.fish` for fish. To undo
121
+ it, remove the managed command and that block; delete the fish file only if
122
+ it contains nothing else (Windows: remove the command and user PATH entry). The
123
+ existing `dsh-tui` and `dst` commands remain compatibility aliases.
124
+ A locally packed fork should be updated by rebuilding and reinstalling the
125
+ archive, rather than by using the registry-backed `/update` command.
126
+
127
+ pnpm ≥11 may report `ERR_PNPM_IGNORED_BUILDS` for dependencies with install
128
+ scripts. See [Getting started](docs/getting-started.en.md#pnpm-install-script-blocks-and-foreign-platform-natives)
129
+ for the native build settings. The built-in `/update` and `dsh-cli update`
130
+ commands use the registry, so use the tarball procedure above to update this fork.
122
131
 
123
132
  ### CLI
124
133
 
125
134
  | Command | Purpose |
126
135
  | --- | --- |
127
- | `dsh-tui` / `dst` | Start the TUI; `dst` is a short alias for the same program |
128
- | `dsh-tui --resume [id]` · `dsh-tui update` · `dsh-tui doctor` | Resume a session · update the profile and align the launcher · pre-flight environment checks |
129
- | `dsh-tui safe` | Read-only diagnostics, plugin inventory and repair guidance; `safe --rescue` builds a clean rescue profile |
130
- | `dsh-tui version` · `dsh-tui help` | Launcher and profile versions and usage; both work even without a `dsh` install |
136
+ | `dsh-cli` / `dst` | Start the TUI; `dst` is a short alias for the same program |
137
+ | `dsh-cli --resume [id]` · `dsh-cli update` · `dsh-cli doctor` | Resume a session · registry update · pre-flight environment checks |
138
+ | `dsh-cli safe` | Read-only diagnostics, plugin inventory and repair guidance; `safe --rescue` builds a clean rescue profile |
139
+ | `dsh-cli version` · `dsh-cli help` | Launcher and profile versions and usage; both work even without a `dsh` install |
131
140
 
132
- Other arguments go to `dsh --profile dsh-tui`. Safe mode: [Getting started](docs/getting-started.en.md).
141
+ Other arguments go to `dsh --profile dsh-cli`. Safe mode: [Getting started](docs/getting-started.en.md).
133
142
 
134
- ### Importing conversations from other agents (`dsh-tui migrate`)
143
+ ### Importing conversations from other agents (`dsh-cli migrate`)
135
144
 
136
145
  Bring Claude Code, Codex, OMP, zcode, or Grok Build conversation histories into the DSH session store, then browse and resume them by their original working directory via `/resume`:
137
146
 
138
147
  ```sh
139
- dsh-tui migrate # list importable counts per agent (writes nothing)
140
- dsh-tui migrate claude-code # import every Claude Code conversation (likewise codex / omp / zcode / grok-build)
141
- dsh-tui migrate codex --dry-run # preview what would land, write nothing
148
+ dsh-cli migrate # list importable counts per agent (writes nothing)
149
+ dsh-cli migrate claude-code # import every Claude Code conversation (likewise codex / omp / zcode / grok-build)
150
+ dsh-cli migrate codex --dry-run # preview what would land, write nothing
142
151
  ```
143
152
 
144
153
  - **Read-only source**: migration only reads the foreign agent's local store; artifacts are written through the official `JsonlSessionPersistence` backend, so imported sessions are first-class (openable, continuable).
145
154
  - **Idempotent**: one deterministic UUID per source conversation — re-importing skips what is already present instead of stacking duplicates.
146
155
  - **Structure preserved**: user/assistant messages and reasoning traces are rebuilt turn by turn; tool traffic is not migrated (source formats cannot replay it faithfully — the contract is "re-read the conversation", not "resume the task").
147
156
  In-TUI: `/migrate` (optionally `/migrate <agent> [--dry-run]`) runs the same import in a child process and reports through the notification flow.
148
- CLI alternative: `dsh-tui migrate ...` from any shell runs the same import.
157
+ CLI alternative: `dsh-cli migrate ...` from any shell runs the same import.
149
158
  Full guide: [Session migration](docs/migrate.en.md).
150
159
 
151
160
  - More agents (pi, opencode, …) extend the adapter registry as adapters land; grok-build reads `GROK_HOME` when set.
152
161
 
153
- **VS Code**: use the integrated terminal or the `dsh-tui-vscode` extension. See [VS Code guide](docs/vscode.en.md). **Herdr**: run `dsh-tui` in a [Herdr](https://herdr.dev) pane; `idle` / `working` / `blocked` are reported through its local integration API.
162
+ **VS Code**: use the integrated terminal or the `dsh-tui-vscode` extension. See [VS Code guide](docs/vscode.en.md). **Herdr**: run `dsh-cli` in a [Herdr](https://herdr.dev) pane; `idle` / `working` / `blocked` are reported through its local integration API.
154
163
 
155
164
  ## Keybindings & Mouse
156
165
 
@@ -179,7 +188,7 @@ Agent presets, themes, MCP servers, environment variables: [Configuration](docs/
179
188
  ## How It Works
180
189
 
181
190
  ```text
182
- dsh profile → dsh-base → dsh-TUI Cordis patch → agent preset + DSH services
191
+ dsh profile → dsh-base → dsh-cli Cordis patch → agent preset + DSH services
183
192
  → session/event → Channel projection → React components → Ink/Yoga renderer → terminal
184
193
  ```
185
194
 
@@ -190,7 +199,10 @@ Runtime path, module boundaries, performance notes and persistence locations: [A
190
199
  ## Known Limitations
191
200
 
192
201
  - Injected plugin context has no standalone display; it counts into the context segments.
193
- - `/model` switches by forking the session; the old session stays in `/resume`.
202
+ - `/model` filters by space-separated, case-insensitive keywords in any order.
203
+ At the provider level it searches every model; inside a provider or Recents
204
+ it searches that list. Names and IDs of models and providers are matched.
205
+ Switching forks the session; the old session stays in `/resume`.
194
206
  - `Ctrl+V` needs platform clipboard tools; unsupported bitmap formats are rejected.
195
207
  - A background session lives inside this process and stops when the TUI exits.
196
208
  - `/thinking` is not persisted; `/compact` is unavailable under the `minimal` preset; `/update` needs a `dsh --profile` launch and is refused while a turn is running.
@@ -204,45 +216,32 @@ Run these commands from a checkout with its submodules initialized (use
204
216
  `git submodule update --init --recursive` if either `vendor/dsh-std` or
205
217
  `dsh-auth` is empty):
206
218
 
219
+ The [Quick Start](#quick-start) includes the complete clone, build, pack,
220
+ and installation commands. Before packing, run the focused checks if you
221
+ changed the source:
222
+
207
223
  ```sh
208
- cd ~/DIR/TO/dsh-TUI
209
- pnpm install --frozen-lockfile
210
- TMPDIR=/tmp pnpm build
224
+ cd ~/DIR/TO/dsh-cli
211
225
  pnpm smoke
212
226
  pnpm verify:package
213
-
214
- node scripts/with-publish-manifest.mjs \
215
- npm pack \
216
- --ignore-scripts
217
-
218
- TARBALL="$PWD/dsh-cli-$(node -p "require('./package.json').version").tgz"
219
- cd ~/DIR/TO/deepseek-harness
220
- pnpm dsh plugin --profile dsh-tui add "$TARBALL"
221
227
  ```
222
228
 
223
- The final command assumes the DeepSeek Harness source checkout has its
224
- dependencies installed. `npm pack` prints the tarball name; `TARBALL` points
225
- to that versioned file in the dsh-TUI checkout. The wrapper temporarily
226
- converts local bundled dependencies into a publishable manifest and restores
227
- the source manifest afterwards. This installs the local archive into the
228
- `dsh-tui` profile; it does not publish it to npm.
229
-
230
- `lib/types/` is ignored generated output. `pnpm build` recompiles it from a
231
- clean output directory and runs the build gates. **Git URL installs are not
232
- supported.** The source manifest keeps `@dsh-std/*` as workspace deps and
233
- `vendor/dsh-std` as a submodule. pnpm ≥11 also refuses git-hosted `prepare`
234
- scripts by default. Install the registry package instead:
235
- `dsh plugin --profile dsh-tui add dsh-cli` for a published
236
- release, or use the local tarball procedure above. Rendering,
237
- questionnaire, or tool-card changes also need the matching regression scripts.
229
+ `npm pack` prints the archive name. `with-publish-manifest.mjs` temporarily
230
+ turns local bundled dependencies into a publishable manifest and restores the
231
+ source manifest afterwards. The archive installs into the `dsh-cli` profile;
232
+ it is not published to npm. If a submodule is missing in an existing checkout,
233
+ run `git submodule update --init --recursive` before installing dependencies.
234
+
235
+ **Git URL package installs are unsupported.** The source manifest contains
236
+ workspace and local links that require this build and pack step.
238
237
 
239
238
  ### Bump the version
240
239
 
241
- Set a new SemVer in the dsh-TUI checkout before building the archive. For
240
+ Set a new SemVer in the dsh-cli checkout before building the archive. For
242
241
  example, replace `0.11.3` below with the intended version:
243
242
 
244
243
  ```sh
245
- cd ~/DIR/TO/dsh-TUI
244
+ cd ~/DIR/TO/dsh-cli
246
245
  npm pkg set version=0.11.3
247
246
  pnpm install --lockfile-only --ignore-scripts
248
247
  git diff -- package.json pnpm-lock.yaml
@@ -253,7 +252,7 @@ lockfile too, then record its new submodule commit in this repository before
253
252
  creating a release. A clean checkout otherwise builds the old submodule
254
253
  revision. Rebuild and pack with the commands above; verify the archive name
255
254
  matches `package.json`. Publishing is separate: the release workflow runs only
256
- for a pushed `vX.Y.Z` tag that exactly matches the dsh-TUI package version.
255
+ for a pushed `vX.Y.Z` tag that exactly matches the dsh-cli package version.
257
256
 
258
257
  ## Plugin Ecosystem
259
258
 
@@ -283,9 +282,9 @@ Everything, bilingual: [docs/README.md](docs/README.md).
283
282
  [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.en.md) before taking
284
283
  part.
285
284
 
286
- | WeChat group (dsh-TUI community 4) | QQ group (ID 572549239) |
285
+ | WeChat group (dsh-cli community 4) | QQ group (ID 572549239) |
287
286
  | :---: | :---: |
288
- | <img src="screenshots/wechat-group.jpg" alt="dsh-TUI community WeChat group 4 QR code" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI community QQ group QR code" width="200"> |
287
+ | <img src="screenshots/wechat-group.jpg" alt="dsh-cli community WeChat group 4 QR code" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-cli community QQ group QR code" width="200"> |
289
288
 
290
289
  > The WeChat QR code expires roughly every 7 days; if it stops working, use
291
290
  > the QQ group (572549239) or open an issue to nudge us for a refresh.
@@ -294,7 +293,7 @@ Everything, bilingual: [docs/README.md](docs/README.md).
294
293
 
295
294
  > **Windows security warning:** the Windows profile defaults to `danger-full-access` with approval set to `never`, so tools have unrestricted access. Inspect and tighten the profile before starting next to sensitive credentials or in an untrusted repository.
296
295
 
297
- No sandbox of its own: dsh-TUI uses the active DSH profile's filesystem, shell, sandbox and approval policies. Permission presets come from the DSH `permissionPresets` registry.
296
+ No sandbox of its own: dsh-cli uses the active DSH profile's filesystem, shell, sandbox and approval policies. Permission presets come from the DSH `permissionPresets` registry.
298
297
 
299
298
  Details: [Permissions and security boundary](docs/architecture.en.md#permissions-and-security-boundary).
300
299
 
@@ -312,9 +311,6 @@ Details: [Permissions and security boundary](docs/architecture.en.md#permissions
312
311
  Community, related projects, and companion tools built by friends:
313
312
  [see the links page](docs/links.md)
314
313
 
315
- ## Stars
316
-
317
- [![Star History](https://raw.githubusercontent.com/ccch1mneyyy/dsh-TUI/bot-star-history/assets/star-history/star-history.png)](https://star-history.com/#ccch1mneyyy/dsh-TUI&Date)
318
314
 
319
315
  ## License
320
316