@moxt-ai/mobius 0.0.119 → 0.0.120

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.119",
3384
+ version: "0.0.120",
3385
3385
  description: "Mobius CLI for pairing and running local AI agent services.",
3386
3386
  type: "module",
3387
3387
  bin: {
@@ -44855,7 +44855,7 @@ var DaemonOperationState = class {
44855
44855
  const existing = this.#executions.get(commandId);
44856
44856
  if (existing !== void 0) {
44857
44857
  if (existing.sessionId !== sessionId || existing.commandHash !== commandHash) {
44858
- throw new Error("The daemon command identity conflicts with its in-memory receipt");
44858
+ return { kind: "conflict" };
44859
44859
  }
44860
44860
  return { attemptId: existing.attemptId, commandId, kind: "duplicate", state: existing.state };
44861
44861
  }
@@ -45692,10 +45692,28 @@ async function runRelayConnection(config2, directories, audit, sessions, install
45692
45692
  throw new Error("Unsupported protocol message");
45693
45693
  }
45694
45694
  const command = message;
45695
- if (activeTurns.has(command.commandId)) {
45695
+ const receipt = operations.claimExecution(
45696
+ command.commandId,
45697
+ command.sessionId,
45698
+ encodeSessionPromptCommand(command)
45699
+ );
45700
+ if (receipt.kind === "conflict") {
45701
+ const code = "command_identity_conflict";
45702
+ audit.record({
45703
+ commandId: command.commandId,
45704
+ details: { code },
45705
+ event: "session_prompt_rejected",
45706
+ sessionId: command.sessionId
45707
+ });
45708
+ send(socket, {
45709
+ code,
45710
+ requestId: command.commandId,
45711
+ kind: "session.operation.failed",
45712
+ message: "This command identifier was already used for a different request.",
45713
+ sessionId: command.sessionId
45714
+ });
45696
45715
  return;
45697
45716
  }
45698
- const receipt = operations.claimExecution(command.commandId, command.sessionId, encoded);
45699
45717
  if (receipt.kind === "duplicate") {
45700
45718
  return;
45701
45719
  }