fix(cli): generate a UI password for bare --ui-password in daemon/serve mode

The grand tunnel restructuring removed the CLI's auto-generated UI
password, so `openchamber -d --ui-password` (no value) silently started
an unauthenticated server instead of creating a password as in 1.8.1.

Restore generation for an explicit --ui-password flag without a value:
the password is generated before either launch path, passed to the
daemon/foreground process via OPENCHAMBER_UI_PASSWORD, persisted in the
instance state file, and surfaced once in human/quiet/json output.

Refs OPE-216
This commit is contained in:
Serhii Dziupin
2026-08-05 11:24:10 +03:00
parent 34c221b07f
commit 41a2e3781d
5 changed files with 108 additions and 7 deletions
+4
View File
@@ -9,6 +9,8 @@ import { EXIT_CODE, TunnelCliError } from './lib/cli-errors.js';
import {
resolveServeHost,
hasUiPasswordConfigured,
generateUiPassword,
resolveServeUiPassword,
assertAuthenticatedNetworkExposure,
} from './lib/cli-network.js';
import {
@@ -428,6 +430,8 @@ export {
assertAuthenticatedNetworkExposure,
resolveServeHost,
hasUiPasswordConfigured,
generateUiPassword,
resolveServeUiPassword,
shouldDisplayTunnelQr,
isValidTunnelDoctorResponse,
readDesktopLocalPortFromSettings,