@weavetab/mcp 2.5.0-beta.0

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 (281) hide show
  1. package/AGENTS.md +48 -0
  2. package/ARCHITECTURE.md +590 -0
  3. package/LICENSE +631 -0
  4. package/README.md +909 -0
  5. package/SECURITY.md +196 -0
  6. package/TROUBLESHOOTING.md +365 -0
  7. package/dist/anticaptcha/detector.d.ts +49 -0
  8. package/dist/anticaptcha/detector.js +465 -0
  9. package/dist/anticaptcha/integration.d.ts +36 -0
  10. package/dist/anticaptcha/integration.js +123 -0
  11. package/dist/anticaptcha/solver.d.ts +27 -0
  12. package/dist/anticaptcha/solver.js +552 -0
  13. package/dist/audit/logger.d.ts +13 -0
  14. package/dist/audit/logger.js +177 -0
  15. package/dist/audit/telemetry.d.ts +36 -0
  16. package/dist/audit/telemetry.js +162 -0
  17. package/dist/cdp/bridge.d.ts +16 -0
  18. package/dist/cdp/bridge.js +826 -0
  19. package/dist/cdp/confirm.d.ts +26 -0
  20. package/dist/cdp/confirm.js +79 -0
  21. package/dist/cdp/connector.d.ts +37 -0
  22. package/dist/cdp/connector.js +661 -0
  23. package/dist/cdp/extension.d.ts +36 -0
  24. package/dist/cdp/extension.js +118 -0
  25. package/dist/cdp/finder.d.ts +1 -0
  26. package/dist/cdp/finder.js +2 -0
  27. package/dist/cdp/helpers.d.ts +11 -0
  28. package/dist/cdp/helpers.js +195 -0
  29. package/dist/cdp/label_cache.d.ts +12 -0
  30. package/dist/cdp/label_cache.js +51 -0
  31. package/dist/cdp/lock.d.ts +33 -0
  32. package/dist/cdp/lock.js +206 -0
  33. package/dist/cdp/omni_broker.d.ts +17 -0
  34. package/dist/cdp/omni_broker.js +119 -0
  35. package/dist/cdp/profiles.d.ts +1 -0
  36. package/dist/cdp/profiles.js +87 -0
  37. package/dist/cdp/pruner.d.ts +41 -0
  38. package/dist/cdp/pruner.js +263 -0
  39. package/dist/cdp/ref_cache.d.ts +101 -0
  40. package/dist/cdp/ref_cache.js +234 -0
  41. package/dist/cdp/retry.d.ts +5 -0
  42. package/dist/cdp/retry.js +39 -0
  43. package/dist/cdp/retry_enhanced.d.ts +44 -0
  44. package/dist/cdp/retry_enhanced.js +102 -0
  45. package/dist/cdp/security.d.ts +50 -0
  46. package/dist/cdp/security.js +237 -0
  47. package/dist/cdp/verify.d.ts +39 -0
  48. package/dist/cdp/verify.js +143 -0
  49. package/dist/cdp/walker.d.ts +91 -0
  50. package/dist/cdp/walker.js +896 -0
  51. package/dist/cdp/walker.test.d.ts +2 -0
  52. package/dist/cdp/walker.test.js +172 -0
  53. package/dist/cdp/websocket_transport.d.ts +15 -0
  54. package/dist/cdp/websocket_transport.js +118 -0
  55. package/dist/cli/plugin.d.ts +9 -0
  56. package/dist/cli/plugin.js +1134 -0
  57. package/dist/cli/updater.d.ts +1 -0
  58. package/dist/cli/updater.js +72 -0
  59. package/dist/config/loader.d.ts +120 -0
  60. package/dist/config/loader.js +704 -0
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +1248 -0
  63. package/dist/intelligence/hints.d.ts +11 -0
  64. package/dist/intelligence/hints.js +39 -0
  65. package/dist/intelligence/intent.d.ts +33 -0
  66. package/dist/intelligence/intent.js +171 -0
  67. package/dist/intelligence/sessionMemory.d.ts +66 -0
  68. package/dist/intelligence/sessionMemory.js +284 -0
  69. package/dist/intelligence/sessionMemory.test.d.ts +2 -0
  70. package/dist/intelligence/sessionMemory.test.js +62 -0
  71. package/dist/intelligence/trail.d.ts +64 -0
  72. package/dist/intelligence/trail.js +233 -0
  73. package/dist/intelligence/trail.test.d.ts +2 -0
  74. package/dist/intelligence/trail.test.js +110 -0
  75. package/dist/intelligence/vision.d.ts +24 -0
  76. package/dist/intelligence/vision.js +151 -0
  77. package/dist/lifecycle/mission_manager.d.ts +16 -0
  78. package/dist/lifecycle/mission_manager.js +44 -0
  79. package/dist/overlay/bubble.d.ts +16 -0
  80. package/dist/overlay/bubble.js +37 -0
  81. package/dist/overlay/ghost.d.ts +35 -0
  82. package/dist/overlay/ghost.js +508 -0
  83. package/dist/overlay/injector.d.ts +22 -0
  84. package/dist/overlay/injector.js +198 -0
  85. package/dist/plugin/interface.d.ts +134 -0
  86. package/dist/plugin/interface.js +1 -0
  87. package/dist/plugin/loader.d.ts +18 -0
  88. package/dist/plugin/loader.js +155 -0
  89. package/dist/plugin/registry.d.ts +50 -0
  90. package/dist/plugin/registry.js +234 -0
  91. package/dist/security/blacklist.d.ts +24 -0
  92. package/dist/security/blacklist.js +80 -0
  93. package/dist/security/filter.d.ts +2 -0
  94. package/dist/security/filter.js +20 -0
  95. package/dist/security/guard.d.ts +8 -0
  96. package/dist/security/guard.js +35 -0
  97. package/dist/security/ratelimit.d.ts +11 -0
  98. package/dist/security/ratelimit.js +57 -0
  99. package/dist/security/secrets.d.ts +75 -0
  100. package/dist/security/secrets.js +365 -0
  101. package/dist/sensors/actionability.d.ts +81 -0
  102. package/dist/sensors/actionability.js +303 -0
  103. package/dist/sensors/guard.d.ts +25 -0
  104. package/dist/sensors/guard.js +168 -0
  105. package/dist/sensors/mutations.d.ts +23 -0
  106. package/dist/sensors/mutations.js +93 -0
  107. package/dist/sensors/network.d.ts +67 -0
  108. package/dist/sensors/network.js +193 -0
  109. package/dist/sensors/operation_monitor.d.ts +80 -0
  110. package/dist/sensors/operation_monitor.js +203 -0
  111. package/dist/sensors/pacing.d.ts +44 -0
  112. package/dist/sensors/pacing.js +111 -0
  113. package/dist/sensors/thoughts.d.ts +2 -0
  114. package/dist/sensors/thoughts.js +59 -0
  115. package/dist/sensors/wait.d.ts +12 -0
  116. package/dist/sensors/wait.js +44 -0
  117. package/dist/server.d.ts +7 -0
  118. package/dist/server.js +1687 -0
  119. package/dist/state/agent.d.ts +36 -0
  120. package/dist/state/agent.js +101 -0
  121. package/dist/state/cache.d.ts +16 -0
  122. package/dist/state/cache.js +92 -0
  123. package/dist/state/cache.test.d.ts +2 -0
  124. package/dist/state/cache.test.js +76 -0
  125. package/dist/state/delta.d.ts +71 -0
  126. package/dist/state/delta.js +234 -0
  127. package/dist/state/delta.test.d.ts +2 -0
  128. package/dist/state/delta.test.js +279 -0
  129. package/dist/state/groups.d.ts +15 -0
  130. package/dist/state/groups.js +80 -0
  131. package/dist/state/session.d.ts +30 -0
  132. package/dist/state/session.js +155 -0
  133. package/dist/tools/accessibility.d.ts +14 -0
  134. package/dist/tools/accessibility.js +32 -0
  135. package/dist/tools/ask.d.ts +14 -0
  136. package/dist/tools/ask.js +49 -0
  137. package/dist/tools/automation.d.ts +36 -0
  138. package/dist/tools/automation.js +218 -0
  139. package/dist/tools/browser_detect.d.ts +13 -0
  140. package/dist/tools/browser_detect.js +73 -0
  141. package/dist/tools/burst.d.ts +35 -0
  142. package/dist/tools/burst.js +344 -0
  143. package/dist/tools/canvas.d.ts +25 -0
  144. package/dist/tools/canvas.js +132 -0
  145. package/dist/tools/captcha.d.ts +38 -0
  146. package/dist/tools/captcha.js +209 -0
  147. package/dist/tools/click.d.ts +36 -0
  148. package/dist/tools/click.js +561 -0
  149. package/dist/tools/click_and_wait.d.ts +33 -0
  150. package/dist/tools/click_and_wait.js +149 -0
  151. package/dist/tools/clipboard.d.ts +29 -0
  152. package/dist/tools/clipboard.js +279 -0
  153. package/dist/tools/console.d.ts +21 -0
  154. package/dist/tools/console.js +107 -0
  155. package/dist/tools/cookies.d.ts +67 -0
  156. package/dist/tools/cookies.js +121 -0
  157. package/dist/tools/design_extract.d.ts +109 -0
  158. package/dist/tools/design_extract.js +641 -0
  159. package/dist/tools/dialog.d.ts +24 -0
  160. package/dist/tools/dialog.js +109 -0
  161. package/dist/tools/drag.d.ts +15 -0
  162. package/dist/tools/drag.js +29 -0
  163. package/dist/tools/emulation.d.ts +33 -0
  164. package/dist/tools/emulation.js +69 -0
  165. package/dist/tools/eval.d.ts +20 -0
  166. package/dist/tools/eval.js +92 -0
  167. package/dist/tools/fill.d.ts +41 -0
  168. package/dist/tools/fill.js +667 -0
  169. package/dist/tools/find.d.ts +30 -0
  170. package/dist/tools/find.js +60 -0
  171. package/dist/tools/geo.d.ts +19 -0
  172. package/dist/tools/geo.js +29 -0
  173. package/dist/tools/github/analyze.d.ts +4 -0
  174. package/dist/tools/github/analyze.js +113 -0
  175. package/dist/tools/github/cache.d.ts +21 -0
  176. package/dist/tools/github/cache.js +28 -0
  177. package/dist/tools/github/index.d.ts +4 -0
  178. package/dist/tools/github/index.js +4 -0
  179. package/dist/tools/github/issues.d.ts +9 -0
  180. package/dist/tools/github/issues.js +88 -0
  181. package/dist/tools/github/pr.d.ts +5 -0
  182. package/dist/tools/github/pr.js +88 -0
  183. package/dist/tools/github/rateLimiter.d.ts +4 -0
  184. package/dist/tools/github/rateLimiter.js +46 -0
  185. package/dist/tools/github/read.d.ts +34 -0
  186. package/dist/tools/github/read.js +74 -0
  187. package/dist/tools/github/repoContext.d.ts +20 -0
  188. package/dist/tools/github/repoContext.js +129 -0
  189. package/dist/tools/highlight.d.ts +20 -0
  190. package/dist/tools/highlight.js +140 -0
  191. package/dist/tools/hover.d.ts +19 -0
  192. package/dist/tools/hover.js +57 -0
  193. package/dist/tools/inspect.d.ts +17 -0
  194. package/dist/tools/inspect.js +125 -0
  195. package/dist/tools/integration.test.d.ts +2 -0
  196. package/dist/tools/integration.test.js +96 -0
  197. package/dist/tools/key.d.ts +25 -0
  198. package/dist/tools/key.js +173 -0
  199. package/dist/tools/macro_compiler.d.ts +7 -0
  200. package/dist/tools/macro_compiler.js +82 -0
  201. package/dist/tools/mouse.d.ts +21 -0
  202. package/dist/tools/mouse.js +62 -0
  203. package/dist/tools/navigate.d.ts +16 -0
  204. package/dist/tools/navigate.js +188 -0
  205. package/dist/tools/network_intercept.d.ts +17 -0
  206. package/dist/tools/network_intercept.js +151 -0
  207. package/dist/tools/office/index.d.ts +9 -0
  208. package/dist/tools/office/index.js +7 -0
  209. package/dist/tools/office/list.d.ts +15 -0
  210. package/dist/tools/office/list.js +41 -0
  211. package/dist/tools/office/parse.d.ts +20 -0
  212. package/dist/tools/office/parse.js +172 -0
  213. package/dist/tools/pdf.d.ts +22 -0
  214. package/dist/tools/pdf.js +42 -0
  215. package/dist/tools/performance.d.ts +12 -0
  216. package/dist/tools/performance.js +47 -0
  217. package/dist/tools/performance_test.d.ts +70 -0
  218. package/dist/tools/performance_test.js +128 -0
  219. package/dist/tools/plan.d.ts +39 -0
  220. package/dist/tools/plan.js +161 -0
  221. package/dist/tools/pointer.d.ts +35 -0
  222. package/dist/tools/pointer.js +522 -0
  223. package/dist/tools/read.d.ts +30 -0
  224. package/dist/tools/read.js +488 -0
  225. package/dist/tools/recording.d.ts +45 -0
  226. package/dist/tools/recording.js +124 -0
  227. package/dist/tools/response.d.ts +129 -0
  228. package/dist/tools/response.js +5 -0
  229. package/dist/tools/scrape.d.ts +24 -0
  230. package/dist/tools/scrape.js +140 -0
  231. package/dist/tools/screenshot.d.ts +40 -0
  232. package/dist/tools/screenshot.js +79 -0
  233. package/dist/tools/scroll.d.ts +23 -0
  234. package/dist/tools/scroll.js +196 -0
  235. package/dist/tools/select.d.ts +13 -0
  236. package/dist/tools/select.js +217 -0
  237. package/dist/tools/snapshot.d.ts +27 -0
  238. package/dist/tools/snapshot.js +99 -0
  239. package/dist/tools/storage.d.ts +18 -0
  240. package/dist/tools/storage.js +29 -0
  241. package/dist/tools/tabs.d.ts +77 -0
  242. package/dist/tools/tabs.js +342 -0
  243. package/dist/tools/thought.d.ts +16 -0
  244. package/dist/tools/thought.js +79 -0
  245. package/dist/tools/type.d.ts +65 -0
  246. package/dist/tools/type.js +1061 -0
  247. package/dist/tools/type_secret.d.ts +23 -0
  248. package/dist/tools/type_secret.js +229 -0
  249. package/dist/tools/upload.d.ts +19 -0
  250. package/dist/tools/upload.js +103 -0
  251. package/dist/tools/video_compiler.d.ts +24 -0
  252. package/dist/tools/video_compiler.js +199 -0
  253. package/dist/tools/viewport.d.ts +44 -0
  254. package/dist/tools/viewport.js +230 -0
  255. package/dist/tools/wait.d.ts +19 -0
  256. package/dist/tools/wait.js +202 -0
  257. package/dist/tools/wait_for.d.ts +23 -0
  258. package/dist/tools/wait_for.js +30 -0
  259. package/dist/tools/windows.d.ts +22 -0
  260. package/dist/tools/windows.js +57 -0
  261. package/dist/ui/index.d.ts +1 -0
  262. package/dist/ui/index.js +12 -0
  263. package/docs/DEV_MODE.md +68 -0
  264. package/docs/DOCUMENTATION.md +532 -0
  265. package/docs/PLUGINS.md +538 -0
  266. package/docs/TOOLS.md +104 -0
  267. package/docs/dev_plugin.md +310 -0
  268. package/ext-dist/background.js +467 -0
  269. package/ext-dist/content.js +3089 -0
  270. package/ext-dist/dashboard.html +583 -0
  271. package/ext-dist/hud/hud.js +73 -0
  272. package/ext-dist/hud/index.html +20 -0
  273. package/ext-dist/manifest.json +77 -0
  274. package/ext-dist/sidepanel/sidepanel.js +25 -0
  275. package/ext-dist/sidepanel.html +547 -0
  276. package/ext-dist/styles.css +218 -0
  277. package/icon.png +0 -0
  278. package/mcp.json +796 -0
  279. package/package.json +113 -0
  280. package/server.json +23 -0
  281. package/smithery.yaml +11 -0
package/README.md ADDED
@@ -0,0 +1,909 @@
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
+
27
+ ---
28
+
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.
30
+
31
+ Built by **fy2ne**, Weavetab is engineered for autonomous AI agents operating in production environments where latency, security, and token efficiency are non-negotiable.
32
+
33
+ ---
34
+
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
+ ---
53
+
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
64
+
65
+ ```bash
66
+ # Install globally
67
+ npm install -g @weavetab/mcp
68
+
69
+ # Launch the MCP server
70
+ weavetab
71
+ ```
72
+
73
+ ### Verify Installation
74
+
75
+ ```bash
76
+ weavetab --version
77
+ # → @weavetab/mcp 2.5.0
78
+
79
+ weavetab help
80
+ # → Full CLI usage
81
+ ```
82
+
83
+ ### Connect to an MCP Client
84
+
85
+ Add to your MCP client configuration (e.g., `claude_desktop_config.json`):
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "weavetab": {
91
+ "command": "npx",
92
+ "args": ["-y", "@weavetab/mcp"]
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Architecture
101
+
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
+ ```
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 |
156
+
157
+ ---
158
+
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.
163
+
164
+ ```
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
+
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.
180
+
181
+ ```json
182
+ {
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..."
189
+ }
190
+ ```
191
+
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-*`) |
333
+
334
+ ---
335
+
336
+ ## CLI Reference
337
+
338
+ The `weavetab` CLI provides server management, secrets handling, and diagnostics.
339
+
340
+ ### Server Commands
341
+
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
349
+
350
+ # View current state
351
+ Weavetab view
352
+
353
+ # Reset session cache
354
+ Weavetab reset
355
+ ```
356
+
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
370
+
371
+ # Remove a secret
372
+ Weavetab secrets rm MY_API_KEY
373
+ ```
374
+
375
+ ### Reset & Diagnostics
376
+
377
+ ```bash
378
+ # Clear all session state (loop counter, memory snapshots)
379
+ Weavetab reset
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Configuration
385
+
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`.
387
+
388
+ ```json
389
+ {
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"
398
+ }
399
+ ```
400
+
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 |
409
+
410
+ ### Domain Policy
411
+
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
+ }
422
+ ```
423
+
424
+ Available modes: `allow`, `read-only`, `deny`, `audit`.
425
+
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
441
+
442
+ ```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
+ }
455
+ ```
456
+
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**:
487
+
488
+ ```json
489
+ {
490
+ "mcpServers": {
491
+ "weavetab": {
492
+ "command": "npx",
493
+ "args": ["-y", "@weavetab/mcp"]
494
+ }
495
+ }
496
+ }
497
+ ```
498
+
499
+ ---
500
+
501
+ ### Antigravity
502
+
503
+ Register Weavetab in your Antigravity configuration or workspace `.gemini/settings.json`:
504
+
505
+ ```json
506
+ {
507
+ "mcpServers": {
508
+ "weavetab": {
509
+ "command": "npx",
510
+ "args": ["-y", "@weavetab/mcp"]
511
+ }
512
+ }
513
+ }
514
+ ```
515
+
516
+ ---
517
+
518
+ ### Claude Desktop
519
+
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`
524
+
525
+ ```json
526
+ {
527
+ "mcpServers": {
528
+ "weavetab": {
529
+ "command": "npx",
530
+ "args": ["-y", "@weavetab/mcp"]
531
+ }
532
+ }
533
+ }
534
+ ```
535
+
536
+ ---
537
+
538
+ ### Claude Code
539
+
540
+ Run the terminal command to register Weavetab globally:
541
+
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
+ ```
551
+
552
+ ---
553
+
554
+ ### Visual Studio Code & Copilot
555
+
556
+ Add to `.vscode/settings.json` or User Settings:
557
+
558
+ ```json
559
+ {
560
+ "mcpServers": {
561
+ "weavetab": {
562
+ "command": "npx",
563
+ "args": ["-y", "@weavetab/mcp"]
564
+ }
565
+ }
566
+ }
567
+ ```
568
+
569
+ ---
570
+
571
+ ### Windsurf
572
+
573
+ Add to `~/.codeium/windsurf/mcp_config.json`:
574
+
575
+ ```json
576
+ {
577
+ "mcpServers": {
578
+ "weavetab": {
579
+ "command": "npx",
580
+ "args": ["-y", "@weavetab/mcp"]
581
+ }
582
+ }
583
+ }
584
+ ```
585
+
586
+ ---
587
+
588
+ ### WebSocket Mode (Custom Agent Pipelines & SDKs)
589
+
590
+ Launch a standalone WebSocket daemon:
591
+
592
+ ```bash
593
+ weavetab --ws --port 3000
594
+ ```
595
+
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
+ ```
601
+
602
+ ---
603
+
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.
712
+
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
+ ---
907
+
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).