@adhdev/daemon-core 0.9.82-rc.251 → 0.9.82-rc.252

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.251",
3
+ "version": "0.9.82-rc.252",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7301,19 +7301,15 @@ export class DaemonCommandRouter {
7301
7301
  nodeStatuses.push(status);
7302
7302
  }
7303
7303
 
7304
- // (B3) Resolve the coordinator daemon scope for the drain.
7305
- // Emit-time always tags events with the worker's
7306
- // targetCoordinatorDaemonId and writes them to the
7307
- // scoped pending-events file. If the caller (MCP tool,
7308
- // dashboard, etc.) doesn't tell us which coordinator
7309
- // they're running under, fall back to *this daemon's*
7310
- // ID — the caller reached us over our IPC/WS, so they
7311
- // are by definition under this daemon. Falling back to
7312
- // undefined would silently miss every scoped event.
7304
+ // (B3) Resolve the coordinator daemon scope for the peek.
7305
+ // mesh_status is a read-only status query it must not consume
7306
+ // (drain) pending events as a side effect. Coordinators that see
7307
+ // pendingCoordinatorEvents in the response are expected to call
7308
+ // get_pending_mesh_events to explicitly drain them after processing.
7313
7309
  const callerCoordinatorDaemonId = typeof args?.coordinatorDaemonId === 'string' && args.coordinatorDaemonId.trim()
7314
7310
  ? args.coordinatorDaemonId.trim()
7315
7311
  : (this.deps.statusInstanceId || undefined);
7316
- const pendingCoordinatorEvents = drainPendingMeshCoordinatorEvents(meshId, callerCoordinatorDaemonId);
7312
+ const pendingCoordinatorEvents = getPendingMeshCoordinatorEvents(meshId, callerCoordinatorDaemonId);
7317
7313
  const previewFreshness = (() => {
7318
7314
  const localRepoRoot = nodeStatuses
7319
7315
  .map((node: any) => readStringValue(node?.git?.repoRoot, node?.repoRoot, node?.workspace))
@@ -7323,7 +7319,7 @@ export class DaemonCommandRouter {
7323
7319
  const asyncRefineJobs = buildMeshAsyncRefineJobs({
7324
7320
  meshId,
7325
7321
  ledgerEntries: asyncRefineLedgerEntries,
7326
- pendingEvents: pendingCoordinatorEvents,
7322
+ pendingEvents: [...pendingCoordinatorEvents],
7327
7323
  });
7328
7324
  const historicalSessions = buildHistoricalMeshSessions({
7329
7325
  meshId,