usebeeline 0.1.37 → 0.1.40
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/usebeeline.mjs +12 -5
- package/package.json +1 -1
package/dist/usebeeline.mjs
CHANGED
|
@@ -18271,6 +18271,10 @@ var WORKSPACE_SKILL_MARKDOWN_MAX_BYTES = 32 * 1024;
|
|
|
18271
18271
|
var WORKFLOW_TIMEOUT_SECONDS_MAX = 30 * 24 * 60 * 60;
|
|
18272
18272
|
var WORKFLOW_DEFAULT_DEADLINE_SECONDS = 24 * 60 * 60;
|
|
18273
18273
|
|
|
18274
|
+
// packages/api-contract/dist/daemon.js
|
|
18275
|
+
var HELPER_UPDATE_CLOSE_CODE = 4002;
|
|
18276
|
+
var HELPER_UPDATE_CLOSE_REASON = "helper-update";
|
|
18277
|
+
|
|
18274
18278
|
// apps/body/dist/daemon-api-client.js
|
|
18275
18279
|
import { resolve as resolve9 } from "node:path";
|
|
18276
18280
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
@@ -18543,14 +18547,14 @@ var LiveLink = class {
|
|
|
18543
18547
|
if (!this.#socket && !this.#reconnect)
|
|
18544
18548
|
this.#connect();
|
|
18545
18549
|
}
|
|
18546
|
-
stop() {
|
|
18550
|
+
stop(forUpdate = false) {
|
|
18547
18551
|
this.#wanted = false;
|
|
18548
18552
|
this.#clearTimers();
|
|
18549
18553
|
const socket = this.#socket;
|
|
18550
18554
|
this.#socket = void 0;
|
|
18551
18555
|
if (this.#state !== "update-required")
|
|
18552
18556
|
this.#state = "disconnected";
|
|
18553
|
-
socket?.close();
|
|
18557
|
+
socket?.close(forUpdate ? HELPER_UPDATE_CLOSE_CODE : void 0, forUpdate ? HELPER_UPDATE_CLOSE_REASON : void 0);
|
|
18554
18558
|
}
|
|
18555
18559
|
send(data) {
|
|
18556
18560
|
if (!this.isOpen() || this.#socket?.readyState !== wrapper_default.OPEN)
|
|
@@ -18593,7 +18597,7 @@ var LiveLink = class {
|
|
|
18593
18597
|
this.#clearTimers();
|
|
18594
18598
|
const socket = this.#socket;
|
|
18595
18599
|
this.#socket = void 0;
|
|
18596
|
-
socket?.close();
|
|
18600
|
+
socket?.close(HELPER_UPDATE_CLOSE_CODE, HELPER_UPDATE_CLOSE_REASON);
|
|
18597
18601
|
}
|
|
18598
18602
|
#clearTimers() {
|
|
18599
18603
|
clearTimeout(this.#reconnect);
|
|
@@ -18982,9 +18986,9 @@ var MachineLink = class {
|
|
|
18982
18986
|
if (!this.#channels.size)
|
|
18983
18987
|
this.link.stop();
|
|
18984
18988
|
}
|
|
18985
|
-
stop() {
|
|
18989
|
+
stop(forUpdate = false) {
|
|
18986
18990
|
this.#channels.clear();
|
|
18987
|
-
this.link.stop();
|
|
18991
|
+
this.link.stop(forUpdate);
|
|
18988
18992
|
}
|
|
18989
18993
|
#url() {
|
|
18990
18994
|
const liveUrl = new URL("/v1/phone/live", this.options.baseUrl);
|
|
@@ -50365,6 +50369,9 @@ async function runMachineHelper(options = {}) {
|
|
|
50365
50369
|
if (restarting)
|
|
50366
50370
|
return;
|
|
50367
50371
|
restarting = reason;
|
|
50372
|
+
if (reason === "update")
|
|
50373
|
+
for (const link2 of links.values())
|
|
50374
|
+
link2.stop(true);
|
|
50368
50375
|
lifecycle.stop(reason);
|
|
50369
50376
|
};
|
|
50370
50377
|
const forceUpdate = layout ? new ForceUpdateCoordinator({
|