@adhdev/daemon-standalone 1.0.49-rc.1 → 1.0.49-rc.3
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 +54 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/public/assets/index-BiHPbQCY.css +1 -0
- package/public/assets/index-C_QYZRF_.js +116 -0
- package/public/index.html +2 -2
- package/public/assets/index-BjPWjmsH.css +0 -1
- package/public/assets/index-C5f45LAh.js +0 -116
package/dist/index.js
CHANGED
|
@@ -37056,10 +37056,10 @@ var require_dist3 = __commonJS({
|
|
|
37056
37056
|
}
|
|
37057
37057
|
function getDaemonBuildInfo() {
|
|
37058
37058
|
if (cached2) return cached2;
|
|
37059
|
-
const commit = readInjected(true ? "
|
|
37060
|
-
const commitShort = readInjected(true ? "
|
|
37061
|
-
const version2 = readInjected(true ? "1.0.49-rc.
|
|
37062
|
-
const builtAt = readInjected(true ? "2026-08-
|
|
37059
|
+
const commit = readInjected(true ? "a102f64d5a470598fb2ef67d1942a1dc2e42384d" : void 0) ?? "unknown";
|
|
37060
|
+
const commitShort = readInjected(true ? "a102f64d" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
37061
|
+
const version2 = readInjected(true ? "1.0.49-rc.3" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
37062
|
+
const builtAt = readInjected(true ? "2026-08-14T08:12:25.976Z" : void 0);
|
|
37063
37063
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
37064
37064
|
return cached2;
|
|
37065
37065
|
}
|
|
@@ -98095,7 +98095,7 @@ ${buttons.join("\n")}`;
|
|
|
98095
98095
|
timestamp: Date.now(),
|
|
98096
98096
|
taskId,
|
|
98097
98097
|
finalSummary,
|
|
98098
|
-
evidenceLevel: "
|
|
98098
|
+
evidenceLevel: "reported",
|
|
98099
98099
|
completionDiagnostic: { source: "pre_cleanup_transcript_completion" }
|
|
98100
98100
|
});
|
|
98101
98101
|
return true;
|
|
@@ -98144,7 +98144,7 @@ ${buttons.join("\n")}`;
|
|
|
98144
98144
|
timestamp: Date.now(),
|
|
98145
98145
|
taskId,
|
|
98146
98146
|
finalSummary,
|
|
98147
|
-
evidenceLevel: "
|
|
98147
|
+
evidenceLevel: "reported",
|
|
98148
98148
|
completionDiagnostic: { source: diagnosticSource }
|
|
98149
98149
|
});
|
|
98150
98150
|
return true;
|
|
@@ -100810,7 +100810,7 @@ ${buttons.join("\n")}`;
|
|
|
100810
100810
|
timestamp: pending.timestamp,
|
|
100811
100811
|
taskId: pending.taskId,
|
|
100812
100812
|
finalSummary,
|
|
100813
|
-
evidenceLevel: "
|
|
100813
|
+
evidenceLevel: "reported",
|
|
100814
100814
|
completionDiagnostic: {
|
|
100815
100815
|
source: "clean_final_assistant",
|
|
100816
100816
|
cleanPath: true,
|
|
@@ -100949,7 +100949,7 @@ ${buttons.join("\n")}`;
|
|
|
100949
100949
|
* • prior emit was WEAK → re-arm ONE-SHOT, but only across a real generating→idle
|
|
100950
100950
|
* transition: require busyEpoch to have advanced past the weak emit's epoch, so a
|
|
100951
100951
|
* static idle screen cannot re-fire the same weak frame. The genuine re-emit passes
|
|
100952
|
-
* evidenceLevel:'
|
|
100952
|
+
* evidenceLevel:'reported' (non-weak), overwriting the latch → any subsequent idle
|
|
100953
100953
|
* tick hits the now-genuine latch and is suppressed. Never a third emit.
|
|
100954
100954
|
*/
|
|
100955
100955
|
shouldSuppressCompletionReEmit(taskId) {
|
|
@@ -113669,6 +113669,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
113669
113669
|
init_dist();
|
|
113670
113670
|
init_mesh_events();
|
|
113671
113671
|
init_mesh_reconcile_identity();
|
|
113672
|
+
init_mesh_reconcile_acked_hold();
|
|
113672
113673
|
init_mesh_fast_forward();
|
|
113673
113674
|
var import_node_child_process7 = require("child_process");
|
|
113674
113675
|
var import_node_util5 = require("util");
|
|
@@ -115671,11 +115672,20 @@ ${mergeTreeErr?.stderr || ""}`;
|
|
|
115671
115672
|
LOG2.warn("Mesh", `[Refinery] Failed to append async refine ledger entry: ${e?.message || e}`);
|
|
115672
115673
|
}
|
|
115673
115674
|
}
|
|
115675
|
+
function resolveRefineResumeDispatchGraceMs() {
|
|
115676
|
+
return resolveTunedReconcileMs("MESH_REFINE_RESUME_DISPATCH_GRACE_MS", 6e4, 0, 10 * 6e4);
|
|
115677
|
+
}
|
|
115678
|
+
function resolveRefineResumeZombieCutoffMs() {
|
|
115679
|
+
return resolveTunedReconcileMs("MESH_REFINE_RESUME_ZOMBIE_CUTOFF_MS", 24 * 60 * 6e4, 5 * 6e4, 30 * 24 * 60 * 6e4);
|
|
115680
|
+
}
|
|
115674
115681
|
async function resumePendingRefineJobsOnStartup(self) {
|
|
115675
115682
|
try {
|
|
115676
115683
|
const { listMeshes: listMeshes2 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
|
|
115677
115684
|
const { readLedgerEntries: readLedgerEntries2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
115678
115685
|
const meshIds = listMeshes2().map((m) => m.id).filter(Boolean);
|
|
115686
|
+
const nowMs = Date.now();
|
|
115687
|
+
const dispatchGraceMs = resolveRefineResumeDispatchGraceMs();
|
|
115688
|
+
const zombieCutoffMs = resolveRefineResumeZombieCutoffMs();
|
|
115679
115689
|
for (const meshId of meshIds) {
|
|
115680
115690
|
const entries = readLedgerEntries2(meshId, { kind: ["task_dispatched", "task_completed", "task_failed"] });
|
|
115681
115691
|
const terminal = /* @__PURE__ */ new Set();
|
|
@@ -115693,10 +115703,44 @@ ${mergeTreeErr?.stderr || ""}`;
|
|
|
115693
115703
|
if (!jobId || terminal.has(`${e.nodeId}:${jobId}`)) continue;
|
|
115694
115704
|
const key2 = buildRefineJobKey(self, meshId, e.nodeId);
|
|
115695
115705
|
if (self.runningRefineJobs.has(key2)) continue;
|
|
115706
|
+
const dispatchedAtMs = new Date(e.timestamp).getTime();
|
|
115707
|
+
const ageMs2 = Number.isFinite(dispatchedAtMs) ? nowMs - dispatchedAtMs : void 0;
|
|
115708
|
+
if (ageMs2 !== void 0 && ageMs2 >= 0 && ageMs2 < dispatchGraceMs) {
|
|
115709
|
+
LOG2.info("Mesh", `[Refinery] Deferring resume of refine job for node ${e.nodeId} (jobId=${jobId}) \u2014 dispatched ${ageMs2}ms ago, within the ${dispatchGraceMs}ms grace window; may still be running.`);
|
|
115710
|
+
continue;
|
|
115711
|
+
}
|
|
115712
|
+
if (ageMs2 !== void 0 && ageMs2 >= zombieCutoffMs) {
|
|
115713
|
+
const node = e.payload?.refineJob;
|
|
115714
|
+
const coordinatorDaemonId2 = node?.targetCoordinatorDaemonId;
|
|
115715
|
+
const coordinatorSessionId2 = node?.targetCoordinatorSessionId;
|
|
115716
|
+
const zombieHandle = buildRefineJobHandle(self, {
|
|
115717
|
+
meshId,
|
|
115718
|
+
nodeId: e.nodeId,
|
|
115719
|
+
jobId,
|
|
115720
|
+
interactionId: typeof node?.interactionId === "string" ? node.interactionId : void 0,
|
|
115721
|
+
status: "failed",
|
|
115722
|
+
startedAt: typeof node?.startedAt === "string" ? node.startedAt : e.timestamp,
|
|
115723
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
115724
|
+
coordinatorDaemonId: coordinatorDaemonId2,
|
|
115725
|
+
coordinatorSessionId: coordinatorSessionId2
|
|
115726
|
+
});
|
|
115727
|
+
LOG2.warn("Mesh", `[Refinery] Closing out stale refine job for node ${e.nodeId} (jobId=${jobId}) as failed \u2014 dispatched ${ageMs2}ms ago, past the ${zombieCutoffMs}ms zombie cutoff with no terminal entry; not resuming.`);
|
|
115728
|
+
const zombieResult = {
|
|
115729
|
+
success: false,
|
|
115730
|
+
code: "resume_abandoned_stale_dispatch",
|
|
115731
|
+
error: `Refine job dispatched at ${e.timestamp} never reached a terminal state and exceeded the ${zombieCutoffMs}ms zombie cutoff on daemon restart; closed out without resuming.`
|
|
115732
|
+
};
|
|
115733
|
+
await appendRefineJobLedger(self, "task_failed", zombieHandle, zombieResult);
|
|
115734
|
+
queueRefineJobEvent(self, "refine:failed", zombieHandle, zombieResult);
|
|
115735
|
+
continue;
|
|
115736
|
+
}
|
|
115696
115737
|
const coordinatorDaemonId = e.payload?.refineJob?.targetCoordinatorDaemonId;
|
|
115738
|
+
const coordinatorSessionId = e.payload?.refineJob?.targetCoordinatorSessionId;
|
|
115697
115739
|
LOG2.info("Mesh", `[Refinery] Auto-resuming interrupted refine job for node ${e.nodeId} (jobId=${jobId})`);
|
|
115698
115740
|
void startMeshRefineJob(self, meshId, e.nodeId, {
|
|
115699
|
-
|
|
115741
|
+
jobId,
|
|
115742
|
+
coordinatorDaemonId,
|
|
115743
|
+
coordinatorSessionId
|
|
115700
115744
|
});
|
|
115701
115745
|
}
|
|
115702
115746
|
}
|
|
@@ -117420,7 +117464,7 @@ ${e?.stderr || ""}`;
|
|
|
117420
117464
|
const terminal = self.terminalRefineJobs.get(key2);
|
|
117421
117465
|
const alreadyRunning = self.runningRefineJobs.get(key2);
|
|
117422
117466
|
if (alreadyRunning) return { ...alreadyRunning, duplicate: true };
|
|
117423
|
-
const jobId = `refine_${createInteractionId()}`;
|
|
117467
|
+
const jobId = typeof args?.jobId === "string" && args.jobId.trim() ? args.jobId.trim() : `refine_${createInteractionId()}`;
|
|
117424
117468
|
const interactionId = createInteractionId();
|
|
117425
117469
|
const placeholder = buildRefineJobHandle(self, { meshId, nodeId, jobId, interactionId, retryOfJobId: terminal?.jobId });
|
|
117426
117470
|
self.runningRefineJobs.set(key2, placeholder);
|