@ingcreators/annot-mcp 0.1.1 → 0.2.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
@@ -1,5 +1,51 @@
1
1
  # @ingcreators/annot-mcp
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b3e8e53: Both packages now accept an optional `encode` option that flows through to `@ingcreators/annot-annotator@0.3.0`'s `toEncoded()` / `decodeAndEncodeImage()` pipeline. Achieves feature parity with the Chrome extension's "Save size" + "Format smart" capture settings for AI-agent (`annot-mcp`) and Playwright-test (`annot-playwright`) flows.
8
+
9
+ ## `annot-playwright`
10
+
11
+ ```ts
12
+ await annotator.annotateScreenshot(page, {
13
+ annotations: [...],
14
+ encode: { format: "smart", saveSizePreset: "standard" },
15
+ });
16
+ ```
17
+
18
+ Returned bytes shrink to PNG-8 / JPEG / resized PNG-32 per the smart heuristic; default behaviour when `encode` is omitted matches v0.2.x (raw PNG-32 from the annotator).
19
+
20
+ ## `annot-mcp`
21
+
22
+ All five tools (`annot_annotate_screenshot`, `annot_annotate_url`, `annot_redact_screenshot`, `annot_redact_url`, `annot_compare_screenshots`) accept the same `encode` shape on their MCP `inputSchema`. Agents can specify any subset:
23
+
24
+ ```jsonc
25
+ {
26
+ "url": "https://...",
27
+ "annotations": [...],
28
+ "encode": {
29
+ "format": "smart",
30
+ "saveSizePreset": "light",
31
+ "smartFallback": "jpeg"
32
+ }
33
+ }
34
+ ```
35
+
36
+ `format`: `"smart"` (default — PNG-8 for UI / PNG / JPEG for photos) / `"png"` / `"jpeg"`.
37
+ `saveSizePreset`: `"light"` 1280px / `"standard"` 1920px / `"highQuality"` 2560px / `"original"` no resize.
38
+ `smartFallback`, `smartColorThreshold`, `jpegPercent` all configurable.
39
+
40
+ Output `mimeType` flips to `image/jpeg` when the chosen path emits JPEG, so MCP clients render inline correctly. The text confirmation when `output` is set now includes the chosen format and any `reason` (`png-8` / `photo-fallback-jpeg` / `imagequant-missing` / …) for observability.
41
+
42
+ Backwards-compatible: when `encode` is omitted, all tools emit PNG-32 bytes verbatim (no decode/encode round-trip, same as v0.1.x / v0.2.x).
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [86d0853]
47
+ - @ingcreators/annot-annotator@0.3.0
48
+
3
49
  ## 0.1.1
4
50
 
5
51
  ### Patch Changes
@@ -270,6 +270,38 @@ export declare const LOCATOR_ANNOTATION_SCHEMA: {
270
270
  };
271
271
  })[];
272
272
  };
273
+ export declare const ENCODE_OPTIONS_SCHEMA: {
274
+ type: string;
275
+ additionalProperties: boolean;
276
+ properties: {
277
+ format: {
278
+ type: string;
279
+ enum: string[];
280
+ description: string;
281
+ };
282
+ saveSizePreset: {
283
+ type: string;
284
+ enum: string[];
285
+ description: string;
286
+ };
287
+ smartFallback: {
288
+ type: string;
289
+ enum: string[];
290
+ description: string;
291
+ };
292
+ smartColorThreshold: {
293
+ type: string;
294
+ minimum: number;
295
+ description: string;
296
+ };
297
+ jpegPercent: {
298
+ type: string;
299
+ minimum: number;
300
+ maximum: number;
301
+ description: string;
302
+ };
303
+ };
304
+ };
273
305
  export declare const LOCATOR_REDACT_REGION_SCHEMA: {
274
306
  type: string;
275
307
  additionalProperties: boolean;