@botiverse/raft-daemon 1.0.10 → 1.0.12
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.
|
@@ -28276,9 +28276,22 @@ var DaemonCore = class {
|
|
|
28276
28276
|
}
|
|
28277
28277
|
};
|
|
28278
28278
|
void Promise.resolve().then(() => this.options.onComputerControl(action, ctx)).catch((err) => {
|
|
28279
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
28280
|
+
const failure = /(?:^|\b)CONTROL_BUSY(?:\b|:)/.test(message) ? "control_busy" : /(?:^|\b)SELF_RELAUNCH_UNAVAILABLE(?:\b|:)/.test(message) ? "self_relaunch_unavailable" : "computer_control_failed";
|
|
28279
28281
|
logger.error(
|
|
28280
|
-
`[Daemon] computer:${action} control handler failed: ${
|
|
28282
|
+
`[Daemon] computer:${action} control handler failed: ${message}`
|
|
28281
28283
|
);
|
|
28284
|
+
if (!requestId) return;
|
|
28285
|
+
if (action === "restart") {
|
|
28286
|
+
this.connection.send({
|
|
28287
|
+
type: "computer:restart:done",
|
|
28288
|
+
requestId,
|
|
28289
|
+
ok: false,
|
|
28290
|
+
error: failure
|
|
28291
|
+
});
|
|
28292
|
+
} else {
|
|
28293
|
+
ctx.emitUpgradeDone({ ok: false, error: failure });
|
|
28294
|
+
}
|
|
28282
28295
|
});
|
|
28283
28296
|
} else {
|
|
28284
28297
|
logger.info(`[Daemon] Ignoring computer:${action} \u2014 not launched by a Computer service.`);
|
package/dist/core.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
stageAgentMigrationObjectStoreBundle,
|
|
37
37
|
subscribeDaemonLogs,
|
|
38
38
|
verifyAgentMigrationAdoptPlan
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-RKNTK2UF.js";
|
|
40
40
|
export {
|
|
41
41
|
AGENT_MIGRATION_BUNDLE_SCHEMA_VERSION,
|
|
42
42
|
AGENT_MIGRATION_CONTROL_SEAM_ENV,
|
package/dist/index.js
CHANGED