@beeos-ai/cli 1.0.14 → 1.0.15
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 +63 -65
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5167,6 +5167,67 @@ var init_fleet_notify = __esm({
|
|
|
5167
5167
|
}
|
|
5168
5168
|
});
|
|
5169
5169
|
|
|
5170
|
+
// src/commands/device/upgrade.ts
|
|
5171
|
+
async function upgrade(options = {}) {
|
|
5172
|
+
const reporter = new CliReporter();
|
|
5173
|
+
const outcome = await upgradeBeeosSuite({
|
|
5174
|
+
packages: [NPM_PKGS.DEVICE_AGENT, NPM_PKGS.DEVICE_MCP_SERVER],
|
|
5175
|
+
progress: reporter
|
|
5176
|
+
});
|
|
5177
|
+
reporter.stop();
|
|
5178
|
+
if (outcome.anyFailed) {
|
|
5179
|
+
const failed = outcome.packages.find((p) => p.failed);
|
|
5180
|
+
console.error(
|
|
5181
|
+
`device-agent upgrade had errors: ${failed?.failed ?? "unknown"}
|
|
5182
|
+
Manual fix:
|
|
5183
|
+
npm i -g @beeos-ai/device-agent @beeos-ai/device-mcp-server`
|
|
5184
|
+
);
|
|
5185
|
+
}
|
|
5186
|
+
for (const pkg of outcome.packages) {
|
|
5187
|
+
if (pkg.changed) {
|
|
5188
|
+
console.log(` ${pkg.pkg}: ${pkg.before ?? "(none)"} \u2192 ${pkg.after}`);
|
|
5189
|
+
} else if (!pkg.failed) {
|
|
5190
|
+
console.log(` ${pkg.pkg}: ${pkg.after ?? "(absent)"} (already current)`);
|
|
5191
|
+
}
|
|
5192
|
+
}
|
|
5193
|
+
if (outcome.anyChanged) {
|
|
5194
|
+
const reloadOutcome = await notifyFleetShutdownBestEffort();
|
|
5195
|
+
switch (reloadOutcome) {
|
|
5196
|
+
case "ok":
|
|
5197
|
+
console.log(" Fleet asked to restart \u2014 launchd will bring it up with the new code.");
|
|
5198
|
+
break;
|
|
5199
|
+
case "not_running":
|
|
5200
|
+
console.log(" Fleet is not running \u2014 nothing to restart.");
|
|
5201
|
+
break;
|
|
5202
|
+
case "unknown":
|
|
5203
|
+
console.log(
|
|
5204
|
+
" Fleet restart could not be confirmed; if you see stale behaviour run\n launchctl kickstart -k gui/$(id -u)/ai.beeos.device-fleet # macOS\n or stop & start the fleet manually."
|
|
5205
|
+
);
|
|
5206
|
+
break;
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
if (options.bridges !== false) {
|
|
5210
|
+
try {
|
|
5211
|
+
await scrcpyBridgeRuntime.upgrade(reporter);
|
|
5212
|
+
} catch (e) {
|
|
5213
|
+
console.error(`scrcpy-bridge upgrade skipped: ${e}`);
|
|
5214
|
+
}
|
|
5215
|
+
try {
|
|
5216
|
+
await vncBridgeRuntime.upgrade(reporter);
|
|
5217
|
+
} catch (e) {
|
|
5218
|
+
console.error(`vnc-bridge upgrade skipped: ${e}`);
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
}
|
|
5222
|
+
var init_upgrade2 = __esm({
|
|
5223
|
+
"src/commands/device/upgrade.ts"() {
|
|
5224
|
+
"use strict";
|
|
5225
|
+
init_dist();
|
|
5226
|
+
init_progress2();
|
|
5227
|
+
init_fleet_notify();
|
|
5228
|
+
}
|
|
5229
|
+
});
|
|
5230
|
+
|
|
5170
5231
|
// src/commands/device/state.ts
|
|
5171
5232
|
import lockfile from "proper-lockfile";
|
|
5172
5233
|
function deviceAgentTargetId(serial) {
|
|
@@ -5958,67 +6019,6 @@ var init_exec = __esm({
|
|
|
5958
6019
|
}
|
|
5959
6020
|
});
|
|
5960
6021
|
|
|
5961
|
-
// src/commands/device/upgrade.ts
|
|
5962
|
-
async function upgrade(options = {}) {
|
|
5963
|
-
const reporter = new CliReporter();
|
|
5964
|
-
const outcome = await upgradeBeeosSuite({
|
|
5965
|
-
packages: [NPM_PKGS.DEVICE_AGENT, NPM_PKGS.DEVICE_MCP_SERVER],
|
|
5966
|
-
progress: reporter
|
|
5967
|
-
});
|
|
5968
|
-
reporter.stop();
|
|
5969
|
-
if (outcome.anyFailed) {
|
|
5970
|
-
const failed = outcome.packages.find((p) => p.failed);
|
|
5971
|
-
console.error(
|
|
5972
|
-
`device-agent upgrade had errors: ${failed?.failed ?? "unknown"}
|
|
5973
|
-
Manual fix:
|
|
5974
|
-
npm i -g @beeos-ai/device-agent @beeos-ai/device-mcp-server`
|
|
5975
|
-
);
|
|
5976
|
-
}
|
|
5977
|
-
for (const pkg of outcome.packages) {
|
|
5978
|
-
if (pkg.changed) {
|
|
5979
|
-
console.log(` ${pkg.pkg}: ${pkg.before ?? "(none)"} \u2192 ${pkg.after}`);
|
|
5980
|
-
} else if (!pkg.failed) {
|
|
5981
|
-
console.log(` ${pkg.pkg}: ${pkg.after ?? "(absent)"} (already current)`);
|
|
5982
|
-
}
|
|
5983
|
-
}
|
|
5984
|
-
if (outcome.anyChanged) {
|
|
5985
|
-
const reloadOutcome = await notifyFleetShutdownBestEffort();
|
|
5986
|
-
switch (reloadOutcome) {
|
|
5987
|
-
case "ok":
|
|
5988
|
-
console.log(" Fleet asked to restart \u2014 launchd will bring it up with the new code.");
|
|
5989
|
-
break;
|
|
5990
|
-
case "not_running":
|
|
5991
|
-
console.log(" Fleet is not running \u2014 nothing to restart.");
|
|
5992
|
-
break;
|
|
5993
|
-
case "unknown":
|
|
5994
|
-
console.log(
|
|
5995
|
-
" Fleet restart could not be confirmed; if you see stale behaviour run\n launchctl kickstart -k gui/$(id -u)/ai.beeos.device-fleet # macOS\n or stop & start the fleet manually."
|
|
5996
|
-
);
|
|
5997
|
-
break;
|
|
5998
|
-
}
|
|
5999
|
-
}
|
|
6000
|
-
if (options.bridges !== false) {
|
|
6001
|
-
try {
|
|
6002
|
-
await scrcpyBridgeRuntime.upgrade(reporter);
|
|
6003
|
-
} catch (e) {
|
|
6004
|
-
console.error(`scrcpy-bridge upgrade skipped: ${e}`);
|
|
6005
|
-
}
|
|
6006
|
-
try {
|
|
6007
|
-
await vncBridgeRuntime.upgrade(reporter);
|
|
6008
|
-
} catch (e) {
|
|
6009
|
-
console.error(`vnc-bridge upgrade skipped: ${e}`);
|
|
6010
|
-
}
|
|
6011
|
-
}
|
|
6012
|
-
}
|
|
6013
|
-
var init_upgrade2 = __esm({
|
|
6014
|
-
"src/commands/device/upgrade.ts"() {
|
|
6015
|
-
"use strict";
|
|
6016
|
-
init_dist();
|
|
6017
|
-
init_progress2();
|
|
6018
|
-
init_fleet_notify();
|
|
6019
|
-
}
|
|
6020
|
-
});
|
|
6021
|
-
|
|
6022
6022
|
// src/commands/device/refresh-config.ts
|
|
6023
6023
|
async function refreshConfig(options = {}) {
|
|
6024
6024
|
const cfg = await loadOrCreateConfig();
|
|
@@ -6629,12 +6629,10 @@ function formatService(s) {
|
|
|
6629
6629
|
|
|
6630
6630
|
// src/commands/update.ts
|
|
6631
6631
|
init_dist();
|
|
6632
|
-
|
|
6632
|
+
init_upgrade2();
|
|
6633
6633
|
async function run4(agentFramework, options = {}) {
|
|
6634
6634
|
if (agentFramework === "device") {
|
|
6635
|
-
|
|
6636
|
-
await deviceRuntime.update(reporter);
|
|
6637
|
-
reporter.stop();
|
|
6635
|
+
await upgrade({ bridges: true });
|
|
6638
6636
|
if (options.json) {
|
|
6639
6637
|
emitJsonEnvelope(jsonOk({ framework: "device", action: "updated" }));
|
|
6640
6638
|
} else {
|