@thinkingos/vsl-mcp-server 1.3.8 → 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/README.md CHANGED
@@ -1,65 +1,65 @@
1
1
  # @thinkingos/vsl-mcp-server
2
2
 
3
- VSL MCP Server — интеграция Visual Scene Language с AI-агентами через [Model Context Protocol](https://modelcontextprotocol.io/) (MCP 2025-11-25).
3
+ VSL MCP Server — integration of Visual Scene Language with AI agents via [Model Context Protocol](https://modelcontextprotocol.io/) (MCP 2025-11-25).
4
4
 
5
- Позволяет AI-агентам (Claude Desktop, Cline, TaoCoder) взаимодействовать с веб-страницами через семантическую структуру VSL: читать страницы, выполнять действия, получать диффы изменений.
5
+ Enables AI agents (Claude Desktop, Cline, TaoCoder) to interact with web pages through VSL semantic structure: read pages, execute actions, and receive change diffs.
6
6
 
7
- ## Быстрая установка (одна команда)
7
+ ## Quick Installation (one command)
8
8
 
9
9
 
10
- # Через npx — автоматически скачивает пакет и запускает интерактивный setup:
10
+ # Via npx — automatically downloads the package and runs interactive setup:
11
11
  npx -p @thinkingos/vsl-mcp-server mcp-server-setup
12
12
 
13
13
 
14
- Setup скрипт поможет вам:
15
- 1. Проверить Node.js >= 18
16
- 2. Установить Playwright (опционально, для браузерных инструментов)
17
- 3. Сохранить конфигурацию в `~/.vsl/config.json`
18
- 4. Получить инструкции для подключения к агенту
19
- ## Установка из исходников (для разработчиков)
14
+ The setup script will help you:
15
+ 1. Check Node.js >= 18
16
+ 2. Install Playwright (optional, for browser tools)
17
+ 3. Save configuration to `~/.vsl/config.json`
18
+ 4. Get instructions for connecting to an agent
19
+ ## Installation from Source (for developers)
20
20
 
21
- ### Из корня monorepo
21
+ ### From the monorepo root
22
22
 
23
- # Клонировать репозиторий
23
+ # Clone the repository
24
24
  git clone <repo-url> visual-scene-language
25
25
  cd visual-scene-language
26
26
 
27
- # Установить зависимости
27
+ # Install dependencies
28
28
  npm install
29
29
 
30
- # Собрать пакет
30
+ # Build the package
31
31
  cd packages/mcp-server
32
32
  npm run build
33
- ### Интерактивная настройка (рекомендуется)
33
+ ### Interactive Setup (recommended)
34
34
 
35
35
 
36
- # Из корня monorepo:
36
+ # From the monorepo root:
37
37
  node packages/mcp-server/bin/setup.js
38
38
 
39
- # Или из директории packages/mcp-server:
39
+ # Or from the packages/mcp-server directory:
40
40
  npm run setup
41
41
 
42
42
 
43
- Setup скрипт поможет вам:
44
- 1. Проверить Node.js >= 18
45
- 2. Установить Playwright (опционально, для браузерных инструментов)
46
- 3. Сохранить конфигурацию в `~/.vsl/config.json`
47
- 4. Получить инструкции для подключения к агенту
43
+ The setup script will help you:
44
+ 1. Check Node.js >= 18
45
+ 2. Install Playwright (optional, for browser tools)
46
+ 3. Save configuration to `~/.vsl/config.json`
47
+ 4. Get instructions for connecting to an agent
48
48
 
49
- ## Конфигурация
49
+ ## Configuration
50
50
 
51
- ### API-ключи (env vars)
51
+ ### API Keys (env vars)
52
52
 
53
- # Минимум один провайдер для vision-backend (классификация элементов)
53
+ # At least one provider for vision-backend (element classification)
54
54
  export OPENAI_API_KEY="sk-..." # gpt-6-luna
55
55
  export ANTHROPIC_API_KEY="sk-ant-..." # claude-haiku-4-5
56
56
 
57
- # Или кастомный провайдер (любой OpenAI-compatible endpoint):
57
+ # Or a custom provider (any OpenAI-compatible endpoint):
58
58
  export VSL_VISION_PROVIDER="custom"
59
59
  export VSL_VISION_BASE_URL="https://api.together.xyz/v1"
60
60
  export VSL_VISION_API_KEY="your-key"
61
61
  export VSL_VISION_MODEL="meta-llama/Llama-Vision"
62
- ### Конфигурационный файл (опционально)
62
+ ### Configuration File (optional)
63
63
 
64
64
  `~/.vsl/config.json`:
65
65
 
@@ -73,59 +73,60 @@ export VSL_VISION_MODEL="meta-llama/Llama-Vision"
73
73
  "model": "meta-llama/Llama-Vision"
74
74
  }
75
75
  }
76
- Приоритет: env vars > config file > defaults.
76
+ Priority: env vars > config file > defaults.
77
77
 
78
- ## Инструменты
78
+ ## Tools
79
79
 
80
80
  ### vsl_get_snapshot
81
81
 
82
- Получить текущий VSL snapshot страницы. Возвращает VSL JSON с семантической структурой элементов.
82
+ Get the current VSL snapshot of the page. Returns VSL JSON with the semantic structure of elements.
83
83
 
84
- **Параметры:**
85
- - `url` (string, optional) — URL страницы. Если не указан, используется текущая страница.
86
- - `detail_level` (string, optional) — уровень детализации: `low` (только интерактивные элементы), `medium` (интерактивные + контейнеры, по умолчанию), `high` (все объекты).
87
- - `ttl` (number, optional) — TTL кэша в мс (по умолчанию 5000 = 5с). `0` — отключить кэширование.
88
- - `full` (boolean, optional) — полный режим: возвращает ВЕСЬ документ без вьюпорт-фильтра и фильтра детализации, минуя дифф-фёрст логику. Используйте, если история агента обрезалась и нужна полная картина страницы (заменяет удалённый тул `vsl_get_full_json`).
84
+ **Parameters:**
85
+ - `url` (string, optional) — Page URL. If not specified, uses the current page.
86
+ - `detail_level` (string, optional) — detail level: `low` (interactive elements only), `medium` (interactive + containers, default), `high` (all objects).
87
+ - `ttl` (number, optional) — cache TTL in ms (default 5000 = 5s). `0` — disable caching.
88
+ - `full` (boolean, optional) — full mode: returns the ENTIRE document without viewport filter and detail level filter, bypassing diff-first logic. Use if agent history was truncated and you need the full picture of the page (replaces the removed `vsl_get_full_json` tool).
89
89
 
90
- **Возвращает:** `VslDocument` — VSL JSON, отфильтрованный по видимому окну и уровню детализации (или полный при `full: true`). Содержит метаданные `scrollable: { top, bottom }` (есть ли контент выше/ниже видимого окна).
90
+ **Returns:** `VslDocument` — VSL JSON filtered by visible window and detail level (or full when `full: true`). Contains metadata `scrollable: { top, bottom }` (whether there is content above/below the visible window).
91
91
 
92
- **Кэширование:** повторный вызов с тем же URL в пределах TTL возвращает документ из кэша, перефильтрованный по новым параметрам, без обращения к браузеру.
92
+ **Caching:** repeated calls with the same URL within TTL return the document from cache, re-filtered by new parameters, without accessing the browser.
93
93
 
94
94
  ### vsl_execute_action
95
95
 
96
- Выполнить действие над элементом VSL.
96
+ Execute an action on a VSL element.
97
97
 
98
- **Параметры:**
99
- - `action` (string, required) — имя действия: `click`, `type`, `fill` (алиас `type`), `scroll`, `select`, `hover`, `focus`, `blur`, `check`, `uncheck`, `press`, `upload` (загрузка файла, требует `value` — путь к файлу или список путей через запятую), `download` (скачивание файла: клик по элементу либо прямое скачивание по URL через `value`)
100
- - `target_id` (string, required) — ID элемента в VSL JSON
101
- - `value` (string, optional) — значение для действия (текст для `type`, опция для `select`, путь к файлу для `upload`)
102
- - `timeout` (number, optional) — таймаут ожидания завершения скачивания в мс (только для действия `download`)
103
- - `save_path` (string, optional) — путь для сохранения скачанного файла (только для действия `download`; относительные пути разрешаются в папку загрузок с проверкой выхода за её пределы)
104
- - `return_state` (boolean, optional, по умолчанию `true`) — возвращать ли состояние страницы после действия (дифф + снапшот, отфильтрованные по видимому окну)
98
+ **Parameters:**
99
+ - `action` (string, required) — action name: `click`, `type`, `fill` (alias for `type`), `scroll`, `select`, `hover`, `focus`, `blur`, `check`, `uncheck`, `press`, `upload` (file upload, requires `value` — file path or comma-separated list of paths), `download` (file download: click on element or direct download by URL via `value`)
100
+ - `target_id` (string, required) — element ID in VSL JSON
101
+ - `value` (string, optional) — value for the action (text for `type`, option for `select`, file path for `upload`)
102
+ - `timeout` (number, optional) — download completion timeout in ms (only for `download` action)
103
+ - `save_path` (string, optional) — path to save the downloaded file (only for `download` action; relative paths are resolved to the downloads folder with boundary check)
104
+ - `return_state` (boolean, optional, default `true`) — whether to return page state after action (diff + snapshot filtered by visible window)
105
105
 
106
- **Возвращает:** результат выполнения действия.
106
+ **Returns:** action execution result.
107
107
 
108
- **Пример загрузки файла:**
108
+ **File upload example:**
109
109
 
110
110
 
111
111
  Agent: vsl_execute_action(action="upload", target_id="file_input_0", value="/path/to/document.pdf")
112
112
  → { success: true, data: { action: "upload", upload: { selector: "#file_input_0", files: ["/path/to/document.pdf"], success: true } } }
113
113
 
114
114
 
115
- Для загрузки нескольких файлов (если input имеет `multiple` атрибут):
115
+ For uploading multiple files (if input has `multiple` attribute):
116
116
 
117
117
 
118
118
  Agent: vsl_execute_action(action="upload", target_id="file_input_1", value="/path/file1.jpg, /path/file2.jpg")
119
119
  → { success: true, data: { upload: { files: ["/path/file1.jpg", "/path/file2.jpg"], success: true } } }
120
120
 
121
- **Пример скачивания файла (действие `download`):**
121
+
122
+ **File download example (`download` action):**
122
123
 
123
124
 
124
125
  Agent: vsl_execute_action(action="download", target_id="btn_download")
125
126
  → { success: true, data: { download: { downloadId: "dl_1", filename: "report.pdf", url: "https://example.com/report.pdf", status: "completed", path: "/downloads/report.pdf" } } }
126
127
 
127
128
 
128
- Прямое скачивание по URL с сохранением в указанный путь и таймаутом:
129
+ Direct download by URL with saving to specified path and timeout:
129
130
 
130
131
 
131
132
  Agent: vsl_execute_action(action="download", target_id="btn_download", value="https://example.com/file.pdf", save_path="/tmp/file.pdf", timeout=15000)
@@ -134,106 +135,106 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
134
135
 
135
136
 
136
137
  **Lazy Navigation (DEC-028):**
137
- Перед выполнением действия система автоматически проверяет, находится ли браузер на URL из текущего snapshot. Если нет — автоматически навигирует на нужный URL. Это позволяет агенту:
138
- 1. Прочитать страницу через HTTP-путь (быстро, без браузера)
139
- 2. Получить VSL JSON с семантической структурой
140
- 3. Вызвать `vsl_execute_action` — система автоматически запустит браузер и перейдёт на URL
138
+ Before executing an action, the system automatically checks if the browser is on the URL from the current snapshot. If not — it automatically navigates to the required URL. This allows the agent to:
139
+ 1. Read the page via HTTP path (fast, without browser)
140
+ 2. Get VSL JSON with semantic structure
141
+ 3. Call `vsl_execute_action` — the system will automatically launch the browser and navigate to the URL
141
142
 
142
- Агенту НЕ нужно явно вызывать `vsl_navigate` перед выполнением действий.
143
+ The agent does NOT need to explicitly call `vsl_navigate` before executing actions.
143
144
 
144
145
  ### vsl_navigate
145
146
 
146
- Перейти по URL.
147
+ Navigate to a URL.
147
148
 
148
- **Параметры:**
149
- - `url` (string, required) — URL для навигации
149
+ **Parameters:**
150
+ - `url` (string, required) — URL to navigate to
150
151
 
151
- **Возвращает:** успех/неудача навигации.
152
+ **Returns:** navigation success/failure.
152
153
 
153
154
  ### vsl_clear_cache
154
155
 
155
- Сбросить кэш VSL snapshot. Следующий вызов `vsl_get_snapshot` создаст новый snapshot с нуля.
156
+ Clear the VSL snapshot cache. The next `vsl_get_snapshot` call will create a new snapshot from scratch.
156
157
 
157
- **Параметры:** нет.
158
+ **Parameters:** none.
158
159
 
159
160
  ### vsl_get_visual
160
161
 
161
- Получить visual fragment для элемента (base64 WebP изображение). Автоматически прокручивает страницу к элементу если он вне viewport.
162
+ Get a visual fragment for an element (base64 WebP image). Automatically scrolls the page to the element if it's outside the viewport.
162
163
 
163
- **Параметры:**
164
- - `element_id` (string, required) — ID элемента в VSL JSON
165
- - `auto_scroll` (boolean, optional, default: true) — автоматически прокручивать к элементу если он вне viewport
166
- - `auto_refresh` (boolean, optional, default: false) — автоматически обновлять snapshot перед поиском
164
+ **Parameters:**
165
+ - `element_id` (string, required) — element ID in VSL JSON
166
+ - `auto_scroll` (boolean, optional, default: true) — automatically scroll to element if it's outside viewport
167
+ - `auto_refresh` (boolean, optional, default: false) — automatically refresh snapshot before searching
167
168
 
168
- **Возвращает:** base64-изображение элемента. Если был выполнен автоскролл, результат содержит `scroll_info: { scrolled: true, scroll_offset: { x, y } }`.
169
+ **Returns:** base64 image of the element. If auto-scroll was performed, the result contains `scroll_info: { scrolled: true, scroll_offset: { x, y } }`.
169
170
 
170
171
  ### vsl_read_page
171
172
 
172
- Гибридное чтение веб-страниц с автоматической стратегией. HTTP-first для статических страниц; автоматическое переключение на рендер через браузер для SPA.
173
+ Hybrid web page reading with automatic strategy. HTTP-first for static pages; automatic switching to browser rendering for SPAs.
173
174
 
174
- **Параметры:**
175
- - `url` (string, required) — URL страницы для чтения
176
- - `readable` (boolean, optional) — фильтрация шума (nav, footer, cookie banners)
175
+ **Parameters:**
176
+ - `url` (string, required) — page URL to read
177
+ - `readable` (boolean, optional) — noise filtering (nav, footer, cookie banners)
177
178
 
178
179
 
179
- **Автоматическая стратегия:**
180
- - Система сама определяет оптимальный путь: HTTP для статических страниц, Render для SPA
181
- - Агент НЕ выбирает режим — нет параметра `mode`
182
- - SPA-маркеры (id="root", id="app", data-reactroot, ng-app) автоматически переключают на Render-путь
180
+ **Automatic strategy:**
181
+ - The system determines the optimal path itself: HTTP for static pages, Render for SPAs
182
+ - The agent does NOT choose the mode — there is no `mode` parameter
183
+ - SPA markers (id="root", id="app", data-reactroot, ng-app) automatically switch to Render path
183
184
 
184
- **Особенности:**
185
- - Повторные чтения возвращают diff (Snapshot Session)
186
- - Readable-режим фильтрует nav, footer, cookie banners
187
- - HTTP-путь возвращает VSL JSON с семантической структурой без координат (объекты без `p`/`s` прозрачно проходят вьюпорт-фильтр)
188
- - Render-путь возвращает полный VSL JSON с абсолютными пиксельными координатами для выполнения действий
185
+ **Features:**
186
+ - Repeated reads return diff (Snapshot Session)
187
+ - Readable mode filters nav, footer, cookie banners
188
+ - HTTP path returns VSL JSON with semantic structure without coordinates (objects without `p`/`s` transparently pass viewport filter)
189
+ - Render path returns full VSL JSON with absolute pixel coordinates for executing actions
189
190
 
190
- **Возвращает:** VSL JSON структуру страницы (полный документ или diff).
191
+ **Returns:** VSL JSON structure of the page (full document or diff).
191
192
 
192
193
  ### vsl_get_text_block
193
194
 
194
- Получить полный текст по `txt_ref` из ленивой загрузки текстов. Тексты длиннее ~200 символов в снапшоте автоматически заменяются на `txt_preview` (первые ~50 символов) + `txt_ref` (ссылка вида `tb_001`).
195
+ Get the full text by `txt_ref` from lazy text loading. Texts longer than ~200 characters in the snapshot are automatically replaced with `txt_preview` (first ~50 characters) + `txt_ref` (reference like `tb_001`).
195
196
 
196
- **Параметры:**
197
- - `block_id` (string, required) — ID текстового блока из поля `txt_ref` объекта снапшота (формат `tb_xxx`)
197
+ **Parameters:**
198
+ - `block_id` (string, required) — text block ID from the `txt_ref` field of the snapshot object (format `tb_xxx`)
198
199
 
199
- **Возвращает:** `{ block_id, text }` — полное содержимое текстового блока.
200
+ **Returns:** `{ block_id, text }` — full content of the text block.
200
201
 
201
- ## Единый пайплайн отдачи: полный кэш + фильтрация на отдаче
202
+ ## Unified Delivery Pipeline: Full Cache + Filtering on Delivery
202
203
 
203
- Все пути отдачи (`vsl_get_snapshot`, `vsl_navigate`, `vsl_execute_action` с `return_state`, браузерный путь `vsl_read_page`) используют единый пайплайн:
204
+ All delivery paths (`vsl_get_snapshot`, `vsl_navigate`, `vsl_execute_action` with `return_state`, browser path `vsl_read_page`) use a unified pipeline:
204
205
 
205
- 1. **Полное извлечение** — из браузера извлекается ПОЛНОЕ DOM-дерево, включая элементы вне видимой области (никакого усечения на этапе извлечения).
206
- 2. **Полный кэш** — сессия хранит полный `VslDocument`; диффы считаются на полных документах.
207
- 3. **Абсолютные координаты** — поле `p` объекта: абсолютные страница-релятивные пиксели `[x, y]` (с учётом скролла страницы); `s` — размер `[ширина, высота]`. Координаты инвариантны к ресайзу окна.
208
- 4. **Фильтрация на отдаче** — видимое окно = `[скролл, скролл + вьюпорт]`; сначала вьюпорт-фильтр (контейнер жив, пока есть видимые потомки), затем фильтр детализации `detail_level`.
209
- 5. **Метаданные скролла** — результат содержит `scrollable: { top, bottom }`: есть ли контент выше/ниже видимого окна (ориентир для действий `scroll`).
206
+ 1. **Full extraction** — the FULL DOM tree is extracted from the browser, including elements outside the visible area (no truncation at the extraction stage).
207
+ 2. **Full cache** — the session stores the full `VslDocument`; diffs are calculated on full documents.
208
+ 3. **Absolute coordinates** — the `p` field of an object: absolute page-relative pixels `[x, y]` (accounting for page scroll); `s` — size `[width, height]`. Coordinates are invariant to window resize.
209
+ 4. **Filtering on delivery** — visible window = `[scroll, scroll + viewport]`; first viewport filter (container lives as long as there are visible descendants), then `detail_level` filter.
210
+ 5. **Scroll metadata** — the result contains `scrollable: { top, bottom }`: whether there is content above/below the visible window (guide for `scroll` actions).
210
211
 
211
- **Различия режимов:**
212
+ **Mode differences:**
212
213
 
213
- | | ХТТП-режим (`vsl_read_page`) | Браузерный режим |
214
+ | | HTTP mode (`vsl_read_page`) | Browser mode |
214
215
  |---|---|---|
215
- | Когда | статические страницы | SPA и интерактивные страницы |
216
- | Координаты | отсутствуют (`p`/`s` = null) | абсолютные пиксели |
217
- | Вьюпорт-фильтр | прозрачен (все объекты проходят) | отсекает невидимые элементы |
218
- | Действия | недоступны напрямую — `vsl_execute_action` сам запустит браузер (ленивая навигация) | полный набор действий |
216
+ | When | static pages | SPA and interactive pages |
217
+ | Coordinates | absent (`p`/`s` = null) | absolute pixels |
218
+ | Viewport filter | transparent (all objects pass) | cuts off invisible elements |
219
+ | Actions | not directly available — `vsl_execute_action` will launch the browser itself (lazy navigation) | full set of actions |
219
220
 
220
- **Повторные запросы без браузера:** смена `detail_level` или `full` в пределах кэша перефильтровывает документ из кэша — без повторного извлечения.
221
+ **Repeated requests without browser:** changing `detail_level` or `full` within the cache re-filters the document from cache — without re-extraction.
221
222
 
222
- ## Ресурсы (MCP Resources)
223
+ ## Resources (MCP Resources)
223
224
 
224
225
  ### vsl://current
225
226
 
226
- Текущий VSL snapshot страницы. Содержит полную семантическую структуру элементов.
227
+ Current VSL snapshot of the page. Contains the full semantic structure of elements.
227
228
 
228
229
  ### vsl://diff
229
230
 
230
- Последний VSL diff с момента предыдущего snapshot. Содержит только изменения (added/modified/removed).
231
+ Latest VSL diff since the previous snapshot. Contains only changes (added/modified/removed).
231
232
 
232
- ## Интеграция с AI-агентами
233
+ ## Integration with AI Agents
233
234
 
234
235
  ### Claude Desktop
235
236
 
236
- Добавьте в `~/Library/Application Support/Claude/claude_desktop_config.json`:
237
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
237
238
 
238
239
  {
239
240
  "mcpServers": {
@@ -248,14 +249,14 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
248
249
  }
249
250
  ### Cline
250
251
 
251
- Добавьте в настройки Cline (VS Code → Settings → Cline → MCP Servers → Add Server → Local (stdio)):
252
+ Add to Cline settings (VS Code → Settings → Cline → MCP Servers → Add Server → Local (stdio)):
252
253
 
253
254
  - **Server Name:** `vsl`
254
255
  - **Command:** `node`
255
256
  - **Arguments:** `/absolute/path/to/visual-scene-language/packages/mcp-server/dist/index.js`
256
257
  - **Environment variables:**
257
258
  OPENAI_API_KEY=sk-...
258
- Или JSON-формат:
259
+ Or JSON format:
259
260
 
260
261
  {
261
262
  "vsl": {
@@ -268,7 +269,7 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
268
269
  }
269
270
  ### TaoCoder
270
271
 
271
- Добавьте в `.taocoder/mcp.json`:
272
+ Add to `.taocoder/mcp.json`:
272
273
 
273
274
  {
274
275
  "servers": {
@@ -283,7 +284,7 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
283
284
  }
284
285
  ### Cursor
285
286
 
286
- Добавьте в `.cursor/mcp.json`:
287
+ Add to `.cursor/mcp.json`:
287
288
 
288
289
  {
289
290
  "mcpServers": {
@@ -296,17 +297,17 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
296
297
  }
297
298
  }
298
299
  }
299
- > **💡 Подсказка:** Замените `/absolute/path/to/visual-scene-language` на реальный путь к вашему репозиторию. Если вы настроили vision через `~/.vsl/config.json`, env vars можно не указывать.
300
+ > **💡 Tip:** Replace `/absolute/path/to/visual-scene-language` with the actual path to your repository. If you configured vision via `~/.vsl/config.json`, you don't need to specify env vars.
300
301
 
301
- ## Примеры использования
302
+ ## Usage Examples
302
303
 
303
- ### Чтение статической страницы
304
+ ### Reading a Static Page
304
305
 
305
306
  Agent: vsl_read_page(url="https://example.com/article")
306
307
  → { status: "success", data: { mode: "http", content: "...", vslDocument: {...}, metadata: { title: "Example Article", wordCount: 1500 } } }
307
- ### Чтение SPA (автоматическое переключение на Render)
308
+ ### Reading an SPA (automatic switching to Render)
308
309
 
309
- # Система автоматически детектирует SPA-маркеры и переключается на Render-путь
310
+ # The system automatically detects SPA markers and switches to Render path
310
311
  Agent: vsl_read_page(url="https://spa-app.com/dashboard")
311
312
  → { status: "success", data: { mode: "render", vslDocument: {...}, hasDiff: false } }
312
313
 
@@ -315,12 +316,12 @@ Agent: vsl_execute_action(action="click", target_id="btn_refresh")
315
316
 
316
317
  Agent: vsl_read_page(url="https://spa-app.com/dashboard")
317
318
  → { status: "success", data: { mode: "render", diff: { added: [...], modified: [...] }, hasDiff: true } }
318
- ### Получение полного снапшота при потере контекста
319
+ ### Getting Full Snapshot When Context is Lost
319
320
 
320
- # История агента обрезалась — запрашиваем полный документ без фильтров
321
+ # Agent history was truncated — request full document without filters
321
322
  Agent: vsl_get_snapshot(full=true)
322
- → { vsl_version: "1.0.0", canvas: {...}, objects: [ ...все элементы, включая невидимые... ] }
323
- ## Архитектура
323
+ → { vsl_version: "1.0.0", canvas: {...}, objects: [ ...all elements, including invisible... ] }
324
+ ## Architecture
324
325
 
325
326
  ┌─────────────────────────────────────────────┐
326
327
  │ AI Agent (Claude Desktop / Cline / etc.) │
@@ -347,39 +348,39 @@ Agent: vsl_get_snapshot(full=true)
347
348
  │ ├── Diff Engine → VslDiff │
348
349
  │ └── Vision Classifier (LLM flash models) │
349
350
  └─────────────────────────────────────────────┘
350
- ## Исправления (Bug Fixes)
351
+ ## Bug Fixes
351
352
 
352
- > **ID Stability после fill action** — элементы сохраняют свои короткие ID после изменений DOM.
353
+ > **ID Stability after fill action** — elements retain their short IDs after DOM changes.
353
354
 
354
- > **Iframe ID Resolution** — исправлен резолв ID для элементов внутри iframe (используется полный `target_id` с префиксом `iframe_N:`).
355
+ > **Iframe ID Resolution** — fixed ID resolution for elements inside iframes (uses full `target_id` with `iframe_N:` prefix).
355
356
 
356
- > **Lazy Text Loading** — тексты длиннее ~200 символов автоматически заменяются на `txt_preview` + `txt_ref` для экономии токенов.
357
+ > **Lazy Text Loading** — texts longer than ~200 characters are automatically replaced with `txt_preview` + `txt_ref` to save tokens.
357
358
 
358
- > **Lazy Navigation** — автоматическая навигация на URL перед выполнением действий, если браузер не на нужной странице.
359
+ > **Lazy Navigation** — automatic navigation to URL before executing actions if the browser is not on the correct page.
359
360
 
360
- ## Требования
361
+ ## Requirements
361
362
 
362
363
  - Node.js ≥ 18
363
- - Playwright (опционально, для SPA-рендеринга): `npx playwright install chromium`
364
- - API-ключ хотя бы одного провайдера (OpenAI / Anthropic / Custom) для vision-backend
364
+ - Playwright (optional, for SPA rendering): `npx playwright install chromium`
365
+ - API key for at least one provider (OpenAI / Anthropic / Custom) for vision-backend
365
366
 
366
367
  ## Vision-backend
367
368
 
368
- Для классификации элементов без A11y-семантики используются дешёвые flash-модели:
369
+ For classifying elements without A11y semantics, cheap flash models are used:
369
370
 
370
- | Провайдер | Модель | Env var |
371
+ | Provider | Model | Env var |
371
372
  |-----------|--------|---------|
372
373
  | OpenAI | gpt-6-luna | `OPENAI_API_KEY` |
373
374
  | Anthropic | claude-haiku-4-5 | `ANTHROPIC_API_KEY` |
374
- | Custom | любая OpenAI-compatible | `VSL_VISION_BASE_URL` + `VSL_VISION_API_KEY` + `VSL_VISION_MODEL` |
375
+ | Custom | any OpenAI-compatible | `VSL_VISION_BASE_URL` + `VSL_VISION_API_KEY` + `VSL_VISION_MODEL` |
375
376
 
376
- Модель конфигурируется через `vision.provider` и `vision.model` в config file.
377
+ The model is configured via `vision.provider` and `vision.model` in the config file.
377
378
 
378
- ### Кастомные провайдеры
379
+ ### Custom Providers
379
380
 
380
- Поддерживаются любые OpenAI-compatible API (Together AI, Groq, OpenRouter, локальные модели через Ollama/vLLM и т.д.). Укажите `provider: "custom"`, `baseUrl`, `apiKey` и `model` в конфиге или через env vars.
381
+ Any OpenAI-compatible APIs are supported (Together AI, Groq, OpenRouter, local models via Ollama/vLLM, etc.). Specify `provider: "custom"`, `baseUrl`, `apiKey`, and `model` in the config or via env vars.
381
382
 
382
- **Пример для Together AI:**
383
+ **Example for Together AI:**
383
384
 
384
385
  {
385
386
  "vision": {
@@ -389,7 +390,7 @@ Agent: vsl_get_snapshot(full=true)
389
390
  "model": "meta-llama/Llama-Vision"
390
391
  }
391
392
  }
392
- **Пример для Groq:**
393
+ **Example for Groq:**
393
394
 
394
395
  {
395
396
  "vision": {
@@ -399,6 +400,6 @@ Agent: vsl_get_snapshot(full=true)
399
400
  "model": "llama-3.2-90b-vision-preview"
400
401
  }
401
402
  }
402
- ## Лицензия
403
+ ## License
403
404
 
404
405
  SEE LICENSE IN LICENSE.txt