@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.js
CHANGED
|
@@ -24188,8 +24188,21 @@ function summarizeMeshSessionRecord(record) {
|
|
|
24188
24188
|
isCached: false
|
|
24189
24189
|
};
|
|
24190
24190
|
}
|
|
24191
|
+
function liveSessionRecordMatchesMeshNode(record, meshId, nodeId) {
|
|
24192
|
+
const recordNodeId = readStringValue(record?.meta?.meshNodeId);
|
|
24193
|
+
if (!recordNodeId || recordNodeId !== nodeId) return false;
|
|
24194
|
+
const recordMeshId = readStringValue(record?.meta?.meshNodeFor);
|
|
24195
|
+
return !recordMeshId || recordMeshId === meshId;
|
|
24196
|
+
}
|
|
24197
|
+
function liveSessionRecordMatchesMeshWorkspace(record, meshId, workspace) {
|
|
24198
|
+
const recordWorkspace = readStringValue(record?.workspace);
|
|
24199
|
+
if (!recordWorkspace || !workspace || recordWorkspace !== workspace) return false;
|
|
24200
|
+
const recordMeshId = readStringValue(record?.meta?.meshNodeFor);
|
|
24201
|
+
if (recordMeshId) return recordMeshId === meshId;
|
|
24202
|
+
return record?.meta?.launchedByCoordinator === true || !!readStringValue(record?.meta?.meshNodeId);
|
|
24203
|
+
}
|
|
24191
24204
|
function readLiveMeshNodeWorkspace(args) {
|
|
24192
|
-
const directNodeWorkspace = args.liveSessionRecords.find((record) =>
|
|
24205
|
+
const directNodeWorkspace = args.liveSessionRecords.find((record) => liveSessionRecordMatchesMeshNode(record, args.meshId, args.nodeId) && readStringValue(record?.workspace));
|
|
24193
24206
|
if (directNodeWorkspace) {
|
|
24194
24207
|
return readStringValue(directNodeWorkspace.workspace) || "";
|
|
24195
24208
|
}
|
|
@@ -24203,10 +24216,9 @@ function readLiveMeshNodeWorkspace(args) {
|
|
|
24203
24216
|
}
|
|
24204
24217
|
function collectLiveMeshSessionRecords(args) {
|
|
24205
24218
|
const matches = args.liveSessionRecords.filter((record) => {
|
|
24206
|
-
if (readStringValue(record?.meta?.meshNodeId) === args.nodeId) return true;
|
|
24207
|
-
const recordWorkspace = readStringValue(record?.workspace);
|
|
24208
24219
|
const nodeWorkspace = readStringValue(args.node?.workspace);
|
|
24209
|
-
|
|
24220
|
+
if (liveSessionRecordMatchesMeshNode(record, args.meshId, args.nodeId)) return true;
|
|
24221
|
+
return !!nodeWorkspace && liveSessionRecordMatchesMeshWorkspace(record, args.meshId, nodeWorkspace);
|
|
24210
24222
|
});
|
|
24211
24223
|
if (args.allowCoordinatorSession) {
|
|
24212
24224
|
for (const record of args.liveSessionRecords) {
|