@adhdev/daemon-standalone 1.0.28-rc.23 → 1.0.28-rc.24

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
@@ -33311,10 +33311,10 @@ var require_dist3 = __commonJS({
33311
33311
  }
33312
33312
  function getDaemonBuildInfo() {
33313
33313
  if (cached2) return cached2;
33314
- const commit = readInjected(true ? "f130ad6e97683f23cd08e4296336ac70774146cf" : void 0) ?? "unknown";
33315
- const commitShort = readInjected(true ? "f130ad6e" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33316
- const version2 = readInjected(true ? "1.0.28-rc.23" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33317
- const builtAt = readInjected(true ? "2026-07-29T03:34:37.130Z" : void 0);
33314
+ const commit = readInjected(true ? "6abc12466a3077bd6bc096332ce9073ff8d4d975" : void 0) ?? "unknown";
33315
+ const commitShort = readInjected(true ? "6abc1246" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33316
+ const version2 = readInjected(true ? "1.0.28-rc.24" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33317
+ const builtAt = readInjected(true ? "2026-07-29T05:49:00.948Z" : void 0);
33318
33318
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
33319
33319
  return cached2;
33320
33320
  }
@@ -87520,6 +87520,11 @@ ${body}
87520
87520
  const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages, pending.turnStartedAt);
87521
87521
  const allowMissingAssistantTimeout = !!(this.settings.meshNodeFor || this.settings.meshActiveTaskId || this.settings.launchedByCoordinator);
87522
87522
  LOG2.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
87523
+ if (finalAssistantEvidence.present && finalAssistantEvidence.source !== "unavailable") {
87524
+ pending.resolvedFinalMessages = Array.isArray(finalAssistantEvidence.messages) ? finalAssistantEvidence.messages : void 0;
87525
+ } else {
87526
+ pending.resolvedFinalMessages = void 0;
87527
+ }
87523
87528
  if (!finalAssistantEvidence.present) {
87524
87529
  if (adapterOwnsMessagesElsewhere) {
87525
87530
  if (finalAssistantEvidence.source === "external-native") {
@@ -88479,13 +88484,35 @@ ${body}
88479
88484
  duration: pending.duration,
88480
88485
  timestamp: pending.timestamp,
88481
88486
  taskId: pending.taskId,
88482
- finalSummary: this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages, pending.turnStartedAt)
88487
+ finalSummary: this.cleanCompletionFinalSummary(pending)
88483
88488
  });
88484
88489
  this.completedDebouncePending = null;
88485
88490
  this.completedDebounceTimer = null;
88486
88491
  this.generatingStartedAt = 0;
88487
88492
  this.lastApprovalEventFingerprint = "";
88488
88493
  }
88494
+ /**
88495
+ * EMPTY-FINAL-CONTENT (kimi native-source TOCTOU): finalSummary for the CLEAN
88496
+ * finalization path (getCompletedFinalizationBlock returned null — the turn is already
88497
+ * proven done). Prefer extracting the summary from pending.resolvedFinalMessages, the
88498
+ * EXACT message snapshot completionFinalAssistantEvidence just proved `present:true`
88499
+ * from, instead of taking a brand-new independent read
88500
+ * (adapter.getScriptParsedStatus() / a fresh readExternalCompletionMessages() inside
88501
+ * completionFinalSummary). A native-source provider's on-disk transcript can be
88502
+ * rewritten/truncated between the two reads, and a PTY-buffer scrape can lose the
88503
+ * matched bubble to a repaint/scroll — either race can turn a proven-present turn into
88504
+ * an emitted completion with an empty assistant bubble. Falls back to the live
88505
+ * (pre-fix) read when no snapshot was cached (e.g. a code path that reaches the clean
88506
+ * emit without going through getCompletedFinalizationBlock first), so no other provider
88507
+ * class's behavior changes.
88508
+ */
88509
+ cleanCompletionFinalSummary(pending) {
88510
+ if (Array.isArray(pending.resolvedFinalMessages)) {
88511
+ const fromSnapshot = extractFinalSummaryFromMessagesAfter(pending.resolvedFinalMessages, pending.turnStartedAt);
88512
+ if (fromSnapshot) return fromSnapshot;
88513
+ }
88514
+ return this.completionFinalSummary(this.adapter?.getScriptParsedStatus()?.messages, pending.turnStartedAt);
88515
+ }
88489
88516
  /**
88490
88517
  * A-3 (CLI 완료판정 통합): single authoritative emit for a CLI turn's
88491
88518
  * `agent:generating_completed` event. The completion JUDGMENT — WHETHER and