@oh-my-pi/snapcompact 18.0.11 → 18.1.1
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 +11 -0
- package/package.json +10 -10
- package/src/snapcompact.ts +11 -6
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.
|
|
4
|
+
"version": "18.1.1",
|
|
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": "
|
|
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": "
|
|
28
|
+
"lint": "oxlint .",
|
|
29
29
|
"test": "bun test --parallel",
|
|
30
|
-
"fix": "
|
|
31
|
-
"fmt": "
|
|
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.
|
|
35
|
-
"@oh-my-pi/pi-catalog": "18.
|
|
36
|
-
"@oh-my-pi/pi-natives": "18.
|
|
37
|
-
"@oh-my-pi/pi-utils": "18.
|
|
38
|
-
"@oh-my-pi/pi-wire": "18.
|
|
34
|
+
"@oh-my-pi/pi-ai": "18.1.1",
|
|
35
|
+
"@oh-my-pi/pi-catalog": "18.1.1",
|
|
36
|
+
"@oh-my-pi/pi-natives": "18.1.1",
|
|
37
|
+
"@oh-my-pi/pi-utils": "18.1.1",
|
|
38
|
+
"@oh-my-pi/pi-wire": "18.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/bun": "^1.3.14"
|
package/src/snapcompact.ts
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
import type { Api, ImageContent, Message, TextContent } from "@oh-my-pi/pi-ai";
|
|
49
|
-
import {
|
|
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
|
-
|
|
368
|
-
|
|
369
|
-
const
|
|
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
|
-
(
|
|
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
|