zidane 5.13.23 → 5.13.26

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.
Files changed (40) hide show
  1. package/dist/{acp-qAPTbwPf.js → acp-CjAoILwj.js} +3 -3
  2. package/dist/{acp-qAPTbwPf.js.map → acp-CjAoILwj.js.map} +1 -1
  3. package/dist/acp-cli.js +147 -11
  4. package/dist/acp-cli.js.map +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/chat/pure.d.ts +2 -2
  7. package/dist/chat/pure.js +2 -2
  8. package/dist/chat.d.ts +12 -4
  9. package/dist/chat.d.ts.map +1 -1
  10. package/dist/chat.js +4 -4
  11. package/dist/eval.js +1 -1
  12. package/dist/{headless-Z6A74uJA.js → headless-2SH7dvoW.js} +3 -3
  13. package/dist/{headless-Z6A74uJA.js.map → headless-2SH7dvoW.js.map} +1 -1
  14. package/dist/headless.js +1 -1
  15. package/dist/index.js +3 -3
  16. package/dist/output/stream-json.js +1 -1
  17. package/dist/{presets-D3xdMjQB.js → presets-B9nDwmaz.js} +2 -2
  18. package/dist/{presets-D3xdMjQB.js.map → presets-B9nDwmaz.js.map} +1 -1
  19. package/dist/presets.js +1 -1
  20. package/dist/{tools-Dtv6llsJ.js → tools-B32lZXLE.js} +26 -2
  21. package/dist/tools-B32lZXLE.js.map +1 -0
  22. package/dist/tools.js +1 -1
  23. package/dist/{transcript-anchors-Ck87n_AS.d.ts → transcript-anchors-BJ-ESWnm.d.ts} +3 -1
  24. package/dist/transcript-anchors-BJ-ESWnm.d.ts.map +1 -0
  25. package/dist/{transcript-anchors-BB5da97S.js → transcript-anchors-BUtOd-qa.js} +3379 -3245
  26. package/dist/transcript-anchors-BUtOd-qa.js.map +1 -0
  27. package/dist/tui.d.ts +4 -2
  28. package/dist/tui.d.ts.map +1 -1
  29. package/dist/tui.js +107 -31
  30. package/dist/tui.js.map +1 -1
  31. package/dist/{turn-operations-CAE2bkOa.d.ts → turn-operations-BSSQHNq1.d.ts} +28 -2
  32. package/dist/turn-operations-BSSQHNq1.d.ts.map +1 -0
  33. package/dist/{turn-operations-DLWN2J7f.js → turn-operations-B_XeuNp-.js} +587 -405
  34. package/dist/turn-operations-B_XeuNp-.js.map +1 -0
  35. package/package.json +3 -3
  36. package/dist/tools-Dtv6llsJ.js.map +0 -1
  37. package/dist/transcript-anchors-BB5da97S.js.map +0 -1
  38. package/dist/transcript-anchors-Ck87n_AS.d.ts.map +0 -1
  39. package/dist/turn-operations-CAE2bkOa.d.ts.map +0 -1
  40. package/dist/turn-operations-DLWN2J7f.js.map +0 -1
@@ -2492,6 +2492,30 @@ function executionBlobWriter(ctx) {
2492
2492
  * turns are never mutated; the synthetic marker is the only new
2493
2493
  * `SessionTurn` allocated.
2494
2494
  */
2495
+ /**
2496
+ * Recover the auto-compaction hysteresis baseline from a resumed session.
2497
+ *
2498
+ * Scans backward for the newest `compact-summary` marker and returns the
2499
+ * summary call's OUTPUT tokens — the same quantity {@link maybeAutoCompact}
2500
+ * records as `lastCompactedInputTokens` after a live compaction (there the
2501
+ * value is `summary.output + restorationTokens`). The restoration portion
2502
+ * isn't persisted on the marker, so this seed UNDER-counts the true
2503
+ * post-compact size; that only weakens the cooldown slightly (it requires a
2504
+ * touch more growth before re-firing) and is strictly safer than the prior
2505
+ * `undefined`, which disabled the cooldown entirely on every resume.
2506
+ *
2507
+ * Returns `undefined` when no marker exists (a never-compacted session) so
2508
+ * the first compaction still fires off the absolute threshold.
2509
+ */
2510
+ function seedCompactBaseline(turns) {
2511
+ for (let i = turns.length - 1; i >= 0; i--) {
2512
+ const block = turns[i].content.find((b) => b.type === "compact-summary");
2513
+ if (block && block.type === "compact-summary") {
2514
+ const output = block.usage.output;
2515
+ return typeof output === "number" && Number.isFinite(output) && output >= 0 ? output : void 0;
2516
+ }
2517
+ }
2518
+ }
2495
2519
  function applyCompactSummaryCutoff(turns) {
2496
2520
  if (turns.length === 0) return turns;
2497
2521
  let markerIdx = -1;
@@ -2966,7 +2990,7 @@ async function runLoop(ctx) {
2966
2990
  const unregisterTtftThinking = ctx.hooks.hook("stream:thinking", markTtft);
2967
2991
  const unregisterTtftTool = ctx.hooks.hook("tool:before", markTtft);
2968
2992
  const autoCompactState = {
2969
- lastCompactedInputTokens: void 0,
2993
+ lastCompactedInputTokens: seedCompactBaseline(ctx.turns),
2970
2994
  consecutiveFailures: 0,
2971
2995
  disabled: false
2972
2996
  };
@@ -10209,4 +10233,4 @@ const writeFile$1 = {
10209
10233
  //#endregion
10210
10234
  export { sliceForCompaction as $, PERSISTED_STUB_PREFIX as A, selectFilesFromSession as B, normalizeShellCommand as C, TOOL_USE_CANCELLED_MESSAGE as D, SHELL_CASCADE_CANCEL_MESSAGE as E, resolveMcpWarningsDir as F, TRAILER as G, compactConversation as H, resolvePersistDir as I, buildFullCompactPrompt as J, buildCompactPrompt as K, resolveTasksDir as L, buildPersistedStub as M, cleanupPersistedSession as N, TOOL_USE_SKIPPED_MESSAGE as O, maybePersistToolResult as P, anchorPreviewFor as Q, buildPostCompactAttachments as R, defaultRepeatGuardTracked as S, INTERRUPT_MESSAGE_FOR_TOOL_USE as T, BASE_INSTRUCTIONS as U, selectRecentFiles as V, NO_TOOLS_PREAMBLE as W, buildUpToCompactPrompt as X, buildTailCompactPrompt as Y, ANCHOR_PREVIEW_MAX_CHARS as Z, createSkillsReadTool as _, multiEdit as a, OperationTimeoutError as at, tailTruncate as b, grep as c, OUTPUT_RESERVE_TOKENS as ct, createAgent as d, stripImagesFromTurns as et, WAIT_TASK_TIMED_OUT_PREFIX as f, createSkillsRunScriptTool as g, createSkillsUseTool as h, readFile$1 as i, CompactPromptTooLongError as it, PERSISTENCE_PREVIEW_BYTES as j, validateToolArgs as k, glob as l, effectiveContextWindow as lt, createToolSearchTool as m, createSpawnTool as n, truncateHeadForPtlRetry as nt, listFiles as o, withTimeout as ot, waitTask as p, buildFromCompactPrompt as q, shellKill as r, CompactInvalidInputError as rt, createInteractionTool as s, AUTO_COMPACT_MIN_GROWTH_FRACTION as st, writeFile$1 as t, summaryToTurn as tt, edit as u, shouldAutoCompact as ut, createShellTool as v, stableStringify as w, defaultRepeatGuardNormalize as x, shell as y, selectFilesFromReadState as z };
10211
10235
 
10212
- //# sourceMappingURL=tools-Dtv6llsJ.js.map
10236
+ //# sourceMappingURL=tools-B32lZXLE.js.map