@aiwayds/dsh-opentui 0.24.0 → 0.26.0

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,72 @@ 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.25.0] - 2026-11-22
9
+
10
+ ### Added
11
+
12
+ - **Capability release is table-driven.** CapIR v3 adds per-method parameter /
13
+ service tables and a generated generic dispatch arm (ADR-0012); new capabilities
14
+ are released through an explicit per-id allowlist instead of a blanket grant.
15
+ The in-process host now wires **58 of 257** methods (28 hand-written adapters
16
+ plus 30 released generic ids); every other id fails explicitly as `NOT_WIRED`,
17
+ never a silent empty result. `scripts/check-capcontract.mjs` byte-compares the
18
+ generated tables with **22 assertions**.
19
+ - **New command faces ride real host data.** `/btw` answers a side question in a
20
+ throwaway side session alongside a busy main turn; `/plugins` opens a real
21
+ plugin-manager panel (list + detail, install / uninstall / enable / disable
22
+ behind a confirmation modal, bounded install-progress polling with cancel);
23
+ `/goals` exposes 7 goal operations with a TUI confirmation before each write;
24
+ `/model discover` queries the current provider for its model list; `/login` /
25
+ `/logout` and `/account` are separate provider-login and account domains;
26
+ `/search`, `/history` and `/subagents` read real host data. `/settings` shows a
27
+ real permission-preset row.
28
+
29
+ ### Changed
30
+
31
+ - **The legacy podman `e2e/scenarios/` container layer was retired (ADR-0013).**
32
+ Its 21 scenarios were inventoried and each still-valid assertion was shown to
33
+ be taken over by the host families, the real-machine gate, unit tests and the
34
+ CI `pack-cold-start` gate before deletion. The container slot is recorded as
35
+ NOT RUN, never a fake green. The real-machine tmux recipe (historically
36
+ "verify70") closed at **64/64** items; the `pack-cold-start` gate is required.
37
+
38
+ ### Known
39
+
40
+ - `/model discover`'s positive path is environment-dependent and was NOT RUN
41
+ where no discovery source is registered; the honest degrade path is verified
42
+ and no model list is fabricated. The real-machine CI job remains opt-in and
43
+ needs a self-hosted runner with `dsh`, tmux, a provisioned profile and a
44
+ provider key.
45
+
46
+ ## [0.24.0] - 2026-11-21
47
+
48
+ ### Added
49
+
50
+ - **The in-process bridge is the sole session seam.** All TUI traffic runs over
51
+ a stdio JSON-lines channel to a bridge loaded inside the `dsh --profile
52
+ opentui-inproc` host; the legacy remote thin-client seam and its
53
+ `DSH_OPENTUI_INPROC=0` escape hatch were removed. A boot handshake compares
54
+ the client's expected capability surface with the bridge and degrades honestly
55
+ on a mismatch.
56
+ - **The CapIR / capcontract layer** makes `capir/capir.json` the single source of
57
+ truth for capability interface shapes, with generated contract tables checked
58
+ byte-for-byte in CI.
59
+ - **A FocusRouter keymap with a four-tier capture stack** (ADR-0008), and the S1–S6
60
+ capability surface: a real `/model` catalog, credentials / account with PKCE
61
+ authorization, and real config / settings / agents faces (no degrade notice).
62
+
63
+ ### Changed
64
+
65
+ - **The bridge is now a real directory copy** of this installation's bundled
66
+ artifact, guarded by a build-time fingerprint and a host-version compatibility
67
+ window — no absolute symlink, and no `@deepseek-ai/*` package copied into the
68
+ profile. It converges idempotently on every launch; `--repair-bridge` is still
69
+ accepted but is a no-op, while a fingerprint mismatch still fails loud.
70
+ - **28 methods are hand-wired and `@manual` reached 0.** The `pack-cold-start` CI
71
+ gate (npm pack → fresh install → bridge identity → stdio handshake) and the
72
+ real-machine `verify70` gate went green.
73
+
8
74
  ## [0.23.3] - 2026-11-20
9
75
 
10
76
  ### Changed
package/README.md CHANGED
@@ -6,11 +6,11 @@ new architecture, not a reskin of dsh-tui-pi. Built on
6
6
  running on Bun.
7
7
 
8
8
  The repo's product is the **architecture**; the shipped Shell is a working
9
- chat agent TUI on top of it. By default it boots an in-process session bridge
10
- inside the dsh host and drives the OpenTUI client over a stdio JSON-lines
11
- channel; the legacy thin client over the host's remote API is retained only as
12
- an escape hatch (`DSH_OPENTUI_INPROC=0`). The `--remote` flag was removed in
13
- 0.23.0.
9
+ chat agent TUI on top of it. It boots an in-process session bridge inside the
10
+ dsh host and drives the OpenTUI client over a stdio JSON-lines channel — the
11
+ bridge is the only session seam. The legacy remote thin-client seam and its
12
+ `DSH_OPENTUI_INPROC=0` escape hatch were removed in 0.24.0; the `--remote`
13
+ flag was removed earlier, in 0.23.0.
14
14
 
15
15
  | Package | What it is |
16
16
  |---|---|
@@ -22,7 +22,9 @@ See [CONTEXT.md](CONTEXT.md) for the glossary and [docs/adr/](docs/adr/)
22
22
  for decisions: Solid (0001), two integration channels with no compat shim
23
23
  (0002), Bun single-process distribution (0003), host profile route (0004),
24
24
  client mode (0005, superseded as the sole TUI path by the in-process bridge,
25
- 0009), session seam lifecycle (0010) and the ask/permission channel (0011).
25
+ 0009), session seam lifecycle (0010), the ask/permission channel (0011),
26
+ table-driven CapIR v3 dispatch (0012) and retirement of the legacy container
27
+ e2e layer (0013).
26
28
 
27
29
  ## Install
28
30
 
@@ -37,11 +39,13 @@ npm i -g @aiwayds/dsh-opentui
37
39
  dsh-opentui
38
40
  ```
39
41
 
40
- The first launch automatically provisions the `opentui-inproc` profile (bridge
41
- dependencies are symlinked from the dsh install, never copied). If that bridge
42
- install is damaged, rerun with `dsh-opentui --repair-bridge`. To fall back to
43
- the legacy remote thin client for a launch, set `DSH_OPENTUI_INPROC=0` — that
44
- skips in-process provisioning and selects the remote seam.
42
+ The first launch automatically provisions the `opentui-inproc` profile: the
43
+ shipped bridge bundle is materialized as a real directory copy of this
44
+ installation (no symlink, no copy of any `@deepseek-ai/*` package into the
45
+ profile) and checked against a build-time fingerprint. The copy converges
46
+ idempotently on every launch, so a damaged or stale bridge is replaced on the
47
+ next start; `--repair-bridge` is still accepted for compatibility but is a
48
+ no-op (a fingerprint mismatch still fails loud).
45
49
 
46
50
  Run `dsh-opentui --help` for the full list of launcher options.
47
51
 
@@ -106,45 +110,54 @@ and keeps the plugin set it booted with, so a plugin upgrade never applies to
106
110
  the current one. CI and scripted runs must pass `--yes` — without a TTY the
107
111
  confirmation prompt is refused.
108
112
 
109
- ## Client mode
110
-
111
- > Since 0.23.0 the default TUI path is the in-process session bridge
112
- > (`opentui-inproc` profile, see ADR-0009). The thin-client topology below is
113
- > the legacy path, reachable only through the `DSH_OPENTUI_INPROC=0` escape
114
- > hatch. The old `--remote` flag was removed in 0.23.0; passing it is a usage
115
- > error (exit 2).
116
-
117
- With `DSH_OPENTUI_INPROC=0`, `dsh-opentui` starts a thin client TUI
118
- (`dist/client/index.js` under Bun) that connects to a resident
119
- `dsh --profile opentui` host process. The launcher handles everything on
120
- startup:
121
-
122
- - **Profile bootstrap** — `$DSH_HOME/profiles/opentui` is provisioned on
123
- EVERY launch (idempotent; a no-op pass is sub-second). Pass `--provider` /
124
- `--model` / `--reasoning-effort` to pin a different default model (default
125
- `zai-coding-cn/glm-5.3-flash/high`).
126
- - **Default plugins** — the first run installs the plugin set below into the
127
- profile and prints its progress (`[3/5] plugins …`). Later runs only repair
128
- what is missing: nothing is reinstalled when the dependency, the installed
129
- version and the bundle entry already agree. `--dry-run` (or
130
- `DSH_PROVISION_DRY_RUN=1`) prints the commands without executing them.
131
- - **Legacy migration** — a pre-retirement `profiles/dsh-opentui` profile is
132
- detected once and its theme / config preferences are conservatively copied
133
- into the `opentui` profile (only keys the target does not already have).
134
- The legacy profile is kept, never deleted.
135
- - **SDK closure link** — the client imports `@deepseek-ai/dsh-client-connection`
136
- at runtime. That SDK is not on the public npm registry; it ships inside the
137
- globally-installed dsh's own `node_modules` closure, and the launcher
138
- symlinks it in (idempotent). This is why the dsh CLI is a hard prerequisite.
139
-
140
- Architecture: one resident host serves the workspace; a crashed or quit client
141
- re-attaches (or a fresh one adopts) the running host; `/reload` restarts the
142
- host on the same port without losing the session. Multiple clients can attach
143
- to the same host.
113
+ ## Session topology
114
+
115
+ > Since 0.24.0 the in-process session bridge (`opentui-inproc` profile, see
116
+ > ADR-0009) is the **only** session seam: the Bun TUI talks stdio JSON-lines to
117
+ > a bridge loaded inside a `dsh --profile opentui-inproc` host process. The
118
+ > legacy remote thin-client seam, its `DSH_OPENTUI_INPROC=0` escape hatch and
119
+ > the `--remote` flag are all gone (the flag has been a usage error, exit 2,
120
+ > since 0.23.0).
121
+
122
+ The Node launcher spawns the Bun TUI in the foreground (forwarding
123
+ SIGINT/SIGTERM/SIGHUP); the TUI starts the dsh host, which loads the bridge
124
+ in-process. A boot handshake compares the client's expected capability surface
125
+ with the bridge and degrades honestly on a mismatch.
126
+
127
+ Every launch provisions two profiles:
128
+
129
+ - **`opentui-inproc`** — the bridge profile, provisioned synchronously (a
130
+ failure here is fatal): a real directory copy of this installation's bundled
131
+ bridge, the session shim, a host-version compatibility exemption, the
132
+ approval gate and an inproc-only cordis patch. The copy converges on every
133
+ launch; `--repair-bridge` is accepted but is a no-op.
134
+ - **`opentui`** — provisioned on EVERY launch, best-effort (a no-op pass is
135
+ sub-second). Pass `--provider` / `--model` / `--reasoning-effort` to pin a
136
+ different default model (default `zai-coding-cn/glm-5.3-flash/high`).
137
+ Provisioning also handles:
138
+ - **Default plugins** — the first run installs the plugin set below into the
139
+ profile and prints its progress (`[3/5] plugins …`). Later runs only repair
140
+ what is missing: nothing is reinstalled when the dependency, the installed
141
+ version and the bundle entry already agree. `--dry-run` (or
142
+ `DSH_PROVISION_DRY_RUN=1`) prints the commands without executing them.
143
+ - **Legacy migration** — a pre-retirement `profiles/dsh-opentui` profile is
144
+ detected once and its theme / config preferences are conservatively copied
145
+ into the `opentui` profile (only keys the target does not already have).
146
+ The legacy profile is kept, never deleted.
147
+ - **SDK closure link** — the client still imports
148
+ `@deepseek-ai/dsh-client-connection` at runtime (host label/lifecycle).
149
+ That SDK is not on the public npm registry; it ships inside the
150
+ globally-installed dsh's own `node_modules` closure, and the launcher
151
+ symlinks it into the installed package's `node_modules` (idempotent). This
152
+ is why the dsh CLI is a hard prerequisite.
144
153
 
145
154
  ### Default plugins
146
155
 
147
- Every launch converges the `opentui` profile to this set (pinned versions):
156
+ The live session runs on the `opentui-inproc` profile, whose cordis patch
157
+ registers the tool, ask-user and MCP rows directly. The `opentui` profile below
158
+ is still provisioned on every launch and is what `upgrade` targets, but its
159
+ plugin set is not loaded by the in-process host. Every launch converges it to
160
+ this set (pinned versions):
148
161
 
149
162
  | Tier | Package | Why |
150
163
  |---|---|---|
@@ -155,7 +168,7 @@ Every launch converges the `opentui` profile to this set (pinned versions):
155
168
  | core | `@aiwayds/dsh-mcp-adapter` | MCP catalog/dispatch meta-tools (`mcp_list` / `mcp_call`) |
156
169
  | core | `@aiwayds/dsh-approval-policy` | tool-approval policy |
157
170
  | core | `@aiwayds/dsh-model-sync` | keeps the model list in sync with the provider catalog |
158
- | recommended | `@aiwayds/dsh-llm-stats` | token/cost accounting behind `/usage` |
171
+ | recommended | `@aiwayds/dsh-llm-stats` | token/cost accounting (usage limits) |
159
172
  | recommended | `@aiwayds/dsh-topics-memory` | cross-session topic memory |
160
173
  | recommended | `@aiwayds/dsh-cron` | scheduled prompts |
161
174
  | recommended | `@aiwayds/dsh-workflow` | dynamic workflow runs |
@@ -230,9 +243,12 @@ The model's thinking streams
230
243
  dim; write-class tool calls (bash / write / edit / apply_patch) pop an approval
231
244
  card — **Enter** allows once, **Esc** declines (fail-closed); read-only tools
232
245
  such as read_file pass straight through. `esc` ×2 + confirm stops a running
233
- turn. Ctrl+C twice quits. Commands:
234
- `/help` `/model [provider/id]` `/usage` `/clear` `/login` `/logout` `/resume`
235
- `/search` `/new` `/quit` and more — see `/help` inside the TUI.
246
+ turn. Ctrl+C twice quits. Commands (see `/help` inside the TUI for the full
247
+ list): `/help` `/model [provider/id]` `/model discover` `/btw` `/plugins`
248
+ `/goals` `/login` `/logout` `/account` `/settings` `/agents` `/skills`
249
+ `/search` `/history` `/subagents` `/session` `/export` `/think` `/preset`
250
+ `/theme` `/language` `/motion` `/hints` `/hotkeys` `/stop` `/resume` `/new`
251
+ `/clear` `/flush` `/quit`.
236
252
 
237
253
  **Approval by default (inproc profile)**: the generated profile pins
238
254
  `defaultPreset: workspace-write` (`approval: ask`) and arms the pre-execute
@@ -254,6 +270,50 @@ notice — set `"autoResume": "last"` in
254
270
  the config). `--new` always starts fresh and wins over both; `--session <id>`
255
271
  pins a specific session.
256
272
 
273
+ ## Capability surface
274
+
275
+ The capability layer is table-driven: `capir/capir.json` (CapIR v3 — 257
276
+ wire→client methods over 43 host artifacts) is the single source of truth, and
277
+ `scripts/gen-capcontract.mjs` generates the id/kind/params/service tables plus
278
+ a generic dispatcher; `node scripts/check-capcontract.mjs` byte-compares the
279
+ generated files (22 assertions). Capabilities are released by an explicit
280
+ per-id allowlist, not a blanket grant. The in-process host currently wires
281
+ **58 of 257** methods (28 hand-written adapters + 30 released generic ids);
282
+ everything else fails explicitly as `NOT_WIRED`, never a silent empty result.
283
+ The `account` / `credentials` / `settings` families are deny-listed from the
284
+ generic arm and served only by hand-written faces with per-field whitelist
285
+ projection. Credential values are redacted to key name + presence before they
286
+ cross the stdio bridge and never land in logs or evidence.
287
+
288
+ Plugin write operations (install/uninstall/enable/disable) are gated twice —
289
+ a bridge-side confirm set (8 `pluginManager` write ids) and a TUI confirmation
290
+ modal. Goal edits confirm in the TUI before each write; they are exempt from
291
+ the bridge confirm set by risk grading (AMEND-5 §11.2) — goals only change
292
+ host-side goal state, with no FS, config or credential surface. Values crossing
293
+ the bridge pass through per-field whitelist projection in both cases.
294
+
295
+ Command faces backed by real host data (0.24–0.25):
296
+
297
+ - **`/btw`** — a side question answered in a throwaway side session; it runs
298
+ alongside a busy main turn (bare `/btw` reopens the last answer).
299
+ - **`/plugins`** — a plugin-manager panel with list + detail and install /
300
+ uninstall / enable / disable behind a confirmation modal; install progress
301
+ is polled with a bounded wait and can be cancelled.
302
+ - **`/goals`** — goal data with 7 operations: status, create, edit, pause,
303
+ resume, complete, clear; writes confirm first.
304
+ - **`/model discover`** — query the current provider for its model list. The
305
+ positive path is environment-dependent and was NOT RUN in the scratch gate
306
+ (no discovery source registered); the honest degrade path is verified.
307
+ - **`/login`** / **`/logout`** / **`/account`** — provider login picker
308
+ (including a Custom form) and account sign-in state, kept in separate
309
+ domains.
310
+ - **`/search`** / **`/history`** / **`/subagents`** — full-text search over
311
+ stored sessions, completed-turn browse/refill/switch/fork, and live subagent
312
+ transcripts with steer/stop.
313
+ - **`/settings`** — now shows a real permission-preset row; config/agents
314
+ faces became real (no degrade notice) in 0.24. `/model` has used the real
315
+ model catalog and selection since 0.24.
316
+
257
317
  ## Develop
258
318
 
259
319
  ```bash
@@ -281,7 +341,22 @@ Note on the @opentui/solid preload and bunfig scope:
281
341
 
282
342
  To rebuild the client bundle that `prepack` ships: `bun scripts/build-client.mjs`.
283
343
 
284
- ### Verification gates (live, client topology)
344
+ ### Verification gates
345
+
346
+ CI runs the integrity and test gates: `node scripts/check-capcontract.mjs`
347
+ (22 byte-level/consistency assertions over the generated capability tables),
348
+ per-package `bun test`, `bun run test:ft`, `bun run typecheck:entry` and the
349
+ `^verify:` assembly tests, plus the `pack-cold-start` job (npm pack → fresh
350
+ install → bridge identity → stdio handshake). The real-machine tmux recipe
351
+ (`scripts/real-client-gate.sh`, historically named "verify70") runs **64**
352
+ items against a live TUI; its CI job is opt-in and needs a self-hosted runner
353
+ with `dsh`, tmux, a provisioned profile and a provider key, so a local run is
354
+ required before keymap/panel/command-surface changes. The legacy podman
355
+ `e2e/scenarios/` container layer was retired in 0.25 (ADR-0013); its still-valid
356
+ assertions moved to the host families, verify70, unit tests and the
357
+ `pack-cold-start` gate.
358
+
359
+ Live client-topology gates (local / self-hosted, not hosted CI):
285
360
 
286
361
  ```bash
287
362
  node packages/shell/scripts/e2e-sweep.mjs # full command-surface sweep
@@ -329,4 +404,24 @@ scene UI matrix and a real-client e2e flow suite), hardens first-connect
329
404
  HTTP + `$events`, retries capped at 3 with the host stderr tail surfaced),
330
405
  and fixes footer wrapping on narrow terminals, tool-dock clipping, the
331
406
  message count after `--resume-last`, and duplicate terminal-size listeners.
332
- Roadmap: platform + Kit polish.
407
+
408
+ 0.24.0 completes the in-process bridge as the sole session seam (the `--remote`
409
+ flag and the `DSH_OPENTUI_INPROC=0` escape hatch are both gone). It adds the
410
+ CapIR/capcontract layer with a startup capability handshake, a FocusRouter
411
+ keymap with a four-tier capture stack, and the S1–S6 capability surface: a real
412
+ `/model` catalog, credentials/account with PKCE authorization, and real
413
+ config/settings/agents faces. The `pack-cold-start` CI gate and the real-machine
414
+ verify70 gate went green; 28 methods were hand-wired and `@manual` reached 0.
415
+
416
+ 0.25.0 (npm `latest`) makes capability release table-driven: CapIR v3 parameter
417
+ tables plus a generic dispatch arm (ADR-0012) and a per-id allowlist take the
418
+ wired set to 58/257 while `check-capcontract` stays green at 22/22 assertions.
419
+ New command faces ride real host data — `/btw` side sessions, a `/plugins`
420
+ manager panel with confirm-gated writes and bounded install progress, `/goals`
421
+ with 7 operations, `/model discover`, separate `/login` and `/account` domains,
422
+ and real `/search`, `/history` and `/subagents` data. The legacy podman
423
+ `e2e/scenarios/` container layer was retired (ADR-0013), verify70 closed at
424
+ 64/64, and the `pack-cold-start` gate is required. `/model discover`'s positive
425
+ path is environment-dependent; it was NOT RUN where no discovery source is
426
+ registered, and is not faked. Current focus: capability-surface polish and
427
+ honest degradation.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@aiwayds/dsh-opentui-bridge",
3
3
  "version": "0.1.0",
4
- "sha256": "131e042cda369c7c612c74bb3d9db0e4467cef1b36979527111aa4829b97105f"
4
+ "sha256": "8e5f7cad7cf11054c4d462117b079f6ddf39b2750c12a2b6479fd583dacdba58"
5
5
  }