@vibedeckx/darwin-arm64 0.3.42 → 0.3.43

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.
Files changed (2) hide show
  1. package/dist/bin.js +33 -10
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -235616,6 +235616,13 @@ function connectPersistentRemoteWs(sessionId, remoteInfo, cache2, reverseConnect
235616
235616
  if (eventBus && activityReady === true) {
235617
235617
  console.log(`[AgentWS:remote\u2192eventBus] ${sessionId} session:status=${statusEvent.status}`);
235618
235618
  eventBus.emit(statusEvent);
235619
+ if (statusEvent.status === "running") {
235620
+ agentSessionManager?.emitBranchActivityIfChanged(statusEvent.projectId, statusEvent.branch, {
235621
+ activity: "working",
235622
+ since: Date.now(),
235623
+ sessionId
235624
+ });
235625
+ }
235619
235626
  }
235620
235627
  }
235621
235628
  } else if ("finished" in parsed) {
@@ -235720,9 +235727,14 @@ function connectPersistentRemoteWs(sessionId, remoteInfo, cache2, reverseConnect
235720
235727
  cache2.broadcast(sessionId, raw);
235721
235728
  }
235722
235729
  };
235730
+ let liveFrames = Promise.resolve();
235731
+ let framesInFlight = 0;
235723
235732
  const handleLiveMessage = (data) => {
235724
- void processLiveMessage(data).catch((error48) => {
235725
- console.error(`[AgentWS] live frame handling failed for ${sessionId}:`, error48);
235733
+ const run2 = () => processLiveMessage(data);
235734
+ const handled = framesInFlight === 0 ? run2() : liveFrames.then(run2);
235735
+ framesInFlight++;
235736
+ liveFrames = handled.catch((error48) => console.error(`[AgentWS] live frame handling failed for ${sessionId}:`, error48)).finally(() => {
235737
+ framesInFlight--;
235726
235738
  });
235727
235739
  };
235728
235740
  remoteWs.on("open", () => {
@@ -241563,6 +241575,12 @@ var REPEAT_MAX_MINUTES_LIMIT = 24 * 60;
241563
241575
  var CHECK_COMMAND_TIMEOUT_MS = 5 * 6e4;
241564
241576
  var CHECK_OUTPUT_TAIL = 600;
241565
241577
  var ABNORMAL_END_RECHECK_MS = 1500;
241578
+ var STOP_NOTE = {
241579
+ itemDone: "Loop: this iteration finished its item; the session was closed. The next item runs in a fresh session.",
241580
+ cancelled: "Loop ended; the session was closed.",
241581
+ timeCap: "Loop: time cap reached; the session was stopped.",
241582
+ resumed: "Loop resumed in a fresh session; this one was closed."
241583
+ };
241566
241584
  var RepeatLoopError = class extends Error {
241567
241585
  constructor(code, message) {
241568
241586
  super(message);
@@ -241757,7 +241775,7 @@ ${TASK_STATUS_INSTRUCTIONS}`;
241757
241775
  async tearDown(run2) {
241758
241776
  await this.storage.workflowRunSteps.abandonOpenByRun(run2.id, "run left preparing during dispatch");
241759
241777
  await this.ops.cancelReviewer({ sessionId: run2.source_session_id, reason: "cancelled" }).catch(() => void 0);
241760
- await this.ops.stopSession?.(run2.source_session_id).catch(() => void 0);
241778
+ await this.stop(run2.source_session_id, STOP_NOTE.cancelled);
241761
241779
  }
241762
241780
  /** `preparing → waiting_resume` on the same row, with the bell: nobody may be watching. */
241763
241781
  async toGateInPlace(run2, reason) {
@@ -241860,7 +241878,7 @@ ${TASK_STATUS_INSTRUCTIONS}`;
241860
241878
  this.host.emitRunUpdated(done);
241861
241879
  if (outbox) this.host.milestoneCreated();
241862
241880
  const keepSession = settlement.next === "gate" && (status === "blocked" || status === null || checkFailure !== null);
241863
- if (!keepSession) await this.stop(run2.source_session_id);
241881
+ if (!keepSession) await this.stop(run2.source_session_id, STOP_NOTE.itemDone);
241864
241882
  if (!insertRun) return;
241865
241883
  const next = await this.storage.workflowRuns.getById(insertRun.id);
241866
241884
  this.host.track(next);
@@ -241987,7 +242005,7 @@ ${TASK_STATUS_INSTRUCTIONS}`;
241987
242005
  }
241988
242006
  const reason = `\u5DF2\u8FBE\u65F6\u957F\u4E0A\u9650\uFF08${params.maxMinutes} \u5206\u949F\uFF09\uFF0C\u8FD9\u6B21\u8FED\u4EE3\u5DF2\u88AB\u505C\u6B62\u2014\u2014\u90A3\u4E00\u9879\u53EF\u80FD\u5904\u7406\u5230\u4E00\u534A\u3002\u7EE7\u7EED\u5C06\u91CD\u65B0\u8BA1\u65F6\u3002`;
241989
242007
  if (await this.endIteration(step, "time cap reached", "failed", reason, "max-minutes")) {
241990
- await this.stop(run2.source_session_id);
242008
+ await this.stop(run2.source_session_id, STOP_NOTE.timeCap);
241991
242009
  }
241992
242010
  }
241993
242011
  }
@@ -242025,7 +242043,7 @@ ${TASK_STATUS_INSTRUCTIONS}`;
242025
242043
  this.host.untrack(cancelled);
242026
242044
  if (was !== "waiting_resume") {
242027
242045
  await this.ops.cancelReviewer({ sessionId: active.source_session_id, reason: "cancelled" }).catch(() => void 0);
242028
- await this.stop(active.source_session_id);
242046
+ await this.stop(active.source_session_id, STOP_NOTE.cancelled);
242029
242047
  }
242030
242048
  this.host.emitRunUpdated(cancelled);
242031
242049
  return cancelled;
@@ -242058,7 +242076,7 @@ ${TASK_STATUS_INSTRUCTIONS}`;
242058
242076
  if ((await this.storage.agentSessions.getById(params.prevSessionId))?.status === "running") {
242059
242077
  throw new RepeatLoopError("session-busy", "\u4E0A\u4E00\u6B21\u8FED\u4EE3\u7684 session \u8FD8\u5728\u8FD0\u884C\u3002\u7B49\u5B83\u505C\u4E0B\uFF0C\u6216\u5148\u505C\u6389\u5B83\u3002");
242060
242078
  }
242061
- await this.stop(params.prevSessionId);
242079
+ await this.stop(params.prevSessionId, STOP_NOTE.resumed);
242062
242080
  }
242063
242081
  const overCap = gate.max_rounds !== null && gate.round > gate.max_rounds;
242064
242082
  const overTime = Date.now() - params.startedAt > params.maxMinutes * 6e4;
@@ -242083,8 +242101,13 @@ ${TASK_STATUS_INSTRUCTIONS}`;
242083
242101
  void this.dispatchIteration(run2.id).catch((err) => console.error("[RepeatLoop] boot dispatch failed:", err));
242084
242102
  }
242085
242103
  }
242086
- async stop(sessionId) {
242087
- await this.ops.stopSession?.(sessionId).catch((err) => console.warn(`[RepeatLoop] stopping ${sessionId} failed:`, err));
242104
+ /**
242105
+ * Always with a note: the runtime's default is "Session stopped by user.",
242106
+ * which is false for every stop the loop performs — and on a finished
242107
+ * iteration reads as if the item had been interrupted.
242108
+ */
242109
+ async stop(sessionId, note) {
242110
+ await this.ops.stopSession?.(sessionId, { note }).catch((err) => console.warn(`[RepeatLoop] stopping ${sessionId} failed:`, err));
242088
242111
  }
242089
242112
  outbox(run2, anchorSessionId, kind, reason) {
242090
242113
  return {
@@ -248467,7 +248490,7 @@ var sharedServices = async (fastify2, opts) => {
248467
248490
  switchMode: (sessionId, projectPath, mode) => agentSessionManager.switchMode(sessionId, projectPath, mode),
248468
248491
  getRawMessages: (sessionId) => agentSessionManager.loadRawMessages(sessionId),
248469
248492
  broadcastRawToSession: (sessionId, payload) => agentSessionManager.broadcastRawToSession(sessionId, payload),
248470
- stopSession: (sessionId) => agentSessionManager.stopSession(sessionId)
248493
+ stopSession: (sessionId, stopOpts) => agentSessionManager.stopSession(sessionId, stopOpts)
248471
248494
  };
248472
248495
  const workflowEngine = new WorkflowEngine(opts.storage, reviewAgentOps);
248473
248496
  workflowEngine.setEventBus(eventBus);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibedeckx/darwin-arm64",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "Vibedeckx platform binaries for macOS ARM64",
5
5
  "os": [
6
6
  "darwin"