adhdev 0.9.82-rc.18 → 0.9.82-rc.19

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/cli/index.js CHANGED
@@ -47155,25 +47155,35 @@ var init_router = __esm({
47155
47155
  }
47156
47156
  getCachedInlineMesh(meshId, inlineMesh) {
47157
47157
  if (inlineMesh && typeof inlineMesh === "object") {
47158
- this.inlineMeshCache.set(meshId, inlineMesh);
47159
- return inlineMesh;
47158
+ return this.warmInlineMeshCache(meshId, inlineMesh);
47160
47159
  }
47161
47160
  return this.inlineMeshCache.get(meshId);
47162
47161
  }
47162
+ warmInlineMeshCache(meshId, inlineMesh) {
47163
+ if (!inlineMesh || typeof inlineMesh !== "object") return void 0;
47164
+ const cached2 = this.inlineMeshCache.get(meshId);
47165
+ if (cached2) return cached2;
47166
+ this.inlineMeshCache.set(meshId, inlineMesh);
47167
+ return inlineMesh;
47168
+ }
47163
47169
  async getMeshForCommand(meshId, inlineMesh, options) {
47164
47170
  const preferInline = options?.preferInline === true;
47165
47171
  if (preferInline) {
47166
- const cached3 = this.getCachedInlineMesh(meshId, inlineMesh);
47167
- if (cached3) return { mesh: cached3, inline: true };
47172
+ const cached3 = this.getCachedInlineMesh(meshId);
47173
+ if (cached3) return { mesh: cached3, inline: true, source: "inline_cache" };
47174
+ const warmedInline2 = this.warmInlineMeshCache(meshId, inlineMesh);
47175
+ if (warmedInline2) return { mesh: warmedInline2, inline: true, source: "inline_bootstrap" };
47168
47176
  }
47169
47177
  try {
47170
47178
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
47171
47179
  const mesh = getMesh3(meshId);
47172
- if (mesh) return { mesh, inline: false };
47180
+ if (mesh) return { mesh, inline: false, source: "local_config" };
47173
47181
  } catch {
47174
47182
  }
47175
- const cached2 = this.getCachedInlineMesh(meshId, inlineMesh);
47176
- return cached2 ? { mesh: cached2, inline: true } : null;
47183
+ const cached2 = this.getCachedInlineMesh(meshId);
47184
+ if (cached2) return { mesh: cached2, inline: true, source: "inline_cache" };
47185
+ const warmedInline = this.warmInlineMeshCache(meshId, inlineMesh);
47186
+ return warmedInline ? { mesh: warmedInline, inline: true, source: "inline_bootstrap" } : null;
47177
47187
  }
47178
47188
  updateInlineMeshNode(meshId, mesh, node) {
47179
47189
  if (!mesh || !Array.isArray(mesh.nodes) || !node?.id) return;
@@ -47402,6 +47412,7 @@ var init_router = __esm({
47402
47412
  const deletedSessionIds = [];
47403
47413
  const skippedSessionIds = [];
47404
47414
  const skippedLiveSessionIds = [];
47415
+ const skippedCoordinatorSessionIds = [];
47405
47416
  const deleteUnsupportedSessionIds = [];
47406
47417
  const recordsRemainSessionIds = [];
47407
47418
  const errors = [];
@@ -47434,6 +47445,12 @@ var init_router = __esm({
47434
47445
  const completed = this.isCompletedHostedSession(record2);
47435
47446
  const surfaceKind = getSessionHostSurfaceKind(record2);
47436
47447
  const liveRuntime = surfaceKind === "live_runtime";
47448
+ const coordinatorSession = readStringValue(record2?.meta?.meshCoordinatorFor) === args.meshId;
47449
+ if (!hasExplicitSessionIds && coordinatorSession) {
47450
+ skippedSessionIds.push(sessionId);
47451
+ skippedCoordinatorSessionIds.push(sessionId);
47452
+ continue;
47453
+ }
47437
47454
  if (!hasExplicitSessionIds && liveRuntime) {
47438
47455
  skippedSessionIds.push(sessionId);
47439
47456
  skippedLiveSessionIds.push(sessionId);
@@ -47499,6 +47516,7 @@ var init_router = __esm({
47499
47516
  deletedSessionIds,
47500
47517
  skippedSessionIds,
47501
47518
  skippedLiveSessionIds,
47519
+ skippedCoordinatorSessionIds,
47502
47520
  ...deleteUnsupported ? {
47503
47521
  deleteUnsupported: true,
47504
47522
  effectiveCleanup: args.mode === "stop_and_delete" ? "stopped_only_records_remain" : "delete_unsupported_records_remain",
@@ -49121,6 +49139,11 @@ ${block}`);
49121
49139
  repoIdentity: mesh.repoIdentity,
49122
49140
  defaultBranch: mesh.defaultBranch,
49123
49141
  refreshedAt: (/* @__PURE__ */ new Date()).toISOString(),
49142
+ sourceOfTruth: {
49143
+ membership: meshRecord?.source === "inline_cache" ? "coordinator_inline_mesh_cache" : meshRecord?.source === "local_config" ? "local_mesh_config" : "inline_bootstrap_snapshot",
49144
+ coordinatorOwnsLiveTruth: meshRecord?.source !== "inline_bootstrap",
49145
+ historicalEvidenceOnly: ["recoveryHints", "ledger.summary", "queue.summary"]
49146
+ },
49124
49147
  nodes: nodeStatuses,
49125
49148
  queue: { tasks: queue, summary: queueSummary },
49126
49149
  ledger: { entries: ledgerEntries, summary: ledgerSummary }
@@ -98149,7 +98172,7 @@ var init_adhdev_daemon = __esm({
98149
98172
  init_version();
98150
98173
  init_src();
98151
98174
  init_runtime_defaults();
98152
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.18" });
98175
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.19" });
98153
98176
  AdhdevDaemon = class _AdhdevDaemon {
98154
98177
  localHttpServer = null;
98155
98178
  localWss = null;