@adhdev/daemon-core 0.9.82-rc.390 → 0.9.82-rc.392

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
@@ -383,10 +383,10 @@ function readInjected(value) {
383
383
  }
384
384
  function getDaemonBuildInfo() {
385
385
  if (cached) return cached;
386
- const commit = readInjected(true ? "25bb0512a5fd46999cb1fe21ef4ab7e2ed23a6c6" : void 0) ?? "unknown";
387
- const commitShort = readInjected(true ? "25bb0512" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
388
- const version = readInjected(true ? "0.9.82-rc.390" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
389
- const builtAt = readInjected(true ? "2026-06-26T09:55:40.652Z" : void 0);
386
+ const commit = readInjected(true ? "62225119ccdbf6c3c153a4225ff6ba2032ad87e1" : void 0) ?? "unknown";
387
+ const commitShort = readInjected(true ? "62225119" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
388
+ const version = readInjected(true ? "0.9.82-rc.392" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
389
+ const builtAt = readInjected(true ? "2026-06-26T12:23:33.380Z" : void 0);
390
390
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
391
391
  return cached;
392
392
  }
@@ -14579,21 +14579,32 @@ function injectMeshSystemMessage(components, args) {
14579
14579
  }
14580
14580
  }
14581
14581
  if (sessionId && nodeId && providerType) {
14582
+ let worktreeBootstrapPending = false;
14583
+ try {
14584
+ const mesh = getMeshWithCache(components, args.meshId);
14585
+ const node = mesh?.nodes?.find((n) => meshNodeIdMatches(n, nodeId));
14586
+ worktreeBootstrapPending = node?.worktreeBootstrap?.status === "running";
14587
+ } catch {
14588
+ }
14582
14589
  sweepExpiredRemoteIdleSessions();
14583
14590
  try {
14584
14591
  MeshRuntimeStore.getInstance().setRemoteIdleSession(args.meshId, nodeId, sessionId, providerType, Date.now() + REMOTE_IDLE_SESSION_TTL_MS);
14585
14592
  } catch {
14586
14593
  }
14587
- setImmediate(() => {
14588
- maybeAutoFastForwardIdleNode(components, { meshId: args.meshId, nodeId, sessionId, providerType }).finally(() => {
14589
- try {
14590
- const assigned = tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
14591
- if (assigned) MeshRuntimeStore.getInstance().deleteRemoteIdleSession(args.meshId, nodeId, sessionId);
14592
- } catch (e) {
14593
- LOG.warn("MeshQueue", `Failed to assign idle queue task after maintenance for ${nodeId}: ${e?.message || e}`);
14594
- }
14594
+ if (worktreeBootstrapPending) {
14595
+ LOG.info("MeshQueue", `Deferring queue claim for worktree node ${nodeId} (${sessionId}): worktree bootstrap still running \u2014 early agent:ready precedes bootstrap completion; the idle session is registered and the claim will re-fire once bootstrap finishes (guards against dispatching into a half-built worktree \u2192 empty session / work leaking to the base node)`);
14596
+ } else {
14597
+ setImmediate(() => {
14598
+ maybeAutoFastForwardIdleNode(components, { meshId: args.meshId, nodeId, sessionId, providerType }).finally(() => {
14599
+ try {
14600
+ const assigned = tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
14601
+ if (assigned) MeshRuntimeStore.getInstance().deleteRemoteIdleSession(args.meshId, nodeId, sessionId);
14602
+ } catch (e) {
14603
+ LOG.warn("MeshQueue", `Failed to assign idle queue task after maintenance for ${nodeId}: ${e?.message || e}`);
14604
+ }
14605
+ });
14595
14606
  });
14596
- });
14607
+ }
14597
14608
  }
14598
14609
  } else if (args.event === "agent:generating_started") {
14599
14610
  const sessionId = resolveEventSessionId(args.metadataEvent, args.sourceInstanceId);