acp-kernel 0.0.16 → 0.0.17
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/README.md +31 -0
- package/dist/compress.d.ts +14 -0
- package/dist/compress.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -16
- package/dist/index.js.map +1 -1
- package/dist/render-refs.d.ts +16 -1
- package/dist/render-refs.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/render-refs.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { CoreMessage, CompressionState } from "./types.js";
|
|
2
2
|
import type { PipelineNode } from "./pipeline.js";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Controls which messages get an <acp> ref tag injected into their text.
|
|
5
|
+
* Ref assignment (assignRefsNode) is unconditional — every message always
|
|
6
|
+
* receives a ref in state.messageRefs regardless of this setting. This only
|
|
7
|
+
* governs text rendering:
|
|
8
|
+
* - "all": tag every mapped message (in-process hosts like pai-acp)
|
|
9
|
+
* - "text-only": tag only user/assistant text; leave tool-call args and
|
|
10
|
+
* tool-result content pristine (proxy hosts — structured content must not
|
|
11
|
+
* be polluted)
|
|
12
|
+
* - "none": leave all text untouched (hosts that read the ref map directly)
|
|
13
|
+
*/
|
|
14
|
+
export type RenderStrategy = "all" | "text-only" | "none";
|
|
15
|
+
export declare function renderVisibleRefs(messages: CoreMessage[], state: CompressionState, countTokens?: (text: string) => number, strategy?: RenderStrategy): CoreMessage[];
|
|
16
|
+
/** Factory: build a render-refs node bound to a specific render strategy. */
|
|
17
|
+
export declare function createRenderRefsNode(strategy: RenderStrategy): PipelineNode;
|
|
18
|
+
/** Backward compat: default render-refs node using strategy "all". */
|
|
4
19
|
export declare const renderRefsNode: PipelineNode;
|
|
5
20
|
//# sourceMappingURL=render-refs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-refs.d.ts","sourceRoot":"","sources":["../src/render-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAiB,MAAM,YAAY,CAAC;AAE/E,OAAO,KAAK,EAAE,YAAY,EAA2B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"render-refs.d.ts","sourceRoot":"","sources":["../src/render-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAiB,MAAM,YAAY,CAAC;AAE/E,OAAO,KAAK,EAAE,YAAY,EAA2B,MAAM,eAAe,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,CAAC;AAgE1D,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,WAAW,EAAE,EACvB,KAAK,EAAE,gBAAgB,EACvB,WAAW,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MACH,EAC5B,QAAQ,GAAE,cAAsB,GAC/B,WAAW,EAAE,CAKf;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,YAAY,CAU3E;AAED,sEAAsE;AACtE,eAAO,MAAM,cAAc,EAAE,YAA0C,CAAC"}
|
package/package.json
CHANGED