@moxt-ai/mobius 0.0.102 → 0.0.103

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
@@ -3381,7 +3381,7 @@ var program = new Command();
3381
3381
  // package.json
3382
3382
  var package_default = {
3383
3383
  name: "@moxt-ai/mobius",
3384
- version: "0.0.102",
3384
+ version: "0.0.103",
3385
3385
  description: "Mobius CLI for pairing and running local AI agent services.",
3386
3386
  type: "module",
3387
3387
  bin: {
@@ -28894,12 +28894,18 @@ function decodeSessionStartedEvent(encoded) {
28894
28894
  }
28895
28895
  function decodeAgentMessageDeltaEvent(encoded) {
28896
28896
  const value = parseJson2(encoded);
28897
- assertExactKeys(value, ["commandId", "kind", "messageId", "sessionId", "text"]);
28897
+ assertExactKeys(value, ["commandId", "epoch", "kind", "messageId", "sequence", "sessionId", "text"]);
28898
28898
  assertKind(value, AGENT_MESSAGE_DELTA_KIND);
28899
+ const sequence = readSequence(value, "sequence");
28900
+ if (sequence === 0) {
28901
+ throw new ProtocolMessageError("Invalid live sequence");
28902
+ }
28899
28903
  return {
28900
28904
  commandId: readIdentifier(value, "commandId"),
28905
+ epoch: readIdentifier(value, "epoch"),
28901
28906
  kind: AGENT_MESSAGE_DELTA_KIND,
28902
28907
  messageId: value["messageId"] === void 0 ? "" : readText(value, "messageId", 255),
28908
+ sequence,
28903
28909
  sessionId: readIdentifier(value, "sessionId"),
28904
28910
  text: readString(value, "text", MAX_EVENT_TEXT_LENGTH)
28905
28911
  };
@@ -37359,12 +37365,15 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
37359
37365
  const text = new CoalescingTextPublisher(
37360
37366
  timer,
37361
37367
  (messageId, delta) => {
37368
+ const stream = recordLiveText(delta);
37362
37369
  publisher.recordAttempt(
37363
37370
  command.sessionId,
37364
37371
  {
37365
37372
  commandId: command.commandId,
37373
+ epoch: stream.epoch,
37366
37374
  kind: AGENT_MESSAGE_DELTA_KIND,
37367
37375
  messageId,
37376
+ sequence: stream.sequence,
37368
37377
  sessionId: command.sessionId,
37369
37378
  text: delta
37370
37379
  },
@@ -37465,7 +37474,6 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
37465
37474
  return Promise.resolve();
37466
37475
  },
37467
37476
  onText: (delta, messageId) => {
37468
- recordLiveText(delta);
37469
37477
  text.record(messageId, delta);
37470
37478
  return Promise.resolve();
37471
37479
  },
@@ -37686,6 +37694,7 @@ var ActiveDaemonTurn = class {
37686
37694
  this.#text = this.#text.slice(-ACTIVE_TURN_TEXT_LIMIT);
37687
37695
  this.#truncated = true;
37688
37696
  }
37697
+ return { epoch: this.#epoch, sequence: this.#sequence };
37689
37698
  };
37690
37699
  snapshot = () => this.#accepted ? {
37691
37700
  commandId: this.command.commandId,