@adhdev/daemon-core 0.9.82-rc.336 → 0.9.82-rc.338

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.d.ts CHANGED
@@ -87,7 +87,7 @@ export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, r
87
87
  export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, NpmExecOptions, } from './commands/upgrade-helper.js';
88
88
  export { DaemonStatusReporter } from './status/reporter.js';
89
89
  export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
90
- export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
90
+ export { buildStatusSnapshot, buildMachineInfo, getLastDisplayMessage } from './status/snapshot.js';
91
91
  export { getDaemonBuildInfo } from './build-info.js';
92
92
  export type { DaemonBuildInfo } from './build-info.js';
93
93
  export { normalizeManagedStatus, isManagedStatusWorking, isManagedStatusWaiting, normalizeActiveChatData } from './status/normalize.js';
package/dist/index.js CHANGED
@@ -316,10 +316,10 @@ function readInjected(value) {
316
316
  }
317
317
  function getDaemonBuildInfo() {
318
318
  if (cached) return cached;
319
- const commit = readInjected(true ? "40f2025c1de385e59792869a793811db906f4f91" : void 0) ?? "unknown";
320
- const commitShort = readInjected(true ? "40f2025c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
321
- const version = readInjected(true ? "0.9.82-rc.336" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
322
- const builtAt = readInjected(true ? "2026-06-20T06:32:36.100Z" : void 0);
319
+ const commit = readInjected(true ? "69dc786812247d8f2e908eec5c7805349fbf1d8d" : void 0) ?? "unknown";
320
+ const commitShort = readInjected(true ? "69dc7868" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
321
+ const version = readInjected(true ? "0.9.82-rc.338" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
322
+ const builtAt = readInjected(true ? "2026-06-20T08:44:29.162Z" : void 0);
323
323
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
324
324
  return cached;
325
325
  }
@@ -7863,6 +7863,26 @@ function readRefineJobId(event) {
7863
7863
  function readWorkerResultMetadata(event) {
7864
7864
  return readRecord4(event.workerResult) || readRecord4(event.meshWorkerResult) || readRecord4(event.structuredResult);
7865
7865
  }
7866
+ function resolveMeshSurfacedSessionPreview(metadataEvent) {
7867
+ const workerResult = readWorkerResultMetadata(metadataEvent);
7868
+ const resultRecord = readRecord4(metadataEvent.result);
7869
+ const summaryText = readNonEmptyString2(metadataEvent.finalSummary) || readNonEmptyString2(workerResult?.summary) || readNonEmptyString2(workerResult?.finalSummary) || readNonEmptyString2(resultRecord?.summary) || readNonEmptyString2(resultRecord?.finalSummary);
7870
+ if (!summaryText) return void 0;
7871
+ const truncationSuffix = "...[truncated]";
7872
+ const preview = summaryText.length > MESH_SURFACED_PREVIEW_MAX_CHARS ? `${summaryText.slice(0, MESH_SURFACED_PREVIEW_MAX_CHARS - truncationSuffix.length)}${truncationSuffix}` : summaryText;
7873
+ const timestamp = readEventTimestampValue(metadataEvent.timestamp);
7874
+ return { preview, role: "assistant", receivedAt: timestamp };
7875
+ }
7876
+ function readEventTimestampValue(value) {
7877
+ if (typeof value === "number" && Number.isFinite(value)) return value;
7878
+ if (typeof value === "string" && value.trim()) {
7879
+ const parsed = Number(value);
7880
+ if (Number.isFinite(parsed)) return parsed;
7881
+ const dateMs = Date.parse(value);
7882
+ if (Number.isFinite(dateMs)) return dateMs;
7883
+ }
7884
+ return 0;
7885
+ }
7866
7886
  function formatCompletionMetadata(event) {
7867
7887
  const completionDiagnostic = event.completionDiagnostic && typeof event.completionDiagnostic === "object" ? event.completionDiagnostic : null;
7868
7888
  const diagnosticReason = completionDiagnostic ? readNonEmptyString2(completionDiagnostic.blockReason) || "present" : "";
@@ -7992,9 +8012,11 @@ Next step: ${nextStep}`;
7992
8012
  }
7993
8013
  return "";
7994
8014
  }
8015
+ var MESH_SURFACED_PREVIEW_MAX_CHARS;
7995
8016
  var init_mesh_events_utils = __esm({
7996
8017
  "src/mesh/mesh-events-utils.ts"() {
7997
8018
  "use strict";
8019
+ MESH_SURFACED_PREVIEW_MAX_CHARS = 512;
7998
8020
  }
7999
8021
  });
8000
8022
 
@@ -10402,6 +10424,7 @@ function injectMeshSystemMessage(components, args) {
10402
10424
  );
10403
10425
  if (components.onMeshCoordinatorEventForwarded) {
10404
10426
  try {
10427
+ const surfacedPreview = resolveMeshSurfacedSessionPreview(args.metadataEvent);
10405
10428
  components.onMeshCoordinatorEventForwarded({
10406
10429
  event: args.event,
10407
10430
  meshId: args.meshId,
@@ -10410,7 +10433,12 @@ function injectMeshSystemMessage(components, args) {
10410
10433
  // Ensure a `workspace` field reaches updateMeshOwnedSession even when the
10411
10434
  // worker provider event only carried `workspaceName`. The merge spread of
10412
10435
  // metadataEvent above wins when it already has a non-empty `workspace`.
10413
- workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0
10436
+ workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0,
10437
+ ...surfacedPreview ? {
10438
+ meshSessionLastMessagePreview: surfacedPreview.preview,
10439
+ meshSessionLastMessageRole: surfacedPreview.role,
10440
+ meshSessionLastMessageAt: surfacedPreview.receivedAt || void 0
10441
+ } : {}
10414
10442
  });
10415
10443
  } catch {
10416
10444
  }
@@ -17872,6 +17900,7 @@ __export(index_exports, {
17872
17900
  getGitFileDiff: () => getGitFileDiff,
17873
17901
  getGitRepoStatus: () => getGitRepoStatus,
17874
17902
  getHostMemorySnapshot: () => getHostMemorySnapshot,
17903
+ getLastDisplayMessage: () => getLastDisplayMessage,
17875
17904
  getLedgerDir: () => getLedgerDir,
17876
17905
  getLedgerSummary: () => getLedgerSummary,
17877
17906
  getLogLevel: () => getLogLevel,
@@ -35427,7 +35456,14 @@ var CliProviderInstance = class _CliProviderInstance {
35427
35456
  chatTitle: pending.chatTitle,
35428
35457
  duration: pending.duration,
35429
35458
  timestamp: pending.timestamp,
35430
- finalSummary: blockReason.startsWith("parsed_status:") ? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
35459
+ // When finalization is forced past the timeout on a `parsed_status:` block
35460
+ // (the parser never confirmed a final assistant turn) we previously rode an
35461
+ // empty `finalSummary` unconditionally. That empty value propagates to the
35462
+ // mesh coordinator's mirror preview (meshSessionLastMessagePreview), leaving a
35463
+ // delegated session's inbox preview blank — or, for a LOCAL worktree session,
35464
+ // stuck on the dispatched user task. If the parser DID surface assistant text,
35465
+ // prefer it; only fall back to '' when no assistant summary can be derived.
35466
+ finalSummary: blockReason.startsWith("parsed_status:") ? this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages) ?? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
35431
35467
  completionDiagnostic
35432
35468
  });
35433
35469
  this.completedDebouncePending = null;
@@ -59888,6 +59924,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
59888
59924
  getGitFileDiff,
59889
59925
  getGitRepoStatus,
59890
59926
  getHostMemorySnapshot,
59927
+ getLastDisplayMessage,
59891
59928
  getLedgerDir,
59892
59929
  getLedgerSummary,
59893
59930
  getLogLevel,