@adhdev/daemon-core 0.9.82-rc.179 → 0.9.82-rc.180
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 +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/mesh/mesh-events.ts +19 -0
package/package.json
CHANGED
package/src/mesh/mesh-events.ts
CHANGED
|
@@ -1769,6 +1769,25 @@ export function setupMeshEventForwarding(components: DaemonComponents) {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
} catch { /* best-effort */ }
|
|
1771
1771
|
if (!meshIdFromDirectDispatch) return;
|
|
1772
|
+
} else {
|
|
1773
|
+
// Plain session (no meshNodeFor / meshCoordinatorFor / launchedByCoordinator)
|
|
1774
|
+
// that received a direct dispatch via mesh_send_task: the dispatcher logs
|
|
1775
|
+
// the dispatch against the workspace-resolved mesh but never stamps the
|
|
1776
|
+
// target session's settings. Without this fallback, the worker's
|
|
1777
|
+
// generating_completed event silently drops here and task_completed
|
|
1778
|
+
// never lands in the ledger — coordinator sees the task as still in
|
|
1779
|
+
// flight forever. Resolve the mesh via workspace and accept the event
|
|
1780
|
+
// when an active direct dispatch points at this session.
|
|
1781
|
+
const workspaceMesh = getCachedMeshByWorkspace(workspace);
|
|
1782
|
+
const workspaceMeshId = readNonEmptyString(workspaceMesh?.id);
|
|
1783
|
+
if (workspaceMeshId) {
|
|
1784
|
+
try {
|
|
1785
|
+
const activeDispatches = getActiveDirectDispatches(workspaceMeshId);
|
|
1786
|
+
if (activeDispatches.some(d => d.sessionId === instanceId) || hasUnterminalDirectDispatchLedgerEntry(workspaceMeshId, instanceId)) {
|
|
1787
|
+
meshIdFromDirectDispatch = workspaceMeshId;
|
|
1788
|
+
}
|
|
1789
|
+
} catch { /* best-effort */ }
|
|
1790
|
+
}
|
|
1772
1791
|
}
|
|
1773
1792
|
|
|
1774
1793
|
const meshIdFromRuntime = readNonEmptyString(settings.meshNodeFor) || meshIdFromDirectDispatch;
|