@adhdev/daemon-core 0.9.82-rc.22 → 0.9.82-rc.23
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 +16 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +20 -4
package/dist/index.mjs
CHANGED
|
@@ -23955,8 +23955,21 @@ function summarizeMeshSessionRecord(record) {
|
|
|
23955
23955
|
isCached: false
|
|
23956
23956
|
};
|
|
23957
23957
|
}
|
|
23958
|
+
function liveSessionRecordMatchesMeshNode(record, meshId, nodeId) {
|
|
23959
|
+
const recordNodeId = readStringValue(record?.meta?.meshNodeId);
|
|
23960
|
+
if (!recordNodeId || recordNodeId !== nodeId) return false;
|
|
23961
|
+
const recordMeshId = readStringValue(record?.meta?.meshNodeFor);
|
|
23962
|
+
return !recordMeshId || recordMeshId === meshId;
|
|
23963
|
+
}
|
|
23964
|
+
function liveSessionRecordMatchesMeshWorkspace(record, meshId, workspace) {
|
|
23965
|
+
const recordWorkspace = readStringValue(record?.workspace);
|
|
23966
|
+
if (!recordWorkspace || !workspace || recordWorkspace !== workspace) return false;
|
|
23967
|
+
const recordMeshId = readStringValue(record?.meta?.meshNodeFor);
|
|
23968
|
+
if (recordMeshId) return recordMeshId === meshId;
|
|
23969
|
+
return record?.meta?.launchedByCoordinator === true || !!readStringValue(record?.meta?.meshNodeId);
|
|
23970
|
+
}
|
|
23958
23971
|
function readLiveMeshNodeWorkspace(args) {
|
|
23959
|
-
const directNodeWorkspace = args.liveSessionRecords.find((record) =>
|
|
23972
|
+
const directNodeWorkspace = args.liveSessionRecords.find((record) => liveSessionRecordMatchesMeshNode(record, args.meshId, args.nodeId) && readStringValue(record?.workspace));
|
|
23960
23973
|
if (directNodeWorkspace) {
|
|
23961
23974
|
return readStringValue(directNodeWorkspace.workspace) || "";
|
|
23962
23975
|
}
|
|
@@ -23970,10 +23983,9 @@ function readLiveMeshNodeWorkspace(args) {
|
|
|
23970
23983
|
}
|
|
23971
23984
|
function collectLiveMeshSessionRecords(args) {
|
|
23972
23985
|
const matches = args.liveSessionRecords.filter((record) => {
|
|
23973
|
-
if (readStringValue(record?.meta?.meshNodeId) === args.nodeId) return true;
|
|
23974
|
-
const recordWorkspace = readStringValue(record?.workspace);
|
|
23975
23986
|
const nodeWorkspace = readStringValue(args.node?.workspace);
|
|
23976
|
-
|
|
23987
|
+
if (liveSessionRecordMatchesMeshNode(record, args.meshId, args.nodeId)) return true;
|
|
23988
|
+
return !!nodeWorkspace && liveSessionRecordMatchesMeshWorkspace(record, args.meshId, nodeWorkspace);
|
|
23977
23989
|
});
|
|
23978
23990
|
if (args.allowCoordinatorSession) {
|
|
23979
23991
|
for (const record of args.liveSessionRecords) {
|