@adhdev/daemon-standalone 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
@@ -30108,10 +30108,10 @@ var require_dist3 = __commonJS({
30108
30108
  }
30109
30109
  function getDaemonBuildInfo() {
30110
30110
  if (cached2) return cached2;
30111
- const commit = readInjected(true ? "25bb0512a5fd46999cb1fe21ef4ab7e2ed23a6c6" : void 0) ?? "unknown";
30112
- const commitShort = readInjected(true ? "25bb0512" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30113
- const version2 = readInjected(true ? "0.9.82-rc.390" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30114
- const builtAt = readInjected(true ? "2026-06-26T09:56:10.994Z" : void 0);
30111
+ const commit = readInjected(true ? "62225119ccdbf6c3c153a4225ff6ba2032ad87e1" : void 0) ?? "unknown";
30112
+ const commitShort = readInjected(true ? "62225119" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30113
+ const version2 = readInjected(true ? "0.9.82-rc.392" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30114
+ const builtAt = readInjected(true ? "2026-06-26T13:05:40.071Z" : void 0);
30115
30115
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30116
30116
  return cached2;
30117
30117
  }
@@ -44386,21 +44386,32 @@ ${cleanBody}`;
44386
44386
  }
44387
44387
  }
44388
44388
  if (sessionId && nodeId && providerType) {
44389
+ let worktreeBootstrapPending = false;
44390
+ try {
44391
+ const mesh = getMeshWithCache(components, args.meshId);
44392
+ const node = mesh?.nodes?.find((n) => meshNodeIdMatches(n, nodeId));
44393
+ worktreeBootstrapPending = node?.worktreeBootstrap?.status === "running";
44394
+ } catch {
44395
+ }
44389
44396
  sweepExpiredRemoteIdleSessions();
44390
44397
  try {
44391
44398
  MeshRuntimeStore.getInstance().setRemoteIdleSession(args.meshId, nodeId, sessionId, providerType, Date.now() + REMOTE_IDLE_SESSION_TTL_MS);
44392
44399
  } catch {
44393
44400
  }
44394
- setImmediate(() => {
44395
- maybeAutoFastForwardIdleNode(components, { meshId: args.meshId, nodeId, sessionId, providerType }).finally(() => {
44396
- try {
44397
- const assigned = tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
44398
- if (assigned) MeshRuntimeStore.getInstance().deleteRemoteIdleSession(args.meshId, nodeId, sessionId);
44399
- } catch (e) {
44400
- LOG2.warn("MeshQueue", `Failed to assign idle queue task after maintenance for ${nodeId}: ${e?.message || e}`);
44401
- }
44401
+ if (worktreeBootstrapPending) {
44402
+ LOG2.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)`);
44403
+ } else {
44404
+ setImmediate(() => {
44405
+ maybeAutoFastForwardIdleNode(components, { meshId: args.meshId, nodeId, sessionId, providerType }).finally(() => {
44406
+ try {
44407
+ const assigned = tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
44408
+ if (assigned) MeshRuntimeStore.getInstance().deleteRemoteIdleSession(args.meshId, nodeId, sessionId);
44409
+ } catch (e) {
44410
+ LOG2.warn("MeshQueue", `Failed to assign idle queue task after maintenance for ${nodeId}: ${e?.message || e}`);
44411
+ }
44412
+ });
44402
44413
  });
44403
- });
44414
+ }
44404
44415
  }
44405
44416
  } else if (args.event === "agent:generating_started") {
44406
44417
  const sessionId = resolveEventSessionId(args.metadataEvent, args.sourceInstanceId);