@aiwayds/dsh-opentui 0.28.0 → 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 +15 -0
- package/README.md +27 -2
- package/bin/dsh-opentui.mjs +18 -2
- package/bin/lib/launcher.mjs +7 -0
- package/dist/client/index.js +283 -167
- package/dist/client/index.js.map +6 -6
- package/package.json +1 -1
- package/scripts/provision-inproc-profile.mjs +34 -1
- package/scripts/upgrade.mjs +484 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ 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
|
+
|
|
8
23
|
## [0.28.0] - 2026-11-25
|
|
9
24
|
|
|
10
25
|
### Changed
|
package/README.md
CHANGED
|
@@ -59,8 +59,33 @@ Run `dsh-opentui --help` for the full list of launcher options.
|
|
|
59
59
|
|
|
60
60
|
## Upgrading
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
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.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
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
|
|
71
|
+
```
|
|
72
|
+
|
|
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.
|
|
64
89
|
|
|
65
90
|
## Session topology
|
|
66
91
|
|
package/bin/dsh-opentui.mjs
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* any bun/dsh check, TUI launch, or default-seam change; it always runs
|
|
15
15
|
* full in-process provisioning (bridge is the default since 0.23.0).
|
|
16
16
|
* All three are consumed by the bin and never forwarded to the client.
|
|
17
|
+
* `upgrade [--tag <dist-tag>] [--dry-run]` is a terminal subcommand that
|
|
18
|
+
* upgrades the launcher package itself and exits before any checks or
|
|
19
|
+
* provisioning (see scripts/upgrade.mjs).
|
|
17
20
|
* 1. bun check — the client bundle runs under bun (FFI, import attributes,
|
|
18
21
|
* bun export conditions); no bun on PATH → install guidance, exit 1.
|
|
19
22
|
* 2. dsh check — the host CLI is the session carrier (profile storage,
|
|
@@ -54,6 +57,7 @@ import { constants as osConstants, homedir } from 'node:os'
|
|
|
54
57
|
import { dirname, join } from 'node:path'
|
|
55
58
|
import { fileURLToPath } from 'node:url'
|
|
56
59
|
import { ancestorPids, formatUsage, killStaleProcesses, launcherFlagConflict, LAUNCHER_TIMEOUT_FLAGS, parseLauncherArgs, parseLauncherOptions, parseProcessHomes, parseProcessRows, readLauncherVersion, selectStaleProcesses, validateLauncherArgs } from './lib/launcher.mjs'
|
|
60
|
+
import { runUpgrade } from '../scripts/upgrade.mjs'
|
|
57
61
|
|
|
58
62
|
const pkgRoot = dirname(dirname(fileURLToPath(import.meta.url)))
|
|
59
63
|
const dshHome = process.env.DSH_HOME || join(homedir(), '.dsh')
|
|
@@ -70,10 +74,22 @@ function capture(cmd, args) {
|
|
|
70
74
|
return r.stdout ?? ''
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
// --- 0.5 upgrade: dispatch FIRST, on the raw argv --------------------------
|
|
78
|
+
// Do this BEFORE parseLauncherArgs: that parser consumes --version/--force/
|
|
79
|
+
// --yes/--repair-bridge wherever they appear, which would silently swallow
|
|
80
|
+
// `upgrade --help` (showing the WRONG help) and `upgrade --version/--force/...`
|
|
81
|
+
// (silently dropping a flag the user meant for the subcommand). With the early
|
|
82
|
+
// dispatch the subcommand sees its argv verbatim and rejects unknown flags
|
|
83
|
+
// with exit 2. No bun/dsh check, no provisioning, no TUI.
|
|
84
|
+
const argv = process.argv.slice(2)
|
|
85
|
+
if (argv[0] === 'upgrade') {
|
|
86
|
+
process.exit(await runUpgrade(argv.slice(1)))
|
|
87
|
+
}
|
|
88
|
+
|
|
73
89
|
// --- 0. Bin-level flags: --version short-circuits; --force/--yes parsed -----
|
|
74
90
|
// --force / --yes remain parsed for compatibility as deprecated no-ops.
|
|
75
91
|
// They are removed in the next minor release; use --repair-bridge for stale cleanup.
|
|
76
|
-
const { version: versionFlag, force: forceFlag, repairBridge: repairBridgeFlag, yes: yesFlag, rest: userArgs, passthrough } = parseLauncherArgs(
|
|
92
|
+
const { version: versionFlag, force: forceFlag, repairBridge: repairBridgeFlag, yes: yesFlag, rest: userArgs, passthrough } = parseLauncherArgs(argv)
|
|
77
93
|
|
|
78
94
|
if (versionFlag) {
|
|
79
95
|
const version = readLauncherVersion(pkgRoot)
|
|
@@ -104,7 +120,7 @@ if (flagConflict === 'repair-force') {
|
|
|
104
120
|
process.exit(2)
|
|
105
121
|
}
|
|
106
122
|
|
|
107
|
-
// --- 0.
|
|
123
|
+
// --- 0.6 usage/help and argument validation --------------------------------
|
|
108
124
|
// Placed after --version (absolute short-circuit), but BEFORE provisioning or
|
|
109
125
|
// any TUI work: a typo like `--verison` must fail here instead of running a
|
|
110
126
|
// full provision pass first.
|
package/bin/lib/launcher.mjs
CHANGED
|
@@ -311,10 +311,17 @@ export function formatUsage() {
|
|
|
311
311
|
' --connect-timeout <sec> seconds to wait for the first connection (default: 30)',
|
|
312
312
|
' -h, --help print this help and exit',
|
|
313
313
|
'',
|
|
314
|
+
'Commands:',
|
|
315
|
+
' upgrade [--tag <dist-tag>] [--dry-run]',
|
|
316
|
+
' upgrade the launcher package itself (npm global install required;',
|
|
317
|
+
' otherwise use npm i -g @aiwayds/dsh-opentui);',
|
|
318
|
+
' --dry-run only resolves and prints the command, no install',
|
|
319
|
+
'',
|
|
314
320
|
'Environment:',
|
|
315
321
|
' DSH_OPENTUI_BOOT_TIMEOUT_MS host cold-start budget in ms (CLI flag wins)',
|
|
316
322
|
' DSH_OPENTUI_MUX_TIMEOUT_MS mux readiness budget in ms (CLI flag wins)',
|
|
317
323
|
' DSH_OPENTUI_CONNECT_TIMEOUT_MS first-connect budget in ms (CLI flag wins)',
|
|
324
|
+
' DSH_UPGRADE_REGISTRY --registry <url> for both npm view and npm i -g in upgrade',
|
|
318
325
|
' Precedence: CLI flag > environment variable > default.',
|
|
319
326
|
'',
|
|
320
327
|
'Client options (passed through; put them after -- to skip validation):',
|