@linxiraos/pi-snapcompact 1.1.7 → 1.1.8

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,9 +2,9 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.1.7] - 2026-09-01
5
+ ## [1.1.8] - 2026-09-04
6
6
 
7
- - 版本线随 1.1.7 发布对齐(随本体 v18.0.11 同步与主题/网关更新),包内无独立变更。
7
+ - OMP sync v18.1.2–v18.1.5: compaction maintenance aligned with the upstream snapcompact updates.
8
8
 
9
9
  ## [1.1.6] - 2026-08-30
10
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@linxiraos/pi-snapcompact",
4
- "version": "1.1.7",
4
+ "version": "1.1.8",
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": "biome format --write ."
32
32
  },
33
33
  "dependencies": {
34
- "@linxiraos/pi-ai": "1.1.7",
35
- "@linxiraos/pi-catalog": "1.1.7",
36
- "@linxiraos/pi-natives": "1.1.7",
37
- "@linxiraos/pi-utils": "1.1.7",
38
- "@linxiraos/pi-wire": "1.1.7"
34
+ "@linxiraos/pi-ai": "1.1.8",
35
+ "@linxiraos/pi-catalog": "1.1.8",
36
+ "@linxiraos/pi-natives": "1.1.8",
37
+ "@linxiraos/pi-utils": "1.1.8",
38
+ "@linxiraos/pi-wire": "1.1.8"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/bun": "^1.3.14"
@@ -46,7 +46,7 @@
46
46
  */
47
47
 
48
48
  import type { Api, ImageContent, Message, TextContent } from "@linxiraos/pi-ai";
49
- import { isFableOrMythos, parseAnthropicModel, semverGte } from "@linxiraos/pi-catalog/identity";
49
+ import { classifyModel, compareRevision, parseRevision } from "@linxiraos/pi-catalog/identity";
50
50
  import { renderSnapcompactPng, snapcompactSupportedChars } from "@linxiraos/pi-natives";
51
51
  import { formatGroupedPaths, prompt } from "@linxiraos/pi-utils";
52
52
  import { INTENT_FIELD } from "@linxiraos/pi-wire";
@@ -364,12 +364,17 @@ const MODEL_VARIANTS: readonly (readonly [RegExp, IdealShape])[] = [
364
364
 
365
365
  /** Eval-ideal format for a model id, or undefined when unmeasured. */
366
366
  export function idealShapeVariant(modelId: string): IdealShape | undefined {
367
- // The catalog parser is case-sensitive; the regex rules below are not.
368
- // Normalize so mixed-case gateway ids keep matching the Anthropic tier.
369
- const anthropic = parseAnthropicModel(modelId.toLowerCase());
367
+ const identity = classifyModel("", modelId, { lenient: true });
368
+ const revision = identity.revision === undefined ? undefined : parseRevision(identity.revision);
369
+ const opusFloor = parseRevision("4.7");
370
370
  if (
371
- anthropic &&
372
- (isFableOrMythos(anthropic.kind) || (anthropic.kind === "opus" && semverGte(anthropic.version, "4.7")))
371
+ identity.class === "anthropic" &&
372
+ (identity.family === "fable" ||
373
+ identity.family === "mythos" ||
374
+ (identity.family === "opus" &&
375
+ revision !== undefined &&
376
+ opusFloor !== undefined &&
377
+ compareRevision(revision, opusFloor) >= 0))
373
378
  ) {
374
379
  // Opus 4.7+ and Fable/Mythos read high-res natively: same recall and
375
380
  // cost as 1568, a third fewer frames. 1932 is the largest *square* not