@weavetab/skills 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 (62) hide show
  1. package/README.md +108 -108
  2. package/ROUTER.md +43 -43
  3. package/bin/cli.js +232 -232
  4. package/browser/dom-strategy.md +121 -119
  5. package/browser/form-automation.md +84 -87
  6. package/browser/interaction-pipeline.md +242 -216
  7. package/browser/tab-and-window.md +136 -136
  8. package/desktop/desktop-targeting.md +85 -85
  9. package/desktop/electron-discovery.md +115 -115
  10. package/developer/github-forensics.md +89 -74
  11. package/dist/bundled/weavetab-all.md +1885 -1709
  12. package/dist/bundled/weavetab-browser.md +526 -501
  13. package/dist/bundled/weavetab-desktop.md +176 -176
  14. package/dist/bundled/weavetab-developer.md +84 -67
  15. package/dist/bundled/weavetab-documents.md +184 -142
  16. package/dist/bundled/weavetab-memory.md +259 -233
  17. package/dist/bundled/weavetab-network-and-perf.md +250 -223
  18. package/dist/bundled/weavetab-plugins.md +88 -83
  19. package/dist/bundled/weavetab-resilience.md +244 -216
  20. package/dist/bundled/weavetab-security.md +93 -87
  21. package/dist/granular/browser_dom-strategy.md +121 -119
  22. package/dist/granular/browser_form-automation.md +84 -87
  23. package/dist/granular/browser_interaction-pipeline.md +242 -216
  24. package/dist/granular/browser_tab-and-window.md +136 -136
  25. package/dist/granular/desktop_desktop-targeting.md +85 -85
  26. package/dist/granular/desktop_electron-discovery.md +115 -115
  27. package/dist/granular/developer_github-forensics.md +89 -74
  28. package/dist/granular/documents_canvas-and-visual-capture.md +117 -103
  29. package/dist/granular/documents_office-document-ingestion.md +91 -63
  30. package/dist/granular/memory_selector-memory-system.md +127 -127
  31. package/dist/granular/memory_session-trail.md +111 -95
  32. package/dist/granular/memory_site-learning.md +62 -53
  33. package/dist/granular/network-and-perf_device-and-environment.md +100 -87
  34. package/dist/granular/network-and-perf_network-intercept-and-mock.md +97 -84
  35. package/dist/granular/network-and-perf_performance-and-vitals.md +86 -84
  36. package/dist/granular/plugins_hooks-and-overrides.md +40 -35
  37. package/dist/granular/plugins_plugin-runtime.md +63 -63
  38. package/dist/granular/resilience_loop-breaker.md +72 -67
  39. package/dist/granular/resilience_session-time-travel.md +146 -131
  40. package/dist/granular/resilience_stale-ref-recovery.md +61 -53
  41. package/dist/granular/security_rbac-and-policies.md +50 -47
  42. package/dist/granular/security_secret-containment-protocol.md +62 -59
  43. package/documents/canvas-and-visual-capture.md +117 -103
  44. package/documents/office-document-ingestion.md +91 -63
  45. package/evals/evaluator.js +146 -146
  46. package/evals/scenarios.json +239 -239
  47. package/memory/selector-memory-system.md +127 -127
  48. package/memory/session-trail.md +111 -95
  49. package/memory/site-learning.md +61 -52
  50. package/network-and-perf/device-and-environment.md +100 -87
  51. package/network-and-perf/network-intercept-and-mock.md +97 -84
  52. package/network-and-perf/performance-and-vitals.md +86 -84
  53. package/package.json +74 -73
  54. package/plugins/hooks-and-overrides.md +40 -35
  55. package/plugins/plugin-runtime.md +63 -63
  56. package/resilience/loop-breaker.md +72 -67
  57. package/resilience/session-time-travel.md +146 -131
  58. package/resilience/stale-ref-recovery.md +61 -53
  59. package/security/rbac-and-policies.md +50 -47
  60. package/security/secret-containment-protocol.md +62 -59
  61. package/skills.json +425 -426
  62. package/src/api.js +239 -239
@@ -1,216 +1,244 @@
1
- # Weavetab Domain Profile: RESILIENCE
2
-
3
- Generated for @weavetab/skills v2.5.0-beta.5
4
-
5
-
6
- ## loop-breaker
7
-
8
- # Loop Breaker & CAPTCHA Escalation Protocol
9
-
10
- Agents can get trapped in repetitive click loops when a button does not advance the state (e.g. failing silent validation, unhandled reCAPTCHA challenges, or modals swallowing events). Weavetab actively monitors repetitive patterns and provides circuit breakers.
11
-
12
- ---
13
-
14
- ## 1. Loop Detection & Strike Reset (`browser_map`)
15
-
16
- Weavetab tracks the sequence of identical or near-identical tool invocations. If an agent calls `browser_click` or `browser_type` on the same selector or ref repeatedly without URL or major DOM mutations, the server raises a `STUCK_LOOP_WARNING`.
17
-
18
- ### How to Break the Loop:
19
- 1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
20
- ```json
21
- { "action": "read" }
22
- ```
23
- Or use `browser_map` to see if a validation banner or unhandled modal appeared.
24
- 2. **Reset the Circuit Breaker**:
25
- - Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
26
- ```json
27
- { "force": true }
28
- ```
29
-
30
- ---
31
-
32
- ## 2. CAPTCHA Handling Protocol (`browser_captcha`)
33
-
34
- When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
35
-
36
- Invoke `browser_captcha` to analyze and manage the challenge:
37
-
38
- ```json
39
- {
40
- "action": "detect"
41
- }
42
- ```
43
-
44
- ### Response Example:
45
- ```json
46
- {
47
- "detected": true,
48
- "type": "turnstile",
49
- "provider": "cloudflare",
50
- "interactive": true,
51
- "ref": "w:99"
52
- }
53
- ```
54
-
55
- ### Action Strategy:
56
- 1. If the challenge is interactive and requires human intervention (e.g. image classification), inform the user cleanly or request human bypass.
57
- 2. If the challenge is a simple checkbox Turnstile widget, pass `"action": "solve"` or click the detected widget ref with `browser_click`.
58
-
59
-
60
- ## session-time-travel
61
-
62
- # Session Time-Travel & Instant State Rollback
63
-
64
- In complex multi-step workflows (e.g. checkout funnels, multi-page configuration wizards, onboarding questionnaires), an error at Step 7 traditionally forces an agent to reload the root URL, re-authenticate, and waste 10+ turns repeating steps.
65
-
66
- `browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
67
-
68
- ---
69
-
70
- ## 1. What a Checkpoint Captures
71
-
72
- A single named checkpoint atomically preserves:
73
- - **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
74
- - **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
75
- - **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
76
-
77
- ---
78
-
79
- ## 2. Checkpoint Operations
80
-
81
- ### A. Saving a Checkpoint (`save`)
82
- Create a checkpoint right before undertaking risky, branching, or destructive actions:
83
-
84
- ```json
85
- {
86
- "action": "save",
87
- "name": "pre_checkout_authenticated"
88
- }
89
- ```
90
-
91
- ### B. Restoring a Checkpoint (`restore`)
92
- If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
93
-
94
- ```json
95
- {
96
- "action": "restore",
97
- "name": "pre_checkout_authenticated"
98
- }
99
- ```
100
- *Latency: ~15ms*. The page navigates back to the checkpoint URL with cookies and storage atomically injected.
101
-
102
- ### C. Listing Checkpoints (`list`)
103
- Inspect all active checkpoints for the current page target:
104
-
105
- ```json
106
- {
107
- "action": "list"
108
- }
109
- ```
110
-
111
- ### D. Cleaning Up (`delete`)
112
- Free memory once a workflow has concluded:
113
-
114
- ```json
115
- {
116
- "action": "delete",
117
- "name": "pre_checkout_authenticated"
118
- }
119
- ```
120
-
121
- ---
122
-
123
- ## 3. High-Leverage Agent Pattern
124
-
125
- ```
126
- 1. Authenticate to Target Portal
127
- 2. browser_checkpoint({ action: "save", name: "auth_ready" })
128
- 3. Attempt automated action sequence (e.g. form filling or testing)
129
- 4. IF error occurs:
130
- browser_checkpoint({ action: "restore", name: "auth_ready" })
131
- -> Agent is immediately back at authenticated state without re-login!
132
- ```
133
-
134
- ---
135
-
136
- ## 4. Fine-Grained Cookie Management (`browser_cookies`)
137
-
138
- Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
139
-
140
- ```json
141
- {
142
- "action": "get",
143
- "urls": ["https://example.com"]
144
- }
145
- ```
146
-
147
- Or inject an authentication cookie:
148
- ```json
149
- {
150
- "action": "set",
151
- "cookies": [
152
- {
153
- "name": "session_token",
154
- "value": "xyz123",
155
- "domain": "example.com",
156
- "httpOnly": true,
157
- "secure": true
158
- }
159
- ]
160
- }
161
- ```
162
-
163
- ---
164
-
165
- ## 5. Web Storage Inspection & Injection (`browser_storage`)
166
-
167
- Query or clear `localStorage` and `sessionStorage` keys:
168
-
169
- ```json
170
- {
171
- "storageType": "localStorage",
172
- "action": "get",
173
- "key": "authToken"
174
- }
175
- ```
176
-
177
-
178
- ## stale-ref-recovery
179
-
180
- # Stale Ref Recovery & SPA Hydration Resilience
181
-
182
- In modern Single Page Applications (built with React, Next.js, Vue, Nuxt, Svelte), DOM nodes are frequently destroyed and recreated during client-side hydration or reactive state updates. This often causes `STALE_ELEMENT_REFERENCE` or `NODE_DETACHED` errors when an agent attempts an action.
183
-
184
- ---
185
-
186
- ## 1. The 4-Tier Auto-Recovery Chain
187
-
188
- When a tool receives a stale or missing `ref`, Weavetab does not immediately fail. It activates an internal 4-tier recovery chain:
189
-
190
- ```
191
- [Action on w:14 Fails / Stale]
192
- │
193
- ▼
194
- [Tier 1: Stored Selector] ──▶ Re-queries cached stable selector (data-testid, id)
195
- │ (if not found)
196
- ▼
197
- [Tier 2: Exact Label Match] ──▶ Queries element with identical visible text & tag
198
- │ (if not found)
199
- ▼
200
- [Tier 3: Semantic Role Match] ──▶ Queries nearest sibling with matching ARIA role
201
- │ (if not found)
202
- ▼
203
- [Tier 4: Fuzzy Match] ──▶ Re-anchors to highest-confidence visual candidate
204
- ```
205
-
206
- If the recovery chain succeeds, the action executes seamlessly and the return payload notifies the agent that the handle was refreshed.
207
-
208
- ---
209
-
210
- ## 2. Agent Reactive Behavior
211
-
212
- If an action returns `ERROR: STALE_ELEMENT_REFERENCE` because all 4 recovery tiers were exhausted:
213
-
214
- 1. **Do NOT Repeat the Identical Call**: Retrying the exact same stale `ref` (`w:14`) will fail again.
215
- 2. **Execute a Fast Targeted Lookup**: Run `browser_find` with the text of the button or input field.
216
- 3. **Execute the Action on the New Handle**: Use the updated handle returned by `browser_find`.
1
+ # Weavetab Domain Profile: RESILIENCE
2
+
3
+ Generated for @weavetab/skills v2.5.1
4
+
5
+
6
+ ## loop-breaker
7
+
8
+ # Loop Breaker & CAPTCHA Escalation Protocol
9
+
10
+ Agents can get trapped in repetitive click loops when a button does not advance the state (e.g. failing silent validation, unhandled reCAPTCHA challenges, or modals swallowing events). Weavetab actively monitors repetitive patterns and provides circuit breakers.
11
+
12
+ ---
13
+
14
+ ## 1. Loop Detection & Strike Reset (`browser_map`)
15
+
16
+ Weavetab tracks the sequence of identical or near-identical tool invocations. If an agent calls `browser_click` or `browser_type` on the same selector or ref repeatedly without URL or major DOM mutations, the server raises a `STUCK_LOOP_WARNING`.
17
+
18
+ ### How to Break the Loop:
19
+ 1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
20
+ ```json
21
+ { "action": "read" }
22
+ ```
23
+ Or use `browser_map` to see if a validation banner or unhandled modal appeared.
24
+ 2. **Reset the Circuit Breaker**:
25
+ - Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
26
+ ```json
27
+ { "force": true }
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 2. CAPTCHA Handling Protocol (`browser_captcha`)
33
+
34
+ When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
35
+
36
+ Invoke `browser_captcha` to analyze and manage the challenge:
37
+
38
+ ```json
39
+ {
40
+ "action": "detect"
41
+ }
42
+ ```
43
+
44
+ ### Response Example:
45
+ ```json
46
+ {
47
+ "success": true,
48
+ "action": "detect",
49
+ "captcha_detected": true,
50
+ "captcha_type": "turnstile",
51
+ "interaction_type": "checkbox",
52
+ "difficulty": "easy",
53
+ "confidence": 0.97,
54
+ "human_needed": false,
55
+ "message": "CAPTCHA detected: turnstile (checkbox, 97% confidence)",
56
+ "next_action": "Call browser_captcha({ action: \"solve\" }) to attempt automated solving."
57
+ }
58
+ ```
59
+
60
+ ### Action Strategy:
61
+ 1. If `human_needed` is `true` (e.g. image classification), inform the user cleanly or request human bypass — do not guess coordinates.
62
+ 2. Otherwise pass `"action": "solve"` to attempt an automated solve (slider drag, hold, checkbox, or invisible challenges). Use `"action": "status"` to check progress and `"action": "wait_for_user"` to pause for human input.
63
+
64
+
65
+ ## session-time-travel
66
+
67
+ # Session Time-Travel & Instant State Rollback
68
+
69
+ In complex multi-step workflows (e.g. checkout funnels, multi-page configuration wizards, onboarding questionnaires), an error at Step 7 traditionally forces an agent to reload the root URL, re-authenticate, and waste 10+ turns repeating steps.
70
+
71
+ `browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
72
+
73
+ ---
74
+
75
+ ## 1. What a Checkpoint Captures
76
+
77
+ A single named checkpoint atomically preserves:
78
+ - **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
79
+ - **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
80
+ - **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
81
+
82
+ ---
83
+
84
+ ## 2. Checkpoint Operations
85
+
86
+ ### A. Saving a Checkpoint (`save`)
87
+ Create a checkpoint right before undertaking risky, branching, or destructive actions:
88
+
89
+ ```json
90
+ {
91
+ "action": "save",
92
+ "name": "pre_checkout_authenticated"
93
+ }
94
+ ```
95
+
96
+ ### B. Restoring a Checkpoint (`restore`)
97
+ If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
98
+
99
+ ```json
100
+ {
101
+ "action": "restore",
102
+ "name": "pre_checkout_authenticated"
103
+ }
104
+ ```
105
+ *Latency: ~15ms*. The page navigates back to the checkpoint URL with cookies and storage atomically injected.
106
+
107
+ ### C. Listing Checkpoints (`list`)
108
+ Inspect all active checkpoints for the current page target:
109
+
110
+ ```json
111
+ {
112
+ "action": "list"
113
+ }
114
+ ```
115
+
116
+ ### D. Cleaning Up (`delete`)
117
+ Free memory once a workflow has concluded:
118
+
119
+ ```json
120
+ {
121
+ "action": "delete",
122
+ "name": "pre_checkout_authenticated"
123
+ }
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 3. High-Leverage Agent Pattern
129
+
130
+ ```
131
+ 1. Authenticate to Target Portal
132
+ 2. browser_checkpoint({ action: "save", name: "auth_ready" })
133
+ 3. Attempt automated action sequence (e.g. form filling or testing)
134
+ 4. IF error occurs:
135
+ browser_checkpoint({ action: "restore", name: "auth_ready" })
136
+ -> Agent is immediately back at authenticated state without re-login!
137
+ ```
138
+
139
+ ---
140
+
141
+ ## 4. Fine-Grained Cookie Management (`browser_cookies`)
142
+
143
+ Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
144
+
145
+ ```json
146
+ {
147
+ "action": "get",
148
+ "url": "https://example.com"
149
+ }
150
+ ```
151
+
152
+ Or inject an authentication cookie (one cookie per call):
153
+
154
+ ```json
155
+ {
156
+ "action": "set",
157
+ "name": "session_token",
158
+ "value": "xyz123",
159
+ "domain": "example.com",
160
+ "path": "/",
161
+ "httpOnly": true,
162
+ "secure": true,
163
+ "sameSite": "Lax"
164
+ }
165
+ ```
166
+
167
+ Delete a cookie by name (and optionally domain/path):
168
+
169
+ ```json
170
+ {
171
+ "action": "delete",
172
+ "name": "session_token",
173
+ "domain": "example.com"
174
+ }
175
+ ```
176
+
177
+ Accepted fields: `name`, `value`, `domain`, `path`, `expires` (Unix seconds), `httpOnly`, `secure`, `sameSite` (`Strict`/`Lax`/`None`), and `url` (for `get`).
178
+
179
+ ---
180
+
181
+ ## 5. Web Storage Inspection & Injection (`browser_storage`)
182
+
183
+ Query or clear `localStorage` and `sessionStorage` keys. Choose the store with `scope`:
184
+
185
+ ```json
186
+ {
187
+ "scope": "local",
188
+ "action": "get",
189
+ "key": "authToken"
190
+ }
191
+ ```
192
+
193
+ - **`scope`**: `"local"` or `"session"`.
194
+ - **`action`**: `get`, `set`, `remove`, `list` (all keys + values), or `clear` (the whole scope).
195
+ - **`key`** is required for `get`, `set`, and `remove`; **`value`** is required for `set`.
196
+
197
+
198
+ ## stale-ref-recovery
199
+
200
+ # Stale Ref Recovery & SPA Hydration Resilience
201
+
202
+ In modern Single Page Applications (built with React, Next.js, Vue, Nuxt, Svelte), DOM nodes are frequently destroyed and recreated during client-side hydration or reactive state updates. This can invalidate a volatile `w:NN` handle between reads and actions.
203
+
204
+ ---
205
+
206
+ ## 1. The Multi-Tier Auto-Recovery Heuristic
207
+
208
+ When a tool receives a detached or invalidated `ref`, Weavetab attempts to re-resolve it instead of failing immediately. The recovery runs a sub-5ms heuristic over these strategies (in order) and re-stamps `data-wt-id="NN"` onto the live node:
209
+
210
+ ```
211
+ [Action on w:14 fails / handle detached]
212
+ │
213
+ ▼
214
+ [1. Connected node + fingerprint check]
215
+ │ (if not found)
216
+ ▼
217
+ [2. Stored CSS selector] (data-testid, id, class)
218
+ │ (if not found)
219
+ ▼
220
+ [3. Exact label / aria-label match]
221
+ │ (if not found)
222
+ ▼
223
+ [4. Placeholder / name attribute match]
224
+ │ (if not found)
225
+ ▼
226
+ [5. Fuzzy substring match] (when label length >= 3)
227
+ ```
228
+
229
+ The successful strategy is reported back to the agent (`stored_selector`, `exact_label`, `placeholder_or_name`, `fuzzy_label`). If every strategy misses, the tool returns a hard failure.
230
+
231
+ ---
232
+
233
+ ## 2. Agent Reactive Behavior
234
+
235
+ If an action fails because all recovery strategies were exhausted, the tool returns one of:
236
+
237
+ - `error_code: "ELEMENT_NOT_FOUND"` — the ref was in the cached map but no longer exists in the DOM.
238
+ - `error_code: "FINGERPRINT_MISMATCH"` — an element exists but its tag/role fingerprint no longer matches; the DOM was likely rebuilt.
239
+
240
+ Either way:
241
+
242
+ 1. **Do NOT Repeat the Identical Call**: retrying the exact same stale `ref` (`w:14`) will fail again.
243
+ 2. **Execute a Fast Targeted Lookup**: run `browser_find` with the text of the button or input, or refresh handles with `browser_map`.
244
+ 3. **Execute the Action on the New Handle**: use the updated ref returned by `browser_find`/`browser_map`.
@@ -1,87 +1,93 @@
1
- # Weavetab Domain Profile: SECURITY
2
-
3
- Generated for @weavetab/skills v2.5.0-beta.5
4
-
5
-
6
- ## rbac-and-policies
7
-
8
- # Role-Based Access Control (RBAC) & Agent Guardrails
9
-
10
- Weavetab allows developers to run untrusted or lower-privilege subagents within strict security boundaries to prevent accidental destructive operations or data leaks.
11
-
12
- ---
13
-
14
- ## 1. The 4 Security Tiers
15
-
16
- | Tier | Name | Allowed Tools & Capabilities | Intended Role |
17
- | :--- | :--- | :--- | :--- |
18
- | **0** | `admin` | Full tool access (all 48 tools), plugin loading, arbitrary script eval, cookies/storage write. | Primary Operator / Lead Agent. |
19
- | **1** | `operator` | Interactive tools (`browser_click`, `browser_fill`, `browser_upload`), but blocked from loading untrusted plugins. | Standard Automation Agent. |
20
- | **2** | `automation` | Pre-approved deterministic macros (`browser_automation`), scoped form filling, no arbitrary script execution. | Background Cron / Worker. |
21
- | **3** | `viewer` | Read-only inspection tools (`browser_map`, `browser_find`, `browser_scrape`, `browser_inspect`). All click, type, and storage tools are rejected with `PERMISSION_DENIED`. | Research Subagents / Scrapers. |
22
-
23
- ---
24
-
25
- ## 2. Handling `PERMISSION_DENIED` Errors
26
-
27
- If an agent attempts an action outside its allocated role tier:
28
- ```json
29
- {
30
- "error_code": "PERMISSION_DENIED",
31
- "message": "Tool 'browser_click' is disabled under role 'viewer'. Only read operations are permitted."
32
- }
33
- ```
34
-
35
- ### Protocol:
36
- 1. Do not retry the denied tool.
37
- 2. Delegate the interactive action to the parent agent or primary operator.
38
- 3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
39
-
40
-
41
- ## secret-containment-protocol
42
-
43
- # Secret Containment Protocol & Zero-Bleed Execution
44
-
45
- AI agent transcripts, LLM providers, and tool logs represent massive attack surfaces for credential leaks. Weavetab enforces a hardware-grade **Zero-Bleed Security Guarantee** for sensitive inputs.
46
-
47
- ---
48
-
49
- ## 1. Entering Credentials with `browser_type_secret`
50
-
51
- Whenever an agent inputs passwords, two-factor backup codes, credit card numbers, or proprietary API keys, you MUST use `browser_type_secret`:
52
-
53
- ```json
54
- {
55
- "ref": "w:12",
56
- "secret": "MySuperSecretPassword!2026",
57
- "clear": true
58
- }
59
- ```
60
-
61
- ---
62
-
63
- ## 2. The Zero-Bleed Guarantee Architecture
64
-
65
- When `browser_type_secret` is invoked:
66
- 1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
67
- 2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
68
- 3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
69
- ```json
70
- {
71
- "success": true,
72
- "message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
73
- }
74
- ```
75
- 4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
76
-
77
- ---
78
-
79
- ## 3. Strict Operating Prohibition
80
-
81
- > [!CAUTION]
82
- > Under NO circumstances should an agent pass passwords or credentials to:
83
- > - `browser_type`
84
- > - `browser_fill`
85
- > - `browser_eval`
86
- >
87
- > Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.
1
+ # Weavetab Domain Profile: SECURITY
2
+
3
+ Generated for @weavetab/skills v2.5.1
4
+
5
+
6
+ ## rbac-and-policies
7
+
8
+ # Role-Based Access Control (RBAC) & Agent Guardrails
9
+
10
+ Weavetab allows developers to run untrusted or lower-privilege subagents within strict security boundaries to prevent accidental destructive operations or data leaks.
11
+
12
+ Roles are configured per agent (in `config.json`). The server checks the role **before** launching a browser or resolving the target.
13
+
14
+ ---
15
+
16
+ ## 1. The 5 Security Roles
17
+
18
+ | Role | Tool Access | Intended Use |
19
+ | :--- | :--- | :--- |
20
+ | `admin` | Full access (`*`). | Primary operator / lead agent. |
21
+ | `operator` | Full access (`*`). | Standard automation agent. |
22
+ | `automation` | Every tool except `browser_thoughts` — automation agents must be non-interactive. | Background cron / worker. |
23
+ | `viewer` | Read-only set only: `browser_map`, `browser_find`, `browser_scrape`, `browser_console`, `browser_eval`, `browser_inspect`, `browser_extract_design`, `browser_snapshot`, `browser_screenshot`, `browser_pdf`, `browser_cookies`, `browser_tabs`, `browser_wait`, `browser_pattern_learn`. | Research subagents / scrapers. |
24
+ | `system` | `browser_thoughts`, `browser_detect`, `browser_performance`, `browser_checkpoint`, `browser_pattern_learn`. | Internal/system operations. |
25
+
26
+ Any other role value is treated as fully allowed.
27
+
28
+ ---
29
+
30
+ ## 2. Handling Permission Denials
31
+
32
+ There is no JSON `error_code` for RBAC. A denied call fails with `isError: true` and a plain-text message prefixed with `[!]`:
33
+
34
+ ```
35
+ [!] Role 'viewer' does not have permission to use 'browser_click'. Viewer role only permits read-only tools (map/find/scrape/console/eval/inspect/snapshot/pdf/cookies).
36
+ ```
37
+
38
+ ### Protocol:
39
+ 1. Do not retry the denied tool — the role will not change mid-session.
40
+ 2. Delegate the interactive action to the parent agent or a higher-privilege operator.
41
+ 3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
42
+
43
+
44
+ ## secret-containment-protocol
45
+
46
+ # Secret Containment Protocol & Zero-Bleed Execution
47
+
48
+ AI agent transcripts, LLM providers, and tool logs represent massive attack surfaces for credential leaks. Weavetab enforces a hardware-grade **Zero-Bleed Security Guarantee** for sensitive inputs.
49
+
50
+ ---
51
+
52
+ ## 1. Entering Credentials with `browser_type_secret`
53
+
54
+ Whenever an agent inputs passwords, two-factor backup codes, credit card numbers, or proprietary API keys, you MUST use `browser_type_secret`.
55
+
56
+ `browser_type_secret` never accepts a plaintext secret. It reads the value from an **environment variable** on the host running the MCP server, so the secret never reaches the agent transcript. Set the variable first (e.g. `export PORTAL_PASSWORD="…"`), then reference it by key:
57
+
58
+ ```json
59
+ {
60
+ "ref": "w:12",
61
+ "envKey": "PORTAL_PASSWORD"
62
+ }
63
+ ```
64
+
65
+ Accepted targeting parameters: `id` (alias `ref`) or `target` (CSS selector). `envKey` is **required**.
66
+
67
+ ---
68
+
69
+ ## 2. The Zero-Bleed Guarantee Architecture
70
+
71
+ When `browser_type_secret` is invoked:
72
+ 1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
73
+ 2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
74
+ 3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
75
+ ```json
76
+ {
77
+ "success": true,
78
+ "message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
79
+ }
80
+ ```
81
+ 4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
82
+
83
+ ---
84
+
85
+ ## 3. Strict Operating Prohibition
86
+
87
+ > [!CAUTION]
88
+ > Under NO circumstances should an agent pass passwords or credentials to:
89
+ > - `browser_type`
90
+ > - `browser_fill`
91
+ > - `browser_eval`
92
+ >
93
+ > Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.