@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.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +8 -2
package/package.json
CHANGED
package/src/commands/router.ts
CHANGED
|
@@ -925,6 +925,7 @@ type MeshRefineJobHandle = {
|
|
|
925
925
|
startedAt: string;
|
|
926
926
|
completedAt?: string;
|
|
927
927
|
duplicate?: boolean;
|
|
928
|
+
retryOfJobId?: string;
|
|
928
929
|
eventDelivery: {
|
|
929
930
|
pendingEvents: true;
|
|
930
931
|
ledger: true;
|
|
@@ -2188,6 +2189,7 @@ export class DaemonCommandRouter {
|
|
|
2188
2189
|
completedAt?: string;
|
|
2189
2190
|
jobId?: string;
|
|
2190
2191
|
interactionId?: string;
|
|
2192
|
+
retryOfJobId?: string;
|
|
2191
2193
|
}): MeshRefineJobHandle {
|
|
2192
2194
|
return {
|
|
2193
2195
|
success: true,
|
|
@@ -2202,6 +2204,7 @@ export class DaemonCommandRouter {
|
|
|
2202
2204
|
workspace: readStringValue(args.node?.workspace),
|
|
2203
2205
|
startedAt: args.startedAt || new Date().toISOString(),
|
|
2204
2206
|
...(args.completedAt ? { completedAt: args.completedAt } : {}),
|
|
2207
|
+
...(args.retryOfJobId ? { retryOfJobId: args.retryOfJobId } : {}),
|
|
2205
2208
|
eventDelivery: { pendingEvents: true, ledger: true },
|
|
2206
2209
|
evidence: {
|
|
2207
2210
|
pendingEventsCommand: 'get_pending_mesh_events',
|
|
@@ -2229,6 +2232,7 @@ export class DaemonCommandRouter {
|
|
|
2229
2232
|
status: handle.status,
|
|
2230
2233
|
startedAt: handle.startedAt,
|
|
2231
2234
|
completedAt: handle.completedAt,
|
|
2235
|
+
retryOfJobId: handle.retryOfJobId,
|
|
2232
2236
|
...(result ? { result } : {}),
|
|
2233
2237
|
},
|
|
2234
2238
|
queuedAt: Date.now(),
|
|
@@ -2253,8 +2257,10 @@ export class DaemonCommandRouter {
|
|
|
2253
2257
|
workspace: handle.workspace,
|
|
2254
2258
|
startedAt: handle.startedAt,
|
|
2255
2259
|
completedAt: handle.completedAt,
|
|
2260
|
+
retryOfJobId: handle.retryOfJobId,
|
|
2256
2261
|
},
|
|
2257
2262
|
async: true,
|
|
2263
|
+
retryOfJobId: handle.retryOfJobId,
|
|
2258
2264
|
...(result ? {
|
|
2259
2265
|
success: result.success === true,
|
|
2260
2266
|
result,
|
|
@@ -2509,6 +2515,7 @@ export class DaemonCommandRouter {
|
|
|
2509
2515
|
completedAt,
|
|
2510
2516
|
jobId: handle.jobId,
|
|
2511
2517
|
interactionId: handle.interactionId,
|
|
2518
|
+
retryOfJobId: handle.retryOfJobId,
|
|
2512
2519
|
node: { daemonId: handle.targetDaemonId, workspace: handle.workspace },
|
|
2513
2520
|
});
|
|
2514
2521
|
const terminal: MeshRefineTerminalJob = { ...terminalHandle, result };
|
|
@@ -2524,7 +2531,6 @@ export class DaemonCommandRouter {
|
|
|
2524
2531
|
const running = this.runningRefineJobs.get(key);
|
|
2525
2532
|
if (running) return { ...running, duplicate: true };
|
|
2526
2533
|
const terminal = this.terminalRefineJobs.get(key);
|
|
2527
|
-
if (terminal) return { ...terminal, duplicate: true };
|
|
2528
2534
|
|
|
2529
2535
|
const meshRecord = await this.getMeshForCommand(meshId, args?.inlineMesh);
|
|
2530
2536
|
const mesh = meshRecord?.mesh;
|
|
@@ -2532,7 +2538,7 @@ export class DaemonCommandRouter {
|
|
|
2532
2538
|
if (!node) return { success: false, error: `Node '${nodeId}' not found in mesh` };
|
|
2533
2539
|
if (!node.isLocalWorktree || !node.workspace) return { success: false, error: `Refinery requires a local worktree node` };
|
|
2534
2540
|
|
|
2535
|
-
const handle = this.buildRefineJobHandle({ meshId, nodeId, node });
|
|
2541
|
+
const handle = this.buildRefineJobHandle({ meshId, nodeId, node, retryOfJobId: terminal?.jobId });
|
|
2536
2542
|
this.runningRefineJobs.set(key, handle);
|
|
2537
2543
|
await this.appendRefineJobLedger('task_dispatched', handle);
|
|
2538
2544
|
this.queueRefineJobEvent('refine:accepted', handle);
|