@linxiraos/pi-snapcompact 1.1.13 → 1.1.15

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/CHANGELOG.md CHANGED
@@ -2,70 +2,7 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.1.13] - 2026-09-10
5
+ ## [1.1.15] - 2026-09-16
6
6
 
7
- - 上游 v18.1.16 同步,内部修复。
7
+ - 随 1.1.15 版本线发布:上游同步带过,无 API 变化。
8
8
 
9
- ## [1.1.12] - 2026-09-10
10
-
11
- - 品牌与合并工具链维护版本;无本包用户可见变更。
12
-
13
- ## [1.1.11] - 2026-09-08
14
-
15
- - OMP v18.1.13 + v18.1.14 dual-tag sync baseline; no package-specific user-visible changes.
16
-
17
- ## [1.1.10] - 2026-09-07
18
-
19
- - OMP v18.1.11 sync baseline (`e3106be68f`); no package-specific user-visible changes.
20
-
21
- ## [1.1.9] - 2026-09-05
22
-
23
- - v18.1.10 sync baseline (published as @linxiraos/pi-snapcompact).
24
-
25
- ## [1.1.8] - 2026-09-04
26
-
27
- - OMP sync v18.1.2–v18.1.5: compaction maintenance aligned with the upstream snapcompact updates.
28
-
29
- ## [1.1.6] - 2026-08-30
30
-
31
- - 同步上游 OMP v18.0.9(`cc14e04f075d`)。
32
-
33
- ## [1.1.5] - 2026-08-26
34
-
35
- - 随 1.1.5 版本线对齐发布:OMP v18.0.6 同步未触及本包,无独立功能变更。
36
-
37
- ## [1.1.4] - 2026-08-26
38
-
39
- ### Changed
40
-
41
- - 同步 1.1.4 发布线(与 1.1.3 无功能差异)。
42
-
43
- ## [1.1.3] - 2026-08-25
44
-
45
- ### Fixed
46
-
47
- - Republished as 1.1.3 to reset the latest tag after the broken 1.1.2 (no functional change over 1.1.1).
48
-
49
- ## [1.1.2] - 2026-08-25
50
-
51
- ### Fixed
52
-
53
- - Republished as 1.1.2 to reset the `latest` tag after the broken 1.1.0 (no functional change over 1.1.1).
54
-
55
- ## [1.1.1] - 2026-08-25
56
-
57
- ### Fixed
58
-
59
- - Published tarballs now carry real dependency versions instead of Bun's `catalog:` protocol (1.1.0 installs failed with "Unsupported URL Type catalog:").
60
-
61
- ## [1.1.0] - 2026-08-25
62
-
63
- ### Changed
64
-
65
- - 同步上游 OMP v18.0.3 / v18.0.4(内部运行时与构建改进,无独立用户可见变更)。
66
-
67
- ## [1.0.0] - 2026-08-13
68
-
69
- ### Changed
70
-
71
- - Reset the version to 1.0.0 and republished under the `@linxiraos/*` scope, breaking from the `@linxiraos` version lineage.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@linxiraos/pi-snapcompact",
4
- "version": "1.1.13",
4
+ "version": "1.1.15",
5
5
  "description": "Bitmap-frame context compression for vision-capable LLMs",
6
6
  "homepage": "https://linxira-os.github.io/zeta/",
7
7
  "author": "Can Boluk",
@@ -31,11 +31,11 @@
31
31
  "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
32
32
  },
33
33
  "dependencies": {
34
- "@linxiraos/pi-ai": "1.1.13",
35
- "@linxiraos/pi-catalog": "1.1.13",
36
- "@linxiraos/pi-natives": "1.1.13",
37
- "@linxiraos/pi-utils": "1.1.13",
38
- "@linxiraos/pi-wire": "1.1.13"
34
+ "@linxiraos/pi-ai": "1.1.15",
35
+ "@linxiraos/pi-catalog": "1.1.15",
36
+ "@linxiraos/pi-natives": "1.1.15",
37
+ "@linxiraos/pi-utils": "1.1.15",
38
+ "@linxiraos/pi-wire": "1.1.15"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/bun": "^1.3.14"
@@ -1067,15 +1067,16 @@ export function serializeConversation(messages: Message[], options?: SerializeOp
1067
1067
  // Preserve-data helpers
1068
1068
  // ============================================================================
1069
1069
 
1070
- const OPENAI_REMOTE_COMPACTION_PRESERVE_KEY = "openaiRemoteCompaction";
1070
+ /** Provider-native compaction payloads a snapcompact pass supersedes. */
1071
+ const PROVIDER_COMPACTION_PRESERVE_KEYS = ["openaiRemoteCompaction", "anthropicCompaction"] as const;
1071
1072
 
1072
- function stripOpenAiRemoteCompactionPreserveData(
1073
+ function stripProviderCompactionPreserveData(
1073
1074
  preserveData: Record<string, unknown> | undefined,
1074
1075
  ): Record<string, unknown> | undefined {
1075
- if (!preserveData || !(OPENAI_REMOTE_COMPACTION_PRESERVE_KEY in preserveData)) {
1076
+ if (!preserveData || !PROVIDER_COMPACTION_PRESERVE_KEYS.some(key => key in preserveData)) {
1076
1077
  return preserveData;
1077
1078
  }
1078
- const { [OPENAI_REMOTE_COMPACTION_PRESERVE_KEY]: _removed, ...rest } = preserveData;
1079
+ const { openaiRemoteCompaction: _openai, anthropicCompaction: _anthropic, ...rest } = preserveData;
1079
1080
  return Object.keys(rest).length > 0 ? rest : undefined;
1080
1081
  }
1081
1082
 
@@ -2157,9 +2158,10 @@ export async function compact<TMessage = Message>(
2157
2158
  });
2158
2159
  }
2159
2160
 
2160
- // A snapcompact pass replaces any provider-side replacement history; strip the
2161
- // OpenAI remote-compaction payload like the default summarizer path does.
2162
- const basePreserve = stripOpenAiRemoteCompactionPreserveData(previousPreserveData) ?? {};
2161
+ // A snapcompact pass replaces any provider-side compaction payload; strip the
2162
+ // OpenAI replacement history and the Anthropic compaction block like the
2163
+ // default summarizer path does.
2164
+ const basePreserve = stripProviderCompactionPreserveData(previousPreserveData) ?? {};
2163
2165
  const persistedText =
2164
2166
  layout.keptText.length > 0 && layout.textTail.length > 0
2165
2167
  ? `${layout.keptText.slice(0, layout.keptText.length - layout.textTail.length)}${textTail}`