@adhdev/daemon-standalone 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.js CHANGED
@@ -30036,10 +30036,10 @@ var require_dist3 = __commonJS({
30036
30036
  }
30037
30037
  function getDaemonBuildInfo() {
30038
30038
  if (cached2) return cached2;
30039
- const commit = readInjected(true ? "40f2025c1de385e59792869a793811db906f4f91" : void 0) ?? "unknown";
30040
- const commitShort = readInjected(true ? "40f2025c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
- const version2 = readInjected(true ? "0.9.82-rc.336" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
- const builtAt = readInjected(true ? "2026-06-20T06:33:54.849Z" : void 0);
30039
+ const commit = readInjected(true ? "69dc786812247d8f2e908eec5c7805349fbf1d8d" : void 0) ?? "unknown";
30040
+ const commitShort = readInjected(true ? "69dc7868" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
+ const version2 = readInjected(true ? "0.9.82-rc.338" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
+ const builtAt = readInjected(true ? "2026-06-20T08:44:59.184Z" : void 0);
30043
30043
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30044
30044
  return cached2;
30045
30045
  }
@@ -37639,6 +37639,26 @@ ${rendered}`, "utf-8");
37639
37639
  function readWorkerResultMetadata(event) {
37640
37640
  return readRecord4(event.workerResult) || readRecord4(event.meshWorkerResult) || readRecord4(event.structuredResult);
37641
37641
  }
37642
+ function resolveMeshSurfacedSessionPreview(metadataEvent) {
37643
+ const workerResult = readWorkerResultMetadata(metadataEvent);
37644
+ const resultRecord = readRecord4(metadataEvent.result);
37645
+ const summaryText = readNonEmptyString2(metadataEvent.finalSummary) || readNonEmptyString2(workerResult?.summary) || readNonEmptyString2(workerResult?.finalSummary) || readNonEmptyString2(resultRecord?.summary) || readNonEmptyString2(resultRecord?.finalSummary);
37646
+ if (!summaryText) return void 0;
37647
+ const truncationSuffix = "...[truncated]";
37648
+ const preview = summaryText.length > MESH_SURFACED_PREVIEW_MAX_CHARS ? `${summaryText.slice(0, MESH_SURFACED_PREVIEW_MAX_CHARS - truncationSuffix.length)}${truncationSuffix}` : summaryText;
37649
+ const timestamp = readEventTimestampValue(metadataEvent.timestamp);
37650
+ return { preview, role: "assistant", receivedAt: timestamp };
37651
+ }
37652
+ function readEventTimestampValue(value) {
37653
+ if (typeof value === "number" && Number.isFinite(value)) return value;
37654
+ if (typeof value === "string" && value.trim()) {
37655
+ const parsed = Number(value);
37656
+ if (Number.isFinite(parsed)) return parsed;
37657
+ const dateMs = Date.parse(value);
37658
+ if (Number.isFinite(dateMs)) return dateMs;
37659
+ }
37660
+ return 0;
37661
+ }
37642
37662
  function formatCompletionMetadata(event) {
37643
37663
  const completionDiagnostic = event.completionDiagnostic && typeof event.completionDiagnostic === "object" ? event.completionDiagnostic : null;
37644
37664
  const diagnosticReason = completionDiagnostic ? readNonEmptyString2(completionDiagnostic.blockReason) || "present" : "";
@@ -37768,9 +37788,11 @@ Next step: ${nextStep}`;
37768
37788
  }
37769
37789
  return "";
37770
37790
  }
37791
+ var MESH_SURFACED_PREVIEW_MAX_CHARS;
37771
37792
  var init_mesh_events_utils = __esm2({
37772
37793
  "src/mesh/mesh-events-utils.ts"() {
37773
37794
  "use strict";
37795
+ MESH_SURFACED_PREVIEW_MAX_CHARS = 512;
37774
37796
  }
37775
37797
  });
37776
37798
  function normalizeCoordinatorDaemonIds(coordinatorDaemonId) {
@@ -40178,6 +40200,7 @@ Next step: ${nextStep}`;
40178
40200
  );
40179
40201
  if (components.onMeshCoordinatorEventForwarded) {
40180
40202
  try {
40203
+ const surfacedPreview = resolveMeshSurfacedSessionPreview(args.metadataEvent);
40181
40204
  components.onMeshCoordinatorEventForwarded({
40182
40205
  event: args.event,
40183
40206
  meshId: args.meshId,
@@ -40186,7 +40209,12 @@ Next step: ${nextStep}`;
40186
40209
  // Ensure a `workspace` field reaches updateMeshOwnedSession even when the
40187
40210
  // worker provider event only carried `workspaceName`. The merge spread of
40188
40211
  // metadataEvent above wins when it already has a non-empty `workspace`.
40189
- workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0
40212
+ workspace: readNonEmptyString2(args.metadataEvent.workspace) || readNonEmptyString2(args.metadataEvent.workspaceName) || void 0,
40213
+ ...surfacedPreview ? {
40214
+ meshSessionLastMessagePreview: surfacedPreview.preview,
40215
+ meshSessionLastMessageRole: surfacedPreview.role,
40216
+ meshSessionLastMessageAt: surfacedPreview.receivedAt || void 0
40217
+ } : {}
40190
40218
  });
40191
40219
  } catch {
40192
40220
  }
@@ -47672,6 +47700,7 @@ ${lastSnapshot}`;
47672
47700
  getGitFileDiff: () => getGitFileDiff,
47673
47701
  getGitRepoStatus: () => getGitRepoStatus,
47674
47702
  getHostMemorySnapshot: () => getHostMemorySnapshot,
47703
+ getLastDisplayMessage: () => getLastDisplayMessage,
47675
47704
  getLedgerDir: () => getLedgerDir,
47676
47705
  getLedgerSummary: () => getLedgerSummary,
47677
47706
  getLogLevel: () => getLogLevel,
@@ -65049,7 +65078,14 @@ ${formatManifestValidationIssues2(validation.issues)}`,
65049
65078
  chatTitle: pending.chatTitle,
65050
65079
  duration: pending.duration,
65051
65080
  timestamp: pending.timestamp,
65052
- finalSummary: blockReason.startsWith("parsed_status:") ? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
65081
+ // When finalization is forced past the timeout on a `parsed_status:` block
65082
+ // (the parser never confirmed a final assistant turn) we previously rode an
65083
+ // empty `finalSummary` unconditionally. That empty value propagates to the
65084
+ // mesh coordinator's mirror preview (meshSessionLastMessagePreview), leaving a
65085
+ // delegated session's inbox preview blank — or, for a LOCAL worktree session,
65086
+ // stuck on the dispatched user task. If the parser DID surface assistant text,
65087
+ // prefer it; only fall back to '' when no assistant summary can be derived.
65088
+ finalSummary: blockReason.startsWith("parsed_status:") ? this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages) ?? "" : this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages),
65053
65089
  completionDiagnostic
65054
65090
  });
65055
65091
  this.completedDebouncePending = null;