@adhdev/daemon-standalone 0.9.82-rc.382 → 0.9.82-rc.384

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.82-rc.382",
3
+ "version": "0.9.82-rc.384",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -3639,15 +3639,23 @@ async function meshQueueCancel(ctx, args) {
3639
3639
  let workerStop = { attempted: false };
3640
3640
  if (wasAssigned && assignedSessionId && assignedSessionId !== ctx.coordinatorSessionId && assignedProviderType) {
3641
3641
  workerStop = { attempted: true, sessionId: assignedSessionId, nodeId: assignedNodeId };
3642
- ctx.transport.command("agent_command", {
3643
- targetSessionId: assignedSessionId,
3644
- cliType: assignedProviderType,
3645
- agentType: assignedProviderType,
3646
- action: "stop",
3647
- ...assignedNodeId ? { meshContext: { meshId: ctx.mesh.id, nodeId: assignedNodeId, taskId } } : {}
3648
- }).catch((e) => {
3642
+ try {
3643
+ const stopResult = await ctx.transport.command("agent_command", {
3644
+ targetSessionId: assignedSessionId,
3645
+ cliType: assignedProviderType,
3646
+ agentType: assignedProviderType,
3647
+ action: "stop",
3648
+ ...assignedNodeId ? { meshContext: { meshId: ctx.mesh.id, nodeId: assignedNodeId, taskId } } : {}
3649
+ });
3650
+ const stopped = stopResult?.stopped === true || stopResult?.success === true;
3651
+ workerStop.stopped = stopped;
3652
+ if (!stopped) {
3653
+ workerStop.reason = readString(stopResult?.error) || "worker stop not confirmed";
3654
+ }
3655
+ } catch (e) {
3656
+ workerStop.stopped = false;
3649
3657
  workerStop.reason = e?.message || String(e);
3650
- });
3658
+ }
3651
3659
  } else if (wasAssigned && assignedSessionId === ctx.coordinatorSessionId) {
3652
3660
  workerStop = { attempted: false, reason: "assigned_session_is_coordinator_self \u2014 stop suppressed" };
3653
3661
  }