@adhdev/daemon-standalone 0.9.77-rc.21 → 0.9.77-rc.22
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 +21 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +21 -2
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -26262,13 +26262,31 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
|
|
|
26262
26262
|
return false;
|
|
26263
26263
|
}
|
|
26264
26264
|
LOG.info("MeshQueue", `Node ${nodeId} (${sessionId}) pulled task ${task.id}`);
|
|
26265
|
+
const mesh = getMesh(meshId);
|
|
26266
|
+
const node = mesh?.nodes.find((n) => n.id === nodeId);
|
|
26267
|
+
if (node?.daemonId && components.dispatchMeshCommand) {
|
|
26268
|
+
const isLocalNode = components.cliManager.adapters.has(sessionId);
|
|
26269
|
+
if (!isLocalNode) {
|
|
26270
|
+
components.dispatchMeshCommand(node.daemonId, "agent_command", {
|
|
26271
|
+
targetSessionId: sessionId,
|
|
26272
|
+
cliType: providerType,
|
|
26273
|
+
action: "send_chat",
|
|
26274
|
+
message: task.message
|
|
26275
|
+
}).catch((e) => {
|
|
26276
|
+
LOG.error("MeshQueue", `Failed to dispatch task via P2P to remote node ${nodeId}: ${e?.message}`);
|
|
26277
|
+
updateTaskStatus(meshId, task.id, "failed");
|
|
26278
|
+
});
|
|
26279
|
+
return true;
|
|
26280
|
+
}
|
|
26281
|
+
}
|
|
26265
26282
|
components.cliManager.handleCliCommand("agent_command", {
|
|
26266
26283
|
targetSessionId: sessionId,
|
|
26267
26284
|
cliType: providerType,
|
|
26268
26285
|
action: "send_chat",
|
|
26269
26286
|
message: task.message
|
|
26270
26287
|
}).catch((e) => {
|
|
26271
|
-
LOG.error("MeshQueue", `Failed to dispatch task to node ${nodeId}: ${e?.message}`);
|
|
26288
|
+
LOG.error("MeshQueue", `Failed to dispatch task locally to node ${nodeId}: ${e?.message}`);
|
|
26289
|
+
updateTaskStatus(meshId, task.id, "failed");
|
|
26272
26290
|
});
|
|
26273
26291
|
return true;
|
|
26274
26292
|
}
|
|
@@ -40879,7 +40897,8 @@ async function initDaemonComponents(config2) {
|
|
|
40879
40897
|
cdpManagers,
|
|
40880
40898
|
sessionRegistry,
|
|
40881
40899
|
detectedIdes: detectedIdesRef,
|
|
40882
|
-
refreshProviderAvailability
|
|
40900
|
+
refreshProviderAvailability,
|
|
40901
|
+
dispatchMeshCommand: config2.dispatchMeshCommand
|
|
40883
40902
|
};
|
|
40884
40903
|
setupMeshEventForwarding(components);
|
|
40885
40904
|
return components;
|