@adhdev/daemon-core 0.9.82-rc.542 → 0.9.82-rc.544

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.
@@ -14,7 +14,7 @@ import { DaemonCliManager } from './cli-manager.js';
14
14
  import type { ProviderLoader } from '../providers/provider-loader.js';
15
15
  import type { ProviderInstanceManager } from '../providers/provider-instance-manager.js';
16
16
  import { SessionRegistry } from '../sessions/registry.js';
17
- import type { RepoMeshSessionCleanupMode } from '../repo-mesh-types.js';
17
+ import type { RepoMeshSessionCleanupMode, RepoMeshSpawnedSessionVisibility } from '../repo-mesh-types.js';
18
18
  import { MeshRefineBatchJobHandle, MeshRefineBatchTerminalJob, MeshRefineJobHandle, MeshRefineTerminalJob } from '../mesh/mesh-refine-gates.js';
19
19
  export * from '../mesh/mesh-node-identity.js';
20
20
  export * from '../mesh/mesh-refine-gates.js';
@@ -151,6 +151,20 @@ export declare class DaemonCommandRouter {
151
151
  private getCachedAggregateMeshStatus;
152
152
  private rememberAggregateMeshStatus;
153
153
  getCachedInlineMeshNodes(): any[];
154
+ /**
155
+ * Same flattened node list as getCachedInlineMeshNodes(), but each node is
156
+ * paired with the `spawnedSessionVisibility` from its OWNING mesh's policy.
157
+ * The flat node list loses the mesh→node association, yet the cloud daemon's
158
+ * synthetic mesh-session mirror needs the mesh-level visibility policy to
159
+ * decide whether a coordinator-spawned worker session should be hidden+muted
160
+ * on the dashboard (the cached inline-mesh session entry carries no settings
161
+ * of its own). Falls back to DEFAULT_MESH_POLICY.spawnedSessionVisibility when
162
+ * the mesh policy is absent, matching the worker-launch stamp.
163
+ */
164
+ getCachedInlineMeshNodesWithVisibility(): Array<{
165
+ node: any;
166
+ spawnedSessionVisibility: RepoMeshSpawnedSessionVisibility;
167
+ }>;
154
168
  resolveRemoteMeshSessionOwnerDaemonId(sessionId: string, ownerNodeIdHint?: string): string | undefined;
155
169
  getCachedInlineMesh(meshId: string, inlineMesh?: unknown): any | undefined;
156
170
  private warmInlineMeshCache;
package/dist/index.d.ts CHANGED
@@ -103,7 +103,7 @@ export type { CommandRouterDeps, CommandRouterResult } from './commands/router.j
103
103
  export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand, execNpmCommandSync, getNpmExecOptions, } from './commands/upgrade-helper.js';
104
104
  export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, NpmExecOptions, } from './commands/upgrade-helper.js';
105
105
  export { DaemonStatusReporter } from './status/reporter.js';
106
- export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
106
+ export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected, isCoordinatorSpawnedHiddenWorker, resolveSurfaceHidden, resolveMuted, resolveSpawnedSessionHideMute } from './status/builders.js';
107
107
  export { buildStatusSnapshot, buildMachineInfo, buildAvailableProviders, getLastDisplayMessage } from './status/snapshot.js';
108
108
  export { getDaemonBuildInfo } from './build-info.js';
109
109
  export type { DaemonBuildInfo } from './build-info.js';
package/dist/index.js CHANGED
@@ -419,10 +419,10 @@ function readInjected(value) {
419
419
  }
420
420
  function getDaemonBuildInfo() {
421
421
  if (cached) return cached;
422
- const commit = readInjected(true ? "eb1fb961d4f22983420fad4c65b982d3ab42b5cf" : void 0) ?? "unknown";
423
- const commitShort = readInjected(true ? "eb1fb961" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
424
- const version = readInjected(true ? "0.9.82-rc.542" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
425
- const builtAt = readInjected(true ? "2026-07-16T06:30:14.678Z" : void 0);
422
+ const commit = readInjected(true ? "ace946b224e61964aaaa43aed717eaaaeabb3a48" : void 0) ?? "unknown";
423
+ const commitShort = readInjected(true ? "ace946b2" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
424
+ const version = readInjected(true ? "0.9.82-rc.544" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
425
+ const builtAt = readInjected(true ? "2026-07-16T08:54:12.905Z" : void 0);
426
426
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
427
427
  return cached;
428
428
  }
@@ -14059,6 +14059,17 @@ function readCachedInlineMeshActiveSessionDetails(node) {
14059
14059
  ...readStringValue(fallbackSession.lastMessagePreview, fallbackSession.last_message_preview) ? { lastMessagePreview: readStringValue(fallbackSession.lastMessagePreview, fallbackSession.last_message_preview) } : {},
14060
14060
  ...readStringValue(fallbackSession.lastMessageRole, fallbackSession.last_message_role) ? { lastMessageRole: readStringValue(fallbackSession.lastMessageRole, fallbackSession.last_message_role) } : {},
14061
14061
  ...readNumberValue(fallbackSession.lastMessageAt, fallbackSession.last_message_at) !== void 0 ? { lastMessageAt: readNumberValue(fallbackSession.lastMessageAt, fallbackSession.last_message_at) } : {},
14062
+ // RESTORE-STICK: carry the worker's AUTHORITATIVE dashboard hide/mute state and the
14063
+ // raw per-session user override (userHidden/userMuted) through the cached inline-mesh
14064
+ // active-session entry. The worker's mesh_status slim (mcp-server mesh-tools-status.ts)
14065
+ // now ships these from its own status/builders resolution, which already honors a
14066
+ // manual restore/un-mute. Without carrying them here, the coordinator's cloud snapshot
14067
+ // append re-derives hide/mute purely from mesh policy and overwrites the user's manual
14068
+ // un-hide every snapshot — the restore flickered visible then re-hid.
14069
+ ...readBooleanValue(fallbackSession.surfaceHidden) !== void 0 ? { surfaceHidden: readBooleanValue(fallbackSession.surfaceHidden) } : {},
14070
+ ...readBooleanValue(fallbackSession.muted) !== void 0 ? { muted: readBooleanValue(fallbackSession.muted) } : {},
14071
+ ...readBooleanValue(fallbackSession.userHidden, fallbackSession.user_hidden) !== void 0 ? { userHidden: readBooleanValue(fallbackSession.userHidden, fallbackSession.user_hidden) } : {},
14072
+ ...readBooleanValue(fallbackSession.userMuted, fallbackSession.user_muted) !== void 0 ? { userMuted: readBooleanValue(fallbackSession.userMuted, fallbackSession.user_muted) } : {},
14062
14073
  isCached: true
14063
14074
  }];
14064
14075
  }
@@ -19324,6 +19335,12 @@ function resolveMuted(settings) {
19324
19335
  if (settings.userMuted === false) return false;
19325
19336
  return isCoordinatorSpawnedHiddenWorker(settings);
19326
19337
  }
19338
+ function resolveSpawnedSessionHideMute(input) {
19339
+ return {
19340
+ surfaceHidden: resolveSurfaceHidden(input),
19341
+ muted: resolveMuted(input)
19342
+ };
19343
+ }
19327
19344
  function getActiveChatOptions(profile) {
19328
19345
  if (profile === "full") return {};
19329
19346
  return LIVE_STATUS_ACTIVE_CHAT_OPTIONS;
@@ -24767,7 +24784,8 @@ function modalSupersededBySettledPrompt(modalSpec, settledSpec, settled, input)
24767
24784
  const settledPromptLineRe = compile2(settledSpec.regex, (settledSpec.flags ?? "m").includes("m") ? settledSpec.flags ?? "m" : `${settledSpec.flags ?? ""}m`);
24768
24785
  const isSettledLine = (line) => {
24769
24786
  settledPromptLineRe.lastIndex = 0;
24770
- return settledPromptLineRe.test(line);
24787
+ if (settledPromptLineRe.test(line)) return true;
24788
+ return settled.footers.some((f) => f.test(line));
24771
24789
  };
24772
24790
  return below.some((line) => line.trim() !== "" && !isModalCueLine(line) && !isSettledLine(line));
24773
24791
  }
@@ -29287,6 +29305,7 @@ __export(index_exports, {
29287
29305
  isAlwaysOnTraceCategory: () => isAlwaysOnTraceCategory,
29288
29306
  isBuiltinChatMessageKind: () => isBuiltinChatMessageKind,
29289
29307
  isCdpConnected: () => isCdpConnected,
29308
+ isCoordinatorSpawnedHiddenWorker: () => isCoordinatorSpawnedHiddenWorker,
29290
29309
  isExtensionInstalled: () => isExtensionInstalled,
29291
29310
  isGitCommandName: () => isGitCommandName,
29292
29311
  isIdeRunning: () => isIdeRunning,
@@ -29413,11 +29432,14 @@ __export(index_exports, {
29413
29432
  resolveMeshNodeAttribution: () => resolveMeshNodeAttribution,
29414
29433
  resolveMeshRefineValidationPlan: () => resolveMeshRefineValidationPlan,
29415
29434
  resolveMeshSurfacedSessionPreview: () => resolveMeshSurfacedSessionPreview,
29435
+ resolveMuted: () => resolveMuted,
29416
29436
  resolveNodeSchedulingPriority: () => resolveNodeSchedulingPriority,
29417
29437
  resolveNotBefore: () => resolveNotBefore,
29418
29438
  resolveProviderMaxParallel: () => resolveProviderMaxParallel,
29419
29439
  resolveSessionHostAppName: () => resolveSessionHostAppName,
29420
29440
  resolveSessionHostAppNameResolution: () => resolveSessionHostAppNameResolution,
29441
+ resolveSpawnedSessionHideMute: () => resolveSpawnedSessionHideMute,
29442
+ resolveSurfaceHidden: () => resolveSurfaceHidden,
29421
29443
  resolveWorktreePath: () => resolveWorktreePath,
29422
29444
  runAsyncBatch: () => runAsyncBatch,
29423
29445
  runGit: () => runGit,
@@ -64072,6 +64094,28 @@ var DaemonCommandRouter = class {
64072
64094
  }
64073
64095
  return nodes;
64074
64096
  }
64097
+ /**
64098
+ * Same flattened node list as getCachedInlineMeshNodes(), but each node is
64099
+ * paired with the `spawnedSessionVisibility` from its OWNING mesh's policy.
64100
+ * The flat node list loses the mesh→node association, yet the cloud daemon's
64101
+ * synthetic mesh-session mirror needs the mesh-level visibility policy to
64102
+ * decide whether a coordinator-spawned worker session should be hidden+muted
64103
+ * on the dashboard (the cached inline-mesh session entry carries no settings
64104
+ * of its own). Falls back to DEFAULT_MESH_POLICY.spawnedSessionVisibility when
64105
+ * the mesh policy is absent, matching the worker-launch stamp.
64106
+ */
64107
+ getCachedInlineMeshNodesWithVisibility() {
64108
+ const out = [];
64109
+ for (const mesh of this.inlineMeshCache.values()) {
64110
+ const spawnedSessionVisibility = mesh?.policy?.spawnedSessionVisibility === "visible" ? "visible" : "hidden";
64111
+ if (Array.isArray(mesh?.nodes)) {
64112
+ for (const node of mesh.nodes) {
64113
+ out.push({ node, spawnedSessionVisibility });
64114
+ }
64115
+ }
64116
+ }
64117
+ return out;
64118
+ }
64075
64119
  // ─── Remote mesh-session owner resolution ───────────────────────────
64076
64120
  // Implementation lives in ./router-mesh-session-owner.ts (behavior-preserving
64077
64121
  // code move). resolveRemoteMeshSessionOwnerDaemonId stays public (the [Z]
@@ -73093,6 +73137,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
73093
73137
  isAlwaysOnTraceCategory,
73094
73138
  isBuiltinChatMessageKind,
73095
73139
  isCdpConnected,
73140
+ isCoordinatorSpawnedHiddenWorker,
73096
73141
  isExtensionInstalled,
73097
73142
  isGitCommandName,
73098
73143
  isIdeRunning,
@@ -73219,11 +73264,14 @@ var V1_CONTRACT_VERSION = "1.0.0";
73219
73264
  resolveMeshNodeAttribution,
73220
73265
  resolveMeshRefineValidationPlan,
73221
73266
  resolveMeshSurfacedSessionPreview,
73267
+ resolveMuted,
73222
73268
  resolveNodeSchedulingPriority,
73223
73269
  resolveNotBefore,
73224
73270
  resolveProviderMaxParallel,
73225
73271
  resolveSessionHostAppName,
73226
73272
  resolveSessionHostAppNameResolution,
73273
+ resolveSpawnedSessionHideMute,
73274
+ resolveSurfaceHidden,
73227
73275
  resolveWorktreePath,
73228
73276
  runAsyncBatch,
73229
73277
  runGit,