@weavetab/mcp 2.5.0-beta.1 → 2.5.0-beta.2
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 -0
- package/LICENSE +2 -2
- package/README.md +208 -43
- package/SECURITY.md +3 -3
- package/TROUBLESHOOTING.md +1 -1
- package/dist/cdp/bridge.d.ts +10 -0
- package/dist/cdp/bridge.js +284 -78
- package/dist/cdp/connector.d.ts +5 -3
- package/dist/cdp/connector.js +188 -71
- package/dist/cdp/lock.d.ts +9 -6
- package/dist/cdp/lock.js +72 -59
- package/dist/cdp/omni_broker.d.ts +1 -0
- package/dist/cdp/omni_broker.js +12 -6
- package/dist/cdp/profiles.d.ts +10 -0
- package/dist/cdp/profiles.js +65 -0
- package/dist/cdp/walker.js +50 -0
- package/dist/cli/plugin.d.ts +0 -2
- package/dist/cli/plugin.js +31 -683
- package/dist/cli/updater.js +2 -2
- package/dist/config/loader.d.ts +25 -6
- package/dist/config/loader.js +133 -20
- package/dist/index.js +48 -52
- package/dist/overlay/ghost.js +2 -2
- package/dist/overlay/injector.js +1 -3
- package/dist/plugin/extension_bridge.d.ts +40 -0
- package/dist/plugin/extension_bridge.js +158 -0
- package/dist/plugin/interface.d.ts +78 -16
- package/dist/plugin/loader.d.ts +4 -0
- package/dist/plugin/loader.js +178 -57
- package/dist/plugin/registry.js +11 -1
- package/dist/plugin/storage.d.ts +51 -0
- package/dist/plugin/storage.js +164 -0
- package/dist/server.js +213 -121
- package/dist/state/session.d.ts +2 -2
- package/dist/state/session.js +33 -13
- package/dist/tools/browser_detect.d.ts +2 -1
- package/dist/tools/browser_detect.js +6 -3
- package/dist/tools/burst.d.ts +1 -0
- package/dist/tools/burst.js +4 -6
- package/dist/tools/click.js +23 -28
- package/dist/tools/clipboard.js +31 -24
- package/dist/tools/navigate.d.ts +1 -1
- package/dist/tools/navigate.js +28 -10
- package/dist/tools/tabs.d.ts +10 -10
- package/dist/tools/tabs.js +47 -39
- package/dist/tools/type.js +2 -2
- package/docs/DOCUMENTATION.md +63 -6
- package/docs/architecture/blind-injection.md +20 -0
- package/docs/architecture/dual-injection.md +32 -0
- package/docs/architecture/overview.md +49 -0
- package/docs/architecture/security.md +35 -0
- package/docs/architecture/transport.md +37 -0
- package/docs/captcha-stealth/captcha-solver.md +75 -0
- package/docs/captcha-stealth/stealth-physics.md +60 -0
- package/docs/cli/cli-commands.md +44 -0
- package/docs/cli/cli-flags.md +20 -0
- package/docs/cli/cli-introduction.md +20 -0
- package/docs/cli/cli-scripting.md +32 -0
- package/docs/cli/g-ide/ide-antigravity.md +24 -0
- package/docs/cli/g-ide/ide-claude-code.md +24 -0
- package/docs/cli/g-ide/ide-claude-desktop.md +32 -0
- package/docs/cli/g-ide/ide-cursor.md +31 -0
- package/docs/cli/g-ide/ide-generic.md +34 -0
- package/docs/cli/g-ide/ide-opencode.md +24 -0
- package/docs/cli/g-ide/ide-vscode-copilot.md +24 -0
- package/docs/cli/g-ide/ide-windsurf.md +24 -0
- package/docs/configuration/config-locations.md +24 -0
- package/docs/configuration/configuration.md +73 -0
- package/docs/configuration/env-variables.md +19 -0
- package/docs/configuration/folders.md +54 -0
- package/docs/desktop-automation/electron-apps.md +162 -0
- package/docs/get-started/installation.md +47 -0
- package/docs/get-started/introduction.md +60 -0
- package/docs/get-started/quickstart.md +54 -0
- package/docs/get-started/setup-wizard.md +26 -0
- package/docs/skills-ecosystem/skills-overview.md +35 -0
- package/docs/skills-ecosystem/skills-recipes.md +36 -0
- package/docs/tools/tools.md +293 -0
- package/docs/troubleshooting/trouble-browser.md +27 -0
- package/docs/troubleshooting/trouble-config.md +20 -0
- package/docs/troubleshooting/trouble-loop.md +31 -0
- package/ext-dist/content.js +0 -1
- package/mcp.json +8 -6
- package/package.json +11 -5
- package/server.json +3 -3
- package/docs/DEV_MODE.md +0 -68
- package/docs/PLUGINS.md +0 -538
- package/docs/TOOLS.md +0 -104
- package/docs/dev_plugin.md +0 -310
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Commands"
|
|
3
|
+
description: "Reference for every top-level subcommand."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
icon: ListTree
|
|
7
|
+
slug: cli-commands
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Commands
|
|
11
|
+
|
|
12
|
+
## Server Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `weavetab` | Start the MCP server (stdio mode — default for MCP clients). When run in a TTY without arguments, launches the interactive UI menu. |
|
|
17
|
+
| `weavetab config` | Launch the 5-phase interactive configuration wizard. |
|
|
18
|
+
| `weavetab view` | Display the current active configuration report. Press **[R]** to view raw JSON, **[Q]** to quit. |
|
|
19
|
+
| `weavetab reset` | Purge browser profiles, lockfiles, mutexes, session registries, and kill orphan browser processes. Accepts `--yes`/`-y` to skip confirmation prompts. |
|
|
20
|
+
| `weavetab reload-ext` | Send a reload signal to the Weavetab browser extension via CDP `Runtime.evaluate`. |
|
|
21
|
+
| `weavetab help` / `--help` | Show full CLI help message with all commands, flags, and environment variables. |
|
|
22
|
+
|
|
23
|
+
## Secrets Management
|
|
24
|
+
|
|
25
|
+
Credentials are stored in `~/.weavetab/secrets.json` (global) or `.weavetab/secrets.json` (project-scoped). Values are never echoed to the terminal.
|
|
26
|
+
|
|
27
|
+
| Command | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `weavetab secrets set <KEY>` | Store a new encrypted secret. Prompts for value (hidden input) and allowed domains (comma-separated). |
|
|
30
|
+
| `weavetab secrets list` | List all stored secrets (key names only, values hidden). Shows domains and last-updated timestamps. |
|
|
31
|
+
| `weavetab secrets rm <KEY>` | Remove a secret by key name. |
|
|
32
|
+
| `weavetab secrets init --project` | Initialize a project-scoped `.weavetab/secrets.json` file. |
|
|
33
|
+
|
|
34
|
+
## Interactive TTY Menu
|
|
35
|
+
|
|
36
|
+
When run without arguments in a TTY terminal, Weavetab opens an interactive keyboard-driven menu:
|
|
37
|
+
|
|
38
|
+
| Key | Action |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `[C]` | Launch the configuration wizard |
|
|
41
|
+
| `[V]` | View current active configuration |
|
|
42
|
+
| `[R]` | Purge browser profiles and lockfiles |
|
|
43
|
+
| `[H]` | Show help information |
|
|
44
|
+
| `[Q]` | Exit Weavetab |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Flags"
|
|
3
|
+
description: "Global flags accepted by the server."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
icon: Flag
|
|
7
|
+
slug: cli-flags
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Flags
|
|
11
|
+
|
|
12
|
+
| Flag | Type | Description |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| `--version` | boolean | Print CLI version and exit |
|
|
15
|
+
| `--help` / `-h` | boolean | Show help message and exit |
|
|
16
|
+
| `--ws` | boolean | Start server in WebSocket mode instead of stdio |
|
|
17
|
+
| `--port <port>` | number | Port for WebSocket server (default `3000`) |
|
|
18
|
+
| `--headless` | boolean | Run browser in headless mode |
|
|
19
|
+
| `--role <role>` | enum | Override RBAC role (`admin`, `operator`, `viewer`, `automation`) |
|
|
20
|
+
| `--yes` / `-y` | boolean | Skip confirmation prompt when running `weavetab reset` |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Introduction"
|
|
3
|
+
description: "Drive Weavetab from the command line — no client required."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
icon: Terminal
|
|
7
|
+
slug: cli-introduction
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CLI Reference
|
|
11
|
+
|
|
12
|
+
The `weavetab` binary provides server management, secrets handling, diagnostics, and interactive terminal menus.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
weavetab # Start the MCP server (stdio mode)
|
|
16
|
+
weavetab config # Interactive configuration wizard
|
|
17
|
+
weavetab view # Inspect active configuration
|
|
18
|
+
weavetab reset # Purge profiles, lockfiles, and stale sessions
|
|
19
|
+
weavetab help # Command index
|
|
20
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Scripting & CI/CD"
|
|
3
|
+
description: "Chain CLI calls in shell scripts and CI."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
icon: FileCode
|
|
7
|
+
slug: cli-scripting
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Scripting & CI/CD
|
|
11
|
+
|
|
12
|
+
## Shell Scripting
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Reset before a fresh test run
|
|
16
|
+
weavetab reset --yes
|
|
17
|
+
|
|
18
|
+
# List stored secrets
|
|
19
|
+
weavetab secrets list
|
|
20
|
+
|
|
21
|
+
# Start the MCP server in WebSocket mode for custom scripts
|
|
22
|
+
weavetab --ws --port 3000 --headless &
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## CI/CD Pipeline
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# In GitHub Actions or Docker CI
|
|
29
|
+
npm install -g @weavetab/mcp
|
|
30
|
+
weavetab reset --yes
|
|
31
|
+
weavetab --ws --port 3000 --headless &
|
|
32
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Antigravity IDE"
|
|
3
|
+
description: "Configure Weavetab for Google Antigravity IDE."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Rocket
|
|
8
|
+
slug: ide-antigravity
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Antigravity IDE Integration
|
|
12
|
+
|
|
13
|
+
Add to `~/.antigravity/mcp.json` or workspace `mcp.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"weavetab": {
|
|
19
|
+
"command": "weavetab",
|
|
20
|
+
"args": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Claude Code"
|
|
3
|
+
description: "Configure Weavetab for Claude Code CLI agent."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: MessageSquare
|
|
8
|
+
slug: ide-claude-code
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Claude Code Integration
|
|
12
|
+
|
|
13
|
+
Add to project `.claude/settings.json` or global configuration:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"weavetab": {
|
|
19
|
+
"command": "weavetab",
|
|
20
|
+
"args": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Claude Desktop"
|
|
3
|
+
description: "Configure Weavetab as an MCP server for Claude Desktop."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Bot
|
|
8
|
+
slug: ide-claude-desktop
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Claude Desktop Integration
|
|
12
|
+
|
|
13
|
+
## Config File Location
|
|
14
|
+
|
|
15
|
+
| OS | Path |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **macOS** | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
18
|
+
| **Windows** | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
19
|
+
| **Linux** | `~/.config/Claude/claude_desktop_config.json` |
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"weavetab": {
|
|
27
|
+
"command": "weavetab",
|
|
28
|
+
"args": []
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Cursor"
|
|
3
|
+
description: "Configure Weavetab as an MCP server for Cursor IDE."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: MousePointer2
|
|
8
|
+
slug: ide-cursor
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Cursor Integration
|
|
12
|
+
|
|
13
|
+
## Config File Location
|
|
14
|
+
|
|
15
|
+
| Scope | Path |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **Global** | `~/.cursor/mcp_config.json` |
|
|
18
|
+
| **Project** | `.cursor/mcp.json` (in project root) |
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"weavetab": {
|
|
26
|
+
"command": "weavetab",
|
|
27
|
+
"args": []
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Generic / WebSocket"
|
|
3
|
+
description: "Connect any MCP-compatible client via WebSocket or stdio."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Globe
|
|
8
|
+
slug: ide-generic
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Generic Client Integration
|
|
12
|
+
|
|
13
|
+
Any client speaking MCP JSON-RPC 2.0 can connect to Weavetab.
|
|
14
|
+
|
|
15
|
+
## stdio Transport (Default)
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"weavetab": {
|
|
21
|
+
"command": "weavetab",
|
|
22
|
+
"args": []
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## WebSocket Transport
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
weavetab --ws --port 3000
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Connect your client over WebSocket to `ws://127.0.0.1:3000`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "OpenCode"
|
|
3
|
+
description: "Configure Weavetab for OpenCode CLI agent."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Terminal
|
|
8
|
+
slug: ide-opencode
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# OpenCode Integration
|
|
12
|
+
|
|
13
|
+
Add to `.opencode/config.json` or `opencode.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"weavetab": {
|
|
19
|
+
"command": "weavetab",
|
|
20
|
+
"args": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "VS Code + Copilot"
|
|
3
|
+
description: "Configure Weavetab for VS Code with GitHub Copilot."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Code
|
|
8
|
+
slug: ide-vscode-copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# VS Code + GitHub Copilot Integration
|
|
12
|
+
|
|
13
|
+
Create `.vscode/mcp.json` in your workspace root:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"servers": {
|
|
18
|
+
"weavetab": {
|
|
19
|
+
"command": "weavetab",
|
|
20
|
+
"args": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Windsurf"
|
|
3
|
+
description: "Configure Weavetab as an MCP server for Windsurf IDE."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: cli
|
|
6
|
+
group: g-ide
|
|
7
|
+
icon: Wind
|
|
8
|
+
slug: ide-windsurf
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Windsurf Integration
|
|
12
|
+
|
|
13
|
+
Add to `~/.windsurf/mcp_config.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"weavetab": {
|
|
19
|
+
"command": "weavetab",
|
|
20
|
+
"args": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Locations & Merge"
|
|
3
|
+
description: "Three-tier merge: local → global → built-in defaults."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: configuration
|
|
6
|
+
icon: FolderTree
|
|
7
|
+
slug: config-locations
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Config Locations & Merge Priority
|
|
11
|
+
|
|
12
|
+
## Priority Tiers
|
|
13
|
+
|
|
14
|
+
1. **Local (Project-scoped)** — `./.weavetab/config.json` (takes top priority)
|
|
15
|
+
2. **Global** — `~/.weavetab/config.json`
|
|
16
|
+
3. **Built-in defaults** — defined in `DEFAULT_CONFIG`
|
|
17
|
+
|
|
18
|
+
## Live Reload
|
|
19
|
+
|
|
20
|
+
A debounced file watcher (150 ms) reloads the in-memory configuration on change. In-flight tool executions complete on the existing configuration; subsequent calls automatically pick up the new values.
|
|
21
|
+
|
|
22
|
+
## Corrupt File Quarantine
|
|
23
|
+
|
|
24
|
+
If a configuration file contains invalid JSON, Weavetab automatically quarantines the file to `config.broken.<timestamp>.json` and safely falls back to the next tier without crashing.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Schema"
|
|
3
|
+
description: "Every field on the runtime config object."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: configuration
|
|
6
|
+
icon: Settings2
|
|
7
|
+
slug: configuration
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Configuration Schema
|
|
11
|
+
|
|
12
|
+
The full `Config` interface lives in `src/config/loader.ts`.
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export type PolicyMode = "allow" | "deny" | "audit-only" | "read-only";
|
|
16
|
+
export type Role = "admin" | "operator" | "viewer" | "automation";
|
|
17
|
+
export type BrowserEngine = "chromium" | "firefox" | "webkit";
|
|
18
|
+
|
|
19
|
+
export interface ElectronAppConfig {
|
|
20
|
+
path?: string; // Absolute path to Electron app executable
|
|
21
|
+
port?: number; // Remote debugging port (default 9222)
|
|
22
|
+
url?: string; // Initial launch URL / deep-link
|
|
23
|
+
args?: string[]; // Custom CLI arguments
|
|
24
|
+
profileDir?: string; // Dedicated isolated user profile directory
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Config {
|
|
28
|
+
// Mode & Port
|
|
29
|
+
mode: "session" | "attach";
|
|
30
|
+
session: string;
|
|
31
|
+
attachPort: number;
|
|
32
|
+
|
|
33
|
+
// Browser Settings
|
|
34
|
+
browser: string; // Executable path or "auto"
|
|
35
|
+
browserType: BrowserEngine;
|
|
36
|
+
profileDir: string;
|
|
37
|
+
headless: boolean;
|
|
38
|
+
extension: boolean; // Enable Weavetab Chrome extension
|
|
39
|
+
browserFlags: string[];
|
|
40
|
+
|
|
41
|
+
// Desktop & Electron Applications
|
|
42
|
+
electron?: Record<string, string | number | ElectronAppConfig>;
|
|
43
|
+
|
|
44
|
+
// Security & Policy
|
|
45
|
+
block: string[]; // Domain blocklist
|
|
46
|
+
allow: string[]; // Domain allowlist
|
|
47
|
+
policies: PolicyEntry[]; // Per-domain policy modes
|
|
48
|
+
role: Role; // RBAC role
|
|
49
|
+
cookies: boolean; // Allow storage & cookies
|
|
50
|
+
proxy?: string; // Outbound proxy URL
|
|
51
|
+
|
|
52
|
+
// Rate Limiting & Resource Caps
|
|
53
|
+
maxActionsPerMinute: number; // 1-600 (default 60)
|
|
54
|
+
maxTabs: number; // 1-100 (default 10)
|
|
55
|
+
|
|
56
|
+
// Timing & Thresholds
|
|
57
|
+
sessionTimeout: number; // Seconds (default 3600)
|
|
58
|
+
navigationTimeout: number; // Milliseconds (default 30000)
|
|
59
|
+
idleTimeout: number; // Milliseconds (default 15000)
|
|
60
|
+
actionabilityTimeoutMs: number; // Milliseconds (default 500)
|
|
61
|
+
|
|
62
|
+
// UI & Overlay
|
|
63
|
+
devMode: boolean | DevModeConfig;
|
|
64
|
+
persona: "concise" | "friendly";
|
|
65
|
+
|
|
66
|
+
// Telemetry & GitHub
|
|
67
|
+
telemetry: boolean;
|
|
68
|
+
githubCacheTtlMs: number;
|
|
69
|
+
|
|
70
|
+
// Agent Identity
|
|
71
|
+
agentId: string; // Auto-generated UUID
|
|
72
|
+
}
|
|
73
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Environment Variables"
|
|
3
|
+
description: "Runtime environment variables that override config."
|
|
4
|
+
product: mcp
|
|
5
|
+
section: configuration
|
|
6
|
+
icon: Variable
|
|
7
|
+
slug: env-variables
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Environment Variables
|
|
11
|
+
|
|
12
|
+
| Variable | Description |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `CHROME_PATH` | Absolute path to Chromium/Chrome binary |
|
|
15
|
+
| `WEAVETAB_CONFIG` | Path to a custom config file |
|
|
16
|
+
| `WEAVETAB_ROLE` | Override RBAC role at runtime (`admin`, `operator`, `viewer`, `automation`) |
|
|
17
|
+
| `WEAVETAB_DEV` | Set to `1` to enable verbose CDP dev logging |
|
|
18
|
+
| `WT_AGENT_ID` | Override the auto-generated agent UUID |
|
|
19
|
+
| `WT_PROXY_URL` | Set outbound HTTP/SOCKS proxy server URL |
|
|
@@ -0,0 +1,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
|
|
36
|
+
├── sessions/
|
|
37
|
+
│ └── context.json # Rolling 50-action trail for loop detection
|
|
38
|
+
├── apps/ # Dedicated user profiles for Electron apps
|
|
39
|
+
├── locks/ # Process lockfiles (PID + TCP port validation)
|
|
40
|
+
└── knowledge/ # Domain-specific markdown knowledge hints
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 3. Global User Directory: `~/.weavetab/`
|
|
44
|
+
|
|
45
|
+
Global user directory storing default configurations and global secrets:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
~/.weavetab/
|
|
49
|
+
├── config.json # Global default configuration
|
|
50
|
+
├── secrets.json # Global secrets for Blind Injection
|
|
51
|
+
├── policy.json # Domain whitelist / blacklist rules
|
|
52
|
+
├── plugins/ # Isolated storage directories for installed plugins
|
|
53
|
+
└── profile/ # Dedicated default Chromium browser profile
|
|
54
|
+
```
|
|
@@ -0,0 +1,162 @@
|
|
|
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-1.0.9175\\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`.
|