@adhdev/daemon-standalone 0.9.82-rc.132 → 0.9.82-rc.134

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.132",
3
+ "version": "0.9.82-rc.134",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -298,7 +298,8 @@ function buildDirectTaskPayload(message, via, opts) {
298
298
  taskSummary: descriptor.taskSummary,
299
299
  ...opts.taskMode ? { taskMode: opts.taskMode } : {},
300
300
  ...opts.providerType ? { providerType: opts.providerType } : {},
301
- ...opts.targetSessionId ? { targetSessionId: opts.targetSessionId } : {}
301
+ ...opts.targetSessionId ? { targetSessionId: opts.targetSessionId } : {},
302
+ ...opts.dispatchedToIdleSession !== void 0 ? { dispatchedToIdleSession: opts.dispatchedToIdleSession } : {}
302
303
  };
303
304
  }
304
305
  function findNode(mesh, nodeId) {
@@ -2599,6 +2600,7 @@ async function meshSendTask(ctx, args) {
2599
2600
  nextAction: `Relaunch the target session on node '${args.node_id}' or retry without session_id so Repo Mesh can pick a session with provider metadata.`
2600
2601
  });
2601
2602
  }
2603
+ const sessionWasIdle = explicitTargetSession ? isIdleSessionRecord(explicitTargetSession) : false;
2602
2604
  const dispatchResult = await commandForNode(ctx, node, "agent_command", {
2603
2605
  targetSessionId: args.session_id,
2604
2606
  agentType: resolvedProviderType,
@@ -2629,12 +2631,27 @@ async function meshSendTask(ctx, args) {
2629
2631
  taskId,
2630
2632
  taskMode,
2631
2633
  providerType: resolvedProviderType,
2632
- targetSessionId: args.session_id
2634
+ targetSessionId: args.session_id,
2635
+ dispatchedToIdleSession: sessionWasIdle
2633
2636
  })
2634
2637
  });
2635
2638
  } catch {
2636
2639
  }
2637
- return JSON.stringify({ success: true, dispatched: true, source: "direct", taskId, taskMode, providerType: resolvedProviderType, nodeId: args.node_id, sessionId: args.session_id });
2640
+ return JSON.stringify({
2641
+ success: true,
2642
+ dispatched: true,
2643
+ source: "direct",
2644
+ taskId,
2645
+ taskMode,
2646
+ providerType: resolvedProviderType,
2647
+ nodeId: args.node_id,
2648
+ sessionId: args.session_id,
2649
+ ...sessionWasIdle ? {
2650
+ dispatchAcknowledgementRisk: true,
2651
+ dispatchAcknowledgementRiskReason: "session_was_idle_at_dispatch",
2652
+ dispatchAcknowledgementNote: `Session '${args.session_id}' was idle at dispatch time. If it does not transition to generating, this direct task was not acknowledged. Use mesh_status to verify; if the session remains idle, it may appear as stale direct work \u2014 launch a fresh session and retry.`
2653
+ } : {}
2654
+ });
2638
2655
  }
2639
2656
  const task = (0, import_daemon_core.enqueueTask)(ctx.mesh.id, args.message, {
2640
2657
  targetNodeId: args.node_id,