@adhdev/daemon-standalone 0.9.82-rc.539 → 0.9.82-rc.540

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
@@ -30208,10 +30208,10 @@ var require_dist3 = __commonJS({
30208
30208
  }
30209
30209
  function getDaemonBuildInfo() {
30210
30210
  if (cached2) return cached2;
30211
- const commit = readInjected(true ? "35ac849eca76162066561b27633e11827fa19a73" : void 0) ?? "unknown";
30212
- const commitShort = readInjected(true ? "35ac849e" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30213
- const version2 = readInjected(true ? "0.9.82-rc.539" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30214
- const builtAt = readInjected(true ? "2026-07-15T15:55:46.990Z" : void 0);
30211
+ const commit = readInjected(true ? "0674080aa30d25acbfb5c295598d15f686d4cba3" : void 0) ?? "unknown";
30212
+ const commitShort = readInjected(true ? "0674080a" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30213
+ const version2 = readInjected(true ? "0.9.82-rc.540" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30214
+ const builtAt = readInjected(true ? "2026-07-16T01:54:05.499Z" : void 0);
30215
30215
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30216
30216
  return cached2;
30217
30217
  }
@@ -52957,15 +52957,21 @@ ${cleanBody}`;
52957
52957
  }
52958
52958
  const normalizedButtons = labels.map((label) => normalizeApprovalLabel(label));
52959
52959
  const hints = getApprovalPositiveHints(provider);
52960
- for (const hint of hints) {
52961
- const exactIndex = normalizedButtons.findIndex((label, index) => label === hint && !isNegativeApprovalLabel(labels[index]));
52962
- if (exactIndex >= 0) return { index: exactIndex, label: labels[exactIndex] };
52963
- const prefixIndex = normalizedButtons.findIndex((label, index) => label.startsWith(hint) && !isNegativeApprovalLabel(labels[index]));
52964
- if (prefixIndex >= 0) return { index: prefixIndex, label: labels[prefixIndex] };
52965
- const includeIndex = normalizedButtons.findIndex((label, index) => label.includes(hint) && !isNegativeApprovalLabel(labels[index]));
52966
- if (includeIndex >= 0) return { index: includeIndex, label: labels[includeIndex] };
52967
- }
52968
- return { index: -1, label: "" };
52960
+ const includesWord = (label, hint) => {
52961
+ if (!label.includes(hint)) return false;
52962
+ const re = new RegExp(`(?:^|\\s)${hint.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?:\\s|$)`);
52963
+ return re.test(label);
52964
+ };
52965
+ const findMatch = (predicate) => {
52966
+ for (const hint of hints) {
52967
+ const idx = normalizedButtons.findIndex(
52968
+ (label, index) => predicate(label, hint) && !isNegativeApprovalLabel(labels[index])
52969
+ );
52970
+ if (idx >= 0) return { index: idx, label: labels[idx] };
52971
+ }
52972
+ return null;
52973
+ };
52974
+ return findMatch((label, hint) => label === hint) ?? findMatch((label, hint) => label.startsWith(hint)) ?? findMatch((label, hint) => includesWord(label, hint)) ?? { index: -1, label: "" };
52969
52975
  }
52970
52976
  function pickAutoApprovalButton(buttons) {
52971
52977
  const labels = (buttons || []).map((button) => String(button || "").trim());
@@ -56959,6 +56965,45 @@ ${lastSnapshot}`;
56959
56965
  shouldUseFullProviderTranscriptContext() {
56960
56966
  return this.providerOwnsTranscript() && this.provider.transcriptContext === "full";
56961
56967
  }
56968
+ /**
56969
+ * MULTI-TURN TRANSCRIPT FLICKER (kimi): whether this provider reconstructs
56970
+ * its ENTIRE transcript from the rendered PTY buffer on every read and so
56971
+ * must be fed the full accumulated buffer rather than the current-turn slice.
56972
+ *
56973
+ * The turn-scope slice (buildCliParseInput → sliceFromOffset(accumulatedBuffer,
56974
+ * scope.bufferStart)) exists so a mid-turn parse only sees the fresh output of
56975
+ * the CURRENT turn — correct for status/streaming detection and for providers
56976
+ * that reassemble prior history elsewhere (native-history on disk, or a
56977
+ * provider-owned full-context parser). But a pure-PTY provider with NO native
56978
+ * history and NO provider transcript authority, whose tui parser walks the
56979
+ * whole buffer for its per-turn bubble markers (kimi's `●`/`✨` bullets),
56980
+ * loses every prior turn's bubbles the instant a new turn starts: bufferStart
56981
+ * jumps to the new turn's offset, the slice drops turns 1..n-1, and until the
56982
+ * new turn emits its first bullet parseSession returns zero messages — so
56983
+ * read_chat momentarily goes EMPTY and the dashboard clears every bubble,
56984
+ * then restores them once output arrives (the observed flicker).
56985
+ *
56986
+ * accumulatedBuffer is the terminal-EMULATED rendered scrollback (overwritten
56987
+ * cells collapsed), not raw PTY append, so parsing it in full yields the clean
56988
+ * cumulative transcript with no repaint duplication. Scope to exactly this
56989
+ * class (tui transcriptPty scope 'buffer' + no native history + not
56990
+ * provider-owned) so no other provider's turn-scoped parse changes.
56991
+ */
56992
+ parsesFullPtyTranscriptFromBuffer() {
56993
+ if (this.providerOwnsTranscript()) return false;
56994
+ if (this.provider.nativeHistory) return false;
56995
+ const transcriptPty = this.provider.tui?.transcriptPty;
56996
+ return transcriptPty?.scope === "buffer";
56997
+ }
56998
+ /**
56999
+ * The turn scope to feed the transcript parser. Normally the live turn scope
57000
+ * (so a mid-turn parse is current-turn-only), but null (= full accumulated
57001
+ * buffer) for pure-PTY full-transcript providers so prior turns never drop.
57002
+ * See {@link parsesFullPtyTranscriptFromBuffer}.
57003
+ */
57004
+ transcriptParseScope() {
57005
+ return this.parsesFullPtyTranscriptFromBuffer() ? null : this.engine.currentTurnScope;
57006
+ }
56962
57007
  getIdleFinishConfirmMs() {
56963
57008
  return this.timeouts.idleFinishConfirm;
56964
57009
  }
@@ -57312,7 +57357,10 @@ ${lastSnapshot}`;
57312
57357
  baseMessages: [],
57313
57358
  partialResponse: this.responseBuffer,
57314
57359
  isWaitingForResponse: this.engine.isWaitingForResponse,
57315
- scope: this.engine.currentTurnScope,
57360
+ // Full accumulated buffer (scope null) for pure-PTY full-transcript
57361
+ // providers so prior turns' bubbles never drop when a new turn starts;
57362
+ // the current-turn slice otherwise. See parsesFullPtyTranscriptFromBuffer.
57363
+ scope: this.transcriptParseScope(),
57316
57364
  runtimeSettings: this.runtimeSettings,
57317
57365
  spawnAt: this.spawnAt
57318
57366
  });
@@ -68906,7 +68954,7 @@ ${effect.notification.body || ""}`.trim();
68906
68954
  buttonIndex = buttons.findIndex((b) => b.toLowerCase().includes(btnLower));
68907
68955
  }
68908
68956
  if (buttonIndex < 0 && (action === "reject" || action === "deny")) {
68909
- buttonIndex = buttons.findIndex((b) => /deny|reject|no/i.test(b));
68957
+ buttonIndex = buttons.findIndex((b) => isNegativeApprovalLabel(b));
68910
68958
  }
68911
68959
  if (buttonIndex < 0 && (action === "always" || /always/i.test(button))) {
68912
68960
  buttonIndex = buttons.findIndex((b) => /always/i.test(b));