@adhdev/daemon-core 0.9.82-rc.250 → 0.9.82-rc.252
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 +20 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +7 -11
- package/src/mesh/mesh-events-coordinator.ts +22 -22
- package/src/mesh/mesh-events-pending.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -5726,6 +5726,9 @@ function hasPendingRefineTerminalEventDuplicate(event) {
|
|
|
5726
5726
|
}
|
|
5727
5727
|
function buildPendingEventFingerprint(event) {
|
|
5728
5728
|
const metadata = readRecord3(event.metadataEvent) || {};
|
|
5729
|
+
if (event.event === "worktree_bootstrap_complete" || event.event === "worktree_bootstrap_failed") {
|
|
5730
|
+
return [event.meshId, event.event, event.nodeId || ""].join("::");
|
|
5731
|
+
}
|
|
5729
5732
|
const sessionId = resolveEventSessionId(metadata);
|
|
5730
5733
|
const providerSessionId = readNonEmptyString2(metadata.providerSessionId);
|
|
5731
5734
|
const taskId = readNonEmptyString2(metadata.taskId) || readNonEmptyString2(readRecord3(metadata.payload)?.taskId);
|
|
@@ -7562,24 +7565,21 @@ function injectMeshSystemMessage(components, args) {
|
|
|
7562
7565
|
}
|
|
7563
7566
|
return { success: true, forwarded: 0 };
|
|
7564
7567
|
}
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
})) {
|
|
7581
|
-
LOG.info("MeshEvents", `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
7582
|
-
}
|
|
7568
|
+
if (queuePendingMeshCoordinatorEvent({
|
|
7569
|
+
event: args.event,
|
|
7570
|
+
meshId: args.meshId,
|
|
7571
|
+
nodeLabel: args.nodeLabel,
|
|
7572
|
+
nodeId: args.nodeId || void 0,
|
|
7573
|
+
workspace: readNonEmptyString2(args.metadataEvent.workspace),
|
|
7574
|
+
metadataEvent: {
|
|
7575
|
+
...args.metadataEvent,
|
|
7576
|
+
...recoveryContext ? { recoveryContext } : {}
|
|
7577
|
+
},
|
|
7578
|
+
coordinatorMessage: messageText,
|
|
7579
|
+
queuedAt: Date.now(),
|
|
7580
|
+
...workerCoordinatorDaemonId ? { targetCoordinatorDaemonId: workerCoordinatorDaemonId } : {}
|
|
7581
|
+
})) {
|
|
7582
|
+
LOG.info("MeshEvents", `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
7583
7583
|
}
|
|
7584
7584
|
for (const coord of coordinatorInstances) {
|
|
7585
7585
|
const coordState = coord.getState();
|
|
@@ -44738,7 +44738,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
44738
44738
|
nodeStatuses.push(status);
|
|
44739
44739
|
}
|
|
44740
44740
|
const callerCoordinatorDaemonId = typeof args?.coordinatorDaemonId === "string" && args.coordinatorDaemonId.trim() ? args.coordinatorDaemonId.trim() : this.deps.statusInstanceId || void 0;
|
|
44741
|
-
const pendingCoordinatorEvents =
|
|
44741
|
+
const pendingCoordinatorEvents = getPendingMeshCoordinatorEvents(meshId, callerCoordinatorDaemonId);
|
|
44742
44742
|
const previewFreshness = (() => {
|
|
44743
44743
|
const localRepoRoot = nodeStatuses.map((node) => readStringValue(node?.git?.repoRoot, node?.repoRoot, node?.workspace)).find((candidate) => !!candidate && fs23.existsSync(candidate));
|
|
44744
44744
|
return localRepoRoot ? buildPreviewFreshness(localRepoRoot) : void 0;
|
|
@@ -44746,7 +44746,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
44746
44746
|
const asyncRefineJobs = buildMeshAsyncRefineJobs({
|
|
44747
44747
|
meshId,
|
|
44748
44748
|
ledgerEntries: asyncRefineLedgerEntries,
|
|
44749
|
-
pendingEvents: pendingCoordinatorEvents
|
|
44749
|
+
pendingEvents: [...pendingCoordinatorEvents]
|
|
44750
44750
|
});
|
|
44751
44751
|
const historicalSessions = buildHistoricalMeshSessions({
|
|
44752
44752
|
meshId,
|