opencode-acp 1.18.2-pr.448.192 → 1.18.2-pr.449.193
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 +122 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/compress/decompress-logic.d.ts +36 -0
- package/dist/lib/compress/decompress-logic.d.ts.map +1 -1
- package/dist/lib/compress/decompress.d.ts.map +1 -1
- package/dist/lib/compress/quality-gate/rejection.d.ts +9 -1
- package/dist/lib/compress/quality-gate/rejection.d.ts.map +1 -1
- package/dist/lib/compress/range.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,42 @@ export interface RestoredMessagesResult {
|
|
|
21
21
|
restoredTokens: number;
|
|
22
22
|
}
|
|
23
23
|
export declare function computeRestoredMessages(messagesState: PruneMessagesState, activeMessagesBefore: Map<string, number>): RestoredMessagesResult;
|
|
24
|
+
export interface DecompressAvailabilityResult {
|
|
25
|
+
/** Message IDs whose visibility this decompression would restore (membership-wise). */
|
|
26
|
+
requiredMessageIds: string[];
|
|
27
|
+
/** Subset of requiredMessageIds present in the fetched host history. */
|
|
28
|
+
availableMessageIds: string[];
|
|
29
|
+
/** Subset of requiredMessageIds absent from the fetched host history.
|
|
30
|
+
* Non-empty ⇒ committing would claim restored content that does not exist. */
|
|
31
|
+
missingMessageIds: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Compute the message IDs whose visibility changes if `targets` are deactivated.
|
|
35
|
+
*
|
|
36
|
+
* A message becomes visible iff every block currently covering it belongs to the
|
|
37
|
+
* deactivation set AND (one-tier only) it is not re-covered by a consumed block
|
|
38
|
+
* that syncCompressionBlocks will reactivate. One-tier decompression leaves
|
|
39
|
+
* non-user-deactivated consumed blocks alive, so their covered messages stay
|
|
40
|
+
* hidden and are not required sources; full decompression deep-deactivates them,
|
|
41
|
+
* so everything under the targets must be present in history.
|
|
42
|
+
*
|
|
43
|
+
* The result is conservative by design: over-requiring an ID can only cause a
|
|
44
|
+
* safe-direction abort, never a false "restored" claim.
|
|
45
|
+
*/
|
|
46
|
+
export declare function collectRequiredDecompressMessageIds(messagesState: PruneMessagesState, targets: CompressionTarget[], options?: {
|
|
47
|
+
full?: boolean;
|
|
48
|
+
}): string[];
|
|
49
|
+
/**
|
|
50
|
+
* [Issue #446] Verify that every source message a decompression would restore is
|
|
51
|
+
* actually present in the fetched host history. Membership transitions alone prove
|
|
52
|
+
* nothing about content: if the host removed the originals (native compaction,
|
|
53
|
+
* external deletion), deactivating the target still reports "Restored N" while
|
|
54
|
+
* nothing returns to context, stats are decremented by phantom tokens, and the
|
|
55
|
+
* terminal user-deactivation discards the summary coverage.
|
|
56
|
+
*/
|
|
57
|
+
export declare function checkDecompressSourceAvailability(messagesState: PruneMessagesState, targets: CompressionTarget[], options: {
|
|
58
|
+
full?: boolean;
|
|
59
|
+
}, presentInHistory: Set<string>): DecompressAvailabilityResult;
|
|
24
60
|
export declare function computeReactivatedBlockIds(messagesState: PruneMessagesState, activeBlockIdsBefore: Set<number>): number[];
|
|
25
61
|
export declare function buildRestoredContentPreview(messages: WithParts[], activeMessagesBefore: Map<string, number>, messagesState: PruneMessagesState): string;
|
|
26
62
|
//# sourceMappingURL=decompress-logic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompress-logic.d.ts","sourceRoot":"","sources":["../../../lib/compress/decompress-logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAExE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAa1D;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAA;AAE9C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EA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MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAoB,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"decompress.d.ts","sourceRoot":"","sources":["../../../lib/compress/decompress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAoB,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAA;AAoSvF,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAwL5F"}
|
|
@@ -6,5 +6,13 @@ export interface RejectionPlanInfo {
|
|
|
6
6
|
messageIds: string[];
|
|
7
7
|
messageTokenById: Map<string, number>;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Minimal logging surface for full rejection diagnostics. Kept structural (not
|
|
11
|
+
* the concrete `Logger` class) so tests can inject a plain mock without casting,
|
|
12
|
+
* and so this module has no runtime dependency on the logger implementation.
|
|
13
|
+
*/
|
|
14
|
+
export interface RejectionDiagnosticsLogger {
|
|
15
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function buildQualityRejectionError(plan: RejectionPlanInfo, result: QualityGateResult, logger?: RejectionDiagnosticsLogger): Error;
|
|
10
18
|
//# sourceMappingURL=rejection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rejection.d.ts","sourceRoot":"","sources":["../../../../lib/compress/quality-gate/rejection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxC;
|
|
1
|
+
{"version":3,"file":"rejection.d.ts","sourceRoot":"","sources":["../../../../lib/compress/quality-gate/rejection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxC;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC9D;AA+CD,wBAAgB,0BAA0B,CACtC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,0BAA0B,GACpC,KAAK,CA4BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../lib/compress/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAA;AAuCrE,wBAAgB,iBAAiB,CAC7B,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACnD,OAAO,CAKT;AAqDD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../lib/compress/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAA;AAuCrE,wBAAgB,iBAAiB,CAC7B,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACnD,OAAO,CAKT;AAqDD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CA0S/F"}
|
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.2-pr.
|
|
4
|
+
"version": "1.18.2-pr.449.193",
|
|
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",
|