@adhdev/daemon-core 0.9.82-rc.256 → 0.9.82-rc.257
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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/mesh/mesh-events-coordinator.ts +17 -2
package/package.json
CHANGED
|
@@ -1541,8 +1541,23 @@ export function setupMeshEventForwarding(components: DaemonComponents) {
|
|
|
1541
1541
|
|
|
1542
1542
|
const meshIdFromRuntime = readNonEmptyString(settings.meshNodeFor) || meshIdFromDirectDispatch;
|
|
1543
1543
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1544
|
+
// A mesh worker must be recognised as a delegate even if its meshNodeFor stamp is
|
|
1545
|
+
// missing. Worker launch envelopes are assembled from several settings, and in
|
|
1546
|
+
// practice a worker can arrive carrying only meshCoordinatorDaemonId (the routing
|
|
1547
|
+
// anchor) without meshNodeFor — e.g. when the node/mesh stamp was dropped on a
|
|
1548
|
+
// direct dispatch or a relaunch. Gating delegate routing solely on meshNodeFor then
|
|
1549
|
+
// silently drops the completion: setupMeshEventForwarding returns here, the
|
|
1550
|
+
// coordinator filter can't resolve args.meshId, and the event only lands in the
|
|
1551
|
+
// pending queue that an idle/generating coordinator never drains. Treat any of the
|
|
1552
|
+
// worker-envelope markers as proof of delegation and recover the mesh id by
|
|
1553
|
+
// workspace when the runtime id is absent.
|
|
1554
|
+
const hasWorkerEnvelope = Boolean(
|
|
1555
|
+
meshIdFromRuntime
|
|
1556
|
+
|| settings.launchedByCoordinator
|
|
1557
|
+
|| readNonEmptyString(settings.meshCoordinatorDaemonId)
|
|
1558
|
+
|| readNonEmptyString(settings.meshCoordinatorNodeId),
|
|
1559
|
+
);
|
|
1560
|
+
if (!hasWorkerEnvelope) return;
|
|
1546
1561
|
|
|
1547
1562
|
const mesh = meshIdFromRuntime ? getMeshWithCache(components, meshIdFromRuntime) : getCachedMeshByWorkspace(workspace);
|
|
1548
1563
|
const meshId = meshIdFromRuntime || readNonEmptyString(mesh?.id);
|