@oh-my-pi/snapcompact 18.0.10 → 18.1.0

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,6 +2,17 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.1.0] - 2026-09-01
6
+
7
+ ### Added
8
+
9
+ - Added a declarative compatibility rules system for consistent model identification, capabilities, policies, and provider-specific behavior across model classes, families, and revisions.
10
+ - Added the compat-compiler CLI for managing model identity and capability rules through KDL configuration files.
11
+
12
+ ### Changed
13
+
14
+ - Standardized model revision handling and compatibility resolution across model discovery and runtime behavior.
15
+
5
16
  ## [17.4.1] - 2026-08-21
6
17
 
7
18
  ### Added
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/snapcompact",
4
- "version": "18.0.10",
4
+ "version": "18.1.0",
5
5
  "description": "Bitmap-frame context compression for vision-capable LLMs",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Stencil Labs, Inc.",
@@ -23,19 +23,19 @@
23
23
  "main": "./src/index.ts",
24
24
  "types": "./dist/types/index.d.ts",
25
25
  "scripts": {
26
- "check": "biome check . && bun run check:types",
26
+ "check": "oxlint . && oxfmt --check --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts' && bun run check:types",
27
27
  "check:types": "tsgo -p tsconfig.json --noEmit",
28
- "lint": "biome lint .",
28
+ "lint": "oxlint .",
29
29
  "test": "bun test --parallel",
30
- "fix": "biome check --write --unsafe .",
31
- "fmt": "biome format --write ."
30
+ "fix": "oxlint --fix --fix-suggestions . && bun run fmt",
31
+ "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
32
32
  },
33
33
  "dependencies": {
34
- "@oh-my-pi/pi-ai": "18.0.10",
35
- "@oh-my-pi/pi-catalog": "18.0.10",
36
- "@oh-my-pi/pi-natives": "18.0.10",
37
- "@oh-my-pi/pi-utils": "18.0.10",
38
- "@oh-my-pi/pi-wire": "18.0.10"
34
+ "@oh-my-pi/pi-ai": "18.1.0",
35
+ "@oh-my-pi/pi-catalog": "18.1.0",
36
+ "@oh-my-pi/pi-natives": "18.1.0",
37
+ "@oh-my-pi/pi-utils": "18.1.0",
38
+ "@oh-my-pi/pi-wire": "18.1.0"
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 "@oh-my-pi/pi-ai";
49
- import { isFableOrMythos, parseAnthropicModel, semverGte } from "@oh-my-pi/pi-catalog/identity";
49
+ import { classifyModel, compareRevision, parseRevision } from "@oh-my-pi/pi-catalog/identity";
50
50
  import { renderSnapcompactPng, snapcompactSupportedChars } from "@oh-my-pi/pi-natives";
51
51
  import { formatGroupedPaths, prompt } from "@oh-my-pi/pi-utils";
52
52
  import { INTENT_FIELD } from "@oh-my-pi/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