@aiwayds/dsh-opentui 0.27.2 β†’ 0.28.1

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,30 @@ 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.28.1] - 2026-11-25
9
+
10
+ ### Added
11
+
12
+ - **`dsh-opentui upgrade` (minimal launcher self-upgrade).** Resolves an npm
13
+ dist-tag (`--tag`, default `latest`) and installs that exact version of
14
+ `@aiwayds/dsh-opentui` globally; `--dry-run` only resolves and prints the
15
+ command. It refuses to downgrade and requires an npm global install β€”
16
+ otherwise use `npm i -g @aiwayds/dsh-opentui` manually. Companions, profiles
17
+ and migrations are left to the next launch.
18
+
19
+ ### Changed
20
+
21
+ - **The activity panel's tabs now use a right-aligned powerline strip.** The old `[1 main] 2 todo` labels no longer ride the top border: they are two solid segments (`🏠 1 main` / `πŸ“‹ 2 todo`) joined and closed by U+E0B0 arrows on the panel's last content row, with two blank columns before the right border. The selected segment uses the current-row colors and the other the raised surface; focus is not encoded again (the panel border already shows it). Narrow terminals shrink the right padding from 2 to 0 before dropping whole label parts β€” names are never cut in half. `alt+1` / `alt+2` and clicking the segment cells still switch tabs; arrows are not clickable.
22
+
23
+ ## [0.28.0] - 2026-11-25
24
+
25
+ ### Changed
26
+
27
+ - **`--force` and `--yes` are deprecated no-ops.** The in-process-only launcher
28
+ does not kill processes or clear markers with these legacy flags; use
29
+ `--repair-bridge` to clear stale instances and repair the bridge. Both flags
30
+ will be removed in the next minor release.
31
+
8
32
  ## [0.27.2] - 2026-11-24
9
33
 
10
34
  ### Changed
@@ -495,7 +519,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
495
519
  config plane (`configSave`, theme/skin persistence, profile/workspace overlay
496
520
  reads) because `BridgeSessionSeam` has no config frame, while the bridge host
497
521
  owns the session plane. 0.23.0 folds config into the bridge (or local files)
498
- and removes the `ensureHost`/`RemoteHostSession` path.
522
+ and removes the `legacy host bootstrap`/`HTTP session facade` path.
499
523
  - The old automatic reconnect (backoff retry) is not implemented; recovery in
500
524
  0.22.0 is manual (`R`, with a 5s cooldown) only.
501
525
  - The inproc bridge's `subagentViews` field set matches the remote seam's, but
@@ -1172,21 +1196,21 @@ it is deprecated in favour of 0.19.0.
1172
1196
 
1173
1197
  - **Turn-end paint-corruption DETECTION infrastructure (Batch B mitigation for the confirmed OpenTUI 0.7.0 engine bug).** A long streaming turn corrupts the native diff-paint state β€” reply rows bleed into the input box and SIGWINCH does NOT heal it (only a renderer state reset does; 0.8.2 tried and reverted). `packages/shell/src/client/turn-heal.ts` lands the detection half only: `createTurnHeal` wraps the client entry's session surface (same Proxy pattern as `aggregateTurnContext`, real-target accessors), churn-tracks every turn (content deltas + streamed chars + streaming seconds) and schedules exactly ONE deferred heal per threshold trip at turn end (settle delay 1000ms; a newer `turn()` voids a pending heal β€” never bounce the terminal mid-turn; the settlement `finally` anchor also covers error endings without `onTurnEnd`, idempotent per turn seq). Thresholds `maxChars 2000 / maxDeltas 400 / maxSecs 120` are tuned from the deterministic tear repro (60-sentence weather prompt: ~299 torn frames over ~150s, ~2.7k streamed chars β€” trips all three; an ordinary short turn ~<500 chars, <30s trips none). The heal ACTION is a deliberate no-op stub via the `heal` factory seam: the cheapest API candidate, `renderer.suspend()` β†’ `resume()` (native terminal transition cycle + forceFullRepaint on resume), was FALSIFIED by the live tear repro (2026-11-05) β€” the turn froze at end, screen static and torn from the turn-end frame onward, idle placeholder never returned, subsequent input dead (suspend halts the render loop and its native transition never completes in this configuration, so resume is impossible). DO NOT RETRY the suspend/resume bounce. The remaining mechanism, threshold-based renderer recreation at turn end, needs ShellHost state (input buffer, transcript, dock, focus) externalized first β€” a ShellHost edit would break the dist-host zero-diff gate, so it is out of this batch's scope; the seam makes recreation a one-line swap once that refactor lands. Tests: `test/turn-heal.test.ts` (10 tests β€” threshold trips per counter, one-heal-per-turn, newer-turn voiding, error-path settlement, heal-factory-null skip, proxy pass-through). 10 tests ride the shell suite (277 ran / 3 skip / 0 fail); dist-host rebuild verified byte-identical (client modules not bundled).
1174
1198
 
1175
- - **e2e-sweep hardened to the 68-item gate + a `KNOWN_STALL` annotation.** The sweep's own false-PASS/false-FAIL classes are closed: the `/preset` probe now waits for the picker's real anchors (its dispatch is ASYNC via the host `listPresets` RPC β€” the old wait returned on a stale `/config` frame whose "minimal" text collided with the marker, then escaped at nothing and the late picker leaked into `/model`: a recorded false-PASS), and the pane settles (stable-frame poll) BEFORE the close esc fires so a late-opening picker is actually up; first-key-drop guards generalize β€” `submit()`'s verify/clean/retype (now RAW-verified; `flat()` strips the leading `/` and would pass the broken state) plus a new `typeVerified` for raw bursts (a dropped `/` turned `/login` into the plain prompt "login", a REAL turn); a vacuous `/search` anchor is dropped (`search:` matched the `/hotkeys` keybinding row under `flat()`, passing frames where the response row never painted); `settlePane` polls until two consecutive captures agree (digits stripped β€” the powerline clock ticks every second) instead of fixed sleeps; `ensureIdle` declines a pending ask overlay / disarms a stray stop-confirm before waiting; `cleanBuffer` verifies the idle row and re-sweeps once (full-load render stalls drop BACKSPACES too, leaking half-cleared buffers into the next command). The two render-paint stall items (`palette filter /lo`, `alt+enter newline` β€” both verified correct in isolation) print as `KNOWN-STALL` in the summary while still COUNTING as failures in the RESULT/exit gate. Validation run (batch D): 65 PASS / 2 KNOWN-STALL / 1 CHECK β€” the cleanest recorded sweep.
1199
+ - **legacy command-surface sweep (retired) hardened to the 68-item gate + a `KNOWN_STALL` annotation.** The sweep's own false-PASS/false-FAIL classes are closed: the `/preset` probe now waits for the picker's real anchors (its dispatch is ASYNC via the host `listPresets` RPC β€” the old wait returned on a stale `/config` frame whose "minimal" text collided with the marker, then escaped at nothing and the late picker leaked into `/model`: a recorded false-PASS), and the pane settles (stable-frame poll) BEFORE the close esc fires so a late-opening picker is actually up; first-key-drop guards generalize β€” `submit()`'s verify/clean/retype (now RAW-verified; `flat()` strips the leading `/` and would pass the broken state) plus a new `typeVerified` for raw bursts (a dropped `/` turned `/login` into the plain prompt "login", a REAL turn); a vacuous `/search` anchor is dropped (`search:` matched the `/hotkeys` keybinding row under `flat()`, passing frames where the response row never painted); `settlePane` polls until two consecutive captures agree (digits stripped β€” the powerline clock ticks every second) instead of fixed sleeps; `ensureIdle` declines a pending ask overlay / disarms a stray stop-confirm before waiting; `cleanBuffer` verifies the idle row and re-sweeps once (full-load render stalls drop BACKSPACES too, leaking half-cleared buffers into the next command). The two render-paint stall items (`palette filter /lo`, `alt+enter newline` β€” both verified correct in isolation) print as `KNOWN-STALL` in the summary while still COUNTING as failures in the RESULT/exit gate. Validation run (batch D): 65 PASS / 2 KNOWN-STALL / 1 CHECK β€” the cleanest recorded sweep.
1176
1200
 
1177
1201
  - **`DSH_OPENTUI_DEBUG` input-line trace layer.** kit `InputLine`'s key path appends per-event JSON lines to `/tmp/host-inputline.log` (same env-gate + lazy-fs pattern as ShellHost's `/tmp/host-keys.log`; no-op when unset): every key event (name/sequence/modifiers), whether the slash palette's `onKeyFilter` consumed it or it passed to the editor, history-nav up/down with the consumed verdict, and each `onContentChange`/`onSubmit` β€” the handlerβ†’textarea bisect for stall incidents.
1178
1202
 
1179
- - **`e2e-sweep.mjs` β€” the full command-surface sweep gate (client mode).** Drives EVERY slash command and keyboard surface through the real client topology in tmux 120x34 (one char per send-keys, ~60ms gap β€” burst writes drop keys in OpenTUI's input parser): the read-only commands, every overlay picker with item-text anchors (kit Select title rows paint blank β€” anchor on items), `/config` bare/set/invalid forms, the `/login` panel + headless REF forms, the slash palette (filter ↑↓ tab enter), input history recall (↑↑ across `/`-entries β€” the palette must NOT own the arrows), alt+enter newline, bracketed paste, PgUp/PgDn scroll, ctrl+t/ctrl+o dock toggles, and the esc stop-confirm armβ†’resume/abort β€” plus the keystroke-leak regressions (modal-consumed keys must never type into the blurred editor; see Fixed below). Runs under a scratch `DSH_HOME` (temp dir, mode 700) seeded from the real profile so login/logout/config/preset writes never touch the user's home; real turns only where a surface needs one, via the workingRoute pattern (no route β†’ those items report BLOCKED loudly and everything else still gates); per-item captures land in a temp caps dir; self-skips (exit 0) when `dsh`/`tmux`/`bun` are missing so CI stays green. README documents the four live verification gates.
1203
+ - **`legacy command-surface sweep (retired)` β€” the full command-surface sweep gate (client mode).** Drives EVERY slash command and keyboard surface through the real client topology in tmux 120x34 (one char per send-keys, ~60ms gap β€” burst writes drop keys in OpenTUI's input parser): the read-only commands, every overlay picker with item-text anchors (kit Select title rows paint blank β€” anchor on items), `/config` bare/set/invalid forms, the `/login` panel + headless REF forms, the slash palette (filter ↑↓ tab enter), input history recall (↑↑ across `/`-entries β€” the palette must NOT own the arrows), alt+enter newline, bracketed paste, PgUp/PgDn scroll, ctrl+t/ctrl+o dock toggles, and the esc stop-confirm armβ†’resume/abort β€” plus the keystroke-leak regressions (modal-consumed keys must never type into the blurred editor; see Fixed below). Runs under a scratch `DSH_HOME` (temp dir, mode 700) seeded from the real profile so login/logout/config/preset writes never touch the user's home; real turns only where a surface needs one, via the workingRoute pattern (no route β†’ those items report BLOCKED loudly and everything else still gates); per-item captures land in a temp caps dir; self-skips (exit 0) when `dsh`/`tmux`/`bun` are missing so CI stays green. README documents the four live verification gates.
1180
1204
 
1181
- - **Client-mode gate hardening: full accessor audit through the real session wrapper (77 members) + e2e-client scenario h.** Closes the fake-coverage hole that shipped the `/login` crash (3dec270): until now the client-mode tests drove FAKE sessions through the `aggregateTurnContext` wrapper, so the proxy/accessor seam β€” the wrapper's `this` binding against the real class's `#field`-backed getters β€” had zero coverage, and the `Cannot access private method or accessor` crash reached a live TUI. (1) Accessor audit (`test/client-entry.test.ts`, +18 tests): EVERY public member of `RemoteHostSession` (77) is now driven through a REAL instance wrapped by the REAL `aggregateTurnContext` β€” the exact object ShellHost receives in client mode. The contract under test: behavior is IDENTICAL through the wrapper β€” no accessor error anywhere, and every documented result shape holds (the fake connection answers `{}` per RPC and the socket factory throws a business error, so degraded members surface their documented degradation: `[]` / error string / business-error rejection, the same shapes the raw instance produces). Coverage spans all surfaces: fields (identity β€” `usage`/`lastTurnStats` pass through as the same references, `remoteTailSink` SETS land on the real target for the ShellHost wiring), `status`, `settingsSeam` (the `/login` crash path: `describe()`/`mutate()` drive `#settingsClient`), lifecycle + turn control (start/turn/steer/abort/newSession/resumeSession/dispose β€” dispose is clean and idempotent through the wrapper), telemetry, model/session-ops/preset/settings-credentials/push-listener/config/wave-3-local (agents, repair, git)/plugins-skills-reload/tail-attachments/subagent surfaces, cold-guard sync-throw parity, the deep chain (failed turn adopts the session id β†’ session-bound members run β†’ abort clears), and the exit-path routing (shutdown, then the real `process.exit`). (2) `e2e-client.mjs` scenario h β€” `/login` provider directory: bare `/login` opens the provider picker through the aggregateTurnContext proxy (`settingsSeam` β†’ `#settingsClient`), known provider names render, esc closes cleanly with the editor back to idle and the powerline intact (twice, for proxy state-machine stability), and no TypeError/crash markers appear in the pane scrollback or the exit; no credential writes (opening the picker touches nothing). The gate suite is now 8 scenarios (a–h); live run 8/8.
1205
+ - **Client-mode gate hardening: full accessor audit through the real session wrapper (77 members) + legacy client-topology gate (retired) scenario h.** Closes the fake-coverage hole that shipped the `/login` crash (3dec270): until now the client-mode tests drove FAKE sessions through the `aggregateTurnContext` wrapper, so the proxy/accessor seam β€” the wrapper's `this` binding against the real class's `#field`-backed getters β€” had zero coverage, and the `Cannot access private method or accessor` crash reached a live TUI. (1) Accessor audit (`test/client-entry.test.ts`, +18 tests): EVERY public member of `HTTP session facade` (77) is now driven through a REAL instance wrapped by the REAL `aggregateTurnContext` β€” the exact object ShellHost receives in client mode. The contract under test: behavior is IDENTICAL through the wrapper β€” no accessor error anywhere, and every documented result shape holds (the fake connection answers `{}` per RPC and the socket factory throws a business error, so degraded members surface their documented degradation: `[]` / error string / business-error rejection, the same shapes the raw instance produces). Coverage spans all surfaces: fields (identity β€” `usage`/`lastTurnStats` pass through as the same references, `remoteTailSink` SETS land on the real target for the ShellHost wiring), `status`, `settingsSeam` (the `/login` crash path: `describe()`/`mutate()` drive `#settingsClient`), lifecycle + turn control (start/turn/steer/abort/newSession/resumeSession/dispose β€” dispose is clean and idempotent through the wrapper), telemetry, model/session-ops/preset/settings-credentials/push-listener/config/wave-3-local (agents, repair, git)/plugins-skills-reload/tail-attachments/subagent surfaces, cold-guard sync-throw parity, the deep chain (failed turn adopts the session id β†’ session-bound members run β†’ abort clears), and the exit-path routing (shutdown, then the real `process.exit`). (2) `legacy client-topology gate (retired)` scenario h β€” `/login` provider directory: bare `/login` opens the provider picker through the aggregateTurnContext proxy (`settingsSeam` β†’ `#settingsClient`), known provider names render, esc closes cleanly with the editor back to idle and the powerline intact (twice, for proxy state-machine stability), and no TypeError/crash markers appear in the pane scrollback or the exit; no credential writes (opening the picker touches nothing). The gate suite is now 8 scenarios (a–h); live run 8/8.
1182
1206
 
1183
1207
  - **`ask_user_question` Q&A transcript block.** The model's ask now leaves a readable record in the message flow instead of evaporating with the ephemeral overlay: the durable `tool/call` (questions + options, the dsh-user-questions wire schema) pairs with its `tool/result` (the answer batch; declined arrives as `{selected: [], custom: "declined"}`) into ONE `ask` transcript item β€” question pops in accent, options sit dimmed, the user's pick is marked βœ“ in the user color, and a declined question renders honestly as "declined" (kit `askLines` shared by the rich JSX path and the scrollback line window; the `ask` kind is additive β€” persisted items without it keep rendering). Live turn: ShellHost parses the call args at `onToolStart` and, because the live pipeline caps the result brief at 300 chars (multi-question batches truncate), the ask overlay stashes its own picks β€” `buildAskTranscriptItem` prefers the parsed result and falls back to the stash; with NEITHER available the block is skipped entirely (no fabricated answers; a hard-failed result renders declined, the honest outcome). Replay parity (client mode): `journalToTranscriptRows` folds the durable tool pair into `ask` rows, so resume, fork-at-turn and the re-attach wake rebuild the Q&A block from the journal β€” `StoredTranscriptRow` widens the seam end to end (the `shell-session.ts` compile-time conformance guard, `client-entry` drops its `as unknown as HostSession` cast, `model-select`/`history-fork` ride the surface). Known limitation: in PLUGIN mode the host's `storedTranscript` still returns user/assistant rows only, so the block paints live but does not replay on resume there. An ask call with no settled result renders nothing (mid-turn replay / errored read). Tests: `test/ask-transcript.test.ts` + the `remote-host-session` tool-pairβ†’dock-callbacks test over the shared `client-fakes.ts` builders, plus kit `test/frames/ask-block.test.tsx`.
1184
1208
 
1185
- - **Client-mode two-process E2E gate (`packages/shell/scripts/e2e-client.mjs`, ADR-0005 P6).** The release gate drives the REAL topology end to end: `./dsh-opentui --client` inside tmux 120x34 panes, the resident `dsh --profile opentui` host it spawns, and real model turns. Seven scenarios: (a) boot + turn with the status-bar route/context assertions, (b) multi-TUI attach (second client JOINS the same host pid; both quit β†’ the detached idle-reaper idles the host out), (c) crash-recovery adoption (SIGKILL the client β†’ the host survives β†’ the next client adopts it, no respawn), (d) `/reload` same-port restart (carrier reconnect + wave-2 re-attach; acceptance: transcript rows single-painted and the restarted host MANAGED β€” lockfile rewritten with the new listener pid), (e) host-death recovery (SIGKILL the host mid-turn β†’ reconnecting state β†’ a fresh client respawns and continues; also surfaced a renderer sampling gap in the reconnecting label swap, recorded for the UI follow-up), (f) THE ORIGINAL acceptance scenario β€” `用一δΈͺmarkdownθ‘¨ζ Όεˆ—ε‡ΊδΈ€η§θ―­θ¨€ε’Œεˆ›ε»ΊεΉ΄δ»½οΌŒε†ε†™δΈ€ε₯ζ€»η»“` renders a real bordered table + summary + bottom anchor (capture to `/tmp/p6-mdtable.txt`, PNG via `/tmp/tmux2png.py`), (g) workspace config effect (dracula theme + model preference from `./.dsh/config.yml` verified through truecolor SGR capture). Every real-turn scenario rides the wave-3 workingRoute discovery (probe `session/modelCatalog` + turns until a route answers, export via `DSH_OPENTUI_MODEL`); when no route answers the non-turn assertions still run and the turn parts are marked BLOCKED loudly instead of hacked. Typing is one char per tmux `send-keys` (~60ms gap, burst writes drop keys); the script skips (exit 0) on CI-unfriendly environments (no global dsh/tmux/bun/profile). The scenario-d listener probe is LISTEN-only (`lsof -sTCP:LISTEN`): unfiltered `-ti tcp:N` also lists the client's ESTABLISHED sockets, which produced a false oldfox-P1#2 reproduction in the first gate run. Gate evidence at flip time: 7 pass / 0 blocked, zero oldfox-P1 reproductions. The known-P1 watch list it enforces doubles as the oldfox review summary (see Fixed below).
1209
+ - **Client-mode two-process E2E gate (`legacy client-topology gate (retired)`, ADR-0005 P6).** The release gate drives the REAL topology end to end: `./dsh-opentui --client` inside tmux 120x34 panes, the resident `dsh --profile opentui` host it spawns, and real model turns. Seven scenarios: (a) boot + turn with the status-bar route/context assertions, (b) multi-TUI attach (second client JOINS the same host pid; both quit β†’ the detached idle-reaper idles the host out), (c) crash-recovery adoption (SIGKILL the client β†’ the host survives β†’ the next client adopts it, no respawn), (d) `/reload` same-port restart (carrier reconnect + wave-2 re-attach; acceptance: transcript rows single-painted and the restarted host MANAGED β€” lockfile rewritten with the new listener pid), (e) host-death recovery (SIGKILL the host mid-turn β†’ reconnecting state β†’ a fresh client respawns and continues; also surfaced a renderer sampling gap in the reconnecting label swap, recorded for the UI follow-up), (f) THE ORIGINAL acceptance scenario β€” `用一δΈͺmarkdownθ‘¨ζ Όεˆ—ε‡ΊδΈ€η§θ―­θ¨€ε’Œεˆ›ε»ΊεΉ΄δ»½οΌŒε†ε†™δΈ€ε₯ζ€»η»“` renders a real bordered table + summary + bottom anchor (capture to `/tmp/p6-mdtable.txt`, PNG via `/tmp/tmux2png.py`), (g) workspace config effect (dracula theme + model preference from `./.dsh/config.yml` verified through truecolor SGR capture). Every real-turn scenario rides the wave-3 workingRoute discovery (probe `session/modelCatalog` + turns until a route answers, export via `DSH_OPENTUI_MODEL`); when no route answers the non-turn assertions still run and the turn parts are marked BLOCKED loudly instead of hacked. Typing is one char per tmux `send-keys` (~60ms gap, burst writes drop keys); the script skips (exit 0) on CI-unfriendly environments (no global dsh/tmux/bun/profile). The scenario-d listener probe is LISTEN-only (`lsof -sTCP:LISTEN`): unfiltered `-ti tcp:N` also lists the client's ESTABLISHED sockets, which produced a false oldfox-P1#2 reproduction in the first gate run. Gate evidence at flip time: 7 pass / 0 blocked, zero oldfox-P1 reproductions. The known-P1 watch list it enforces doubles as the oldfox review summary (see Fixed below).
1186
1210
 
1187
1211
  - **Launcher default flipped to client mode; `--plugin` is the transitional escape hatch.** Root `./dsh-opentui` now execs the bun thin client (`src/client-entry.tsx` with the solid-js preload) by DEFAULT β€” per ADR-0005, gated on exactly this P6 E2E gate passing 7/7 including the scenario-d single-paint + managed-host acceptance. `--plugin` keeps the OLD in-process plugin-mode boot (`dsh --profile dsh-opentui` + `NODE_OPTIONS=--experimental-ffi`) as a documented transitional escape hatch; `--client` is accepted as a no-op alias. Plugin path re-verified post-flip: boots in tmux, status bar renders (`dsh(native) Β· zai-coding-cn Β· glm-5.3-flash Β· 🧠 Β· βŽ‡ main`), clean quit.
1188
1212
 
1189
- - **Transport lazy-import (self-contained test graph).** `src/client/transport.ts` no longer imports `@deepseek-ai/dsh-client-connection` at module top level β€” the SDK is loaded lazily inside connect, so the unit-test graph (and CI) runs without the global dsh closure installed; CI stubs the closure packages anyway.
1213
+ - **Transport lazy-import (self-contained test graph).** `retired HTTP transport module` no longer imports `@deepseek-ai/dsh-client-connection` at module top level β€” the SDK is loaded lazily inside connect, so the unit-test graph (and CI) runs without the global dsh closure installed; CI stubs the closure packages anyway.
1190
1214
 
1191
1215
  ### Changed
1192
1216
 
@@ -1209,7 +1233,7 @@ it is deprecated in favour of 0.19.0.
1209
1233
 
1210
1234
  - **Installer broke on 0.4.3-era profiles: duplicate `patchedDependencies:` blocks (pnpm ERR duplicate mapping key) and a stale direct `solid-js` dep winning the root hoist.** Both defects surfaced in the live profile migration (backups `pnpm-workspace.yaml.bak-1793930433-dupfix` / `package.json.bak-1793930690-stale-solid`). (1) `ensureSolidPatch`'s `stripStale` line-filter never stripped a well-formed other-version key (`solid-js@1.9.12: …` β€” the negative lookahead `\d+\.\d+\.\d+:` matches it, so the `!test` guard kept the line) and then APPENDED a second top-level `patchedDependencies:` block; pnpm rejects the yaml outright ("duplicate mapping key") and the profile would not install. It is now a YAML-aware merge of pnpm's flat string map (`scripts/solid-js-pin.mjs`): every top-level block is parsed into its entries, any `solid-js@<β‰ current>` key is dropped, every other package's patch key is kept verbatim, and ONE merged block is written back at the first block's position β€” duplicate headers collapse, non-patch top-level keys are preserved byte-for-byte, a block the reader cannot parse is left untouched rather than half-rewritten, and a re-run is byte-idempotent. (2) The installer's dependency-unfold kept a 0.4.3-era `"solid-js": "1.9.12"` direct dep from the profile's package.json, which hoisted 1.9.12 (SSR build) over the patchedDependencies fix until hand-removed; `pinSolidJsDependency` (same module, wired into `scripts/install-profile.mjs`) now replaces any existing solid-js spec β‰  1.9.17 in the unfold β€” an absent dep stays absent, the patch key alone owns the pin. Tests: `test/solid-js-pin.test.ts` (9 β€” fresh workspace, stale-key merge, unrelated patch key preserved, the exact live duplicate-block backup shape collapsed + idempotence, append-when-missing, dep replace/absent/kept, installer wiring source guard). Scratch round-trip from the live pre-state (published 0.4.3 closure really hoisting solid-js@1.9.12 + the real 1.9.12 patch from git history + the exact duplicate-block workspace backup + the stale direct dep): installer exits 0 with no ERR, one merged block, `"solid-js": "1.9.17"` in the profile, solid-js@1.9.17 client build hoisted, dsh-llm linked, real `dsh --profile` boot renders with zero hand fixes.
1211
1235
 
1212
- - **Login/logout panel boxes collapsed under a content-bearing transcript, and dock-adjacent cards clipped or grew unbounded (auto-height boxes in a flex column).** Root cause: once the `flexGrow` transcript holds rows, auto-height sibling boxes collapse inside the flex column β€” the `/login` entry, confirm and notice boxes overpainted onto a single mangled line (title/hint interleaved; the same kit-Select constraint, documented there). Every dock-adjacent card now pins explicit `width: "100%"` + a height computed from its rendered rows: login entry 7 / confirm 6 / notice 5 (border 2 + padding 2 + content rows, `login.tsx`); ShellHost stop-confirm 6, steer 5, subagent viewer 12 (was 10 β€” the last viewer rows clipped), the btw box sized to its content (5 + per-pair Q + up-to-4 A rows, last 2 pairs) instead of `maxHeight: 10`, and the queue box bounded to its LAST 6 messages with computed height instead of `maxHeight: 8` (unbounded growth clipped mid-list). Plus the empty-commit guard on the login entry stage: Enter on an empty buffer used to register a garbage route (writeRoute runs before the credential write) AND fire `credentials.set` with `""` β€” the host rejects it ("invalid payload for credentials.set") and the panel closed, so a re-sent Enter (dropped-keypress retry) destroyed the open stage with no user input; an empty buffer is now a swallowed no-op, esc stays the cancel path. Regression-covered by `scripts/ft-paste.tsx` Β§5 (three Enters keep the stage open, zero login calls, esc still cancels) and the e2e-sweep login/logout/stop sections against the live panel. `dist-host/index.js` rebuilt from source.
1236
+ - **Login/logout panel boxes collapsed under a content-bearing transcript, and dock-adjacent cards clipped or grew unbounded (auto-height boxes in a flex column).** Root cause: once the `flexGrow` transcript holds rows, auto-height sibling boxes collapse inside the flex column β€” the `/login` entry, confirm and notice boxes overpainted onto a single mangled line (title/hint interleaved; the same kit-Select constraint, documented there). Every dock-adjacent card now pins explicit `width: "100%"` + a height computed from its rendered rows: login entry 7 / confirm 6 / notice 5 (border 2 + padding 2 + content rows, `login.tsx`); ShellHost stop-confirm 6, steer 5, subagent viewer 12 (was 10 β€” the last viewer rows clipped), the btw box sized to its content (5 + per-pair Q + up-to-4 A rows, last 2 pairs) instead of `maxHeight: 10`, and the queue box bounded to its LAST 6 messages with computed height instead of `maxHeight: 8` (unbounded growth clipped mid-list). Plus the empty-commit guard on the login entry stage: Enter on an empty buffer used to register a garbage route (writeRoute runs before the credential write) AND fire `credentials.set` with `""` β€” the host rejects it ("invalid payload for credentials.set") and the panel closed, so a re-sent Enter (dropped-keypress retry) destroyed the open stage with no user input; an empty buffer is now a swallowed no-op, esc stays the cancel path. Regression-covered by `scripts/ft-paste.tsx` Β§5 (three Enters keep the stage open, zero login calls, esc still cancels) and the legacy command-surface sweep (retired) login/logout/stop sections against the live panel. `dist-host/index.js` rebuilt from source.
1213
1237
 
1214
1238
  - **Consumed modal keys typed into the blurred editor (engine-focus ghost double delivery), and history recall left the palette owning the arrows.** Four related ghosts in `ShellHost.tsx`: (1) every modal key handler (stop-confirm, approval card, subagent viewer + steer entry, login panel stages, dock toggles, picker hotkeys, scroll keys) now `preventDefault()`s the keys it consumes β€” a consumed key was ALSO delivered to the editor holding the ghost engine focus, so the login confirm "y" typed itself into the input line and the next submit rode the residue (`/model` went out as the prompt "y/model"); (2) login panel close reclaims the focus imperatively via a `createEffect(on(panelOpen))` flip of the focus key (the same teardown guard the overlay paths run β€” the panel's menu Select holds the engine focus while mounted and its unmount can leave it on the blurred editor; the focused-prop flip alone does not reclaim the singleton); (3) history recall closes the slash palette β€” recalling a `/`-entry re-arms it, and up/down then moved the menu highlight instead of walking history; (4) the textarea's own `onContentChange` echo of programmatic writes (history recall, setValue) no longer re-opens the palette the recall just closed (echo skipped when the value equals the current signal β€” a typed edit never matches). `dist-host/index.js` rebuilt from the source (added `preventDefault` lines match the source diff 17 = 17). Verified: `bun run typecheck` (`tsc --noEmit`) exit 0 in `packages/shell`; the sweep harness (Added above) is the live regression gate for the leak scenarios. UI fixes unrelated to the 0.2.2-rc.1 closure ride β€” landed after it as their own commits.
1215
1239
 
@@ -1219,9 +1243,9 @@ it is deprecated in favour of 0.19.0.
1219
1243
 
1220
1244
  - **Client-mode `/login` crash (Proxy wrapper accessors).** The `aggregateTurnContext` Proxy wrapper computed accessors on the proxy receiver (`Reflect.get(target, prop, receiver)`), so private-field getters threw `Cannot access private method or accessor` the moment they touched a `#field` β€” `/login` crashed reading `settingsSeam` β†’ `#settingsClient` (features/login.tsx). The `get` trap now resolves every property on the real target (`Reflect.get(target, prop, target)`) with functions still bound to it, so getters and methods uniformly run with the real target as `this`. Regression test drives the real instance through the real wrapper (`settingsSeam` shape + pass-through members) in `test/client-entry.test.ts`. Live evidence: `/login` provider directory renders, esc exits clean.
1221
1245
 
1222
- - **oldfox review P1Γ—4** (client-mode review watch list, enshrined as the e2e gate's P1 watches). (1) Re-attach seq-baseline dedup: `RemoteFollowSession.attach` takes the last durable seq painted before the gap (`sinceSeq`) and skips every snapshot record at/below it whole β€” no re-journal, no re-fold, no re-announce β€” so reconnect/restart replays never double-paint transcript rows; a belt-and-braces `#announcedToolCalls` set stops duplicate `onToolStart` even for above-baseline replays (scenario d: `"❯ say ok"` rows=1, `"turns 0"` rows=1 after a live `/reload`). (2) `/reload` lockfile rewrite: `restartSamePortHost` re-writes the single-instance lockfile (lifecycle `writeLock` shape, atomic tmp+rename) with the NEW pid + same port after the respawn β€” the restarted host stays MANAGED, so the next `ensureHost` adopts it instead of double-booting on the port and the idle reaper holds the right pid (scenario d: lockfile pid = live listener pid). (3) Concurrent cold-boot mutual exclusion: the booter claims the lockfile as an atomic `booting` placeholder (pid = booter, port 0, create-if-absent via `link(2)`); a rival waits out the foreign claim (join on completion, takeover when the booter dies or the join budget lapses β€” foreign pid never signaled) and a superseded booter kills its own child (`HostBootSupersededError`) instead of clobbering the winner's lock β€” two simultaneously launched TUIs can no longer spawn dual hosts. (4) Events-source close-guard: closing a still-CONNECTING mux socket emits `'error'` asynchronously AFTER the pump listeners are removed; a noop handler stays attached so it can never surface as an uncaught exception (same fix pattern as remote-stream.ts).
1246
+ - **oldfox review P1Γ—4** (client-mode review watch list, enshrined as the e2e gate's P1 watches). (1) Re-attach seq-baseline dedup: `RemoteFollowSession.attach` takes the last durable seq painted before the gap (`sinceSeq`) and skips every snapshot record at/below it whole β€” no re-journal, no re-fold, no re-announce β€” so reconnect/restart replays never double-paint transcript rows; a belt-and-braces `#announcedToolCalls` set stops duplicate `onToolStart` even for above-baseline replays (scenario d: `"❯ say ok"` rows=1, `"turns 0"` rows=1 after a live `/reload`). (2) `/reload` lockfile rewrite: `restartSamePortHost` re-writes the single-instance lockfile (lifecycle `writeLock` shape, atomic tmp+rename) with the NEW pid + same port after the respawn β€” the restarted host stays MANAGED, so the next `legacy host bootstrap` adopts it instead of double-booting on the port and the idle reaper holds the right pid (scenario d: lockfile pid = live listener pid). (3) Concurrent cold-boot mutual exclusion: the booter claims the lockfile as an atomic `booting` placeholder (pid = booter, port 0, create-if-absent via `link(2)`); a rival waits out the foreign claim (join on completion, takeover when the booter dies or the join budget lapses β€” foreign pid never signaled) and a superseded booter kills its own child (`HostBootSupersededError`) instead of clobbering the winner's lock β€” two simultaneously launched TUIs can no longer spawn dual hosts. (4) Events-source close-guard: closing a still-CONNECTING mux socket emits `'error'` asynchronously AFTER the pump listeners are removed; a noop handler stays attached so it can never surface as an uncaught exception (same fix pattern as remote-stream.ts).
1223
1247
 
1224
- - **oldfox review P2Γ—2.** (1) Reaper adoption liveness bump: `adoptHost` touches the lockfile (fresh `startedAt`/mtime) and the detached idle reaper spares a lock touched within the last 30s even without an ESTABLISHED connection β€” a client that adopted at the grace edge can still be inside its ~15s cookie-mint budget when the reaper fires. (2) Re-attach budget aligned to the restart budget: `REATTACH_MAX_ATTEMPTS` 10 β†’ 30 (30Γ—1s β‰ˆ the `/reload` readiness budget of 30s) β€” the re-attach no longer gives up (erroring the awaited turn) ~20s before the restarted host can even listen again; cadence and cap are injectable for tests.
1248
+ - **oldfox review P2Γ—2.** (1) Reaper adoption liveness bump: `adoptHost` touches the lockfile (fresh `startedAt`/mtime) and the detached idle reaper spares a lock touched within the last 30s even without an ESTABLISHED connection β€” a client that adopted at the grace edge can still be inside its ~15s cookie-mint budget when the reaper fires. (2) Re-attach budget aligned to the restart budget: `reattach attempt cap` 10 β†’ 30 (30Γ—1s β‰ˆ the `/reload` readiness budget of 30s) β€” the re-attach no longer gives up (erroring the awaited turn) ~20s before the restarted host can even listen again; cadence and cap are injectable for tests.
1225
1249
 
1226
1250
  - **Seam: `/reload` never acts on a `booting` placeholder.** With cold-boot mutual exclusion in place (P1#3), the lifecycle lockfile can transiently be a booting claim naming the BOOTER's pid with port 0; `restartSamePortHost` now parses `booting` and refuses with a typed `HostRestartError` (`code: "host-booting"`) instead of SIGTERMing the booting client, and its stale-lock clear step never deletes a rival's placeholder. Tested in `test/remote-btw-restart.test.ts` (booter pid stays alive, placeholder untouched).
1227
1251
 
@@ -1233,23 +1257,23 @@ it is deprecated in favour of 0.19.0.
1233
1257
 
1234
1258
  ### Added
1235
1259
 
1236
- - **Client-mode foundations (ADR-0005 P1/P5).** The TUI-as-thin-client path gets its four base layers. `src/client/cookie-mint.ts` mints the Host API cookie from the persisted `client-connection/browser-session` grant in `$DSH_HOME/.credentials.yaml`, reproducing the Host's own recipe byte-for-byte (BrowserAuth/dsh-credentials: cookie name `dsh-auth-` + base64url(sha256(authority)); value `v1.<body>.<base64url(HMAC-SHA256(secret, body))>`), fail-closed on non-owner-only credentials and with no secret/cookie material in any thrown error. `src/client/mux-frame.ts` + `events-source.ts` + `transport.ts` give a `ClientConnection` carrier over one authenticated `/api/remote.mux` WebSocket (`ws`, cookie on the upgrade β€” the global WebSocket cannot send headers): unary RPC via `POST /api`, and the `$events` mux pump behind `dsh-client-connection`'s `ConnectionGenerationSource` β€” the pump is deliberately chosen over the gateway-native `ClientRemoteEvents` client because waterfall frames must reach the consumer's `onEvent` (v1 answers them in-process), while the gateway source intercepts waterfall frames and auto-answers them itself with a stub typert service. `src/client/lifecycle.ts` is the host lifecycle manager `ensureHost`: first-TUI spawn, single-instance lock with stale-lock takeover, refcounted attach/detach, idle exit after `idleExitSec` (default 60s, `0` = resident), respawn crash cap. `scripts/provision-opentui-profile.mjs` idempotently bootstraps the fixed `opentui` host profile via `dsh opentui --from-default-profile web --dump-config` (compose-and-exit, no boot; touches only that one profile). 64 green tests in `packages/shell`; design background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1260
+ - **Client-mode foundations (ADR-0005 P1/P5).** The TUI-as-thin-client path gets its four base layers. `src/client/cookie-mint.ts` mints the Host API cookie from the persisted `client-connection/browser-session` grant in `$DSH_HOME/.credentials.yaml`, reproducing the Host's own recipe byte-for-byte (BrowserAuth/dsh-credentials: cookie name `dsh-auth-` + base64url(sha256(authority)); value `v1.<body>.<base64url(HMAC-SHA256(secret, body))>`), fail-closed on non-owner-only credentials and with no secret/cookie material in any thrown error. `src/client/mux-frame.ts` + `events-source.ts` + `retired HTTP transport module` give a `HTTP client carrier` carrier over one authenticated `/api/remote.mux` WebSocket (`ws`, cookie on the upgrade β€” the global WebSocket cannot send headers): unary RPC via `POST /api`, and the `$events` mux pump behind `dsh-client-connection`'s `ConnectionGenerationSource` β€” the pump is deliberately chosen over the gateway-native `ClientRemoteEvents` client because waterfall frames must reach the consumer's `onEvent` (v1 answers them in-process), while the gateway source intercepts waterfall frames and auto-answers them itself with a stub typert service. `retired HTTP lifecycle module` is the host lifecycle manager `legacy host bootstrap`: first-TUI spawn, single-instance lock with stale-lock takeover, refcounted attach/detach, idle exit after `idleExitSec` (default 60s, `0` = resident), respawn crash cap. `scripts/provision-opentui-profile.mjs` idempotently bootstraps the fixed `opentui` host profile via `dsh opentui --from-default-profile web --dump-config` (compose-and-exit, no boot; touches only that one profile). 64 green tests in `packages/shell`; design background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1237
1261
 
1238
- - **Client-mode session core + workspace config overlay (ADR-0005 P2 wave 1 / P4).** `src/client/remote-host-session.ts` is `RemoteHostSession` β€” the HostSession-shaped session facade the rendering layer consumes, driven over P1's `ClientConnection` (unary Remote RPC + raw `$events` pump). Wave-1 audit rows: turn lifecycle (`session/create` + `session/prompt`, `mode:'queue'` for fresh sends and `mode:'steer'` mirroring `agent.steer`; the message queue stays client-side), `session/follow({assistantStream:true})` consumption (`remote-follow.ts`: text/thinking deltas, usage, tool call/result frames with image-path extraction parity, durable turn/end + error mapping, `todo/write`), `session/cancel` abort, and generation re-attach β€” the follow stream re-opens on reconnect, the opening snapshot replays missed transcript rows through `onReattachedMissed` and an active turn's compact stream replays as deltas under a "reconnecting…" label. Waterfalls (`remote-waterfall.ts`): forwarded `$events` `approval/request` + `user-questions/request` frames are claimed by `frame.agentId === sessionId` and answered through the unary `$events/result` RPC with the host verdict payloads β€” `"allowed-once"` / `"rejected"` (+ `"unavailable"` fail-closed with no callbacks) for approvals, `{answers:[{id, selected[], custom?}]}` (declined envelope on UI throw) for questions β€” the waterfall route rather than `userQuestions/answer` + `attachWait`, since the TUI modal has no detach window and the waterfall is the exact-parity answerer chain the in-process TUI joins today. `src/client/workspace-config.ts` is the workspace-local config overlay (bucket d, decision 4): `./.dsh/config.yml` holds only theme + model preferences, precedence environment (`DSH_OPENTUI_THEME` / `DSH_OPENTUI_MODEL`) > workspace > global base, model subfields merge partially, unknown keys ignored on load and preserved verbatim on save, credential-shaped keys rejected on load AND save (denylist, fail closed), 0600/0700 atomic same-dir rename writes, and a strict no-dependency YAML subset that refuses to rewrite a file it cannot fully parse. `remote-host-session` plugs into the same `TurnCallbacks` seam as the in-process `HostSession`, so the UI swap is zero-change. Rest of the audit surface (rows 12–28, 30–33, 35–37) ships as HostSession-shaped wave-2/3 stubs. 116 green tests in `packages/shell` (116 pass / 1 env-gated live smoke skip); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1262
+ - **Client-mode session core + workspace config overlay (ADR-0005 P2 wave 1 / P4).** `legacy HTTP session facade` is `HTTP session facade` β€” the HostSession-shaped session facade the rendering layer consumes, driven over P1's `HTTP client carrier` (unary Remote RPC + raw `$events` pump). Wave-1 audit rows: turn lifecycle (`session/create` + `session/prompt`, `mode:'queue'` for fresh sends and `mode:'steer'` mirroring `agent.steer`; the message queue stays client-side), `session/follow({assistantStream:true})` consumption (`remote-follow.ts`: text/thinking deltas, usage, tool call/result frames with image-path extraction parity, durable turn/end + error mapping, `todo/write`), `session/cancel` abort, and generation re-attach β€” the follow stream re-opens on reconnect, the opening snapshot replays missed transcript rows through `onReattachedMissed` and an active turn's compact stream replays as deltas under a "reconnecting…" label. Waterfalls (`remote-waterfall.ts`): forwarded `$events` `approval/request` + `user-questions/request` frames are claimed by `frame.agentId === sessionId` and answered through the unary `$events/result` RPC with the host verdict payloads β€” `"allowed-once"` / `"rejected"` (+ `"unavailable"` fail-closed with no callbacks) for approvals, `{answers:[{id, selected[], custom?}]}` (declined envelope on UI throw) for questions β€” the waterfall route rather than `userQuestions/answer` + `attachWait`, since the TUI modal has no detach window and the waterfall is the exact-parity answerer chain the in-process TUI joins today. `src/client/workspace-config.ts` is the workspace-local config overlay (bucket d, decision 4): `./.dsh/config.yml` holds only theme + model preferences, precedence environment (`DSH_OPENTUI_THEME` / `DSH_OPENTUI_MODEL`) > workspace > global base, model subfields merge partially, unknown keys ignored on load and preserved verbatim on save, credential-shaped keys rejected on load AND save (denylist, fail closed), 0600/0700 atomic same-dir rename writes, and a strict no-dependency YAML subset that refuses to rewrite a file it cannot fully parse. `remote-host-session` plugs into the same `TurnCallbacks` seam as the in-process `HostSession`, so the UI swap is zero-change. Rest of the audit surface (rows 12–28, 30–33, 35–37) ships as HostSession-shaped wave-2/3 stubs. 116 green tests in `packages/shell` (116 pass / 1 env-gated live smoke skip); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1239
1263
 
1240
1264
  - **Model route provisioning for the `opentui` profile.** The shipped web template mounts no provider route, so a freshly provisioned `opentui` profile could not complete a real model turn. `scripts/provision-opentui-profile.mjs` now writes/merges the route into the profile's `cordis.patch.yml` after (re)creation: `--provider` / `--model` / `--reasoning-effort` flags (defaults `zai-coding-cn` / `glm-5.3-flash` / `high`, matching `scripts/install-profile.mjs`), same patch-body shape (an `llm-pi-ai` provider entry whose `apiKeyEnv` is derived the dsh way β€” uppercased, non-alnum β†’ underscore, `+_API_KEY` β€” plus an `agent-default-model` row). Merge is per-entry idempotent following the installer's convention: an entry already present in the patch layer is left untouched (a re-run never duplicates and never downgrades a model the user edited), missing entries are appended after a backup (`*.bak-<ts>`) so template/user entries survive, and an entry-less document (the template's bare `[]`) is replaced instead of appended to β€” appending after the `[]` document terminator yields an invalid two-document YAML stream the host rejects at boot. The hard guard stands: only the one `opentui` profile is ever touched. The env-gated remote live smoke gained a `DSH_SMOKE_PROFILE` knob (default `web`); against the provisioned `opentui` profile it now completes a REAL assistant turn (`MODEL_CALL ok`, text `"ok"`, `turnEnd prompt=13734 completion=19` in ~4s) instead of settling on the provider auth error β€” the provider key needs no environment plumbing: the host resolves `ZAI_CODING_CN_API_KEY` through its credentials service (`$DSH_HOME/.credentials.yaml` refs), shared by every profile.
1241
1265
 
1242
- - **Client-mode RemoteHostSession wave 2 β€” session ops + peripheral clusters (ADR-0005 bucket (b) P2 wave 2; audit rows 12–28 + 17 + 22).** `RemoteHostSession` grows from the wave-1 turn core to nearly the full HostSession surface via three new modules. `src/client/remote-session-ops.ts` is the session ops cluster: `listSessions` (`session/list` + the client-side retention filter of host-session.ts:208-240 parity β€” subagent rows out, retention-days cutoff by updatedAt, newest first, capped), `storedTranscript` (the `session/follow` opening snapshot replayed on a SECOND facade, with backwards `session/page` fills), `renameSession` (`session/rename`), `forkAtTurn` (`session/fork {atSeq?}` β€” omission = latest completed-turn prefix β€” plus facade switch onto the host-minted fork id), `searchSessions` (`session/search` β†’ items {sessionId, snippet} + hasMore; OPT-IN on the wire and disabled on this deployment β€” the index is `openAt: never`, so the facade degrades to the exact HostSession `[]` parity), `listSkills`/`refreshSkills` (`skills/list`, the session-composed human-invocable catalog, non-activating), `listHostCommands`/`executeHostCommand` (`commands/list` / `commands/execute`, agent-scoped), and `RemoteTailSession` β€” the read-only foreign-id tail (row 17) riding a non-activating `session/follow` with `session/page` gap repair, plus the client-side turn grouping (`historyTurns`) from the follow record ledger. `src/client/remote-model.ts` is the model cluster: `modelCatalog` (`session/modelCatalog` β€” provider groups with models/reasoning efforts, failures, and `default`, which IS the row-22 cold-boot label source; the in-process `agentDefaultModel.currentSelection()` one-shot has no 1:1 remote), `selectModel` (`session/selectModel` round-trip β€” the host-resolved selection is durable per SESSION and applies to its NEXT request; the facade applies it to the live session when one exists, else stages it onto the session the next turn creates, unlike in-process `switchModel` which only affected the NEXT session), and the provider catalog (`llm/listConfigurableProviders` / `llm/listProviders`). `src/client/remote-settings.ts` is settings + credentials (rows 24–25): `settingsDescribe`/`settingsMutate`/`settingsUpdate`/`settingsReplace` β€” `settings/describe` returns the DOCUMENT view ({writable, hasDocument, namespaces[]}) on the wire and is shaped client-side to the flat rows the /login route-registration double-write and the /settings browser consume; `mutate`/`update`/`replace` take the revision seen at read time as `expectedRevision` (a stale editor is refused, not silently overwritten); credentials cross the wire value-free (`credentials/describe(refs)` β†’ {configured, source?, writable}, writes via `credentials/set`/`unset`; the /login registration double-write stays client-side), exposed as `credentialStatus`/`login`/`logout`; presets round it out (`agentPresets/list|read|select`). Facade polish on the wave-1 core: the mid-turn compact-stream replay now dedupes at the dense index already streamed (clean replay after reconnect, no doubled deltas), a journal gap the snapshot window cannot reach is repaired from `session/page` before the live frames resume, a fuller `status` surface ({connection, turn: idle|starting|running|reconnecting, sessionAttached, tailActive}), and wire-verified usage assignment semantics (row 5): every usage chunk ASSIGNS the fields it reports, completion accumulates over the session, and the context size is prompt + cacheRead + cacheWrite on cache-splitting adapters (their `prompt` is uncached input only). `$events` push frames route to facade listeners: `settings/document-updated` (ns, revision), `commands/change`, `plugin-manager/changed` (auto-refreshes the plugins cache), `credentials/reference-updated`; `listPlugins`/`refreshPlugins` ride `pluginManager/listPlugins` (+`listBundles` versions, built-ins out). Idle-release (row 16) is HOST-NATIVE β€” the host owns the writer lock and the follow read needs none, so there is no client-side lease machinery. Tests: `test/remote-session-ops.test.ts` + `test/remote-model-settings.test.ts` over the shared `test/client-fakes.ts` fakes, plus the extended env-gated live smoke (wave-2 capability sweep: list/replay/rename/fork/search/model/presets/commands/skills/plugins/tail, 2/2 with real model calls); 152 green tests in `packages/shell` (2 env-gated live-smoke skips); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1266
+ - **Client-mode HTTP session facade wave 2 β€” session ops + peripheral clusters (ADR-0005 bucket (b) P2 wave 2; audit rows 12–28 + 17 + 22).** `HTTP session facade` grows from the wave-1 turn core to nearly the full HostSession surface via three new modules. `src/client/remote-session-ops.ts` is the session ops cluster: `listSessions` (`session/list` + the client-side retention filter of host-session.ts:208-240 parity β€” subagent rows out, retention-days cutoff by updatedAt, newest first, capped), `storedTranscript` (the `session/follow` opening snapshot replayed on a SECOND facade, with backwards `session/page` fills), `renameSession` (`session/rename`), `forkAtTurn` (`session/fork {atSeq?}` β€” omission = latest completed-turn prefix β€” plus facade switch onto the host-minted fork id), `searchSessions` (`session/search` β†’ items {sessionId, snippet} + hasMore; OPT-IN on the wire and disabled on this deployment β€” the index is `openAt: never`, so the facade degrades to the exact HostSession `[]` parity), `listSkills`/`refreshSkills` (`skills/list`, the session-composed human-invocable catalog, non-activating), `listHostCommands`/`executeHostCommand` (`commands/list` / `commands/execute`, agent-scoped), and `RemoteTailSession` β€” the read-only foreign-id tail (row 17) riding a non-activating `session/follow` with `session/page` gap repair, plus the client-side turn grouping (`historyTurns`) from the follow record ledger. `src/client/remote-model.ts` is the model cluster: `modelCatalog` (`session/modelCatalog` β€” provider groups with models/reasoning efforts, failures, and `default`, which IS the row-22 cold-boot label source; the in-process `agentDefaultModel.currentSelection()` one-shot has no 1:1 remote), `selectModel` (`session/selectModel` round-trip β€” the host-resolved selection is durable per SESSION and applies to its NEXT request; the facade applies it to the live session when one exists, else stages it onto the session the next turn creates, unlike in-process `switchModel` which only affected the NEXT session), and the provider catalog (`llm/listConfigurableProviders` / `llm/listProviders`). `src/client/remote-settings.ts` is settings + credentials (rows 24–25): `settingsDescribe`/`settingsMutate`/`settingsUpdate`/`settingsReplace` β€” `settings/describe` returns the DOCUMENT view ({writable, hasDocument, namespaces[]}) on the wire and is shaped client-side to the flat rows the /login route-registration double-write and the /settings browser consume; `mutate`/`update`/`replace` take the revision seen at read time as `expectedRevision` (a stale editor is refused, not silently overwritten); credentials cross the wire value-free (`credentials/describe(refs)` β†’ {configured, source?, writable}, writes via `credentials/set`/`unset`; the /login registration double-write stays client-side), exposed as `credentialStatus`/`login`/`logout`; presets round it out (`agentPresets/list|read|select`). Facade polish on the wave-1 core: the mid-turn compact-stream replay now dedupes at the dense index already streamed (clean replay after reconnect, no doubled deltas), a journal gap the snapshot window cannot reach is repaired from `session/page` before the live frames resume, a fuller `status` surface ({connection, turn: idle|starting|running|reconnecting, sessionAttached, tailActive}), and wire-verified usage assignment semantics (row 5): every usage chunk ASSIGNS the fields it reports, completion accumulates over the session, and the context size is prompt + cacheRead + cacheWrite on cache-splitting adapters (their `prompt` is uncached input only). `$events` push frames route to facade listeners: `settings/document-updated` (ns, revision), `commands/change`, `plugin-manager/changed` (auto-refreshes the plugins cache), `credentials/reference-updated`; `listPlugins`/`refreshPlugins` ride `pluginManager/listPlugins` (+`listBundles` versions, built-ins out). Idle-release (row 16) is HOST-NATIVE β€” the host owns the writer lock and the follow read needs none, so there is no client-side lease machinery. Tests: `test/remote-session-ops.test.ts` + `test/remote-model-settings.test.ts` over the shared `test/client-fakes.ts` fakes, plus the extended env-gated live smoke (wave-2 capability sweep: list/replay/rename/fork/search/model/presets/commands/skills/plugins/tail, 2/2 with real model calls); 152 green tests in `packages/shell` (2 env-gated live-smoke skips); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1243
1267
 
1244
- - **Client-mode entry β€” `--client` boots the end-to-end bun TUI client (ADR-0005 P3, bucket (c)).** `src/client-entry.tsx` chains the boot behind injectable seams (`bootClient()`, faked in `test/client-entry.test.ts`): `ensureHost({profile:'opentui', idleExitSec:60})` β†’ `ClientConnection({authority, cookieHeader})` β†’ `RemoteHostSession` β†’ `bootRuntime` render of ShellHost β€” with ZERO ShellHost edits: the remote session rides the HostSession type under the compile-time `ShellSessionSurface` conformance guard (`src/client/shell-session.ts`, fails tsc on surface drift instead of surfacing as a boot crash), and the turn-end hand-off is wrapped client-side (`aggregateTurnContext`) so the 🧠 status-bar context percent reads `prompt + cacheRead + cacheWrite` (the wave-2 row-5 wire finding) while the plugin bundle stays byte-identical (dist-host zero-diff gate). Workspace is the launch cwd (decision 1 β€” session/create cwd, welcome banner, powerline git probe, workspace overlay all key off it); theme comes from `configLoad().theme` read AFTER `session.start()` (overlay cache warm; `DSH_OPENTUI_THEME` still wins in ShellHost); the render waits (bounded) for the cold-boot model label so the powerline paints the real provider/model from first paint. Every exit path (`/quit`, Ctrl+C, renderer exit, SIGINT/SIGTERM/SIGHUP) funnels through `dispose()` β†’ `host.release()` β€” never `host.dispose()` β€” and a LAST-REF release spawns the DETACHED idle reaper (`scripts/idle-reaper.mjs`): the lifecycle's idle timer is `unref()`ed and would die with the quitting client, orphaning the resident host forever; the reaper idles the host out after the grace window (SIGTERMβ†’SIGKILL) and clears the lockfile, unless a fresh boot replaced the host or a client re-attached inside the window (established connections to the host port = the adoption liveness marker; behavioral tests in `test/idle-reaper.test.ts`). The jsx preload lesson: bun transpiles the whole import graph before executing, so a runtime-only transform registration is too late for kit's .tsx modules β€” the `@opentui/solid/preload` import stays FIRST in the entry AND the launcher passes `bun --preload …/preload.js` explicitly (bunfig.toml only applies from packages/shell's cwd, while the client launches from arbitrary workspaces). Launcher `./dsh-opentui --client`: the DEFAULT stays plugin mode until P6 (E2E topology gates) flips it. Evidence (tmux captures): boot shows the provisioned profile's real model label (`zai-coding-cn/glm-5.3-flash`), workspace prompt and themed welcome from the first paint; a real turn ("say ok" β†’ "ok") lands with the aggregated `🧠 13.7k(11%)` context segment plus `βŽ‡ main` / `πŸ’¬ 2` on the status bar. 205 pass / 3 env-gated live-smoke skips in `packages/shell` (kit 12, runtime 5); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1268
+ - **Client-mode entry β€” `--client` boots the end-to-end bun TUI client (ADR-0005 P3, bucket (c)).** `src/client-entry.tsx` chains the boot behind injectable seams (`bootClient()`, faked in `test/client-entry.test.ts`): `legacy host bootstrap({profile:'opentui', idleExitSec:60})` β†’ `HTTP client carrier({authority, cookieHeader})` β†’ `HTTP session facade` β†’ `bootRuntime` render of ShellHost β€” with ZERO ShellHost edits: the remote session rides the HostSession type under the compile-time `ShellSessionSurface` conformance guard (`src/client/shell-session.ts`, fails tsc on surface drift instead of surfacing as a boot crash), and the turn-end hand-off is wrapped client-side (`aggregateTurnContext`) so the 🧠 status-bar context percent reads `prompt + cacheRead + cacheWrite` (the wave-2 row-5 wire finding) while the plugin bundle stays byte-identical (dist-host zero-diff gate). Workspace is the launch cwd (decision 1 β€” session/create cwd, welcome banner, powerline git probe, workspace overlay all key off it); theme comes from `configLoad().theme` read AFTER `session.start()` (overlay cache warm; `DSH_OPENTUI_THEME` still wins in ShellHost); the render waits (bounded) for the cold-boot model label so the powerline paints the real provider/model from first paint. Every exit path (`/quit`, Ctrl+C, renderer exit, SIGINT/SIGTERM/SIGHUP) funnels through `dispose()` β†’ `host.release()` β€” never `host.dispose()` β€” and a LAST-REF release spawns the DETACHED idle reaper (`scripts/idle-reaper.mjs`): the lifecycle's idle timer is `unref()`ed and would die with the quitting client, orphaning the resident host forever; the reaper idles the host out after the grace window (SIGTERMβ†’SIGKILL) and clears the lockfile, unless a fresh boot replaced the host or a client re-attached inside the window (established connections to the host port = the adoption liveness marker; behavioral tests in `test/idle-reaper.test.ts`). The jsx preload lesson: bun transpiles the whole import graph before executing, so a runtime-only transform registration is too late for kit's .tsx modules β€” the `@opentui/solid/preload` import stays FIRST in the entry AND the launcher passes `bun --preload …/preload.js` explicitly (bunfig.toml only applies from packages/shell's cwd, while the client launches from arbitrary workspaces). Launcher `./dsh-opentui --client`: the DEFAULT stays plugin mode until P6 (E2E topology gates) flips it. Evidence (tmux captures): boot shows the provisioned profile's real model label (`zai-coding-cn/glm-5.3-flash`), workspace prompt and themed welcome from the first paint; a real turn ("say ok" β†’ "ok") lands with the aggregated `🧠 13.7k(11%)` context segment plus `βŽ‡ main` / `πŸ’¬ 2` on the status bar. 205 pass / 3 env-gated live-smoke skips in `packages/shell` (kit 12, runtime 5); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1245
1269
 
1246
1270
  ### Changed
1247
1271
 
1248
1272
  - **License switched from MIT to Apache-2.0.** The repo ports component-level code from MIT-licensed projects (opencode, `@opentui/solid`); their original MIT statements are preserved in the root `NOTICE` file, which also ships inside the npm package. Previously published versions remain MIT-licensed as released.
1249
1273
 
1250
- - **Client-mode RemoteHostSession wave 3 β€” full parity, no degradations (stub promotion).** The audit rows the wave-1 facade shipped as HostSession-shaped stubs (30–33, 35–37) are now real implementations, and the facade's config seam is no longer a passthrough: `configLoad()` reports the merged view (profile config.json base βŠ• workspace config.yml βŠ• environment) instead of the bare profile file, and `configSave()` splits the patch β€” overlay-managed keys (`theme`, `model`) route into the workspace `./.dsh/config.yml` (frozen `saveWorkspaceConfig` API: atomic 0600, credential guard), plugin keys (`retentionDays`, favorites, …) persist into the profile config.json β€” HostSession persistence parity on the same files plugin mode used (single machine). The v1-full-parity consequence stands: every in-process HostSession consumer seam behaves identically over the wire, with the only degradations being the audit-documented ones (search opt-out, exec-mode default not wire-visible), each with its client-side parity answer.
1274
+ - **Client-mode HTTP session facade wave 3 β€” full parity, no degradations (stub promotion).** The audit rows the wave-1 facade shipped as HostSession-shaped stubs (30–33, 35–37) are now real implementations, and the facade's config seam is no longer a passthrough: `configLoad()` reports the merged view (profile config.json base βŠ• workspace config.yml βŠ• environment) instead of the bare profile file, and `configSave()` splits the patch β€” overlay-managed keys (`theme`, `model`) route into the workspace `./.dsh/config.yml` (frozen `saveWorkspaceConfig` API: atomic 0600, credential guard), plugin keys (`retentionDays`, favorites, …) persist into the profile config.json β€” HostSession persistence parity on the same files plugin mode used (single machine). The v1-full-parity consequence stands: every in-process HostSession consumer seam behaves identically over the wire, with the only degradations being the audit-documented ones (search opt-out, exec-mode default not wire-visible), each with its client-side parity answer.
1251
1275
 
1252
- - **Client-mode RemoteHostSession wave 3 β€” full parity, no degradations (ADR-0005 bucket (b) P2 wave 3; audit rows 29–30, 35–39, 41 + gaps 2/4).** Five new modules close the last audit rows; the clusters: `src/client/remote-local-fs.ts` gives /agents read/write + the /repair scan over `<dshHome>/agents/*.md` client-locally (single-machine topology, no Remote FS namespace), with ONE deliberate divergence from host-session.ts: the host copy's "insert into existing frontmatter" branch is dead (its regex never matches), so adding a field to a file that already had frontmatter prepended a SECOND frontmatter block β€” the client copy fixes the regex and documents the bug in its header. `src/client/remote-restart.ts` is /reload (audit row 29 + gap 2 β€” no remote live-plugin reload exists): per the ADR-0005 user decision the host restarts in place on the SAME authority β€” lifecycle lockfile (pid + port), SIGTERM with SIGKILL escalation, stale-lockfile removal, detached respawn `--no-open --port <same>`, a port-quiet gate (the old listener must actually release before the wait-for-listener probe), then cookie re-mint with the first-boot retry window; P1's carrier keeps retrying its authority forever and wave-2's re-attach replays the missed durable rows, so the restart is invisible beyond the reconnect label. The narrow SIGTERMβ†’fresh-listener port-reuse race window is documented and accepted for v1; the full lifecycle-managed restart lives behind the `restartHost` override seam (P3 rendering-decouple path). `src/client/remote-btw.ts` is /btw: no one-shot throwaway-agent RPC exists on the wire, so the client mints a real throwaway session (durable marker title prefix, main session's context untouched) and REUSES the previous throwaway id for back-to-back questions β€” a one-session pollution cap instead of one session per question β€” with client-side filtering keeping throwaways out of session lists. `src/client/remote-subagents.ts` is the subagent panel aggregation: adoption of in-flight children, child follow, and steer/interrupt, with a typed `subagent/not-resumable` error surface (one-shot/non-continuable children refuse remote resume instead of failing opaquely). `src/client/remote-attachments.ts` is /attach + tool-result images (audit rows 35–36): the audit offered receipts OR inline image parts, and the receipt route is rejected on live-verified evidence β€” a `{type:'file', receiptId}` prompt part answers `session/attachment-invalid` (ATTACHMENT_NOT_REFERENCED) on read-back because `session/attachment` serves admitted IMAGE references only, and a staged receipt goes stale across /new/abort; the chosen route is the inline image part (`{type:'image', mediaType, data}` admitted by the host BEFORE message creation into the durable ImageAttachmentRef, extension allowlist + leaf display name parity), with admitted ids read from the follow journal for the round-trip surface; tool-result image bytes ride the authenticated `GET /api/file?path=…` (cookie-authed, 20 MiB cap β†’ 413). Plus two seams: `src/client/remote-exec-mode.ts` (audit row 37) drives executionMode from the preset document β€” the deployment default is NOT wire-queryable (audit Β§4 candidate), and the plugin-inventory route carries no config; `src/client/remote-git.ts` (audit row 39 + gap 4) keeps the powerline git segment on its client-local `git branch --show-current` probe (ShellHost.tsx:277-295 semantics: workspace cwd, 3s timeout, silent "" on non-repos). Tests: `test/remote-wave3-local.test.ts` + `test/remote-btw-restart.test.ts` + `test/remote-subagents.test.ts` over the shared fakes, plus the wave-3 live-smoke sweep (agents/repair/attach/btw/reload/git on a scratch DSH_HOME β€” 3/3 previously run); 192 green tests in `packages/shell` (3 env-gated live-smoke skips); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1276
+ - **Client-mode HTTP session facade wave 3 β€” full parity, no degradations (ADR-0005 bucket (b) P2 wave 3; audit rows 29–30, 35–39, 41 + gaps 2/4).** Five new modules close the last audit rows; the clusters: `src/client/remote-local-fs.ts` gives /agents read/write + the /repair scan over `<dshHome>/agents/*.md` client-locally (single-machine topology, no Remote FS namespace), with ONE deliberate divergence from host-session.ts: the host copy's "insert into existing frontmatter" branch is dead (its regex never matches), so adding a field to a file that already had frontmatter prepended a SECOND frontmatter block β€” the client copy fixes the regex and documents the bug in its header. `src/client/remote-restart.ts` is /reload (audit row 29 + gap 2 β€” no remote live-plugin reload exists): per the ADR-0005 user decision the host restarts in place on the SAME authority β€” lifecycle lockfile (pid + port), SIGTERM with SIGKILL escalation, stale-lockfile removal, detached respawn `--no-open --port <same>`, a port-quiet gate (the old listener must actually release before the wait-for-listener probe), then cookie re-mint with the first-boot retry window; P1's carrier keeps retrying its authority forever and wave-2's re-attach replays the missed durable rows, so the restart is invisible beyond the reconnect label. The narrow SIGTERMβ†’fresh-listener port-reuse race window is documented and accepted for v1; the full lifecycle-managed restart lives behind the `restartHost` override seam (P3 rendering-decouple path). `src/client/remote-btw.ts` is /btw: no one-shot throwaway-agent RPC exists on the wire, so the client mints a real throwaway session (durable marker title prefix, main session's context untouched) and REUSES the previous throwaway id for back-to-back questions β€” a one-session pollution cap instead of one session per question β€” with client-side filtering keeping throwaways out of session lists. `src/client/remote-subagents.ts` is the subagent panel aggregation: adoption of in-flight children, child follow, and steer/interrupt, with a typed `subagent/not-resumable` error surface (one-shot/non-continuable children refuse remote resume instead of failing opaquely). `src/client/remote-attachments.ts` is /attach + tool-result images (audit rows 35–36): the audit offered receipts OR inline image parts, and the receipt route is rejected on live-verified evidence β€” a `{type:'file', receiptId}` prompt part answers `session/attachment-invalid` (ATTACHMENT_NOT_REFERENCED) on read-back because `session/attachment` serves admitted IMAGE references only, and a staged receipt goes stale across /new/abort; the chosen route is the inline image part (`{type:'image', mediaType, data}` admitted by the host BEFORE message creation into the durable ImageAttachmentRef, extension allowlist + leaf display name parity), with admitted ids read from the follow journal for the round-trip surface; tool-result image bytes ride the authenticated `GET /api/file?path=…` (cookie-authed, 20 MiB cap β†’ 413). Plus two seams: `src/client/remote-exec-mode.ts` (audit row 37) drives executionMode from the preset document β€” the deployment default is NOT wire-queryable (audit Β§4 candidate), and the plugin-inventory route carries no config; `src/client/remote-git.ts` (audit row 39 + gap 4) keeps the powerline git segment on its client-local `git branch --show-current` probe (ShellHost.tsx:277-295 semantics: workspace cwd, 3s timeout, silent "" on non-repos). Tests: `test/remote-wave3-local.test.ts` + `test/remote-btw-restart.test.ts` + `test/remote-subagents.test.ts` over the shared fakes, plus the wave-3 live-smoke sweep (agents/repair/attach/btw/reload/git on a scratch DSH_HOME β€” 3/3 previously run); 192 green tests in `packages/shell` (3 env-gated live-smoke skips); contract background in `docs/adr/0005-client-mode.md` and `docs/client-mode-protocol-audit.md`.
1253
1277
 
1254
1278
  ### Fixed
1255
1279
 
package/README.md CHANGED
@@ -39,82 +39,59 @@ npm i -g @aiwayds/dsh-opentui
39
39
  dsh-opentui
40
40
  ```
41
41
 
42
- The first launch automatically provisions the `opentui-inproc` profile: the
42
+ The first launch automatically provisions the `opentui-monday` profile: the
43
43
  shipped bridge bundle is materialized as a real directory copy of this
44
44
  installation (no symlink, no copy of any `@deepseek-ai/*` package into the
45
45
  profile) and checked against a build-time fingerprint. The copy converges
46
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).
47
+ next start. `--repair-bridge` is a terminal maintenance command: it kills this
48
+ profile's stale instances (SIGTERM, then SIGKILL for survivors), reruns the
49
+ provisioner in repair mode, and exits without launching the TUI. A fingerprint
50
+ mismatch still fails loud.
51
+
52
+ The legacy `--force` and `--yes` launcher flags are deprecated no-ops in this
53
+ in-process-only build: `--yes` is accepted only alongside `--force`, and neither
54
+ kills processes nor clears markers. Use `--repair-bridge` to clear stale
55
+ instances and repair the bridge. Both flags will be removed in the next minor
56
+ release.
49
57
 
50
58
  Run `dsh-opentui --help` for the full list of launcher options.
51
59
 
52
60
  ## Upgrading
53
61
 
54
- `dsh-opentui upgrade` moves the installed launcher itself to the newest npm
55
- release (or another dist-tag via `--tag`) and upgrades the registry plugins
56
- already installed in the `opentui` profile to their latest versions. It does
57
- **not** upgrade the dsh host: the host is a separate global install.
62
+ `dsh-opentui upgrade` upgrades the launcher package itself
63
+ (`@aiwayds/dsh-opentui`) to a newer version from npm. It does not upgrade
64
+ companions, touch `$DSH_HOME`, provision profiles or run migrations β€” those
65
+ converge on the next launch.
58
66
 
59
67
  ```bash
60
- dsh-opentui upgrade --dry-run # print the plan table, write nothing
61
- dsh-opentui upgrade # confirm, then apply
68
+ dsh-opentui upgrade # resolve the `latest` dist-tag (default)
69
+ dsh-opentui upgrade --tag beta # resolve a specific dist-tag
70
+ dsh-opentui upgrade --dry-run # resolve and print the command, do not install
62
71
  ```
63
72
 
64
- | Flag | Effect |
65
- |---|---|
66
- | `--dry-run` | Print the plan table and exit; nothing is installed or written. |
67
- | `-y`, `--yes` | Skip the confirmation prompt. Required when stdin is not a TTY. |
68
- | `--tag <name>` | Resolve a dist-tag other than `latest` (`next`, for example). |
69
- | `--no-self` | Skip the launcher; upgrade profile plugins only. |
70
- | `--no-plugins` | Skip profile plugins; upgrade the launcher only. |
71
- | `--reset-overrides` | Delete `upgrade-overrides.json` and exit (terminal; cannot be combined with `--no-self` / `--no-plugins`). |
72
- | `-h`, `--help` | Print usage and exit. |
73
-
74
- | Exit code | Meaning |
75
- |---|---|
76
- | `0` | Completed, nothing to upgrade, or `--dry-run` / `--help`. |
77
- | `1` | Hard failure, already rolled back; a target version that cannot be resolved writes nothing. |
78
- | `2` | Usage error. |
79
- | `3` | Partial: some packages did not reach the target version, or overrides could not be recorded. |
80
-
81
- ### Why upgrades stick (upgrade-overrides)
82
-
83
- Provisioning runs on every launch and converges the profile to the shipped
84
- pins, so a plain upgrade would be undone on the next start. After a successful
85
- upgrade the command records the new versions in
86
- `$DSH_HOME/profiles/opentui/upgrade-overrides.json`, and provisioning honors
87
- each entry instead of the pin. An entry applies only while it is **strictly
88
- newer** than the built-in pin, so a later release that raises the pin past it
89
- invalidates the entry by itself.
90
-
91
- `--reset-overrides` deletes that file and exits. The next launch provisions
92
- from the shipped pins again, which can **downgrade** a package the override
93
- was holding above them.
94
-
95
- ### Mirrors
96
-
97
- Queries go to `DSH_UPGRADE_REGISTRY` when set, otherwise the profile
98
- `.npmrc`, `~/.npmrc`, or the public npm registry, always with
99
- `--prefer-online`. A mirror's `latest` can lag behind npmjs; the command
100
- prints a note when it resolves through one.
101
-
102
- ```bash
103
- DSH_UPGRADE_REGISTRY=https://registry.npmmirror.com dsh-opentui upgrade --dry-run
104
- ```
105
-
106
- ### After upgrading
107
-
108
- Quit the TUI and run `dsh-opentui` again. The host is a long-running process
109
- and keeps the plugin set it booted with, so a plugin upgrade never applies to
110
- the current one. CI and scripted runs must pass `--yes` β€” without a TTY the
111
- confirmation prompt is refused.
73
+ A dist-tag must start with a letter or digit and contain only letters, digits,
74
+ `.`, `_` and `-`; specifying it twice is an error. The tag is only a key into
75
+ the `npm view dist-tags --json` result β€” it is never passed to npm as an
76
+ argument. `--dry-run` resolves the version but installs nothing; it prints the
77
+ command only when the target is newer (when the target is equal or older no
78
+ command is printed).
79
+
80
+ The command only works when the running copy is an npm global install (checked
81
+ against `npm prefix -g`); the exception is `--dry-run`, which also works from a
82
+ source tree. Otherwise it exits 1 and asks you to run
83
+ `npm i -g @aiwayds/dsh-opentui` manually. An `npm link` development install is
84
+ rejected too. It refuses to downgrade, and reports already up to date when the
85
+ resolved version matches the running one. Set `DSH_UPGRADE_REGISTRY` to an
86
+ `http://` or `https://` URL to append `--registry <url>` to both `npm view` and
87
+ `npm i -g`; without it npm uses its own registry configuration. Credentials in
88
+ that URL are stripped from all printed output but still passed to npm.
112
89
 
113
90
  ## Session topology
114
91
 
115
- > Since 0.24.0 the in-process session bridge (`opentui-inproc` profile, see
92
+ > Since 0.24.0 the in-process session bridge (`opentui-monday` profile, see
116
93
  > 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
94
+ > a bridge loaded inside a `dsh --profile opentui-monday` host process. The
118
95
  > legacy remote thin-client seam, its `DSH_OPENTUI_INPROC=0` escape hatch and
119
96
  > the `--remote` flag are all gone (the flag has been a usage error, exit 2,
120
97
  > since 0.23.0).
@@ -124,106 +101,29 @@ SIGINT/SIGTERM/SIGHUP); the TUI starts the dsh host, which loads the bridge
124
101
  in-process. A boot handshake compares the client's expected capability surface
125
102
  with the bridge and degrades honestly on a mismatch.
126
103
 
127
- Every launch provisions two profiles:
104
+ Every launch provisions one profile:
128
105
 
129
- - **`opentui-inproc`** β€” the bridge profile, provisioned synchronously (a
106
+ - **`opentui-monday`** β€” the only session host, provisioned synchronously (a
130
107
  failure here is fatal): a real directory copy of this installation's bundled
131
108
  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.
153
-
154
- ### Default plugins
155
-
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):
161
-
162
- | Tier | Package | Why |
163
- |---|---|---|
164
- | core | `@aiwayds/dsh-ask-router` | owns the ask surface; loads before every other UI/ask bundle |
165
- | core | `@aiwayds/dsh-subagent-registry` | subagent discovery and registration |
166
- | core | `@aiwayds/dsh-llm-net-retry` | retries transient provider/network failures |
167
- | core | `@aiwayds/dsh-web-search-anysearch` | web search without a per-provider key |
168
- | core | `@aiwayds/dsh-mcp-adapter` | MCP catalog/dispatch meta-tools (`mcp_list` / `mcp_call`) |
169
- | core | `@aiwayds/dsh-approval-policy` | tool-approval policy |
170
- | core | `@aiwayds/dsh-model-sync` | keeps the model list in sync with the provider catalog |
171
- | recommended | `@aiwayds/dsh-llm-stats` | token/cost accounting (usage limits) |
172
- | recommended | `@aiwayds/dsh-topics-memory` | cross-session topic memory |
173
- | recommended | `@aiwayds/dsh-cron` | scheduled prompts |
174
- | recommended | `@aiwayds/dsh-workflow` | dynamic workflow runs |
175
- | recommended | `@aiwayds/dsh-vault` | secret storage used by the companions |
176
-
177
- `recommended` is the default and includes `core`. Use `--plugins=core` to
178
- install only the core set. These are deliberately not installed:
179
- `dsh-tui-pi` (takes over stdout/stdin), `dcp` (web-app-preset isolated),
180
- `feishu` (claims the ask surface), `web-search-tavily` (needs a key),
181
- `agent-dispatch`, `self-improve`, `llm-proxy`, `profile-switch`.
182
-
183
- `anysearch` needs no API key: provisioning also re-enables the `tool-web` row
184
- (the `dsh-web-app` bundle ships it `disabled: true`) and pins
185
- `web.searchProvider` to `anysearch`, so the model gets `web_search`/`web_fetch`
186
- on a fresh profile. Both rows are written for every tier β€” including
187
- `--plugins=none`, because the tools must be visible regardless of whether the
188
- anysearch bundle is installed.
189
-
190
- MCP ships as a pair: the adapter above only catalogs tools that the official
191
- `@deepseek-ai/dsh-mcp-client` registered, so provisioning also inserts one
192
- client row (`mcp-context7`, transport `streamable-http`, endpoint
193
- `https://mcp.context7.com/mcp`). `context7` is read-only documentation lookup,
194
- needs no API key, and starts fast over HTTP. `mcp_list` / `mcp_call` then
195
- appear in the model tool catalog, and `/mcp` shows the same catalog. A failed
196
- or offline connection is non-fatal: `mcp-client` logs the error, the host
197
- still boots, and the server's tools are simply absent until it reconnects.
198
- An existing `mcp-context7` row (for example one the user edited) is never
199
- rewritten or duplicated. Under `--plugins=none` neither the adapter nor this
200
- row is written β€” the client alone would expose unfolded `mcp__*` schemas,
201
- which is not the promised setup.
202
-
203
- A plugin counts as installed only when all three agree: it is in the profile
204
- `dependencies`, the installed `node_modules` version satisfies the pin, and its
205
- name is in `dsh.profile.bundles`. Missing pieces are repaired with one
206
- `dsh plugin --profile opentui add …`; a failing package is retried once on its
207
- own after approving pnpm's build scripts, then reported as a WARN without
208
- blocking the launch. The retired `@aiwayds/dsh-opentui` plugin entry is removed
209
- from existing profiles (it has no `dsh.bundle` and only produced boot warnings).
210
-
211
- ### Skipping the default plugins
212
-
213
- Pass `--plugins=none` on launch to provision the profile without installing any
214
- plugin (`--plugins=core` narrows the set instead). To make that permanent for
215
- every launch, set it in the environment:
216
-
217
- ```bash
218
- DSH_OPENTUI_PLUGINS=none dsh-opentui
219
- ```
220
-
221
- The profile is still created/kept, the model route still written (including the
222
- `tool-web` / `web` rows), and the retired-entry cleanup still runs; only plugin
223
- installation, managed-bundle appends and the default MCP server row are
224
- skipped (an existing `mcp-context7` row is left untouched). You can always manage
225
- plugins yourself afterwards with `dsh plugin --profile opentui add <pkg>`.
226
- `--dry-run` prints every command provisioning would run without executing it.
109
+ approval gate, the inproc-only cordis patch and the companion set declared by
110
+ `scripts/lib/companion-policy.mjs`. The bridge copy converges on every launch;
111
+ `--repair-bridge` clears this profile's stale instances, reruns provisioning
112
+ in repair mode, and exits without launching the TUI. Companion versions
113
+ resolve to the registry `latest` within each catalog range and are never
114
+ downgraded.
115
+ - **SDK closure link** β€” the client still imports
116
+ `@deepseek-ai/dsh-client-connection` at runtime (host label/lifecycle). That
117
+ SDK is not on the public npm registry; it ships inside the globally-installed
118
+ dsh's own `node_modules` closure, and the launcher symlinks it into the
119
+ installed package's `node_modules` (idempotent). This is why the dsh CLI is a
120
+ hard prerequisite.
121
+
122
+ The retired `opentui` profile is no longer provisioned or seeded. Existing
123
+ `opentui` / `opentui-inproc` directories remain untouched as migration sources
124
+ and rollback material. The old `--provider`, `--model`, `--reasoning-effort`,
125
+ `--plugins` and `--dry-run` launcher options are retired; manage companions with
126
+ `dsh plugin --profile opentui-monday` when manual intervention is needed.
227
127
 
228
128
  **Config reuse**: the Shell reads your existing dsh config β€” model defaults
229
129
  from the host, provider baseUrls and API keys from `$DSH_HOME`. A
@@ -265,7 +165,7 @@ that variable for normal use. See `docs/adr/0011-ask-permission-bridge-channel.m
265
165
  session. To reopen the newest non-empty session from the launch workspace that
266
166
  was active within the last 7 days β€” with a `resumed <title> Β· <time ago>`
267
167
  notice β€” set `"autoResume": "last"` in
268
- `$DSH_HOME/profiles/opentui/config.json` (change the window with
168
+ `$DSH_HOME/profiles/opentui-monday/config.json` (change the window with
269
169
  `"autoResumeDays": N`), or pass `--resume-last` for one launch (it overrides
270
170
  the config). `--new` always starts fresh and wins over both; `--session <id>`
271
171
  pins a specific session.
@@ -356,27 +256,8 @@ required before keymap/panel/command-surface changes. The legacy podman
356
256
  assertions moved to the host families, verify70, unit tests and the
357
257
  `pack-cold-start` gate.
358
258
 
359
- Live client-topology gates (local / self-hosted, not hosted CI):
360
-
361
- ```bash
362
- node packages/shell/scripts/e2e-sweep.mjs # full command-surface sweep
363
- node packages/shell/scripts/e2e-client.mjs # two-process topology gate (attach/adopt/reload)
364
- ```
365
-
366
- `e2e-sweep.mjs` drives EVERY slash command + keyboard surface through the
367
- real client topology in tmux 120x34 (slow typing, per-item capture): the
368
- read-only commands, every overlay picker, `/config` forms, the `/login`
369
- panel + headless forms, the palette / history-recall / alt+enter / paste /
370
- scroll / dock-toggle / esc stop-confirm keys β€” and the keystroke-leak
371
- regressions (modal-consumed keys must never type into the blurred editor).
372
- `e2e-client.mjs` gates the two-process topology itself: multi-client attach,
373
- crash adoption, same-port `/reload`, host-death recovery, markdown-table
374
- rendering. Both run under a scratch `DSH_HOME` (temp dir, mode 700) seeded
375
- from the real profile, so login/logout/config/preset writes never touch the
376
- user's home. Real turns ride the workingRoute pattern: the catalog is probed,
377
- a route is selected, and when no route answers the turn items report BLOCKED
378
- loudly while everything else still gates. Requires `dsh`, `tmux`, `bun` on
379
- PATH; otherwise the scripts self-skip (exit 0) so CI runs green.
259
+ The legacy HTTP client-topology and command-surface gates were retired with
260
+ the HTTP host. They are no longer available as local verification commands.
380
261
 
381
262
  ## Status
382
263