@linxiraos/pi-snapcompact 1.3.2 → 1.4.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 +8 -0
- package/package.json +6 -6
- package/src/snapcompact.ts +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.4.1] - 2026-10-23
|
|
4
|
+
|
|
5
|
+
- Version alignment with the 1.4.1 release line (no behavioral changes).
|
|
6
|
+
|
|
7
|
+
## [1.4.0] - 2026-10-21
|
|
8
|
+
|
|
9
|
+
- Version line moves to 1.4.0 with the rest of the suite; no user-visible change in this package.
|
|
10
|
+
|
|
3
11
|
## [1.3.2] - 2026-10-19
|
|
4
12
|
|
|
5
13
|
- Version line moves to 1.3.2 with the rest of the suite; no user-visible change in this package.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@linxiraos/pi-snapcompact",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"description": "Bitmap-frame context compression for vision-capable LLMs",
|
|
6
6
|
"homepage": "https://linxira-os.github.io/zeta/",
|
|
7
7
|
"author": "Linxira-OS",
|
|
@@ -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.
|
|
35
|
-
"@linxiraos/pi-catalog": "1.
|
|
36
|
-
"@linxiraos/pi-natives": "1.
|
|
37
|
-
"@linxiraos/pi-utils": "1.
|
|
38
|
-
"@linxiraos/pi-wire": "1.
|
|
34
|
+
"@linxiraos/pi-ai": "1.4.1",
|
|
35
|
+
"@linxiraos/pi-catalog": "1.4.1",
|
|
36
|
+
"@linxiraos/pi-natives": "1.4.1",
|
|
37
|
+
"@linxiraos/pi-utils": "1.4.1",
|
|
38
|
+
"@linxiraos/pi-wire": "1.4.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/bun": "1.4.3"
|
package/src/snapcompact.ts
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
import type { Api, ImageContent, Message, Model, TextContent } from "@linxiraos/pi-ai";
|
|
57
|
-
import {
|
|
57
|
+
import { reachesBudgetedHost } from "@linxiraos/pi-ai/providers/anthropic-state";
|
|
58
58
|
import { resolveCatalogPolicy } from "@linxiraos/pi-catalog/compat/catalog-policy";
|
|
59
59
|
import {
|
|
60
60
|
type ImageSize,
|
|
@@ -540,7 +540,7 @@ export const DEFAULT_FRAME_DATA_BYTES_BUDGET = 3_000_000;
|
|
|
540
540
|
* request, so the send-time byte clamp evicts them first; the other half stays
|
|
541
541
|
* free for live screenshots. */
|
|
542
542
|
export function frameDataBytesBudget(model: Model | undefined): number {
|
|
543
|
-
const inlineBudget = model ? resolveInlineImageByteBudget(model,
|
|
543
|
+
const inlineBudget = model ? resolveInlineImageByteBudget(model, reachesBudgetedHost(model)) : undefined;
|
|
544
544
|
return inlineBudget === undefined ? DEFAULT_FRAME_DATA_BYTES_BUDGET : Math.floor(inlineBudget / 2);
|
|
545
545
|
}
|
|
546
546
|
|
|
@@ -582,8 +582,7 @@ export const DEFAULT_PROVIDER_IMAGE_BUDGET = 5;
|
|
|
582
582
|
* system-prompt and tool-result imaging combined. */
|
|
583
583
|
export function providerImageBudget(model: Model | undefined): number {
|
|
584
584
|
return (
|
|
585
|
-
(model ? resolveImageCountBudget(model,
|
|
586
|
-
DEFAULT_PROVIDER_IMAGE_BUDGET
|
|
585
|
+
(model ? resolveImageCountBudget(model, reachesBudgetedHost(model)) : undefined) ?? DEFAULT_PROVIDER_IMAGE_BUDGET
|
|
587
586
|
);
|
|
588
587
|
}
|
|
589
588
|
|