@adhdev/daemon-standalone 0.9.82-rc.232 → 0.9.82-rc.234
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 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36437,11 +36437,18 @@ Next step: ${nextStep}`;
|
|
|
36437
36437
|
message: task.message,
|
|
36438
36438
|
status: "delivering"
|
|
36439
36439
|
});
|
|
36440
|
+
const localDaemonIdForDispatch = readNonEmptyString2(loadConfig2().machineId) || void 0;
|
|
36440
36441
|
components.dispatchMeshCommand(node.daemonId, "agent_command", {
|
|
36441
36442
|
targetSessionId: sessionId,
|
|
36442
36443
|
cliType: providerType,
|
|
36443
36444
|
action: "send_chat",
|
|
36444
|
-
message: task.message
|
|
36445
|
+
message: task.message,
|
|
36446
|
+
meshContext: {
|
|
36447
|
+
meshId,
|
|
36448
|
+
nodeId,
|
|
36449
|
+
taskId: task.id,
|
|
36450
|
+
...localDaemonIdForDispatch ? { coordinatorDaemonId: localDaemonIdForDispatch } : {}
|
|
36451
|
+
}
|
|
36445
36452
|
}).then(() => {
|
|
36446
36453
|
updateSessionDeliveryStatus(delivery2.id, "delivered");
|
|
36447
36454
|
}).catch((e) => {
|
|
@@ -37299,7 +37306,7 @@ Next step: ${nextStep}`;
|
|
|
37299
37306
|
if (workerCoordinatorDaemonId && localDaemonId && workerCoordinatorDaemonId !== localDaemonId) return false;
|
|
37300
37307
|
return true;
|
|
37301
37308
|
});
|
|
37302
|
-
const
|
|
37309
|
+
const isTerminalEvent = (/* @__PURE__ */ new Set(["refine:completed", "refine:failed", "agent:generating_completed", "agent:stopped"])).has(args.event);
|
|
37303
37310
|
if (coordinatorInstances.length === 0) {
|
|
37304
37311
|
if (queuePendingMeshCoordinatorEvent({
|
|
37305
37312
|
event: args.event,
|
|
@@ -37319,13 +37326,13 @@ Next step: ${nextStep}`;
|
|
|
37319
37326
|
}
|
|
37320
37327
|
return { success: true, forwarded: 0 };
|
|
37321
37328
|
}
|
|
37322
|
-
const allCoordinatorsGenerating =
|
|
37329
|
+
const allCoordinatorsGenerating = isTerminalEvent && coordinatorInstances.every((inst) => {
|
|
37323
37330
|
const s = inst.getState();
|
|
37324
37331
|
const status = readNonEmptyString2(s.status).toLowerCase();
|
|
37325
37332
|
const activeChatStatus = readNonEmptyString2(s.activeChat?.status).toLowerCase();
|
|
37326
37333
|
return status === "generating" || status === "streaming" || status === "long_generating" || activeChatStatus === "generating" || activeChatStatus === "streaming";
|
|
37327
37334
|
});
|
|
37328
|
-
if (!
|
|
37335
|
+
if (!isTerminalEvent || allCoordinatorsGenerating) {
|
|
37329
37336
|
if (queuePendingMeshCoordinatorEvent({
|
|
37330
37337
|
event: args.event,
|
|
37331
37338
|
meshId: args.meshId,
|