acp-kernel 0.0.82-pr.359.225 → 0.0.82-pr.361.226

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 (77) hide show
  1. package/DESIGN.md +142 -121
  2. package/PROVENANCE.md +44 -40
  3. package/README.md +33 -54
  4. package/dist/cache-report.d.ts.map +1 -1
  5. package/dist/{chunk-VPRKYTHW.js → chunk-KDAPF6RH.js} +7 -3
  6. package/dist/chunk-KDAPF6RH.js.map +1 -0
  7. package/dist/compress-tools.d.ts.map +1 -1
  8. package/dist/compress.d.ts.map +1 -1
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/decompress.d.ts.map +1 -1
  11. package/dist/filter/apply.d.ts.map +1 -1
  12. package/dist/filter/index.d.ts +1 -1
  13. package/dist/filter/index.d.ts.map +1 -1
  14. package/dist/filter/types.d.ts.map +1 -1
  15. package/dist/handoff.d.ts.map +1 -1
  16. package/dist/hide-consumed.d.ts.map +1 -1
  17. package/dist/index.d.ts +0 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +221 -1447
  20. package/dist/index.js.map +1 -1
  21. package/dist/nudge-text.d.ts.map +1 -1
  22. package/dist/packs.d.ts.map +1 -1
  23. package/dist/panel/cache.d.ts.map +1 -1
  24. package/dist/panel/index.js +29 -10
  25. package/dist/panel/index.js.map +1 -1
  26. package/dist/panel/panel.d.ts.map +1 -1
  27. package/dist/panel/topic.d.ts.map +1 -1
  28. package/dist/parse-compress-input.d.ts.map +1 -1
  29. package/dist/persist/index.d.ts +1 -1
  30. package/dist/persist/index.d.ts.map +1 -1
  31. package/dist/persist/index.js +47 -11
  32. package/dist/persist/index.js.map +1 -1
  33. package/dist/persist/state-merge.d.ts.map +1 -1
  34. package/dist/persist/store.d.ts.map +1 -1
  35. package/dist/protected.d.ts.map +1 -1
  36. package/dist/rebuild.d.ts.map +1 -1
  37. package/dist/recommend.d.ts.map +1 -1
  38. package/dist/render-refs.d.ts.map +1 -1
  39. package/dist/report.d.ts.map +1 -1
  40. package/dist/search/algorithms/bm25.d.ts.map +1 -1
  41. package/dist/search/algorithms/fuzzy.d.ts.map +1 -1
  42. package/dist/search/algorithms/hybrid.d.ts.map +1 -1
  43. package/dist/search/algorithms/semantic.d.ts.map +1 -1
  44. package/dist/search/algorithms/substring.d.ts.map +1 -1
  45. package/dist/search/doc-cache.d.ts.map +1 -1
  46. package/dist/search/index.d.ts +1 -1
  47. package/dist/search/index.d.ts.map +1 -1
  48. package/dist/search/registry.d.ts.map +1 -1
  49. package/dist/search/stemmer.d.ts.map +1 -1
  50. package/dist/search/tokenizer.d.ts.map +1 -1
  51. package/dist/search/types.d.ts.map +1 -1
  52. package/dist/search.d.ts +3 -3
  53. package/dist/search.d.ts.map +1 -1
  54. package/dist/surface-config.d.ts.map +1 -1
  55. package/dist/tool-pairs.d.ts.map +1 -1
  56. package/dist/truncate-tools.d.ts.map +1 -1
  57. package/dist/truncate.d.ts.map +1 -1
  58. package/dist/turn-integrity.d.ts.map +1 -1
  59. package/dist/types.d.ts +0 -17
  60. package/dist/types.d.ts.map +1 -1
  61. package/dist/wire/anthropic.d.ts.map +1 -1
  62. package/dist/wire/bili-message.d.ts.map +1 -1
  63. package/dist/wire/compress-detect.d.ts.map +1 -1
  64. package/dist/wire/demoted-thinking.d.ts.map +1 -1
  65. package/dist/wire/formats.d.ts.map +1 -1
  66. package/dist/wire/index.js +403 -97
  67. package/dist/wire/index.js.map +1 -1
  68. package/dist/wire/message-id.d.ts.map +1 -1
  69. package/dist/wire/mirror.d.ts.map +1 -1
  70. package/dist/wire/openai.d.ts.map +1 -1
  71. package/dist/wire/responses.d.ts.map +1 -1
  72. package/dist/wire/strip-images.d.ts.map +1 -1
  73. package/dist/wire/util.d.ts.map +1 -1
  74. package/package.json +66 -66
  75. package/dist/chunk-VPRKYTHW.js.map +0 -1
  76. package/dist/crush.d.ts +0 -142
  77. package/dist/crush.d.ts.map +0 -1
package/DESIGN.md CHANGED
@@ -9,7 +9,7 @@ Framework-agnostic, model-driven context-compression engine. This document is th
9
9
  ACP-style compression is **not** like zip in one essential way: **the model writes the summaries; this library orchestrates everything around them.**
10
10
 
11
11
  - **zip**: computes the compressed output itself (`bytes → bytes`).
12
- - **acp-kernel**: the *summary text* is produced externally (by an LLM) and passed in as an argument. The core decides *when* to compress, *what range* to compress, tracks *state*, applies a compress *decision*, prunes ranges, and supports decompress/search. **It never calls a model.**
12
+ - **acp-kernel**: the _summary text_ is produced externally (by an LLM) and passed in as an argument. The core decides _when_ to compress, _what range_ to compress, tracks _state_, applies a compress _decision_, prunes ranges, and supports decompress/search. **It never calls a model.**
13
13
 
14
14
  This is precisely why the core can be a pure library: the one external dependency (the summarizer) is reduced to a string input.
15
15
 
@@ -48,60 +48,60 @@ Portable, host-agnostic. Adapters translate host-native messages into `CoreMessa
48
48
 
49
49
  ```ts
50
50
  type CoreMessage = {
51
- id: string;
52
- role: "user" | "assistant" | "system" | "tool";
53
- contentType: "text" | "tool-call" | "tool-result" | "reasoning";
54
- text?: string;
55
- toolName?: string; // for protected-tool filtering
56
- toolCallId?: string; // links tool-call ↔ tool-result
51
+ id: string;
52
+ role: "user" | "assistant" | "system" | "tool";
53
+ contentType: "text" | "tool-call" | "tool-result" | "reasoning";
54
+ text?: string;
55
+ toolName?: string; // for protected-tool filtering
56
+ toolCallId?: string; // links tool-call ↔ tool-result
57
57
  };
58
58
 
59
59
  type CompressionBlock = {
60
- blockId: string; // "b0", "b1", ...
61
- runId: string;
62
- tier: 1 | 2 | 3;
63
- topic?: string;
64
- summary: string; // produced by the model
65
- directMessageIds: string[];
66
- effectiveMessageIds: string[];
67
- directBlockIds: string[]; // nested blocks consumed
68
- createdAt: number;
69
- survivedCount: number;
70
- generation: "young" | "old";
71
- active: boolean;
60
+ blockId: string; // "b0", "b1", ...
61
+ runId: string;
62
+ tier: 1 | 2 | 3;
63
+ topic?: string;
64
+ summary: string; // produced by the model
65
+ directMessageIds: string[];
66
+ effectiveMessageIds: string[];
67
+ directBlockIds: string[]; // nested blocks consumed
68
+ createdAt: number;
69
+ survivedCount: number;
70
+ generation: "young" | "old";
71
+ active: boolean;
72
72
  };
73
73
 
74
74
  type CompressionState = {
75
- blocks: CompressionBlock[];
76
- messageRefs: { byRaw: Record<string, string>; byRef: Record<string, string> }; // raw ↔ mNNNNN
77
- nudge: {
78
- lastPerMessageNudgeTokens: number;
79
- lastNudgeShownTokens: number;
80
- baselineTokens: number;
81
- anchors: Record<string, unknown>;
82
- };
83
- stats: { tokensCompressed: number; compressionCount: number };
84
- nextBlockId: number;
85
- nextRunId: number;
75
+ blocks: CompressionBlock[];
76
+ messageRefs: { byRaw: Record<string, string>; byRef: Record<string, string> }; // raw ↔ mNNNNN
77
+ nudge: {
78
+ lastPerMessageNudgeTokens: number;
79
+ lastNudgeShownTokens: number;
80
+ baselineTokens: number;
81
+ anchors: Record<string, unknown>;
82
+ };
83
+ stats: { tokensCompressed: number; compressionCount: number };
84
+ nextBlockId: number;
85
+ nextRunId: number;
86
86
  };
87
87
 
88
88
  type Config = {
89
- tiers: { enabled: boolean; tier2Trigger: number; tier3Trigger: number };
90
- nudge: {
91
- maxContextLimitPct: number; // e.g. 0.55 (currently advisory; threshold gate uses minContextLimitPct)
92
- minContextLimitPct: number; // e.g. 0.45 — nudge threshold gate
93
- frequency: number; // advisory (reserved for future turn-frequency gating)
94
- iterationThreshold: number; // advisory (reserved for future iteration gating)
95
- force: "soft" | "strong";
96
- };
97
- // young→old promotion after N survivals (drives the merge-blocks node).
98
- // NOTE: there is no GC — no age-based deactivation, no summary truncation.
99
- promotionThreshold: number;
100
- truncate: { threshold: number }; // emergency tool-output truncation node (LAST safety valve); 1.0 = 100%
101
- merge: { maxSummaryLength: number; minOldGenBlocks: number }; // batch-merge old-gen blocks into one summary
102
- protectedTools: string[];
103
- preserveRecentMessages: number;
104
- modelContextLimit: number;
89
+ tiers: { enabled: boolean; tier2Trigger: number; tier3Trigger: number };
90
+ nudge: {
91
+ maxContextLimitPct: number; // e.g. 0.55 (currently advisory; threshold gate uses minContextLimitPct)
92
+ minContextLimitPct: number; // e.g. 0.45 — nudge threshold gate
93
+ frequency: number; // advisory (reserved for future turn-frequency gating)
94
+ iterationThreshold: number; // advisory (reserved for future iteration gating)
95
+ force: "soft" | "strong";
96
+ };
97
+ // young→old promotion after N survivals (drives the merge-blocks node).
98
+ // NOTE: there is no GC — no age-based deactivation, no summary truncation.
99
+ promotionThreshold: number;
100
+ truncate: { threshold: number }; // emergency tool-output truncation node (LAST safety valve); 1.0 = 100%
101
+ merge: { maxSummaryLength: number; minOldGenBlocks: number }; // batch-merge old-gen blocks into one summary
102
+ protectedTools: string[];
103
+ preserveRecentMessages: number;
104
+ modelContextLimit: number;
105
105
  };
106
106
  ```
107
107
 
@@ -111,67 +111,88 @@ type Config = {
111
111
 
112
112
  ```ts
113
113
  interface CompressionCore {
114
- // Per-turn node pipeline (replaces the message-transform hook's algorithm part).
115
- // Runs every turn (canonical order): assign-refs → sync-blocks → merge-blocks →
116
- // prune → filter → hide-compress-calls → nudge-inject → emergency-truncate →
117
- // render-refs. Survives/promotes blocks via advanceSurvival (no age-based
118
- // deactivation). Returns transformed messages + updated state + nudge decision.
119
- processTurn(input: {
120
- messages: CoreMessage[];
121
- state: CompressionState;
122
- config: Config;
123
- tokenCount: number;
124
- }): {
125
- messages: CoreMessage[];
126
- state: CompressionState;
127
- nudge?: NudgeDecision;
114
+ // Per-turn node pipeline (replaces the message-transform hook's algorithm part).
115
+ // Runs every turn (canonical order): assign-refs → sync-blocks → merge-blocks →
116
+ // prune → filter → hide-compress-calls → nudge-inject → emergency-truncate →
117
+ // render-refs. Survives/promotes blocks via advanceSurvival (no age-based
118
+ // deactivation). Returns transformed messages + updated state + nudge decision.
119
+ processTurn(input: {
120
+ messages: CoreMessage[];
121
+ state: CompressionState;
122
+ config: Config;
123
+ tokenCount: number;
124
+ }): {
125
+ messages: CoreMessage[];
126
+ state: CompressionState;
127
+ nudge?: NudgeDecision;
128
+ };
129
+
130
+ // When the model calls compress. `ranges[].summary` is model-produced text.
131
+ // Allocates block(s), deactivates consumed blocks, updates indices, resets the
132
+ // nudge growth baseline on success (§5.7 feedback-loop fix).
133
+ applyCompression(input: {
134
+ ranges: {
135
+ startRef: string;
136
+ endRef: string;
137
+ summary: string;
138
+ topic?: string;
139
+ }[];
140
+ messages: CoreMessage[];
141
+ state: CompressionState;
142
+ config: Config;
143
+ }): {
144
+ state: CompressionState;
145
+ result: {
146
+ blocksCreated: number;
147
+ tokensCompressed: number;
148
+ errors: string[];
128
149
  };
129
-
130
- // When the model calls compress. `ranges[].summary` is model-produced text.
131
- // Allocates block(s), deactivates consumed blocks, updates indices, resets the
132
- // nudge growth baseline on success (§5.7 feedback-loop fix).
133
- applyCompression(input: {
134
- ranges: { startRef: string; endRef: string; summary: string; topic?: string }[];
135
- messages: CoreMessage[];
136
- state: CompressionState;
137
- config: Config;
138
- }): {
139
- state: CompressionState;
140
- result: { blocksCreated: number; tokensCompressed: number; errors: string[] };
141
- };
142
-
143
- resolveBoundaries(input: {
144
- startRef: string;
145
- endRef: string;
146
- messages: CoreMessage[];
147
- state: CompressionState;
148
- }): { startIndex: number; endIndex: number; protectedGaps: number[] };
149
- // protectedGaps is reserved (currently always []); protected-tool hard-exclusion
150
- // is intentionally NOT implemented in the core — see README "Known limitation".
151
-
152
- decompress(blockId: string, state: CompressionState): CompressionBlock | undefined;
153
-
154
- search(query: string, state: CompressionState): CompressionBlock[];
155
-
156
- status(state: CompressionState, tokenCount: number, config: Config): StatusReport;
157
-
158
- // No gc(): age-based deactivation was removed (it caused memory-loss upstream).
159
- // Block promotion (young→old) still happens via advanceSurvival in sync-blocks,
160
- // and old-gen blocks are batch-merged by the merge-blocks node — not dropped.
150
+ };
151
+
152
+ resolveBoundaries(input: {
153
+ startRef: string;
154
+ endRef: string;
155
+ messages: CoreMessage[];
156
+ state: CompressionState;
157
+ }): { startIndex: number; endIndex: number; protectedGaps: number[] };
158
+ // protectedGaps is reserved (currently always []); protected-tool hard-exclusion
159
+ // is intentionally NOT implemented in the core — see README "Known limitation".
160
+
161
+ decompress(
162
+ blockId: string,
163
+ state: CompressionState,
164
+ ): CompressionBlock | undefined;
165
+
166
+ search(query: string, state: CompressionState): CompressionBlock[];
167
+
168
+ status(
169
+ state: CompressionState,
170
+ tokenCount: number,
171
+ config: Config,
172
+ ): StatusReport;
173
+
174
+ // No gc(): age-based deactivation was removed (it caused memory-loss upstream).
175
+ // Block promotion (young→old) still happens via advanceSurvival in sync-blocks,
176
+ // and old-gen blocks are batch-merged by the merge-blocks node — not dropped.
161
177
  }
162
178
 
163
179
  type CompressCall = {
164
- mode: "range" | "message";
165
- ranges: { startRef: string; endRef: string; summary: string; topic?: string }[];
180
+ mode: "range" | "message";
181
+ ranges: {
182
+ startRef: string;
183
+ endRef: string;
184
+ summary: string;
185
+ topic?: string;
186
+ }[];
166
187
  };
167
188
 
168
189
  type NudgeDecision = {
169
- shouldInject: boolean;
170
- reason: string;
171
- compressibleRanges: { startRef: string; endRef: string; tokens: number }[];
172
- contextUsage: number; // 0..1
173
- tier: 1 | 2 | 3 | null; // multi-tier trigger, if any
174
- breakdown: Record<string, number>;
190
+ shouldInject: boolean;
191
+ reason: string;
192
+ compressibleRanges: { startRef: string; endRef: string; tokens: number }[];
193
+ contextUsage: number; // 0..1
194
+ tier: 1 | 2 | 3 | null; // multi-tier trigger, if any
195
+ breakdown: Record<string, number>;
175
196
  };
176
197
  ```
177
198
 
@@ -183,9 +204,9 @@ The core needs two capabilities from the host, both injected (the core never imp
183
204
 
184
205
  ```ts
185
206
  interface Ports {
186
- countTokens(text: string): number; // default impl ships in core
187
- // messages are PASSED IN to each call (never fetched) → no MessageStore port
188
- // state persistence is the host's job (state is plain data) → no storage port
207
+ countTokens(text: string): number; // default impl ships in core
208
+ // messages are PASSED IN to each call (never fetched) → no MessageStore port
209
+ // state persistence is the host's job (state is plain data) → no storage port
189
210
  }
190
211
  ```
191
212
 
@@ -195,27 +216,27 @@ A default `countTokens` ships with the core (word-level + unicode CJK tokenizer,
195
216
 
196
217
  ## 6. Concept Mapping (nothing is lost)
197
218
 
198
- | ACP concept | Destination in acp-kernel |
199
- |---|---|
200
- | message-id ↔ ref mapping | **core** `processTurn` (pure) |
201
- | prune (range → summary block) | **core** `processTurn` (pure) |
202
- | boundary resolution / search | **core** `resolveBoundaries` (pure) |
203
- | block allocation / state mutation / tiers | **core** `applyCompression` (pure) |
219
+ | ACP concept | Destination in acp-kernel |
220
+ | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
221
+ | message-id ↔ ref mapping | **core** `processTurn` (pure) |
222
+ | prune (range → summary block) | **core** `processTurn` (pure) |
223
+ | boundary resolution / search | **core** `resolveBoundaries` (pure) |
224
+ | block allocation / state mutation / tiers | **core** `applyCompression` (pure) |
204
225
  | compress **argument parsing** (lenient: fences, trailing commas, truncated-array salvage; field-name variants) | **core** `parseCompressArgs` (pure; diagnostics are data — adapters emit them) |
205
- | young→old promotion / batch merge | **core** `sync-blocks` node (`advanceSurvival`) + `merge-blocks` node (pure) |
206
- | emergency truncation (context near full) | **core** `emergency-truncate` node — the LAST safety valve; no age-based GC |
207
- | protected-tools filtering logic | **core** (pure: message + config → bool) |
208
- | `inject` **decision** (shouldNudge / growth / threshold) | **core** `decideNudge` (pure) |
209
- | `inject` **text rendering** (nudge → message string) | **adapter** (host message format) |
210
- | prompts (system / nudge text templates) | rules as **structured data** in core; text rendering in **adapter** |
211
- | compress/decompress/search/status **tool registration** | **adapter** (calls core pure fns) |
212
- | `/acp` commands | **adapter** |
213
- | opencode hooks | **OpenCode adapter** |
214
- | config three-layer merge | **adapter** (core only consumes its own `Config`) |
215
- | logger / auth / persistence / update | **adapter** (core does zero I/O) |
226
+ | young→old promotion / batch merge | **core** `sync-blocks` node (`advanceSurvival`) + `merge-blocks` node (pure) |
227
+ | emergency truncation (context near full) | **core** `emergency-truncate` node — the LAST safety valve; no age-based GC |
228
+ | protected-tools filtering logic | **core** (pure: message + config → bool) |
229
+ | `inject` **decision** (shouldNudge / growth / threshold) | **core** `decideNudge` (pure) |
230
+ | `inject` **text rendering** (nudge → message string) | **adapter** (host message format) |
231
+ | prompts (system / nudge text templates) | rules as **structured data** in core; text rendering in **adapter** |
232
+ | compress/decompress/search/status **tool registration** | **adapter** (calls core pure fns) |
233
+ | `/acp` commands | **adapter** |
234
+ | opencode hooks | **OpenCode adapter** |
235
+ | config three-layer merge | **adapter** (core only consumes its own `Config`) |
236
+ | logger / auth / persistence / update | **adapter** (core does zero I/O) |
216
237
 
217
238
  ---
218
239
 
219
240
  ## 7. Why the algorithm, but not the DCP-derived code, comes here
220
241
 
221
- 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).
242
+ 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).
package/PROVENANCE.md CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  This document classifies **every** source file in `opencode-acp/lib/` (the donor) into one of three buckets, to determine what can be carried into the MIT `acp-kernel` and what must be reimplemented in fresh expression.
4
4
 
5
- **Method**: exact path comparison of `opencode-acp` (the ACP fork, 82 `lib/*.ts` files) against the upstream DCP repository (66 `lib/*.ts` files). A file that has **no DCP equivalent** is original work (bucket A). A file with a **DCP equivalent at the same path** is a DCP derivative — its *expression* is AGPL-bound regardless of how much it was later changed (derivation is judged by whether a file was created by transforming the original, not by % changed; per copyright law expression is protected, not ideas/methods/algorithms).
5
+ **Method**: exact path comparison of `opencode-acp` (the ACP fork, 82 `lib/*.ts` files) against the upstream DCP repository (66 `lib/*.ts` files). A file that has **no DCP equivalent** is original work (bucket A). A file with a **DCP equivalent at the same path** is a DCP derivative — its _expression_ is AGPL-bound regardless of how much it was later changed (derivation is judged by whether a file was created by transforming the original, not by % changed; per copyright law expression is protected, not ideas/methods/algorithms).
6
6
 
7
7
  ---
8
8
 
9
9
  ## Legend
10
10
 
11
- | Bucket | Meaning | Action in acp-kernel |
12
- |---|---|---|
13
- | **A** | No DCP equivalent → original work of ranxianglei | **Bring verbatim** (the author's own code, MIT-safe). License header rewritten to MIT. |
14
- | **B** | DCP-derived file (same path exists upstream) → derivative expression is AGPL | **Reimplement in fresh expression** using the author's algorithm; do NOT copy/refactor the file's code. |
15
- | **N/A** | Adapter-only (framework-specific: opencode hooks, I/O, auth, commands, UI) | **Excluded** from the pure core. Stays in host adapters. Origin irrelevant. |
11
+ | Bucket | Meaning | Action in acp-kernel |
12
+ | ------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
13
+ | **A** | No DCP equivalent → original work of ranxianglei | **Bring verbatim** (the author's own code, MIT-safe). License header rewritten to MIT. |
14
+ | **B** | DCP-derived file (same path exists upstream) → derivative expression is AGPL | **Reimplement in fresh expression** using the author's algorithm; do NOT copy/refactor the file's code. |
15
+ | **N/A** | Adapter-only (framework-specific: opencode hooks, I/O, auth, commands, UI) | **Excluded** from the pure core. Stays in host adapters. Origin irrelevant. |
16
16
 
17
17
  ---
18
18
 
@@ -21,26 +21,28 @@ This document classifies **every** source file in `opencode-acp/lib/` (the donor
21
21
  Quality gate intentionally omitted from acp-kernel (may be added later if needed).
22
22
 
23
23
  ### `compress/`
24
- | File | Notes |
25
- |---|---|
26
- | `compress/decompress.ts` | ACP-original (v1.11+); DCP has no decompress |
27
- | `compress/decompress-logic.ts` | ACP-original |
28
- | `compress/hide-consumed.ts` | ACP-original (v1.14+) |
29
- | `compress/hide-failed.ts` | ACP-original |
30
- | `compress/keep-markers.ts` | ACP-original (v1.12+) |
31
- | `compress/parts.ts` | ACP-original |
32
- | `compress/recap.ts` | ACP-original (v1.12.1) |
33
- | `compress/status.ts` | ACP-original (v1.11+) |
24
+
25
+ | File | Notes |
26
+ | ------------------------------ | -------------------------------------------- |
27
+ | `compress/decompress.ts` | ACP-original (v1.11+); DCP has no decompress |
28
+ | `compress/decompress-logic.ts` | ACP-original |
29
+ | `compress/hide-consumed.ts` | ACP-original (v1.14+) |
30
+ | `compress/hide-failed.ts` | ACP-original |
31
+ | `compress/keep-markers.ts` | ACP-original (v1.12+) |
32
+ | `compress/parts.ts` | ACP-original |
33
+ | `compress/recap.ts` | ACP-original (v1.12.1) |
34
+ | `compress/status.ts` | ACP-original (v1.11+) |
34
35
 
35
36
  ### other
36
- | File | Notes |
37
- |---|---|
38
- | `config-validation.ts` | ACP-extracted for testability; no DCP equivalent |
39
- | `gc/merge.ts` | ACP-original (DCP has no `gc/` dir) |
40
- | `messages/truncate-tools.ts` | ACP-original (v1.14.5, replaced DCP's `gc/truncate.ts`) |
41
- | `messages/filter/*` (9 files) | ACP-original filtering subsystem |
37
+
38
+ | File | Notes |
39
+ | ------------------------------------ | --------------------------------------------------------------- |
40
+ | `config-validation.ts` | ACP-extracted for testability; no DCP equivalent |
41
+ | `gc/merge.ts` | ACP-original (DCP has no `gc/` dir) |
42
+ | `messages/truncate-tools.ts` | ACP-original (v1.14.5, replaced DCP's `gc/truncate.ts`) |
43
+ | `messages/filter/*` (9 files) | ACP-original filtering subsystem |
42
44
  | `messages/inject/policy/*` (3 files) | ACP-original (v1.13.1) — inject **policy** logic, not rendering |
43
- | `state/rebuild.ts` | ACP-original (v1.11+) |
45
+ | `state/rebuild.ts` | ACP-original (v1.11+) |
44
46
 
45
47
  ---
46
48
 
@@ -49,22 +51,25 @@ Quality gate intentionally omitted from acp-kernel (may be added later if needed
49
51
  Only the **algorithmic** subset is reimplemented into the pure core; the rest are adapter-only (persistence, config-merge, prompts-rendering) and excluded from the core. Listed by what they become.
50
52
 
51
53
  ### Reimplemented into acp-kernel (fresh expression, ~9 substantial files)
52
- | DCP-derived file | Becomes | What to reimplement |
53
- |---|---|---|
54
- | `compress/range.ts` | `core/applyCompression` (range mode) | block allocation, nested-block handling, boundary resolution |
55
- | `compress/search.ts` | `core/resolveBoundaries` | ref→index mapping, reversed-boundary swap, protected-gap detection |
56
- | `compress/state.ts` | `core/state` (mutation) | block id/run allocation, deactivation, byMessageId index |
57
- | `compress/pipeline.ts` | `core/processTurn` prep/finalize | permission (host-side), fetch (host-side), state wrap |
58
- | `messages/prune.ts` | `core/prune` | replace compressed ranges with summary blocks |
59
- | `messages/sync.ts` | `core/sync` | deactivate orphaned blocks when messages deleted |
60
- | `message-ids.ts` | `core/refs` | raw↔mNNNNN bidirectional map |
61
- | `messages/inject/inject.ts` + `inject/utils.ts` | `core/decideNudge` | **decision only** — shouldNudge, growth baseline, threshold, compressible ranges |
62
- | `config.ts` (core subset) | `core/Config` defaults | defaults + validation (use A-class `config-validation.ts`) |
54
+
55
+ | DCP-derived file | Becomes | What to reimplement |
56
+ | ----------------------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- |
57
+ | `compress/range.ts` | `core/applyCompression` (range mode) | block allocation, nested-block handling, boundary resolution |
58
+ | `compress/search.ts` | `core/resolveBoundaries` | ref→index mapping, reversed-boundary swap, protected-gap detection |
59
+ | `compress/state.ts` | `core/state` (mutation) | block id/run allocation, deactivation, byMessageId index |
60
+ | `compress/pipeline.ts` | `core/processTurn` prep/finalize | permission (host-side), fetch (host-side), state wrap |
61
+ | `messages/prune.ts` | `core/prune` | replace compressed ranges with summary blocks |
62
+ | `messages/sync.ts` | `core/sync` | deactivate orphaned blocks when messages deleted |
63
+ | `message-ids.ts` | `core/refs` | raw↔mNNNNN bidirectional map |
64
+ | `messages/inject/inject.ts` + `inject/utils.ts` | `core/decideNudge` | **decision only** — shouldNudge, growth baseline, threshold, compressible ranges |
65
+ | `config.ts` (core subset) | `core/Config` defaults | defaults + validation (use A-class `config-validation.ts`) |
63
66
 
64
67
  ### Supporting types/barrels (trivial, write fresh)
68
+
65
69
  `compress/{index,types,timing,range-utils}.ts`, `messages/{index,priority,query,reasoning-strip,shape,utils}.ts`, `state/{index,types,utils}.ts`, `token-utils.ts` (wrap `cc-alg` tokenizer), `protected-patterns.ts`, `compress/protected-content.ts`.
66
70
 
67
71
  ### Excluded from core (adapter-only despite B lineage)
72
+
68
73
  `state/persistence.ts` (filesystem I/O), `prompts/*` (text rendering → adapter), `compress-permission.ts` (permission = host concern).
69
74
 
70
75
  ---
@@ -79,14 +84,13 @@ All framework-specific; irrelevant to the pure core. Stay in the OpenCode adapte
79
84
 
80
85
  ## Summary
81
86
 
82
- | Bucket | Files | Disposition |
83
- |---|---|---|
84
- | **B** DCP-derived | 40 | ~9 substantial algorithms reimplemented fresh + ~12 types/barrels rewritten fresh; rest excluded (adapter) |
85
- | **N/A** adapter | 12 | excluded from core |
86
-
87
+ | Bucket | Files | Disposition |
88
+ | ----------------- | ----- | ---------------------------------------------------------------------------------------------------------- |
89
+ | **B** DCP-derived | 40 | ~9 substantial algorithms reimplemented fresh + ~12 types/barrels rewritten fresh; rest excluded (adapter) |
90
+ | **N/A** adapter | 12 | excluded from core |
87
91
 
88
92
  ---
89
93
 
90
94
  ## Compliance note
91
95
 
92
- This audit exists to ensure acp-kernel is **genuinely MIT**, not "MIT-labeled but AGPL-tainted." The rule applied throughout: an idea/algorithm is free regardless of source; a *file's code expression* is bound to the license of the file it descends from. A-class files descend from no DCP file. B-class files' code is NOT carried — the algorithms are reimplemented in new expression. Should any contributor question a classification, the comparison data above (and the upstream DCP tree) allow independent verification.
96
+ This audit exists to ensure acp-kernel is **genuinely MIT**, not "MIT-labeled but AGPL-tainted." The rule applied throughout: an idea/algorithm is free regardless of source; a _file's code expression_ is bound to the license of the file it descends from. A-class files descend from no DCP file. B-class files' code is NOT carried — the algorithms are reimplemented in new expression. Should any contributor question a classification, the comparison data above (and the upstream DCP tree) allow independent verification.
package/README.md CHANGED
@@ -6,7 +6,7 @@ Framework-agnostic, model-driven context-compression engine. Pure TypeScript cor
6
6
 
7
7
  `acp-kernel` is a **host-agnostic, model-driven context-compression engine**: 3-tier LSM-tree context compression, growth-based nudge policy, protected-content filtering. Its compression algorithms and pipeline architecture (`PipelineNode` / `processTurn` / `CompressionCore`) are **original work by the ACP authors** — an independent reimplementation, not a port of any existing codebase.
8
8
 
9
- The key design principle: **the model writes the summaries; this library orchestrates everything around them.** The core decides *when* to compress, *what range* to compress, tracks *state* (blocks, message-id mapping, tiers), applies a compress *decision*, prunes compressed ranges, and supports decompress/search. It never calls a model.
9
+ The key design principle: **the model writes the summaries; this library orchestrates everything around them.** The core decides _when_ to compress, _what range_ to compress, tracks _state_ (blocks, message-id mapping, tiers), applies a compress _decision_, prunes compressed ranges, and supports decompress/search. It never calls a model.
10
10
 
11
11
  ## Why a separate library
12
12
 
@@ -32,27 +32,35 @@ See [DESIGN.md](./DESIGN.md) for the full contract and [PROVENANCE.md](./PROVENA
32
32
  ```ts
33
33
  import { createCore, createInitialState, defaultConfig } from "acp-kernel";
34
34
 
35
- const core = createCore(); // optional: { countTokens }
35
+ const core = createCore(); // optional: { countTokens }
36
36
  const state = createInitialState();
37
37
  const config = defaultConfig(200000); // modelContextLimit (positional); optional overrides as 2nd arg
38
38
 
39
39
  // processTurn runs the canonical node pipeline every turn:
40
- // assign-refs → sync-blocks → prune → absorb-hide → crush → absorb-prompt
41
- // → filter → hide-compress-calls → recommend → nudge-inject
42
- // → emergency-truncate → render-refs
43
- const { messages, state: nextState, nudge } = core.processTurn({
44
- messages, state, config, tokenCount,
40
+ // assign-refs → sync-blocks → merge-blocks → prune → filter →
41
+ // hide-compress-calls → nudge-inject → emergency-truncate → render-refs
42
+ const {
43
+ messages,
44
+ state: nextState,
45
+ nudge,
46
+ } = core.processTurn({
47
+ messages,
48
+ state,
49
+ config,
50
+ tokenCount,
45
51
  });
46
52
 
47
53
  // When the model emits a compress decision (summary written by the model):
48
54
  const { state: compressed, result } = core.applyCompression({
49
55
  ranges: [{ startRef: "m00005", endRef: "m00020", summary: "..." }],
50
- messages, state: nextState, config,
56
+ messages,
57
+ state: nextState,
58
+ config,
51
59
  });
52
60
 
53
- core.decompress("b3", compressed); // look up a block
54
- core.search("auth token", compressed); // relevance-ranked block search
55
- core.status(compressed, tokenCount, config); // context-usage report
61
+ core.decompress("b3", compressed); // look up a block
62
+ core.search("auth token", compressed); // relevance-ranked block search
63
+ core.status(compressed, tokenCount, config); // context-usage report
56
64
  ```
57
65
 
58
66
  #### `renderTags` — host-side rendering strategy
@@ -90,23 +98,23 @@ working unchanged.
90
98
  `<acp tokens="N">` attribute is frozen at the tag's first render (the
91
99
  per-message `tokenSnapshot` in state) and is not recomputed when the message
92
100
  text is later filtered, truncated, or edited by the host — the number always
93
- describes what the model originally saw. Nudge/pressure *decisions* are
101
+ describes what the model originally saw. Nudge/pressure _decisions_ are
94
102
  unaffected: they recount live text every turn. If you need the legacy
95
103
  live-recomputed tags, use `renderVisibleRefs` directly.
96
104
 
97
105
  ### Standalone modules
98
106
 
99
- | Module | Purpose |
100
- |--------|---------|
101
- | `truncateLargeToolOutputs` | Emergency context-threshold-gated truncation of large visible tool outputs (last-resort safety valve; summaries are never touched) |
102
- | `hideConsumedCompressCalls` | Hide historical compress tool-calls whose block is inactive |
103
- | `buildStatusReport` / `buildRecap` | Context-usage report + block recap |
104
- | `mergeMarkedBlocks` / `collectOldGenBlocks` | Batch merge old-gen blocks into one summary |
105
- | `rebuildCompressionState` | Fork-recovery: replay historical compress calls |
106
- | `applyMessageFilters` | Pluggable message-filter framework |
107
- | `resolveTransformChannel` | Channel-selection policy: an explicit preference wins; the default is the wire channel only when the caller reports it viable |
108
- | `applySectionOverrides` / `cloneWithDescriptions` / `applyAcpToolOverrides` | Prompt/tool *surface* customization (see below) |
109
- | `sanitizePackSurface` / `createPackResolver` / `defaultPackSources` | Prompt packs: named, swappable surface presets resolved over pluggable sources (see below) |
107
+ | Module | Purpose |
108
+ | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
109
+ | `truncateLargeToolOutputs` | Emergency context-threshold-gated truncation of large visible tool outputs (last-resort safety valve; summaries are never touched) |
110
+ | `hideConsumedCompressCalls` | Hide historical compress tool-calls whose block is inactive |
111
+ | `buildStatusReport` / `buildRecap` | Context-usage report + block recap |
112
+ | `mergeMarkedBlocks` / `collectOldGenBlocks` | Batch merge old-gen blocks into one summary |
113
+ | `rebuildCompressionState` | Fork-recovery: replay historical compress calls |
114
+ | `applyMessageFilters` | Pluggable message-filter framework |
115
+ | `resolveTransformChannel` | Channel-selection policy: an explicit preference wins; the default is the wire channel only when the caller reports it viable |
116
+ | `applySectionOverrides` / `cloneWithDescriptions` / `applyAcpToolOverrides` | Prompt/tool _surface_ customization (see below) |
117
+ | `sanitizePackSurface` / `createPackResolver` / `defaultPackSources` | Prompt packs: named, swappable surface presets resolved over pluggable sources (see below) |
110
118
 
111
119
  ### Prompt/tool surface configuration
112
120
 
@@ -150,12 +158,12 @@ Named, swappable surface configurations layered on top of the primitives above:
150
158
  - `createDirPackSource(id, dir)` serves `<dir>/<name>.json` files;
151
159
  `defaultPackSources({ projectDir, userDirs })` assembles project > user >
152
160
  builtin. Directory paths are host policy.
153
- - Pack *selection* (which name is active per config cascade) stays adapter-side;
161
+ - Pack _selection_ (which name is active per config cascade) stays adapter-side;
154
162
  the kernel only resolves names.
155
163
 
156
164
  ### Nudge system
157
165
 
158
- The nudge system tells the model *when* to compress. It implements:
166
+ The nudge system tells the model _when_ to compress. It implements:
159
167
 
160
168
  - **Threshold gate**: fires when context usage ≥ `nudge.minContextLimitPct`.
161
169
  - **Growth-gating**: a repeat nudge requires positive growth since the baseline (prevents re-firing every turn). `"strong"` force relaxes this.
@@ -163,35 +171,6 @@ The nudge system tells the model *when* to compress. It implements:
163
171
  - **Compressible-range computation**: reports the actual compressible ranges (excluding covered + preserved-recent messages) so the model knows what to target.
164
172
  - **Baseline reset on compress**: `applyCompression` clears the growth baseline on success, preventing the feedback-loop bug where the nudge re-fires post-compress.
165
173
 
166
- ### Tool-result crush gate
167
-
168
- Deterministic first tier of the two-tier absorb gate. When a tool result qualifies as an absorb candidate and context pressure is on, the `crush` node (between `absorb-hide` and `absorb-prompt`) re-evaluates it **in view** with pure, deterministic strategies before the absorb-prompt decision runs:
169
-
170
- - **skip** — below `absorb.minToolTokens` or under `absorb.contextThresholdPct`; bytes untouched.
171
- - **crushed** — deterministic compression brought it under `minToolTokens`; no model round-trip. The wire carries the crushed payload (e.g. `__acp_crush` rows/identical-run envelopes for JSON, lossless — decodes back to an equal JSON document).
172
- - **distill** — still over (or uncrushable); forwarded to the `[ACP absorb]` prompt path, carrying the crushed payload when crushing succeeded.
173
-
174
- Built-in strategies form an ordered plugin registry (hosts can add/replace/disable via `registerCrushPlugin` / config):
175
-
176
- | Strategy | Kind | Lossy | What it does |
177
- |----------|------|-------|--------------|
178
- | `json-fold` | json | no | constant-field hoisting + identical row/run collapse into annotated envelopes |
179
- | `code-trim` | code | yes | comment/docstring elision behind a string-literal-aware scanner; template literals and assigned triple-quoted strings survive verbatim; unterminated constructs fail open |
180
- | `log-select` | log | yes | level-classified line selection; **every distinct ERROR/FAIL line survives verbatim** (kernel-enforced invariant — output dropping one is rejected); warnings deduped, stack frames collapsed, honest `[N lines omitted]` footer |
181
-
182
- Kernel-enforced guarantees: dispatch guards keep each payload kind on its own strategies; plugins must be pure and deterministic (same payload + config ⇒ same bytes, prefix-cache friendly); any throw, sub-`minReduction` result, or invariant violation fails open to the next candidate or pass-through. **Default off** (`crush.enabled: false`) and requires `absorb.enabled: true`; when disabled the pipeline is byte-identical to pre-crush behavior.
183
-
184
- ```json
185
- "crush": {
186
- "enabled": false,
187
- "minReduction": 0.1,
188
- "strategies": {
189
- "json-fold": { "enabled": false },
190
- "code-trim": { "excludeTools": ["bash"] }
191
- }
192
- }
193
- ```
194
-
195
174
  ## Wire codec (`acp-kernel/wire`)
196
175
 
197
176
  The `acp-kernel/wire` subpath ships the provider wire-body codecs (lossless
@@ -1 +1 @@
1
- {"version":3,"file":"cache-report.d.ts","sourceRoot":"","sources":["../src/cache-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX;iFAC6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;uDAEmD;IACnD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;mEACmE;AACnE,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,SAAS,SAAS,EAAE,GACjC,mBAAmB,CAgCrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,M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