@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-standalone",
3
- "version": "0.9.77-rc.23",
3
+ "version": "0.9.77-rc.25",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -26256,13 +26256,18 @@ function formatCompletionMetadata(event) {
26256
26256
  ].filter(Boolean);
26257
26257
  return parts.length > 0 ? ` (${parts.join("; ")})` : "";
26258
26258
  }
26259
+ function getMeshWithCache(components, meshId) {
26260
+ const localMesh = getMesh(meshId);
26261
+ if (localMesh) return localMesh;
26262
+ return components.router?.getCachedInlineMesh(meshId);
26263
+ }
26259
26264
  function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType) {
26260
26265
  const task = claimNextTask(meshId, nodeId, sessionId);
26261
26266
  if (!task) {
26262
26267
  return false;
26263
26268
  }
26264
26269
  LOG.info("MeshQueue", `Node ${nodeId} (${sessionId}) pulled task ${task.id}`);
26265
- const mesh = getMesh(meshId);
26270
+ const mesh = getMeshWithCache(components, meshId);
26266
26271
  const node = mesh?.nodes.find((n) => n.id === nodeId);
26267
26272
  if (node?.daemonId && components.dispatchMeshCommand) {
26268
26273
  const isLocalNode = components.cliManager.adapters.has(sessionId);
@@ -26291,7 +26296,7 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
26291
26296
  return true;
26292
26297
  }
26293
26298
  function triggerMeshQueue(components, meshId) {
26294
- const mesh = getMesh(meshId);
26299
+ const mesh = getMeshWithCache(components, meshId);
26295
26300
  if (!mesh) return;
26296
26301
  const cliInstances = components.instanceManager.getByCategory("cli");
26297
26302
  for (const inst of cliInstances) {
@@ -26549,7 +26554,7 @@ function setupMeshEventForwarding(components) {
26549
26554
  const meshIdFromRuntime = readNonEmptyString(settings.meshNodeFor);
26550
26555
  const isMeshDelegate = Boolean(meshIdFromRuntime || settings.launchedByCoordinator);
26551
26556
  if (!isMeshDelegate) return;
26552
- const mesh = meshIdFromRuntime ? getMesh(meshIdFromRuntime) : getMeshByRepo(workspace);
26557
+ const mesh = meshIdFromRuntime ? getMeshWithCache(components, meshIdFromRuntime) : getMeshByRepo(workspace);
26553
26558
  const meshId = meshIdFromRuntime || readNonEmptyString(mesh?.id);
26554
26559
  if (!meshId) return;
26555
26560
  const targetNode = mesh?.nodes?.find((n) => n.workspace === workspace);