@adhdev/daemon-standalone 0.9.77-rc.23 → 0.9.77-rc.25

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
@@ -32530,13 +32530,18 @@ Follow these recovery rules:
32530
32530
  ].filter(Boolean);
32531
32531
  return parts.length > 0 ? ` (${parts.join("; ")})` : "";
32532
32532
  }
32533
+ function getMeshWithCache(components, meshId) {
32534
+ const localMesh = getMesh(meshId);
32535
+ if (localMesh) return localMesh;
32536
+ return components.router?.getCachedInlineMesh(meshId);
32537
+ }
32533
32538
  function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType) {
32534
32539
  const task = claimNextTask(meshId, nodeId, sessionId);
32535
32540
  if (!task) {
32536
32541
  return false;
32537
32542
  }
32538
32543
  LOG2.info("MeshQueue", `Node ${nodeId} (${sessionId}) pulled task ${task.id}`);
32539
- const mesh = getMesh(meshId);
32544
+ const mesh = getMeshWithCache(components, meshId);
32540
32545
  const node = mesh?.nodes.find((n) => n.id === nodeId);
32541
32546
  if (node?.daemonId && components.dispatchMeshCommand) {
32542
32547
  const isLocalNode = components.cliManager.adapters.has(sessionId);
@@ -32565,7 +32570,7 @@ Follow these recovery rules:
32565
32570
  return true;
32566
32571
  }
32567
32572
  function triggerMeshQueue(components, meshId) {
32568
- const mesh = getMesh(meshId);
32573
+ const mesh = getMeshWithCache(components, meshId);
32569
32574
  if (!mesh) return;
32570
32575
  const cliInstances = components.instanceManager.getByCategory("cli");
32571
32576
  for (const inst of cliInstances) {
@@ -32823,7 +32828,7 @@ Do NOT retry on this node. Consider reassigning to a different node or asking th
32823
32828
  const meshIdFromRuntime = readNonEmptyString(settings.meshNodeFor);
32824
32829
  const isMeshDelegate = Boolean(meshIdFromRuntime || settings.launchedByCoordinator);
32825
32830
  if (!isMeshDelegate) return;
32826
- const mesh = meshIdFromRuntime ? getMesh(meshIdFromRuntime) : getMeshByRepo(workspace);
32831
+ const mesh = meshIdFromRuntime ? getMeshWithCache(components, meshIdFromRuntime) : getMeshByRepo(workspace);
32827
32832
  const meshId = meshIdFromRuntime || readNonEmptyString(mesh?.id);
32828
32833
  if (!meshId) return;
32829
32834
  const targetNode = mesh?.nodes?.find((n) => n.workspace === workspace);