acp-kernel 0.0.88-pr.405.255 → 0.0.89-pr.177.263

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/DESIGN.md CHANGED
@@ -232,3 +232,19 @@ A default `countTokens` ships with the core (word-level + unicode CJK tokenizer,
232
232
  ## 7. Why the algorithm, but not the DCP-derived code, comes here
233
233
 
234
234
  Copyright protects *expression*, not ideas, methods, or algorithms (17 USC §102(b)). The compression *methods* (3-tier, growth cadence, protected filtering) are the author's. This core reimplements them in **fresh expression** — it is not a copy or refactor of DCP-derived files. See [PROVENANCE.md](./PROVENANCE.md) for the per-module origin classification (original-bring / DCP-derived-reimplement / adapter-only).
235
+
236
+ ---
237
+
238
+ ## 8. Prune Semantics & Wire Invariants
239
+
240
+ `prune` rebuilds the visible view every turn: messages covered by active blocks are dropped, and each active block's rendered summary (`[Compressed conversation section]`, id `acp_summary_bN`) is inserted at the block's earliest covered position (pair-safe, per `pairSafeAnchorIndex`). One behavior of the rebuilt view is a load-bearing contract for downstream consumers:
241
+
242
+ ### 8.1 First-user-message pin
243
+
244
+ The session's **first user message survives prune unconditionally** — even when it is covered by an active block. In `rebuildMessages` (`src/prune.ts`) the pin check runs *before* the covered-by-active-block check, so after compressing a range that includes the first user message, the rebuilt wire contains **both** the rendered summary **and** the first user message verbatim; all other covered messages drop as usual. Only the *first* user message is pinned — later covered user messages are pruned normally.
245
+
246
+ - **Why:** strict providers reject conversations with no user message (e.g., Anthropic requires the conversation to start from the user role). Pinning guarantees the rebuilt wire retains at least one user message whenever the input had one. Deliberate since prune's first implementation (v0.0.2) — the ordering of the two checks is part of the contract, not incidental. Regression-tested by `tests/state-prune.test.ts` ("prune preserves first user message even when covered") and `tests/orphan-fixes.test.ts` ("prune: first user message pruned when covered (no duplication)").
247
+ - **Consequences for consumers:**
248
+ - Consumers cannot assert byte-level disappearance of the first user message after compression; post-compress wire assertions must expect the rendered summary **plus** the pinned message verbatim.
249
+ - Token-size and prefix-cache stability estimates must account for the pinned message staying verbatim (it is often the task description and can be long).
250
+ - Boundary resolution compensates: `blockVisibleInRange` (`src/boundaries.ts`) treats a block as present in a range via its rendered summary **or** its earliest surviving raw — required precisely because the summary anchors *before* the pinned raw.
@@ -33,6 +33,7 @@ export interface ResolvedRange {
33
33
  boundaryKind: BoundaryKind;
34
34
  protectedGaps: number[];
35
35
  snappedBoundaries: string[];
36
+ reversedNote?: string;
36
37
  }
37
38
  export declare function resolveBoundaries(input: ResolveBoundariesInput): ResolvedRange;
38
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../src/boundaries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAKD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAehE;AAED;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,KAAK,CAAC;gBAGjC,IAAI,EAAE,SAAS,GAAG,UAAU,EAC5B,QAAQ,EAAE,OAAO,GAAG,KAAK,EACzB,OAAO,EAAE,MAAM;CAQlB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE,gBAAgB,CAA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,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,EAAE,CAAC;IACJ,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnC;AA2GD,wBAAgB,UAAU,CAAC,KAAK,GAAE,KAAU,GAAG,eAAe,CAuY7D;AAyoCD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -2,6 +2,10 @@ import type { CompressionState, CoreMessage } from "./types.js";
2
2
  export interface HideConsumedResult {
3
3
  messages: CoreMessage[];
4
4
  hidden: number;
5
+ /** Padded refs of the orphan compress call/result messages hidden by this
6
+ * pass (orphans beyond the keep window). Consumed by boundary resolution to
7
+ * snap a range endpoint onto a hidden-but-intact orphan (#396). */
8
+ hiddenOrphanRefs: string[];
5
9
  }
6
10
  export declare function hideConsumedCompressCalls(state: CompressionState, messages: CoreMessage[]): HideConsumedResult;
7
11
  //# sourceMappingURL=hide-consumed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hide-consumed.d.ts","sourceRoot":"","sources":["../src/hide-consumed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAYhE,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAClB;AA8FD,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,WAAW,EAAE,GACxB,kBAAkB,CAwFpB"}
1
+ {"version":3,"file":"hide-consumed.d.ts","sourceRoot":"","sources":["../src/hide-consumed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAYhE,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf;;wEAEoE;IACpE,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC9B;AA8FD,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,WAAW,EAAE,GACxB,kBAAkB,CAoGpB"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { createInitialState, allocateBlockId, allocateRunId, blockById, activeBl
5
5
  export { defaultConfig, validateConfig } from "./config.js";
6
6
  export * from "./compress-tools.js";
7
7
  export { assignRefs, highestUsedIndex, emptyRefMap, indexToRef, refToIndex, refForRaw, rawForRef, BLOCKED_REF, } from "./refs.js";
8
- export { prune, SUMMARY_HEADER, summaryMessageId, isSummaryMessageId, isRenderedSummaryMessage, } from "./prune.js";
8
+ export { prune, baseIdOf, isCovered, SUMMARY_HEADER, summaryMessageId, isSummaryMessageId, isRenderedSummaryMessage, } from "./prune.js";
9
9
  export { syncBlocks } from "./sync.js";
10
10
  export { resolveBoundaries, parseBoundary, BoundaryNotFoundError, visibleBlockAnchor, blockVisibleInRange, } from "./boundaries.js";
11
11
  export { defaultCountTokens, estimateTokensFast, createBpeTokenizer, countMessageTokens, } from "./tokenize.js";
@@ -30,6 +30,7 @@ export { buildCacheReport, computeFoldEconomics, decomposeSample, formatCacheRep
30
30
  export type { CacheSample, FoldEvent, FoldEconomicsInput, PriceProfile, SampleDecomposition, CacheTotals, FoldEconomics, EconomicsSummary, CacheReportLine, CacheReportOptions, CacheReport, FormatCacheReportOptions, } from "./cache-report.js";
31
31
  export { renderHandoff, renderMessage, matchSession } from "./handoff.js";
32
32
  export type { HandoffInput, HandoffMeta, HandoffBlockFull } from "./handoff.js";
33
+ export { isToolMessage } from "./message-kind.js";
33
34
  export { hideConsumedCompressCalls } from "./hide-consumed.js";
34
35
  export type { HideConsumedResult } from "./hide-consumed.js";
35
36
  export { ABSORB_TOOL_NAME, ABSORB_TOOL, ABSORB_TOOL_OPENAI, IMAGE_FULL_TOOL_NAME, IMAGE_FULL_TOOL, IMAGE_FULL_TOOL_OPENAI, IMAGE_FULL_TOOL_RESPONSES, } from "./compress-tools.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EACV,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD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,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,8BAA8B,EAC9B,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,WAAW,GACZ,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EACV,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,UAA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,EACR,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,WAAW,GACZ,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -111,33 +111,45 @@ function summaryMessageId(blockId) {
111
111
  function isSummaryMessageId(id) {
112
112
  return id.startsWith(SUMMARY_ID_PREFIX);
113
113
  }
114
+ function baseIdOf(id) {
115
+ const hash = id.indexOf("#");
116
+ return hash > 0 ? id.substring(0, hash) : id;
117
+ }
118
+ function isCovered(id, coveredBases) {
119
+ return coveredBases.has(baseIdOf(id));
120
+ }
114
121
  function isRenderedSummaryMessage(message) {
115
122
  return isSummaryMessageId(message.id) && message.role === "system" && message.contentType === "text";
116
123
  }
117
124
  function prune(messages, state, options = {}) {
118
125
  const covered = coveredMessageIds(state);
119
126
  if (covered.size === 0) return [...messages];
127
+ const coveredBases = /* @__PURE__ */ new Set();
128
+ for (const id of covered) coveredBases.add(baseIdOf(id));
120
129
  const inject = options.injectSummaries ?? true;
121
130
  const firstUserIndex = messages.findIndex(
122
131
  (message) => message.role === "user"
123
132
  );
124
- const indexById = /* @__PURE__ */ new Map();
133
+ const baseIndexById = /* @__PURE__ */ new Map();
125
134
  const summaryIndexById = /* @__PURE__ */ new Map();
126
135
  messages.forEach((message, index) => {
127
- indexById.set(message.id, index);
136
+ const base = baseIdOf(message.id);
137
+ const existing = baseIndexById.get(base);
138
+ if (existing === void 0 || index < existing)
139
+ baseIndexById.set(base, index);
128
140
  if (isRenderedSummaryMessage(message))
129
141
  summaryIndexById.set(message.id, index);
130
142
  });
131
- const anchors = inject ? collectSummaryAnchors(state, indexById, summaryIndexById) : [];
143
+ const anchors = inject ? collectSummaryAnchors(state, baseIndexById, summaryIndexById) : [];
132
144
  return stripOrphanedReasoning(
133
145
  stripOrphanedToolResults(
134
146
  stripOrphanedToolCalls(
135
- rebuildMessages(messages, covered, firstUserIndex, anchors)
147
+ rebuildMessages(messages, coveredBases, firstUserIndex, anchors)
136
148
  )
137
149
  )
138
150
  );
139
151
  }
140
- function collectSummaryAnchors(state, indexById, summaryIndexById) {
152
+ function collectSummaryAnchors(state, baseIndexById, summaryIndexById) {
141
153
  const anchors = [];
142
154
  for (const block of activeBlocks(state)) {
143
155
  const existingIndex = summaryIndexById.get(summaryMessageId(block.blockId));
@@ -152,7 +164,7 @@ function collectSummaryAnchors(state, indexById, summaryIndexById) {
152
164
  }
153
165
  let earliest = null;
154
166
  for (const id of block.effectiveMessageIds) {
155
- const index = indexById.get(id);
167
+ const index = baseIndexById.get(baseIdOf(id));
156
168
  if (index !== void 0 && (earliest === null || index < earliest)) {
157
169
  earliest = index;
158
170
  }
@@ -197,7 +209,7 @@ function pairSafeAnchorIndex(messages, index) {
197
209
  }
198
210
  return safe;
199
211
  }
200
- function rebuildMessages(messages, covered, firstUserIndex, anchors) {
212
+ function rebuildMessages(messages, coveredBases, firstUserIndex, anchors) {
201
213
  const safeAnchors = anchors.map((anchor) => ({
202
214
  ...anchor,
203
215
  insertAt: pairSafeAnchorIndex(messages, anchor.insertAt)
@@ -215,7 +227,7 @@ function rebuildMessages(messages, covered, firstUserIndex, anchors) {
215
227
  result.push(messages[index]);
216
228
  continue;
217
229
  }
218
- if (covered.has(messages[index].id)) continue;
230
+ if (isCovered(messages[index].id, coveredBases)) continue;
219
231
  if (isRenderedSummaryMessage(messages[index]) && anchoredSummaryIds.has(messages[index].id))
220
232
  continue;
221
233
  result.push(messages[index]);
@@ -281,6 +293,8 @@ function stripOrphanedReasoning(messages) {
281
293
  // src/sync.ts
282
294
  function syncBlocks(messages, state) {
283
295
  const presentIds = new Set(messages.map((message) => message.id));
296
+ const presentBases = /* @__PURE__ */ new Set();
297
+ for (const message of messages) presentBases.add(baseIdOf(message.id));
284
298
  const deactivated = [];
285
299
  const result = {
286
300
  blocks: state.blocks.map((block) => ({
@@ -330,7 +344,7 @@ function syncBlocks(messages, state) {
330
344
  continue;
331
345
  }
332
346
  block.active = true;
333
- const stillPresent = block.effectiveMessageIds.some((id) => presentIds.has(id)) || presentIds.has(summaryMessageId(block.blockId));
347
+ const stillPresent = block.effectiveMessageIds.some((id) => presentBases.has(baseIdOf(id))) || presentIds.has(summaryMessageId(block.blockId));
334
348
  if (!stillPresent) {
335
349
  block.active = false;
336
350
  deactivated.push(block.blockId);
@@ -1248,7 +1262,12 @@ function hasMediaPayload(msg) {
1248
1262
  if (m.rawOpenaiContent != null) return true;
1249
1263
  if (Array.isArray(m.rawOpenaiContentParts) && m.rawOpenaiContentParts.length > 0)
1250
1264
  return true;
1251
- if (isObjWith(m.rawAnthropicBlock, "type", "image")) return true;
1265
+ const ab = m.rawAnthropicBlock;
1266
+ if (isObjWith(ab, "type", "image")) return true;
1267
+ if (isObjWith(ab, "type", "tool_result")) {
1268
+ const content = ab.content;
1269
+ if (Array.isArray(content)) return content.some((p) => !isObjWith(p, "type", "text"));
1270
+ }
1252
1271
  const item = m.rawResponsesItem;
1253
1272
  if (isObjWith(item, "type", "input_image")) return true;
1254
1273
  if (item && typeof item === "object") {
@@ -1612,8 +1631,10 @@ function resolveBoundaries(input) {
1612
1631
  if (endAnchor.snapped) snappedBoundaries.push(endAnchor.snapped);
1613
1632
  let startIndex = startAnchor.index;
1614
1633
  let endIndex = endAnchor.index;
1634
+ let reversedNote;
1615
1635
  if (startIndex > endIndex) {
1616
1636
  [startIndex, endIndex] = [endIndex, startIndex];
1637
+ reversedNote = `note: refs were given reversed (${start.raw}\u2192${end.raw}), normalized to ${end.raw}..${start.raw}`;
1617
1638
  }
1618
1639
  const messageIds = [];
1619
1640
  for (let index = startIndex; index <= endIndex; index++) {
@@ -1640,7 +1661,8 @@ function resolveBoundaries(input) {
1640
1661
  nestedBlockIds,
1641
1662
  boundaryKind,
1642
1663
  protectedGaps,
1643
- snappedBoundaries
1664
+ snappedBoundaries,
1665
+ reversedNote
1644
1666
  };
1645
1667
  }
1646
1668
  function resolveAnchorIndex(boundary, state, indexByMessageId, endpoint) {
@@ -1665,6 +1687,27 @@ function resolveAnchorIndex(boundary, state, indexByMessageId, endpoint) {
1665
1687
  snapped: `${label}="${boundary.raw}" refers to a message already compressed into an active block \u2014 anchored to the active block covering it instead.`
1666
1688
  };
1667
1689
  }
1690
+ const paddedRef = formatPaddedRef(boundary.numericId);
1691
+ if (state.hiddenOrphanRefs?.includes(paddedRef)) {
1692
+ const neighbor = snapToNeighborVisible(
1693
+ state,
1694
+ indexByMessageId,
1695
+ boundary.numericId,
1696
+ endpoint
1697
+ );
1698
+ if (neighbor !== null) {
1699
+ const dir = endpoint === "start" ? "the next visible message after it" : "the previous visible message before it";
1700
+ return {
1701
+ index: neighbor,
1702
+ snapped: `${label}="${boundary.raw}" is a hidden orphan compress call (no matching block) \u2014 snapped to ${dir} instead.`
1703
+ };
1704
+ }
1705
+ throw new BoundaryNotFoundError(
1706
+ "consumed",
1707
+ endpoint,
1708
+ `${label}="${boundary.raw}" is a hidden orphan compress call with no adjacent visible message to anchor to \u2014 run acp_status for current refs.`
1709
+ );
1710
+ }
1668
1711
  throw new BoundaryNotFoundError(
1669
1712
  "consumed",
1670
1713
  endpoint,
@@ -1741,6 +1784,26 @@ function inheritedContentIds(state, block) {
1741
1784
  }
1742
1785
  return ids;
1743
1786
  }
1787
+ function snapToNeighborVisible(state, indexByMessageId, refNumber, endpoint) {
1788
+ let bestIndex = null;
1789
+ let bestRef = null;
1790
+ for (const [rawId, index] of indexByMessageId) {
1791
+ const refText = state.messageRefs.byRaw[rawId];
1792
+ if (!refText || refText === BLOCKED_REF) continue;
1793
+ const ref = refToIndex(refText);
1794
+ if (ref === null) continue;
1795
+ if (endpoint === "start") {
1796
+ if (ref > refNumber && (bestRef === null || ref < bestRef)) {
1797
+ bestRef = ref;
1798
+ bestIndex = index;
1799
+ }
1800
+ } else if (ref < refNumber && (bestRef === null || ref > bestRef)) {
1801
+ bestRef = ref;
1802
+ bestIndex = index;
1803
+ }
1804
+ }
1805
+ return bestIndex;
1806
+ }
1744
1807
  function formatPaddedRef(index) {
1745
1808
  return `m${String(index).padStart(5, "0")}`;
1746
1809
  }
@@ -1955,14 +2018,26 @@ function hideConsumedCompressCalls(state, messages) {
1955
2018
  }
1956
2019
  }
1957
2020
  let hidden = 0;
2021
+ const hiddenOrphanRefs = [];
2022
+ const rememberHiddenRef = (message) => {
2023
+ if (message.toolCallId && allBlockCallIds.has(message.toolCallId)) {
2024
+ return;
2025
+ }
2026
+ const ref = state.messageRefs.byRaw[message.id];
2027
+ if (ref && ref !== BLOCKED_REF && !hiddenOrphanRefs.includes(ref)) {
2028
+ hiddenOrphanRefs.push(ref);
2029
+ }
2030
+ };
1958
2031
  const result = [];
1959
2032
  for (const message of messages) {
1960
2033
  if (message.toolName === "compress" && message.contentType === "tool-call" && (!message.toolCallId || !keepCallIds.has(message.toolCallId))) {
1961
2034
  hidden++;
2035
+ rememberHiddenRef(message);
1962
2036
  continue;
1963
2037
  }
1964
2038
  if (message.contentType === "tool-result" && message.toolCallId && hiddenCallIds.has(message.toolCallId)) {
1965
2039
  hidden++;
2040
+ rememberHiddenRef(message);
1966
2041
  continue;
1967
2042
  }
1968
2043
  if (message.toolName === "compress" && message.contentType === "tool-call" && message.toolCallId && keepCallIds.has(message.toolCallId)) {
@@ -1982,7 +2057,7 @@ function hideConsumedCompressCalls(state, messages) {
1982
2057
  }
1983
2058
  result.push(message);
1984
2059
  }
1985
- return { messages: result, hidden };
2060
+ return { messages: result, hidden, hiddenOrphanRefs };
1986
2061
  }
1987
2062
 
1988
2063
  // src/absorb.ts
@@ -3740,6 +3815,11 @@ function createRenderRefsNode(strategy) {
3740
3815
  }
3741
3816
  var renderRefsNode = createRenderRefsNode("all");
3742
3817
 
3818
+ // src/message-kind.ts
3819
+ function isToolMessage(message) {
3820
+ return message.contentType === "tool-call" || message.contentType === "tool-result";
3821
+ }
3822
+
3743
3823
  // src/tool-pairs.ts
3744
3824
  function adjustBoundariesForToolPairs(startIndex, endIndex, messages, maxScan = 20) {
3745
3825
  const callIdsInRange = /* @__PURE__ */ new Set();
@@ -3944,9 +4024,6 @@ function computeIntegrityWithdrawals(messages, foldedIds) {
3944
4024
  function estimateTextTokens(text) {
3945
4025
  return Math.ceil(text.length / 4);
3946
4026
  }
3947
- function isToolMessage(message) {
3948
- return message.contentType === "tool-call" || message.contentType === "tool-result";
3949
- }
3950
4027
  function isSyntheticOrPruned(message, state) {
3951
4028
  if (message.text?.startsWith("[Compressed conversation section]")) return true;
3952
4029
  for (const block of state.blocks) {
@@ -4275,6 +4352,7 @@ function createCore(ports = {}) {
4275
4352
  let tokensCompressed = 0;
4276
4353
  const errors = [];
4277
4354
  const warnings = [];
4355
+ const notes = [];
4278
4356
  const protectedMessageIds = input.protectedMessageIds ?? computeProtectedRefs(
4279
4357
  input.messages,
4280
4358
  input.state,
@@ -4375,7 +4453,28 @@ function createCore(ports = {}) {
4375
4453
  const danglingRefs = consumedRanges.flatMap(
4376
4454
  (spec) => danglingMessageRefs(state, input.messages, spec)
4377
4455
  );
4378
- const gateMessage = resolvableCount === 0 && consumedRanges.length === 0 && unknownCount > 0 ? `None of the ${input.ranges.length} requested range(s) resolved \u2014 every ref is unknown to this session. Refs are per-session snapshots, assigned once when a message is first rendered; no compress reassigns them, so unknown refs cannot come from an earlier compress in this session. They come from a different generation: a previous session instance (switching model or upstream mid-conversation starts a fresh session whose refs restart at m00001), the generation before a native-compaction rebase (which also resets refs to m00001), or a typo. ${diagnostics} Run acp_status, then call the compress tool again using only the refs it reports.` : consumedRanges.length > 0 ? danglingRefs.length > 0 ? `Requested range(s) cannot be anchored (e.g. ${firstConsumed.startRef}..${firstConsumed.endRef}) \u2014 the refs exist in this session's ref map, but the messages they point to are no longer in the visible context and no active block covers them: the message content changed (or the message was filtered out of the view) and now carries a new ref, leaving your old refs dangling. ${diagnostics} Run acp_status, then call the compress tool again using only the refs it reports.` : `Requested range(s) already compressed (e.g. ${firstConsumed.startRef}..${firstConsumed.endRef}) \u2014 ${coverDetail}. Nothing new to compress in that window. ${diagnostics} Continue the task, or run acp_status and target one of the CURRENT compressible ranges it reports.${tierActionHint(input.config, state)}` : `Total compressible content too small (${totalRangeChars} chars across ${countedRanges} range(s), min ${input.config.compress.minCompressRange}). Combine more messages into your range(s) to meet the threshold.`;
4456
+ let gateMessage = resolvableCount === 0 && consumedRanges.length === 0 && unknownCount > 0 ? `None of the ${input.ranges.length} requested range(s) resolved \u2014 every ref is unknown to this session. Refs are per-session snapshots, assigned once when a message is first rendered; no compress reassigns them, so unknown refs cannot come from an earlier compress in this session. They come from a different generation: a previous session instance (switching model or upstream mid-conversation starts a fresh session whose refs restart at m00001), the generation before a native-compaction rebase (which also resets refs to m00001), or a typo. ${diagnostics} Run acp_status, then call the compress tool again using only the refs it reports.` : consumedRanges.length > 0 ? danglingRefs.length > 0 ? `Requested range(s) cannot be anchored (e.g. ${firstConsumed.startRef}..${firstConsumed.endRef}) \u2014 the refs exist in this session's ref map, but the messages they point to are no longer in the visible context and no active block covers them: the message content changed (or the message was filtered out of the view) and now carries a new ref, leaving your old refs dangling. ${diagnostics} Run acp_status, then call the compress tool again using only the refs it reports.` : `Requested range(s) already compressed (e.g. ${firstConsumed.startRef}..${firstConsumed.endRef}) \u2014 ${coverDetail}. Nothing new to compress in that window. ${diagnostics} Continue the task, or run acp_status and target one of the CURRENT compressible ranges it reports.${tierActionHint(input.config, state)}` : countedRanges > 0 ? `Total compressible content too small (${totalRangeChars} chars across ${countedRanges} range(s), min ${input.config.compress.minCompressRange}). Combine more messages into your range(s) to meet the threshold.` : null;
4457
+ if (gateMessage === null) {
4458
+ return {
4459
+ state: input.state,
4460
+ result: {
4461
+ blocksCreated: 0,
4462
+ tokensCompressed: 0,
4463
+ errors: [...classificationErrors],
4464
+ warnings: []
4465
+ }
4466
+ };
4467
+ }
4468
+ const reversalNotes = [];
4469
+ for (const [spec, resolution] of classifications) {
4470
+ if (resolution.status === "ok" && !skipSpecs.has(spec)) {
4471
+ const note = resolution.resolved.reversedNote;
4472
+ if (note) reversalNotes.push(note);
4473
+ }
4474
+ }
4475
+ if (reversalNotes.length > 0) {
4476
+ gateMessage += ` ${reversalNotes.join(" ")}`;
4477
+ }
4379
4478
  return {
4380
4479
  state: input.state,
4381
4480
  result: {
@@ -4402,6 +4501,8 @@ function createCore(ports = {}) {
4402
4501
  continue;
4403
4502
  }
4404
4503
  warnings.push(...resolution.resolved.snappedBoundaries);
4504
+ const note = resolution.resolved.reversedNote;
4505
+ if (note) notes.push(note);
4405
4506
  try {
4406
4507
  const outcome = applySingleRange({
4407
4508
  spec,
@@ -4435,7 +4536,13 @@ function createCore(ports = {}) {
4435
4536
  }
4436
4537
  return {
4437
4538
  state,
4438
- result: { blocksCreated, tokensCompressed, errors, warnings }
4539
+ result: {
4540
+ blocksCreated,
4541
+ tokensCompressed,
4542
+ errors,
4543
+ warnings,
4544
+ ...notes.length > 0 ? { notes } : {}
4545
+ }
4439
4546
  };
4440
4547
  }
4441
4548
  function processTurn(input) {
@@ -4619,7 +4726,11 @@ var hideCompressCallsNode = {
4619
4726
  name: "hide-compress-calls",
4620
4727
  run(io) {
4621
4728
  const hidden = hideConsumedCompressCalls(io.state, io.messages);
4622
- return { ...io, messages: hidden.messages };
4729
+ return {
4730
+ ...io,
4731
+ messages: hidden.messages,
4732
+ state: { ...io.state, hiddenOrphanRefs: hidden.hiddenOrphanRefs }
4733
+ };
4623
4734
  }
4624
4735
  };
4625
4736
  var recommendNode = {
@@ -5219,7 +5330,7 @@ function computeContextBreakdown(messages, total, growth, countTokens) {
5219
5330
  const tokens = countMessageTokens(msg, count);
5220
5331
  if (msg.text?.startsWith("[Compressed conversation section]")) {
5221
5332
  summaries += tokens;
5222
- } else if (msg.contentType === "tool-call" || msg.contentType === "tool-result") {
5333
+ } else if (isToolMessage(msg)) {
5223
5334
  tool += tokens;
5224
5335
  } else if (msg.role === "system") {
5225
5336
  system += tokens;
@@ -5251,7 +5362,8 @@ function cloneState(state) {
5251
5362
  nextRuleId: state.nextRuleId,
5252
5363
  terminalStreak: state.terminalStreak,
5253
5364
  nextBlockId: state.nextBlockId,
5254
- nextRunId: state.nextRunId
5365
+ nextRunId: state.nextRunId,
5366
+ hiddenOrphanRefs: state.hiddenOrphanRefs ? [...state.hiddenOrphanRefs] : void 0
5255
5367
  };
5256
5368
  }
5257
5369
  function scoreRelevance(block, terms) {
@@ -5686,14 +5798,16 @@ function tierLabel(block) {
5686
5798
  }
5687
5799
  function tierBreakdown(blocks, countTokens) {
5688
5800
  const tierTokens = {};
5801
+ const tierCounts = {};
5689
5802
  for (const block of blocks) {
5690
5803
  tierTokens[block.tier] = (tierTokens[block.tier] ?? 0) + summaryTokensOf(block, countTokens);
5804
+ tierCounts[block.tier] = (tierCounts[block.tier] ?? 0) + 1;
5691
5805
  }
5692
5806
  const tiers = Object.keys(tierTokens).map(Number);
5693
5807
  if (tiers.length <= 1) return null;
5694
5808
  const parts = [];
5695
5809
  for (const tier of [1, 2, 3]) {
5696
- if (tierTokens[tier]) parts.push(`T${tier}: ${formatTokens2(tierTokens[tier])}`);
5810
+ if (tierTokens[tier]) parts.push(`T${tier}: ${formatTokens2(tierTokens[tier])} (${tierCounts[tier]} blocks)`);
5697
5811
  }
5698
5812
  return parts.join(" | ");
5699
5813
  }
@@ -5719,8 +5833,9 @@ function collectVisible(messages, state, countTokens) {
5719
5833
  const ref = refForRaw(state.messageRefs, message.id);
5720
5834
  if (!ref) return;
5721
5835
  const tokens = countMessageTokens(message, countTokens);
5722
- const tool = isToolMessage(message) ? message.toolName ?? (message.toolCallId ? toolCallNames.get(message.toolCallId) : void 0) ?? "tool" : "text";
5723
- if (tokens > 0) visible.push({ ref, tokens, tool, index });
5836
+ const isTool = isToolMessage(message);
5837
+ const tool = isTool ? message.toolName ?? (message.toolCallId ? toolCallNames.get(message.toolCallId) : void 0) ?? "tool" : "text";
5838
+ if (tokens > 0) visible.push({ ref, tokens, tool, isTool, index });
5724
5839
  });
5725
5840
  return { visible, summaryTokens };
5726
5841
  }
@@ -5763,8 +5878,8 @@ function renderOverview(visible, summaryTokens, blocks, state, countTokens, limi
5763
5878
  toolTypeMap.set(message.tool, (toolTypeMap.get(message.tool) ?? 0) + message.tokens);
5764
5879
  }
5765
5880
  const topTool = [...toolTypeMap.entries()].sort((a, b) => b[1] - a[1])[0]?.[0];
5766
- const totalTool = visible.filter((m) => m.tool !== "text").reduce((sum, m) => sum + m.tokens, 0);
5767
- const totalText = visible.filter((m) => m.tool === "text").reduce((sum, m) => sum + m.tokens, 0);
5881
+ const totalTool = visible.filter((m) => m.isTool).reduce((sum, m) => sum + m.tokens, 0);
5882
+ const totalText = visible.filter((m) => !m.isTool).reduce((sum, m) => sum + m.tokens, 0);
5768
5883
  const total = summaryTokens + totalTool + totalText;
5769
5884
  lines.push("CONTEXT BREAKDOWN");
5770
5885
  lines.push(
@@ -5800,6 +5915,11 @@ function renderOverview(visible, summaryTokens, blocks, state, countTokens, limi
5800
5915
  ` ${block.blockId} (${tierLabel(block)}) ${formatTokens2(eff)}\u2192${formatTokens2(summaryTokensOf(block, countTokens))} ${block.effectiveMessageIds.length} msgs "${topic}"`
5801
5916
  );
5802
5917
  }
5918
+ if (blocks.length > limit) {
5919
+ lines.push(
5920
+ ` ... and ${blocks.length - limit} more blocks not shown (scope:"compressed", limit:${blocks.length} for full list)`
5921
+ );
5922
+ }
5803
5923
  }
5804
5924
  lines.push("");
5805
5925
  lines.push(
@@ -7482,7 +7602,11 @@ function build(text) {
7482
7602
  }
7483
7603
  function docFeatures(text) {
7484
7604
  const hit = cache.get(text);
7485
- if (hit) return hit;
7605
+ if (hit) {
7606
+ cache.delete(text);
7607
+ cache.set(text, hit);
7608
+ return hit;
7609
+ }
7486
7610
  const f = build(text);
7487
7611
  if (text.length > 0 && text.length <= capChars) {
7488
7612
  while (cachedChars + text.length > capChars && cache.size > 0) {
@@ -7593,8 +7717,8 @@ var hybridAlgorithm = {
7593
7717
  score(docs, query) {
7594
7718
  const bm = bm25Algorithm.score(docs, query);
7595
7719
  const fz = fuzzyAlgorithm.score(docs, query);
7596
- const maxBm = Math.max(...bm.map((r) => r.score), 1e-9);
7597
- const maxFz = Math.max(...fz.map((r) => r.score), 1e-9);
7720
+ const maxBm = bm.reduce((m, r) => r.score > m ? r.score : m, 1e-9);
7721
+ const maxFz = fz.reduce((m, r) => r.score > m ? r.score : m, 1e-9);
7598
7722
  const bmMap = new Map(bm.map((r) => [r.ref, r.score / maxBm]));
7599
7723
  const fzMap = new Map(fz.map((r) => [r.ref, r.score / maxFz]));
7600
7724
  return docs.map((d) => ({
@@ -7958,6 +8082,7 @@ export {
7958
8082
  applySectionOverrides,
7959
8083
  applySteeringToPrompt,
7960
8084
  assignRefs,
8085
+ baseIdOf,
7961
8086
  blockById,
7962
8087
  blockDocs,
7963
8088
  blockVisibleInRange,
@@ -8034,6 +8159,7 @@ export {
8034
8159
  imageShrinksForRef,
8035
8160
  indexToRef,
8036
8161
  isAbsorbCandidate,
8162
+ isCovered,
8037
8163
  isImageFullRestored,
8038
8164
  isMessageLatestProtected,
8039
8165
  isMessageProtected,
@@ -8041,6 +8167,7 @@ export {
8041
8167
  isRetrievedMessage,
8042
8168
  isStoredPlaceholderText,
8043
8169
  isSummaryMessageId,
8170
+ isToolMessage,
8044
8171
  isValidPackName,
8045
8172
  jsonFoldPlugin,
8046
8173
  leanPack,