@moxt-ai/mobius 0.0.54 → 0.0.55

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/cli.js CHANGED
@@ -11,7 +11,7 @@ import { mkdir as mkdir5 } from "node:fs/promises";
11
11
  // package.json
12
12
  var package_default = {
13
13
  name: "@moxt-ai/mobius",
14
- version: "0.0.54",
14
+ version: "0.0.55",
15
15
  description: "Mobius CLI for pairing and running local AI agent services.",
16
16
  type: "module",
17
17
  bin: {
@@ -39101,12 +39101,16 @@ var RelayConnectionLiveness = class {
39101
39101
  heartbeatId,
39102
39102
  this.#timer.schedule(this.#handleTimeout, HEARTBEAT_ACK_TIMEOUT_MILLISECONDS)
39103
39103
  );
39104
- this.#transport.send(
39104
+ const sent = this.#transport.send(
39105
39105
  encodeRuntimeHeartbeatEvent({
39106
39106
  heartbeatId,
39107
39107
  kind: RUNTIME_HEARTBEAT_KIND
39108
39108
  })
39109
39109
  );
39110
+ if (!sent && this.#state instanceof AwaitingHeartbeatAckState && this.#state.heartbeatId === heartbeatId) {
39111
+ this.#state.timeout.cancel();
39112
+ this.#state = new FinishedRelayLivenessState();
39113
+ }
39110
39114
  };
39111
39115
  };
39112
39116
 
@@ -41285,7 +41289,20 @@ async function runRelayConnection(config2, directories, audit, sessions, install
41285
41289
  }
41286
41290
  };
41287
41291
  const connectionLiveness = new RelayConnectionLiveness(timer, {
41288
- send: (message) => send(socket, message),
41292
+ send: (message) => {
41293
+ if (socket.readyState !== WebSocket2.OPEN) {
41294
+ return false;
41295
+ }
41296
+ try {
41297
+ send(socket, message);
41298
+ return true;
41299
+ } catch (error62) {
41300
+ if (socket.readyState !== WebSocket2.OPEN) {
41301
+ return false;
41302
+ }
41303
+ throw error62;
41304
+ }
41305
+ },
41289
41306
  unresponsive: (heartbeatId, timeoutMilliseconds) => {
41290
41307
  diagnostics.heartbeatTimedOut(connectionEpoch, heartbeatId, timeoutMilliseconds);
41291
41308
  diagnostics.connectionClosed(