@weavetab/mcp 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +49 -49
- package/ARCHITECTURE.md +590 -590
- package/LICENSE +216 -216
- package/README.md +269 -269
- package/SECURITY.md +207 -207
- package/TROUBLESHOOTING.md +373 -365
- package/dist/anticaptcha/detector.js +395 -395
- package/dist/anticaptcha/solver.js +130 -130
- package/dist/cdp/bridge.js +73 -73
- package/dist/cdp/connector.js +46 -22
- package/dist/cdp/extension.js +34 -34
- package/dist/cdp/helpers.js +174 -174
- package/dist/cdp/pruner.js +195 -195
- package/dist/cdp/ref_cache.js +66 -66
- package/dist/cdp/security.js +10 -10
- package/dist/cdp/verify.js +57 -57
- package/dist/cdp/walker.js +563 -525
- package/dist/cli/plugin.js +26 -3
- package/dist/config/loader.d.ts +0 -3
- package/dist/config/loader.js +0 -9
- package/dist/index.js +0 -4
- package/dist/intelligence/intent.js +81 -81
- package/dist/intelligence/sessionMemory.js +2 -2
- package/dist/overlay/ghost.js +22 -22
- package/dist/overlay/injector.js +89 -89
- package/dist/plugin/extension_bridge.js +54 -54
- package/dist/plugin/interface.d.ts +7 -0
- package/dist/plugin/loader.js +3 -4
- package/dist/plugin/schema.d.ts +11 -0
- package/dist/plugin/schema.js +59 -0
- package/dist/security/guard.js +18 -18
- package/dist/sensors/actionability.js +167 -167
- package/dist/sensors/guard.js +29 -29
- package/dist/sensors/network.js +15 -17
- package/dist/server.d.ts +1 -1
- package/dist/server.js +173 -144
- package/dist/state/delta.js +6 -7
- package/dist/tools/automation.js +85 -85
- package/dist/tools/canvas.js +48 -25
- package/dist/tools/checkpoint.js +94 -35
- package/dist/tools/click.js +52 -41
- package/dist/tools/clipboard.js +80 -74
- package/dist/tools/design_extract.js +441 -441
- package/dist/tools/dialog.js +13 -13
- package/dist/tools/emulation.d.ts +2 -0
- package/dist/tools/emulation.js +7 -0
- package/dist/tools/fill.js +344 -347
- package/dist/tools/find.js +78 -52
- package/dist/tools/highlight.js +67 -67
- package/dist/tools/inspect.js +54 -25
- package/dist/tools/key.js +42 -35
- package/dist/tools/navigate.d.ts +1 -1
- package/dist/tools/navigate.js +35 -35
- package/dist/tools/office/parse.js +62 -18
- package/dist/tools/pdf.d.ts +9 -0
- package/dist/tools/pdf.js +7 -4
- package/dist/tools/performance.d.ts +11 -4
- package/dist/tools/performance.js +94 -42
- package/dist/tools/performance_test.d.ts +2 -2
- package/dist/tools/performance_test.js +69 -69
- package/dist/tools/pointer.js +116 -116
- package/dist/tools/read.js +99 -67
- package/dist/tools/recording.js +9 -0
- package/dist/tools/scrape.js +146 -146
- package/dist/tools/screenshot.d.ts +2 -0
- package/dist/tools/screenshot.js +46 -4
- package/dist/tools/scroll.d.ts +3 -1
- package/dist/tools/scroll.js +13 -15
- package/dist/tools/select.d.ts +3 -0
- package/dist/tools/select.js +131 -124
- package/dist/tools/snapshot.js +8 -6
- package/dist/tools/storage.d.ts +5 -1
- package/dist/tools/storage.js +16 -0
- package/dist/tools/tabs.d.ts +7 -5
- package/dist/tools/tabs.js +79 -26
- package/dist/tools/thought.js +8 -8
- package/dist/tools/type.js +274 -274
- package/dist/tools/type_secret.js +23 -23
- package/dist/tools/upload.js +3 -3
- package/dist/tools/video_compiler.js +9 -0
- package/dist/tools/wait.js +35 -35
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/DOCUMENTATION.md +583 -585
- package/docs/PLUGINS.md +139 -121
- package/docs/TOOLS.md +3 -4
- package/docs/architecture/blind-injection.md +83 -83
- package/docs/architecture/overview.md +49 -49
- package/docs/architecture/security.md +36 -36
- package/docs/architecture/transport.md +37 -37
- package/docs/cli/cli-commands.md +50 -50
- package/docs/cli/cli-flags.md +28 -28
- package/docs/cli/cli-scripting.md +35 -35
- package/docs/configuration/config-locations.md +23 -23
- package/docs/configuration/configuration.md +39 -27
- package/docs/configuration/env-variables.md +19 -19
- package/docs/configuration/folders.md +62 -55
- package/docs/desktop-automation/electron-apps.md +225 -214
- package/docs/get-started/installation.md +1 -1
- package/docs/get-started/introduction.md +60 -60
- package/docs/get-started/quickstart.md +2 -2
- package/docs/get-started/setup-wizard.md +27 -27
- package/docs/intelligence/site-profiles.md +151 -151
- package/docs/tools/tools.md +582 -631
- package/docs/troubleshooting/trouble-browser.md +27 -27
- package/docs/troubleshooting/trouble-loop.md +31 -31
- package/ext-dist/background.js +415 -415
- package/ext-dist/content.js +2527 -2527
- package/ext-dist/dashboard.html +583 -583
- package/ext-dist/hud/hud.js +3 -3
- package/ext-dist/hud/index.html +20 -20
- package/ext-dist/manifest.json +73 -73
- package/ext-dist/styles.css +223 -223
- package/mcp.json +796 -805
- package/package.json +118 -118
- package/server.json +23 -23
- package/dist/cdp/walker.test.d.ts +0 -2
- package/dist/cdp/walker.test.js +0 -172
- package/dist/intelligence/sessionMemory.test.d.ts +0 -2
- package/dist/intelligence/sessionMemory.test.js +0 -62
- package/dist/intelligence/trail.test.d.ts +0 -2
- package/dist/intelligence/trail.test.js +0 -110
- package/dist/state/cache.test.d.ts +0 -2
- package/dist/state/cache.test.js +0 -76
- package/dist/state/delta.test.d.ts +0 -2
- package/dist/state/delta.test.js +0 -279
- package/dist/state/groups.d.ts +0 -15
- package/dist/state/groups.js +0 -80
- package/dist/tools/accessibility.d.ts +0 -14
- package/dist/tools/accessibility.js +0 -32
- package/dist/tools/ask.d.ts +0 -14
- package/dist/tools/ask.js +0 -49
- package/dist/tools/click_and_wait.d.ts +0 -33
- package/dist/tools/click_and_wait.js +0 -149
- package/dist/tools/drag.d.ts +0 -15
- package/dist/tools/drag.js +0 -29
- package/dist/tools/geo.d.ts +0 -19
- package/dist/tools/geo.js +0 -29
- package/dist/tools/github/analyze.d.ts +0 -4
- package/dist/tools/github/analyze.js +0 -113
- package/dist/tools/github/cache.d.ts +0 -21
- package/dist/tools/github/cache.js +0 -28
- package/dist/tools/github/index.d.ts +0 -19
- package/dist/tools/github/index.js +0 -40
- package/dist/tools/github/issues.d.ts +0 -9
- package/dist/tools/github/issues.js +0 -88
- package/dist/tools/github/pr.d.ts +0 -5
- package/dist/tools/github/pr.js +0 -88
- package/dist/tools/github/rateLimiter.d.ts +0 -4
- package/dist/tools/github/rateLimiter.js +0 -46
- package/dist/tools/github/read.d.ts +0 -34
- package/dist/tools/github/read.js +0 -74
- package/dist/tools/github/repoContext.d.ts +0 -20
- package/dist/tools/github/repoContext.js +0 -129
- package/dist/tools/hover.d.ts +0 -19
- package/dist/tools/hover.js +0 -57
- package/dist/tools/integration.test.d.ts +0 -2
- package/dist/tools/integration.test.js +0 -96
- package/dist/tools/macro_compiler.d.ts +0 -7
- package/dist/tools/macro_compiler.js +0 -82
- package/dist/tools/mouse.d.ts +0 -21
- package/dist/tools/mouse.js +0 -62
- package/dist/tools/response.d.ts +0 -129
- package/dist/tools/response.js +0 -5
- package/dist/tools/wait_for.d.ts +0 -23
- package/dist/tools/wait_for.js +0 -30
- package/dist/tools/windows.d.ts +0 -22
- package/dist/tools/windows.js +0 -57
package/docs/PLUGINS.md
CHANGED
|
@@ -1,121 +1,139 @@
|
|
|
1
|
-
# Weavetab Plugin System & SDK Specification
|
|
2
|
-
|
|
3
|
-
> **Version:** 2.5.
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`json
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
weavetab
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`
|
|
120
|
-
|
|
121
|
-
|
|
1
|
+
# Weavetab Plugin System & SDK Specification
|
|
2
|
+
|
|
3
|
+
> **Version:** 2.5.1 | **SDK:** @weavetab/sdk (MIT) | **Runtime:** 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
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @weavetab/sdk init my-custom-plugin
|
|
15
|
+
cd my-custom-plugin
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Build & Compile
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run build
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Plugin Architecture
|
|
28
|
+
|
|
29
|
+
Every Weavetab plugin exports a plugin definition created with `definePlugin`:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// src/index.ts
|
|
33
|
+
import { definePlugin, type PluginContext } from "@weavetab/sdk";
|
|
34
|
+
|
|
35
|
+
export default definePlugin({
|
|
36
|
+
name: "weavetab-plugin-sample",
|
|
37
|
+
version: "1.0.0",
|
|
38
|
+
description: "Sample custom tool plugin for Weavetab",
|
|
39
|
+
|
|
40
|
+
defaultConfig: {
|
|
41
|
+
enableHud: true,
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
async onLoad(ctx: PluginContext) {
|
|
45
|
+
// Register a custom MCP tool
|
|
46
|
+
ctx.mcp.registerTool({
|
|
47
|
+
name: "custom_analyzer",
|
|
48
|
+
description: "Performs custom DOM analysis",
|
|
49
|
+
schema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
selector: { type: "string", description: "Target CSS selector" }
|
|
53
|
+
},
|
|
54
|
+
required: ["selector"]
|
|
55
|
+
},
|
|
56
|
+
handler: async (args: { selector: string }, session: any) => {
|
|
57
|
+
// Show thought bubble on the browser tab
|
|
58
|
+
if (ctx.config.enableHud && session) {
|
|
59
|
+
await ctx.extension.showThought(session, `Analyzing ${args.selector}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{ type: "text", text: `Analysis complete for ${args.selector}` }
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
async onUnload(ctx: PluginContext) {
|
|
72
|
+
// Cleanup resources
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 3. Manifest Specification (weavetab.json)
|
|
80
|
+
|
|
81
|
+
Plugins require a `weavetab.json` manifest in their package root:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"$schema": "https://weavetab.dev/schema/plugin.json",
|
|
86
|
+
"name": "weavetab-plugin-sample",
|
|
87
|
+
"version": "1.0.0",
|
|
88
|
+
"entry": "dist/index.js",
|
|
89
|
+
"engines": {
|
|
90
|
+
"weavetab": "^2.5.1",
|
|
91
|
+
"node": ">=18.0.0"
|
|
92
|
+
},
|
|
93
|
+
"permissions": {
|
|
94
|
+
"extension": { "hud": true, "reason": "Displays HUD thoughts" },
|
|
95
|
+
"cdp": { "evaluate": true, "reason": "Runs DOM analysis" },
|
|
96
|
+
"tools": { "add": true, "reason": "Registers the custom_analyzer tool" }
|
|
97
|
+
},
|
|
98
|
+
"tools": [
|
|
99
|
+
{
|
|
100
|
+
"name": "custom_analyzer",
|
|
101
|
+
"description": "Performs custom DOM analysis"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
> Registering tools at runtime via `ctx.mcp.registerTool()` requires the `permissions.tools.add` permission.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 4. Plugin Capabilities
|
|
112
|
+
|
|
113
|
+
| Capability | API | Description |
|
|
114
|
+
| :--- | :--- | :--- |
|
|
115
|
+
| **Sandboxed Storage** | `ctx.storage.get()`, `ctx.storage.set()` | Isolated key-value storage in `~/.weavetab/plugins/<name>/`. |
|
|
116
|
+
| **Thought Bubbles** | `ctx.extension.showThought(session, text)` | Floating green thoughts on the live browser tab. |
|
|
117
|
+
| **HUD Badges** | `ctx.extension.setHudState(session, state)` | Real-time status in the Weavetab overlay. |
|
|
118
|
+
| **Tool Overrides** | `ctx.mcp.overrideTool(name, wrapperFn)` | Wrap or intercept built-in MCP tools with custom pre/post logic. |
|
|
119
|
+
| **Lifecycle Hooks** | `ctx.hooks.beforeToolCall`, `ctx.hooks.afterToolCall` | Global auditing and security filters. |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 5. Installing Plugins
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Install a plugin by npm package name
|
|
127
|
+
weavetab plugin add my-custom-plugin
|
|
128
|
+
|
|
129
|
+
# Install from a local path
|
|
130
|
+
weavetab plugin add ./my-plugin
|
|
131
|
+
|
|
132
|
+
# List installed plugins
|
|
133
|
+
weavetab plugin list
|
|
134
|
+
|
|
135
|
+
# Remove a plugin
|
|
136
|
+
weavetab plugin rm my-custom-plugin
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Restart Weavetab to load the newly installed plugin tools into the MCP server.
|
package/docs/TOOLS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Weavetab MCP Tool Reference
|
|
2
2
|
|
|
3
|
-
> **Version:** 2.5.
|
|
3
|
+
> **Version:** 2.5.1 | **Total Tools:** 41 | **Architecture:** Layer 0 Direct CDP
|
|
4
4
|
|
|
5
|
-
Weavetab provides
|
|
5
|
+
Weavetab provides 41 production-grade MCP tools organized into functional categories.
|
|
6
6
|
|
|
7
7
|
| Tool Name | Category | Description | Key Features |
|
|
8
8
|
| :--- | :--- | :--- | :--- |
|
|
@@ -45,10 +45,9 @@ Weavetab provides 42 production-grade MCP tools organized into functional catego
|
|
|
45
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
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
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
48
|
| `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
49
|
| `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
50
|
|
|
52
51
|
---
|
|
53
52
|
|
|
54
|
-
*Auto-generated via `npm run docs:generate` on 2026-10-
|
|
53
|
+
*Auto-generated via `npm run docs:generate` on 2026-10-18.*
|
|
@@ -1,83 +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 & 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
|
+
---
|
|
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 (default) 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 (
|
|
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 (default) 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 (41 Tools)** | No | No | No |
|
|
49
|
+
| **Cloud dependency** | **Zero** | Optional | Optional | Grid required |
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Security Model"
|
|
3
|
-
description: "Layered defenses that gate every tool invocation."
|
|
4
|
-
product: mcp
|
|
5
|
-
section: architecture
|
|
6
|
-
icon: ShieldCheck
|
|
7
|
-
slug: security
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Security Model
|
|
11
|
-
|
|
12
|
-
Weavetab executes direct Layer 0 CDP commands — security is layered and **deny-by-default for risky surfaces**.
|
|
13
|
-
|
|
14
|
-
## Defense-in-Depth Mechanisms
|
|
15
|
-
|
|
16
|
-
| Mechanism | Description |
|
|
17
|
-
|---|---|
|
|
18
|
-
| **Domain Blacklist** | Hard-blocked high-risk domains (banking, IAM consoles, internal infrastructure). |
|
|
19
|
-
| **Domain Policy Engine** | Per-domain enforcement modes: `allow`, `read-only`, `deny`, `audit`. |
|
|
20
|
-
| **Localhost Binding** | WebSocket server and CDP endpoints strictly bound to `127.0.0.1`. |
|
|
21
|
-
| **Rate Limiting** | Mutex-enforced actions-per-minute rate limiter. |
|
|
22
|
-
| **RBAC Roles** | 5 roles gating tool access (`admin`, `operator`, `viewer`, `automation`, `system`). |
|
|
23
|
-
| **Root Guard** | Prevents execution as root/superuser on Unix systems. |
|
|
24
|
-
| **Blind Injection** | Credential injection from `secrets.json` without exposing raw text to LLM context. |
|
|
25
|
-
| **Shadow DOM Isolation** | All injected HUD and modal overlays run in isolated Shadow DOM trees. |
|
|
26
|
-
| **Path Traversal Guard** | File upload and download paths strictly validated against path traversal. |
|
|
27
|
-
|
|
28
|
-
## RBAC Role Matrix
|
|
29
|
-
|
|
30
|
-
| Tool Category | admin | operator | viewer | automation | system |
|
|
31
|
-
|---|:---:|:---:|:---:|:---:|:---:|
|
|
32
|
-
| Mutation tools (`click`, `type`, `fill`, etc.) | yes | yes | no | yes | no |
|
|
33
|
-
| Read-only tools (`map`, `find`, `scrape`, `screenshot`) | yes | yes | yes | yes | no |
|
|
34
|
-
| High-level orchestration (`burst`, `automation`, `wait`) | yes | yes | no | yes | no |
|
|
35
|
-
| Interactive HUD (`thoughts`) | yes | yes | no | no | yes |
|
|
36
|
-
| System introspection (`detect`, `performance`, `checkpoint`) | yes | yes | no | yes | yes |
|
|
1
|
+
---
|
|
2
|
+
title: "Security Model"
|
|
3
|
+
description: "Layered defenses that gate every tool invocation."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: architecture
|
|
6
|
+
icon: ShieldCheck
|
|
7
|
+
slug: security
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Security Model
|
|
11
|
+
|
|
12
|
+
Weavetab executes direct Layer 0 CDP commands — security is layered and **deny-by-default for risky surfaces**.
|
|
13
|
+
|
|
14
|
+
## Defense-in-Depth Mechanisms
|
|
15
|
+
|
|
16
|
+
| Mechanism | Description |
|
|
17
|
+
|---|---|
|
|
18
|
+
| **Domain Blacklist** | Hard-blocked high-risk domains (banking, IAM consoles, internal infrastructure). |
|
|
19
|
+
| **Domain Policy Engine** | Per-domain enforcement modes: `allow`, `read-only`, `deny`, `audit`. |
|
|
20
|
+
| **Localhost Binding** | WebSocket server and CDP endpoints strictly bound to `127.0.0.1`. |
|
|
21
|
+
| **Rate Limiting** | Mutex-enforced actions-per-minute rate limiter. |
|
|
22
|
+
| **RBAC Roles** | 5 roles gating tool access (`admin`, `operator`, `viewer`, `automation`, `system`). |
|
|
23
|
+
| **Root Guard** | Prevents execution as root/superuser on Unix systems. |
|
|
24
|
+
| **Blind Injection** | Credential injection from `secrets.json` without exposing raw text to LLM context. |
|
|
25
|
+
| **Shadow DOM Isolation** | All injected HUD and modal overlays run in isolated Shadow DOM trees. |
|
|
26
|
+
| **Path Traversal Guard** | File upload and download paths strictly validated against path traversal. |
|
|
27
|
+
|
|
28
|
+
## RBAC Role Matrix
|
|
29
|
+
|
|
30
|
+
| Tool Category | admin | operator | viewer | automation | system |
|
|
31
|
+
|---|:---:|:---:|:---:|:---:|:---:|
|
|
32
|
+
| Mutation tools (`click`, `type`, `fill`, etc.) | yes | yes | no | yes | no |
|
|
33
|
+
| Read-only tools (`map`, `find`, `scrape`, `screenshot`) | yes | yes | yes | yes | no |
|
|
34
|
+
| High-level orchestration (`burst`, `automation`, `wait`) | yes | yes | no | yes | no |
|
|
35
|
+
| Interactive HUD (`thoughts`) | yes | yes | no | no | yes |
|
|
36
|
+
| System introspection (`detect`, `performance`, `checkpoint`) | yes | yes | no | yes | yes |
|