opencode-acp 1.18.4-pr.483.216 → 1.18.4
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/dist/index.js +2 -68
- package/dist/index.js.map +1 -1
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/messages/index.d.ts +0 -1
- package/dist/lib/messages/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/lib/messages/reasoning-canonicalize.d.ts +0 -37
- package/dist/lib/messages/reasoning-canonicalize.d.ts.map +0 -1
package/dist/lib/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../lib/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../lib/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAkB5C,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAiBhE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAMhE,OAAO,EAKH,KAAK,oBAAoB,EAC5B,MAAM,SAAS,CAAA;AA+BhB,wBAAgB,yBAAyB,CACrC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,WAAW,IAGhB,OAAO;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IA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OAAO;IAAE,KAAK,EAAE,GAAG,CAAA;CAAE,mBA2FtC"}
|
|
@@ -4,7 +4,6 @@ export { injectCompressNudges } from "./inject/inject";
|
|
|
4
4
|
export { computeInputBudget } from "./inject/utils";
|
|
5
5
|
export { injectMessageIds } from "./inject/inject";
|
|
6
6
|
export { stripStaleMetadata, dropCompressReasoning } from "./reasoning-strip";
|
|
7
|
-
export { canonicalizeReasoningShape } from "./reasoning-canonicalize";
|
|
8
7
|
export { buildPriorityMap } from "./priority";
|
|
9
8
|
export { buildToolIdList, stripHallucinations, stripHallucinationsFromString, stripLeakedTrailingRefs, hasContent, dropEmptyMessages, } from "./utils";
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,6BAA6B,EAC7B,uBAAuB,EACvB,UAAU,EACV,iBAAiB,GACpB,MAAM,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-acp",
|
|
4
|
-
"version": "1.18.4
|
|
4
|
+
"version": "1.18.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Active Context Pruning — model-driven context management for OpenCode (hardened fork of DCP with 35 bug fixes)",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { WithParts } from "../state";
|
|
2
|
-
/**
|
|
3
|
-
* [#482] Pin the wire shape of historical thinking (billion-context#3301).
|
|
4
|
-
*
|
|
5
|
-
* The host serializer decides, per request, which field carries replayed
|
|
6
|
-
* reasoning based on the CURRENT model-metadata table — a choice that is not
|
|
7
|
-
* stored with the message. When the table refreshes, every historical
|
|
8
|
-
* assistant message with thinking re-serializes into a different shape, its
|
|
9
|
-
* content-hash identity changes, and downstream compression ledgers can no
|
|
10
|
-
* longer match folded history.
|
|
11
|
-
*
|
|
12
|
-
* This request-time pass removes that variable at the last controllable
|
|
13
|
-
* boundary before serialization: for every assistant message carrying
|
|
14
|
-
* non-empty reasoning parts, the reasoning parts and the text parts are
|
|
15
|
-
* folded into ONE synthesized text part in the canonical tagged form
|
|
16
|
-
* `<thinking>\n{all R joined}\n</thinking>\n{all T joined}`. After the fold
|
|
17
|
-
* no reasoning part survives, so the host serializer's output is
|
|
18
|
-
* byte-deterministic regardless of metadata-table state, host version or
|
|
19
|
-
* provider config.
|
|
20
|
-
*
|
|
21
|
-
* Join semantics mirror the host's own lowerAssistantMessage (reasoning parts
|
|
22
|
-
* concatenated with "", text parts concatenated with ""), so the canonical
|
|
23
|
-
* shape mints exactly the ids the split form minted — existing ledgers align
|
|
24
|
-
* with zero aliases.
|
|
25
|
-
*
|
|
26
|
-
* Deterministic and idempotent: a second run sees no reasoning parts and
|
|
27
|
-
* changes nothing, so prefix-cache bytes move exactly once. Non-reasoning
|
|
28
|
-
* parts (tool, file, ...) pass through in original order; the synthesized
|
|
29
|
-
* part takes the slot of the first folded part and reuses its id. No
|
|
30
|
-
* state/DB writes. Known boundary: providers requiring structured thinking
|
|
31
|
-
* replay semantics (Anthropic native thinking blocks, Gemini thoughtSignature)
|
|
32
|
-
* lose the structured field — openai-compat lanes are unaffected.
|
|
33
|
-
*
|
|
34
|
-
* @returns the number of assistant messages whose parts were rewritten.
|
|
35
|
-
*/
|
|
36
|
-
export declare function canonicalizeReasoningShape(messages: WithParts[]): number;
|
|
37
|
-
//# sourceMappingURL=reasoning-canonicalize.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning-canonicalize.d.ts","sourceRoot":"","sources":["../../../lib/messages/reasoning-canonicalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAazC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,CAkExE"}
|