@aiwayds/dsh-opentui 0.9.2 → 0.9.3

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 CHANGED
@@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.9.3] - 2026-11-10
9
+
10
+ ### Added
11
+
12
+ - **Slash palette upgrades** — Tab completion, a 10-row window with a `… N more` overflow row, skills listed as `/skill-name` entries in italic with Tab completion, and usage-frequency ranking persisted to the profile `config.json`.
13
+ - **`/agents`** — an agent definition manager with table / fields / limits layers aligned with `dsh-tui-pi`; it writes the frontmatter the registry consumes (`model`, `thinking`, `deep`, `maxRounds`, `background`).
14
+ - **`/settings`** — a panel with local preferences, host settings (subagent caps, permission preset, session log), and read-only namespaces.
15
+ - **Pane focus** — `F6` or a click switches between transcript and composer; the transcript scrolls and draws focused/unfocused frames; the mouse is enabled (`Shift`+drag for native selection).
16
+ - **Dock** — think/tool blocks show 3 lines, linger for 2s, then fade over 0.3s, and are replaced by newer content within the window.
17
+ - **Provisioning** — the default plugin set (10) is installed on first launch with `[n/5]` progress; `tool-web` is enabled with the anysearch provider (keyless search); the legacy `@aiwayds/dsh-opentui` bundle entry was removed.
18
+ - **Host idle exit** — the resident host exits 5s after the last client disconnects (`DSH_OPENTUI_HOST_IDLE_MS`).
19
+ - **Verification gates** — `typecheck:entry`, `verify:assembly`, and a 42-check real-client tmux script.
20
+
21
+ ### Changed
22
+
23
+ - **`/sessions` renamed to `/resume`** — no alias.
24
+ - **`/motion` bare output** — shows the configured preference and the effective tier (`auto → reduced`).
25
+ - **Default plugin provisioning runs on every launch** — idempotent, a no-op when already satisfied.
26
+
27
+ ### Fixed
28
+
29
+ - **`PgUp`/`PgDn`/`Home`/`End` swallowed by the transcript and textarea layers** — the slash palette could not scroll past 6 rows.
30
+ - **Panel/command wiring** — `openAgents` never reached the command context, so `/agents` reported "not mounted".
31
+ - **Editing one frontmatter field deleted another** — model was lost on thinking-only edits.
32
+ - **Empty-corpus landing state** and **overlay open-state never reset on unmount** — the sidebar `Esc` stopped working.
33
+ - **`web_search` unavailable** — the web-app disables `tool-web` and the opentui patch never re-enabled it.
34
+ - **Copy-on-select used a no-op clipboard stub** — search no longer restored `stickyScroll`.
35
+ - **Idle reaper script path resolution in the source tree** — hosts were never reaped.
36
+ - **Think-only turns never painted the fade frames** — the clock signal was not consumed when collapsed.
37
+ - **Stale fade anchor on resumed thinking lines.**
38
+
39
+ ### Known Issues
40
+
41
+ - Engine paint defects remain: streaming diff-paint row loss, and wide-glyph loss under translucent overlays (upstream).
42
+ - Skills are a boot-time snapshot of local directories; plugin-provided skills are not listed.
43
+ - `permission.defaultPreset` has no options in the current host schema.
44
+ - Input history is in-memory only.
45
+ - CI cannot run the real-client tmux gate (no tmux/dsh on hosted runners).
46
+
8
47
  ## [0.9.2] - 2026-11-09
9
48
 
10
49
  ### Added
package/README.md CHANGED
@@ -37,12 +37,17 @@ dsh-opentui
37
37
 
38
38
  `dsh-opentui` starts a thin client TUI (`dist/client/index.js` under Bun) that
39
39
  connects to a resident `dsh --profile opentui` host process. The launcher
40
- handles everything on first run:
41
-
42
- - **Profile bootstrap** — if `$DSH_HOME/profiles/opentui` is missing it is
43
- provisioned idempotently. Pass `--provider` / `--model` /
44
- `--reasoning-effort` on first launch to pin a different default model
45
- (default `zai-coding-cn/glm-5.3-flash/high`).
40
+ handles everything on startup:
41
+
42
+ - **Profile bootstrap** — `$DSH_HOME/profiles/opentui` is provisioned on
43
+ EVERY launch (idempotent; a no-op pass is sub-second). Pass `--provider` /
44
+ `--model` / `--reasoning-effort` to pin a different default model (default
45
+ `zai-coding-cn/glm-5.3-flash/high`).
46
+ - **Default plugins** — the first run installs the plugin set below into the
47
+ profile and prints its progress (`[3/5] plugins …`). Later runs only repair
48
+ what is missing: nothing is reinstalled when the dependency, the installed
49
+ version and the bundle entry already agree. `--dry-run` (or
50
+ `DSH_PROVISION_DRY_RUN=1`) prints the commands without executing them.
46
51
  - **Legacy migration** — a pre-retirement `profiles/dsh-opentui` profile is
47
52
  detected once and its theme / config preferences are conservatively copied
48
53
  into the `opentui` profile (only keys the target does not already have).
@@ -57,12 +62,74 @@ re-attaches (or a fresh one adopts) the running host; `/reload` restarts the
57
62
  host on the same port without losing the session. Multiple clients can attach
58
63
  to the same host.
59
64
 
65
+ ### Default plugins
66
+
67
+ Every launch converges the `opentui` profile to this set (pinned versions):
68
+
69
+ | Tier | Package | Why |
70
+ |---|---|---|
71
+ | core | `@aiwayds/dsh-ask-router` | owns the ask surface; loads before every other UI/ask bundle |
72
+ | core | `@aiwayds/dsh-subagent-registry` | subagent discovery and registration |
73
+ | core | `@aiwayds/dsh-llm-net-retry` | retries transient provider/network failures |
74
+ | core | `@aiwayds/dsh-web-search-anysearch` | web search without a per-provider key |
75
+ | core | `@aiwayds/dsh-approval-policy` | tool-approval policy |
76
+ | core | `@aiwayds/dsh-model-sync` | keeps the model list in sync with the provider catalog |
77
+ | recommended | `@aiwayds/dsh-llm-stats` | token/cost accounting behind `/usage` |
78
+ | recommended | `@aiwayds/dsh-topics-memory` | cross-session topic memory |
79
+ | recommended | `@aiwayds/dsh-cron` | scheduled prompts |
80
+ | recommended | `@aiwayds/dsh-workflow` | dynamic workflow runs |
81
+ | recommended | `@aiwayds/dsh-vault` | secret storage used by the companions |
82
+
83
+ `recommended` is the default and includes `core`. Use `--plugins=core` to
84
+ install only the core set. These are deliberately not installed:
85
+ `dsh-tui-pi` (takes over stdout/stdin), `dcp` (web-app-preset isolated),
86
+ `feishu` (claims the ask surface), `web-search-tavily` (needs a key),
87
+ `agent-dispatch`, `self-improve`, `llm-proxy`, `profile-switch`.
88
+
89
+ `anysearch` needs no API key: provisioning also re-enables the `tool-web` row
90
+ (the `dsh-web-app` bundle ships it `disabled: true`) and pins
91
+ `web.searchProvider` to `anysearch`, so the model gets `web_search`/`web_fetch`
92
+ on a fresh profile. Both rows are written for every tier — including
93
+ `--plugins=none`, because the tools must be visible regardless of whether the
94
+ anysearch bundle is installed.
95
+
96
+ A plugin counts as installed only when all three agree: it is in the profile
97
+ `dependencies`, the installed `node_modules` version satisfies the pin, and its
98
+ name is in `dsh.profile.bundles`. Missing pieces are repaired with one
99
+ `dsh plugin --profile opentui add …`; a failing package is retried once on its
100
+ own after approving pnpm's build scripts, then reported as a WARN without
101
+ blocking the launch. The retired `@aiwayds/dsh-opentui` plugin entry is removed
102
+ from existing profiles (it has no `dsh.bundle` and only produced boot warnings).
103
+
104
+ ### Skipping the default plugins
105
+
106
+ Pass `--plugins=none` on launch to provision the profile without installing any
107
+ plugin (`--plugins=core` narrows the set instead). To make that permanent for
108
+ every launch, set it in the environment:
109
+
110
+ ```bash
111
+ DSH_OPENTUI_PLUGINS=none dsh-opentui
112
+ ```
113
+
114
+ The profile is still created/kept, the model route still written (including the
115
+ `tool-web` / `web` rows), and the retired-entry cleanup still runs; only plugin
116
+ installation and managed-bundle appends are skipped. You can always manage
117
+ plugins yourself afterwards with `dsh plugin --profile opentui add <pkg>`.
118
+ `--dry-run` prints every command provisioning would run without executing it.
119
+
60
120
  **Config reuse**: the Shell reads your existing dsh config — model defaults
61
121
  from the host, provider baseUrls and API keys from `$DSH_HOME`. A
62
122
  workspace-local `./.dsh/config.yml` overlays theme + model preferences on top;
63
123
  environment (`DSH_OPENTUI_THEME` / `DSH_OPENTUI_MODEL`) wins over the file.
64
124
 
65
- **In the TUI**: type a question, Enter to send. The model's thinking streams
125
+ **In the TUI**: type a question, Enter to send. `F6` (or a click) moves focus
126
+ between the transcript and the composer; while the transcript is focused, ↑/↓
127
+ scroll a line, PgUp/PgDn a page, Home/End jump to the top/bottom, and Tab or
128
+ Esc returns to the composer (Esc still stops a running turn). The focused pane
129
+ carries a heavy accent frame; the unfocused one dims. Mouse reporting is on, so
130
+ hold **Shift** while dragging for the terminal's native selection (then
131
+ Cmd/Ctrl+C copies it); a plain drag is copied on release per `terminal.copy`.
132
+ The model's thinking streams
66
133
  dim; tool calls (bash / read_file / write_file) pop an approval card — `y`
67
134
  allow, `n` decline; `esc` aborts a running turn. Ctrl+C twice quits. Commands:
68
135
  `/help` `/model [provider/id]` `/usage` `/clear` `/login` `/logout` `/resume`
@@ -119,12 +186,16 @@ PATH; otherwise the scripts self-skip (exit 0) so CI runs green.
119
186
 
120
187
  ## Status
121
188
 
122
- v0.9.2: published as `@aiwayds/dsh-opentui` — client-only distribution
189
+ v0.9.3: published as `@aiwayds/dsh-opentui` — client-only distribution
123
190
  (npm bin → client chain; the in-process plugin mode was retired). New
124
- default theme dsh-blue (dark/light, auto-selected by terminal background,
191
+ default theme dsh-blue (dark/light, auto-selected from terminal background,
125
192
  `/theme` to pin) with focus visuals, framed composer/messages/code blocks,
126
193
  and a motion system (`/motion`, `DSH_OPENTUI_MOTION`) that reduces on
127
194
  tmux/SSH/non-truecolor. 0.9.2 aligns the footer with `dsh-tui-pi`
128
195
  (provider icon, effort ladder, context usage, counters, tok/s, subagent
129
196
  lines), adds shell-style input history recall, and fixes palette/dialog
130
- contrast and footer refresh. Roadmap: platform + Kit polish.
197
+ contrast and footer refresh. 0.9.3 adds slash-palette Tab completion with
198
+ a 10-row window and skills, the `/agents` and `/settings` panels, F6 /
199
+ click pane focus with a scrollable transcript, the dock fade, and default
200
+ plugin provisioning with keyless `web_search`. Roadmap: platform + Kit
201
+ polish.
@@ -8,9 +8,14 @@
8
8
  * bun export conditions); no bun on PATH → install guidance, exit 1.
9
9
  * 2. dsh check — the host CLI is the session carrier (profile storage,
10
10
  * config load); no `dsh` on PATH → install guidance, exit 1.
11
- * 3. Profile bootstrap — when $DSH_HOME/profiles/opentui is missing, runs
12
- * scripts/provision-opentui-profile.mjs (idempotent; transparently
13
- * forwards --provider/--model/--reasoning-effort).
11
+ * 3. Profile bootstrap — runs scripts/provision-opentui-profile.mjs on
12
+ * EVERY start. The script is idempotent and prints five progress steps
13
+ * (profile, model route, plugins, bundles, verify); with nothing to do
14
+ * it is a sub-second local pass. It transparently forwards
15
+ * --provider/--model/--reasoning-effort and
16
+ * --plugins=core|recommended|none (--dry-run prints the commands without
17
+ * executing them). A non-zero exit is a WARN: the client still starts
18
+ * with the profile as-is.
14
19
  * 4. One-time migration notice — a pre-retirement profile at
15
20
  * $DSH_HOME/profiles/dsh-opentui is detected once, its theme /
16
21
  * config.json preferences are conservatively copied into the opentui
@@ -62,17 +67,26 @@ if (!spawnSync('which', ['dsh'], { encoding: 'utf8' }).stdout.trim()) {
62
67
  exitWithGuidance('the dsh CLI', 'npm i -g @deepseek-ai/dsh')
63
68
  }
64
69
 
65
- // --- 3. Profile bootstrap (best effort, idempotent) ------------------------
70
+ // --- 3. Profile bootstrap (every start, best effort, idempotent) -----------
71
+ // provision-opentui-profile.mjs is idempotent and understands
72
+ // --provider/--model/--reasoning-effort --plugins/--dry-run; forward those,
73
+ // ignore the rest. With nothing to do this is a local, sub-second pass.
66
74
  const opentuiProfileDir = join(dshHome, 'profiles', 'opentui')
67
- if (!existsSync(opentuiProfileDir)) {
68
- // provision-opentui-profile.mjs is idempotent and understands
69
- // --provider/--model/--reasoning-effort; forward those, ignore the rest.
75
+ {
70
76
  const userArgs = process.argv.slice(2)
71
77
  const provisionFlags = []
72
78
  for (const name of ['provider', 'model', 'reasoning-effort']) {
73
79
  const i = userArgs.indexOf(`--${name}`)
74
80
  if (i >= 0 && userArgs[i + 1]) provisionFlags.push(`--${name}`, userArgs[i + 1])
75
81
  }
82
+ const pluginsInline = userArgs.find((arg) => arg.startsWith('--plugins='))
83
+ if (pluginsInline) {
84
+ provisionFlags.push(pluginsInline)
85
+ } else {
86
+ const i = userArgs.indexOf('--plugins')
87
+ if (i >= 0 && userArgs[i + 1]) provisionFlags.push('--plugins', userArgs[i + 1])
88
+ }
89
+ if (userArgs.includes('--dry-run')) provisionFlags.push('--dry-run')
76
90
  const r = spawnSync(process.execPath, [join(pkgRoot, 'scripts', 'provision-opentui-profile.mjs'), ...provisionFlags], {
77
91
  stdio: 'inherit',
78
92
  })