@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 CHANGED
@@ -6680,11 +6680,18 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
6680
6680
  message: task.message,
6681
6681
  status: "delivering"
6682
6682
  });
6683
+ const localDaemonIdForDispatch = readNonEmptyString2(loadConfig().machineId) || void 0;
6683
6684
  components.dispatchMeshCommand(node.daemonId, "agent_command", {
6684
6685
  targetSessionId: sessionId,
6685
6686
  cliType: providerType,
6686
6687
  action: "send_chat",
6687
- message: task.message
6688
+ message: task.message,
6689
+ meshContext: {
6690
+ meshId,
6691
+ nodeId,
6692
+ taskId: task.id,
6693
+ ...localDaemonIdForDispatch ? { coordinatorDaemonId: localDaemonIdForDispatch } : {}
6694
+ }
6688
6695
  }).then(() => {
6689
6696
  updateSessionDeliveryStatus(delivery2.id, "delivered");
6690
6697
  }).catch((e) => {
@@ -43845,10 +43852,11 @@ ${tail}` : ""
43845
43852
  }
43846
43853
  const selfDaemonId = this.deps.statusInstanceId;
43847
43854
  const isRemote = nodeDaemonId && selfDaemonId && nodeDaemonId !== selfDaemonId;
43848
- if (isRemote && this.deps.dispatchMeshCommand) {
43855
+ if (isRemote && this.deps.dispatchMeshCommand && !args?._meshDirectDispatch) {
43849
43856
  const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId, "fast_forward_mesh_node", {
43850
43857
  ...typeof args === "object" && args !== null ? args : {},
43851
- workspace
43858
+ workspace,
43859
+ _meshDirectDispatch: true
43852
43860
  });
43853
43861
  return forwarded ?? { success: false, error: "no response from remote node" };
43854
43862
  }