chrometools-mcp 3.4.1 → 3.5.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.5.1] - 2026-02-16
6
+
7
+ ### Fixed
8
+ - **APOM selector uniqueness** — `generateSelector()` in APOM tree converter now verifies CSS selector uniqueness against the entire document instead of just parent element. Fixes critical bug where `click(id: "button_X")` could click the wrong element (e.g., navigation button instead of action button) when multiple elements shared the same class like `.ant-btn`
9
+ - **findElementsByText click timeout** — `executeElementAction` click now uses adaptive strategy with 5s timeout and JS fallback instead of raw Puppeteer `element.click()` which could hang indefinitely on elements inside complex layouts (antd Tabs, scrollable containers)
10
+ - **findElementsByText non-unique selectors** — `getUniqueSelectorInPage` fallback now checks selector uniqueness at each level of path building (max depth 5→8), preventing clicks on wrong elements when multiple matches exist
11
+
12
+ ### Changed
13
+ - **Screenshot defaults optimized** — Default format changed from PNG/auto to JPEG quality 40 for all screenshot tools, reducing token usage from ~15-25k to ~5-10k tokens per screenshot
14
+ - **Action screenshots compressed** — Screenshots from click/findElementsByText/hover with `screenshot: true` now use lightweight JPEG (quality 40, maxWidth 800) instead of raw PNG, dramatically reducing context consumption
15
+ - **Jimp warmup** — Pre-warms Jimp image processor at server startup (non-blocking, after transport connect) to avoid cold-start delays on first screenshot
16
+
17
+ ## [3.5.0] - 2026-02-16
18
+
19
+ ### Added
20
+ - **Element Model System with Strategy Pattern** — Extensible architecture for custom UI components
21
+ - Base `ElementModel` class with interface for model definition
22
+ - `ModelRegistry` for automatic model selection and action routing
23
+ - 13 concrete models: TextInput, Checkbox, Radio, Button, Select, TextArea, Link, Range, DatePicker, DateInput, FileInput, ColorInput, Default
24
+ - Models integrated into APOM analyzer — elements now show model name and available actions
25
+
26
+ - **executeModelAction tool** — Universal tool for model-specific actions
27
+ - Supports APOM ID (`id` parameter) and CSS selector (`selector` parameter)
28
+ - Automatic routing via ModelRegistry.getActionHandler()
29
+ - Framework-specific actions (e.g., DatePicker SetDate, Checkbox toggle)
30
+
31
+ - **pressKey tool** — Keyboard key press with modifier support
32
+ - Press Enter, Escape, Tab, Arrow keys, Backspace, Delete, etc.
33
+ - Modifier keys: Control, Shift, Alt, Meta (e.g., Ctrl+A)
34
+ - Optional element targeting via APOM ID or CSS selector
35
+
36
+ - **executeDatePickerAction handler** — Generic date picker interaction
37
+ - Supports SetDate, SetDateTime, SetTime, and clear actions
38
+ - Finds inner input and types value with change/blur event dispatch
39
+ - Tested on Ant Design DatePicker
40
+
41
+ - **State-aware checkbox actions** — check/uncheck/toggle with skip logic
42
+ - `check` skips if already checked, `uncheck` skips if already unchecked
43
+ - `toggle` and `select` always click
44
+ - Returns descriptive message with final state (e.g., "check (already checked)")
45
+
46
+ - **TextArea append and clear** — New actions via executeModelAction
47
+ - `append` types text without clearing existing content
48
+ - `clear` empties the field completely
49
+ - Tested on Angular Material, Ant Design, MUI
50
+
51
+ ### Fixed
52
+ - **TextArea/TextInput append destroying existing text** — Verification in setValue() compared exact value on append, falling through to JS fallback that replaced all content. Now uses `endsWith()` check for append mode, and JS fallback appends instead of replacing.
53
+ - **Checkboxes with opacity:0 not appearing in APOM tree** — Updated `isVisible()` to allow stylable inputs (checkbox, radio, file) with `opacity:0`
54
+
5
55
  ## [3.4.1] - 2026-02-12
6
56
 
7
57
  ### Fixed