@adhdev/daemon-core 0.9.82-rc.231 → 0.9.82-rc.233
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 +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +4 -1
- package/src/mesh/mesh-events-coordinator.ts +7 -0
package/dist/index.mjs
CHANGED
|
@@ -6674,11 +6674,18 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
|
|
|
6674
6674
|
message: task.message,
|
|
6675
6675
|
status: "delivering"
|
|
6676
6676
|
});
|
|
6677
|
+
const localDaemonIdForDispatch = readNonEmptyString2(loadConfig().machineId) || void 0;
|
|
6677
6678
|
components.dispatchMeshCommand(node.daemonId, "agent_command", {
|
|
6678
6679
|
targetSessionId: sessionId,
|
|
6679
6680
|
cliType: providerType,
|
|
6680
6681
|
action: "send_chat",
|
|
6681
|
-
message: task.message
|
|
6682
|
+
message: task.message,
|
|
6683
|
+
meshContext: {
|
|
6684
|
+
meshId,
|
|
6685
|
+
nodeId,
|
|
6686
|
+
taskId: task.id,
|
|
6687
|
+
...localDaemonIdForDispatch ? { coordinatorDaemonId: localDaemonIdForDispatch } : {}
|
|
6688
|
+
}
|
|
6682
6689
|
}).then(() => {
|
|
6683
6690
|
updateSessionDeliveryStatus(delivery2.id, "delivered");
|
|
6684
6691
|
}).catch((e) => {
|
|
@@ -43518,10 +43525,11 @@ ${tail}` : ""
|
|
|
43518
43525
|
}
|
|
43519
43526
|
const selfDaemonId = this.deps.statusInstanceId;
|
|
43520
43527
|
const isRemote = nodeDaemonId && selfDaemonId && nodeDaemonId !== selfDaemonId;
|
|
43521
|
-
if (isRemote && this.deps.dispatchMeshCommand) {
|
|
43528
|
+
if (isRemote && this.deps.dispatchMeshCommand && !args?._meshDirectDispatch) {
|
|
43522
43529
|
const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId, "fast_forward_mesh_node", {
|
|
43523
43530
|
...typeof args === "object" && args !== null ? args : {},
|
|
43524
|
-
workspace
|
|
43531
|
+
workspace,
|
|
43532
|
+
_meshDirectDispatch: true
|
|
43525
43533
|
});
|
|
43526
43534
|
return forwarded ?? { success: false, error: "no response from remote node" };
|
|
43527
43535
|
}
|