@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.js
CHANGED
|
@@ -5729,6 +5729,9 @@ function hasPendingRefineTerminalEventDuplicate(event) {
|
|
|
5729
5729
|
}
|
|
5730
5730
|
function buildPendingEventFingerprint(event) {
|
|
5731
5731
|
const metadata = readRecord3(event.metadataEvent) || {};
|
|
5732
|
+
if (event.event === "worktree_bootstrap_complete" || event.event === "worktree_bootstrap_failed") {
|
|
5733
|
+
return [event.meshId, event.event, event.nodeId || ""].join("::");
|
|
5734
|
+
}
|
|
5732
5735
|
const sessionId = resolveEventSessionId(metadata);
|
|
5733
5736
|
const providerSessionId = readNonEmptyString2(metadata.providerSessionId);
|
|
5734
5737
|
const taskId = readNonEmptyString2(metadata.taskId) || readNonEmptyString2(readRecord3(metadata.payload)?.taskId);
|
|
@@ -7568,24 +7571,21 @@ function injectMeshSystemMessage(components, args) {
|
|
|
7568
7571
|
}
|
|
7569
7572
|
return { success: true, forwarded: 0 };
|
|
7570
7573
|
}
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
})) {
|
|
7587
|
-
LOG.info("MeshEvents", `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
7588
|
-
}
|
|
7574
|
+
if (queuePendingMeshCoordinatorEvent({
|
|
7575
|
+
event: args.event,
|
|
7576
|
+
meshId: args.meshId,
|
|
7577
|
+
nodeLabel: args.nodeLabel,
|
|
7578
|
+
nodeId: args.nodeId || void 0,
|
|
7579
|
+
workspace: readNonEmptyString2(args.metadataEvent.workspace),
|
|
7580
|
+
metadataEvent: {
|
|
7581
|
+
...args.metadataEvent,
|
|
7582
|
+
...recoveryContext ? { recoveryContext } : {}
|
|
7583
|
+
},
|
|
7584
|
+
coordinatorMessage: messageText,
|
|
7585
|
+
queuedAt: Date.now(),
|
|
7586
|
+
...workerCoordinatorDaemonId ? { targetCoordinatorDaemonId: workerCoordinatorDaemonId } : {}
|
|
7587
|
+
})) {
|
|
7588
|
+
LOG.info("MeshEvents", `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
7589
7589
|
}
|
|
7590
7590
|
for (const coord of coordinatorInstances) {
|
|
7591
7591
|
const coordState = coord.getState();
|
|
@@ -45065,7 +45065,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
45065
45065
|
nodeStatuses.push(status);
|
|
45066
45066
|
}
|
|
45067
45067
|
const callerCoordinatorDaemonId = typeof args?.coordinatorDaemonId === "string" && args.coordinatorDaemonId.trim() ? args.coordinatorDaemonId.trim() : this.deps.statusInstanceId || void 0;
|
|
45068
|
-
const pendingCoordinatorEvents =
|
|
45068
|
+
const pendingCoordinatorEvents = getPendingMeshCoordinatorEvents(meshId, callerCoordinatorDaemonId);
|
|
45069
45069
|
const previewFreshness = (() => {
|
|
45070
45070
|
const localRepoRoot = nodeStatuses.map((node) => readStringValue(node?.git?.repoRoot, node?.repoRoot, node?.workspace)).find((candidate) => !!candidate && fs23.existsSync(candidate));
|
|
45071
45071
|
return localRepoRoot ? buildPreviewFreshness(localRepoRoot) : void 0;
|
|
@@ -45073,7 +45073,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
45073
45073
|
const asyncRefineJobs = buildMeshAsyncRefineJobs({
|
|
45074
45074
|
meshId,
|
|
45075
45075
|
ledgerEntries: asyncRefineLedgerEntries,
|
|
45076
|
-
pendingEvents: pendingCoordinatorEvents
|
|
45076
|
+
pendingEvents: [...pendingCoordinatorEvents]
|
|
45077
45077
|
});
|
|
45078
45078
|
const historicalSessions = buildHistoricalMeshSessions({
|
|
45079
45079
|
meshId,
|