@beeos-ai/cli 1.0.21 → 1.0.22
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/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7042,10 +7042,12 @@ async function tryAttachOpenclawDesktopBridge(params) {
|
|
|
7042
7042
|
if (!binary) {
|
|
7043
7043
|
return `vnc-bridge binary unavailable (download or PATH lookup failed); OpenClaw is bound but desktop streaming is unavailable. Set BEEOS_VNC_BRIDGE_BIN to override.`;
|
|
7044
7044
|
}
|
|
7045
|
+
const vncPassword = await readVncPasswordOptional();
|
|
7045
7046
|
const spec = buildOpenclawDesktopVncBridgeSpec(binary, {
|
|
7046
7047
|
deviceId: params.instanceId,
|
|
7047
7048
|
vncHost: params.vncEndpoint.host,
|
|
7048
7049
|
vncPort: params.vncEndpoint.port,
|
|
7050
|
+
...vncPassword ? { vncPassword } : {},
|
|
7049
7051
|
agentGatewayUrl: params.agentGatewayUrl,
|
|
7050
7052
|
bridgePrivateKeyFile: params.keyFile,
|
|
7051
7053
|
bridgePublicKeyFile: params.keyFile
|
|
@@ -7058,6 +7060,18 @@ async function tryAttachOpenclawDesktopBridge(params) {
|
|
|
7058
7060
|
}
|
|
7059
7061
|
return null;
|
|
7060
7062
|
}
|
|
7063
|
+
async function readVncPasswordOptional() {
|
|
7064
|
+
const env = process.env.BEEOS_VNC_PASSWORD?.trim();
|
|
7065
|
+
if (env) return env;
|
|
7066
|
+
const p = getPlatformAdapter();
|
|
7067
|
+
const file = p.joinPath(beeoHome(), "vnc.password");
|
|
7068
|
+
try {
|
|
7069
|
+
const raw = (await p.readFile(file)).trim();
|
|
7070
|
+
return raw || void 0;
|
|
7071
|
+
} catch {
|
|
7072
|
+
return void 0;
|
|
7073
|
+
}
|
|
7074
|
+
}
|
|
7061
7075
|
function buildHostname() {
|
|
7062
7076
|
const machine = os6.hostname();
|
|
7063
7077
|
const user = process.env.USER || process.env.USERNAME || "";
|