acp-kernel 0.0.14 → 0.0.16

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.
@@ -8,20 +8,23 @@ export declare const ALWAYS_PROTECTED_TOOLS: readonly ["compress"];
8
8
  /** Tool results that must NEVER participate in the soft-protected recent zone
9
9
  * (preserveRecentMessages / preserveRecentTokens / last user message).
10
10
  *
11
- * `decompress` returns large restored content as an inline tool result. If it
12
- * lands in the last-N window it becomes un-compressible: the model cannot
13
- * reclaim that context, and it never appears in the compressible-ranges
14
- * recommendation list. Excluding it from the protected zone lets the model
15
- * compress it again immediately, while still leaving it visible (the host's
16
- * preserveRecent is about not compressing the active working set, not about
17
- * which tool results are in scope).
11
+ * These tools return large content (restored blocks, search hits, file bodies,
12
+ * command output). If such a result lands in the last-N window it becomes
13
+ * un-compressible: the model cannot reclaim that context, and it never appears
14
+ * in the compressible-ranges recommendation list. Excluding these tools from
15
+ * the protected zone lets the model compress them again immediately, while
16
+ * still leaving them visible (the host's preserveRecent is about not
17
+ * compressing the active working set, not about which tool results are in
18
+ * scope).
18
19
  *
19
- * `search_context` returns large result lists (10 ranked hits with previews).
20
- * Same reasoning: excluding it from the protected zone keeps it compressible.
20
+ * - `decompress`: large restored content as an inline tool result.
21
+ * - `search_context`: large result lists (10 ranked hits with previews).
22
+ * - `read`: file/image contents — the largest common source of context bloat.
23
+ * - `bash`: command output (build/test/logs) — frequently large and spent.
21
24
  *
22
25
  * Note: this only affects the recent-zone computation. Such messages remain
23
26
  * fully visible and compressible like any ordinary message. */
24
- export declare const NEVER_PRESERVE_RECENT_TOOLS: readonly ["decompress", "search_context"];
27
+ export declare const NEVER_PRESERVE_RECENT_TOOLS: readonly ["decompress", "search_context", "read", "bash"];
25
28
  /** True for tool-call / tool-result messages whose toolName is in the
26
29
  * NEVER_PRESERVE_RECENT_TOOLS list — i.e. tool results (like decompress)
27
30
  * that should be excluded from the soft-protected recent zone. */
@@ -1 +1 @@
1
- {"version":3,"file":"protected.d.ts","sourceRoot":"","sources":["../src/protected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;kFAIkF;AAClF,eAAO,MAAM,sBAAsB,uBAAwB,CAAC;AAE5D;;;;;;;;;;;;;;;gEAegE;AAChE,eAAO,MAAM,2BAA2B,2CAA4C,CAAC;AAErF;;mEAEmE;AACnE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAM/D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAK3E;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GACzD,OAAO,CAsBT;AAED;;;8DAG8D;AAC9D,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GACzD,GAAG,CAAC,MAAM,CAAC,CAQb;AAED;iFACiF;AACjF,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,EAC1D,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC5B,OAAO,CAUT"}
1
+ {"version":3,"file":"protected.d.ts","sourceRoot":"","sources":["../src/protected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;kFAIkF;AAClF,eAAO,MAAM,sBAAsB,uBAAwB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;gEAkBgE;AAChE,eAAO,MAAM,2BAA2B,2DAK9B,CAAC;AAEX;;mEAEmE;AACnE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAM/D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAK3E;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GACzD,OAAO,CAsBT;AAED;;;8DAG8D;AAC9D,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GACzD,GAAG,CAAC,MAAM,CAAC,CAQb;AAED;iFACiF;AACjF,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,EAC1D,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC5B,OAAO,CAUT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acp-kernel",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Framework-agnostic context-compression engine (model-driven, 3-tier LSM). Pure core: no host dependency.",
5
5
  "license": "MIT",
6
6
  "author": "ranxianglei",
@@ -1,9 +0,0 @@
1
- import type { CompressionState, CoreMessage } from "./types.js";
2
- export interface KeepMarkerResult {
3
- summary: string;
4
- expandedCount: number;
5
- refCount: number;
6
- unresolvedRefs: string[];
7
- }
8
- export declare function resolveKeepMarkers(summary: string, messages: CoreMessage[], state: CompressionState, maxChars?: number): KeepMarkerResult;
9
- //# sourceMappingURL=keep-markers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keep-markers.d.ts","sourceRoot":"","sources":["../src/keep-markers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKhE,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,WAAW,EAAE,EACvB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,SAAO,GAChB,gBAAgB,CAkClB"}