@adhdev/daemon-core 0.9.82-rc.60 → 0.9.82-rc.61

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.mjs CHANGED
@@ -26652,6 +26652,7 @@ var DaemonCommandRouter = class {
26652
26652
  workspace: readStringValue(args.node?.workspace),
26653
26653
  startedAt: args.startedAt || (/* @__PURE__ */ new Date()).toISOString(),
26654
26654
  ...args.completedAt ? { completedAt: args.completedAt } : {},
26655
+ ...args.retryOfJobId ? { retryOfJobId: args.retryOfJobId } : {},
26655
26656
  eventDelivery: { pendingEvents: true, ledger: true },
26656
26657
  evidence: {
26657
26658
  pendingEventsCommand: "get_pending_mesh_events",
@@ -26678,6 +26679,7 @@ var DaemonCommandRouter = class {
26678
26679
  status: handle.status,
26679
26680
  startedAt: handle.startedAt,
26680
26681
  completedAt: handle.completedAt,
26682
+ retryOfJobId: handle.retryOfJobId,
26681
26683
  ...result ? { result } : {}
26682
26684
  },
26683
26685
  queuedAt: Date.now()
@@ -26700,9 +26702,11 @@ var DaemonCommandRouter = class {
26700
26702
  targetDaemonId: handle.targetDaemonId,
26701
26703
  workspace: handle.workspace,
26702
26704
  startedAt: handle.startedAt,
26703
- completedAt: handle.completedAt
26705
+ completedAt: handle.completedAt,
26706
+ retryOfJobId: handle.retryOfJobId
26704
26707
  },
26705
26708
  async: true,
26709
+ retryOfJobId: handle.retryOfJobId,
26706
26710
  ...result ? {
26707
26711
  success: result.success === true,
26708
26712
  result,
@@ -26940,6 +26944,7 @@ var DaemonCommandRouter = class {
26940
26944
  completedAt,
26941
26945
  jobId: handle.jobId,
26942
26946
  interactionId: handle.interactionId,
26947
+ retryOfJobId: handle.retryOfJobId,
26943
26948
  node: { daemonId: handle.targetDaemonId, workspace: handle.workspace }
26944
26949
  });
26945
26950
  const terminal = { ...terminalHandle, result };
@@ -26954,13 +26959,12 @@ var DaemonCommandRouter = class {
26954
26959
  const running = this.runningRefineJobs.get(key);
26955
26960
  if (running) return { ...running, duplicate: true };
26956
26961
  const terminal = this.terminalRefineJobs.get(key);
26957
- if (terminal) return { ...terminal, duplicate: true };
26958
26962
  const meshRecord = await this.getMeshForCommand(meshId, args?.inlineMesh);
26959
26963
  const mesh = meshRecord?.mesh;
26960
26964
  const node = mesh?.nodes?.find((n) => n.id === nodeId || n.nodeId === nodeId);
26961
26965
  if (!node) return { success: false, error: `Node '${nodeId}' not found in mesh` };
26962
26966
  if (!node.isLocalWorktree || !node.workspace) return { success: false, error: `Refinery requires a local worktree node` };
26963
- const handle = this.buildRefineJobHandle({ meshId, nodeId, node });
26967
+ const handle = this.buildRefineJobHandle({ meshId, nodeId, node, retryOfJobId: terminal?.jobId });
26964
26968
  this.runningRefineJobs.set(key, handle);
26965
26969
  await this.appendRefineJobLedger("task_dispatched", handle);
26966
26970
  this.queueRefineJobEvent("refine:accepted", handle);