@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.
- package/AGENTS.md +1 -1
- package/ARCHITECTURE.md +6 -6
- package/LICENSE +1 -1
- package/README.md +158 -961
- package/SECURITY.md +33 -22
- package/TROUBLESHOOTING.md +2 -2
- package/dist/cdp/bridge.js +2 -1
- package/dist/cdp/connector.d.ts +2 -0
- package/dist/cdp/connector.js +8 -4
- package/dist/cdp/helpers.d.ts +4 -0
- package/dist/cdp/helpers.js +181 -0
- package/dist/cdp/omni_broker.d.ts +1 -1
- package/dist/cdp/omni_broker.js +1 -1
- package/dist/cdp/walker.d.ts +25 -1
- package/dist/cdp/walker.js +304 -7
- package/dist/cli/plugin.js +24 -17
- package/dist/cli/updater.d.ts +1 -1
- package/dist/cli/updater.js +27 -7
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.js +41 -2
- package/dist/desktop/discovery.d.ts +44 -0
- package/dist/desktop/discovery.js +364 -0
- package/dist/index.js +95 -15
- package/dist/intelligence/marks.d.ts +36 -0
- package/dist/intelligence/marks.js +30 -0
- package/dist/intelligence/patternCompiler.d.ts +118 -0
- package/dist/intelligence/patternCompiler.js +259 -0
- package/dist/intelligence/sessionMemory.d.ts +2 -0
- package/dist/intelligence/sessionMemory.js +18 -8
- package/dist/overlay/injector.js +2 -2
- package/dist/plugin/interface.d.ts +76 -2
- package/dist/plugin/loader.d.ts +15 -1
- package/dist/plugin/loader.js +217 -70
- package/dist/plugin/pipeline.d.ts +75 -0
- package/dist/plugin/pipeline.js +183 -0
- package/dist/plugin/registry.js +3 -2
- package/dist/security/secrets.d.ts +1 -0
- package/dist/security/secrets.js +13 -0
- package/dist/sensors/actionability.js +1 -2
- package/dist/sensors/guard.js +4 -10
- package/dist/sensors/mutations.js +12 -0
- package/dist/sensors/operation_monitor.js +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +428 -156
- package/dist/state/agent.d.ts +1 -0
- package/dist/state/agent.js +3 -0
- package/dist/state/delta.d.ts +12 -4
- package/dist/state/delta.js +67 -14
- package/dist/state/session.d.ts +6 -0
- package/dist/state/session.js +27 -0
- package/dist/tools/browser_detect.d.ts +16 -3
- package/dist/tools/browser_detect.js +50 -5
- package/dist/tools/burst.d.ts +17 -8
- package/dist/tools/burst.js +236 -77
- package/dist/tools/checkpoint.d.ts +38 -0
- package/dist/tools/checkpoint.js +271 -0
- package/dist/tools/click.d.ts +1 -0
- package/dist/tools/click.js +74 -70
- package/dist/tools/design_extract.js +1 -1
- package/dist/tools/eval.js +1 -1
- package/dist/tools/fill.d.ts +20 -1
- package/dist/tools/fill.js +199 -40
- package/dist/tools/find.d.ts +16 -0
- package/dist/tools/find.js +67 -44
- package/dist/tools/github/index.d.ts +19 -4
- package/dist/tools/github/index.js +40 -4
- package/dist/tools/highlight.d.ts +6 -2
- package/dist/tools/highlight.js +158 -72
- package/dist/tools/inspect.js +1 -1
- package/dist/tools/key.js +65 -56
- package/dist/tools/navigate.js +29 -34
- package/dist/tools/pdf.js +21 -13
- package/dist/tools/pointer.d.ts +18 -3
- package/dist/tools/pointer.js +89 -1
- package/dist/tools/read.d.ts +28 -8
- package/dist/tools/read.js +230 -56
- package/dist/tools/scrape.js +67 -13
- package/dist/tools/screenshot.js +21 -16
- package/dist/tools/scroll.js +6 -11
- package/dist/tools/select.js +8 -2
- package/dist/tools/snapshot.js +3 -34
- package/dist/tools/tabs.js +14 -6
- package/dist/tools/thought.d.ts +2 -0
- package/dist/tools/thought.js +13 -14
- package/dist/tools/type.d.ts +2 -0
- package/dist/tools/type.js +107 -58
- package/dist/tools/type_secret.js +42 -76
- package/dist/tools/upload.js +1 -1
- package/dist/tools/video_compiler.d.ts +1 -1
- package/dist/tools/video_compiler.js +11 -12
- package/dist/version.d.ts +5 -0
- package/dist/version.js +5 -0
- package/docs/DOCUMENTATION.md +21 -32
- package/docs/PLUGINS.md +121 -0
- package/docs/TOOLS.md +56 -0
- package/docs/architecture/blind-injection.md +83 -20
- package/docs/architecture/overview.md +49 -49
- package/docs/configuration/folders.md +55 -54
- package/docs/desktop-automation/electron-apps.md +217 -162
- package/docs/get-started/introduction.md +60 -60
- package/docs/intelligence/site-profiles.md +151 -0
- package/docs/tools/tools.md +631 -293
- package/docs/troubleshooting/trouble-loop.md +31 -31
- package/ext-dist/background.js +10 -62
- package/ext-dist/content.js +333 -920
- package/ext-dist/hud/hud.js +9 -9
- package/ext-dist/manifest.json +2 -6
- package/ext-dist/styles.css +6 -1
- package/mcp.json +101 -67
- package/package.json +5 -6
- package/server.json +3 -3
- package/ext-dist/sidepanel/sidepanel.js +0 -25
- package/ext-dist/sidepanel.html +0 -547
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Folder Hierarchy"
|
|
3
|
-
description: ".weavetab, .weavetab-system, and ~/.weavetab directory structure."
|
|
4
|
-
product: mcp
|
|
5
|
-
section: configuration
|
|
6
|
-
icon: FolderOpen
|
|
7
|
-
slug: folders
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Workspace & System Directories
|
|
11
|
-
|
|
12
|
-
Weavetab strictly partitions project-scoped output, global configurations, and system-level intelligence data into dedicated directory structures.
|
|
13
|
-
|
|
14
|
-
## 1. Project-Scoped Directory: `./.weavetab/`
|
|
15
|
-
|
|
16
|
-
Created in your current working directory to store project-scoped settings and mission output:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
./.weavetab/
|
|
20
|
-
├── config.json # Project-specific config overrides
|
|
21
|
-
├── secrets.json # Project-scoped credentials for Blind Injection
|
|
22
|
-
├── pdfs/ # Exported PDF documents
|
|
23
|
-
├── screenshots/ # Full-page and clipped PNG/JPEG screenshots
|
|
24
|
-
├── downloads/ # Downloaded files during automated sessions
|
|
25
|
-
├── designs/ # Extracted design tokens and Tailwind themes
|
|
26
|
-
└── logs/ # Human-readable logs and JSONL audit trails
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 2. System Intelligence Directory: `~/.weavetab-system/`
|
|
30
|
-
|
|
31
|
-
Global system directory holding cross-session learning and process locks:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
~/.weavetab-system/
|
|
35
|
-
├── memory/ # Per-domain frontend framework & strategy profiles
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
├──
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
├──
|
|
51
|
-
├──
|
|
52
|
-
├──
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "Folder Hierarchy"
|
|
3
|
+
description: ".weavetab, .weavetab-system, and ~/.weavetab directory structure."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: configuration
|
|
6
|
+
icon: FolderOpen
|
|
7
|
+
slug: folders
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Workspace & System Directories
|
|
11
|
+
|
|
12
|
+
Weavetab strictly partitions project-scoped output, global configurations, and system-level intelligence data into dedicated directory structures.
|
|
13
|
+
|
|
14
|
+
## 1. Project-Scoped Directory: `./.weavetab/`
|
|
15
|
+
|
|
16
|
+
Created in your current working directory to store project-scoped settings and mission output:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
./.weavetab/
|
|
20
|
+
├── config.json # Project-specific config overrides
|
|
21
|
+
├── secrets.json # Project-scoped credentials for Blind Injection
|
|
22
|
+
├── pdfs/ # Exported PDF documents
|
|
23
|
+
├── screenshots/ # Full-page and clipped PNG/JPEG screenshots
|
|
24
|
+
├── downloads/ # Downloaded files during automated sessions
|
|
25
|
+
├── designs/ # Extracted design tokens and Tailwind themes
|
|
26
|
+
└── logs/ # Human-readable logs and JSONL audit trails
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 2. System Intelligence Directory: `~/.weavetab-system/`
|
|
30
|
+
|
|
31
|
+
Global system directory holding cross-session learning and process locks:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
~/.weavetab-system/
|
|
35
|
+
├── memory/ # Per-domain frontend framework & strategy profiles (selector cache)
|
|
36
|
+
│ └── sites/ # Persistent site profiles: workflows, quirks & reliability scores
|
|
37
|
+
├── sessions/
|
|
38
|
+
│ └── context.json # Rolling 50-action trail for loop detection
|
|
39
|
+
├── apps/ # Dedicated user profiles for Electron apps
|
|
40
|
+
├── locks/ # Process lockfiles (PID + TCP port validation)
|
|
41
|
+
└── knowledge/ # Domain-specific markdown knowledge hints
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 3. Global User Directory: `~/.weavetab/`
|
|
45
|
+
|
|
46
|
+
Global user directory storing default configurations and global secrets:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
~/.weavetab/
|
|
50
|
+
├── config.json # Global default configuration
|
|
51
|
+
├── secrets.json # Global secrets for Blind Injection
|
|
52
|
+
├── policy.json # Domain whitelist / blacklist rules
|
|
53
|
+
├── plugins/ # Isolated storage directories for installed plugins
|
|
54
|
+
└── profile/ # Dedicated default Chromium browser profile
|
|
55
|
+
```
|
|
@@ -1,162 +1,217 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Desktop & Electron Apps"
|
|
3
|
-
description: "Native Layer 0 automation for VS Code, Discord, Figma, Slack, and any Electron app."
|
|
4
|
-
product: mcp
|
|
5
|
-
section: desktop-automation
|
|
6
|
-
badge: new
|
|
7
|
-
icon: AppWindow
|
|
8
|
-
slug: electron-apps
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Desktop & Electron Application Automation
|
|
12
|
-
|
|
13
|
-
Weavetab is a **universal Layer 0 agent runtime**. In addition to standard Chromium web browsing, Weavetab gives AI agents direct, native CDP control over **any desktop Electron application** — including Discord, VS Code, Figma, Slack, Obsidian, Postman, Notion, Spotify, and custom internal tools.
|
|
14
|
-
|
|
15
|
-
## How It Works
|
|
16
|
-
|
|
17
|
-
Because modern desktop applications are built on the Chromium/Electron framework, Weavetab can communicate with them directly over CDP WebSocket without requiring separate drivers or UI automation bridges.
|
|
18
|
-
|
|
19
|
-
```text
|
|
20
|
-
AI Agent (MCP) ──► withSecurity()
|
|
21
|
-
├── (Default) ─────────► CDP:9222 ──► Google Chrome / Chromium
|
|
22
|
-
├── (app: "discord") ──► CDP:9223 ──► Discord Desktop
|
|
23
|
-
├── (app: "figma") ──► CDP:9224 ──► Figma Desktop
|
|
24
|
-
└── (app: "vscode") ──► CDP:9225 ──► VS Code Desktop
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Dual-Port Concurrency & Multi-Target Sessions
|
|
28
|
-
- **Concurrent Execution**: Web browser sessions and Electron desktop app sessions run side-by-side on independent CDP ports (e.g. port `9222` for Chrome, `9223` for Discord, `9224` for Figma).
|
|
29
|
-
- **Zero Session Clobbering**: Switching between a browser tab and a desktop app does not close, disconnect, or reload either target.
|
|
30
|
-
- **Unified Tool Interface**: Pass `"app": "<appName>"` to any Weavetab tool to target that desktop application. Omit `app` to target the active web browser.
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Interactive App Configurator & Agent Generator
|
|
35
|
-
|
|
36
|
-
Use the interactive configurator below to customize your desktop applications. Select presets or add custom apps, toggle between executable path strings, remote debug ports, or advanced objects, and copy the ready-to-use JSON or an automated setup prompt for your AI coding agent:
|
|
37
|
-
|
|
38
|
-
```electron-configurator
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## 1. Configuring Desktop Apps in `config.json`
|
|
44
|
-
|
|
45
|
-
Add an `"electron"` object to your local `./.weavetab/config.json` or global `~/.weavetab/config.json`:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"electron": {
|
|
50
|
-
"discord": "C:\\Users\\username\\AppData\\Local\\Discord\\app
|
|
51
|
-
"vscode": 9222,
|
|
52
|
-
"figma": {
|
|
53
|
-
"path": "C:\\Users\\username\\AppData\\Local\\Figma\\Figma.exe",
|
|
54
|
-
"port": 9224,
|
|
55
|
-
"url": "https://www.figma.com",
|
|
56
|
-
"args": ["--enable-features=WebRTCPipeWireCapturer"]
|
|
57
|
-
},
|
|
58
|
-
"slack": "/Applications/Slack.app/Contents/MacOS/Slack",
|
|
59
|
-
"obsidian": "/usr/bin/obsidian"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Configuration Formats Supported
|
|
65
|
-
|
|
66
|
-
| Format | Example | Description |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| **Executable Path String** | `"discord": "C:\\path\\to\\Discord.exe"` | Automatically launches the binary on an isolated port and dedicated profile. |
|
|
69
|
-
| **Port Number** | `"vscode": 9222` | Attaches directly to an already-running instance started with `--remote-debugging-port=9222`. |
|
|
70
|
-
| **Full Configuration Object** | `"figma": { "path": "...", "port": 9224, "url": "..." }` | Custom control over binary path, debug port, initial launch URL, custom profile directory, and startup CLI args. |
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 2. Security & Profile Isolation
|
|
75
|
-
|
|
76
|
-
Weavetab enforces enterprise-grade sandbox separation for all desktop applications:
|
|
77
|
-
|
|
78
|
-
1. **Dedicated User Profiles**: Automated sessions are assigned isolated data profiles under `~/.weavetab-system/apps/<appName>/`.
|
|
79
|
-
2. **Real AppData Protection**: Weavetab strictly enforces `assertNotRealElectronProfile` — attempting to target your primary OS user data directories (`%APPDATA%`, `~/Library/Application Support`, or `~/.config`) is blocked to protect your personal logins and local databases from accidental automation corruption.
|
|
80
|
-
3. **Lock & Mutex Isolation**: Dedicated lockfiles (`~/.weavetab-system/locks/<appName>.lock`) ensure concurrent agent operations never conflict.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 3. Supported Desktop Schemes & Protocols
|
|
85
|
-
|
|
86
|
-
Weavetab automatically allows and whitelist-bypasses desktop internal protocols:
|
|
87
|
-
- `app://` (Electron internal resources)
|
|
88
|
-
- `vscode-webview://` / `vscode-file://` (VS Code extensions and webviews)
|
|
89
|
-
- `discord://` / `slack://` (Deep-links)
|
|
90
|
-
- `devtools://` / `chrome://` / `about:`
|
|
91
|
-
- `file:///` (Local files)
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## 4. How Agents Interact with Desktop Apps
|
|
96
|
-
|
|
97
|
-
To target an Electron application, simply pass the `app` argument to any Weavetab tool:
|
|
98
|
-
|
|
99
|
-
### A. Inspect Desktop DOM Tree
|
|
100
|
-
```json
|
|
101
|
-
{
|
|
102
|
-
"name": "browser_map",
|
|
103
|
-
"arguments": {
|
|
104
|
-
"app": "discord",
|
|
105
|
-
"scope": "main_content"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### B. Click & Type in Desktop Apps
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"name": "browser_click",
|
|
114
|
-
"arguments": {
|
|
115
|
-
"ref": "w:42",
|
|
116
|
-
"app": "discord"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"name": "browser_type",
|
|
124
|
-
"arguments": {
|
|
125
|
-
"ref": "w:45",
|
|
126
|
-
"text": "Automated build passed successfully! 🚀",
|
|
127
|
-
"app": "discord"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### C. Multi-Target Burst Orchestration
|
|
133
|
-
```json
|
|
134
|
-
{
|
|
135
|
-
"name": "browser_burst",
|
|
136
|
-
"arguments": {
|
|
137
|
-
"app": "vscode",
|
|
138
|
-
"steps": [
|
|
139
|
-
{ "action": "click_and_wait", "selector": ".monaco-editor" },
|
|
140
|
-
{ "action": "type_and_send", "text": "npm test" }
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 5. Launching Existing Desktop Apps in Debug Mode
|
|
149
|
-
|
|
150
|
-
If you prefer to attach Weavetab to your existing desktop app instance:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
# Launch VS Code with CDP debugging enabled
|
|
154
|
-
code --remote-debugging-port=9222
|
|
155
|
-
|
|
156
|
-
# Launch Obsidian with CDP debugging enabled
|
|
157
|
-
obsidian --remote-debugging-port=9225
|
|
158
|
-
|
|
159
|
-
# Launch Discord with CDP debugging enabled
|
|
160
|
-
discord --remote-debugging-port=9223
|
|
161
|
-
```
|
|
162
|
-
Then in your `config.json`, simply map `"vscode": 9222` or `"obsidian": 9225`.
|
|
1
|
+
---
|
|
2
|
+
title: "Desktop & Electron Apps"
|
|
3
|
+
description: "Native Layer 0 automation for VS Code, Discord, Figma, Slack, and any Electron app."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: desktop-automation
|
|
6
|
+
badge: new
|
|
7
|
+
icon: AppWindow
|
|
8
|
+
slug: electron-apps
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Desktop & Electron Application Automation
|
|
12
|
+
|
|
13
|
+
Weavetab is a **universal Layer 0 agent runtime**. In addition to standard Chromium web browsing, Weavetab gives AI agents direct, native CDP control over **any desktop Electron application** — including Discord, VS Code, Figma, Slack, Obsidian, Postman, Notion, Spotify, and custom internal tools.
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
Because modern desktop applications are built on the Chromium/Electron framework, Weavetab can communicate with them directly over CDP WebSocket without requiring separate drivers or UI automation bridges.
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
AI Agent (MCP) ──► withSecurity()
|
|
21
|
+
├── (Default) ─────────► CDP:9222 ──► Google Chrome / Chromium
|
|
22
|
+
├── (app: "discord") ──► CDP:9223 ──► Discord Desktop
|
|
23
|
+
├── (app: "figma") ──► CDP:9224 ──► Figma Desktop
|
|
24
|
+
└── (app: "vscode") ──► CDP:9225 ──► VS Code Desktop
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Dual-Port Concurrency & Multi-Target Sessions
|
|
28
|
+
- **Concurrent Execution**: Web browser sessions and Electron desktop app sessions run side-by-side on independent CDP ports (e.g. port `9222` for Chrome, `9223` for Discord, `9224` for Figma).
|
|
29
|
+
- **Zero Session Clobbering**: Switching between a browser tab and a desktop app does not close, disconnect, or reload either target.
|
|
30
|
+
- **Unified Tool Interface**: Pass `"app": "<appName>"` to any Weavetab tool to target that desktop application. Omit `app` to target the active web browser.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Interactive App Configurator & Agent Generator
|
|
35
|
+
|
|
36
|
+
Use the interactive configurator below to customize your desktop applications. Select presets or add custom apps, toggle between executable path strings, remote debug ports, or advanced objects, and copy the ready-to-use JSON or an automated setup prompt for your AI coding agent:
|
|
37
|
+
|
|
38
|
+
```electron-configurator
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 1. Configuring Desktop Apps in `config.json`
|
|
44
|
+
|
|
45
|
+
Add an `"electron"` object to your local `./.weavetab/config.json` or global `~/.weavetab/config.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"electron": {
|
|
50
|
+
"discord": "C:\\Users\\username\\AppData\\Local\\Discord\\app-<version>\\Discord.exe",
|
|
51
|
+
"vscode": 9222,
|
|
52
|
+
"figma": {
|
|
53
|
+
"path": "C:\\Users\\username\\AppData\\Local\\Figma\\Figma.exe",
|
|
54
|
+
"port": 9224,
|
|
55
|
+
"url": "https://www.figma.com",
|
|
56
|
+
"args": ["--enable-features=WebRTCPipeWireCapturer"]
|
|
57
|
+
},
|
|
58
|
+
"slack": "/Applications/Slack.app/Contents/MacOS/Slack",
|
|
59
|
+
"obsidian": "/usr/bin/obsidian"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Configuration Formats Supported
|
|
65
|
+
|
|
66
|
+
| Format | Example | Description |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| **Executable Path String** | `"discord": "C:\\path\\to\\Discord.exe"` | Automatically launches the binary on an isolated port and dedicated profile. |
|
|
69
|
+
| **Port Number** | `"vscode": 9222` | Attaches directly to an already-running instance started with `--remote-debugging-port=9222`. |
|
|
70
|
+
| **Full Configuration Object** | `"figma": { "path": "...", "port": 9224, "url": "..." }` | Custom control over binary path, debug port, initial launch URL, custom profile directory, and startup CLI args. |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 2. Security & Profile Isolation
|
|
75
|
+
|
|
76
|
+
Weavetab enforces enterprise-grade sandbox separation for all desktop applications:
|
|
77
|
+
|
|
78
|
+
1. **Dedicated User Profiles**: Automated sessions are assigned isolated data profiles under `~/.weavetab-system/apps/<appName>/`.
|
|
79
|
+
2. **Real AppData Protection**: Weavetab strictly enforces `assertNotRealElectronProfile` — attempting to target your primary OS user data directories (`%APPDATA%`, `~/Library/Application Support`, or `~/.config`) is blocked to protect your personal logins and local databases from accidental automation corruption.
|
|
80
|
+
3. **Lock & Mutex Isolation**: Dedicated lockfiles (`~/.weavetab-system/locks/<appName>.lock`) ensure concurrent agent operations never conflict.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 3. Supported Desktop Schemes & Protocols
|
|
85
|
+
|
|
86
|
+
Weavetab automatically allows and whitelist-bypasses desktop internal protocols:
|
|
87
|
+
- `app://` (Electron internal resources)
|
|
88
|
+
- `vscode-webview://` / `vscode-file://` (VS Code extensions and webviews)
|
|
89
|
+
- `discord://` / `slack://` (Deep-links)
|
|
90
|
+
- `devtools://` / `chrome://` / `about:`
|
|
91
|
+
- `file:///` (Local files)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 4. How Agents Interact with Desktop Apps
|
|
96
|
+
|
|
97
|
+
To target an Electron application, simply pass the `app` argument to any Weavetab tool:
|
|
98
|
+
|
|
99
|
+
### A. Inspect Desktop DOM Tree
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"name": "browser_map",
|
|
103
|
+
"arguments": {
|
|
104
|
+
"app": "discord",
|
|
105
|
+
"scope": "main_content"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### B. Click & Type in Desktop Apps
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"name": "browser_click",
|
|
114
|
+
"arguments": {
|
|
115
|
+
"ref": "w:42",
|
|
116
|
+
"app": "discord"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"name": "browser_type",
|
|
124
|
+
"arguments": {
|
|
125
|
+
"ref": "w:45",
|
|
126
|
+
"text": "Automated build passed successfully! 🚀",
|
|
127
|
+
"app": "discord"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### C. Multi-Target Burst Orchestration
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"name": "browser_burst",
|
|
136
|
+
"arguments": {
|
|
137
|
+
"app": "vscode",
|
|
138
|
+
"steps": [
|
|
139
|
+
{ "action": "click_and_wait", "selector": ".monaco-editor" },
|
|
140
|
+
{ "action": "type_and_send", "text": "npm test" }
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 5. Launching Existing Desktop Apps in Debug Mode
|
|
149
|
+
|
|
150
|
+
If you prefer to attach Weavetab to your existing desktop app instance:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Launch VS Code with CDP debugging enabled
|
|
154
|
+
code --remote-debugging-port=9222
|
|
155
|
+
|
|
156
|
+
# Launch Obsidian with CDP debugging enabled
|
|
157
|
+
obsidian --remote-debugging-port=9225
|
|
158
|
+
|
|
159
|
+
# Launch Discord with CDP debugging enabled
|
|
160
|
+
discord --remote-debugging-port=9223
|
|
161
|
+
```
|
|
162
|
+
Then in your `config.json`, simply map `"vscode": 9222` or `"obsidian": 9225`.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 6. Environment Discovery Handshake (`browser_detect`)
|
|
167
|
+
|
|
168
|
+
`browser_detect` is the foundational tool agents invoke upon initial engagement. It inspects local browsers and configured desktop applications, returning their real-time state:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"available": [
|
|
173
|
+
{ "engine": "chromium", "name": "Google Chrome", "path": "C:\\Program Files\\...\\chrome.exe" }
|
|
174
|
+
],
|
|
175
|
+
"current": "chromium",
|
|
176
|
+
"configuredApps": [
|
|
177
|
+
{
|
|
178
|
+
"name": "discord",
|
|
179
|
+
"status": "running_no_debug",
|
|
180
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Discord\\app-1.0.9256\\Discord.exe"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "slack",
|
|
184
|
+
"status": "connected",
|
|
185
|
+
"port": 9222,
|
|
186
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\slack\\app-4.38.125\\slack.exe",
|
|
187
|
+
"activeTabs": [
|
|
188
|
+
{ "id": "PAGE_1", "title": "general - Slack", "url": "https://app.slack.com/client/..." }
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "vscode",
|
|
193
|
+
"status": "offline",
|
|
194
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Application Lifecycle States:
|
|
201
|
+
- **`connected`**: The app is running with CDP remote debugging active and Weavetab is attached. Agents can immediately operate tabs/windows using `"app": "<name>"`.
|
|
202
|
+
- **`running_no_debug`**: The app process is currently running on the OS, but was opened by the user without `--remote-debugging-port`. Weavetab alerts the agent that DOM interactions are blocked until the app is launched or restarted with debugging flags.
|
|
203
|
+
- **`offline`**: The process is not running. Calling `browser_navigate(app: "<name>")` launches and connects the app automatically.
|
|
204
|
+
|
|
205
|
+
### Windows Squirrel Auto-Path Resolution:
|
|
206
|
+
On Windows, applications like Discord and Slack install inside versioned folders (e.g. `Discord\app-1.0.9256\Discord.exe`) that change on every background update. Weavetab dynamically resolves the newest `app-1.0.xxxx` version at launch time, eliminating broken path errors after silent background updates.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 7. Smart Domain Routing & Sticky Context
|
|
211
|
+
|
|
212
|
+
To ensure external AI agents do not accidentally trigger a web browser launch when intending to control an Electron application:
|
|
213
|
+
|
|
214
|
+
1. **Automatic Domain Routing**: When `browser_navigate` or `browser_tabs(action: "open")` receives an app domain (e.g. `discord.com`, `slack.com`, `linear.app`, `notion.so`), Weavetab automatically routes the target to the configured desktop application.
|
|
215
|
+
2. **Sticky App Sessions**: When an agent operates inside an Electron app, the target session context remains sticky. Subsequent calls to `browser_tabs` or DOM tools stick to that active desktop app without spawning an unwanted Chrome window.
|
|
216
|
+
3. **Explicit Browser Targeting**: When the agent specifically intends to use the web browser, passing `"app": "browser"` overrides desktop routing and directs operations to the web browser.
|
|
217
|
+
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Introduction"
|
|
3
|
-
description: "What Weavetab is, Layer 0 CDP architecture, and design tenets."
|
|
4
|
-
product: mcp
|
|
5
|
-
section: get-started
|
|
6
|
-
icon: BookOpen
|
|
7
|
-
slug: introduction
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Introduction
|
|
11
|
-
|
|
12
|
-
Weavetab is a production-grade, local **Model Context Protocol (MCP) server** that grants AI agents human-like control over Chromium browsers and native **Electron desktop applications** (VS Code, Discord, Slack, Figma, Obsidian, Postman, Antigravity IDE, etc.) — communicating directly over the **Chrome DevTools Protocol (CDP)** at Layer 0.
|
|
13
|
-
|
|
14
|
-
No WebDriver. No browser binary downloads. No Playwright or Puppeteer abstraction layer. No cloud dependency. Tool invocations resolve in **3–8 ms** of mean latency.
|
|
15
|
-
|
|
16
|
-
## Synchronized Ecosystem Releases
|
|
17
|
-
|
|
18
|
-
Both **`@weavetab/mcp`** and the **`@weavetab/sdk`** share synchronized release lines. Every capability introduced in the core runtime is immediately available in the developer SDK with 100% type safety and zero version mismatch.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Install core Weavetab MCP server globally
|
|
22
|
-
npm install -g @weavetab/mcp@latest
|
|
23
|
-
|
|
24
|
-
# Or run directly via npx
|
|
25
|
-
npx -y @weavetab/mcp@latest
|
|
26
|
-
|
|
27
|
-
# Install Weavetab Developer SDK as a dev dependency
|
|
28
|
-
npm install -D @weavetab/sdk@latest
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Design Tenets
|
|
32
|
-
|
|
33
|
-
| Tenet | Implementation |
|
|
34
|
-
|---|---|
|
|
35
|
-
| **Ultra-Low Latency** | Sub-10 ms tool execution via direct CDP WebSocket connections |
|
|
36
|
-
| **Universal Control** | Native orchestration across Chromium web tabs and any Electron desktop app |
|
|
37
|
-
| **Autonomous CAPTCHA** | Zero-API solving (Cloudflare Turnstile, GeeTest, reCAPTCHA) via human Bézier mouse physics |
|
|
38
|
-
| **Security & RBAC** | 4-tier RBAC + domain policies + Blind Credential Injection + profile isolation |
|
|
39
|
-
| **Token Efficiency** | Semantic Delta diffing (up to 97% reduction) + intelligent DOM pruning |
|
|
40
|
-
| **Stealth & Physics** | Ghost Cursor (Bézier curves), human typing jitter, and CDP early-script fingerprint spoofing |
|
|
41
|
-
| **Self-Learning** | Per-domain session memory, framework detection, and automated loop recovery |
|
|
42
|
-
| **Zero Cloud** | Pure local computation. No external telemetry or cloud tracking unless explicitly opted in |
|
|
43
|
-
|
|
44
|
-
## What You Get
|
|
45
|
-
|
|
46
|
-
- **
|
|
47
|
-
- **Universal Desktop App Runtime** —
|
|
48
|
-
- **Autonomous Zero-API CAPTCHA Solver** — solve Cloudflare Turnstile, GeeTest, and reCAPTCHA locally via CDP mouse physics with $0 API costs
|
|
49
|
-
- **Two transport modes** — stdio (Claude Desktop, Cursor, VS Code, Windsurf, Antigravity) and WebSocket (`--ws --port 3000`)
|
|
50
|
-
- **Four RBAC roles** — `admin`, `operator`, `viewer`, and `automation`
|
|
51
|
-
- **Per-domain policies** — ring-fences sensitive banking, internal, and production surfaces
|
|
52
|
-
- **Blind Injection** — credentials resolved server-side from `secrets.json` and never exposed to the LLM
|
|
53
|
-
- **Extensible Plugin System** — auto-discovers and mounts custom MCP tools from `node_modules`
|
|
54
|
-
|
|
55
|
-
## Next Steps
|
|
56
|
-
|
|
57
|
-
- **[Quickstart](
|
|
58
|
-
- **[Desktop & Electron Apps](/
|
|
59
|
-
- **[Autonomous CAPTCHA Solver](/
|
|
60
|
-
- **[MCP Tools Reference](/
|
|
1
|
+
---
|
|
2
|
+
title: "Introduction"
|
|
3
|
+
description: "What Weavetab is, Layer 0 CDP architecture, and design tenets."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: get-started
|
|
6
|
+
icon: BookOpen
|
|
7
|
+
slug: introduction
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Introduction
|
|
11
|
+
|
|
12
|
+
Weavetab is a production-grade, local **Model Context Protocol (MCP) server** that grants AI agents human-like control over Chromium browsers and native **Electron desktop applications** (VS Code, Discord, Slack, Figma, Obsidian, Postman, Antigravity IDE, etc.) — communicating directly over the **Chrome DevTools Protocol (CDP)** at Layer 0.
|
|
13
|
+
|
|
14
|
+
No WebDriver. No browser binary downloads. No Playwright or Puppeteer abstraction layer. No cloud dependency. Tool invocations resolve in **3–8 ms** of mean latency.
|
|
15
|
+
|
|
16
|
+
## Synchronized Ecosystem Releases
|
|
17
|
+
|
|
18
|
+
Both **`@weavetab/mcp`** and the **`@weavetab/sdk`** share synchronized release lines. Every capability introduced in the core runtime is immediately available in the developer SDK with 100% type safety and zero version mismatch.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Install core Weavetab MCP server globally
|
|
22
|
+
npm install -g @weavetab/mcp@latest
|
|
23
|
+
|
|
24
|
+
# Or run directly via npx
|
|
25
|
+
npx -y @weavetab/mcp@latest
|
|
26
|
+
|
|
27
|
+
# Install Weavetab Developer SDK as a dev dependency
|
|
28
|
+
npm install -D @weavetab/sdk@latest
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Design Tenets
|
|
32
|
+
|
|
33
|
+
| Tenet | Implementation |
|
|
34
|
+
|---|---|
|
|
35
|
+
| **Ultra-Low Latency** | Sub-10 ms tool execution via direct CDP WebSocket connections |
|
|
36
|
+
| **Universal Control** | Native orchestration across Chromium web tabs and any Electron desktop app |
|
|
37
|
+
| **Autonomous CAPTCHA** | Zero-API solving (Cloudflare Turnstile, GeeTest, reCAPTCHA) via human Bézier mouse physics |
|
|
38
|
+
| **Security & RBAC** | 4-tier RBAC + domain policies + Blind Credential Injection + profile isolation |
|
|
39
|
+
| **Token Efficiency** | Semantic Delta diffing (up to 97% reduction) + intelligent DOM pruning |
|
|
40
|
+
| **Stealth & Physics** | Ghost Cursor (Bézier curves), human typing jitter, and CDP early-script fingerprint spoofing |
|
|
41
|
+
| **Self-Learning** | Per-domain session memory, framework detection, and automated loop recovery |
|
|
42
|
+
| **Zero Cloud** | Pure local computation. No external telemetry or cloud tracking unless explicitly opted in |
|
|
43
|
+
|
|
44
|
+
## What You Get
|
|
45
|
+
|
|
46
|
+
- **49 built-in MCP tools** covering DOM vision, input synthesis, desktop apps, tabs, network interception, office files, design extraction, and plugin lifecycle
|
|
47
|
+
- **Universal Desktop App Runtime** — control Chrome and native Electron apps (Discord, Figma, VS Code) side-by-side without port conflicts
|
|
48
|
+
- **Autonomous Zero-API CAPTCHA Solver** — solve Cloudflare Turnstile, GeeTest, and reCAPTCHA locally via CDP mouse physics with $0 API costs
|
|
49
|
+
- **Two transport modes** — stdio (Claude Desktop, Cursor, VS Code, Windsurf, Antigravity) and WebSocket (`--ws --port 3000`)
|
|
50
|
+
- **Four RBAC roles** — `admin`, `operator`, `viewer`, and `automation`
|
|
51
|
+
- **Per-domain policies** — ring-fences sensitive banking, internal, and production surfaces
|
|
52
|
+
- **Blind Injection** — credentials resolved server-side from `secrets.json` and never exposed to the LLM
|
|
53
|
+
- **Extensible Plugin System** — auto-discovers and mounts custom MCP tools from `node_modules`
|
|
54
|
+
|
|
55
|
+
## Next Steps
|
|
56
|
+
|
|
57
|
+
- **[Quickstart](quickstart.md)** — install and run a first mission in 60 seconds
|
|
58
|
+
- **[Desktop & Electron Apps](../desktop-automation/electron-apps.md)** — configure and control desktop apps
|
|
59
|
+
- **[Autonomous CAPTCHA Solver](../captcha-stealth/captcha-solver.md)** — zero-API anti-bot solving
|
|
60
|
+
- **[MCP Tools Reference](../tools/tools.md)** — full reference for all 49 built-in automation tools
|