@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.
Files changed (168) hide show
  1. package/AGENTS.md +49 -49
  2. package/ARCHITECTURE.md +590 -590
  3. package/LICENSE +216 -216
  4. package/README.md +269 -269
  5. package/SECURITY.md +207 -207
  6. package/TROUBLESHOOTING.md +373 -365
  7. package/dist/anticaptcha/detector.js +395 -395
  8. package/dist/anticaptcha/solver.js +130 -130
  9. package/dist/cdp/bridge.js +73 -73
  10. package/dist/cdp/connector.js +46 -22
  11. package/dist/cdp/extension.js +34 -34
  12. package/dist/cdp/helpers.js +174 -174
  13. package/dist/cdp/pruner.js +195 -195
  14. package/dist/cdp/ref_cache.js +66 -66
  15. package/dist/cdp/security.js +10 -10
  16. package/dist/cdp/verify.js +57 -57
  17. package/dist/cdp/walker.js +563 -525
  18. package/dist/cli/plugin.js +26 -3
  19. package/dist/config/loader.d.ts +0 -3
  20. package/dist/config/loader.js +0 -9
  21. package/dist/index.js +0 -4
  22. package/dist/intelligence/intent.js +81 -81
  23. package/dist/intelligence/sessionMemory.js +2 -2
  24. package/dist/overlay/ghost.js +22 -22
  25. package/dist/overlay/injector.js +89 -89
  26. package/dist/plugin/extension_bridge.js +54 -54
  27. package/dist/plugin/interface.d.ts +7 -0
  28. package/dist/plugin/loader.js +3 -4
  29. package/dist/plugin/schema.d.ts +11 -0
  30. package/dist/plugin/schema.js +59 -0
  31. package/dist/security/guard.js +18 -18
  32. package/dist/sensors/actionability.js +167 -167
  33. package/dist/sensors/guard.js +29 -29
  34. package/dist/sensors/network.js +15 -17
  35. package/dist/server.d.ts +1 -1
  36. package/dist/server.js +173 -144
  37. package/dist/state/delta.js +6 -7
  38. package/dist/tools/automation.js +85 -85
  39. package/dist/tools/canvas.js +48 -25
  40. package/dist/tools/checkpoint.js +94 -35
  41. package/dist/tools/click.js +52 -41
  42. package/dist/tools/clipboard.js +80 -74
  43. package/dist/tools/design_extract.js +441 -441
  44. package/dist/tools/dialog.js +13 -13
  45. package/dist/tools/emulation.d.ts +2 -0
  46. package/dist/tools/emulation.js +7 -0
  47. package/dist/tools/fill.js +344 -347
  48. package/dist/tools/find.js +78 -52
  49. package/dist/tools/highlight.js +67 -67
  50. package/dist/tools/inspect.js +54 -25
  51. package/dist/tools/key.js +42 -35
  52. package/dist/tools/navigate.d.ts +1 -1
  53. package/dist/tools/navigate.js +35 -35
  54. package/dist/tools/office/parse.js +62 -18
  55. package/dist/tools/pdf.d.ts +9 -0
  56. package/dist/tools/pdf.js +7 -4
  57. package/dist/tools/performance.d.ts +11 -4
  58. package/dist/tools/performance.js +94 -42
  59. package/dist/tools/performance_test.d.ts +2 -2
  60. package/dist/tools/performance_test.js +69 -69
  61. package/dist/tools/pointer.js +116 -116
  62. package/dist/tools/read.js +99 -67
  63. package/dist/tools/recording.js +9 -0
  64. package/dist/tools/scrape.js +146 -146
  65. package/dist/tools/screenshot.d.ts +2 -0
  66. package/dist/tools/screenshot.js +46 -4
  67. package/dist/tools/scroll.d.ts +3 -1
  68. package/dist/tools/scroll.js +13 -15
  69. package/dist/tools/select.d.ts +3 -0
  70. package/dist/tools/select.js +131 -124
  71. package/dist/tools/snapshot.js +8 -6
  72. package/dist/tools/storage.d.ts +5 -1
  73. package/dist/tools/storage.js +16 -0
  74. package/dist/tools/tabs.d.ts +7 -5
  75. package/dist/tools/tabs.js +79 -26
  76. package/dist/tools/thought.js +8 -8
  77. package/dist/tools/type.js +274 -274
  78. package/dist/tools/type_secret.js +23 -23
  79. package/dist/tools/upload.js +3 -3
  80. package/dist/tools/video_compiler.js +9 -0
  81. package/dist/tools/wait.js +35 -35
  82. package/dist/version.d.ts +1 -1
  83. package/dist/version.js +1 -1
  84. package/docs/DOCUMENTATION.md +583 -585
  85. package/docs/PLUGINS.md +139 -121
  86. package/docs/TOOLS.md +3 -4
  87. package/docs/architecture/blind-injection.md +83 -83
  88. package/docs/architecture/overview.md +49 -49
  89. package/docs/architecture/security.md +36 -36
  90. package/docs/architecture/transport.md +37 -37
  91. package/docs/cli/cli-commands.md +50 -50
  92. package/docs/cli/cli-flags.md +28 -28
  93. package/docs/cli/cli-scripting.md +35 -35
  94. package/docs/configuration/config-locations.md +23 -23
  95. package/docs/configuration/configuration.md +39 -27
  96. package/docs/configuration/env-variables.md +19 -19
  97. package/docs/configuration/folders.md +62 -55
  98. package/docs/desktop-automation/electron-apps.md +225 -214
  99. package/docs/get-started/installation.md +1 -1
  100. package/docs/get-started/introduction.md +60 -60
  101. package/docs/get-started/quickstart.md +2 -2
  102. package/docs/get-started/setup-wizard.md +27 -27
  103. package/docs/intelligence/site-profiles.md +151 -151
  104. package/docs/tools/tools.md +582 -631
  105. package/docs/troubleshooting/trouble-browser.md +27 -27
  106. package/docs/troubleshooting/trouble-loop.md +31 -31
  107. package/ext-dist/background.js +415 -415
  108. package/ext-dist/content.js +2527 -2527
  109. package/ext-dist/dashboard.html +583 -583
  110. package/ext-dist/hud/hud.js +3 -3
  111. package/ext-dist/hud/index.html +20 -20
  112. package/ext-dist/manifest.json +73 -73
  113. package/ext-dist/styles.css +223 -223
  114. package/mcp.json +796 -805
  115. package/package.json +118 -118
  116. package/server.json +23 -23
  117. package/dist/cdp/walker.test.d.ts +0 -2
  118. package/dist/cdp/walker.test.js +0 -172
  119. package/dist/intelligence/sessionMemory.test.d.ts +0 -2
  120. package/dist/intelligence/sessionMemory.test.js +0 -62
  121. package/dist/intelligence/trail.test.d.ts +0 -2
  122. package/dist/intelligence/trail.test.js +0 -110
  123. package/dist/state/cache.test.d.ts +0 -2
  124. package/dist/state/cache.test.js +0 -76
  125. package/dist/state/delta.test.d.ts +0 -2
  126. package/dist/state/delta.test.js +0 -279
  127. package/dist/state/groups.d.ts +0 -15
  128. package/dist/state/groups.js +0 -80
  129. package/dist/tools/accessibility.d.ts +0 -14
  130. package/dist/tools/accessibility.js +0 -32
  131. package/dist/tools/ask.d.ts +0 -14
  132. package/dist/tools/ask.js +0 -49
  133. package/dist/tools/click_and_wait.d.ts +0 -33
  134. package/dist/tools/click_and_wait.js +0 -149
  135. package/dist/tools/drag.d.ts +0 -15
  136. package/dist/tools/drag.js +0 -29
  137. package/dist/tools/geo.d.ts +0 -19
  138. package/dist/tools/geo.js +0 -29
  139. package/dist/tools/github/analyze.d.ts +0 -4
  140. package/dist/tools/github/analyze.js +0 -113
  141. package/dist/tools/github/cache.d.ts +0 -21
  142. package/dist/tools/github/cache.js +0 -28
  143. package/dist/tools/github/index.d.ts +0 -19
  144. package/dist/tools/github/index.js +0 -40
  145. package/dist/tools/github/issues.d.ts +0 -9
  146. package/dist/tools/github/issues.js +0 -88
  147. package/dist/tools/github/pr.d.ts +0 -5
  148. package/dist/tools/github/pr.js +0 -88
  149. package/dist/tools/github/rateLimiter.d.ts +0 -4
  150. package/dist/tools/github/rateLimiter.js +0 -46
  151. package/dist/tools/github/read.d.ts +0 -34
  152. package/dist/tools/github/read.js +0 -74
  153. package/dist/tools/github/repoContext.d.ts +0 -20
  154. package/dist/tools/github/repoContext.js +0 -129
  155. package/dist/tools/hover.d.ts +0 -19
  156. package/dist/tools/hover.js +0 -57
  157. package/dist/tools/integration.test.d.ts +0 -2
  158. package/dist/tools/integration.test.js +0 -96
  159. package/dist/tools/macro_compiler.d.ts +0 -7
  160. package/dist/tools/macro_compiler.js +0 -82
  161. package/dist/tools/mouse.d.ts +0 -21
  162. package/dist/tools/mouse.js +0 -62
  163. package/dist/tools/response.d.ts +0 -129
  164. package/dist/tools/response.js +0 -5
  165. package/dist/tools/wait_for.d.ts +0 -23
  166. package/dist/tools/wait_for.js +0 -30
  167. package/dist/tools/windows.d.ts +0 -22
  168. 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.0 | **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
- ````bash
13
- npx @weavetab/sdk init my-custom-plugin
14
- cd my-custom-plugin
15
- npm install
16
- `
17
-
18
- ### Build & Compile
19
- ````bash
20
- npm run build
21
- `
22
-
23
- ---
24
-
25
- ## 2. Plugin Architecture
26
-
27
- Every Weavetab plugin exports a plugin definition created with definePlugin:
28
-
29
- ` ypescript
30
- // src/index.ts
31
- import { definePlugin, type PluginContext } from @weavetab/sdk;
32
-
33
- export default definePlugin({
34
- name: weavetab-plugin-sample,
35
- version: 1.0.0,
36
- description: Sample custom tool plugin for Weavetab,
37
-
38
- defaultConfig: {
39
- enableHud: true,
40
- },
41
-
42
- async onLoad(ctx: PluginContext) {
43
- // Register a custom MCP tool
44
- ctx.mcp.registerTool({
45
- name: custom_analyzer,
46
- description: Performs custom DOM analysis,
47
- schema: {
48
- type: object,
49
- properties: {
50
- selector: { type: string, description: Target CSS selector }
51
- },
52
- required: [selector]
53
- },
54
- handler: async (args: { selector: string }, session: any) => {
55
- // Show thought bubble on browser tab
56
- if (ctx.config.enableHud && session) {
57
- await ctx.extension.showThought(session, Analyzing ...);
58
- }
59
-
60
- return {
61
- content: [
62
- { type: text, text: Analysis complete for }
63
- ]
64
- };
65
- }
66
- });
67
- },
68
-
69
- async onUnload(ctx: PluginContext) {
70
- // Cleanup resources
71
- }
72
- });
73
- `
74
-
75
- ---
76
-
77
- ## 3. Manifest Specification (weavetab.json)
78
-
79
- Plugins require a weavetab.json manifest in their package root:
80
-
81
- `json
82
- {
83
- name: weavetab-plugin-sample,
84
- version: 1.0.0,
85
- entry: ./dist/index.js,
86
- permissions: [storage, extension, cdp],
87
- tools: [custom_analyzer]
88
- }
89
- `
90
-
91
- ---
92
-
93
- ## 4. Plugin Capabilities
94
-
95
- | Capability | API | Description |
96
- | :--- | :--- | :--- |
97
- | **Sandboxed Storage** | ctx.storage.get(), ctx.storage.set() | Isolated key-value storage in ~/.weavetab/plugins/<name>/. |
98
- | **Thought Bubbles** | ctx.extension.showThought(session, text) | Floating green thoughts on the live browser tab. |
99
- | **HUD Badges** | ctx.extension.setHudState(session, state) | Real-time status in the Weavetab overlay. |
100
- | **Tool Overrides** | ctx.mcp.overrideTool(name, wrapperFn) | Wrap or intercept built-in MCP tools with custom pre/post logic. |
101
- | **Lifecycle Hooks** | ctx.hooks.beforeToolCall, ctx.hooks.afterToolCall | Global auditing and security filters. |
102
-
103
- ---
104
-
105
- ## 5. Installing Plugins
106
-
107
- ```bash
108
- # Install an official plugin
109
- weavetab plugin add @weavetab/plugin-youtube
110
-
111
- # Install community plugins (any npm package)
112
- weavetab plugin add my-custom-plugin
113
-
114
- # List installed plugins
115
- weavetab plugin list
116
-
117
- # Remove a plugin
118
- weavetab plugin rm my-custom-plugin
119
- `
120
-
121
- Restart weavetab to load the newly installed plugin tools into the MCP server.
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.0 | **Total Tools:** 42 | **Architecture:** Layer 0 Direct CDP
3
+ > **Version:** 2.5.1 | **Total Tools:** 41 | **Architecture:** Layer 0 Direct CDP
4
4
 
5
- Weavetab provides 42 production-grade MCP tools organized into functional categories.
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-17.*
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 (44 tools)** | No | No | No |
49
- | **Cloud dependency** | **Zero** | Optional | Optional | Grid required |
1
+ ---
2
+ title: "Overview"
3
+ description: "Five layers, deterministic pipeline, zero cloud."
4
+ product: mcp
5
+ section: architecture
6
+ icon: Layers
7
+ slug: overview
8
+ ---
9
+
10
+ # Architecture Overview
11
+
12
+ Weavetab is decomposed into **five functional layers**, all running in-process without external daemon dependencies.
13
+
14
+ ## Layer Map
15
+
16
+ | # | Layer | Responsibility |
17
+ |---|---|---|
18
+ | 1 | **Transport** | JSON-RPC 2.0 over stdio (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 |