@weavetab/mcp 2.5.0-beta.1 → 2.5.0-beta.4

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.
Files changed (156) hide show
  1. package/AGENTS.md +2 -1
  2. package/ARCHITECTURE.md +6 -6
  3. package/LICENSE +1 -1
  4. package/README.md +164 -802
  5. package/SECURITY.md +33 -22
  6. package/TROUBLESHOOTING.md +3 -3
  7. package/dist/cdp/bridge.d.ts +10 -0
  8. package/dist/cdp/bridge.js +285 -78
  9. package/dist/cdp/connector.d.ts +7 -3
  10. package/dist/cdp/connector.js +196 -75
  11. package/dist/cdp/helpers.d.ts +4 -0
  12. package/dist/cdp/helpers.js +181 -0
  13. package/dist/cdp/lock.d.ts +9 -6
  14. package/dist/cdp/lock.js +72 -59
  15. package/dist/cdp/omni_broker.d.ts +2 -1
  16. package/dist/cdp/omni_broker.js +13 -7
  17. package/dist/cdp/profiles.d.ts +10 -0
  18. package/dist/cdp/profiles.js +65 -0
  19. package/dist/cdp/walker.d.ts +25 -1
  20. package/dist/cdp/walker.js +354 -7
  21. package/dist/cli/plugin.d.ts +0 -2
  22. package/dist/cli/plugin.js +51 -696
  23. package/dist/cli/updater.d.ts +1 -1
  24. package/dist/cli/updater.js +27 -7
  25. package/dist/config/loader.d.ts +33 -6
  26. package/dist/config/loader.js +174 -22
  27. package/dist/desktop/discovery.d.ts +44 -0
  28. package/dist/desktop/discovery.js +364 -0
  29. package/dist/index.js +140 -64
  30. package/dist/intelligence/marks.d.ts +36 -0
  31. package/dist/intelligence/marks.js +30 -0
  32. package/dist/intelligence/patternCompiler.d.ts +118 -0
  33. package/dist/intelligence/patternCompiler.js +259 -0
  34. package/dist/intelligence/sessionMemory.d.ts +2 -0
  35. package/dist/intelligence/sessionMemory.js +18 -8
  36. package/dist/overlay/ghost.js +2 -2
  37. package/dist/overlay/injector.js +3 -5
  38. package/dist/plugin/extension_bridge.d.ts +40 -0
  39. package/dist/plugin/extension_bridge.js +158 -0
  40. package/dist/plugin/interface.d.ts +151 -15
  41. package/dist/plugin/loader.d.ts +19 -1
  42. package/dist/plugin/loader.js +331 -63
  43. package/dist/plugin/pipeline.d.ts +75 -0
  44. package/dist/plugin/pipeline.js +183 -0
  45. package/dist/plugin/registry.js +12 -1
  46. package/dist/plugin/storage.d.ts +51 -0
  47. package/dist/plugin/storage.js +164 -0
  48. package/dist/security/secrets.d.ts +1 -0
  49. package/dist/security/secrets.js +13 -0
  50. package/dist/sensors/actionability.js +1 -2
  51. package/dist/sensors/guard.js +4 -10
  52. package/dist/sensors/mutations.js +12 -0
  53. package/dist/sensors/operation_monitor.js +1 -0
  54. package/dist/server.d.ts +1 -1
  55. package/dist/server.js +600 -236
  56. package/dist/state/agent.d.ts +1 -0
  57. package/dist/state/agent.js +3 -0
  58. package/dist/state/delta.d.ts +12 -4
  59. package/dist/state/delta.js +67 -14
  60. package/dist/state/session.d.ts +8 -2
  61. package/dist/state/session.js +60 -13
  62. package/dist/tools/browser_detect.d.ts +16 -2
  63. package/dist/tools/browser_detect.js +54 -6
  64. package/dist/tools/burst.d.ts +17 -7
  65. package/dist/tools/burst.js +240 -83
  66. package/dist/tools/checkpoint.d.ts +38 -0
  67. package/dist/tools/checkpoint.js +271 -0
  68. package/dist/tools/click.d.ts +1 -0
  69. package/dist/tools/click.js +97 -98
  70. package/dist/tools/clipboard.js +31 -24
  71. package/dist/tools/design_extract.js +1 -1
  72. package/dist/tools/eval.js +1 -1
  73. package/dist/tools/fill.d.ts +20 -1
  74. package/dist/tools/fill.js +199 -40
  75. package/dist/tools/find.d.ts +16 -0
  76. package/dist/tools/find.js +67 -44
  77. package/dist/tools/github/index.d.ts +19 -4
  78. package/dist/tools/github/index.js +40 -4
  79. package/dist/tools/highlight.d.ts +6 -2
  80. package/dist/tools/highlight.js +158 -72
  81. package/dist/tools/inspect.js +1 -1
  82. package/dist/tools/key.js +65 -56
  83. package/dist/tools/navigate.d.ts +1 -1
  84. package/dist/tools/navigate.js +57 -44
  85. package/dist/tools/pdf.js +21 -13
  86. package/dist/tools/pointer.d.ts +18 -3
  87. package/dist/tools/pointer.js +89 -1
  88. package/dist/tools/read.d.ts +28 -8
  89. package/dist/tools/read.js +230 -56
  90. package/dist/tools/scrape.js +67 -13
  91. package/dist/tools/screenshot.js +21 -16
  92. package/dist/tools/scroll.js +6 -11
  93. package/dist/tools/select.js +8 -2
  94. package/dist/tools/snapshot.js +3 -34
  95. package/dist/tools/tabs.d.ts +10 -10
  96. package/dist/tools/tabs.js +55 -39
  97. package/dist/tools/thought.d.ts +2 -0
  98. package/dist/tools/thought.js +13 -14
  99. package/dist/tools/type.d.ts +2 -0
  100. package/dist/tools/type.js +109 -60
  101. package/dist/tools/type_secret.js +42 -76
  102. package/dist/tools/upload.js +1 -1
  103. package/dist/tools/video_compiler.d.ts +1 -1
  104. package/dist/tools/video_compiler.js +11 -12
  105. package/dist/version.d.ts +5 -0
  106. package/dist/version.js +5 -0
  107. package/docs/DOCUMENTATION.md +82 -36
  108. package/docs/PLUGINS.md +82 -499
  109. package/docs/TOOLS.md +51 -99
  110. package/docs/architecture/blind-injection.md +83 -0
  111. package/docs/architecture/dual-injection.md +32 -0
  112. package/docs/architecture/overview.md +49 -0
  113. package/docs/architecture/security.md +35 -0
  114. package/docs/architecture/transport.md +37 -0
  115. package/docs/captcha-stealth/captcha-solver.md +75 -0
  116. package/docs/captcha-stealth/stealth-physics.md +60 -0
  117. package/docs/cli/cli-commands.md +44 -0
  118. package/docs/cli/cli-flags.md +20 -0
  119. package/docs/cli/cli-introduction.md +20 -0
  120. package/docs/cli/cli-scripting.md +32 -0
  121. package/docs/cli/g-ide/ide-antigravity.md +24 -0
  122. package/docs/cli/g-ide/ide-claude-code.md +24 -0
  123. package/docs/cli/g-ide/ide-claude-desktop.md +32 -0
  124. package/docs/cli/g-ide/ide-cursor.md +31 -0
  125. package/docs/cli/g-ide/ide-generic.md +34 -0
  126. package/docs/cli/g-ide/ide-opencode.md +24 -0
  127. package/docs/cli/g-ide/ide-vscode-copilot.md +24 -0
  128. package/docs/cli/g-ide/ide-windsurf.md +24 -0
  129. package/docs/configuration/config-locations.md +24 -0
  130. package/docs/configuration/configuration.md +73 -0
  131. package/docs/configuration/env-variables.md +19 -0
  132. package/docs/configuration/folders.md +55 -0
  133. package/docs/desktop-automation/electron-apps.md +217 -0
  134. package/docs/get-started/installation.md +47 -0
  135. package/docs/get-started/introduction.md +60 -0
  136. package/docs/get-started/quickstart.md +54 -0
  137. package/docs/get-started/setup-wizard.md +26 -0
  138. package/docs/intelligence/site-profiles.md +151 -0
  139. package/docs/skills-ecosystem/skills-overview.md +35 -0
  140. package/docs/skills-ecosystem/skills-recipes.md +36 -0
  141. package/docs/tools/tools.md +631 -0
  142. package/docs/troubleshooting/trouble-browser.md +27 -0
  143. package/docs/troubleshooting/trouble-config.md +20 -0
  144. package/docs/troubleshooting/trouble-loop.md +31 -0
  145. package/ext-dist/background.js +10 -62
  146. package/ext-dist/content.js +333 -921
  147. package/ext-dist/hud/hud.js +9 -9
  148. package/ext-dist/manifest.json +2 -6
  149. package/ext-dist/styles.css +6 -1
  150. package/mcp.json +108 -72
  151. package/package.json +14 -9
  152. package/server.json +3 -3
  153. package/docs/DEV_MODE.md +0 -68
  154. package/docs/dev_plugin.md +0 -310
  155. package/ext-dist/sidepanel/sidepanel.js +0 -25
  156. package/ext-dist/sidepanel.html +0 -547
package/README.md CHANGED
@@ -1,909 +1,271 @@
1
1
  <div align="center">
2
-
3
- ![WeaveTab MCP Logo](icon.png)
4
-
5
- <h1>WeaveTab MCP</h1>
6
- <p><strong>The Production-Grade Browser Automation MCP Server</strong></p>
7
- <p><em>Direct CDP at Layer 0 — No WebDriver. No Cloud. No Compromise.</em></p>
8
-
9
- <p>
10
- <img src="https://img.shields.io/badge/version-2.5.0-3b82f6?style=flat-square" alt="Version" />
11
- <img src="https://img.shields.io/badge/status-beta-f59e0b?style=flat-square" alt="Beta" />
12
- <img src="https://img.shields.io/badge/license-AGPL--3.0-8b5cf6?style=flat-square" alt="License" />
13
- <img src="https://img.shields.io/badge/protocol-MCP-10b981?style=flat-square" alt="MCP" />
14
- <img src="https://img.shields.io/badge/node-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node" />
15
- <img src="https://img.shields.io/badge/tools-45-ec4899?style=flat-square" alt="Tools" />
16
- </p>
17
-
18
- <p>
19
- <a href="https://github.com/weavetab/mcp">GitHub</a> ·
20
- <a href="docs/TOOLS.md">Tool Reference</a> ·
21
- <a href="docs/DOCUMENTATION.md">Documentation</a> ·
22
- <a href="SECURITY.md">Security Policy</a> ·
23
- <a href="CONTRIBUTING.md">Contributing</a>
24
- </p>
25
- </div>
26
2
 
27
- ---
3
+ <img src="icon.png" width="96" alt="Weavetab" /><br /><br />
28
4
 
29
- **Weavetab** is a local, high-performance [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that grants AI agents human-like control over Chromium browsers. Unlike Playwright or Puppeteer, Weavetab communicates directly over the **Chrome DevTools Protocol (CDP) WebSocket at Layer 0** — no WebDriver process, no browser binary download, no heavy abstraction layer. This architectural decision yields **3–8ms mean tool execution latency** and eliminates an entire class of process-level overhead.
5
+ <h1>Weavetab MCP</h1>
30
6
 
31
- Built by **fy2ne**, Weavetab is engineered for autonomous AI agents operating in production environments where latency, security, and token efficiency are non-negotiable.
7
+ <p>A local <a href="https://modelcontextprotocol.io">Model Context Protocol</a> server that gives AI agents<br />direct, physical control over browsers and desktop applications via the Chrome DevTools Protocol.</p>
32
8
 
33
- ---
9
+ <p>
10
+ <a href="https://github.com/weavetab/mcp/releases"><img src="https://img.shields.io/github/v/release/weavetab/mcp?label=version&style=flat-square&color=3b82f6" alt="version" /></a>
11
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-8b5cf6?style=flat-square" alt="license" /></a>
12
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-10b981?style=flat-square" alt="MCP" /></a>
13
+ <img src="https://img.shields.io/badge/Node.js-%3E%3D18-green?style=flat-square" alt="Node" />
14
+ <a href="docs/tools/tools.md"><img src="https://img.shields.io/badge/tools-44-ec4899?style=flat-square" alt="tools" /></a>
15
+ <a href="https://github.com/sponsors/fy2ne"><img src="https://img.shields.io/badge/sponsor-fy2ne-ea4aaa?style=flat-square&logo=github-sponsors" alt="sponsor" /></a>
16
+ </p>
34
17
 
35
- ## Table of Contents
36
-
37
- - [Quick Start](#quick-start)
38
- - [Architecture](#architecture)
39
- - [Core Features](#core-features)
40
- - [Tool Categories](#tool-categories)
41
- - [CLI Reference](#cli-reference)
42
- - [Configuration](#configuration)
43
- - [Secrets Management](#secrets-management)
44
- - [MCP Client Integration](#mcp-client-integration)
45
- - [Development Environment](#development-environment)
46
- - [Plugin System](#plugin-system)
47
- - [Weavetab Skills Ecosystem](#weavetab-skills-ecosystem)
48
- - [Security Model](#security-model)
49
- - [Feature Comparison](#feature-comparison)
50
- - [Contributing](#contributing)
51
-
52
- ---
18
+ <p>
19
+ <a href="docs/tools/tools.md">Tool Reference</a> &nbsp;&middot;&nbsp;
20
+ <a href="docs/DOCUMENTATION.md">Documentation</a> &nbsp;&middot;&nbsp;
21
+ <a href="ARCHITECTURE.md">Architecture</a> &nbsp;&middot;&nbsp;
22
+ <a href="SUPPORT.md">Support</a> &nbsp;&middot;&nbsp;
23
+ <a href="SECURITY.md">Security</a>
24
+ </p>
53
25
 
54
- ## Quick Start
55
-
56
- ### Quick Run with npx (Recommended)
57
-
58
- ```bash
59
- # Run directly with npx
60
- npx -y @weavetab/mcp
61
- ```
62
-
63
- ### Or Install Globally via npm
26
+ </div>
64
27
 
65
- ```bash
66
- # Install globally
67
- npm install -g @weavetab/mcp
28
+ ---
68
29
 
69
- # Launch the MCP server
70
- weavetab
71
- ```
30
+ Weavetab is a local, production-grade MCP server that connects AI agents directly to Chromium browsers and Electron desktop applications through the **Chrome DevTools Protocol (CDP) WebSocket at Layer 0** — no WebDriver binaries, no Playwright processes, no cloud relay.
72
31
 
73
- ### Verify Installation
32
+ Tool invocations resolve in **3–8 ms of mean latency**. DOM state is compressed into agent-readable semantic maps and diffed across turns, cutting prompt token usage by **up to 95%**. Security is enforced locally via per-domain policies, 4-tier RBAC, and cryptographic blind credential injection.
74
33
 
75
- ```bash
76
- weavetab --version
77
- # → @weavetab/mcp 2.5.0
34
+ Built by [fy2ne](https://github.com/fy2ne).
78
35
 
79
- weavetab help
80
- # → Full CLI usage
81
- ```
36
+ ---
82
37
 
83
- ### Connect to an MCP Client
38
+ ## Why not Playwright or Puppeteer?
84
39
 
85
- Add to your MCP client configuration (e.g., `claude_desktop_config.json`):
40
+ > The standard approach — Playwright over MCP — works. But it carries fundamental architectural costs that compound at scale.
86
41
 
87
- ```json
88
- {
89
- "mcpServers": {
90
- "weavetab": {
91
- "command": "npx",
92
- "args": ["-y", "@weavetab/mcp"]
93
- }
94
- }
95
- }
96
- ```
42
+ | | Playwright / Puppeteer | **Weavetab** |
43
+ |---|---|---|
44
+ | **Protocol layer** | WebDriver BiDi or CDP via browser binary | Raw CDP WebSocket, Layer 0 |
45
+ | **Tool execution latency** | 50–300 ms (binary + IPC overhead) | **3–8 ms** |
46
+ | **Desktop app control** | Browser only | Chrome + any Electron app (Discord, VS Code, Figma…) |
47
+ | **DOM representation** | Full HTML dump to LLM | Semantic Map 3.0 with delta diffing |
48
+ | **Token cost per map** | ~2,000–8,000 tokens | **~80–400 tokens** (95% reduction via delta) |
49
+ | **CAPTCHA** | API service required | **Zero-API** via CDP mouse physics |
50
+ | **Credential safety** | Secrets passed in plaintext | **Blind Injection** — never in LLM context |
51
+ | **Extension access** | Limited | Full Chrome Extension API surface |
97
52
 
98
53
  ---
99
54
 
100
55
  ## Architecture
101
56
 
102
- Weavetab operates as the execution layer between an MCP client and a live Chromium browser. Every tool invocation travels through a security-hardened, multi-stage pipeline before a single byte touches the browser.
103
-
104
- ```mermaid
105
- flowchart LR
106
- Client["**MCP Client**<br/>(Claude / Cursor / Copilot)"]
107
-
108
- subgraph Server ["WeaveTab MCP Server"]
109
- direction LR
110
-
111
- subgraph Security ["Security Pipeline"]
112
- direction LR
113
- Rate["Rate Limiter"] --> Domain["Domain Policy"]
114
- Domain --> RBAC["RBAC Check"]
115
- end
116
-
117
- subgraph Intel ["Intelligence Engine"]
118
- direction TB
119
- I1["Delta Engine · Session Memory"]
120
- I2["DOM Pruner · Trail/Loop Detect"]
121
- I3["Knowledge Hints · Vision Fallback"]
122
- end
123
-
124
- subgraph Bridge ["CDP Bridge Layer"]
125
- direction LR
126
- B1["Ghost Cursor · Keystroke Engine"]
127
- B2["DOM Walker · Shadow DOM Injector"]
128
- end
129
-
130
- Security --> Intel
131
- Intel --> Bridge
132
- end
133
-
134
- Browser["**Chromium Browser**<br/>(Chrome / Edge / Brave)"]
135
-
136
- Client -- "JSON-RPC<br/>(stdio OR WebSocket :3000)" --> Server
137
- Bridge -- "CDP WebSocket<br/>(127.0.0.1 — localhost only)" --> Browser
138
57
  ```
139
-
140
- ### Five Architectural Layers
141
-
142
- | Layer | Components | Responsibility |
143
- |-------|-----------|----------------|
144
- | **Transport** | stdio (JSON-RPC), WebSocket (port 3000) | MCP client communication |
145
- | **Security & Governance** | Domain blacklist, Rate limiter, RBAC (4 roles), Root guard, Storage blocker | Pre-flight security checks |
146
- | **Intelligence** | Session memory, Semantic Delta engine, DOM pruner, Trail/loop detection, Knowledge hints, Vision fallback | Token optimization, self-learning |
147
- | **Sensor Systems** | Network telemetry, DOM mutations, Human pacing, Agent state machine, Thought HUD | Runtime awareness |
148
- | **CDP Bridge** | DOM walker, Ghost cursor, Keystroke engine, Pruner, Shadow DOM injector, Tab manager, Browser launcher | Raw browser control |
149
-
150
- ### Transport Modes
151
-
152
- | Mode | Protocol | Use Case |
153
- |------|----------|----------|
154
- | **stdio** (default) | JSON-RPC over stdin/stdout | Claude Desktop, Cursor, Copilot, all standard MCP clients |
155
- | **WebSocket** (`--ws`) | JSON-RPC over WebSocket, port 3000 | Custom integrations, remote agent pipelines |
58
+ MCP Client (Claude / Cursor / Antigravity / Copilot / Windsurf)
59
+ |
60
+ | JSON-RPC 2.0 (stdio or WebSocket :3000)
61
+ v
62
+ +-------------------------------------------------------------+
63
+ | Weavetab MCP Server |
64
+ | |
65
+ | +-----------------+ +---------------------------------+ |
66
+ | | Security Layer |-->| Intelligence Engine | |
67
+ | | Rate · RBAC | | Map 3.0 · Delta · Memory | |
68
+ | | Policy · Audit | | Pruner · Framework Detector | |
69
+ | +-----------------+ +----------------+----------------+ |
70
+ | | |
71
+ | +----------v----------------+ |
72
+ | | CDP Bridge | |
73
+ | | Ghost Cursor · Typing | |
74
+ | | App Router · Loop Guard | |
75
+ | +----------+----------------+ |
76
+ +-------------------------------------------------------------+
77
+ | CDP WebSocket (127.0.0.1)
78
+ +---------------------------+-----------------------------+
79
+ v v v
80
+ Chrome / Edge VS Code / Discord Your Electron App
81
+ (any tab) (Electron apps) (local dev)
82
+ ```
83
+
84
+ No cloud. No external process. The CDP WebSocket connection is strictly bound to `127.0.0.1`.
156
85
 
157
86
  ---
158
87
 
159
- ## Core Features
160
-
161
- ### Semantic Delta Engine
162
- Instead of dumping the full DOM on every `browser_map` call, the Delta Engine stores a per-tab snapshot and returns **only what changed**. This reduces token consumption by **5–10× on repeated reads**. Combined with the Semantic DOM Pruner (which drops hidden non-interactive elements and collapses SVG icons to `[SVG Icon: label]` tokens), agents receive minimal, actionable context.
88
+ ## Quick Start
163
89
 
90
+ ```bash
91
+ npx -y @weavetab/mcp
164
92
  ```
165
- browser_map({ prune: true, delta: true }) → Maximum token efficiency
166
- ```
167
-
168
- ### Ghost Cursor
169
- Every click dispatches a physics-realistic **Bézier curve trajectory** — not a raw coordinate warp. Acceleration, jitter, and hold-duration are sampled from a human motion profile, making automation indistinguishable from human input at the DOM event level.
170
-
171
- ### Human Typing Engine
172
- Keystrokes are dispatched with **per-character jitter**, **burst-pattern profiling** (humans type fast in bursts, slow at boundaries), and natural inter-word pauses. The engine includes real-time DOM-diffing to detect and break stuck-typing loops.
173
93
 
174
- ### Blind Injection (`browser_type_secret`)
175
- > [!IMPORTANT]
176
- > Enterprise-grade credential injection that **never exposes secret values to the LLM context**. Secrets are resolved from `~/.weavetab/secrets.json` (or a project-scoped `.weavetab/secrets.json`) with per-domain scoping. The injected value is permanently masked as `[REDACTED]` in all subsequent DOM snapshots, delta maps, and audit logs.
177
-
178
- ### Session Memory
179
- Each domain visited builds a persistent profile on disk at `~/.weavetab-system/memory/`. The system auto-detects frontend frameworks (React, Vue, Angular, Lit, Svelte, Next, Nuxt, Gatsby) via `Runtime.evaluate`. Strategies and known inputs accumulate across sessions, enabling progressive improvement.
94
+ Add to your MCP client config:
180
95
 
181
96
  ```json
182
97
  {
183
- "framework": "react",
184
- "shadowDom": true,
185
- "strategies": ["click_nav_menu", "type_search"],
186
- "knownInputs": [{ "label": "Search", "selector": "#search" }],
187
- "visitCount": 12,
188
- "updatedAt": "2026-07-20T..."
98
+ "mcpServers": {
99
+ "weavetab": {
100
+ "command": "npx",
101
+ "args": ["-y", "@weavetab/mcp"]
102
+ }
103
+ }
189
104
  }
190
105
  ```
191
106
 
192
- ### Loop Detection & Trail System
193
- > [!WARNING]
194
- > A rolling window of the last 50 tool actions is maintained in `~/.weavetab-system/sessions/context.json`. A strike-based algorithm detects stuck loops:
195
-
196
- | Strikes | Severity | Behavior |
197
- |---------|----------|----------|
198
- | < 5 | None | Normal operation |
199
- | 5–9 | Warning | HUD reports potential loop |
200
- | 10+ | Critical | Agent state → "stuck"; auto-recovery attempted |
201
-
202
- Use `browser_reset_loop_counter` to manually clear the counter.
203
-
204
- ### Vision Fallback System
205
- When the CDP Accessibility Tree returns zero elements (canvas-heavy pages, fully custom UIs), Weavetab falls back to local pixel analysis via the `sharp` library — **zero external API calls, zero ML dependencies**:
206
-
207
- ```
208
- CDP AX Tree Empty → Capture Screenshot → Grayscale Conversion
209
- → 4×4 Grid Heatmap → Text Density Calculation → Clickable Zone Detection
210
- → Page State Classification
211
- ```
212
-
213
- ### ⚡ Burst Mode
214
- Chain N actions in a single MCP round-trip with `browser_burst`. Supports macro steps: `type_and_send`, `navigate_and_read`, `click_and_wait`, `scroll_and_read`. Eliminates the per-tool JSON-RPC overhead for high-throughput workflows.
215
-
216
- ---
217
-
218
- ## Tool Categories
219
-
220
- Weavetab exposes **44+ MCP tools** organized into functional categories. See the complete reference in [`docs/TOOLS.md`](docs/TOOLS.md).
221
-
222
- ### Vision & Reading (7 tools)
223
- | Tool | Description |
224
- |------|-------------|
225
- | `browser_map` | DOM enumeration with volatile `w:NN` ref IDs that invalidate after DOM mutations. Supports delta mode, semantic pruning, AX tree fallback, scope & query filtering |
226
- | `browser_find` | Native CDP text search — ~10× cheaper than map |
227
- | `browser_scrape` | CSS/XPath (Note: XPath lacks shadow-DOM support) structured data extraction |
228
- | `browser_inspect` | Computed CSS styles + event listener types |
229
- | `browser_snapshot` | MHTML capture/restore of full DOM state |
230
- | `browser_screenshot` | PNG/JPEG capture, full-page + clip region, returns base64 (no file pollution) |
231
- | `browser_console` | Read/clear buffered console logs & exceptions |
232
-
233
- ### Navigation (1 tool)
234
- | Tool | Description |
235
- |------|-------------|
236
- | `browser_navigate` | Navigate to URL with domain blocklist enforcement & `weavetab://` protocol support |
237
-
238
- ### Input (9 tools)
239
- | Tool | Description |
240
- |------|-------------|
241
- | `browser_click` | Ghost Cursor (Bézier) click with multi-strategy fallback and intent memory |
242
- | `browser_type` | Human keystroke engine with jitter, burst patterns, and stuck-loop detection |
243
- | `browser_type_secret` | **Blind Injection** — resolves credentials from `secrets.json`, never exposes to LLM |
244
- | `browser_key` | Native keyboard dispatch with modifier keys (Ctrl, Shift, Alt, Meta) |
245
- | `browser_pointer` | Hover, double-click, drag-and-drop with Ghost Cursor trajectory |
246
- | `browser_select` | Native `<select>` dropdown selection (React/Vue safe via prototype setter) |
247
- | `browser_fill` | Smart multi-field form fill with per-field type detection |
248
- | `browser_upload` | Bypass file dialogs via CDP `DOM.setFileInputFiles` |
249
- | `browser_scroll` | Directional + element-relative scroll via CDP wheel events |
250
-
251
- ### Tabs & Windows (2 tools)
252
- | Tool | Description |
253
- |------|-------------|
254
- | `browser_tabs` | Open/switch/close/list/consolidate/heal tabs and windows |
255
- | `browser_detect` | Detect installed browsers + CDP feature coverage per engine |
256
-
257
- ### Mission Execution (3 tools)
258
- | Tool | Description |
259
- |------|-------------|
260
- | `browser_burst` | Chain N actions in 1 MCP call — highest throughput mode |
261
- | `browser_plan` | Live task dashboard in browser Shadow DOM overlay |
262
- | `browser_automation` | Inject persistent self-running background scripts |
263
-
264
- ### Dialog & User Interaction (3 tools)
265
- | Tool | Description |
266
- |------|-------------|
267
- | `browser_dialog` | Accept/dismiss JavaScript alert/confirm/prompt dialogs |
268
- | `browser_thought` | Green thought-bubble HUD: `feedback` (one-way) or `question` (with input) |
269
- | `browser_clipboard` | System clipboard R/W (text + images) |
270
-
271
- ### Wait & Timing (2 tools)
272
- | Tool | Description |
273
- |------|-------------|
274
- | `browser_wait` | Wait for element/text/URL/stable/network/auto |
275
- | `browser_reset_loop_counter` | Manual loop detection override |
276
-
277
- ### Storage & Cookies (2 tools)
278
- | Tool | Description |
279
- |------|-------------|
280
- | `browser_storage` | `localStorage` & `sessionStorage` get/set/clear |
281
- | `browser_cookies` | Cookies get/set/delete/get_all |
282
-
283
- ### Device & Environment (1 tool)
284
- | Tool | Description |
285
- |------|-------------|
286
- | `browser_viewport` | Viewport resize, mobile emulation, geolocation, timezone, locale, color scheme |
287
-
288
- ### Network (1 tool)
289
- | Tool | Description |
290
- |------|-------------|
291
- | `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) |
292
-
293
- ### Canvas & Visual (2 tools)
294
- | Tool | Description |
295
- |------|-------------|
296
- | `browser_canvas` | Get image data or draw points on `<canvas>` elements |
297
- | `browser_highlight` | Visual CDP overlay highlight — zero token cost |
298
-
299
- ### Output (2 tools)
300
- | Tool | Description |
301
- |------|-------------|
302
- | `browser_pdf` | Print page to PDF (landscape, scale, page ranges) |
303
- | `browser_recording` | Compile browser screencast frames into video (.webp, .gif, .mp4, .webm) |
304
-
305
- ### Evaluation (1 tool)
306
- | Tool | Description |
307
- |------|-------------|
308
- | `browser_eval` | Run arbitrary JS via `CDP Runtime.evaluate` |
309
-
310
- ### Performance (1 tool)
311
- | Tool | Description |
312
- |------|-------------|
313
- | `browser_performance` | FCP, LCP, TTI metrics and resource timings |
314
-
315
- ### Macro (1 tool)
316
- | Tool | Description |
317
- |------|-------------|
318
- | `browser_macro_compile` | Compile successful trails into reusable burst macros |
319
-
320
- ### GitHub (4 tools)
321
- | Tool | Description |
322
- |------|-------------|
323
- | `github_analyze` | Repo metadata, file tree, README snippet |
324
- | `github_read` | Read file contents via raw.githubusercontent.com (no API rate limit) |
325
- | `github_issues` | List/search/fetch issues with comments |
326
- | `github_get_pr` | PR details + changed files + comments |
327
-
328
- ### Utility (1 tool + Plugin System)
329
- | Tool | Description |
330
- |------|-------------|
331
- | `Weavetab_logs` | Append agent feedback to mission log |
332
- | Plugins | Dynamic tool loading from any npm package with `weavetab.json` (or `@weavetab/plugin-*`) |
107
+ | Client | Config path |
108
+ |---|---|
109
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` |
110
+ | Claude Code | `claude mcp add weavetab -- npx -y @weavetab/mcp` |
111
+ | Cursor | `.cursor/mcp.json` |
112
+ | Antigravity | `~/.gemini/antigravity/mcp/weavetab/` |
113
+ | VS Code Copilot | `.vscode/mcp.json` |
114
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
333
115
 
334
116
  ---
335
117
 
336
- ## CLI Reference
337
-
338
- The `weavetab` CLI provides server management, secrets handling, and diagnostics.
339
-
340
- ### Server Commands
118
+ ## Core Technology
341
119
 
342
- ```bash
343
- # Start the MCP server (stdio mode — default for MCP clients)
344
- # Start the MCP server
345
- Weavetab
346
-
347
- # Interactive configuration wizard
348
- Weavetab config
120
+ ### Semantic Map 3.0
349
121
 
350
- # View current state
351
- Weavetab view
122
+ The primary bottleneck in browser-based agents is DOM representation. Full HTML dumps are noisy, large, and structurally meaningless to language models. Weavetab's `browser_map` runs an in-browser CDP walker that produces a compact semantic map:
352
123
 
353
- # Reset session cache
354
- Weavetab reset
355
124
  ```
125
+ ╔═ ACTIVE DIALOG: "Confirm Payment" ═╗
126
+ [w:3] button "Confirm" [w:4] button "Cancel"
356
127
 
357
- ### Secrets Management
358
-
359
- Credentials are stored in `~/.weavetab/secrets.json` (global) or `.weavetab/secrets.json` (project-scoped). The CLI provides safe management without ever echoing values to the terminal.
360
-
361
- ```bash
362
- # Initialize project-scoped secrets store
363
- Weavetab secrets init --project
364
-
365
- # Add or update a secret (prompts securely, value never echoed)
366
- Weavetab secrets set MY_API_KEY
367
-
368
- # List all secrets (names only, values hidden)
369
- Weavetab secrets list
128
+ ┌ "Pro Plan — $49/mo"
129
+ [w:12] button "Upgrade" [w:13] button "View Details"
130
+ [w:14] input val:"john@example.com" ph:"Email address" FOCUSED
370
131
 
371
- # Remove a secret
372
- Weavetab secrets rm MY_API_KEY
132
+ [w:20...w:38] 18 nav links: "Dashboard" ... "Sign out"
373
133
  ```
374
134
 
375
- ### Reset & Diagnostics
135
+ Key properties:
376
136
 
377
- ```bash
378
- # Clear all session state (loop counter, memory snapshots)
379
- Weavetab reset
380
- ```
137
+ - **Ref IDs** (`w:N`) are stable within a session and used by all interaction tools
138
+ - **Container binding** — buttons and inputs are grouped under their parent card, row, or section header
139
+ - **Modal hoisting** — open dialogs are isolated at the top so agents cannot miss them
140
+ - **Link collapsing** — repeated nav/footer runs of 4+ links compress into a single token line
141
+ - **Semantic delta** — on re-reads, only changed nodes are transmitted (`~` modified, `+` added, `−` removed), cutting re-read cost by up to 95%
381
142
 
382
- ---
143
+ ### Ghost Cursor
383
144
 
384
- ## Configuration
145
+ Clicks are not dispatched as synthetic DOM events. They are delivered as a physical sequence of `Input.dispatchMouseEvent` CDP calls along a Bezier curve trajectory with randomized acceleration, natural jitter, and hold durations. Anti-bot fingerprinting that flags event-based automation does not trigger.
385
146
 
386
- Weavetab auto-generates a config file at `~/.weavetab/config.json` on first run. All values can be overridden with a project-scoped `.weavetab/config.json`.
147
+ `browser_pointer` supports `hover_chain` for multi-level menu traversal in a single tool call:
387
148
 
388
149
  ```json
389
150
  {
390
- "browserType": "chromium",
391
- "headless": false,
392
- "devMode": false,
393
- "maxActionsPerMinute": 60,
394
- "role": "admin",
395
- "telemetry": false,
396
- "downloadDir": "~/Downloads",
397
- "profileDir": "~/.weavetab/profile"
151
+ "hover_chain": ["File", "Export As", "PNG"],
152
+ "click_final": true
398
153
  }
399
154
  ```
400
155
 
401
- | Key | Type | Default | Description |
402
- |-----|------|---------|-------------|
403
- | `browserType` | `"chromium"` \| `"firefox"` \| `"webkit"` | `"chromium"` | Which browser to launch/attach |
404
- | `headless` | boolean | `false` | Run browser without a window |
405
- | `devMode` | boolean | `false` | Verbose CDP logging |
406
- | `maxActionsPerMinute` | number | `60` | Rate limit threshold |
407
- | `role` | `"admin"` \| `"system"` \| `"viewer"` \| `"automation"` | `"admin"` | RBAC role |
408
- | `telemetry` | boolean | `false` | Opt-in telemetry |
156
+ ### Blind Credential Injection
409
157
 
410
- ### Domain Policy
158
+ `browser_type_secret` resolves secrets server-side from `~/.weavetab/secrets.json`. The resolved value is never included in the MCP response, never appears in DOM snapshots, and is permanently masked as `[REDACTED]` in all audit logs. The LLM context never sees the credential.
411
159
 
412
- Configure per-domain policies in `~/.weavetab/policy.json`:
413
-
414
- ```json
415
- {
416
- "policies": [
417
- { "pattern": "*.banking.com", "mode": "deny" },
418
- { "pattern": "*.internal.corp", "mode": "read-only" },
419
- { "pattern": "staging.myapp.com", "mode": "audit" }
420
- ]
421
- }
160
+ ```bash
161
+ weavetab secrets set GITHUB_TOKEN
162
+ # Stored. Never echoed, never logged, never surfaced to the agent.
422
163
  ```
423
164
 
424
- Available modes: `allow`, `read-only`, `deny`, `audit`.
165
+ ### Electron & Desktop App Automation
425
166
 
426
- ---
427
-
428
- ## Secrets Management
429
-
430
- Weavetab's **Blind Injection** system keeps credentials permanently out of the LLM context.
431
-
432
- ### How It Works
433
-
434
- 1. You store a secret via `Weavetab secrets set MY_KEY` or by editing `secrets.json` directly
435
- 2. The agent calls `browser_type_secret({ id: "w:2", envKey: "MY_KEY" })`
436
- 3. Weavetab resolves the value from `secrets.json` **server-side** — the LLM never sees it
437
- 4. The value is injected directly into the DOM input field
438
- 5. All subsequent `browser_map`, delta, and AX tree outputs show `[REDACTED]` for that node
439
-
440
- ### Secrets File Format
167
+ Any tool accepts an optional `app` parameter that routes the command to a registered Electron process instead of a browser tab:
441
168
 
442
169
  ```json
443
- {
444
- "MY_API_KEY": {
445
- "value": "sk-prod-...",
446
- "domains": ["api.example.com", "app.example.com"],
447
- "description": "Production API key"
448
- },
449
- "ADMIN_PASSWORD": {
450
- "value": "hunter2",
451
- "domains": ["admin.example.com"],
452
- "description": "Admin panel password"
453
- }
454
- }
170
+ { "app": "discord", "ref": "w:24", "text": "Hey, deploying now" }
455
171
  ```
456
172
 
457
- ### Resolution Priority
458
-
459
- | Priority | Location | Purpose |
460
- |----------|----------|---------|
461
- | 1st | `./.weavetab/secrets.json` | Project-scoped (opt-in via `Weavetab secrets init --project`) |
462
- | 2nd | `~/.weavetab/secrets.json` | Global default |
463
-
464
- > [!NOTE]
465
- > The legacy `.env`-based `EnvSecretProvider` is deprecated and no longer supported. All secrets must be stored in `secrets.json`.
466
-
467
- ---
468
-
469
- ## MCP Client Integration
470
-
471
- Weavetab connects out-of-the-box via stdio JSON-RPC 2.0 with all major AI coding assistants and IDEs.
472
-
473
- | Environment | Setup Method | Guided Web Installer |
474
- | :--- | :--- | :--- |
475
- | **Cursor** | `.cursor/mcp.json` | [weavetab.dev/mcp/install/cursor](https://weavetab.dev/mcp/install/cursor) |
476
- | **Antigravity** | `~/.gemini/antigravity/mcp/` | [weavetab.dev/mcp/install/antigravity](https://weavetab.dev/mcp/install/antigravity) |
477
- | **Claude Desktop** | `claude_desktop_config.json` | [weavetab.dev/mcp/install/claude-desktop](https://weavetab.dev/mcp/install/claude-desktop) |
478
- | **Claude Code** | `claude mcp add` | [weavetab.dev/mcp/install/claude-code](https://weavetab.dev/mcp/install/claude-code) |
479
- | **VS Code / Copilot** | 1-Click Protocol / `settings.json` | [weavetab.dev/mcp/install/vscode](https://weavetab.dev/mcp/install/vscode) |
480
- | **Windsurf** | `mcp_config.json` | [weavetab.dev/mcp/install/windsurf](https://weavetab.dev/mcp/install/windsurf) |
481
-
482
- ---
483
-
484
- ### Cursor
485
-
486
- Add to `.cursor/mcp.json` in your project root or in **Cursor Settings > MCP**:
173
+ Register apps in `~/.weavetab/config.json`:
487
174
 
488
175
  ```json
489
176
  {
490
- "mcpServers": {
491
- "weavetab": {
492
- "command": "npx",
493
- "args": ["-y", "@weavetab/mcp"]
494
- }
177
+ "electron": {
178
+ "discord": "C:\\Users\\<user>\\AppData\\Local\\Discord\\Discord.exe",
179
+ "vscode": "C:\\Users\\<user>\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
180
+ "figma": "C:\\Users\\<user>\\AppData\\Local\\Figma\\Figma.exe"
495
181
  }
496
182
  }
497
183
  ```
498
184
 
499
- ---
500
-
501
- ### Antigravity
185
+ Weavetab auto-attaches via CDP to the registered process. No code changes required in the target application.
502
186
 
503
- Register Weavetab in your Antigravity configuration or workspace `.gemini/settings.json`:
187
+ ### Zero-API CAPTCHA Solving
504
188
 
505
- ```json
506
- {
507
- "mcpServers": {
508
- "weavetab": {
509
- "command": "npx",
510
- "args": ["-y", "@weavetab/mcp"]
511
- }
512
- }
513
- }
514
- ```
189
+ `browser_captcha` solves Cloudflare Turnstile, reCAPTCHA v2/v3, GeeTest, and hCaptcha by orchestrating CDP mouse events that replicate human behavioral signatures — velocity curves, micro-pauses, scroll inertia — with no third-party API, no external service, and no API key required.
515
190
 
516
191
  ---
517
192
 
518
- ### Claude Desktop
193
+ ## Tool Suite
519
194
 
520
- Add to your platform's configuration file:
521
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
522
- - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
523
- - **Linux:** `~/.config/Claude/claude_desktop_config.json`
195
+ 44 tools across 9 categories. Full parameter reference: [`docs/tools/tools.md`](docs/tools/tools.md)
524
196
 
525
- ```json
526
- {
527
- "mcpServers": {
528
- "weavetab": {
529
- "command": "npx",
530
- "args": ["-y", "@weavetab/mcp"]
531
- }
532
- }
533
- }
534
- ```
197
+ | Category | Tools |
198
+ |---|---|
199
+ | **Vision & DOM** | `browser_map` `browser_find` `browser_scrape` `browser_inspect` `browser_snapshot` `browser_screenshot` `browser_console` `browser_extract_design` |
200
+ | **Input & Interaction** | `browser_click` `browser_type` `browser_type_secret` `browser_key` `browser_pointer` `browser_select` `browser_fill` `browser_upload` `browser_scroll` |
201
+ | **Navigation & Environment** | `browser_navigate` `browser_tabs` `browser_detect` `browser_viewport` `browser_emulate` |
202
+ | **Mission & Automation** | `browser_burst` `browser_automation` `browser_recording` `browser_pattern_learn` |
203
+ | **Safety & Human Oversight** | `browser_dialog` `browser_thoughts` `browser_clipboard` `browser_wait` |
204
+ | **Autonomous CAPTCHA** | `browser_captcha` |
205
+ | **Network & Storage** | `browser_network_intercept` `browser_storage` `browser_cookies` `browser_checkpoint` `browser_performance` |
206
+ | **GitHub & Documents** | `browser_github` `browser_office` |
207
+ | **Canvas, Eval & Plugins** | `browser_eval` `browser_pdf` `browser_canvas` `browser_highlight` `list_plugins` `load_plugin` |
535
208
 
536
209
  ---
537
210
 
538
- ### Claude Code
211
+ ## Security
539
212
 
540
- Run the terminal command to register Weavetab globally:
213
+ - **Transport**: CDP WebSocket strictly bound to `127.0.0.1`. No listener on external interfaces.
214
+ - **Policy Engine**: Per-domain `allow` / `read-only` / `deny` / `audit` rules in `~/.weavetab/policy.json`
215
+ - **RBAC**: Four roles — `admin`, `operator`, `viewer`, `automation` — enforce tool-level permission gates
216
+ - **Blind Injection**: Credentials resolved server-side, masked in all outputs and audit logs
217
+ - **Loop Breaker**: Strike-based stuck-loop detector halts runaway autonomous sequences
218
+ - **Audit Log**: All tool invocations, policy decisions, and errors written to `~/.weavetab/logs/audit.log`
541
219
 
542
- ```bash
543
- claude mcp add weavetab -- npx -y @weavetab/mcp
544
- ```
545
-
546
- Or for project-scoped activation:
547
-
548
- ```bash
549
- claude mcp add --scope project weavetab -- npx -y @weavetab/mcp
550
- ```
220
+ Security vulnerabilities: `security@fy2ne.me` (do not use public issues).
551
221
 
552
222
  ---
553
223
 
554
- ### Visual Studio Code & Copilot
555
-
556
- Add to `.vscode/settings.json` or User Settings:
224
+ ## CLI Reference
557
225
 
558
- ```json
559
- {
560
- "mcpServers": {
561
- "weavetab": {
562
- "command": "npx",
563
- "args": ["-y", "@weavetab/mcp"]
564
- }
565
- }
566
- }
226
+ ```bash
227
+ weavetab # Start in stdio mode (default)
228
+ weavetab --ws --port 3000 # WebSocket daemon mode
229
+ weavetab config # Interactive configuration wizard
230
+ weavetab secrets set KEY_NAME # Store a secret (never echoed)
231
+ weavetab secrets list # List stored secret keys (not values)
232
+ weavetab plugin add <name> # Install a plugin from npm
233
+ weavetab plugin list # List installed plugins
567
234
  ```
568
235
 
569
- ---
570
-
571
- ### Windsurf
572
-
573
- Add to `~/.codeium/windsurf/mcp_config.json`:
236
+ Configuration file: `~/.weavetab/config.json`
574
237
 
575
238
  ```json
576
239
  {
577
- "mcpServers": {
578
- "weavetab": {
579
- "command": "npx",
580
- "args": ["-y", "@weavetab/mcp"]
581
- }
240
+ "browserType": "chromium",
241
+ "headless": false,
242
+ "extension": true,
243
+ "maxActionsPerMinute": 60,
244
+ "role": "admin",
245
+ "electron": {
246
+ "discord": "...",
247
+ "vscode": "...",
248
+ "antigravity": "..."
582
249
  }
583
250
  }
584
251
  ```
585
252
 
586
253
  ---
587
254
 
588
- ### WebSocket Mode (Custom Agent Pipelines & SDKs)
255
+ ## Extensibility
589
256
 
590
- Launch a standalone WebSocket daemon:
257
+ Weavetab exposes a typed Plugin SDK for authoring custom MCP tools, HUD overlays, and tool lifecycle hooks:
591
258
 
592
259
  ```bash
593
- weavetab --ws --port 3000
260
+ npx @weavetab/sdk init my-plugin
594
261
  ```
595
262
 
596
- ```javascript
597
- // Connect from any custom client or script
598
- const ws = new WebSocket("ws://localhost:3000");
599
- ws.send(JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }));
600
- ```
263
+ See [`docs/PLUGINS.md`](docs/PLUGINS.md) for architecture, manifest spec, and SDK API reference.
601
264
 
602
265
  ---
603
266
 
604
- ## Development Environment
605
-
606
- ### Prerequisites
607
-
608
- - **Node.js 18+** (LTS recommended)
609
- - **npm 8+**
610
- - A **Chromium-based browser** (Chrome, Edge, Brave)
611
- - **Git**
612
-
613
- ### Source Code Setup
614
-
615
- ```bash
616
- # Clone the repository
617
- git clone https://github.com/weavetab/mcp.git
618
- cd mcp
619
-
620
- # Install dependencies
621
- npm install
622
-
623
- # Start in development mode (tsx watcher — auto-reloads on file changes)
624
- npm run dev
625
-
626
- # Build the project
627
- npm run build # Builds extension + HUD + TypeScript
628
- npm run build:ext # Extension only
629
- npm run build:hud # Shadow DOM HUD only
630
-
631
- # Run the MCP server from source
632
- node dist/index.js
633
- ```
634
-
635
- ### Project Structure
636
-
637
- ```
638
- src/
639
- ├── cdp/ # Chrome DevTools Protocol bridge (walker, connector, lock, pruner, ghost)
640
- ├── intelligence/ # Session memory, delta engine, trail, hints, vision fallback, intent
641
- ├── sensors/ # Network telemetry, DOM mutations, human pacing, wait guards, thoughts HUD
642
- ├── security/ # Domain blacklist, rate limiter, RBAC, Blind Injection secrets
643
- ├── state/ # Delta engine, agent state machine, session registry, mutation cache
644
- ├── tools/ # 44+ individual tool implementations
645
- │ └── github/ # GitHub API integration tools
646
- ├── overlay/ # Shadow DOM UI injector, Ghost cursor, thought bubble HUD
647
- ├── audit/ # Structured logging & telemetry
648
- ├── plugin/ # Plugin interface and dynamic loader
649
- ├── config/ # Multi-source config merge & live reload
650
- ├── cli/ # CLI utilities and update notifier
651
- ├── anticaptcha/ # CAPTCHA detection and solving strategies
652
- ├── server.ts # MCP server entry point — all tool registrations
653
- └── index.ts # CLI entry point (wizard, reset, main interactive UI)
654
- ```
655
-
656
- ### Testing
657
-
658
- ```bash
659
- # All tests
660
- npm test
661
-
662
- # Unit tests only (fast, no browser required)
663
- npm run test:unit
664
-
665
- # End-to-end smoke test (requires Chrome)
666
- npm run test:e2e
667
- ```
668
-
669
- ### Docker (Headless Production)
670
-
671
- Run Weavetab in a Docker container with a headless Chromium instance for CI/CD pipelines:
672
-
673
- ```dockerfile
674
- FROM node:20-slim
675
-
676
- # Install Chromium and dependencies
677
- RUN apt-get update && apt-get install -y \
678
- chromium \
679
- --no-install-recommends && rm -rf /var/lib/apt/lists/*
680
-
681
- # Install Weavetab MCP
682
- RUN npm install -g @weavetab/mcp
683
-
684
- # Set Chrome path for headless mode
685
- ENV CHROME_PATH=/usr/bin/chromium
686
-
687
- EXPOSE 3000
688
-
689
- CMD ["Weavetab", "--ws", "--headless"]
690
- ```
691
-
692
- ```bash
693
- docker build -t weavetab-server .
694
- docker run -p 3000:3000 weavetab-server
695
- ```
696
-
697
- ### Environment Variables
698
-
699
- | Variable | Description |
700
- |----------|-------------|
701
- | `CHROME_PATH` | Override Chromium binary path |
702
- | `WEAVETAB_CONFIG` | Path to a custom config file |
703
- | `WEAVETAB_ROLE` | Override RBAC role at runtime |
704
- | `WEAVETAB_DEV` | `1` to enable verbose dev logging & developer mode |
705
-
706
- ### Developer Mode (`devMode`)
707
-
708
- Setting `"devMode": true` in configuration or `WEAVETAB_DEV=1` activates diagnostic features:
709
- * **Payload Extensions**: Adds `execution_ms` (precise latency breakdown) and `toolcalls` traces to MCP tool outputs.
710
- * **Visual Overlays**: Renders real-time HUD execution badges, target hitboxes, and Bézier cursor trajectory curves in the browser.
711
- * **Audit Mission Logs**: Automatically generates structured CDP event logs in `~/.weavetab/logs/` for every completed mission.
267
+ ## License
712
268
 
713
- > 📖 See [docs/DEV_MODE.md](docs/DEV_MODE.md) for complete details.
714
-
715
- ---
716
-
717
- ## Plugin System
718
-
719
- Weavetab supports dynamic tool extension via the **Plugin System**. Any npm package containing a valid `weavetab.json` manifest found in `node_modules` (or official `@weavetab/plugin-*` packages) is automatically discovered and loaded at startup. Community plugins are not restricted to any prefix—name them anything (e.g., `wt-n8n`, `seo-auditor`, `pdf-extract`).
720
-
721
- > 📖 See [Developer Plugin Guide](../docs/dev_plugin.md) for a step-by-step tutorial, and [docs/PLUGINS.md](docs/PLUGINS.md) for the complete architecture and manifest specification.
722
-
723
- ### Quick Scaffold & Build
724
-
725
- ```bash
726
- # 1. Interactive scaffolding wizard
727
- npx weavetab init
728
-
729
- # 2. Build, type-check, and auto-sync weavetab.json
730
- npx weavetab build
731
- ```
732
-
733
- ### Installing a Plugin
734
-
735
- ```bash
736
- # Official plugin
737
- wt plugin add @weavetab/plugin-sample
738
-
739
- # Community plugin (any npm name)
740
- wt plugin add seo-auditor
741
- # or via npm
742
- npm install wt-n8n
743
- ```
744
-
745
- Restart `weavetab` — the plugin's tools are automatically registered as additional MCP tools.
746
-
747
- ### Developing a Plugin
748
-
749
- ```typescript
750
- // src/index.ts
751
- import type { WeavetabPlugin } from "@weavetab/mcp";
752
-
753
- const plugin: WeavetabPlugin = {
754
- name: "my-plugin",
755
- version: "1.0.0",
756
- tools: [
757
- {
758
- name: "my_custom_tool",
759
- description: "WHAT: Does something | WHEN: Use for X | EXAMPLE: my_custom_tool({ param: 'value' })",
760
- schema: { param: { type: "string", description: "Input parameter" } },
761
- handler: async (args, session, config) => {
762
- // Your tool implementation using Chrome DevTools Protocol session
763
- const evalResult = await session.evaluate(() => document.title);
764
- return { success: true, title: evalResult };
765
- }
766
- }
767
- ]
768
- };
769
-
770
- export default plugin;
771
- ```
772
-
773
- Plugin tools follow the standard MCP contract: structured Zod input, deterministic JSON output, audit logging, and `WeaveError` protocol on failure.
774
-
775
- ---
776
-
777
- ## Weavetab Skills Ecosystem
778
-
779
- The **Weavetab Skills** package (`@weavetab/skills`) is an optional companion that provides pre-built workflow patterns and mission templates for AI agents. Skills are automatically discovered by compatible MCP clients and inject context-aware guidance for mission planning.
780
-
781
- > 🔗 **Repository:** [github.com/weavetab/skills](https://github.com/weavetab/skills)
782
-
783
- ### Installation
784
-
785
- ```bash
786
- npm install -g @weavetab/skills
787
- ```
788
-
789
- ### Available Skills
790
-
791
- | Skill | Description |
792
- |-------|-------------|
793
- | **Multi-step Form Automation** | Complex form filling with validation handling and error recovery |
794
- | **E-commerce Checkout** | Shopping cart navigation and payment processing workflows |
795
- | **Data Extraction Pipelines** | Structured data scraping, transformation, and export |
796
- | **Content Management Systems** | WordPress, Drupal, and CMS-specific interaction patterns |
797
- | **API Testing & Validation** | Endpoint testing, response verification, and contract checking |
798
-
799
- Skills are loaded as an MCP resource layer and provide declarative mission templates that agents can reference during task planning.
800
-
801
- ---
802
-
803
- ## Security Model
804
-
805
- Weavetab implements a defense-in-depth security architecture designed for production deployments.
806
-
807
- ### Security Mechanisms
808
-
809
- | Mechanism | Description |
810
- |-----------|-------------|
811
- | **Domain Blacklist** | Hard-blocked high-risk domains (banking portals, IAM providers, cloud consoles) |
812
- | **Domain Policy Engine** | Per-domain modes: `allow`, `read-only`, `deny`, `audit` — via `~/.weavetab/policy.json` |
813
- | **Localhost Binding** | CDP WebSocket strictly bound to `127.0.0.1` — no external exposure |
814
- | **Zero Cloud Dependency** | Executes entirely on local machine (no telemetry unless opted in) |
815
- | **Rate Limiting** | Configurable actions-per-minute with mutex-based enforcement |
816
- | **Role-Based Access Control** | 4 roles: `admin`, `operator`, `viewer`, `automation` |
817
- | **Root Guard** | Prevents execution as root/superuser at startup (Unix) |
818
- | **Blind Injection** | Credentials from `secrets.json` — never exposed to LLM or audit logs |
819
- | **Input Filter** | Strips prompt injection patterns, invisible Unicode, oversized labels |
820
- | **Shadow DOM Isolation** | All injected UIs run in isolated Shadow DOM context |
821
- | **Storage Blocker** | Optional nullification of `localStorage`, `sessionStorage`, `document.cookie` |
822
- | **Atomic Config Writes** | Config files written to temp then atomically renamed |
823
- | **Path Traversal Protection** | `downloadDir` and `profileDir` validated to reject `..` traversal |
824
- | **Two-Factor Lock Validation** | Browser lock validated by PID liveness + TCP port connectivity |
825
-
826
- ### RBAC Role Matrix
827
-
828
- | Tool Category | admin | operator | viewer | automation |
829
- |---------------|:-----:|:--------:|:------:|:----------:|
830
- | All mutation tools | ✅ | ✅ | ❌ | ❌ |
831
- | Read-only tools (map, find, scrape, screenshot, inspect, github_*, etc.) | ✅ | ✅ | ✅ | ❌ |
832
- | burst, plan, wait, map | ✅ | ✅ | ❌ | ✅ |
833
- | System tools (logs, detect, performance, reset_loop_counter) | ✅ | ❌ | ❌ | ❌ |
834
-
835
- ---
836
-
837
- ## Feature Comparison
838
-
839
- | Metric | **Weavetab** | Playwright MCP | Puppeteer | Selenium |
840
- |--------|:------------:|:--------------:|:---------:|:--------:|
841
- | **Architecture** | Direct CDP WebSocket (Layer 0) | CDP + Node.js bridge | CDP (heavy wrapper) | WebDriver protocol |
842
- | **Mean Latency** | **3–8ms** | 15–40ms | 10–25ms | 50–150ms |
843
- | **Token Efficiency** | **Semantic Deltas (5–10×) + Pruning** | Full DOM dumps | Full DOM dumps | Full DOM dumps |
844
- | **Input Simulation** | Ghost Cursor + Human Typing | Instant coordinates | Instant coordinates | Instant coordinates |
845
- | **Cloud Dependency** | **Zero** (localhost only) | Optional | Optional | Grid required |
846
- | **Security Model** | Blacklist + RBAC + Rate limit + Blind Injection | None | None | None |
847
- | **Session Memory** | Persistent per-domain profiles | None | None | None |
848
- | **MCP Native** | ✅ | ✅ | ❌ | ❌ |
849
- | **Plugin System** | Dynamic `weavetab.json` & `@weavetab/plugin-*` loading | Yes (custom) | Yes (custom) | Yes (custom) |
850
- | **Tool Count** | **44+ built-in + plugins** | ~25–35 | N/A | N/A |
851
- | **Loop Detection** | Strike-based + auto-recovery | None | None | None |
852
- | **Browser Engine** | Chromium (+ detection for Firefox/WebKit) | Chromium + Firefox + WebKit | Chromium only | All major |
853
-
854
- ---
855
-
856
- ## Contributing
857
-
858
- Weavetab is currently in **Beta** and actively welcomes community contributions.
859
-
860
- - 🐛 **Bug Reports:** [GitHub Issues](https://github.com/weavetab/mcp/issues)
861
- - 💡 **Feature Requests:** [GitHub Issues](https://github.com/weavetab/mcp/issues)
862
- - 🔧 **Pull Requests:** See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines
863
- - 🔒 **Security:** See [SECURITY.md](SECURITY.md) — do **not** open public issues for vulnerabilities
864
-
865
- ### Quick Contribution Guide
866
-
867
- ```bash
868
- git clone https://github.com/weavetab/mcp.git
869
- cd mcp
870
- npm install
871
- npm run dev # Start dev watcher
872
- npm test # Run all tests before submitting a PR
873
- ```
874
-
875
- Commit format: `feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `test:`
876
-
877
- ---
878
-
879
- ## License & Enterprise Clarification
880
-
881
- **AGPL-3.0-only** — See [LICENSE](LICENSE) for full details.
882
-
883
- ### MCP Transport Clarification
884
- Running Weavetab MCP as an independent process and communicating with it over standard Model Context Protocol transports (`stdio` or WebSocket JSON-RPC) does **not** cause AGPL copyleft obligations to extend to your client application, IDE, or host AI models.
885
-
886
- ### Commercial Licensing
887
- For commercial, proprietary, or embedded distribution without AGPL copyleft requirements, dual-licensing options are available. Inquire at `license@weavetab.dev`.
888
-
889
- ---
890
-
891
- ## Support
892
-
893
- | Channel | Purpose |
894
- |---------|---------|
895
- | [GitHub Issues](https://github.com/weavetab/mcp/issues) | Bug reports, feature requests |
896
- | [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Common issues and fixes |
897
- | [docs/](docs/) | Full documentation |
898
- | security@weavetab.dev | Security vulnerabilities (private) |
899
-
900
- ---
901
-
902
- ## Acknowledgments
903
-
904
- Built by **fy2ne** with gratitude to the [Model Context Protocol](https://modelcontextprotocol.io) community and the Chrome DevTools Protocol team for making browser automation at Layer 0 possible.
905
-
906
- ---
269
+ AGPL-3.0-only. Client connections over stdio or WebSocket do not extend copyleft obligations to your client application or models.
907
270
 
908
- > [!NOTE]
909
- > **Beta Release Notice:** This is v2.5.0 Beta. APIs and features may evolve as we approach stable release. Report issues on [GitHub](https://github.com/weavetab/mcp/issues).
271
+ [Sponsor development](https://github.com/sponsors/fy2ne) &nbsp;&middot;&nbsp; [Discussions](https://github.com/weavetab/mcp/discussions) &nbsp;&middot;&nbsp; [SUPPORT.md](SUPPORT.md)