@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.mjs CHANGED
@@ -311,10 +311,10 @@ function readInjected(value) {
311
311
  }
312
312
  function getDaemonBuildInfo() {
313
313
  if (cached) return cached;
314
- const commit = readInjected(true ? "40f2025c1de385e59792869a793811db906f4f91" : void 0) ?? "unknown";
315
- const commitShort = readInjected(true ? "40f2025c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
316
- const version = readInjected(true ? "0.9.82-rc.336" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
317
- const builtAt = readInjected(true ? "2026-06-20T06:32:36.100Z" : void 0);
314
+ const commit = readInjected(true ? "69dc786812247d8f2e908eec5c7805349fbf1d8d" : void 0) ?? "unknown";
315
+ const commitShort = readInjected(true ? "69dc7868" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
316
+ const version = readInjected(true ? "0.9.82-rc.338" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
317
+ const builtAt = readInjected(true ? "2026-06-20T08:44:29.162Z" : void 0);
318
318
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
319
319
  return cached;
320
320
  }
@@ -7857,6 +7857,26 @@ function readRefineJobId(event) {
7857
7857
  function readWorkerResultMetadata(event) {
7858
7858
  return readRecord4(event.workerResult) || readRecord4(event.meshWorkerResult) || readRecord4(event.structuredResult);
7859
7859
  }
7860
+ function resolveMeshSurfacedSessionPreview(metadataEvent) {
7861
+ const workerResult = readWorkerResultMetadata(metadataEvent);
7862
+ const resultRecord = readRecord4(metadataEvent.result);
7863
+ const summaryText = readNonEmptyString2(metadataEvent.finalSummary) || readNonEmptyString2(workerResult?.summary) || readNonEmptyString2(workerResult?.finalSummary) || readNonEmptyString2(resultRecord?.summary) || readNonEmptyString2(resultRecord?.finalSummary);
7864
+ if (!summaryText) return void 0;
7865
+ const truncationSuffix = "...[truncated]";
7866
+ const preview = summaryText.length > MESH_SURFACED_PREVIEW_MAX_CHARS ? `${summaryText.slice(0, MESH_SURFACED_PREVIEW_MAX_CHARS - truncationSuffix.length)}${truncationSuffix}` : summaryText;
7867
+ const timestamp = readEventTimestampValue(metadataEvent.timestamp);
7868
+ return { preview, role: "assistant", receivedAt: timestamp };
7869
+ }
7870
+ function readEventTimestampValue(value) {
7871
+ if (typeof value === "number" && Number.isFinite(value)) return value;
7872
+ if (typeof value === "string" && value.trim()) {
7873
+ const parsed = Number(value);
7874
+ if (Number.isFinite(parsed)) return parsed;
7875
+ const dateMs = Date.parse(value);
7876
+ if (Number.isFinite(dateMs)) return dateMs;
7877
+ }
7878
+ return 0;
7879
+ }
7860
7880
  function formatCompletionMetadata(event) {
7861
7881
  const completionDiagnostic = event.completionDiagnostic && typeof event.completionDiagnostic === "object" ? event.completionDiagnostic : null;
7862
7882
  const diagnosticReason = completionDiagnostic ? readNonEmptyString2(completionDiagnostic.blockReason) || "present" : "";
@@ -7986,9 +8006,11 @@ Next step: ${nextStep}`;
7986
8006
  }
7987
8007
  return "";
7988
8008
  }
8009
+ var MESH_SURFACED_PREVIEW_MAX_CHARS;
7989
8010
  var init_mesh_events_utils = __esm({
7990
8011
  "src/mesh/mesh-events-utils.ts"() {
7991
8012
  "use strict";
8013
+ MESH_SURFACED_PREVIEW_MAX_CHARS = 512;
7992
8014
  }
7993
8015
  });
7994
8016
 
@@ -10399,6 +10421,7 @@ function injectMeshSystemMessage(components, args) {
10399
10421
  );
10400
10422
  if (components.onMeshCoordinatorEventForwarded) {
10401
10423
  try {
10424
+ const surfacedPreview = resolveMeshSurfacedSessionPreview(args.metadataEvent);
10402
10425
  components.onMeshCoordinatorEventForwarded({
10403
10426
  event: args.event,
10404
10427
  meshId: args.meshId,
@@ -10407,7 +10430,12 @@ function injectMeshSystemMessage(components, args) {
10407
10430
  // Ensure a `workspace` field reaches updateMeshOwnedSession even when the
10408
10431
  // worker provider event only carried `workspaceName`. The merge spread of
10409
10432
  // metadataEvent above wins when it already has a non-empty `workspace`.
10410
- workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0
10433
+ workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0,
10434
+ ...surfacedPreview ? {
10435
+ meshSessionLastMessagePreview: surfacedPreview.preview,
10436
+ meshSessionLastMessageRole: surfacedPreview.role,
10437
+ meshSessionLastMessageAt: surfacedPreview.receivedAt || void 0
10438
+ } : {}
10411
10439
  });
10412
10440
  } catch {
10413
10441
  }
@@ -35067,7 +35095,14 @@ var CliProviderInstance = class _CliProviderInstance {
35067
35095
  chatTitle: pending.chatTitle,
35068
35096
  duration: pending.duration,
35069
35097
  timestamp: pending.timestamp,
35070
- finalSummary: blockReason.startsWith("parsed_status:") ? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
35098
+ // When finalization is forced past the timeout on a `parsed_status:` block
35099
+ // (the parser never confirmed a final assistant turn) we previously rode an
35100
+ // empty `finalSummary` unconditionally. That empty value propagates to the
35101
+ // mesh coordinator's mirror preview (meshSessionLastMessagePreview), leaving a
35102
+ // delegated session's inbox preview blank — or, for a LOCAL worktree session,
35103
+ // stuck on the dispatched user task. If the parser DID surface assistant text,
35104
+ // prefer it; only fall back to '' when no assistant summary can be derived.
35105
+ finalSummary: blockReason.startsWith("parsed_status:") ? this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages) ?? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
35071
35106
  completionDiagnostic
35072
35107
  });
35073
35108
  this.completedDebouncePending = null;
@@ -59539,6 +59574,7 @@ export {
59539
59574
  getGitFileDiff,
59540
59575
  getGitRepoStatus,
59541
59576
  getHostMemorySnapshot,
59577
+ getLastDisplayMessage,
59542
59578
  getLedgerDir,
59543
59579
  getLedgerSummary,
59544
59580
  getLogLevel,