@weavetab/mcp 2.5.0-beta.2 → 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 (113) hide show
  1. package/AGENTS.md +1 -1
  2. package/ARCHITECTURE.md +6 -6
  3. package/LICENSE +1 -1
  4. package/README.md +158 -961
  5. package/SECURITY.md +33 -22
  6. package/TROUBLESHOOTING.md +2 -2
  7. package/dist/cdp/bridge.js +2 -1
  8. package/dist/cdp/connector.d.ts +2 -0
  9. package/dist/cdp/connector.js +8 -4
  10. package/dist/cdp/helpers.d.ts +4 -0
  11. package/dist/cdp/helpers.js +181 -0
  12. package/dist/cdp/omni_broker.d.ts +1 -1
  13. package/dist/cdp/omni_broker.js +1 -1
  14. package/dist/cdp/walker.d.ts +25 -1
  15. package/dist/cdp/walker.js +304 -7
  16. package/dist/cli/plugin.js +24 -17
  17. package/dist/cli/updater.d.ts +1 -1
  18. package/dist/cli/updater.js +27 -7
  19. package/dist/config/loader.d.ts +8 -0
  20. package/dist/config/loader.js +41 -2
  21. package/dist/desktop/discovery.d.ts +44 -0
  22. package/dist/desktop/discovery.js +364 -0
  23. package/dist/index.js +95 -15
  24. package/dist/intelligence/marks.d.ts +36 -0
  25. package/dist/intelligence/marks.js +30 -0
  26. package/dist/intelligence/patternCompiler.d.ts +118 -0
  27. package/dist/intelligence/patternCompiler.js +259 -0
  28. package/dist/intelligence/sessionMemory.d.ts +2 -0
  29. package/dist/intelligence/sessionMemory.js +18 -8
  30. package/dist/overlay/injector.js +2 -2
  31. package/dist/plugin/interface.d.ts +76 -2
  32. package/dist/plugin/loader.d.ts +15 -1
  33. package/dist/plugin/loader.js +217 -70
  34. package/dist/plugin/pipeline.d.ts +75 -0
  35. package/dist/plugin/pipeline.js +183 -0
  36. package/dist/plugin/registry.js +3 -2
  37. package/dist/security/secrets.d.ts +1 -0
  38. package/dist/security/secrets.js +13 -0
  39. package/dist/sensors/actionability.js +1 -2
  40. package/dist/sensors/guard.js +4 -10
  41. package/dist/sensors/mutations.js +12 -0
  42. package/dist/sensors/operation_monitor.js +1 -0
  43. package/dist/server.d.ts +1 -1
  44. package/dist/server.js +428 -156
  45. package/dist/state/agent.d.ts +1 -0
  46. package/dist/state/agent.js +3 -0
  47. package/dist/state/delta.d.ts +12 -4
  48. package/dist/state/delta.js +67 -14
  49. package/dist/state/session.d.ts +6 -0
  50. package/dist/state/session.js +27 -0
  51. package/dist/tools/browser_detect.d.ts +16 -3
  52. package/dist/tools/browser_detect.js +50 -5
  53. package/dist/tools/burst.d.ts +17 -8
  54. package/dist/tools/burst.js +236 -77
  55. package/dist/tools/checkpoint.d.ts +38 -0
  56. package/dist/tools/checkpoint.js +271 -0
  57. package/dist/tools/click.d.ts +1 -0
  58. package/dist/tools/click.js +74 -70
  59. package/dist/tools/design_extract.js +1 -1
  60. package/dist/tools/eval.js +1 -1
  61. package/dist/tools/fill.d.ts +20 -1
  62. package/dist/tools/fill.js +199 -40
  63. package/dist/tools/find.d.ts +16 -0
  64. package/dist/tools/find.js +67 -44
  65. package/dist/tools/github/index.d.ts +19 -4
  66. package/dist/tools/github/index.js +40 -4
  67. package/dist/tools/highlight.d.ts +6 -2
  68. package/dist/tools/highlight.js +158 -72
  69. package/dist/tools/inspect.js +1 -1
  70. package/dist/tools/key.js +65 -56
  71. package/dist/tools/navigate.js +29 -34
  72. package/dist/tools/pdf.js +21 -13
  73. package/dist/tools/pointer.d.ts +18 -3
  74. package/dist/tools/pointer.js +89 -1
  75. package/dist/tools/read.d.ts +28 -8
  76. package/dist/tools/read.js +230 -56
  77. package/dist/tools/scrape.js +67 -13
  78. package/dist/tools/screenshot.js +21 -16
  79. package/dist/tools/scroll.js +6 -11
  80. package/dist/tools/select.js +8 -2
  81. package/dist/tools/snapshot.js +3 -34
  82. package/dist/tools/tabs.js +14 -6
  83. package/dist/tools/thought.d.ts +2 -0
  84. package/dist/tools/thought.js +13 -14
  85. package/dist/tools/type.d.ts +2 -0
  86. package/dist/tools/type.js +107 -58
  87. package/dist/tools/type_secret.js +42 -76
  88. package/dist/tools/upload.js +1 -1
  89. package/dist/tools/video_compiler.d.ts +1 -1
  90. package/dist/tools/video_compiler.js +11 -12
  91. package/dist/version.d.ts +5 -0
  92. package/dist/version.js +5 -0
  93. package/docs/DOCUMENTATION.md +21 -32
  94. package/docs/PLUGINS.md +121 -0
  95. package/docs/TOOLS.md +56 -0
  96. package/docs/architecture/blind-injection.md +83 -20
  97. package/docs/architecture/overview.md +49 -49
  98. package/docs/configuration/folders.md +55 -54
  99. package/docs/desktop-automation/electron-apps.md +217 -162
  100. package/docs/get-started/introduction.md +60 -60
  101. package/docs/intelligence/site-profiles.md +151 -0
  102. package/docs/tools/tools.md +631 -293
  103. package/docs/troubleshooting/trouble-loop.md +31 -31
  104. package/ext-dist/background.js +10 -62
  105. package/ext-dist/content.js +333 -920
  106. package/ext-dist/hud/hud.js +9 -9
  107. package/ext-dist/manifest.json +2 -6
  108. package/ext-dist/styles.css +6 -1
  109. package/mcp.json +101 -67
  110. package/package.json +5 -6
  111. package/server.json +3 -3
  112. package/ext-dist/sidepanel/sidepanel.js +0 -25
  113. package/ext-dist/sidepanel.html +0 -547
@@ -10,7 +10,7 @@ Weavetab is a production-grade, in-process MCP (Model Context Protocol) server p
10
10
 
11
11
  ### Core Capabilities
12
12
 
13
- - **45 Built-in MCP Tools** across 15 functional categories (Vision, Navigation, Input, Tabs, Mission Execution, Dialog, Wait, Storage, Device, Network, Canvas, Output, Evaluation, GitHub, Office Documents)
13
+ - **44 Built-in MCP Tools** across functional categories (Vision, Navigation, Input, Tabs, Mission Execution, Dialog, Wait, Storage, Device, Network, Canvas, Output, Evaluation, GitHub, Office Documents)
14
14
  - **Direct CDP WebSocket** — 3-8ms mean latency, zero process overhead
15
15
  - **Semantic Delta Engine** — 5-10x token reduction via per-tab snapshot diffing
16
16
  - **Ghost Cursor** — Bézier curve click engine with human acceleration and jitter
@@ -20,7 +20,7 @@ Weavetab is a production-grade, in-process MCP (Model Context Protocol) server p
20
20
  - **Security Stack** — domain blacklist, RBAC (4 roles), rate limiter, loop detection, input filter, root guard
21
21
  - **Burst Mode** — chain N actions in 1 MCP call via `browser_burst`
22
22
  - **Plugin System** — Extensible plugin ecosystem supporting tool additions, overrides (with originalHandler wrapping), and tool removals across 3 trust tiers (Official, Verified, Unverified)
23
- - **GitHub Integration** — 4 built-in tools for repo analysis, file reading, issues, and PRs
23
+ - **GitHub Integration** — Unified `browser_github` tool for repo analysis, file reading, issues, and PRs
24
24
 
25
25
  ### Weavetab Skills
26
26
 
@@ -61,7 +61,7 @@ MCP Client → stdio/WebSocket → WithSecurity Pipeline → CDP WebSocket → C
61
61
 
62
62
  ---
63
63
 
64
- ## Tool Reference (44+ Tools)
64
+ ## Tool Reference (44 Tools)
65
65
 
66
66
  All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting + domain policy + RBAC), structured audit logging.
67
67
 
@@ -69,8 +69,8 @@ All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting
69
69
 
70
70
  | Tool | Description |
71
71
  |------|-------------|
72
- | `browser_map` | DOM enumeration with stable `w:NN` ref IDs. Supports `delta` (diff mode), `prune` (one-shot compression), `ax_tree` (Shadow DOM fallback), `scope` filtering, `query` filtering |
73
- | `browser_find` | Native CDP text search — ~10x cheaper than map, single CDP call |
72
+ | `browser_map` | DOM enumeration (v3.0) with volatile `w:NN` ref IDs, Set-of-Marks visual grounding (`visual: true` / `"auto"`), entity & card container binding (`┌ Heading`), active modal hoisting (`╔═ ACTIVE DIALOG ═╗`), nav cluster collapsing, delta diffing, and scope filtering (`modal`, `form`, `main`). |
73
+ | `browser_find` | Native CDP text search with single and multi-match (`all: true`, `limit: N`) returning bounding rects and selectors — ~10x cheaper than map |
74
74
  | `browser_scrape` | CSS/XPath structured data extraction in 1 CDP call |
75
75
  | `browser_inspect` | Computed CSS styles + inline styles + event listener types |
76
76
  | `browser_snapshot` | MHTML capture/restore of DOM state + resources |
@@ -81,21 +81,21 @@ All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting
81
81
 
82
82
  | Tool | Description |
83
83
  |------|-------------|
84
- | `browser_navigate` | Navigate to URL with domain blocklist enforcement. Supports `Weavetab://` protocol for persistent local playgrounds |
84
+ | `browser_navigate` | Ultra-low latency navigation (~150-300ms) with non-blocking readyState polling, parallelized metadata, domain blocklist enforcement, and `weavetab://` protocol |
85
85
 
86
86
  ### Input (9 tools)
87
87
 
88
88
  | Tool | Description |
89
89
  |------|-------------|
90
- | `browser_click` | Ghost Cursor (Bézier) click with intent memory, occlusion detection, stuck-loop detection |
91
- | `browser_type` | Human keystroke engine with jitter, burst patterns, paste mode, stuck detection |
90
+ | `browser_click` | Ghost Cursor (Bézier) click with direct visual mark targeting (`mark: N`), intent memory, occlusion detection, and stuck-loop detection |
91
+ | `browser_type` | Human keystroke engine with zero-target `document.activeElement` typing, anti-unfocus click avoidance, jitter, and burst patterns |
92
92
  | `browser_type_secret` | Blind Injection from `secrets.json` — domain check before value load, Shadow DOM isolation, JS property hardening |
93
- | `browser_key` | Native keyboard dispatch with modifier keys (Ctrl, Shift, Alt, Meta) |
94
- | `browser_pointer` | Hover, double-click, drag-and-drop via native mouse events |
93
+ | `browser_key` | Native keyboard dispatch with combo hotkeys (`"Ctrl+A"`, `"Cmd+K"`, `"Alt+Tab"`) and zero arbitrary delay |
94
+ | `browser_pointer` | Hover, double-click, drag-and-drop, and multi-level flyout menu traversal via `hover_chain: ["File", "Export As", "PNG"]` |
95
95
  | `browser_select` | Native `<select>` dropdown selection — React/Vue safe (prototype setter + events) |
96
- | `browser_fill` | Smart multi-field form fill — auto-detects text, select, checkbox, radio, contenteditable |
96
+ | `browser_fill` | Smart multi-field form batch completion with input discovery scanner (`scan: true`), flexible field selectors, and Google Sheets `grid_data` |
97
97
  | `browser_upload` | Bypass file dialogs via CDP `DOM.setFileInputFiles` |
98
- | `browser_scroll` | Directional + element-relative scroll via native wheel events |
98
+ | `browser_scroll` | Fast non-blocking directional + element-relative scroll without redundant action map rebuilds |
99
99
 
100
100
  ### Tabs & Windows (2 tools)
101
101
 
@@ -104,12 +104,11 @@ All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting
104
104
  | `browser_tabs` | Open/switch/close/list/consolidate (dedup)/heal (recover crash). Also list/focus windows |
105
105
  | `browser_detect` | Detect installed browsers + CDP feature coverage per engine (Chromium, Firefox, WebKit) |
106
106
 
107
- ### Mission Execution (3 tools)
107
+ ### Mission Execution (2 tools)
108
108
 
109
109
  | Tool | Description |
110
110
  |------|-------------|
111
111
  | `browser_burst` | Chain N actions in 1 MCP call. Supports 4 macro steps: `type_and_send`, `navigate_and_read`, `click_and_wait`, `scroll_and_read` |
112
- | `browser_plan` | Live task dashboard in browser Shadow DOM overlay. User sees progress, can comment |
113
112
  | `browser_automation` | Inject persistent self-running scripts — monitoring, polling, background extraction |
114
113
 
115
114
  ### Dialog & User Interaction (3 tools)
@@ -120,12 +119,11 @@ All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting
120
119
  | `browser_thought` | Green thought bubbles: feedback (one-way) or question with input (sentence/paragraph modes) |
121
120
  | `browser_clipboard` | System clipboard R/W (text + images) |
122
121
 
123
- ### Wait & Timing (2 tools)
122
+ ### Wait & Timing (1 tool)
124
123
 
125
124
  | Tool | Description |
126
125
  |------|-------------|
127
- | `browser_wait` | Wait for element/text/URL/stable/network/auto — timeout configurable |
128
- | `browser_reset_loop_counter` | Manual loop detection override |
126
+ | `browser_wait` | Wait for element/text/URL/stable/network/auto — timeout configurable, optional loop counter reset (`reset_loop: true`) |
129
127
 
130
128
  ### Storage & Cookies (2 tools)
131
129
 
@@ -172,20 +170,11 @@ All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting
172
170
  |------|-------------|
173
171
  | `browser_performance` | FCP, LCP, TTI metrics, resource timings |
174
172
 
175
- ### Macro (1 tool)
173
+ ### GitHub (1 tool)
176
174
 
177
175
  | Tool | Description |
178
176
  |------|-------------|
179
- | `browser_macro_compile` | Compile successful trails into burst macros |
180
-
181
- ### GitHub (4 tools)
182
-
183
- | Tool | Description |
184
- |------|-------------|
185
- | `github_analyze` | Repo metadata, file tree, README snippet |
186
- | `github_read` | Read file contents via raw.githubusercontent.com (no API limit cost) |
187
- | `github_issues` | List/search/fetch issues with comments |
188
- | `github_get_pr` | PR details + changed files + comments |
177
+ | `browser_github` | Action-based repo metadata analysis, raw source file reading, issue triage, and PR inspection |
189
178
 
190
179
  ### Utility (2 tools)
191
180
 
@@ -266,7 +255,7 @@ The value is permanently masked as `[REDACTED]` in all subsequent DOM reads and
266
255
  "browserFlags": [],
267
256
  "policies": [],
268
257
  "electron": {
269
- "discord": "C:\\Users\\<user>\\AppData\\Local\\Discord\\app-1.0.9183\\Discord.exe",
258
+ "discord": "C:\\Users\\<user>\\AppData\\Local\\Discord\\app-<version>\\Discord.exe",
270
259
  "antigravity": "C:\\Users\\<user>\\AppData\\Local\\Programs\\antigravity\\Antigravity.exe",
271
260
  "vscode": "C:\\Users\\<user>\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
272
261
  }
@@ -500,7 +489,7 @@ Skills are automatically discovered by MCP clients and provide:
500
489
  Weavetab natively supports **generic automation of any Electron or Chromium-based desktop application** (e.g. Discord, Slack, VS Code, Antigravity IDE, Figma, Obsidian, Postman, or local developer applications running from source).
501
490
 
502
491
  ### Why It Works at Layer 0
503
- Electron desktop applications run a bundled Chromium/Blink engine under the hood. When started with Chrome DevTools Protocol debugging enabled (either automatically via Weavetab or via `--remote-debugging-port`), Weavetab connects directly to the desktop app's internal WebSockets and exposes all 45+ MCP tools without requiring external drivers or wrappers.
492
+ Electron desktop applications run a bundled Chromium/Blink engine under the hood. When started with Chrome DevTools Protocol debugging enabled (either automatically via Weavetab or via `--remote-debugging-port`), Weavetab connects directly to the desktop app's internal WebSockets and exposes all 50 MCP tools without requiring external drivers or wrappers.
504
493
 
505
494
  ### Registering Applications
506
495
  In `~/.weavetab/config.json` or project-scoped `.weavetab/config.json`:
@@ -580,10 +569,10 @@ For detailed troubleshooting, see [TROUBLESHOOTING.md](../TROUBLESHOOTING.md).
580
569
 
581
570
  ## Additional Resources
582
571
 
572
+ - [Tool Reference](tools/tools.md)
583
573
  - [Plugin System Guide](PLUGINS.md)
584
574
  - [Architecture Documentation](../ARCHITECTURE.md)
585
- - [Tool Reference](TOOLS.md)
575
+ - [Support & Community](../SUPPORT.md)
586
576
  - [Security Policy](../SECURITY.md)
587
577
  - [Contributing Guidelines](../CONTRIBUTING.md)
588
578
  - [Troubleshooting Guide](../TROUBLESHOOTING.md)
589
- - [Comparison with Other Tools](../.upgrade/compare.md)
@@ -0,0 +1,121 @@
1
+ # Weavetab Plugin System & SDK Specification
2
+
3
+ > **Version:** 2.5.0-beta.2 | **SDK:** @weavetab/sdk | **License:** AGPL-3.0-only
4
+
5
+ The **Weavetab Plugin System** allows developers to extend the MCP runtime with custom tools, visual HUD overlays, thought bubbles, lifecycle hooks, and tool overrides.
6
+
7
+ ---
8
+
9
+ ## 1. Quick Start
10
+
11
+ ### Scaffold a New Plugin
12
+ `ash
13
+ npx @weavetab/sdk init my-custom-plugin
14
+ cd my-custom-plugin
15
+ npm install
16
+ `
17
+
18
+ ### Build & Compile
19
+ `ash
20
+ npm run build
21
+ `
22
+
23
+ ---
24
+
25
+ ## 2. Plugin Architecture
26
+
27
+ Every Weavetab plugin exports a plugin definition created with definePlugin:
28
+
29
+ ` ypescript
30
+ // src/index.ts
31
+ import { definePlugin, type PluginContext } from @weavetab/sdk;
32
+
33
+ export default definePlugin({
34
+ name: weavetab-plugin-sample,
35
+ version: 1.0.0,
36
+ description: Sample custom tool plugin for Weavetab,
37
+
38
+ defaultConfig: {
39
+ enableHud: true,
40
+ },
41
+
42
+ async onLoad(ctx: PluginContext) {
43
+ // Register a custom MCP tool
44
+ ctx.mcp.registerTool({
45
+ name: custom_analyzer,
46
+ description: Performs custom DOM analysis,
47
+ schema: {
48
+ type: object,
49
+ properties: {
50
+ selector: { type: string, description: Target CSS selector }
51
+ },
52
+ required: [selector]
53
+ },
54
+ handler: async (args: { selector: string }, session: any) => {
55
+ // Show thought bubble on browser tab
56
+ if (ctx.config.enableHud && session) {
57
+ await ctx.extension.showThought(session, Analyzing ...);
58
+ }
59
+
60
+ return {
61
+ content: [
62
+ { type: text, text: Analysis complete for }
63
+ ]
64
+ };
65
+ }
66
+ });
67
+ },
68
+
69
+ async onUnload(ctx: PluginContext) {
70
+ // Cleanup resources
71
+ }
72
+ });
73
+ `
74
+
75
+ ---
76
+
77
+ ## 3. Manifest Specification (weavetab.json)
78
+
79
+ Plugins require a weavetab.json manifest in their package root:
80
+
81
+ `json
82
+ {
83
+ name: weavetab-plugin-sample,
84
+ version: 1.0.0,
85
+ entry: ./dist/index.js,
86
+ permissions: [storage, extension, cdp],
87
+ tools: [custom_analyzer]
88
+ }
89
+ `
90
+
91
+ ---
92
+
93
+ ## 4. Plugin Capabilities
94
+
95
+ | Capability | API | Description |
96
+ | :--- | :--- | :--- |
97
+ | **Sandboxed Storage** | ctx.storage.get(), ctx.storage.set() | Isolated key-value storage in ~/.weavetab/plugins/<name>/. |
98
+ | **Thought Bubbles** | ctx.extension.showThought(session, text) | Floating green thoughts on the live browser tab. |
99
+ | **HUD Badges** | ctx.extension.setHudState(session, state) | Real-time status in the Weavetab overlay. |
100
+ | **Tool Overrides** | ctx.mcp.overrideTool(name, wrapperFn) | Wrap or intercept built-in MCP tools with custom pre/post logic. |
101
+ | **Lifecycle Hooks** | ctx.hooks.beforeToolCall, ctx.hooks.afterToolCall | Global auditing and security filters. |
102
+
103
+ ---
104
+
105
+ ## 5. Installing Plugins
106
+
107
+ `ash
108
+ # Install an official plugin
109
+ weavetab plugin add @weavetab/plugin-youtube
110
+
111
+ # Install community plugins (any npm package)
112
+ weavetab plugin add my-custom-plugin
113
+
114
+ # List installed plugins
115
+ weavetab plugin list
116
+
117
+ # Remove a plugin
118
+ weavetab plugin rm my-custom-plugin
119
+ `
120
+
121
+ Restart weavetab to load the newly installed plugin tools into the MCP server.
package/docs/TOOLS.md ADDED
@@ -0,0 +1,56 @@
1
+ # Weavetab MCP Tool Reference
2
+
3
+ > **Version:** 2.5.0-beta.4 | **Total Tools:** 44 | **Architecture:** Layer 0 Direct CDP
4
+
5
+ Weavetab provides 44 production-grade MCP tools organized into functional categories.
6
+
7
+ | Tool Name | Category | Description | Key Features |
8
+ | :--- | :--- | :--- | :--- |
9
+ | `browser_map` | `vision` | Snapshot interactive DOM with stable ref IDs (w:NN). For complex SPAs, use scope or query to constrain tokens. Supports delta temporal diffing (up to 97% token reduction), semantic pruning (dropping hidden elements), Set-of-Marks visual grounding (visual: true / "auto" for canvas/WebGL pages), AX tree fallback (Shadow DOM traversal), scope filtering, query filtering, and forced rebuilds with automatic loop strike reset (force: true). | Semantic DOM pruning (up to 97% token reduction with delta), Set-of-Marks visual grounding (visual: true / "auto"), Per-tab snapshot temporal diffing (delta mode) |
10
+ | `browser_navigate` | `navigation` | Navigate to a URL. Enforces domain security policies and rate limits prior to navigation. Waits for network idle and DOM readiness. Supports internal protocol schemes (e.g. weavetab://). | Domain policy engine and blocklist enforcement, Deterministic DOM stability and network idle waiting, weavetab:// internal protocol support |
11
+ | `browser_click` | `input` | Click a DOM element. Physical click engine incorporating Bézier curve trajectory kinematics (Ghost Cursor). Multi-stage targeting fallback: mark number (SoM visual grounding) -> ref ID -> selector -> label -> intent -> coordinates -> backendNodeId. | Direct mark number targeting (mark: N) from visual mode, Bézier curve trajectory kinematics, Humanized acceleration and velocity curves |
12
+ | `browser_type` | `input` | Type text into a single input field. Keystroke dispatch engine with per-character temporal jitter and burst profiling. Real-time DOM-diffing monitors stuck input state. Supports atomic clearFirst and clipboard paste modes. | Per-character temporal jitter simulation, Burst keystroke profiling, Stuck-typing loop detection via DOM diffing |
13
+ | `browser_type_secret` | `input` | Inject a secret from an environment variable / secrets.json. Blind Injection: securely injects credentials without exposing sensitive values to the LLM context. Permanently masked as [REDACTED] in DOM maps and logs. | Zero LLM context exposure for credentials, Domain-scoped authorization checks, Shadow DOM input isolation |
14
+ | `browser_key` | `input` | Press a keyboard key. Dispatches native hardware key events with modifier key support (Ctrl, Shift, Alt, Meta) to focused elements. | Native key code and key identifier mapping, Modifier key combination handling, Per-tab keyboard focus targeting |
15
+ | `browser_scroll` | `input` | Scroll the page or targeted element. Smooth scrolling engine via CDP Input.dispatchMouseEvent wheel events. Supports directional delta scrolling and element-relative scroll centering. | Directional scrolling (up, down, left, right), Configurable pixel scroll distance, Element-relative scroll targeting via ref ID or label |
16
+ | `browser_dialog` | `dialog_and_interaction` | Accept or dismiss JS dialogs (alert, confirm, prompt) via CDP Page.handleJavaScriptDialog. | Handling of alert, confirm, and prompt modal types, Accept and dismiss actions, Prompt response text payload submission |
17
+ | `browser_burst` | `mission_execution` | HIGH-SPEED MULTI-ACTION PIPELINE: Executes 2 or more sequential browser actions in a single round-trip without waiting for LLM turns between steps. PREFER THIS over individual single-action calls to slash latency and token burn. Supports native primitives (browser_click, browser_fill, browser_type, browser_type_secret, browser_navigate, browser_key, browser_scroll, browser_wait, browser_map) plus compound macros (type_and_send, click_and_wait, navigate_and_read, scroll_and_read, fill_form). If compile_from_history: true is passed, automatically compiles and executes recent successful session trail actions into a burst macro. | Single-request multi-action pipeline execution with zero intermediate LLM round-trips, Compound macro abstractions (type_and_send, click_and_wait, navigate_and_read, scroll_and_read, fill_form, drag_and_drop, hover_and_read), Automatic session history compilation into replayable burst macros (compile_from_history: true) |
18
+ | `browser_tabs` | `tabs` | Manage browser and Electron app tabs/windows (open, switch, close, list). Specify 'app' when targeting desktop apps (e.g. app: 'discord') to avoid opening web browser. | Single and batch tab operations, Duplicate tab consolidation, Crash session recovery (heal) |
19
+ | `browser_wait` | `navigation` | Pause until a condition is met ('element', 'text', 'url', 'stable', 'network', 'auto'). Deterministic wait engine for asynchronous web state synchronization. | Element, text, URL, DOM stability, and network idle conditions, Configurable timeout thresholds, Per-tab asynchronous execution target |
20
+ | `browser_captcha` | `safety` | Autonomous zero-API detection and solving of Turnstile, reCAPTCHA, GeeTest, and hCaptcha bot challenges using local CDP behavioral solvers. | Zero-API autonomous solving, Cloudflare Turnstile, reCAPTCHA v2/v3, GeeTest, and hCaptcha support, Human oversight fallback via wait_for_user |
21
+ | `browser_thoughts` | `dialog_and_interaction` | Agent-to-user communication layer rendered in the middle down of the page. Supports question mode (interactive prompt with answer submission) and feedback mode (status, observation, decision, or warning update). Supports contextual element anchoring (anchor: 'w:NN') and visual styles ('observation', 'decision', 'warning', 'question'). | Middle-down floating card HUD with precision dark styling, Contextual element anchoring (anchor: 'w:NN') with auto-highlighting, Feedback mode (observation, decision, warning updates) |
22
+ | `browser_pointer` | `input` | Advanced pointer control (hover, click, double_click, drag_and_drop) with Bézier curve kinematics. Supports waitForChild pattern for dynamic flyout menus. | Hover, click, double_click, and drag_and_drop actions, Bézier curve cursor motion, waitForChild trigger menu resolution |
23
+ | `browser_select` | `input` | Select an option from a native dropdown by visible text or value. Uses native property setters and dispatches input/change events for framework compatibility (React, Vue, Angular). | Option matching by visible text or value, Framework-safe prototype property setter invocation, Synthetic input and change event dispatch |
24
+ | `browser_fill` | `input` | Smart multi-field form-filling. Evaluates field control types (text, select, checkbox, radio, contenteditable) and processes inputs sequentially with atomic verification. | Multi-field batch input execution, Automatic control type classification, Per-field post-input verification |
25
+ | `browser_highlight` | `canvas_and_visual` | Highlight elements on page. Renders temporary visual overlays over target elements without DOM tree mutations. Supports multi-element consideration overlays (refs: ['w:12', 'w:15']), presentation styles ('consideration', 'target', 'danger', 'success', 'shimmer'), floating badges, and configurable durations. | Multi-candidate consideration overlay (refs array), Five visual styles: consideration, target lock, danger, success, shimmer, Floating label badge display above highlighted elements |
26
+ | `browser_upload` | `input` | Upload files to a file input. Bypasses OS native file pickers via CDP DOM.setFileInputFiles directly targeting file input node IDs using absolute file paths. | Direct CDP file payload injection, Multi-file payload support, Zero OS file picker interaction required |
27
+ | `browser_find` | `vision` | Sub-5ms CDP text search. Zero token waste. Best for locating specific keywords/text on page without a full DOM walk. | Native CDP search (zero DOM walk overhead), Sub-5ms execution latency, Exact keyword matching and match indexing |
28
+ | `browser_storage` | `storage_and_cookies` | Manage localStorage and sessionStorage. Reads, writes, and clears key-value pairs for the active origin. | localStorage and sessionStorage scope targeting, Atomic key-value retrieval and mutation, Origin storage purging |
29
+ | `browser_checkpoint` | `storage_and_cookies` | Snapshot and restore browser state (cookies, localStorage, sessionStorage, and scroll/URL) into named checkpoints to time-travel and rollback failed automation branches. | Session state time-travel and rollback, Cookies backup and restoration (HttpOnly and Secure via CDP), LocalStorage and SessionStorage snapshotting |
30
+ | `browser_network_intercept` | `network` | Intercept/stub network responses (mock APIs, block tracking) and capture raw protocol network telemetry (TLS/SSL certificate metadata, microsecond timing breakdown, and OS-level network failure reasons). | URL glob pattern matching and response mocking, TLS/SSL Certificate security metadata (issuer, protocol, validity, cipher), Microsecond Network Timing breakdown (DNS, TCP, SSL, send, TTFB, download) |
31
+ | `browser_console` | `vision` | 1-5ms latency access to buffered browser console messages, JS exceptions, and network errors tracked via CDP Runtime.consoleAPICalled. | Buffered console output stream retrieval, Buffer clearance actions, Runtime exception stack capture |
32
+ | `browser_pdf` | `output` | Print the current page to a PDF file via CDP Page.printToPDF with configurable orientation, scale, and page ranges. | Landscape and portrait orientation options, Print scale factor adjustment, Page range subset printing |
33
+ | `browser_eval` | `evaluation` | Run arbitrary JS via CDP in page context via CDP Runtime.evaluate. Supports asynchronous evaluation and structured JSON serialization. | Page JS context execution, Async/await promise resolution, Structured JSON return serialization |
34
+ | `browser_cookies` | `storage_and_cookies` | Manage browser cookies. Full CRUD management for HTTP and document cookies via CDP Network domain. | Cookie property retrieval, setting, and deletion, Domain and path attribute scoping |
35
+ | `browser_canvas` | `canvas_and_visual` | For ALL canvas content (charts, games, graphs). Use get_image to read pixel data as Base64 PNG, draw to simulate programmatic coordinate gesture paths. | Base64 PNG pixel buffer export, Programmatic gesture path drawing, Canvas node targeting via ref ID or selector |
36
+ | `browser_scrape` | `vision` | Sub-5ms latency, zero waste extraction via CSS or XPath selectors in a single CDP evaluation step. Returns structured text/attribute arrays. | CSS and XPath query evaluation, Targeted attribute extraction, Single-step execution (high throughput) |
37
+ | `browser_snapshot` | `vision` | Capture or restore an MHTML snapshot (DOM + inline assets). Facilitates offline state serialization, replay verification, and compliance auditing. | Full DOM and asset stream serialization, Atomic capture and restore operations, Offline state audit capability |
38
+ | `browser_screenshot` | `vision` | 95-135ms capture latency via CDP Page.captureScreenshot. Supports PNG and JPEG formats, full-page rendering, and clip region bounding boxes. | Full-page and viewport bounding box capture, PNG and JPEG format encoding, Custom clip region bounding box support |
39
+ | `browser_viewport` | `device_and_environment` | Set viewport dimensions and device emulation (width, height, DPR, mobile, geolocation, timezone, locale, color scheme). | Viewport width, height, and DPR emulation, Mobile viewport and touch event emulation, Geolocation coordinate override |
40
+ | `browser_clipboard` | `dialog_and_interaction` | Read or write to the system clipboard (plaintext or Base64 image payload data). | Read and write data operations, Plaintext and Base64 image payload format support |
41
+ | `browser_inspect` | `vision` | 15-35ms latency, zero waste. Deep DOM inspection returning computed styles, inline styles, box model dimensions, and attached event listener types. | Computed CSS style property inspection, Event listener type registration enumeration, Box model geometry verification |
42
+ | `browser_extract_design` | `vision` | Extract design tokens (colors, typography, spacing, shadows, CSS variables), semantic HTML layouts, and clean CSS into structured files and an LLM design blueprint. Ideal for cloning websites, UI components, and design systems with 100% pixel fidelity. | CSS custom properties and design token harvesting, Palette extraction and typography hierarchy mapping, Semantic clean DOM extraction with inline SVGs preserved |
43
+ | `browser_automation` | `mission_execution` | Inject self-running background script for monitoring/polling. Inject persistent scripts into the page context for continuous event tracking. | Background script context injection, Named automation script management, Decoupled event monitoring lifecycle |
44
+ | `browser_recording` | `output` | Record video screencasts of browser sessions. Automatically compiles captured frames into animated video files (.webp, .gif, .webm, .mp4) using native Node processing or system ffmpeg. | Native WebP/GIF animation compilation in pure Node, Configurable FPS and frame limits, FFmpeg fallback for WebM/MP4 encoding |
45
+ | `browser_detect` | `tabs` | CRITICAL INITIALIZATION TOOL. Detect available browsers and configured desktop apps (Discord, Slack, etc.). Call this FIRST before interacting with the environment to know if apps are online/offline and what tabs they have open. | Local browser engine discovery, Engine CDP API coverage analysis, Tool compatibility reporting per browser engine |
46
+ | `browser_performance` | `performance` | Retrieve page performance metrics. Collects Core Web Vitals (FCP, LCP, CLS) and detailed network resource timing distributions. | First Contentful Paint (FCP) and Largest Contentful Paint (LCP) capture, Cumulative Layout Shift (CLS) tracking, Resource loading timing distributions |
47
+ | `browser_pattern_learn` | `memory` | Read (action=get), register (action=learn), update, or record execution outcome for a named workflow pattern on a given origin in ~/.weavetab-system/memory/sites/. Use action=get at session start to inspect site profiles and reliability scores. Use learn after completing a flow to persist it for future fast-path replay. | Site profile inspection via action=get (reads ~/.weavetab-system/memory/sites/), Named pattern creation and update (merge-on-write, no duplicates), Volatile selector stabilization before persistence |
48
+ | `browser_github` | `github` | Interact with GitHub repositories without burning browser turns. Analyze repo trees, read raw source files, search/inspect issues, and examine PR diffs and review comments. | Action-based repo analysis, file reading, issues, and PR review, Zero GitHub API token requirement for raw reads, Automated active tab repository context resolution |
49
+ | `browser_office` | `documents` | Read and extract structured content from office documents (Excel, Word, PDF, CSV) via live browser session cookies or local downloads directory. | In-session authenticated document fetching, Structured tabular extraction (.xlsx, .csv), Document text and metadata extraction (.docx, .pdf) |
50
+ | `browser_emulate` | `environment` | Emulate browser environmental conditions over CDP: network throttling profiles, CPU slowdown multipliers, geolocation overrides, timezone IDs, and custom User-Agent strings. | Network throttling (Offline, Slow 3G, Fast 3G, 4G), CPU throttling multipliers, Geolocation and timezone overrides |
51
+ | `list_plugins` | `plugins` | Inspect installed Weavetab SDK plugins, available unloadable plugins, tool overrides, custom schemas, and capability manifests. | Installed plugin discovery, Manifest and schema introspection, Ecosystem capability listing |
52
+ | `load_plugin` | `plugins` | Dynamically load any published Weavetab plugin by npm package name into the active runtime with isolated sandboxing and hot tool registration. | Dynamic npm package loading, Hot tool registration with client notification, Isolated plugin execution context |
53
+
54
+ ---
55
+
56
+ *Auto-generated via `npm run docs:generate` on 2026-09-24.*
@@ -1,20 +1,83 @@
1
- ---
2
- title: "Blind Injection"
3
- description: "Enterprise-grade credential injection that never exposes secrets to the LLM."
4
- product: mcp
5
- section: architecture
6
- icon: Lock
7
- slug: blind-injection
8
- ---
9
-
10
- # Blind Injection
11
-
12
- The `browser_type_secret` tool resolves passwords, tokens, and 2FA credentials directly from `secrets.json` on the server — **never exposing sensitive values to the AI model's context stream**.
13
-
14
- ## How It Works
15
-
16
- 1. Store a secret via `weavetab secrets set MY_KEY` or by editing `secrets.json`
17
- 2. The agent calls `browser_type_secret({ id: "w:2", envKey: "MY_KEY" })`
18
- 3. Weavetab resolves the secret from `secrets.json` in-process on the local machine
19
- 4. The value is typed directly into the DOM input field over CDP
20
- 5. All subsequent `browser_map` outputs, DOM snapshots, and audit logs permanently display `[REDACTED]` for that element
1
+ ---
2
+ title: "Blind Injection"
3
+ description: "Enterprise-grade credential injection that never exposes secrets to the LLM."
4
+ product: mcp
5
+ section: architecture
6
+ icon: Lock
7
+ slug: blind-injection
8
+ ---
9
+
10
+ # Blind Injection & Secret Containment
11
+
12
+ The `browser_type_secret` tool and automated secret detection engine resolve passwords, tokens, API keys, PINs, and credentials directly from encrypted storage on the local host — **ensuring sensitive values never cross into the AI agent's context stream or tool outputs**.
13
+
14
+ ## Core Architecture
15
+
16
+ ```
17
+ [Encrypted secrets.json]
18
+ │
19
+ ▼ (In-process resolution & domain validation)
20
+ [Weavetab Server]
21
+ │
22
+ ▼ (Atomic CDP Input.insertText / ghostType)
23
+ [Chromium Target Field]
24
+ │
25
+ ├─► DOM Property Hardening (getter override, symbol coercion, toJSON)
26
+ ├─► In-Memory SessionSecretTracker (backendNodeId & text redaction)
27
+ └─► Dynamic Visual Masking (screenshot, snapshot, PDF blanking)
28
+ ```
29
+
30
+ ## Multi-Layer Containment Mechanisms
31
+
32
+ ### 1. Zero-Exposure Injection
33
+ - Secrets are stored encrypted with AES-256-GCM via `weavetab secrets set <KEY>`.
34
+ - The agent passes the key name (`envKey: "MY_KEY"`), never the plaintext value.
35
+ - Domain scoping validates that the active tab's hostname matches the secret's allowed domains before any value is read from disk.
36
+ - Injection bypasses standard paste or readback mechanisms and writes directly via atomic CDP events.
37
+
38
+ ### 2. Universal Element Selector Resolution
39
+ `browser_type_secret` supports:
40
+ - Direct CSS Selectors (e.g. `id: "#password"`, `id: "input[type='password']"`, `id: ".pwd-field"`)
41
+ - Element ActionMap IDs (e.g. `id: "w:5"` or `id: "5"`)
42
+ - Focused Active Element (`target: "focused"`)
43
+
44
+ ### 3. DOM Property & Coercion Hardening
45
+ Upon injection or typing into any sensitive input:
46
+ - `data-wt-secret="true"` is attached to the DOM node.
47
+ - The element's `.value` getter is overridden at the instance level to return `"[REDACTED]"`.
48
+ - `Symbol.iterator`, `Symbol.toPrimitive`, and `toJSON` are overridden to prevent leakages via array spreads, template literals, or JSON serialization.
49
+
50
+ ### 4. Cross-Tool Containment Matrix
51
+
52
+ | Tool | Protection Mechanism |
53
+ |---|---|
54
+ | `browser_type_secret` | In-process secret resolution, domain check, atomic CDP typing. |
55
+ | `browser_type` | Broad secret detection (`type`, `name`, `id`, `autocomplete`, `aria-label`); disables value readbacks and redactions in action logging. |
56
+ | `browser_fill` | Auto-registers secret fields in both single and `blast_mode`; masks values as `[REDACTED]` in return results and scan discovery mode (`scan: true`). |
57
+ | `browser_map` | DOM and Accessibility (AX) tree walkers redact values, placeholders, and labels for all sensitive fields. |
58
+ | `browser_scrape` | Evaluates in-page attribute extraction with automatic `[REDACTED]` substitution; filters live properties. |
59
+ | `browser_screenshot` | Applies dynamic security masking (`webkitTextSecurity: disc` / blanking) during capture and restores safely in `finally`. |
60
+ | `browser_snapshot` | Pre-masks all secret fields before MHTML export. |
61
+ | `browser_pdf` | Masks sensitive inputs during PDF generation. |
62
+
63
+ ## CLI Usage
64
+
65
+ ```powershell
66
+ # Store an encrypted secret with domain scoping
67
+ weavetab secrets set GITHUB_TOKEN
68
+
69
+ # List stored keys (never prints values)
70
+ weavetab secrets list
71
+
72
+ # Remove a stored key
73
+ weavetab secrets rm GITHUB_TOKEN
74
+ ```
75
+
76
+ ## Agent Tool Invocation
77
+
78
+ ```json
79
+ {
80
+ "id": "#password",
81
+ "envKey": "GITHUB_TOKEN"
82
+ }
83
+ ```
@@ -1,49 +1,49 @@
1
- ---
2
- title: "Overview"
3
- description: "Five layers, deterministic pipeline, zero cloud."
4
- product: mcp
5
- section: architecture
6
- icon: Layers
7
- slug: overview
8
- ---
9
-
10
- # Architecture Overview
11
-
12
- Weavetab is decomposed into **five functional layers**, all running in-process without external daemon dependencies.
13
-
14
- ## Layer Map
15
-
16
- | # | Layer | Responsibility |
17
- |---|---|---|
18
- | 1 | **Transport** | JSON-RPC 2.0 over stdio or WebSocket (`--ws --port 3000`) |
19
- | 2 | **Security & Governance** | Domain blacklist, rate limiter (mutex), RBAC roles, policy engine, root guard |
20
- | 3 | **Intelligence Engine** | Session memory, semantic delta diffing, DOM pruner, loop detection, intent intercept |
21
- | 4 | **Sensor Systems** | Network telemetry, DOM mutation observer, human pacing, agent state machine |
22
- | 5 | **CDP Bridge** | DOM walker, Ghost Cursor (Bézier trajectories), keystroke engine, shadow-DOM injector |
23
-
24
- ## Tool Execution Pipeline
25
-
26
- ```text
27
- Agent → withSecurity()
28
- ├── Rate limiter (mutex)
29
- ├── Domain policy check (allow/deny/audit/read-only)
30
- ├── RBAC role verification
31
- ├── User-stop polling
32
- ├── Chat queue draining
33
- ├── Agent state transition (idle → weaving → reading)
34
- └── Tool handler → CDP Bridge → Browser / Desktop App
35
- ```
36
-
37
- Any validation or security failure short-circuits the pipeline immediately and returns a structured `WeaveError` — no partial side-effects are left on the browser.
38
-
39
- ## Why Direct CDP
40
-
41
- | Feature | Weavetab | Playwright | Puppeteer | Selenium |
42
- |---|---|---|---|---|
43
- | **Architecture** | Direct CDP Layer 0 | Node bridge abstraction | CDP wrapper | WebDriver |
44
- | **Mean latency** | **3–8 ms** | 15–40 ms | 10–25 ms | 50–150 ms |
45
- | **Token efficiency** | **Semantic Deltas (97% reduction)** | Full DOM dumps | Full DOM dumps | Full DOM dumps |
46
- | **Desktop Electron Apps** | **Native (any Electron app)** | Experimental | Limited | Third-party driver |
47
- | **CAPTCHA Solver** | **Autonomous Zero-API** | None | None | None |
48
- | **MCP native** | **Yes (45 tools)** | No | No | No |
49
- | **Cloud dependency** | **Zero** | Optional | Optional | Grid required |
1
+ ---
2
+ title: "Overview"
3
+ description: "Five layers, deterministic pipeline, zero cloud."
4
+ product: mcp
5
+ section: architecture
6
+ icon: Layers
7
+ slug: overview
8
+ ---
9
+
10
+ # Architecture Overview
11
+
12
+ Weavetab is decomposed into **five functional layers**, all running in-process without external daemon dependencies.
13
+
14
+ ## Layer Map
15
+
16
+ | # | Layer | Responsibility |
17
+ |---|---|---|
18
+ | 1 | **Transport** | JSON-RPC 2.0 over stdio or WebSocket (`--ws --port 3000`) |
19
+ | 2 | **Security & Governance** | Domain blacklist, rate limiter (mutex), RBAC roles, policy engine, root guard |
20
+ | 3 | **Intelligence Engine** | Session memory, semantic delta diffing, DOM pruner, loop detection, intent intercept |
21
+ | 4 | **Sensor Systems** | Network telemetry, DOM mutation observer, human pacing, agent state machine |
22
+ | 5 | **CDP Bridge** | DOM walker, Ghost Cursor (Bézier trajectories), keystroke engine, shadow-DOM injector |
23
+
24
+ ## Tool Execution Pipeline
25
+
26
+ ```text
27
+ Agent → withSecurity()
28
+ ├── Rate limiter (mutex)
29
+ ├── Domain policy check (allow/deny/audit/read-only)
30
+ ├── RBAC role verification
31
+ ├── User-stop polling
32
+ ├── Chat queue draining
33
+ ├── Agent state transition (idle → weaving → reading)
34
+ └── Tool handler → CDP Bridge → Browser / Desktop App
35
+ ```
36
+
37
+ Any validation or security failure short-circuits the pipeline immediately and returns a structured `WeaveError` — no partial side-effects are left on the browser.
38
+
39
+ ## Why Direct CDP
40
+
41
+ | Feature | Weavetab | Playwright | Puppeteer | Selenium |
42
+ |---|---|---|---|---|
43
+ | **Architecture** | Direct CDP Layer 0 | Node bridge abstraction | CDP wrapper | WebDriver |
44
+ | **Mean latency** | **3–8 ms** | 15–40 ms | 10–25 ms | 50–150 ms |
45
+ | **Token efficiency** | **Semantic Deltas (97% reduction)** | Full DOM dumps | Full DOM dumps | Full DOM dumps |
46
+ | **Desktop Electron Apps** | **Native (any Electron app)** | Experimental | Limited | Third-party driver |
47
+ | **CAPTCHA Solver** | **Autonomous Zero-API** | None | None | None |
48
+ | **MCP native** | **Yes (44 tools)** | No | No | No |
49
+ | **Cloud dependency** | **Zero** | Optional | Optional | Grid required |