@adhdev/daemon-core 0.9.82-rc.451 → 0.9.82-rc.453

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.mjs CHANGED
@@ -404,10 +404,10 @@ function readInjected(value) {
404
404
  }
405
405
  function getDaemonBuildInfo() {
406
406
  if (cached) return cached;
407
- const commit = readInjected(true ? "9356f971ab5b65586b8e481022be6d34c17305e8" : void 0) ?? "unknown";
408
- const commitShort = readInjected(true ? "9356f971" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
409
- const version = readInjected(true ? "0.9.82-rc.451" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
410
- const builtAt = readInjected(true ? "2026-07-03T16:43:36.013Z" : void 0);
407
+ const commit = readInjected(true ? "0bdc67e3dfbc383e6a3f07527c75b23b0fa88232" : void 0) ?? "unknown";
408
+ const commitShort = readInjected(true ? "0bdc67e3" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
409
+ const version = readInjected(true ? "0.9.82-rc.453" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
410
+ const builtAt = readInjected(true ? "2026-07-03T19:10:33.620Z" : void 0);
411
411
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
412
412
  return cached;
413
413
  }
@@ -2662,6 +2662,12 @@ function pickBestTransitGitStatus(node, options) {
2662
2662
  }
2663
2663
  return best?.git;
2664
2664
  }
2665
+ function sessionIdsEquivalent(a, b) {
2666
+ const idA = readString2(a);
2667
+ const idB = readString2(b);
2668
+ if (!idA || !idB) return false;
2669
+ return idA === idB;
2670
+ }
2665
2671
  function normalizeMeshNodeId(node) {
2666
2672
  const record = node && typeof node === "object" ? node : {};
2667
2673
  return readString2(record.id, record.nodeId, record.node_id);
@@ -4818,7 +4824,7 @@ function getSessionRecoveryContext(meshId, opts) {
4818
4824
  if (!failureCountDone) {
4819
4825
  if (ts2 < recentWindow) {
4820
4826
  failureCountDone = true;
4821
- } else if (opts.nodeId && e.nodeId !== opts.nodeId) {
4827
+ } else if (opts.nodeId && !daemonIdsEquivalent(e.nodeId, opts.nodeId)) {
4822
4828
  } else if (e.kind === "task_failed") {
4823
4829
  if (!isIntentionalCleanupStopEntry(e)) consecutiveNodeFailures++;
4824
4830
  } else if (e.kind === "task_completed" || e.kind === "task_dispatched") {
@@ -4826,9 +4832,9 @@ function getSessionRecoveryContext(meshId, opts) {
4826
4832
  }
4827
4833
  }
4828
4834
  if (lastDispatch === null && e.kind === "task_dispatched") {
4829
- if (opts.sessionId && e.sessionId === opts.sessionId) {
4835
+ if (opts.sessionId && sessionIdsEquivalent(e.sessionId, opts.sessionId)) {
4830
4836
  lastDispatch = e;
4831
- } else if (!opts.sessionId && opts.nodeId && e.nodeId === opts.nodeId) {
4837
+ } else if (!opts.sessionId && opts.nodeId && daemonIdsEquivalent(e.nodeId, opts.nodeId)) {
4832
4838
  lastDispatch = e;
4833
4839
  }
4834
4840
  }
@@ -4892,6 +4898,7 @@ var init_mesh_ledger = __esm({
4892
4898
  "src/mesh/mesh-ledger.ts"() {
4893
4899
  "use strict";
4894
4900
  init_config();
4901
+ init_dist();
4895
4902
  init_mesh_runtime_store();
4896
4903
  LEDGER_DIR_NAME = "mesh-ledger";
4897
4904
  MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024;
@@ -5729,7 +5736,7 @@ function updateSessionTaskStatus(meshId, sessionId, status, opts) {
5729
5736
  const occurredAtIso = opts?.occurredAt ? new Date(opts.occurredAt).toISOString() : void 0;
5730
5737
  const entry = store.findAssignedBySession(meshId, sessionId, occurredAtIso, opts?.taskId);
5731
5738
  if (!entry) {
5732
- const assignedRows = store.getActiveAssignmentDetails(meshId).filter((r) => r.sessionId === sessionId);
5739
+ const assignedRows = store.getActiveAssignmentDetails(meshId).filter((r) => sessionIdsEquivalent(r.sessionId, sessionId));
5733
5740
  if (assignedRows.length > 0) {
5734
5741
  LOG.warn("MeshQueue", `No assigned queue row matched completion for mesh ${meshId} session ${sessionId} (taskId=${opts?.taskId ?? "none"}, occurredAt=${occurredAtIso ?? "none"}); ${assignedRows.length} assigned row(s) exist: ${assignedRows.map((r) => r.id).join(",")}`);
5735
5742
  }
@@ -5852,6 +5859,7 @@ var init_mesh_work_queue = __esm({
5852
5859
  init_mesh_ledger();
5853
5860
  init_mesh_delivery_policy();
5854
5861
  init_mesh_task_inflight();
5862
+ init_dist();
5855
5863
  ACTIVE_MESH_QUEUE_STATUSES = ["pending", "assigned"];
5856
5864
  HISTORICAL_MESH_QUEUE_STATUSES = ["completed", "failed", "cancelled"];
5857
5865
  MESH_TASK_MODES = ["code_change", "validation", "live_debug_readonly", "launch_app", "convergence"];
@@ -6538,7 +6546,7 @@ var init_mesh_runtime_store = __esm({
6538
6546
  const nodeIsWorktree = opts?.nodeIsWorktree === true;
6539
6547
  const convergenceAllows = (candidate) => candidate.taskMode !== "convergence" || !nodeIsWorktree;
6540
6548
  const targetMatches = (candidate) => {
6541
- if (candidate.targetSessionId && candidate.targetSessionId !== sessionId) return false;
6549
+ if (candidate.targetSessionId && !sessionIdsEquivalent(candidate.targetSessionId, sessionId)) return false;
6542
6550
  if (candidate.targetNodeId && !daemonIdsEquivalent(candidate.targetNodeId, nodeId) && !meshNodeIdMatches({ id: candidate.targetNodeId }, nodeId)) {
6543
6551
  return false;
6544
6552
  }
@@ -7923,7 +7931,7 @@ function resolveNodeEvidence(nodeId, ledgerEntries) {
7923
7931
  let transcriptHandle = null;
7924
7932
  for (let i = ledgerEntries.length - 1; i >= 0; i--) {
7925
7933
  const entry = ledgerEntries[i];
7926
- if (entry.nodeId !== nodeId || !isTerminalLedgerKind(entry.kind)) continue;
7934
+ if (!daemonIdsEquivalent(entry.nodeId, nodeId) || !isTerminalLedgerKind(entry.kind)) continue;
7927
7935
  const payload = readRecord3(entry.payload) ?? {};
7928
7936
  if (!evidence.available) {
7929
7937
  if (payload.source === "refine_mesh_node_async_job") {
@@ -7969,7 +7977,7 @@ function resolveNodeEvidence(nodeId, ledgerEntries) {
7969
7977
  function hasBlockedReviewRefineResult(nodeId, ledgerEntries) {
7970
7978
  for (let i = ledgerEntries.length - 1; i >= 0; i--) {
7971
7979
  const entry = ledgerEntries[i];
7972
- if (entry.nodeId !== nodeId || !isTerminalLedgerKind(entry.kind)) continue;
7980
+ if (!daemonIdsEquivalent(entry.nodeId, nodeId) || !isTerminalLedgerKind(entry.kind)) continue;
7973
7981
  const payload = readRecord3(entry.payload) ?? {};
7974
7982
  if (payload.source !== "refine_mesh_node_async_job") continue;
7975
7983
  const result = readRecord3(payload.result);
@@ -8001,7 +8009,7 @@ function deriveMeshReviewInboxItems(args) {
8001
8009
  if (!reviewReason) continue;
8002
8010
  const { evidence, transcriptHandle } = resolveNodeEvidence(nodeId, args.ledgerEntries);
8003
8011
  const activeRefineJob = [...refineJobs].reverse().find(
8004
- (job) => (job.nodeId === nodeId || job.targetNodeId === nodeId) && (job.status === "accepted" || job.status === "running")
8012
+ (job) => (daemonIdsEquivalent(job.nodeId, nodeId) || daemonIdsEquivalent(job.targetNodeId, nodeId)) && (job.status === "accepted" || job.status === "running")
8005
8013
  ) ?? null;
8006
8014
  items.push({
8007
8015
  nodeId,
@@ -8033,6 +8041,7 @@ var init_mesh_review_inbox = __esm({
8033
8041
  "src/mesh/mesh-review-inbox.ts"() {
8034
8042
  "use strict";
8035
8043
  init_mesh_refine_status();
8044
+ init_dist();
8036
8045
  MAX_CHANGED_FILES = 100;
8037
8046
  }
8038
8047
  });
@@ -10149,9 +10158,9 @@ function sessionStatusFromNodes(nodes, nodeId, sessionId) {
10149
10158
  if (value && typeof value === "object") candidates.push(value);
10150
10159
  }
10151
10160
  const session = candidates.find((item) => {
10152
- if (typeof item === "string") return item === sessionId;
10161
+ if (typeof item === "string") return sessionIdsEquivalent(item, sessionId);
10153
10162
  const id = readString6(item?.id) || readString6(item?.sessionId) || readString6(item?.session_id) || readString6(item?.runtimeSessionId) || readString6(item?.instanceId);
10154
- return id === sessionId;
10163
+ return sessionIdsEquivalent(id, sessionId);
10155
10164
  });
10156
10165
  if (!session) return { staleReason: "direct task session is not present in live session records" };
10157
10166
  if (typeof session === "string") return {};
@@ -10176,8 +10185,8 @@ function terminalMatchesDispatch(terminal, dispatch, taskId) {
10176
10185
  const terminalTaskId = readString6(terminal.payload?.taskId);
10177
10186
  if (terminalTaskId && terminalTaskId === taskId) return true;
10178
10187
  if (terminalTaskId && terminalTaskId !== taskId) return false;
10179
- if (dispatch.sessionId && terminal.sessionId === dispatch.sessionId) return true;
10180
- return Boolean(dispatch.nodeId && terminal.nodeId === dispatch.nodeId && !dispatch.sessionId);
10188
+ if (dispatch.sessionId && sessionIdsEquivalent(terminal.sessionId, dispatch.sessionId)) return true;
10189
+ return Boolean(dispatch.nodeId && daemonIdsEquivalent(terminal.nodeId, dispatch.nodeId) && !dispatch.sessionId);
10181
10190
  }
10182
10191
  function statusFromTerminal(entry) {
10183
10192
  if (entry.kind === "task_approval_needed") return "awaiting_approval";
@@ -11436,7 +11445,7 @@ function findRecentTerminalLedgerEvidence(args) {
11436
11445
  for (let i = entries.length - 1; i >= 0; i--) {
11437
11446
  const entry = entries[i];
11438
11447
  if (entry.kind !== "task_completed" && entry.kind !== "task_failed" && entry.kind !== "task_stalled") continue;
11439
- if (args.sessionId && entry.sessionId === args.sessionId) {
11448
+ if (args.sessionId && sessionIdsEquivalent(entry.sessionId, args.sessionId)) {
11440
11449
  return { id: entry.id, kind: entry.kind, payload: entry.payload || {}, timestamp: entry.timestamp };
11441
11450
  }
11442
11451
  if (!args.sessionId && args.nodeId && meshNodeIdMatches(entry, args.nodeId)) {
@@ -11453,7 +11462,7 @@ function hasDispatchAfterTerminal(meshId, sessionId, terminalId) {
11453
11462
  if (entry.id === terminalId) pastTerminal = true;
11454
11463
  continue;
11455
11464
  }
11456
- if (entry.kind === "task_dispatched" && entry.sessionId === sessionId) return true;
11465
+ if (entry.kind === "task_dispatched" && sessionIdsEquivalent(entry.sessionId, sessionId)) return true;
11457
11466
  }
11458
11467
  return false;
11459
11468
  }
@@ -11461,7 +11470,7 @@ function hasUnterminalDirectDispatchLedgerEntry(meshId, sessionId) {
11461
11470
  const entries = readLedgerEntries(meshId, { tail: 200 });
11462
11471
  for (let i = entries.length - 1; i >= 0; i--) {
11463
11472
  const entry = entries[i];
11464
- if (entry.sessionId !== sessionId) continue;
11473
+ if (!sessionIdsEquivalent(entry.sessionId, sessionId)) continue;
11465
11474
  if (entry.kind === "task_completed" || entry.kind === "task_failed" || entry.kind === "task_stalled") {
11466
11475
  return false;
11467
11476
  }
@@ -11481,7 +11490,7 @@ function findTerminalLedgerEvidenceForTask(args) {
11481
11490
  const terminalTaskId = readNonEmptyString2(entry.payload?.taskId);
11482
11491
  if (terminalTaskId !== taskId) continue;
11483
11492
  if (entry.kind === "task_completed" && isWeakCompletionEvidence(entry.payload)) continue;
11484
- if (args.sessionId && entry.sessionId && entry.sessionId !== args.sessionId) continue;
11493
+ if (args.sessionId && entry.sessionId && !sessionIdsEquivalent(entry.sessionId, args.sessionId)) continue;
11485
11494
  if (!args.sessionId && args.nodeId && entry.nodeId && !meshNodeIdMatches(entry, args.nodeId)) continue;
11486
11495
  return { id: entry.id, kind: entry.kind, payload: entry.payload || {}, timestamp: entry.timestamp };
11487
11496
  }
@@ -11494,7 +11503,7 @@ function findDirectDispatchLedgerEntry(args) {
11494
11503
  if (entry.kind !== "task_dispatched") continue;
11495
11504
  const payloadTaskId = readNonEmptyString2(entry.payload?.taskId);
11496
11505
  if (payloadTaskId !== args.taskId) continue;
11497
- if (args.sessionId && entry.sessionId && entry.sessionId !== args.sessionId) continue;
11506
+ if (args.sessionId && entry.sessionId && !sessionIdsEquivalent(entry.sessionId, args.sessionId)) continue;
11498
11507
  return {
11499
11508
  id: entry.id,
11500
11509
  timestamp: entry.timestamp,
@@ -11527,7 +11536,7 @@ function hasTerminalLedgerAfterDispatch(args) {
11527
11536
  const terminalTaskId = readNonEmptyString2(entry.payload?.taskId);
11528
11537
  if (terminalTaskId && terminalTaskId === args.taskId) return true;
11529
11538
  if (terminalTaskId && terminalTaskId !== args.taskId) continue;
11530
- if (args.sessionId && entry.sessionId === args.sessionId) return true;
11539
+ if (args.sessionId && sessionIdsEquivalent(entry.sessionId, args.sessionId)) return true;
11531
11540
  }
11532
11541
  return false;
11533
11542
  }
@@ -12856,7 +12865,7 @@ function nodeHasActiveMeshWork(components, meshId, nodeId, currentSessionId) {
12856
12865
  const instNodeId = readNonEmptyString2(settings.meshNodeId) || readNonEmptyString2(settings.nodeId);
12857
12866
  if (!daemonIdsEquivalent(instNodeId, nodeId)) return false;
12858
12867
  const sessionId = readNonEmptyString2(state.instanceId);
12859
- if (currentSessionId && sessionId === currentSessionId && isIdleSessionState(state)) return false;
12868
+ if (currentSessionId && sessionIdsEquivalent(sessionId, currentSessionId) && isIdleSessionState(state)) return false;
12860
12869
  return sessionStateLooksActive(state);
12861
12870
  });
12862
12871
  }
@@ -12930,11 +12939,11 @@ function activeProviderAssignedCount(meshId, nodeId, providerType) {
12930
12939
  return getQueue(meshId, { status: ["assigned"] }).filter((task) => daemonIdsEquivalent(task.assignedNodeId, nodeId) && task.assignedProviderType === providerType).length;
12931
12940
  }
12932
12941
  function sessionHasActiveAssignment(meshId, sessionId) {
12933
- if (getQueue(meshId, { status: ["assigned"] }).some((task) => task.assignedSessionId === sessionId)) {
12942
+ if (getQueue(meshId, { status: ["assigned"] }).some((task) => sessionIdsEquivalent(task.assignedSessionId, sessionId))) {
12934
12943
  return true;
12935
12944
  }
12936
12945
  try {
12937
- if (getActiveDirectDispatches(meshId).some((d) => d.sessionId === sessionId)) return true;
12946
+ if (getActiveDirectDispatches(meshId).some((d) => sessionIdsEquivalent(d.sessionId, sessionId))) return true;
12938
12947
  if (hasUnterminalDirectDispatchLedgerEntry(meshId, sessionId)) return true;
12939
12948
  } catch {
12940
12949
  }
@@ -13566,7 +13575,7 @@ function resolveWorkerDelegateRouting(components, instanceId, deps) {
13566
13575
  if (coordinatorMeshId) {
13567
13576
  let hasActiveDispatch = false;
13568
13577
  try {
13569
- hasActiveDispatch = getActiveDirectDispatches(coordinatorMeshId).some((d) => d.sessionId === instanceId) || hasUnterminalDirectDispatchLedgerEntry(coordinatorMeshId, instanceId);
13578
+ hasActiveDispatch = getActiveDirectDispatches(coordinatorMeshId).some((d) => sessionIdsEquivalent(d.sessionId, instanceId)) || hasUnterminalDirectDispatchLedgerEntry(coordinatorMeshId, instanceId);
13570
13579
  } catch {
13571
13580
  }
13572
13581
  if (!hasActiveDispatch) return reject("coordinator_not_dispatch_target");
@@ -16140,7 +16149,7 @@ function hasRecentIntentionalCleanupStop(meshId, sessionId, nodeId) {
16140
16149
  const timestamp = new Date(entry.timestamp).getTime();
16141
16150
  if (!Number.isNaN(timestamp) && timestamp < cutoff) break;
16142
16151
  if (!isIntentionalCleanupStopEntry(entry)) continue;
16143
- if (sessionId && entry.sessionId === sessionId) return true;
16152
+ if (sessionId && sessionIdsEquivalent(entry.sessionId, sessionId)) return true;
16144
16153
  if (!sessionId && nodeId && meshNodeIdMatches(entry, nodeId)) return true;
16145
16154
  }
16146
16155
  return false;
@@ -16260,7 +16269,7 @@ function supersedesTruncatedTerminalSummary(args) {
16260
16269
  }
16261
16270
  function resolveActiveDirectDispatchTaskId(meshId, sessionId) {
16262
16271
  try {
16263
- const matches = getActiveDirectDispatches(meshId).filter((d) => d.sessionId === sessionId);
16272
+ const matches = getActiveDirectDispatches(meshId).filter((d) => sessionIdsEquivalent(d.sessionId, sessionId));
16264
16273
  if (!matches.length) return void 0;
16265
16274
  return readNonEmptyString2(matches[matches.length - 1].taskId) || void 0;
16266
16275
  } catch {
@@ -17054,7 +17063,7 @@ function flushPendingForMeshIdleCoordinators(components, meshId) {
17054
17063
  let delivered = 0;
17055
17064
  for (const pending of pendingEvents) {
17056
17065
  const wantSession = readNonEmptyString2(pending.targetCoordinatorSessionId);
17057
- const targets = wantSession ? idleCoordinators.filter((c) => c.sessionId === wantSession) : idleCoordinators;
17066
+ const targets = wantSession ? idleCoordinators.filter((c) => sessionIdsEquivalent(c.sessionId, wantSession)) : idleCoordinators;
17058
17067
  if (targets.length === 0 || !pending.coordinatorMessage) {
17059
17068
  try {
17060
17069
  queuePendingMeshCoordinatorEvent(pending);
@@ -17109,7 +17118,7 @@ function setupMeshEventForwarding(components) {
17109
17118
  }
17110
17119
  let hasDirectDispatch = false;
17111
17120
  try {
17112
- hasDirectDispatch = getActiveDirectDispatches(coordinatorMeshId).some((d) => d.sessionId === flushInstanceId) || hasUnterminalDirectDispatchLedgerEntry(coordinatorMeshId, flushInstanceId);
17121
+ hasDirectDispatch = getActiveDirectDispatches(coordinatorMeshId).some((d) => sessionIdsEquivalent(d.sessionId, flushInstanceId)) || hasUnterminalDirectDispatchLedgerEntry(coordinatorMeshId, flushInstanceId);
17113
17122
  } catch {
17114
17123
  }
17115
17124
  if (!hasDirectDispatch) return;
@@ -17444,7 +17453,7 @@ function drainAndInjectIntoTargets(meshId, drainDaemonIds, localDaemonId, target
17444
17453
  for (const pending of pendingEvents) {
17445
17454
  const wantSession = readNonEmptyString2(pending.targetCoordinatorSessionId);
17446
17455
  if (wantSession) {
17447
- const matched = targetCoordinators.filter((c) => c.sessionId === wantSession);
17456
+ const matched = targetCoordinators.filter((c) => sessionIdsEquivalent(c.sessionId, wantSession));
17448
17457
  if (matched.length === 0) {
17449
17458
  holdOrExpireStrictUnmatchedEvent(pending, wantSession, meshId);
17450
17459
  continue;
@@ -53842,7 +53851,7 @@ async function hydrateInlineMeshDirectTruth(args) {
53842
53851
  const workspace = readStringValue(node?.workspace);
53843
53852
  const daemonId = readStringValue(node?.daemonId);
53844
53853
  const isSelfNode = Boolean(
53845
- nodeId && selectedCoordinatorNodeId && nodeId === selectedCoordinatorNodeId
53854
+ nodeId && selectedCoordinatorNodeId && daemonIdsEquivalent(nodeId, selectedCoordinatorNodeId)
53846
53855
  ) || Boolean(
53847
53856
  daemonId && (daemonIdsEquivalent(daemonId, args.localMachineId) || daemonIdsEquivalent(daemonId, args.statusInstanceId))
53848
53857
  ) || Boolean(args.meshSource !== "local_config" && nodeIndex === 0);
@@ -53904,7 +53913,7 @@ async function hydrateInlineMeshDirectTruth(args) {
53904
53913
  const nodeId = normalizeMeshNodeId(node) || `node_${nodeIndex}`;
53905
53914
  const daemonId = readStringValue(node?.daemonId);
53906
53915
  const isSelfNode = Boolean(
53907
- nodeId && selectedCoordinatorNodeId && nodeId === selectedCoordinatorNodeId
53916
+ nodeId && selectedCoordinatorNodeId && daemonIdsEquivalent(nodeId, selectedCoordinatorNodeId)
53908
53917
  ) || Boolean(
53909
53918
  daemonId && (daemonIdsEquivalent(daemonId, args.localMachineId) || daemonIdsEquivalent(daemonId, args.statusInstanceId))
53910
53919
  );
@@ -53973,7 +53982,7 @@ function summarizeMeshSessionRecord(record) {
53973
53982
  }
53974
53983
  function liveSessionRecordMatchesMeshNode(record, meshId, nodeId, nodeWorkspace = "", nodeIsMissingLocalWorktree = false) {
53975
53984
  const recordNodeId = readStringValue(record?.meta?.meshNodeId);
53976
- if (!recordNodeId || recordNodeId !== nodeId) return false;
53985
+ if (!recordNodeId || !daemonIdsEquivalent(recordNodeId, nodeId)) return false;
53977
53986
  if (nodeIsMissingLocalWorktree) return false;
53978
53987
  const recordWorkspace = readStringValue(record?.workspace);
53979
53988
  if (nodeWorkspace && recordWorkspace && !meshWorkspacesEquivalent(recordWorkspace, nodeWorkspace)) return false;
@@ -54005,7 +54014,7 @@ function collectLiveMeshSessionRecords(args) {
54005
54014
  const nodeIsMissingLocalWorktree = args.node?.isLocalWorktree === true && !!nodeWorkspace && !fs29.existsSync(nodeWorkspace);
54006
54015
  const matches = args.liveSessionRecords.filter((record) => {
54007
54016
  const recordNodeId = readStringValue(record?.meta?.meshNodeId);
54008
- if (recordNodeId && recordNodeId !== args.nodeId) return false;
54017
+ if (recordNodeId && !daemonIdsEquivalent(recordNodeId, args.nodeId)) return false;
54009
54018
  if (liveSessionRecordMatchesMeshNode(record, args.meshId, args.nodeId, nodeWorkspace || "", nodeIsMissingLocalWorktree)) return true;
54010
54019
  if (nodeIsMissingLocalWorktree) return false;
54011
54020
  return !!nodeWorkspace && liveSessionRecordMatchesMeshWorkspace(record, args.meshId, nodeWorkspace);
@@ -54014,7 +54023,7 @@ function collectLiveMeshSessionRecords(args) {
54014
54023
  for (const record of args.liveSessionRecords) {
54015
54024
  if (readStringValue(record?.meta?.meshCoordinatorFor) !== args.meshId) continue;
54016
54025
  const sessionId = readStringValue(record?.sessionId);
54017
- if (sessionId && matches.some((entry) => readStringValue(entry?.sessionId) === sessionId)) continue;
54026
+ if (sessionId && matches.some((entry) => sessionIdsEquivalent(readStringValue(entry?.sessionId), sessionId))) continue;
54018
54027
  matches.push(record);
54019
54028
  }
54020
54029
  }