@adhdev/daemon-standalone 0.9.82-rc.336 → 0.9.82-rc.337

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 ? "587b2d866182a5b6c086d23d9f6cc32d22ca50f5" : void 0) ?? "unknown";
30040
+ const commitShort = readInjected(true ? "587b2d86" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
+ const version2 = readInjected(true ? "0.9.82-rc.337" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
+ const builtAt = readInjected(true ? "2026-06-20T06:38:54.115Z" : 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
  }