@adhdev/daemon-core 0.9.82-rc.141 → 0.9.82-rc.142
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 +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/mesh/mesh-events.ts +22 -6
package/dist/index.mjs
CHANGED
|
@@ -4149,8 +4149,19 @@ function setupMeshEventForwarding(components) {
|
|
|
4149
4149
|
const workspace = readNonEmptyString2(state.workspace);
|
|
4150
4150
|
if (!workspace) return;
|
|
4151
4151
|
const settings = state.settings && typeof state.settings === "object" ? state.settings : {};
|
|
4152
|
-
|
|
4153
|
-
|
|
4152
|
+
const coordinatorMeshId = readNonEmptyString2(settings.meshCoordinatorFor);
|
|
4153
|
+
let meshIdFromDirectDispatch = "";
|
|
4154
|
+
if (coordinatorMeshId) {
|
|
4155
|
+
try {
|
|
4156
|
+
const activeDispatches = getActiveDirectDispatches(coordinatorMeshId);
|
|
4157
|
+
if (activeDispatches.some((d) => d.sessionId === instanceId)) {
|
|
4158
|
+
meshIdFromDirectDispatch = coordinatorMeshId;
|
|
4159
|
+
}
|
|
4160
|
+
} catch {
|
|
4161
|
+
}
|
|
4162
|
+
if (!meshIdFromDirectDispatch) return;
|
|
4163
|
+
}
|
|
4164
|
+
const meshIdFromRuntime = readNonEmptyString2(settings.meshNodeFor) || meshIdFromDirectDispatch;
|
|
4154
4165
|
const isMeshDelegate = Boolean(meshIdFromRuntime || settings.launchedByCoordinator);
|
|
4155
4166
|
if (!isMeshDelegate) return;
|
|
4156
4167
|
const mesh = meshIdFromRuntime ? getMeshWithCache(components, meshIdFromRuntime) : getCachedMeshByWorkspace(workspace);
|