@thinkingos/vsl-mcp-server 1.3.5 → 1.3.7
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/bin/setup.js +40 -40
- package/dist/index.js +33 -33
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/bin/setup.js
CHANGED
|
@@ -42,7 +42,7 @@ function ok(msg) { log(`${C.green}✅ ${msg}${C.reset}`); }
|
|
|
42
42
|
function warn(msg) { log(`${C.yellow}⚠️ ${msg}${C.reset}`); }
|
|
43
43
|
function fail(msg) { log(`${C.red}❌ ${msg}${C.reset}`); }
|
|
44
44
|
function info(msg) { log(`${C.blue}ℹ️ ${msg}${C.reset}`); }
|
|
45
|
-
function step(n, msg) { log(`\n${C.bold}${C.cyan}
|
|
45
|
+
function step(n, msg) { log(`\n${C.bold}${C.cyan}Step ${n}.${C.reset} ${C.bold}${msg}${C.reset}`); }
|
|
46
46
|
|
|
47
47
|
// ─── Readline helpers ─────────────────────────────────────────────────────────
|
|
48
48
|
|
|
@@ -65,18 +65,18 @@ async function askYesNo(question, defaultAnswer = 'y') {
|
|
|
65
65
|
// ─── Step 1: Node.js version check ───────────────────────────────────────────
|
|
66
66
|
|
|
67
67
|
function checkNodeVersion() {
|
|
68
|
-
step(1, '
|
|
68
|
+
step(1, 'Checking Node.js');
|
|
69
69
|
|
|
70
70
|
const major = parseInt(process.versions.node.split('.')[0], 10);
|
|
71
71
|
const full = process.versions.node;
|
|
72
72
|
|
|
73
73
|
if (major >= 18) {
|
|
74
|
-
ok(`Node.js v${full} —
|
|
74
|
+
ok(`Node.js v${full} — OK (>= 18)`);
|
|
75
75
|
return true;
|
|
76
76
|
} else {
|
|
77
|
-
fail(`Node.js v${full} —
|
|
78
|
-
log(`
|
|
79
|
-
log(`
|
|
77
|
+
fail(`Node.js v${full} — requires >= 18`);
|
|
78
|
+
log(` Install Node.js 18+: ${C.dim}https://nodejs.org/${C.reset}`);
|
|
79
|
+
log(` Or use nvm: ${C.dim}nvm install 18 && nvm use 18${C.reset}`);
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -115,42 +115,42 @@ function checkChromiumInstalled() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
async function setupPlaywright() {
|
|
118
|
-
step(2, 'Playwright (
|
|
118
|
+
step(2, 'Playwright (for browser tools)');
|
|
119
119
|
|
|
120
120
|
// Проверяем, установлен ли playwright как пакет
|
|
121
121
|
const pwPackageInstalled = checkPlaywrightInstalled();
|
|
122
122
|
|
|
123
123
|
if (!pwPackageInstalled) {
|
|
124
|
-
info('Playwright
|
|
125
|
-
const installPw = await askYesNo('📦
|
|
124
|
+
info('Playwright is not installed as a package');
|
|
125
|
+
const installPw = await askYesNo('📦 Install Playwright?');
|
|
126
126
|
if (!installPw) {
|
|
127
|
-
warn('
|
|
128
|
-
info(
|
|
127
|
+
warn('Skipped. Static pages (HTTP mode) will work without Playwright.');
|
|
128
|
+
info(`Install later: ${C.dim}npm install playwright && npx playwright install chromium${C.reset}`);
|
|
129
129
|
return false;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
log(` ${C.dim}
|
|
132
|
+
log(` ${C.dim}Installing playwright...${C.reset}`);
|
|
133
133
|
try {
|
|
134
134
|
execSync('npm install playwright', { stdio: 'inherit', timeout: 120000 });
|
|
135
|
-
ok('Playwright
|
|
135
|
+
ok('Playwright package installed');
|
|
136
136
|
} catch (error) {
|
|
137
|
-
fail(
|
|
137
|
+
fail(`Failed to install playwright: ${error.message}`);
|
|
138
138
|
return false;
|
|
139
139
|
}
|
|
140
140
|
} else {
|
|
141
|
-
ok('Playwright
|
|
141
|
+
ok('Playwright package is already installed');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// Проверяем, установлен ли chromium браузер
|
|
145
|
-
info('
|
|
145
|
+
info('Checking chromium browser...');
|
|
146
146
|
try {
|
|
147
147
|
// Просто пробуем установить — если уже установлен, playwright скажет "already installed"
|
|
148
148
|
log(` ${C.dim}npx playwright install chromium...${C.reset}`);
|
|
149
149
|
execSync('npx playwright install chromium', { stdio: 'inherit', timeout: 180000 });
|
|
150
|
-
ok('Chromium
|
|
150
|
+
ok('Chromium is ready');
|
|
151
151
|
} catch (error) {
|
|
152
|
-
warn(
|
|
153
|
-
info(
|
|
152
|
+
warn(`Failed to install chromium: ${error.message}`);
|
|
153
|
+
info(`Try manually: ${C.dim}npx playwright install chromium${C.reset}`);
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -173,7 +173,7 @@ function loadOrCreateConfig(configPath) {
|
|
|
173
173
|
try {
|
|
174
174
|
return JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
175
175
|
} catch {
|
|
176
|
-
warn('
|
|
176
|
+
warn('Failed to read existing config.json, creating a new one');
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
return {};
|
|
@@ -186,7 +186,7 @@ function saveConfig(configPath, config) {
|
|
|
186
186
|
// ─── Step 6: Output agent instructions ───────────────────────────────────────
|
|
187
187
|
|
|
188
188
|
function printAgentInstructions(visionConfig) {
|
|
189
|
-
step(6, '
|
|
189
|
+
step(6, 'Connecting to your agent');
|
|
190
190
|
|
|
191
191
|
const mcpServerPath = join(process.cwd(), 'dist', 'index.js');
|
|
192
192
|
const hasLocalDist = existsSync(mcpServerPath);
|
|
@@ -218,10 +218,10 @@ function printAgentInstructions(visionConfig) {
|
|
|
218
218
|
|
|
219
219
|
log('');
|
|
220
220
|
log(`${C.bold}═══════════════════════════════════════════════════════════${C.reset}`);
|
|
221
|
-
log(`${C.bold}
|
|
221
|
+
log(`${C.bold} Configure MCP server in your agent${C.reset}`);
|
|
222
222
|
log(`${C.bold}═══════════════════════════════════════════════════════════${C.reset}`);
|
|
223
223
|
log('');
|
|
224
|
-
log(`${C.bold}Local (stdio)
|
|
224
|
+
log(`${C.bold}Local (stdio) configuration:${C.reset}`);
|
|
225
225
|
log('');
|
|
226
226
|
log(` ${C.bold}Server Name:${C.reset} vsl`);
|
|
227
227
|
|
|
@@ -242,7 +242,7 @@ function printAgentInstructions(visionConfig) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
log('');
|
|
245
|
-
log(`${C.dim}──
|
|
245
|
+
log(`${C.dim}── Or JSON config ──${C.reset}`);
|
|
246
246
|
log('');
|
|
247
247
|
|
|
248
248
|
const jsonConfig = {
|
|
@@ -259,14 +259,14 @@ function printAgentInstructions(visionConfig) {
|
|
|
259
259
|
log(` ${C.dim}${JSON.stringify(jsonConfig, null, 2).split('\n').join('\n ')}${C.reset}`);
|
|
260
260
|
|
|
261
261
|
log('');
|
|
262
|
-
log(`${C.dim}──
|
|
262
|
+
log(`${C.dim}── Where to paste ──${C.reset}`);
|
|
263
263
|
log('');
|
|
264
264
|
log(` ${C.bold}Cline:${C.reset} VS Code → Settings → Cline → MCP Servers → Add Server`);
|
|
265
265
|
log(` ${C.bold}Claude Desktop:${C.reset} ~/Library/Application Support/Claude/claude_desktop_config.json`);
|
|
266
266
|
log(` ${C.bold}TaoCoder:${C.reset} .taocoder/mcp.json`);
|
|
267
267
|
log(` ${C.bold}Cursor:${C.reset} .cursor/mcp.json`);
|
|
268
268
|
log('');
|
|
269
|
-
log(`${C.dim}💡
|
|
269
|
+
log(`${C.dim}💡 If you configured vision via ~/.vsl/config.json, you don\'t need to specify env vars.${C.reset}`);
|
|
270
270
|
log('');
|
|
271
271
|
}
|
|
272
272
|
|
|
@@ -274,13 +274,13 @@ function printAgentInstructions(visionConfig) {
|
|
|
274
274
|
|
|
275
275
|
async function main() {
|
|
276
276
|
log('');
|
|
277
|
-
log(`${C.bold}🚀 VSL MCP Server —
|
|
277
|
+
log(`${C.bold}🚀 VSL MCP Server — Setup${C.reset}`);
|
|
278
278
|
log('');
|
|
279
|
-
log('
|
|
280
|
-
log(' 1.
|
|
281
|
-
log(' 2.
|
|
282
|
-
log(' 3.
|
|
283
|
-
log(' 4.
|
|
279
|
+
log('This script will help you:');
|
|
280
|
+
log(' 1. Check Node.js');
|
|
281
|
+
log(' 2. Install Playwright (for browser tools)');
|
|
282
|
+
log(' 3. Save configuration');
|
|
283
|
+
log(' 4. Get instructions for connecting to your agent');
|
|
284
284
|
log('');
|
|
285
285
|
|
|
286
286
|
// Шаг 1: Node.js
|
|
@@ -292,23 +292,23 @@ async function main() {
|
|
|
292
292
|
await setupPlaywright();
|
|
293
293
|
|
|
294
294
|
// Шаг 3: Сохранение конфига
|
|
295
|
-
step(3, '
|
|
295
|
+
step(3, 'Saving configuration');
|
|
296
296
|
|
|
297
297
|
const configPath = join(ensureConfigDir(), 'config.json');
|
|
298
298
|
const config = loadOrCreateConfig(configPath);
|
|
299
299
|
saveConfig(configPath, config);
|
|
300
|
-
ok(
|
|
300
|
+
ok(`Configuration saved: ${configPath}`);
|
|
301
301
|
|
|
302
302
|
// Шаг 4: Инструкции
|
|
303
303
|
printAgentInstructions(null);
|
|
304
304
|
|
|
305
305
|
// Финал
|
|
306
|
-
log(`${C.bold}✨
|
|
306
|
+
log(`${C.bold}✨ Done!${C.reset}`);
|
|
307
307
|
log('');
|
|
308
|
-
log('
|
|
309
|
-
log(` 1.
|
|
310
|
-
log(` 2.
|
|
311
|
-
log(` 3.
|
|
308
|
+
log('Next steps:');
|
|
309
|
+
log(` 1. Add the MCP server to your agent (instructions above)`);
|
|
310
|
+
log(` 2. Restart your agent`);
|
|
311
|
+
log(` 3. Use tools: vsl_read_page, vsl_get_snapshot, vsl_execute_action, ...`);
|
|
312
312
|
log('');
|
|
313
313
|
|
|
314
314
|
rl.close();
|
|
@@ -316,7 +316,7 @@ async function main() {
|
|
|
316
316
|
|
|
317
317
|
// Запуск
|
|
318
318
|
main().catch((error) => {
|
|
319
|
-
fail(
|
|
319
|
+
fail(`Error: ${error.message}`);
|
|
320
320
|
rl.close();
|
|
321
321
|
process.exit(1);
|
|
322
322
|
});
|
package/dist/index.js
CHANGED
|
@@ -5518,59 +5518,59 @@ async function handleClickCoordinates(args, browser, session, sessionId) {
|
|
|
5518
5518
|
var VSL_TOOLS = [
|
|
5519
5519
|
{
|
|
5520
5520
|
name: "vsl_get_snapshot",
|
|
5521
|
-
description: "
|
|
5521
|
+
description: "Get the current VSL snapshot of the page. Returns a VSL JSON with the semantic structure of elements. VSL (Visual Scene Language) is a JSON representation of the page where each element has: id (unique identifier, e.g. btn_123), type (button/input/link/text/image), text (text content), bbox ([x,y,width,height]), children (nested elements). Example: { viewport:{width:1920,height:1080}, objects:[{id:btn_1,type:button,text:Sign in,bbox:[100,200,80,30]},{id:inp_2,type:input,text:,bbox:[100,250,200,30]}] }. Usage: get the snapshot, find the desired element by id, then use vsl_execute_action to interact. Lazy text loading (DEC-026): texts longer than 200 characters are automatically replaced with txt_preview (first ~50 characters) + txt_ref (reference like tb_001). Full texts are stored in the text_blocks map. Use vsl_get_text_block to retrieve the full text. Parameters: detail_level (low/medium/high) for object filtering, ttl (ms) for caching.",
|
|
5522
5522
|
inputSchema: {
|
|
5523
5523
|
type: "object",
|
|
5524
5524
|
properties: {
|
|
5525
5525
|
url: {
|
|
5526
5526
|
type: "string",
|
|
5527
|
-
description: "URL
|
|
5527
|
+
description: "Page URL (optional, if not specified \u2014 uses the current page)"
|
|
5528
5528
|
},
|
|
5529
5529
|
detail_level: {
|
|
5530
5530
|
type: "string",
|
|
5531
5531
|
enum: ["low", "medium", "high"],
|
|
5532
|
-
description: "
|
|
5532
|
+
description: "Snapshot detail level. 'low': interactive elements only (buttons, links, inputs). 'medium': interactive + containers (default). 'high': all objects (full DOM). Default: 'medium'."
|
|
5533
5533
|
},
|
|
5534
5534
|
ttl: {
|
|
5535
5535
|
type: "number",
|
|
5536
|
-
description: "TTL
|
|
5536
|
+
description: "Cache TTL in milliseconds (default: 5000 = 5s). Set to 0 to disable caching."
|
|
5537
5537
|
},
|
|
5538
5538
|
full: {
|
|
5539
5539
|
type: "boolean",
|
|
5540
|
-
description: "
|
|
5540
|
+
description: "Full mode: returns the entire document without filters (replacement for the removed full snapshot tool)"
|
|
5541
5541
|
}
|
|
5542
5542
|
}
|
|
5543
5543
|
}
|
|
5544
5544
|
},
|
|
5545
5545
|
{
|
|
5546
5546
|
name: "vsl_execute_action",
|
|
5547
|
-
description: '
|
|
5547
|
+
description: 'Execute an action on a VSL element. Find the element by id in the snapshot (vsl_get_snapshot), then call this action. Supported actions: click (click on element), type (enter text, requires value), fill (alias for type, enter text, requires value), scroll (scroll, format: "up", "down", "left", "right" or "dir:amount", e.g. "down:300"), select (select option, requires value), hover, focus, blur, check, uncheck, press (press a keyboard key, requires value \u2014 key name, e.g. "Enter", "Tab", "Escape", "ArrowDown", "ArrowUp", "Space", "Backspace". Used for submitting forms via Enter, navigating via Tab, closing modals via Escape, etc.), upload (file upload, requires value \u2014 file path or comma-separated list of paths). Example: {action:click, target_id:btn_1} or {action:type, target_id:inp_2, value:hello@mail.com} or {action:fill, target_id:inp_2, value:hello@mail.com} or {action:press, target_id:inp_1, value:Enter} or {action:upload, target_id:file_input_0, value:/path/to/file.pdf}. Parameter return_state=true returns diff and snapshot after the action.',
|
|
5548
5548
|
inputSchema: {
|
|
5549
5549
|
type: "object",
|
|
5550
5550
|
properties: {
|
|
5551
5551
|
action: {
|
|
5552
5552
|
type: "string",
|
|
5553
|
-
description: "
|
|
5553
|
+
description: "Action name (click, type, fill, scroll, select, etc.)"
|
|
5554
5554
|
},
|
|
5555
5555
|
target_id: {
|
|
5556
5556
|
type: "string",
|
|
5557
|
-
description: "ID
|
|
5557
|
+
description: "Target element ID in VSL JSON"
|
|
5558
5558
|
},
|
|
5559
5559
|
value: {
|
|
5560
5560
|
type: "string",
|
|
5561
|
-
description: "
|
|
5561
|
+
description: "Value for the action (e.g. text for type/fill, option for select)"
|
|
5562
5562
|
},
|
|
5563
5563
|
return_state: {
|
|
5564
5564
|
type: "boolean",
|
|
5565
|
-
description: "
|
|
5565
|
+
description: "If true, returns diff and snapshot after the action. Useful for tracking DOM changes without an additional vsl_get_diff call. Default: true \u2014 always return state to save agent steps. Set to false to disable."
|
|
5566
5566
|
},
|
|
5567
5567
|
timeout: {
|
|
5568
5568
|
type: "number",
|
|
5569
|
-
description: "
|
|
5569
|
+
description: "Download completion timeout in ms (only for download action)"
|
|
5570
5570
|
},
|
|
5571
5571
|
save_path: {
|
|
5572
5572
|
type: "string",
|
|
5573
|
-
description: "
|
|
5573
|
+
description: "Path to save the downloaded file (only for download action)"
|
|
5574
5574
|
}
|
|
5575
5575
|
},
|
|
5576
5576
|
required: ["action", "target_id"]
|
|
@@ -5578,13 +5578,13 @@ var VSL_TOOLS = [
|
|
|
5578
5578
|
},
|
|
5579
5579
|
{
|
|
5580
5580
|
name: "vsl_navigate",
|
|
5581
|
-
description: '
|
|
5581
|
+
description: 'Navigate to a URL in the browser. Use this to open a new page before getting a snapshot. Example: {url:"https://example.com"}. Returns {status:"success"} or {status:"error", message:"..."}. After navigation, call vsl_get_snapshot to get the page structure.',
|
|
5582
5582
|
inputSchema: {
|
|
5583
5583
|
type: "object",
|
|
5584
5584
|
properties: {
|
|
5585
5585
|
url: {
|
|
5586
5586
|
type: "string",
|
|
5587
|
-
description: "URL
|
|
5587
|
+
description: "URL to navigate to"
|
|
5588
5588
|
}
|
|
5589
5589
|
},
|
|
5590
5590
|
required: ["url"]
|
|
@@ -5592,7 +5592,7 @@ var VSL_TOOLS = [
|
|
|
5592
5592
|
},
|
|
5593
5593
|
{
|
|
5594
5594
|
name: "vsl_clear_cache",
|
|
5595
|
-
description: "
|
|
5595
|
+
description: "Clear the VSL snapshot cache. Use when you need a fresh snapshot from scratch (e.g. after significant page changes or when switching to a different site). Example: {}. The next vsl_get_snapshot call will create a new snapshot.",
|
|
5596
5596
|
inputSchema: {
|
|
5597
5597
|
type: "object",
|
|
5598
5598
|
properties: {}
|
|
@@ -5600,17 +5600,17 @@ var VSL_TOOLS = [
|
|
|
5600
5600
|
},
|
|
5601
5601
|
{
|
|
5602
5602
|
name: "vsl_get_visual",
|
|
5603
|
-
description: "
|
|
5603
|
+
description: "Get a visual fragment (screenshot) of an element in base64 WebP format. Use for elements that are hard to classify by text alone (icons, charts, custom widgets). Returns {mediaType:image/webp, data:base64data}. Example: {element_id: img_5}. Parameter auto_refresh=true automatically refreshes the snapshot before searching for the element. IMPORTANT: works only with IDs from vsl_get_snapshot (browser DOM). Does NOT work with IDs from vsl_read_page (semantic IDs) \u2014 use vsl_get_snapshot to get compatible IDs.",
|
|
5604
5604
|
inputSchema: {
|
|
5605
5605
|
type: "object",
|
|
5606
5606
|
properties: {
|
|
5607
5607
|
element_id: {
|
|
5608
5608
|
type: "string",
|
|
5609
|
-
description: "ID
|
|
5609
|
+
description: "Element ID in VSL JSON"
|
|
5610
5610
|
},
|
|
5611
5611
|
auto_refresh: {
|
|
5612
5612
|
type: "boolean",
|
|
5613
|
-
description: "
|
|
5613
|
+
description: "If true, automatically refreshes the snapshot before searching for the element. Useful after navigation or actions that modify the DOM. Default: false."
|
|
5614
5614
|
}
|
|
5615
5615
|
},
|
|
5616
5616
|
required: ["element_id"]
|
|
@@ -5618,17 +5618,17 @@ var VSL_TOOLS = [
|
|
|
5618
5618
|
},
|
|
5619
5619
|
{
|
|
5620
5620
|
name: "vsl_read_page",
|
|
5621
|
-
description: '
|
|
5621
|
+
description: 'Read web pages. Automatically determines the strategy: static pages are read via HTTP (fast), SPAs are rendered via browser. readable=true filters noise (navigation, footers, cookie banners) for clean content. On repeated calls, returns diff (changes) instead of full content. Parameter detail_level (low/medium/high) filters objects in the snapshot: low \u2014 interactive elements only (buttons, links, inputs), medium \u2014 interactive + containers (default), high \u2014 all objects. Metadata includes vsl_estimated_tokens \u2014 the number of tokens in the VSL snapshot for context estimation. Example: {url:"https://example.com", readable:true, detail_level:"medium"}. Returns snapshot and diff automatically.',
|
|
5622
5622
|
inputSchema: {
|
|
5623
5623
|
type: "object",
|
|
5624
5624
|
properties: {
|
|
5625
5625
|
url: {
|
|
5626
5626
|
type: "string",
|
|
5627
|
-
description: "URL
|
|
5627
|
+
description: "Page URL to read"
|
|
5628
5628
|
},
|
|
5629
5629
|
readable: {
|
|
5630
5630
|
type: "boolean",
|
|
5631
|
-
description: "Readable
|
|
5631
|
+
description: "Readable mode: filter noise (nav, footer, cookie banners) for clean content"
|
|
5632
5632
|
}
|
|
5633
5633
|
},
|
|
5634
5634
|
required: ["url"]
|
|
@@ -5636,13 +5636,13 @@ var VSL_TOOLS = [
|
|
|
5636
5636
|
},
|
|
5637
5637
|
{
|
|
5638
5638
|
name: "vsl_get_text_block",
|
|
5639
|
-
description:
|
|
5639
|
+
description: `Get the full text by txt_ref from lazy text loading (M1.7). When an element's text exceeds 200 characters, only txt_preview (first ~50 characters) and txt_ref (e.g. tb_001) are stored in the VSL JSON. Use this tool to retrieve the full text. Example: {block_id: "tb_001"}. Returns {block_id, text} with the full content.`,
|
|
5640
5640
|
inputSchema: {
|
|
5641
5641
|
type: "object",
|
|
5642
5642
|
properties: {
|
|
5643
5643
|
block_id: {
|
|
5644
5644
|
type: "string",
|
|
5645
|
-
description: "ID
|
|
5645
|
+
description: "Text block ID from the txt_ref field of a VSL object (format: tb_xxx)"
|
|
5646
5646
|
}
|
|
5647
5647
|
},
|
|
5648
5648
|
required: ["block_id"]
|
|
@@ -5650,30 +5650,30 @@ var VSL_TOOLS = [
|
|
|
5650
5650
|
},
|
|
5651
5651
|
{
|
|
5652
5652
|
name: "vsl_click_coordinates",
|
|
5653
|
-
description: '
|
|
5653
|
+
description: 'Perform multiple clicks at coordinates relative to a target element. Coordinates (x, y) are specified in pixels from the top-left corner of the element (use bbox from snapshot). Supports delays between clicks. Returns diff + snapshot + screenshot after all clicks. Example: {target_id: "iframe_2", clicks: [{x: 50, y: 50, delay_after_ms: 500}, {x: 150, y: 50}]}.',
|
|
5654
5654
|
inputSchema: {
|
|
5655
5655
|
type: "object",
|
|
5656
5656
|
properties: {
|
|
5657
5657
|
target_id: {
|
|
5658
5658
|
type: "string",
|
|
5659
|
-
description: "ID
|
|
5659
|
+
description: "Element ID in VSL JSON (e.g. iframe_2 for reCAPTCHA challenge iframe)"
|
|
5660
5660
|
},
|
|
5661
5661
|
clicks: {
|
|
5662
5662
|
type: "array",
|
|
5663
|
-
description: "
|
|
5663
|
+
description: "Array of clicks. Each click: {x: number, y: number, delay_after_ms?: number}. Coordinates in pixels from the top-left corner of the element.",
|
|
5664
5664
|
items: {
|
|
5665
5665
|
type: "object",
|
|
5666
5666
|
properties: {
|
|
5667
|
-
x: { type: "number", description: "X
|
|
5668
|
-
y: { type: "number", description: "Y
|
|
5669
|
-
delay_after_ms: { type: "number", description: "
|
|
5667
|
+
x: { type: "number", description: "X coordinate (pixels from left edge of element)" },
|
|
5668
|
+
y: { type: "number", description: "Y coordinate (pixels from top edge of element)" },
|
|
5669
|
+
delay_after_ms: { type: "number", description: "Delay after click (ms)" }
|
|
5670
5670
|
},
|
|
5671
5671
|
required: ["x", "y"]
|
|
5672
5672
|
}
|
|
5673
5673
|
},
|
|
5674
5674
|
return_state: {
|
|
5675
5675
|
type: "boolean",
|
|
5676
|
-
description: "
|
|
5676
|
+
description: "If true (default), returns diff + snapshot + screenshot after all clicks."
|
|
5677
5677
|
}
|
|
5678
5678
|
},
|
|
5679
5679
|
required: ["target_id", "clicks"]
|
|
@@ -5767,13 +5767,13 @@ var VSL_RESOURCES = [
|
|
|
5767
5767
|
{
|
|
5768
5768
|
uri: "vsl://current",
|
|
5769
5769
|
name: "Current VSL Snapshot",
|
|
5770
|
-
description: "
|
|
5770
|
+
description: "Current VSL snapshot of the page. Contains the full semantic structure of elements.",
|
|
5771
5771
|
mimeType: "application/json"
|
|
5772
5772
|
},
|
|
5773
5773
|
{
|
|
5774
5774
|
uri: "vsl://diff",
|
|
5775
5775
|
name: "Latest VSL Diff",
|
|
5776
|
-
description: "
|
|
5776
|
+
description: "Latest VSL diff since the previous snapshot. Contains only changes (added/modified/removed).",
|
|
5777
5777
|
mimeType: "application/json"
|
|
5778
5778
|
}
|
|
5779
5779
|
];
|
|
@@ -6586,7 +6586,7 @@ var SessionManager = class {
|
|
|
6586
6586
|
};
|
|
6587
6587
|
|
|
6588
6588
|
// src/version.ts
|
|
6589
|
-
var VSL_MCP_SERVER_VERSION = "1.3.
|
|
6589
|
+
var VSL_MCP_SERVER_VERSION = "1.3.7";
|
|
6590
6590
|
|
|
6591
6591
|
// src/index.ts
|
|
6592
6592
|
async function main() {
|