@adhdev/daemon-core 0.9.82-rc.319 → 0.9.82-rc.320

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/index.js CHANGED
@@ -353,10 +353,10 @@ function readInjected(value) {
353
353
  }
354
354
  function getDaemonBuildInfo() {
355
355
  if (cached) return cached;
356
- const commit = readInjected(true ? "b7441eaef1ad5631a86c48e4931520524ff8cdec" : void 0) ?? "unknown";
357
- const commitShort = readInjected(true ? "b7441eae" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
358
- const version = readInjected(true ? "0.9.82-rc.319" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
359
- const builtAt = readInjected(true ? "2026-06-18T17:15:31.135Z" : void 0);
356
+ const commit = readInjected(true ? "bbaf30f95c09531cec77fb48a8cf6d38b3b6d7f9" : void 0) ?? "unknown";
357
+ const commitShort = readInjected(true ? "bbaf30f9" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
358
+ const version = readInjected(true ? "0.9.82-rc.320" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
359
+ const builtAt = readInjected(true ? "2026-06-19T01:16:38.511Z" : void 0);
360
360
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
361
361
  return cached;
362
362
  }
@@ -9178,6 +9178,13 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
9178
9178
  markAutoLaunch(meshId, task.id, { status: "skipped", reason: "target_session_constraint" });
9179
9179
  continue;
9180
9180
  }
9181
+ if (task.autoLaunch?.status === "completed" && task.autoLaunch.sessionId) {
9182
+ const launchedAtMs = Date.parse(task.autoLaunch.updatedAt);
9183
+ if (Number.isFinite(launchedAtMs) && Date.now() - launchedAtMs < AUTO_LAUNCH_AWAIT_CLAIM_MS) {
9184
+ recordAutoLaunchEvent(meshId, { phase: "skipped", taskId: task.id, reason: "awaiting_launched_session_claim", nodeId: task.autoLaunch.nodeId, sessionId: task.autoLaunch.sessionId });
9185
+ continue;
9186
+ }
9187
+ }
9181
9188
  const candidateNodes = Array.isArray(mesh?.nodes) ? mesh.nodes.filter((node) => {
9182
9189
  if (task.targetNodeId && readMeshNodeId(node) !== task.targetNodeId) return false;
9183
9190
  if (task.requiredTags?.length) {
@@ -9895,7 +9902,13 @@ function injectMeshSystemMessage(components, args) {
9895
9902
  metadataEvent: args.metadataEvent,
9896
9903
  recoveryContext
9897
9904
  });
9898
- if (!messageText) return { success: false, error: "unsupported mesh event" };
9905
+ if (!messageText) {
9906
+ const isSilentClaimRelevantEvent = args.event === "agent:ready" || args.event === "agent:generating_started";
9907
+ const coordinatorIsRemote = !!workerCoordinatorDaemonId && !resolveCoordinatorDrainDaemonIds(components).includes(workerCoordinatorDaemonId);
9908
+ if (!(isSilentClaimRelevantEvent && coordinatorIsRemote)) {
9909
+ return { success: false, error: "unsupported mesh event" };
9910
+ }
9911
+ }
9899
9912
  const pendingEvent = {
9900
9913
  event: args.event,
9901
9914
  meshId: args.meshId,
@@ -9906,7 +9919,11 @@ function injectMeshSystemMessage(components, args) {
9906
9919
  ...args.metadataEvent,
9907
9920
  ...recoveryContext ? { recoveryContext } : {}
9908
9921
  },
9909
- coordinatorMessage: messageText,
9922
+ // Silent lifecycle events (agent:ready / agent:generating_started) carry no
9923
+ // coordinator message; they are queued only so the coordinator re-runs the
9924
+ // remote-claim state machine on pull. injectPendingIntoCoordinator skips
9925
+ // entries without a coordinatorMessage, so a live CLI coordinator is not spammed.
9926
+ ...messageText ? { coordinatorMessage: messageText } : {},
9910
9927
  queuedAt: Date.now(),
9911
9928
  ...workerCoordinatorDaemonId ? { targetCoordinatorDaemonId: workerCoordinatorDaemonId } : {}
9912
9929
  };
@@ -10058,7 +10075,7 @@ function setupMeshEventForwarding(components) {
10058
10075
  });
10059
10076
  });
10060
10077
  }
10061
- var import_fs10, REMOTE_IDLE_SESSION_TTL_MS, meshByWorkspaceCache, MESH_WORKSPACE_CACHE_TTL_MS, IDLE_AUTO_FAST_FORWARD_THROTTLE_MS, idleAutoFastForwardLastAttempt, INTENTIONAL_CLEANUP_STOP_SUPPRESSION_MS, RECENT_COMPLETION_FINGERPRINT_TTL_MS, autoLaunchInProgress, autoLaunchCooldownUntil, AUTO_LAUNCH_COOLDOWN_MS, lastAutoLaunchLedgerKey, AUTO_LAUNCH_LEDGER_DEDUP_MAX, MESH_COORDINATOR_EVENTS, EVENT_TO_LEDGER_KIND, MESH_FORCE_INJECT_EVENTS;
10078
+ var import_fs10, REMOTE_IDLE_SESSION_TTL_MS, meshByWorkspaceCache, MESH_WORKSPACE_CACHE_TTL_MS, IDLE_AUTO_FAST_FORWARD_THROTTLE_MS, idleAutoFastForwardLastAttempt, INTENTIONAL_CLEANUP_STOP_SUPPRESSION_MS, RECENT_COMPLETION_FINGERPRINT_TTL_MS, autoLaunchInProgress, autoLaunchCooldownUntil, AUTO_LAUNCH_COOLDOWN_MS, AUTO_LAUNCH_AWAIT_CLAIM_MS, lastAutoLaunchLedgerKey, AUTO_LAUNCH_LEDGER_DEDUP_MAX, MESH_COORDINATOR_EVENTS, EVENT_TO_LEDGER_KIND, MESH_FORCE_INJECT_EVENTS;
10062
10079
  var init_mesh_events_coordinator = __esm({
10063
10080
  "src/mesh/mesh-events-coordinator.ts"() {
10064
10081
  "use strict";
@@ -10089,6 +10106,7 @@ var init_mesh_events_coordinator = __esm({
10089
10106
  autoLaunchInProgress = /* @__PURE__ */ new Set();
10090
10107
  autoLaunchCooldownUntil = /* @__PURE__ */ new Map();
10091
10108
  AUTO_LAUNCH_COOLDOWN_MS = 5e3;
10109
+ AUTO_LAUNCH_AWAIT_CLAIM_MS = 9e4;
10092
10110
  lastAutoLaunchLedgerKey = /* @__PURE__ */ new Map();
10093
10111
  AUTO_LAUNCH_LEDGER_DEDUP_MAX = 2e3;
10094
10112
  MESH_COORDINATOR_EVENTS = /* @__PURE__ */ new Set([