@weavetab/mcp 2.5.0 → 2.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/AGENTS.md +49 -49
- package/ARCHITECTURE.md +590 -590
- package/LICENSE +216 -216
- package/README.md +269 -269
- package/SECURITY.md +207 -207
- package/TROUBLESHOOTING.md +373 -365
- package/dist/anticaptcha/detector.js +395 -395
- package/dist/anticaptcha/solver.js +130 -130
- package/dist/cdp/bridge.js +73 -73
- package/dist/cdp/connector.js +46 -22
- package/dist/cdp/extension.js +34 -34
- package/dist/cdp/helpers.js +174 -174
- package/dist/cdp/pruner.js +195 -195
- package/dist/cdp/ref_cache.js +66 -66
- package/dist/cdp/security.js +10 -10
- package/dist/cdp/verify.js +57 -57
- package/dist/cdp/walker.js +563 -525
- package/dist/cli/plugin.js +26 -3
- package/dist/config/loader.d.ts +0 -3
- package/dist/config/loader.js +0 -9
- package/dist/index.js +0 -4
- package/dist/intelligence/intent.js +81 -81
- package/dist/intelligence/sessionMemory.js +2 -2
- package/dist/overlay/ghost.js +22 -22
- package/dist/overlay/injector.js +89 -89
- package/dist/plugin/extension_bridge.js +54 -54
- package/dist/plugin/interface.d.ts +7 -0
- package/dist/plugin/loader.js +3 -4
- package/dist/plugin/schema.d.ts +11 -0
- package/dist/plugin/schema.js +59 -0
- package/dist/security/guard.js +18 -18
- package/dist/sensors/actionability.js +167 -167
- package/dist/sensors/guard.js +29 -29
- package/dist/sensors/network.js +15 -17
- package/dist/server.d.ts +1 -1
- package/dist/server.js +173 -144
- package/dist/state/delta.js +6 -7
- package/dist/tools/automation.js +85 -85
- package/dist/tools/canvas.js +48 -25
- package/dist/tools/checkpoint.js +94 -35
- package/dist/tools/click.js +52 -41
- package/dist/tools/clipboard.js +80 -74
- package/dist/tools/design_extract.js +441 -441
- package/dist/tools/dialog.js +13 -13
- package/dist/tools/emulation.d.ts +2 -0
- package/dist/tools/emulation.js +7 -0
- package/dist/tools/fill.js +344 -347
- package/dist/tools/find.js +78 -52
- package/dist/tools/highlight.js +67 -67
- package/dist/tools/inspect.js +54 -25
- package/dist/tools/key.js +42 -35
- package/dist/tools/navigate.d.ts +1 -1
- package/dist/tools/navigate.js +35 -35
- package/dist/tools/office/parse.js +62 -18
- package/dist/tools/pdf.d.ts +9 -0
- package/dist/tools/pdf.js +7 -4
- package/dist/tools/performance.d.ts +11 -4
- package/dist/tools/performance.js +94 -42
- package/dist/tools/performance_test.d.ts +2 -2
- package/dist/tools/performance_test.js +69 -69
- package/dist/tools/pointer.js +116 -116
- package/dist/tools/read.js +99 -67
- package/dist/tools/recording.js +9 -0
- package/dist/tools/scrape.js +146 -146
- package/dist/tools/screenshot.d.ts +2 -0
- package/dist/tools/screenshot.js +46 -4
- package/dist/tools/scroll.d.ts +3 -1
- package/dist/tools/scroll.js +13 -15
- package/dist/tools/select.d.ts +3 -0
- package/dist/tools/select.js +131 -124
- package/dist/tools/snapshot.js +8 -6
- package/dist/tools/storage.d.ts +5 -1
- package/dist/tools/storage.js +16 -0
- package/dist/tools/tabs.d.ts +7 -5
- package/dist/tools/tabs.js +79 -26
- package/dist/tools/thought.js +8 -8
- package/dist/tools/type.js +274 -274
- package/dist/tools/type_secret.js +23 -23
- package/dist/tools/upload.js +3 -3
- package/dist/tools/video_compiler.js +9 -0
- package/dist/tools/wait.js +35 -35
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/DOCUMENTATION.md +583 -585
- package/docs/PLUGINS.md +139 -121
- package/docs/TOOLS.md +3 -4
- package/docs/architecture/blind-injection.md +83 -83
- package/docs/architecture/overview.md +49 -49
- package/docs/architecture/security.md +36 -36
- package/docs/architecture/transport.md +37 -37
- package/docs/cli/cli-commands.md +50 -50
- package/docs/cli/cli-flags.md +28 -28
- package/docs/cli/cli-scripting.md +35 -35
- package/docs/configuration/config-locations.md +23 -23
- package/docs/configuration/configuration.md +39 -27
- package/docs/configuration/env-variables.md +19 -19
- package/docs/configuration/folders.md +62 -55
- package/docs/desktop-automation/electron-apps.md +225 -214
- package/docs/get-started/installation.md +1 -1
- package/docs/get-started/introduction.md +60 -60
- package/docs/get-started/quickstart.md +2 -2
- package/docs/get-started/setup-wizard.md +27 -27
- package/docs/intelligence/site-profiles.md +151 -151
- package/docs/tools/tools.md +582 -631
- package/docs/troubleshooting/trouble-browser.md +27 -27
- package/docs/troubleshooting/trouble-loop.md +31 -31
- package/ext-dist/background.js +415 -415
- package/ext-dist/content.js +2527 -2527
- package/ext-dist/dashboard.html +583 -583
- package/ext-dist/hud/hud.js +3 -3
- package/ext-dist/hud/index.html +20 -20
- package/ext-dist/manifest.json +73 -73
- package/ext-dist/styles.css +223 -223
- package/mcp.json +796 -805
- package/package.json +118 -118
- package/server.json +23 -23
- package/dist/cdp/walker.test.d.ts +0 -2
- package/dist/cdp/walker.test.js +0 -172
- package/dist/intelligence/sessionMemory.test.d.ts +0 -2
- package/dist/intelligence/sessionMemory.test.js +0 -62
- package/dist/intelligence/trail.test.d.ts +0 -2
- package/dist/intelligence/trail.test.js +0 -110
- package/dist/state/cache.test.d.ts +0 -2
- package/dist/state/cache.test.js +0 -76
- package/dist/state/delta.test.d.ts +0 -2
- package/dist/state/delta.test.js +0 -279
- package/dist/state/groups.d.ts +0 -15
- package/dist/state/groups.js +0 -80
- package/dist/tools/accessibility.d.ts +0 -14
- package/dist/tools/accessibility.js +0 -32
- package/dist/tools/ask.d.ts +0 -14
- package/dist/tools/ask.js +0 -49
- package/dist/tools/click_and_wait.d.ts +0 -33
- package/dist/tools/click_and_wait.js +0 -149
- package/dist/tools/drag.d.ts +0 -15
- package/dist/tools/drag.js +0 -29
- package/dist/tools/geo.d.ts +0 -19
- package/dist/tools/geo.js +0 -29
- package/dist/tools/github/analyze.d.ts +0 -4
- package/dist/tools/github/analyze.js +0 -113
- package/dist/tools/github/cache.d.ts +0 -21
- package/dist/tools/github/cache.js +0 -28
- package/dist/tools/github/index.d.ts +0 -19
- package/dist/tools/github/index.js +0 -40
- package/dist/tools/github/issues.d.ts +0 -9
- package/dist/tools/github/issues.js +0 -88
- package/dist/tools/github/pr.d.ts +0 -5
- package/dist/tools/github/pr.js +0 -88
- package/dist/tools/github/rateLimiter.d.ts +0 -4
- package/dist/tools/github/rateLimiter.js +0 -46
- package/dist/tools/github/read.d.ts +0 -34
- package/dist/tools/github/read.js +0 -74
- package/dist/tools/github/repoContext.d.ts +0 -20
- package/dist/tools/github/repoContext.js +0 -129
- package/dist/tools/hover.d.ts +0 -19
- package/dist/tools/hover.js +0 -57
- package/dist/tools/integration.test.d.ts +0 -2
- package/dist/tools/integration.test.js +0 -96
- package/dist/tools/macro_compiler.d.ts +0 -7
- package/dist/tools/macro_compiler.js +0 -82
- package/dist/tools/mouse.d.ts +0 -21
- package/dist/tools/mouse.js +0 -62
- package/dist/tools/response.d.ts +0 -129
- package/dist/tools/response.js +0 -5
- package/dist/tools/wait_for.d.ts +0 -23
- package/dist/tools/wait_for.js +0 -30
- package/dist/tools/windows.d.ts +0 -22
- package/dist/tools/windows.js +0 -57
package/docs/DOCUMENTATION.md
CHANGED
|
@@ -1,585 +1,583 @@
|
|
|
1
|
-
# Weavetab MCP Documentation
|
|
2
|
-
|
|
3
|
-
> **Package:** `@weavetab/mcp` | **Version:** 2.5.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
Weavetab is a production-grade, in-process MCP (Model Context Protocol) server providing AI agents with direct, physical Layer 0 control across Chromium browsers and Electron desktop applications. It communicates directly over the Chrome DevTools Protocol (CDP) WebSocket at Layer 0
|
|
10
|
-
|
|
11
|
-
### Core Capabilities
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **Direct CDP WebSocket**
|
|
15
|
-
- **Semantic Delta Engine**
|
|
16
|
-
- **Ghost Cursor**
|
|
17
|
-
- **Human Typing Engine**
|
|
18
|
-
- **Blind Injection**
|
|
19
|
-
- **Self-Learning**
|
|
20
|
-
- **Security Stack**
|
|
21
|
-
- **Burst Mode**
|
|
22
|
-
- **Plugin System**
|
|
23
|
-
- **GitHub
|
|
24
|
-
|
|
25
|
-
### Weavetab Skills
|
|
26
|
-
|
|
27
|
-
**Weavetab Skills** is an optional companion package (`@weavetab/skills`) that provides pre-built workflow patterns and mission templates for AI agents. These skills help agents understand complex Weavetab workflows and execute multi-step missions more effectively.
|
|
28
|
-
|
|
29
|
-
**Installation:**
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g @weavetab/skills
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Available Skills:**
|
|
35
|
-
- **Multi-step Form Automation**
|
|
36
|
-
- **E-commerce Checkout**
|
|
37
|
-
- **Data Extraction Pipelines**
|
|
38
|
-
- **Content Management Systems**
|
|
39
|
-
- **API Testing & Validation**
|
|
40
|
-
|
|
41
|
-
Skills are automatically discovered by compatible MCP clients and provide context-aware guidance for mission planning.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Architecture
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
MCP Client
|
|
49
|
-
(RateLimit
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Five Architectural Layers
|
|
53
|
-
|
|
54
|
-
| Layer | Components | Responsibility |
|
|
55
|
-
|-------|-----------|----------------|
|
|
56
|
-
| **Transport** | stdio (JSON-RPC), WebSocket (port 3000) | MCP client communication |
|
|
57
|
-
| **Security & Governance** | Domain blacklist, Rate limiter, RBAC, Root guard, Storage blocker | Pre-flight checks |
|
|
58
|
-
| **Intelligence** | Session memory, Delta engine, DOM pruner, Trail/loop detection, Knowledge hints, Vision fallback | Token optimization, self-learning |
|
|
59
|
-
| **Sensor Systems** | Network telemetry, DOM mutations, Human pacing, Agent state machine, Thought HUD | Runtime awareness |
|
|
60
|
-
| **CDP Bridge** | DOM walker, Ghost cursor, Keystroke engine, Pruner, Shadow DOM injector, Tab manager, Browser launcher | Browser control |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Tool Reference (
|
|
65
|
-
|
|
66
|
-
All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting + domain policy + RBAC), structured audit logging.
|
|
67
|
-
|
|
68
|
-
### Vision & Reading (8 tools)
|
|
69
|
-
|
|
70
|
-
| Tool | Description |
|
|
71
|
-
|------|-------------|
|
|
72
|
-
| `browser_map` | DOM enumeration
|
|
73
|
-
| `browser_find` | Native CDP text search with single and multi-match (`all: true`, `limit: N`) returning bounding rects and selectors
|
|
74
|
-
| `browser_scrape` | CSS/XPath structured data extraction in 1 CDP call |
|
|
75
|
-
| `browser_inspect` | Computed CSS styles + inline styles + event listener types |
|
|
76
|
-
| `browser_snapshot` | MHTML capture/restore of DOM state + resources |
|
|
77
|
-
| `browser_screenshot` | PNG/JPEG capture via CDP, full-page + clip region, returns base64 data URL (no file pollution) |
|
|
78
|
-
| `browser_console` | Read/clear buffered console logs and exceptions |
|
|
79
|
-
| `browser_extract_design` | Extract design tokens, typography, colors, and clean CSS with pixel fidelity |
|
|
80
|
-
|
|
81
|
-
### Navigation (1 tool)
|
|
82
|
-
|
|
83
|
-
| Tool | Description |
|
|
84
|
-
|------|-------------|
|
|
85
|
-
| `browser_navigate` | Ultra-low latency navigation (~150-300ms) with non-blocking readyState polling, parallelized metadata, domain blocklist enforcement, and `weavetab://` protocol |
|
|
86
|
-
|
|
87
|
-
### Input (9 tools)
|
|
88
|
-
|
|
89
|
-
| Tool | Description |
|
|
90
|
-
|------|-------------|
|
|
91
|
-
| `browser_click` | Ghost Cursor (
|
|
92
|
-
| `browser_type` | Human keystroke engine with zero-target `document.activeElement` typing, anti-unfocus click avoidance, jitter, and burst patterns |
|
|
93
|
-
| `browser_type_secret` | Blind Injection from `secrets.json`
|
|
94
|
-
| `browser_key` | Native keyboard dispatch with combo hotkeys (`"Ctrl+A"`, `"Cmd+K"`, `"Alt+Tab"`) and zero arbitrary delay |
|
|
95
|
-
| `browser_pointer` | Hover, double-click, drag-and-drop, and multi-level flyout menu traversal via `hover_chain: ["File", "Export As", "PNG"]` |
|
|
96
|
-
| `browser_select` | Native `<select>` dropdown selection
|
|
97
|
-
| `browser_fill` | Smart multi-field form batch completion with input discovery scanner (`scan: true`), flexible field selectors, and Google Sheets `grid_data` |
|
|
98
|
-
| `browser_upload` | Bypass file dialogs via CDP `DOM.setFileInputFiles` |
|
|
99
|
-
| `browser_scroll` | Fast non-blocking directional + element-relative scroll without redundant action map rebuilds |
|
|
100
|
-
|
|
101
|
-
### Tabs & Windows (2 tools)
|
|
102
|
-
|
|
103
|
-
| Tool | Description |
|
|
104
|
-
|------|-------------|
|
|
105
|
-
| `browser_tabs` | Open/switch/close/list/consolidate (dedup)/heal (recover crash). Also list/focus windows |
|
|
106
|
-
| `browser_detect` | Detect installed browsers + CDP feature coverage per engine (Chromium, Firefox, WebKit) |
|
|
107
|
-
|
|
108
|
-
### Mission Execution (2 tools)
|
|
109
|
-
|
|
110
|
-
| Tool | Description |
|
|
111
|
-
|------|-------------|
|
|
112
|
-
| `browser_burst` | Chain N actions in 1 MCP call. Supports 4 macro steps: `type_and_send`, `navigate_and_read`, `click_and_wait`, `scroll_and_read` |
|
|
113
|
-
| `browser_automation` | Inject persistent self-running scripts
|
|
114
|
-
|
|
115
|
-
### Dialog & User Interaction (3 tools)
|
|
116
|
-
|
|
117
|
-
| Tool | Description |
|
|
118
|
-
|------|-------------|
|
|
119
|
-
| `browser_dialog` | Accept/dismiss JavaScript alert/confirm/prompt dialogs |
|
|
120
|
-
| `browser_thoughts` | Green thought bubbles: feedback (one-way) or question with input (sentence/paragraph modes) |
|
|
121
|
-
| `browser_clipboard` | System clipboard R/W (text
|
|
122
|
-
|
|
123
|
-
### Wait & Timing (2 tools)
|
|
124
|
-
|
|
125
|
-
| Tool | Description |
|
|
126
|
-
|------|-------------|
|
|
127
|
-
| `browser_wait` | Wait for element/text/URL/stable/network/auto
|
|
128
|
-
| `browser_captcha` | Autonomous zero-API detection and solving for Cloudflare Turnstile, reCAPTCHA v2/v3, GeeTest, and hCaptcha via CDP mouse physics |
|
|
129
|
-
|
|
130
|
-
### Storage & Cookies (2 tools)
|
|
131
|
-
|
|
132
|
-
| Tool | Description |
|
|
133
|
-
|------|-------------|
|
|
134
|
-
| `browser_storage` | localStorage & sessionStorage get/set/clear |
|
|
135
|
-
| `browser_cookies` | Cookies get/set/delete |
|
|
136
|
-
|
|
137
|
-
### Device & Environment (2 tools)
|
|
138
|
-
|
|
139
|
-
| Tool | Description |
|
|
140
|
-
|------|-------------|
|
|
141
|
-
| `browser_viewport` | Viewport, device emulation, geolocation, timezone override |
|
|
142
|
-
| `browser_emulate` | Network throttling (3G/4G/offline), CPU slowdown, geolocation, timezone, and User-Agent override |
|
|
143
|
-
|
|
144
|
-
### Network (1 tool)
|
|
145
|
-
|
|
146
|
-
| Tool | Description |
|
|
147
|
-
|------|-------------|
|
|
148
|
-
| `browser_network_intercept` | Mock API responses, block tracking, and retrieve raw protocol network telemetry (TLS/SSL certificate metadata, microsecond timing breakdown, OS-level failure reasons) |
|
|
149
|
-
|
|
150
|
-
### Canvas & Visual (2 tools)
|
|
151
|
-
|
|
152
|
-
| Tool | Description |
|
|
153
|
-
|------|-------------|
|
|
154
|
-
| `browser_canvas` | Get image data (base64 PNG) or draw points on canvas |
|
|
155
|
-
| `browser_highlight` | Visual CDP overlay highlight
|
|
156
|
-
|
|
157
|
-
### Output (2 tools)
|
|
158
|
-
|
|
159
|
-
| Tool | Description |
|
|
160
|
-
|------|-------------|
|
|
161
|
-
| `browser_pdf` | Print page to PDF
|
|
162
|
-
| `browser_recording` | Compile browser screencast frames into video (.webp, .gif, .mp4, .webm) |
|
|
163
|
-
|
|
164
|
-
### Evaluation (1 tool)
|
|
165
|
-
|
|
166
|
-
| Tool | Description |
|
|
167
|
-
|------|-------------|
|
|
168
|
-
| `browser_eval` | Run arbitrary JS via CDP Runtime.evaluate. On `
|
|
169
|
-
|
|
170
|
-
### Performance (1 tool)
|
|
171
|
-
|
|
172
|
-
| Tool | Description |
|
|
173
|
-
|------|-------------|
|
|
174
|
-
| `browser_performance` |
|
|
175
|
-
|
|
176
|
-
### GitHub (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
186
|
-
| `
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
"
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
|
274
|
-
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
{
|
|
300
|
-
"pattern": "
|
|
301
|
-
"mode": "
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"pattern": "
|
|
305
|
-
"mode": "
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"pattern": "*.
|
|
309
|
-
"mode": "
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"pattern": "*.
|
|
313
|
-
"mode": "
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
|
335
|
-
|
|
336
|
-
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
|
349
|
-
|
|
350
|
-
| `
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return {
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
#
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
- **
|
|
478
|
-
- **
|
|
479
|
-
- **
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
-
|
|
488
|
-
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
"
|
|
508
|
-
"
|
|
509
|
-
"
|
|
510
|
-
"
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
|
534
|
-
|
|
|
535
|
-
| `
|
|
536
|
-
| `
|
|
537
|
-
| `
|
|
538
|
-
| `
|
|
539
|
-
| `
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
-
|
|
560
|
-
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
-
|
|
569
|
-
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
- [
|
|
580
|
-
- [
|
|
581
|
-
- [
|
|
582
|
-
- [
|
|
583
|
-
- [
|
|
584
|
-
- [Contributing Guidelines](../CONTRIBUTING.md)
|
|
585
|
-
- [Troubleshooting Guide](../TROUBLESHOOTING.md)
|
|
1
|
+
# Weavetab MCP Documentation
|
|
2
|
+
|
|
3
|
+
> **Package:** `@weavetab/mcp` | **Version:** 2.5.1 | **License:** AGPLv3 | **Author:** fy2ne
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Weavetab is a production-grade, in-process MCP (Model Context Protocol) server providing AI agents with direct, physical Layer 0 control across Chromium browsers and Electron desktop applications. It communicates directly over the Chrome DevTools Protocol (CDP) WebSocket at Layer 0 — no WebDriver process, no browser binary download, no cloud middleware.
|
|
10
|
+
|
|
11
|
+
### Core Capabilities
|
|
12
|
+
|
|
13
|
+
- **41 Built-in MCP Tools** across functional categories (Vision, Navigation, Input, Tabs, Mission Execution, Dialog, Wait, Storage, Device, Network, Canvas, Output, Evaluation, Office Documents)
|
|
14
|
+
- **Direct CDP WebSocket** — 3-8ms mean latency, zero process overhead
|
|
15
|
+
- **Semantic Delta Engine** — 5-10x token reduction via per-tab snapshot diffing
|
|
16
|
+
- **Ghost Cursor** — Bézier curve click engine with human acceleration and jitter
|
|
17
|
+
- **Human Typing Engine** — burst-pattern profiling, per-character jitter, natural pauses
|
|
18
|
+
- **Blind Injection** — enterprise-grade credential injection via `secrets.json` with domain scoping, Shadow DOM isolation, and JS property hardening
|
|
19
|
+
- **Self-Learning** — per-domain session memory, knowledge hints, automatic framework detection
|
|
20
|
+
- **Security Stack** — domain blacklist, RBAC (5 roles), rate limiter, loop detection, input filter, root guard
|
|
21
|
+
- **Burst Mode** — chain N actions in 1 MCP call via `browser_burst`
|
|
22
|
+
- **Plugin System** — Extensible plugin ecosystem supporting tool additions, overrides (with originalHandler wrapping), and tool removals across 3 trust tiers (Official, Verified, Unverified)
|
|
23
|
+
- **GitHub Automation (Plugin)** — Repo analysis, file reading, issues, and PRs are provided by the official `@weavetab/plugin-github` plugin, not built in
|
|
24
|
+
|
|
25
|
+
### Weavetab Skills
|
|
26
|
+
|
|
27
|
+
**Weavetab Skills** is an optional companion package (`@weavetab/skills`) that provides pre-built workflow patterns and mission templates for AI agents. These skills help agents understand complex Weavetab workflows and execute multi-step missions more effectively.
|
|
28
|
+
|
|
29
|
+
**Installation:**
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @weavetab/skills
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Available Skills:**
|
|
35
|
+
- **Multi-step Form Automation** — Complex form filling with validation handling
|
|
36
|
+
- **E-commerce Checkout** — Shopping cart navigation and payment processing
|
|
37
|
+
- **Data Extraction Pipelines** — Structured data scraping and export
|
|
38
|
+
- **Content Management Systems** — WordPress, Drupal, and CMS-specific workflows
|
|
39
|
+
- **API Testing & Validation** — Endpoint testing and response verification
|
|
40
|
+
|
|
41
|
+
Skills are automatically discovered by compatible MCP clients and provide context-aware guidance for mission planning.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Architecture
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
MCP Client → stdio/WebSocket → WithSecurity Pipeline → CDP WebSocket → Chromium
|
|
49
|
+
(RateLimit → DomainPolicy → RBAC)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Five Architectural Layers
|
|
53
|
+
|
|
54
|
+
| Layer | Components | Responsibility |
|
|
55
|
+
|-------|-----------|----------------|
|
|
56
|
+
| **Transport** | stdio (JSON-RPC), WebSocket (port 3000) | MCP client communication |
|
|
57
|
+
| **Security & Governance** | Domain blacklist, Rate limiter, RBAC, Root guard, Storage blocker | Pre-flight checks |
|
|
58
|
+
| **Intelligence** | Session memory, Delta engine, DOM pruner, Trail/loop detection, Knowledge hints, Vision fallback | Token optimization, self-learning |
|
|
59
|
+
| **Sensor Systems** | Network telemetry, DOM mutations, Human pacing, Agent state machine, Thought HUD | Runtime awareness |
|
|
60
|
+
| **CDP Bridge** | DOM walker, Ghost cursor, Keystroke engine, Pruner, Shadow DOM injector, Tab manager, Browser launcher | Browser control |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Tool Reference (41 Tools)
|
|
65
|
+
|
|
66
|
+
All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting + domain policy + RBAC), structured audit logging.
|
|
67
|
+
|
|
68
|
+
### Vision & Reading (8 tools)
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `browser_map` | DOM enumeration with volatile `w:NN` ref IDs, Set-of-Marks visual grounding (`visual: true` / `"auto"`), entity & card container binding (`┌ Heading`), active modal hoisting (`╔╠ACTIVE DIALOG â•â•—`), nav cluster collapsing, delta diffing, and scope filtering (`modal`, `form`, `main`). |
|
|
73
|
+
| `browser_find` | Native CDP text search with single and multi-match (`all: true`, `limit: N`) returning bounding rects and selectors — ~10x cheaper than map |
|
|
74
|
+
| `browser_scrape` | CSS/XPath structured data extraction in 1 CDP call |
|
|
75
|
+
| `browser_inspect` | Computed CSS styles + inline styles + event listener types |
|
|
76
|
+
| `browser_snapshot` | MHTML capture/restore of DOM state + resources |
|
|
77
|
+
| `browser_screenshot` | PNG/JPEG capture via CDP, full-page + clip region, returns base64 data URL (no file pollution) |
|
|
78
|
+
| `browser_console` | Read/clear buffered console logs and exceptions |
|
|
79
|
+
| `browser_extract_design` | Extract design tokens, typography, colors, and clean CSS with pixel fidelity |
|
|
80
|
+
|
|
81
|
+
### Navigation (1 tool)
|
|
82
|
+
|
|
83
|
+
| Tool | Description |
|
|
84
|
+
|------|-------------|
|
|
85
|
+
| `browser_navigate` | Ultra-low latency navigation (~150-300ms) with non-blocking readyState polling, parallelized metadata, domain blocklist enforcement, and `weavetab://` protocol |
|
|
86
|
+
|
|
87
|
+
### Input (9 tools)
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `browser_click` | Ghost Cursor (Bézier) click with direct visual mark targeting (`mark: N`), intent memory, occlusion detection, and stuck-loop detection |
|
|
92
|
+
| `browser_type` | Human keystroke engine with zero-target `document.activeElement` typing, anti-unfocus click avoidance, jitter, and burst patterns |
|
|
93
|
+
| `browser_type_secret` | Blind Injection from `secrets.json` — domain check before value load, Shadow DOM isolation, JS property hardening |
|
|
94
|
+
| `browser_key` | Native keyboard dispatch with combo hotkeys (`"Ctrl+A"`, `"Cmd+K"`, `"Alt+Tab"`) and zero arbitrary delay |
|
|
95
|
+
| `browser_pointer` | Hover, double-click, drag-and-drop, and multi-level flyout menu traversal via `hover_chain: ["File", "Export As", "PNG"]` |
|
|
96
|
+
| `browser_select` | Native `<select>` dropdown selection — React/Vue safe (prototype setter + events) |
|
|
97
|
+
| `browser_fill` | Smart multi-field form batch completion with input discovery scanner (`scan: true`), flexible field selectors, and Google Sheets `grid_data` |
|
|
98
|
+
| `browser_upload` | Bypass file dialogs via CDP `DOM.setFileInputFiles` |
|
|
99
|
+
| `browser_scroll` | Fast non-blocking directional + element-relative scroll without redundant action map rebuilds |
|
|
100
|
+
|
|
101
|
+
### Tabs & Windows (2 tools)
|
|
102
|
+
|
|
103
|
+
| Tool | Description |
|
|
104
|
+
|------|-------------|
|
|
105
|
+
| `browser_tabs` | Open/switch/close/list/consolidate (dedup)/heal (recover crash). Also list/focus windows |
|
|
106
|
+
| `browser_detect` | Detect installed browsers + CDP feature coverage per engine (Chromium, Firefox, WebKit) |
|
|
107
|
+
|
|
108
|
+
### Mission Execution (2 tools)
|
|
109
|
+
|
|
110
|
+
| Tool | Description |
|
|
111
|
+
|------|-------------|
|
|
112
|
+
| `browser_burst` | Chain N actions in 1 MCP call. Supports 4 macro steps: `type_and_send`, `navigate_and_read`, `click_and_wait`, `scroll_and_read` |
|
|
113
|
+
| `browser_automation` | Inject persistent self-running scripts — monitoring, polling, background extraction |
|
|
114
|
+
|
|
115
|
+
### Dialog & User Interaction (3 tools)
|
|
116
|
+
|
|
117
|
+
| Tool | Description |
|
|
118
|
+
|------|-------------|
|
|
119
|
+
| `browser_dialog` | Accept/dismiss JavaScript alert/confirm/prompt dialogs |
|
|
120
|
+
| `browser_thoughts` | Green thought bubbles: feedback (one-way) or question with input (sentence/paragraph modes) |
|
|
121
|
+
| `browser_clipboard` | System clipboard R/W (text, images, or both in one write) |
|
|
122
|
+
|
|
123
|
+
### Wait & Timing (2 tools)
|
|
124
|
+
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
|------|-------------|
|
|
127
|
+
| `browser_wait` | Wait for element/text/URL/stable/network/auto — timeout configurable, optional loop counter reset (`reset_loop: true`) |
|
|
128
|
+
| `browser_captcha` | Autonomous zero-API detection and solving for Cloudflare Turnstile, reCAPTCHA v2/v3, GeeTest, and hCaptcha via CDP mouse physics |
|
|
129
|
+
|
|
130
|
+
### Storage & Cookies (2 tools)
|
|
131
|
+
|
|
132
|
+
| Tool | Description |
|
|
133
|
+
|------|-------------|
|
|
134
|
+
| `browser_storage` | localStorage & sessionStorage get/set/clear |
|
|
135
|
+
| `browser_cookies` | Cookies get/set/delete |
|
|
136
|
+
|
|
137
|
+
### Device & Environment (2 tools)
|
|
138
|
+
|
|
139
|
+
| Tool | Description |
|
|
140
|
+
|------|-------------|
|
|
141
|
+
| `browser_viewport` | Viewport, device emulation, geolocation, timezone override |
|
|
142
|
+
| `browser_emulate` | Network throttling (3G/4G/offline), CPU slowdown, geolocation, timezone, and User-Agent override |
|
|
143
|
+
|
|
144
|
+
### Network (1 tool)
|
|
145
|
+
|
|
146
|
+
| Tool | Description |
|
|
147
|
+
|------|-------------|
|
|
148
|
+
| `browser_network_intercept` | Mock API responses, block tracking, and retrieve raw protocol network telemetry (TLS/SSL certificate metadata, microsecond timing breakdown, OS-level failure reasons) |
|
|
149
|
+
|
|
150
|
+
### Canvas & Visual (2 tools)
|
|
151
|
+
|
|
152
|
+
| Tool | Description |
|
|
153
|
+
|------|-------------|
|
|
154
|
+
| `browser_canvas` | Get image data (base64 PNG) or draw points on canvas |
|
|
155
|
+
| `browser_highlight` | Visual CDP overlay highlight — zero token cost |
|
|
156
|
+
|
|
157
|
+
### Output (2 tools)
|
|
158
|
+
|
|
159
|
+
| Tool | Description |
|
|
160
|
+
|------|-------------|
|
|
161
|
+
| `browser_pdf` | Print page to PDF — landscape, scale, page ranges |
|
|
162
|
+
| `browser_recording` | Compile browser screencast frames into video (.webp, .gif, .mp4, .webm) |
|
|
163
|
+
|
|
164
|
+
### Evaluation (1 tool)
|
|
165
|
+
|
|
166
|
+
| Tool | Description |
|
|
167
|
+
|------|-------------|
|
|
168
|
+
| `browser_eval` | Run arbitrary JS via CDP Runtime.evaluate. On `weavetab://` pages, supports building UIs via `wt-dashboard-command` events |
|
|
169
|
+
|
|
170
|
+
### Performance (1 tool)
|
|
171
|
+
|
|
172
|
+
| Tool | Description |
|
|
173
|
+
|------|-------------|
|
|
174
|
+
| `browser_performance` | Core Web Vitals, memory, navigation timing, and resource timings |
|
|
175
|
+
|
|
176
|
+
### GitHub Automation (Plugin)
|
|
177
|
+
|
|
178
|
+
GitHub support is no longer a built-in tool. It is provided by the official `@weavetab/plugin-github` plugin, which registers a single `github` tool (actions: `analyze`, `read`, `issues`, `pr`). Install it with `weavetab plugin add @weavetab/plugin-github`.
|
|
179
|
+
|
|
180
|
+
### Utility (3 tools)
|
|
181
|
+
|
|
182
|
+
| Tool | Description |
|
|
183
|
+
|------|-------------|
|
|
184
|
+
| `browser_checkpoint` | Snapshot and restore browser state (cookies, storage, scroll/URL) into named checkpoints for time-travel and rollback |
|
|
185
|
+
| `browser_pattern_learn` | Read, register, and update named workflow patterns and site quirks per origin |
|
|
186
|
+
| `browser_office` | Parse Word (`.docx`), Excel (`.xlsx`), PDF, and CSV files into structured data |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Secrets Management
|
|
191
|
+
|
|
192
|
+
Secrets are stored in structured `secrets.json` files with `chmod 600` enforcement and atomic file writes (temp file + rename).
|
|
193
|
+
|
|
194
|
+
### Resolution Order
|
|
195
|
+
|
|
196
|
+
1. `./.weavetab/secrets.json` (project-scoped, opt-in via `weavetab secrets init --project`)
|
|
197
|
+
2. `~/.weavetab/secrets.json` (global default)
|
|
198
|
+
|
|
199
|
+
> **Note:** The legacy `.env`-based `EnvSecretProvider` is **deprecated and no longer supported**. All secrets must use `secrets.json`.
|
|
200
|
+
|
|
201
|
+
### CLI Commands
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
weavetab secrets set MY_KEY # Prompts for value securely
|
|
205
|
+
weavetab secrets list # Shows keys + domains only (never values)
|
|
206
|
+
weavetab secrets rm MY_KEY # Remove a secret
|
|
207
|
+
weavetab secrets init --project # Create project-scoped secrets + config
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Secrets File Format
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"API_KEY": {
|
|
215
|
+
"value": "sk-...",
|
|
216
|
+
"domains": ["api.example.com"],
|
|
217
|
+
"description": "Production API key"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Blind Injection
|
|
223
|
+
|
|
224
|
+
Use `browser_type_secret` to inject credentials without exposing them to the LLM:
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
browser_type_secret({
|
|
228
|
+
id: "w:1",
|
|
229
|
+
envKey: "API_KEY"
|
|
230
|
+
})
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
The value is permanently masked as `[REDACTED]` in all subsequent DOM reads and audit logs.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Configuration
|
|
238
|
+
|
|
239
|
+
### Config File Locations
|
|
240
|
+
|
|
241
|
+
- **Global:** `~/.weavetab/config.json`
|
|
242
|
+
- **Project:** `./.weavetab/config.json` (if exists, takes precedence)
|
|
243
|
+
|
|
244
|
+
### Config Structure
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"browserType": "chromium",
|
|
249
|
+
"headless": false,
|
|
250
|
+
"devMode": true,
|
|
251
|
+
"maxActionsPerMinute": 60,
|
|
252
|
+
"role": "admin",
|
|
253
|
+
"telemetry": false,
|
|
254
|
+
"attachPort": 0,
|
|
255
|
+
"extension": true,
|
|
256
|
+
"cookies": false,
|
|
257
|
+
"browserFlags": [],
|
|
258
|
+
"policies": [],
|
|
259
|
+
"electron": {
|
|
260
|
+
"discord": "C:\\Users\\<user>\\AppData\\Local\\Discord\\app-<version>\\Discord.exe",
|
|
261
|
+
"antigravity": "C:\\Users\\<user>\\AppData\\Local\\Programs\\antigravity\\Antigravity.exe",
|
|
262
|
+
"vscode": "C:\\Users\\<user>\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Configuration Options
|
|
268
|
+
|
|
269
|
+
| Option | Type | Default | Description |
|
|
270
|
+
|--------|------|---------|-------------|
|
|
271
|
+
| `browserType` | string | "chromium" | Browser to use (chromium, firefox, webkit) |
|
|
272
|
+
| `headless` | boolean | false | Run browser in headless mode |
|
|
273
|
+
| `devMode` | boolean | false | Enable HUD overlay and verbose logging |
|
|
274
|
+
| `maxActionsPerMinute` | number | 60 | Rate limit for tool executions |
|
|
275
|
+
| `role` | string | "admin" | RBAC role (admin, operator, viewer, automation, system) |
|
|
276
|
+
| `telemetry` | boolean | false | Enable anonymous usage telemetry |
|
|
277
|
+
| `attachPort` | number | 0 | Chrome DevTools Protocol port |
|
|
278
|
+
| `extension` | boolean | true | Enable Weavetab extension integration |
|
|
279
|
+
| `cookies` | boolean | false | Persist cookies/storage across sessions. When `false`, `document.cookie`, `localStorage`, and `sessionStorage` are all neutered at the browser level (returns empty/null for everything) + a fresh isolated profile is used each session. When `true`, cookies/storage work normally and persist via the profile directory. |
|
|
280
|
+
| `browserFlags` | string[] | `[]` | Extra Chromium command-line flags to append on launch (e.g., `["--disable-web-security"]`). The `--disable-sync` flag is mandatory and cannot be overridden — any conflicting flag is automatically dropped. |
|
|
281
|
+
| `policies` | PolicyEntry[] | `[]` | Domain-level access control policies (see [Domain Policy](#domain-policy) below). Supersedes the legacy `block`/`allow` lists. |
|
|
282
|
+
| `electron` | Record<string, string> | `{}` | Map of registered Electron desktop applications (e.g. Discord, VS Code, Figma, Antigravity, local dev apps) to executable paths or startup commands. |
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Domain Policy
|
|
287
|
+
|
|
288
|
+
The `policies` config option provides **fine-grained domain-level access control** that supersedes the legacy `block`/`allow` lists. Policies are checked **in array order** before every tool execution — the first matching pattern wins. If no policy matches, the legacy `block`/`allow` lists are checked as fallback, then access is allowed by default.
|
|
289
|
+
|
|
290
|
+
Configure policies in your `config.json` under the top-level `policies` array:
|
|
291
|
+
|
|
292
|
+
```json
|
|
293
|
+
{
|
|
294
|
+
"policies": [
|
|
295
|
+
{
|
|
296
|
+
"pattern": "*.banking.com",
|
|
297
|
+
"mode": "deny"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"pattern": "banking.com",
|
|
301
|
+
"mode": "allow"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"pattern": "*.internal.com",
|
|
305
|
+
"mode": "read-only"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"pattern": "*.trusted.com",
|
|
309
|
+
"mode": "allow"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"pattern": "*.audit-logs.com",
|
|
313
|
+
"mode": "audit-only"
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Policy Modes
|
|
320
|
+
|
|
321
|
+
| Mode | Description |
|
|
322
|
+
|------|-------------|
|
|
323
|
+
| `allow` | Full access to all tools. Explicitly whitelists a domain. |
|
|
324
|
+
| `read-only` | Only observation tools allowed: map, find, scrape, console, eval, inspect, snapshot, pdf, cookies. Blocks write tools (click, type, navigate, etc.). |
|
|
325
|
+
| `deny` | Complete block of all interactions on that domain. |
|
|
326
|
+
| `audit-only` | All tools allowed, but every action is logged for audit trails. |
|
|
327
|
+
|
|
328
|
+
### Key Differences from `block`/`allow` Lists
|
|
329
|
+
|
|
330
|
+
| Feature | Legacy `block`/`allow` | `policies` |
|
|
331
|
+
|---------|----------------------|------------|
|
|
332
|
+
| Modes | Only allow or deny | 4 modes: allow, deny, read-only, audit-only |
|
|
333
|
+
| Wildcards | Supported | Supported (`*` wildcard) |
|
|
334
|
+
| Order | No ordering | **First match wins** — order matters |
|
|
335
|
+
| Granularity | Domain only | Domain + per-tool enforcement (read-only blocks writes) |
|
|
336
|
+
| Check timing | At navigation | Every tool execution |
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## RBAC Roles
|
|
341
|
+
|
|
342
|
+
### Role Definitions
|
|
343
|
+
|
|
344
|
+
| Role | Permissions |
|
|
345
|
+
|------|-------------|
|
|
346
|
+
| `admin` | Full access to all tools |
|
|
347
|
+
| `operator` | Full access to all tools (standard agent role) |
|
|
348
|
+
| `viewer` | Read-only observation tools only (`browser_map`, `browser_find`, `browser_scrape`, `browser_console`, `browser_eval`, `browser_inspect`, `browser_extract_design`, `browser_snapshot`, `browser_screenshot`, `browser_pdf`, `browser_cookies`, `browser_tabs`, `browser_wait`, `browser_pattern_learn`) |
|
|
349
|
+
| `automation` | Full access except `browser_thoughts` (non-interactive CI/CD mode) |
|
|
350
|
+
| `system` | Internal tools only (`browser_thoughts`, `browser_detect`, `browser_performance`, `browser_checkpoint`, `browser_pattern_learn`) |
|
|
351
|
+
|
|
352
|
+
### Setting Role
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
{
|
|
356
|
+
"role": "viewer"
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Performance Optimization
|
|
363
|
+
|
|
364
|
+
### Token Efficiency
|
|
365
|
+
|
|
366
|
+
Use `browser_map` with delta and pruning for maximum efficiency:
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
// First call: full map
|
|
370
|
+
browser_map({ prune: true })
|
|
371
|
+
|
|
372
|
+
// Subsequent calls: only changes
|
|
373
|
+
browser_map({ delta: true, prune: true })
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Latency Optimization
|
|
377
|
+
|
|
378
|
+
- Use `speed: "fast"` on `browser_scroll` and `profile: "fast"` on `browser_type` for faster execution
|
|
379
|
+
- Enable `prune: true` to reduce DOM processing time
|
|
380
|
+
- Use cached ref IDs instead of label-based lookups
|
|
381
|
+
- Avoid unnecessary DOM walks with `browser_find` for text search
|
|
382
|
+
|
|
383
|
+
### Memory Optimization
|
|
384
|
+
|
|
385
|
+
- Clear cache periodically: `weavetab reset`
|
|
386
|
+
- Use `limit` parameter in `browser_map` to reduce cache size
|
|
387
|
+
- Enable `prune: true` to reduce memory footprint
|
|
388
|
+
- Restart Weavetab for long-running sessions
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Plugin System
|
|
393
|
+
|
|
394
|
+
### Creating a Plugin
|
|
395
|
+
|
|
396
|
+
Create any npm package with a `weavetab.json` manifest at its root:
|
|
397
|
+
|
|
398
|
+
```json
|
|
399
|
+
// my-plugin/package.json
|
|
400
|
+
{
|
|
401
|
+
"name": "wt-my-tool",
|
|
402
|
+
"version": "1.0.0",
|
|
403
|
+
"main": "index.js",
|
|
404
|
+
"type": "module"
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
```json
|
|
409
|
+
// my-plugin/weavetab.json
|
|
410
|
+
{
|
|
411
|
+
"name": "My Custom Tool",
|
|
412
|
+
"version": "1.0.0",
|
|
413
|
+
"description": "Custom MCP tool for Weavetab",
|
|
414
|
+
"tools": [
|
|
415
|
+
{
|
|
416
|
+
"name": "my_custom_tool",
|
|
417
|
+
"description": "My custom tool description"
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
// my-plugin/index.ts
|
|
425
|
+
import { definePlugin, type PluginContext } from "@weavetab/sdk";
|
|
426
|
+
|
|
427
|
+
export default definePlugin({
|
|
428
|
+
name: "wt-my-tool",
|
|
429
|
+
|
|
430
|
+
async onLoad(ctx: PluginContext) {
|
|
431
|
+
ctx.mcp.registerTool({
|
|
432
|
+
name: "my_custom_tool",
|
|
433
|
+
description: "My custom tool description",
|
|
434
|
+
schema: {
|
|
435
|
+
type: "object",
|
|
436
|
+
properties: { query: { type: "string" } },
|
|
437
|
+
required: ["query"]
|
|
438
|
+
},
|
|
439
|
+
handler: async (args, session) => {
|
|
440
|
+
return { content: [{ type: "text", text: "result" }] };
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Installing Plugins
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Official plugins
|
|
451
|
+
weavetab plugin add @weavetab/plugin-sample
|
|
452
|
+
|
|
453
|
+
# Community plugins (any npm name)
|
|
454
|
+
weavetab plugin add wt-my-tool
|
|
455
|
+
# or via npm
|
|
456
|
+
npm install wt-my-tool
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Plugins with a valid `weavetab.json` are automatically discovered on Weavetab startup.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Weavetab Skills
|
|
464
|
+
|
|
465
|
+
### Using Skills
|
|
466
|
+
|
|
467
|
+
Skills provide pre-built workflow patterns that help agents understand complex multi-step operations:
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
npm install -g @weavetab/skills
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Available Skills
|
|
474
|
+
|
|
475
|
+
- **Form Automation** — Handles complex forms with validation, multi-page flows, and error recovery
|
|
476
|
+
- **E-commerce** — Shopping cart navigation, product selection, checkout processes
|
|
477
|
+
- **Data Extraction** — Structured scraping, pagination handling, data export
|
|
478
|
+
- **CMS Workflows** — WordPress, Drupal, and other CMS-specific operations
|
|
479
|
+
- **API Testing** — Endpoint discovery, request/response validation, test automation
|
|
480
|
+
|
|
481
|
+
### Skill Integration
|
|
482
|
+
|
|
483
|
+
Skills are automatically discovered by MCP clients and provide:
|
|
484
|
+
|
|
485
|
+
- Context-aware workflow guidance
|
|
486
|
+
- Step-by-step mission templates
|
|
487
|
+
- Error handling patterns
|
|
488
|
+
- Best practice recommendations
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Electron & Desktop Application Automation
|
|
493
|
+
|
|
494
|
+
Weavetab natively supports **generic automation of any Electron or Chromium-based desktop application** (e.g. Discord, Slack, VS Code, Antigravity IDE, Figma, Obsidian, Postman, or local developer applications running from source).
|
|
495
|
+
|
|
496
|
+
### Why It Works at Layer 0
|
|
497
|
+
Electron desktop applications run a bundled Chromium/Blink engine under the hood. When started with Chrome DevTools Protocol debugging enabled (either automatically via Weavetab or via `--remote-debugging-port`), Weavetab connects directly to the desktop app's internal WebSockets and exposes all 41 built-in MCP tools without requiring external drivers or wrappers.
|
|
498
|
+
|
|
499
|
+
### Registering Applications
|
|
500
|
+
In `~/.weavetab/config.json` or project-scoped `.weavetab/config.json`:
|
|
501
|
+
|
|
502
|
+
```json
|
|
503
|
+
{
|
|
504
|
+
"electron": {
|
|
505
|
+
"discord": "C:\\Users\\<user>\\AppData\\Local\\Discord\\app-1.0.9183\\Discord.exe",
|
|
506
|
+
"antigravity": "C:\\Users\\<user>\\AppData\\Local\\Programs\\antigravity\\Antigravity.exe",
|
|
507
|
+
"vscode": "C:\\Users\\<user>\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
|
|
508
|
+
"figma": "C:\\Users\\<user>\\AppData\\Local\\Figma\\Figma.exe",
|
|
509
|
+
"obsidian": "C:\\Users\\<user>\\AppData\\Local\\Obsidian\\Obsidian.exe",
|
|
510
|
+
"my-app": "C:\\path\\to\\my-project\\node_modules\\electron\\dist\\electron.exe"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### Automating Local / Source-Hosted Projects
|
|
516
|
+
When developing an Electron app locally (e.g. `localhost:3000` or running via Vite/Webpack/Electron forge):
|
|
517
|
+
|
|
518
|
+
1. **Launch with remote debugging enabled:**
|
|
519
|
+
```bash
|
|
520
|
+
npx electron . --remote-debugging-port=9222
|
|
521
|
+
# or with npm scripts:
|
|
522
|
+
npm run dev -- --remote-debugging-port=9222
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
2. **Automate via MCP tools:**
|
|
526
|
+
Set `"attachPort": 9222` or register the dev script in `"electron"` config.
|
|
527
|
+
|
|
528
|
+
### Tool Execution Flow with Desktop Apps
|
|
529
|
+
Every Weavetab tool supports the optional `app` parameter:
|
|
530
|
+
|
|
531
|
+
| Tool Call | Desktop Behavior |
|
|
532
|
+
| :--- | :--- |
|
|
533
|
+
| `browser_navigate({ app: "antigravity" })` | Launches or connects to Antigravity's CDP session |
|
|
534
|
+
| `browser_tabs({ action: "list", app: "antigravity" })` | Lists all windows, webviews, and workbench tabs in the app |
|
|
535
|
+
| `browser_tabs({ action: "switch", tabId: "<id>", app: "antigravity" })` | Switches active focus to the specified workbench or window |
|
|
536
|
+
| `browser_map({ app: "antigravity" })` | Generates semantic Ref IDs (`w:NN`) for the desktop app's active window |
|
|
537
|
+
| `browser_click({ ref: "w:12", app: "antigravity" })` | Sends Ghost Cursor click to the desktop app element |
|
|
538
|
+
| `browser_type({ ref: "w:15", text: "...", app: "discord" })` | Types text directly into the desktop app input field |
|
|
539
|
+
| `browser_eval({ expression: "...", app: "vscode" })` | Evaluates JavaScript inside the desktop app frame context |
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Troubleshooting
|
|
544
|
+
|
|
545
|
+
### Common Issues
|
|
546
|
+
|
|
547
|
+
1. **CDP connection failed** — Ensure Chrome is running with `--remote-debugging-port=9222`
|
|
548
|
+
2. **Extension not loading** — Use headed mode or `--headless=new` Chrome flag
|
|
549
|
+
3. **High memory usage** — Clear cache with `weavetab reset` or enable pruning
|
|
550
|
+
4. **Token usage high** — Use `delta: true` and `prune: true` in `browser_map`
|
|
551
|
+
5. **Clicks failing** — Use ref IDs from `browser_map` instead of labels
|
|
552
|
+
|
|
553
|
+
### Debug Mode
|
|
554
|
+
|
|
555
|
+
Enable `devMode: true` in config for:
|
|
556
|
+
|
|
557
|
+
- Real-time tool execution timing
|
|
558
|
+
- Token usage estimates
|
|
559
|
+
- Detailed error messages
|
|
560
|
+
- HUD overlay in browser
|
|
561
|
+
|
|
562
|
+
### Audit Logs
|
|
563
|
+
|
|
564
|
+
Review the latest `~/.weavetab-system/logs/mission_<timestamp>.log` for:
|
|
565
|
+
|
|
566
|
+
- Tool invocation history
|
|
567
|
+
- Error messages and stack traces
|
|
568
|
+
- Domain policy violations
|
|
569
|
+
- Security events
|
|
570
|
+
|
|
571
|
+
For detailed troubleshooting, see [TROUBLESHOOTING.md](../TROUBLESHOOTING.md).
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Additional Resources
|
|
576
|
+
|
|
577
|
+
- [Tool Reference](tools/tools.md)
|
|
578
|
+
- [Plugin System Guide](PLUGINS.md)
|
|
579
|
+
- [Architecture Documentation](../ARCHITECTURE.md)
|
|
580
|
+
- [Support & Community](../SUPPORT.md)
|
|
581
|
+
- [Security Policy](../SECURITY.md)
|
|
582
|
+
- [Contributing Guidelines](../CONTRIBUTING.md)
|
|
583
|
+
- [Troubleshooting Guide](../TROUBLESHOOTING.md)
|