@crazyhappyone/dsh-tui 0.1.0-alpha.5 → 0.1.0-alpha.51
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/CHANGELOG.md +85 -0
- package/README.i18n.yaml +2 -2
- package/README.md +139 -20
- package/README.zh.md +137 -19
- package/assets/screenshots/dsh-tui-hello.png +0 -0
- package/assets/screenshots/dsh-tui-settings.png +0 -0
- package/bin/dsh-tui.js +18 -3
- package/cordis.patch.yml +116 -22
- package/dist/index.js +70260 -47119
- package/dist/schedule.js +36041 -0
- package/dist/settings.js +961 -0
- package/dist/startup.js +16 -11
- package/dist/zen-proxy.js +1048 -0
- package/package.json +82 -8
- package/presets/base-disable.patch.yml +82 -0
- package/presets/cordis.patch.yml +136 -0
- package/presets/minimal.patch.yml +78 -0
- package/presets/ptc.patch.yml +134 -0
- package/presets/registry.patch.yml +12 -0
- package/presets/standard.patch.yml +128 -0
- package/src/launcher.js +209 -75
- package/assets/screenshots/dsh-tui-home.png +0 -0
- package/tui/README.md +0 -126
- package/tui/README.zh.md +0 -126
- package/tui/cordis.patch.yml +0 -73
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0-alpha.51 — 2026-10-21
|
|
4
|
+
|
|
5
|
+
Prerelease for DSH `0.2.1-rc.2`; npm channel: `next`.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Streamed transcript cells now have one physical painter. Ink reserves the slot and paints chrome; sparse incremental frames, pane transitions and resize restore or release that slot without retaining old prose in blank rows. HUD and input-height changes clear the old transcript area and paint the new layout in the same synchronized frame, preventing text from leaking below the transcript during unattended streaming.
|
|
10
|
+
- Mouse wheel and touchpad reports land at their target without row-by-row catch-up. Reports received before a React commit retain their combined movement, and scrolling no longer rerenders the parent loop for every report. Scroll latency is measured through the matching stdout callback.
|
|
11
|
+
- Render-store budgets use incremental row/byte totals and resident LRU order instead of repeatedly scanning all historical lines. Markdown settlement uses a source index to avoid repeatedly searching the full history.
|
|
12
|
+
- `/settings` now browses category → namespace → provider/object → model/array → fields. Search, back navigation and successful edits retain location/selection; nested edits preserve unknown user fields through the official settings service. Narrow layouts reserve space for values and actions.
|
|
13
|
+
- [#14](https://github.com/zhangyang-crazy-one/dsh-tui/issues/14): discard transient text from failed `assistant/attempt` streams, keeping live history consistent with durable replay. Successful retries and officially committed interrupted messages remain visible.
|
|
14
|
+
- [#15](https://github.com/zhangyang-crazy-one/dsh-tui/issues/15): restore SSH port-forward instructions when reopening an in-progress DeepSeek login. Automatic browser opening now checks the actual SSH environment; explicit `o` still opens the link.
|
|
15
|
+
- [#16](https://github.com/zhangyang-crazy-one/dsh-tui/issues/16): resolve file-panel relative paths against the current Session directory after `/cd`, with configured-cwd/filesystem fallback. Absolute paths and the previous root on failure retain their behavior.
|
|
16
|
+
|
|
17
|
+
### Verification and upgrade
|
|
18
|
+
|
|
19
|
+
- Passed 2,299 TUI tests across 173 files with two workers, 46 launcher tests, four strict TypeScript projects, five bundle builds/import checks and the npm package-content check.
|
|
20
|
+
- Production rendering in an OS PTY with synthetic services produced 2,928 completed frames. Of these, 2,812 had transcript snapshots for comparison: 77,558 physical rows, zero mismatches and zero transcript leaks into the input/HUD area. Initialization/layout transitions without snapshots were not counted as comparison passes.
|
|
21
|
+
- In the recorded 120×40 PTY fixture, a nine-line wheel burst reached its target in 17.93 ms instead of 168.07 ms. At 60 Hz, React commits fell from 175 to 60 and output from 804,570 to 307,651 bytes. These measurements depend on the fixture and machine; they do not measure physical touchpad or display latency. See the [verification report](docs/performance-audit-2026-10-21/fix-verification.md).
|
|
22
|
+
- Upgrade with `npm install --global @crazyhappyone/dsh-tui@next`, then relaunch. Source-linked installations can use `/reload` after the new bundle is available. The official `deepseek-tui` profile and settings/credential services remain authoritative; no configuration migration is required.
|
|
23
|
+
- Live model authentication and physical-device rendering were not part of this offline/PTY verification. Full TUI tests used two workers after timing-sensitive failures under high concurrency; assertions were not relaxed.
|
|
24
|
+
|
|
25
|
+
### 中文变更说明
|
|
26
|
+
|
|
27
|
+
- 修复无操作流式输出的重复正文、空白行残影及终端光标定位;聊天内容统一由物理帧绘制。切换面板、调整尺寸及 HUD/输入区高度变化时,在同步帧中清理旧正文区域,防止正文穿插到下方。
|
|
28
|
+
- 修复滚轮/触控板逐行追赶和同批输入只保留最后一次的问题;滚动直接进入视口,延迟统计到对应 stdout 写入回调为止。
|
|
29
|
+
- 历史渲染缓存改用增量行数/字节统计和驻留 LRU,移除预算检查中的反复全量扫描。
|
|
30
|
+
- 设置改为分类、namespace、Provider/对象、model/数组、字段的逐级浏览;支持搜索、返回和保存后停留。继续使用官方配置接口,保留未知字段,窄屏为值和操作预留空间。
|
|
31
|
+
- 修复失败流式片段残留为普通消息,保证实时历史与持久化回放一致;保留成功重试和官方已提交的中断消息。
|
|
32
|
+
- 修复 SSH 登录页关闭重开后丢失转发命令、错误自动打开远端浏览器;显式按 `o` 仍可打开链接。
|
|
33
|
+
- 修复 `/cd` 后文件面板相对路径仍使用启动目录;改用当前会话目录,保留绝对路径及失败时原目录。
|
|
34
|
+
- 验证:2,299 项 TUI 测试、46 项 launcher 测试、4 个严格类型检查项目及构建/打包通过;2,812 个有快照的 PTY 比较帧覆盖 77,558 行,正文不一致与越界均为 0。完整 TUI 测试限制为 2 个 worker,未放宽断言;不将 PTY 合成数据视为在线认证或真实设备验收。
|
|
35
|
+
- 升级:`npm install --global @crazyhappyone/dsh-tui@next` 后重新启动;源码链接安装可在新 bundle 就绪后 `/reload`。继续使用官方 profile 与配置服务,无需迁移配置。
|
|
36
|
+
|
|
37
|
+
[Full comparison](https://github.com/zhangyang-crazy-one/dsh-tui/compare/v0.1.0-alpha.50...v0.1.0-alpha.51)
|
|
38
|
+
|
|
39
|
+
## 0.1.0-alpha.50 — 2026-10-21
|
|
40
|
+
|
|
41
|
+
Prerelease for DSH `0.2.1-rc.2`; npm channel: `next`. The changes below include the unreleased work since `0.1.0-alpha.49`.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **Shared official model configuration:** lightweight and source launch modes now both default to `deepseek-tui`. `--profile NAME` / `--profile=NAME` controls both bundle installation and boot; duplicate or missing profile arguments fail before installation. Previously, installing the official `dsh` executable could silently switch lightweight mode to the empty `tui` profile and hide providers configured by Magpie in `deepseek-tui`.
|
|
46
|
+
- `/model` continues to read DSH's `ctx.llm` registry and persists selections through `agentDefaultModel`. No parallel configuration reader, cross-profile copy, or provider credentials are added. Large catalogs now use the actual terminal height, keeping the heading, selected row, filter and navigation visible.
|
|
47
|
+
- Backend-started turns, including Goal continuation and scheduled wakeups, enter the running interaction state. Ctrl+C cancels the active turn. The Goal footer distinguishes durable `active` state from armed/disarmed continuation and explains `/goal resume`.
|
|
48
|
+
- Mouse selection preserves Chinese text, margins and copy order without repainting the entire screen. Repeated coordinates produce no extra output; a clipboard helper closing stdin no longer crashes the TUI with EPIPE.
|
|
49
|
+
- Approval, question and plan-review content uses physical row budgets so decisions stay visible. Custom answers, batch/multiple selections, pasted text, cancellation and chat drafts retain their separate ownership.
|
|
50
|
+
- Credential editors and secret `/key`/`/login` arguments are masked, including caret movement and selection; secret selections cannot be copied.
|
|
51
|
+
- Plugin-market registry selection is preserved through both inspection and installation, and cleared when switching to an official catalog target.
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- `/timeline` event/tool/usage/timing details and full JSON; `/todos` complete task browsing; `/deliveries`, `/attachments` and `/review` for delivered files, typed references and exact per-file diffs.
|
|
56
|
+
- Official time context, `present`, and persistent schedule tools; `/schedules` lists, inspects, opens the owning Session and confirms cancellation. Pending reminders recover on restart; a closed process runs no timers.
|
|
57
|
+
- Subagent live output, continuation (`c`, queue or steer), Stop requests (`s`) and wide-terminal side-by-side viewing (`v`), preserving the main Session and draft.
|
|
58
|
+
- Light/dark themes across truecolor/256/16/plain terminals, grouped settings, `/keys`, conflict-checked composer `/bind` and `/unbind`, grapheme input selection and plain-stream screen-reader mode.
|
|
59
|
+
- File-tree coalesced automatic watching, manual refresh, preserved selection, recoverable errors and watcher disposal.
|
|
60
|
+
- `/preset` with isolated standard/PTC/minimal/cordis compositions, selected before the first turn; `/market` search and approved install preview; `/inspect` official Host contracts; `/focus` rendering.
|
|
61
|
+
- BCP47 locale registration, bounded language-specific lexical code highlighting and read-only Alt+H help during blocking dialogs.
|
|
62
|
+
- macOS image-paste adapter using `pngpaste`, explicit missing-helper errors and cancellation/timeout handling.
|
|
63
|
+
- Official-source runtime initialization, bundle linking, generated-contract preparation and standalone source/test type-check setup.
|
|
64
|
+
|
|
65
|
+
### Upgrade and boundaries
|
|
66
|
+
|
|
67
|
+
- Update with `npm install --global @crazyhappyone/dsh-tui@next`. Run `dsh-tui probe` to check the engine and default profile. Source mode also uses the same profile.
|
|
68
|
+
- Existing `tui` and `deepseek-tui` directories are retained. To keep the old lightweight configuration, use `dsh-tui --profile tui`. DSH profiles remain independent; a provider configured only in `web` is not automatically global. Refresh Magpie's DSH connection/catalog after creating a new profile.
|
|
69
|
+
- `/reload` refreshes code in a running source-linked installation while retaining its existing profile; quit and relaunch to change the default profile. Resumed Goals require explicit `/goal resume`.
|
|
70
|
+
- Images and PDF/Office documents use metadata/text or the system opener. IME preedit remains native to the terminal; Ink exposes no composition events. Physical macOS/IME/screen-reader devices, remote market downloads, live model replies and external Stop convergence are not established by offline tests.
|
|
71
|
+
|
|
72
|
+
### 中文变更说明
|
|
73
|
+
|
|
74
|
+
- **修复模型配置入口分裂:**轻量模式与源码模式统一默认使用官方 `deepseek-tui` profile;`--profile` 同时决定安装和启动目标。旧版在探测到官方 `dsh` 后会改用缺少配置的 `tui`,导致 Magpie 已写入的模型不出现在列表中。继续使用官方 `ctx.llm` / `agentDefaultModel`,不另建配置加载器、不复制其他 profile;模型列表按实际终端高度显示。
|
|
75
|
+
- **修复运行与输入状态:**后台 Goal/定时回合正确进入生成中,Ctrl+C 取消回合;页脚区分目标 active 和自动续跑是否启用。修复鼠标复制、EPIPE、窄屏决策按钮、自定义/多选问答和秘密输入遮罩。
|
|
76
|
+
- **新增会话与文件能力:**事件轨迹/JSON、完整 TODO、定时提醒、时间上下文、交付物、附件目录、逐文件 diff,以及子代理实时输出、排队/引导续聊、停止请求与宽屏并排。
|
|
77
|
+
- **新增操作与扩展能力:**明暗主题、设置分组、快捷键查看/重绑定、文件树监控、四种隔离 preset、市场预览、Host 自检、focus、语言包注册、有界词法高亮、字素选区、普通流无障碍和阻塞对话只读帮助。
|
|
78
|
+
- **升级:**`npm install --global @crazyhappyone/dsh-tui@next`。旧 profile 均保留;需要旧轻量配置时用 `--profile tui`。`/reload` 保留当前 profile,切换默认 profile 需退出后重新启动;Goal 恢复后执行 `/goal resume`。创建新 profile 后刷新 Magpie 的 DSH 接入/目录。
|
|
79
|
+
- **边界:**关闭进程期间提醒不计时;图片及 PDF/Office 使用文本/元数据或系统程序。未将离线测试等同于联网模型、远程安装、真实外部 Stop 收敛或 macOS/IME/屏幕阅读器实机验证。
|
|
80
|
+
|
|
81
|
+
[Full comparison](https://github.com/zhangyang-crazy-one/dsh-tui/compare/v0.1.0-alpha.49...v0.1.0-alpha.50)
|
|
82
|
+
|
|
83
|
+
## Earlier releases
|
|
84
|
+
|
|
85
|
+
See [GitHub Releases](https://github.com/zhangyang-crazy-one/dsh-tui/releases) for `0.1.0-alpha.49` and earlier release notes.
|
package/README.i18n.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Bilingual-pair consistency record: both languages carry equal authority.
|
|
2
2
|
# This source-only mirror has no DSH pairing runner. Recompute with:
|
|
3
3
|
# git hash-object README.md README.zh.md
|
|
4
|
-
README.md:
|
|
5
|
-
README.zh.md:
|
|
4
|
+
README.md: 85d9293b354853b972f28f7b85d1823395178530
|
|
5
|
+
README.zh.md: 249948d86146a20736141157efd01ce0c2e80768
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "DeepSeek Harness terminal interface: a dsh plugin bundle plus its launcher."
|
|
3
3
|
kind: "package-group"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -13,10 +13,31 @@ English | [中文](README.zh.md)
|
|
|
13
13
|
|
|
14
14
|
## Summary
|
|
15
15
|
|
|
16
|
-
`@crazyhappyone/dsh-tui`
|
|
16
|
+
`@crazyhappyone/dsh-tui` is a terminal interface for DeepSeek Harness (dsh), shipped as a dsh **plugin bundle** plus a `dsh-tui` launcher. The package declares `dsh.bundle`, so dsh installs it into a profile like any other plugin; the launcher only automates that install and boots the profile. This repository owns the plugin sources (`tui/`, `tui-render/`). DSH continues to own agents, sessions, tools, persistence, providers, permissions, and profile assembly.
|
|
17
|
+
|
|
18
|
+
## Release 0.1.0-alpha.51
|
|
19
|
+
|
|
20
|
+
This prerelease targets DSH `0.2.1-rc.2`. It fixes streamed text overlapping the input area, removes wheel scrolling catch-up, reduces history-rendering work, and adds hierarchical settings navigation. It also fixes failed-stream text, SSH login guidance and file paths after `/cd` (#14–#16). See the [changelog](CHANGELOG.md#010-alpha51--2026-10-21) for the full changes and verification boundaries.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install --global @crazyhappyone/dsh-tui@next
|
|
24
|
+
dsh-tui probe
|
|
25
|
+
dsh-tui
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Both lightweight and source modes now default to the official `deepseek-tui` profile under `$DSH_HOME/profiles/` (normally `~/.dsh/profiles/`). `/model` reads `ctx.llm`, and model selection uses DSH's `agentDefaultModel`; this bundle does not read a private model configuration or copy another profile's providers. Magpie writes existing `profiles/*/cordis.patch.yml` files. If Magpie is connected before a new profile is created, refresh its DSH connection/catalog after the profile exists and restart the TUI.
|
|
29
|
+
|
|
30
|
+
Earlier lightweight versions used `tui`, while source mode used `deepseek-tui`. Neither directory is deleted or migrated automatically. To retain an older lightweight profile, run `dsh-tui --profile tui`. To use another TUI-enabled official profile, pass `--profile NAME`: installation and boot use that exact same target in either mode. Profiles remain independently configured by DSH; a provider configured only in `web` is not automatically global.
|
|
31
|
+
|
|
32
|
+
For a running source-linked installation, `/reload` loads the rebuilt bundle but preserves that process's selected profile. To change from `tui` to `deepseek-tui`, quit and launch again (or pass the desired profile explicitly). Resumed Goals require `/goal resume` to enable automatic continuation.
|
|
33
|
+
|
|
34
|
+
`/settings` now opens a hierarchy. Use Enter to open a category, namespace, provider, model or field; ←/Esc returns one level; `/` searches; `i` edits an object's JSON; Space toggles supported values. Successful edits stay in the current location and use DSH's official settings/credential services. In the recorded PTY comparison, a nine-line wheel burst reached its target in 17.93 ms instead of 168.07 ms; 2,812 frames with published transcript snapshots had no text mismatches or input-area leaks. These are synthetic PTY results, not hardware latency guarantees. See the [fix verification](docs/performance-audit-2026-10-21/fix-verification.md) for fixtures and limits.
|
|
17
35
|
|
|
18
36
|
## Table of Contents
|
|
19
37
|
|
|
38
|
+
- [Release and upgrade](#release-010-alpha51)
|
|
39
|
+
- [Changelog](CHANGELOG.md)
|
|
40
|
+
- [Terminal capabilities](#terminal-capabilities)
|
|
20
41
|
- [Screenshots](#screenshots)
|
|
21
42
|
- [Install the launcher](#install-the-launcher)
|
|
22
43
|
- [Run and update](#run-and-update)
|
|
@@ -33,9 +54,9 @@ English | [中文](README.zh.md)
|
|
|
33
54
|
<a id="screenshots"></a>
|
|
34
55
|
## Screenshots
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
Interactive settings pane (`/settings`):
|
|
37
58
|
|
|
38
|
-

|
|
39
60
|
|
|
40
61
|
After sending `你好`:
|
|
41
62
|
|
|
@@ -51,7 +72,7 @@ The unscoped `dsh-tui` package belongs to another maintainer. This project publi
|
|
|
51
72
|
`dsh-tui` supports two runtime modes:
|
|
52
73
|
|
|
53
74
|
### Mode A: Lightweight Mode (Recommended, Zero-Clone)
|
|
54
|
-
Install the official
|
|
75
|
+
Install the official engine and the TUI launcher globally:
|
|
55
76
|
|
|
56
77
|
```text
|
|
57
78
|
npm install --global @deepseek-ai/dsh
|
|
@@ -60,7 +81,18 @@ dsh-tui probe
|
|
|
60
81
|
dsh-tui
|
|
61
82
|
```
|
|
62
83
|
|
|
63
|
-
|
|
84
|
+
The first launch runs `dsh plugin --profile deepseek-tui add <package directory>`, which links this package into the `deepseek-tui` profile after `@deepseek-ai/dsh-base`; later launches find it there and run `dsh --profile deepseek-tui` directly. Without the launcher, the same two dsh commands work by hand:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
dsh plugin --profile deepseek-tui add @crazyhappyone/dsh-tui@next
|
|
88
|
+
dsh --profile deepseek-tui
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Installing as a bundle matters in dsh 0.2: `/settings` edits are written to the profile's own patch layer, which applies after bundle layers. A `--patch` overlay would apply after the profile layer and dsh refuses settings writes to rows such an overlay owns.
|
|
92
|
+
|
|
93
|
+
Detection checks an absolute `DSH_BIN` override, PATH, npm and pnpm global packages, then packages resolvable from the working directory and launcher directory. Each probe subprocess has a ten-second timeout, which covers a cold first start. A broken explicit `DSH_BIN` is reported without selecting another installation. Package bin entries run through the launcher's Node executable.
|
|
94
|
+
|
|
95
|
+
The bundle targets the dsh `0.2` release line (built against `0.2.1-rc.2`, also verified on `0.2.1-alpha.2`). The package declares `@deepseek-ai/dsh` `>=0.2.0-rc.2 <0.3.0` as an optional peer, so dsh's own plugin compatibility check covers manual installs, and the launcher refuses another engine line with the exact install command; `DSH_TUI_SKIP_ENGINE_CHECK=1` bypasses the launcher check.
|
|
64
96
|
|
|
65
97
|
### Mode B: Source Mode (Developer / Debugging)
|
|
66
98
|
To debug or hack on TUI or DSH source directly:
|
|
@@ -86,7 +118,7 @@ dsh-tui
|
|
|
86
118
|
|
|
87
119
|
Run `dsh-tui update` when you want to refresh the dedicated runtime before launching it again.
|
|
88
120
|
|
|
89
|
-
Ordinary arguments pass to the `deepseek-tui`
|
|
121
|
+
Ordinary arguments pass unchanged to the selected official profile (`deepseek-tui` by default) in both modes:
|
|
90
122
|
|
|
91
123
|
```text
|
|
92
124
|
dsh-tui "review this repository"
|
|
@@ -110,13 +142,13 @@ dsh-tui update
|
|
|
110
142
|
<a id="configure-the-source-runtime"></a>
|
|
111
143
|
## Configure the source runtime
|
|
112
144
|
|
|
113
|
-
The defaults
|
|
145
|
+
The defaults use the official public repository at tag `dsh-v0.2.1-rc.2`. Source mode links this bundle into the existing `deepseek-tui` profile and preserves its user patch. Missing Typert runtime artifacts are generated with the upstream generator before boot. The source CLI runs through `pnpm exec node`, avoiding the `predsh` hook that reinstalls the entire workspace on every launch.
|
|
114
146
|
|
|
115
147
|
| Environment variable | Default | Purpose |
|
|
116
148
|
|---|---|---|
|
|
117
149
|
| `DSH_TUI_RUNTIME_DIR` | `~/.local/share/dsh-tui/runtime` | Dedicated clone used only by the launcher |
|
|
118
|
-
| `DSH_TUI_SOURCE_URL` | `https://github.com/
|
|
119
|
-
| `DSH_TUI_SOURCE_REF` | `
|
|
150
|
+
| `DSH_TUI_SOURCE_URL` | `https://github.com/deepseek-ai/deepseek-harness.git` | Git remote cloned and fetched by `update` |
|
|
151
|
+
| `DSH_TUI_SOURCE_REF` | `dsh-v0.2.1-rc.2` | Branch or ref fetched by `update` |
|
|
120
152
|
| `DSH_TUI_PNPM` | `pnpm` | pnpm executable used for install and launch |
|
|
121
153
|
|
|
122
154
|
Values must be non-empty, and the runtime directory must be absolute. The launcher refuses a symbolic-link runtime path and an existing directory that is not a Git checkout. Child commands receive argument arrays without shell interpolation.
|
|
@@ -128,15 +160,69 @@ If dependency refresh fails after a fast-forward, the runtime stays at the repor
|
|
|
128
160
|
<a id="relationship-to-dsh"></a>
|
|
129
161
|
## Relationship to DSH
|
|
130
162
|
|
|
131
|
-
The TUI is a
|
|
163
|
+
The TUI is a dsh plugin bundle, not a fork or a separate agent runtime:
|
|
132
164
|
|
|
133
165
|
```text
|
|
134
|
-
@deepseek-ai/dsh-base
|
|
135
|
-
└─ @
|
|
136
|
-
|
|
166
|
+
@deepseek-ai/dsh-base dsh core bundle (agents, sessions, tools)
|
|
167
|
+
└─ @crazyhappyone/dsh-tui this bundle: cordis.patch.yml + dist/*
|
|
168
|
+
├─ tui-startup (./startup) command-line provider (task, --resume, --cwd)
|
|
169
|
+
├─ tui (./settings) volatile TUI preferences shown in /settings
|
|
170
|
+
├─ tui-runtime (./runtime) terminal lifecycle and controller
|
|
171
|
+
├─ schedule (./schedule) official scheduler with shared Session activation
|
|
172
|
+
└─ zen-proxy (./zen-proxy) optional OpenCode Zen header proxy
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Rows name plugins through the package's `exports`, so a settings edit records a portable row name in the profile patch. The bundle also inserts the published dsh plugins `session-stats`, `message-feedback`, `tool-ask-user`, `workspace-changes`, `tool-schedule`, `time-context`, `tool-present`, and a loopback `webserver` for the account sign-in callback, and overrides `system-prompt`, `tools`, `session-query-sqlite`, and `session-title-llm`.
|
|
176
|
+
|
|
177
|
+
### Reminders and user questions
|
|
178
|
+
|
|
179
|
+
The model can use the official `schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` tools. `/schedules` lists reminders across Sessions: ↑↓ or PgUp/PgDn selects, Enter shows the full prompt, a second Enter opens the owning Session, `r` refreshes, and `d` asks for cancellation confirmation (`y` confirms; `n` or Esc keeps it). Delivery resumes the original Session even after navigating elsewhere. Tasks persist across restart; timers run only while this process is open, and overdue tasks are handled on the next launch. A delivery receipt confirms durable inbox admission, not a completed model response. The adapter bundles the official scheduler and Session activation helpers from the pinned DSH build; upstream upgrades require integration checks.
|
|
180
|
+
|
|
181
|
+
User questions support all questions in a batch, multiple selections, and custom text. Space toggles a multi-select choice; `c` opens the custom editor; Enter saves text and submits choices. Questions without choices open the editor directly. Tab opens the complete question and answer for scrolling; Tab or Esc returns to editing. Esc in the editor discards that edit (or cancels a text-only question), while Esc on the choices cancels the request. Pasted multiline answers retain their original text and do not change the chat draft.
|
|
182
|
+
|
|
183
|
+
Credential editors and secret arguments in `/key` and `/login` display bullets while keeping credential reference names visible. Masking affects display only: editing and submission retain the original value, and cancelling restores the chat draft.
|
|
184
|
+
|
|
185
|
+
### Time context, delivered files, and image paste
|
|
186
|
+
|
|
187
|
+
The official `time-context` plugin supplies the current time and process time zone to the model when preparing a step, refreshing after ten minutes. This model context does not create an extra human transcript message.
|
|
188
|
+
|
|
189
|
+
The model can explicitly deliver existing files with the official `present` tool (up to eight files per call). `/deliveries` lists this Session's recorded deliveries: ↑↓ selects, Enter previews UTF-8 text, `o` requests opening the selected file in the local system application, and Esc returns. PDF, Office, images, and other binary formats show file details and use the system application. Text reads are limited to 1 MiB by default. Completed turns also show the delivered paths and descriptions; their records survive Session replay, but the files must still exist and remain accessible.
|
|
190
|
+
|
|
191
|
+
Clipboard image paste uses `pngpaste -` on macOS ([installation: `brew install pngpaste`](https://github.com/jcsalterego/pngpaste)), `wl-paste` on Wayland, or `xclip` on X11. A missing helper gives a visible error. Reads time out after five seconds by default and are cancelled when the TUI closes; existing image limits and validation still apply. The macOS command and subprocess behavior have automated coverage on Linux; macOS hardware validation remains pending.
|
|
192
|
+
|
|
193
|
+
### DeepSeek account, models, and working directory
|
|
194
|
+
|
|
195
|
+
- `/login` opens the DeepSeek account page when dsh mounts the `deepseek-account` service: Enter starts browser sign-in, `o` reopens the authorization link, `c` cancels, and the page shows the profile and balance once signed in. The browser returns to the bundle's `webserver` row on `127.0.0.1` with an OS-assigned port. Over SSH the page prints the `ssh -L` forward instead of opening a browser; pin `port` on the `webserver` row so the forward stays stable. Closing and reopening this page retains the active attempt and restores its forwarding instructions; `o` opens the link only when explicitly requested. Without the account service, `/login` and `/key` open the API-key editor.
|
|
196
|
+
- `/logout` signs out after confirmation; stored API keys remain.
|
|
197
|
+
- `/model` lists `deepseek-account` and `deepseek-official` with the step that makes their models available (`/login` or `/key`) while their catalogs are empty, and refuses to select such a row.
|
|
198
|
+
- `/cd [path]` shows or changes the Session working directory on dsh 0.2.1 and later. The header, `@` mentions, and `/files` follow it, including relative paths entered in the file panel, and the model receives the change notice; existing shells keep their own directories.
|
|
199
|
+
- `/plugins` lists official bundles in their own group. An official catalog entry whose files are not installed is marked installable, and Space opens the install preview for its exact target.
|
|
200
|
+
|
|
201
|
+
### OpenCode Zen free models
|
|
202
|
+
|
|
203
|
+
The bundled patch mounts `zen-proxy` (vendored from
|
|
204
|
+
[zhangyang-crazy-one/dsh-zen-proxy](https://github.com/zhangyang-crazy-one/dsh-zen-proxy),
|
|
205
|
+
fork of [Yee-h/dsh-zen-proxy](https://github.com/Yee-h/dsh-zen-proxy)): an in-process
|
|
206
|
+
localhost proxy that injects the official OpenCode client headers Zen requires
|
|
207
|
+
(`User-Agent`, `x-opencode-client/session/request/project`). Without it Zen answers
|
|
208
|
+
`400 MissingSessionID` / `429 FreeUsageLimitError` because dsh always sends its
|
|
209
|
+
own attribution `User-Agent`.
|
|
210
|
+
|
|
211
|
+
To use it, add a provider through the TUI `/settings` provider form (or the
|
|
212
|
+
profile's `cordis.patch.yml`) pointing at the proxy, and keep the key in credentials:
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
- id: llm-pi-ai
|
|
216
|
+
config:
|
|
217
|
+
providers:
|
|
218
|
+
opencode:
|
|
219
|
+
api: openai-completions
|
|
220
|
+
baseURL: http://127.0.0.1:4097/v1
|
|
221
|
+
apiKeyEnv: OPENCODE_API_KEY
|
|
137
222
|
```
|
|
138
223
|
|
|
139
|
-
The
|
|
224
|
+
The proxy listens on `127.0.0.1:4097` only; add `- id: zen-proxy` with
|
|
225
|
+
`disabled: true` to the profile's `cordis.patch.yml` to turn it off.
|
|
140
226
|
|
|
141
227
|
-----
|
|
142
228
|
|
|
@@ -145,7 +231,8 @@ The integration source lives on the private [`feat/deepseek-tui` DSH branch](htt
|
|
|
145
231
|
|
|
146
232
|
| Package | DSH shape | Responsibility |
|
|
147
233
|
|---|---|---|
|
|
148
|
-
| [`tui/`](tui/README.md) |
|
|
234
|
+
| [`tui/`](tui/README.md) | Runtime, startup, and settings plugins | Composes the terminal layer over `dsh-base`, owns the live terminal session, and maps user actions to DSH services |
|
|
235
|
+
| [`plugins/zen-proxy/`](https://github.com/zhangyang-crazy-one/dsh-zen-proxy) | Vendored plugin (bundled as `dist/zen-proxy.js`) | In-process OpenAI-compatible proxy injecting OpenCode Zen client headers; mounted in `cordis.patch.yml` |
|
|
149
236
|
| [`tui-render/`](tui-render/README.md) | Library | Projects controller state through Ink without owning agents, persistence, or model requests |
|
|
150
237
|
|
|
151
238
|
-----
|
|
@@ -153,9 +240,20 @@ The integration source lives on the private [`feat/deepseek-tui` DSH branch](htt
|
|
|
153
240
|
<a id="development-workflow"></a>
|
|
154
241
|
## Development workflow
|
|
155
242
|
|
|
156
|
-
|
|
243
|
+
`tui/` and `tui-render/` compile against an upstream dsh checkout at the tag named by `COMPATIBLE_DSH_VERSION` in `src/launcher.js`:
|
|
157
244
|
|
|
158
|
-
|
|
245
|
+
```text
|
|
246
|
+
git clone --branch dsh-v0.2.1-rc.2 https://github.com/deepseek-ai/deepseek-harness ../deepseek-harness
|
|
247
|
+
(cd ../deepseek-harness && pnpm install)
|
|
248
|
+
npm run build # or DSH_SOURCE=/path/to/checkout npm run build
|
|
249
|
+
(cd ../deepseek-harness && pnpm install) # link the mounted plugin's dev dependencies
|
|
250
|
+
npm run dev:setup # same DSH_SOURCE override; build types and link editor dependencies
|
|
251
|
+
npm run typecheck # strict checks for sources and tests
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`npm run build` copies the plugin packages and `cordis.patch.yml` into the checkout's `packages/tui/` workspace, bundles `dist/index.js`, `dist/startup.js`, `dist/settings.js`, `dist/schedule.js`, and `dist/zen-proxy.js` with esbuild, and import-checks each output. Run the plugin tests from the checkout with `npx vitest run packages/tui`, and the launcher tests here with `npm test`; run `npm run pack:check` before release. Test installation through a packed tarball or `dsh plugin --profile <name> add <this directory>`.
|
|
255
|
+
|
|
256
|
+
Local `tsconfig.json` files support editors in this standalone repository. The build mounts `tsconfig.workspace.json` as the checkout's package config to preserve upstream project references. `dev:setup` builds dependency declarations and links whole `node_modules` directories, preserving pnpm's relative links. Re-run build and setup after upstream or public type changes; restart the editor's TypeScript project if it still displays old missing-module diagnostics.
|
|
159
257
|
|
|
160
258
|
-----
|
|
161
259
|
|
|
@@ -178,21 +276,42 @@ The equivalent npm website settings are organization or user `zhangyang-crazy-on
|
|
|
178
276
|
For each release, bump `package.json`, merge the change after CI passes, then create a GitHub Release whose tag matches the package version:
|
|
179
277
|
|
|
180
278
|
```text
|
|
181
|
-
gh release create v0.1.0-alpha.
|
|
279
|
+
gh release create v0.1.0-alpha.50 --prerelease --notes-file docs/releases/v0.1.0-alpha.50.md
|
|
182
280
|
```
|
|
183
281
|
|
|
184
282
|
The `Publish npm` workflow runs tests and packed-package verification again before publishing. Do not rerun an old release tag: npm versions are immutable. Promotion to stable is a new version and a non-prerelease GitHub Release.
|
|
185
283
|
|
|
186
284
|
-----
|
|
187
285
|
|
|
286
|
+
## Terminal capabilities
|
|
287
|
+
|
|
288
|
+
`/timeline` reads individual Session events, actual tool/token/timing data and full JSON; `/attachments` lists typed image/file references and opens local copies; `/review` reads each changed file's official diff. `/files` watches expanded directories with coalesced refresh and retains manual `r` refresh.
|
|
289
|
+
|
|
290
|
+
`/settings` uses Tab/Shift+Tab section navigation and persists `tui.theme=dark|light`. `/keys` lists context-specific bindings; `/bind ACTION Ctrl+X`, `/bind ACTION default` and `/unbind ACTION` edit composer shortcuts with conflict checks. Shift+arrows/Home/End selects input by grapheme, typing/paste replaces the selection, and Ctrl+Y copies ordinary selections; credential selections cannot be copied. Alt+H opens read-only help during approvals, questions and plan review.
|
|
291
|
+
|
|
292
|
+
`/agents` supports `c` continuation (Enter queues, Ctrl+Enter steers), `s` request Stop, and `v` side-by-side viewing at 100+ columns. Narrow terminals use the single-pane view. Human controls preserve the catalog's exact direct-parent address; Stop acknowledgement does not claim execution has already stopped.
|
|
293
|
+
|
|
294
|
+
`/preset` browses standard/PTC/minimal/cordis declarations; `/preset ID` selects an isolated composition before the first turn. Started Sessions remain locked. `/market QUERY` searches configured indexes and routes `i` through plugin-manager inspection and confirmation; `n/p` pages results. `/inspect` browses official Host providers; `/inspect host PROVIDER METHOD JSON` reads an exact contract. `/focus` hides intermediate tool cards without changing model tools or the Session log. External language packs can call `registerTuiLocale`; fenced code uses bounded language-specific lexical highlighting.
|
|
295
|
+
|
|
296
|
+
The Goal footer distinguishes armed automatic continuation from a stopped continuation requiring `/goal resume`. Backend-started turns update the running state and Ctrl+C cancellation path. After updating a running source installation, use `/reload`; a resumed Goal requires explicit `/goal resume` to rearm.
|
|
297
|
+
|
|
298
|
+
Verification and platform boundaries: [P1/P2 evidence](docs/p1-p2-verification-2026-10-20.md).
|
|
299
|
+
|
|
300
|
+
-----
|
|
301
|
+
|
|
188
302
|
<a id="known-limitations"></a>
|
|
189
303
|
## Known limitations
|
|
190
304
|
|
|
191
|
-
- **
|
|
305
|
+
- **Third-party plugins must match the engine** — dsh 0.2 rejects older authentication plugins that only declare dsh 0.1.x support; the launcher never grants version exemptions automatically.
|
|
192
306
|
- **Source toolchain required** — runtime initialization requires Git, pnpm, and a DSH-supported Node version.
|
|
193
307
|
- **No automatic conflict resolution** — dirty or non-fast-forward runtime history requires explicit human action or a new runtime directory.
|
|
194
308
|
- **Runtime update is not launcher update** — `dsh-tui update` refreshes DSH source and dependencies; npm updates the launcher package.
|
|
195
309
|
- **Integration owns release readiness** — launcher success does not replace the DSH branch's behavior, snapshot, build, or hygiene checks.
|
|
310
|
+
- **Source mode also uses this plugin** — the configured checkout must be compatible with this bundle's dsh version. Replace a historical profile's `@deepseek-ai/dsh-tui` bundle with `@crazyhappyone/dsh-tui`; back up the profile and preserve user settings during migration.
|
|
311
|
+
- **Reminders need a running process** — `/schedules` uses the official service and persistent origin Sessions. Restart can recover pending reminders; a closed process runs no timers.
|
|
312
|
+
- **Terminal capability limits** — images and PDF/Office files use metadata/text or the system opener. Ink exposes no IME composition events; native terminal preedit remains authoritative. `INK_SCREEN_READER=true` enables plain-stream rendering, without mouse capture, alternate screen or animation; physical IME/screen-reader devices and macOS clipboard have not been verified.
|
|
313
|
+
- **Account sign-in needs a reachable Platform** — sign-in reports `no-response` when the host cannot reach `platform.deepseek.com`; use `/key` in that case.
|
|
314
|
+
- **No physical session deletion on dsh 0.2** — 0.2 session persistence archives instead of deleting, and the TUI composition mounts no workspace archive service, so the session list reports deletion as unavailable.
|
|
196
315
|
|
|
197
316
|
<a id="dev-note"></a>
|
|
198
317
|
## Dev Note
|