@weavetab/skills 2.5.0-beta.4 → 2.5.0-beta.5
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/README.md +16 -16
- package/bin/cli.js +17 -17
- package/browser/dom-strategy.md +1 -1
- package/browser/form-automation.md +1 -1
- package/browser/interaction-pipeline.md +1 -1
- package/browser/tab-and-window.md +1 -1
- package/desktop/desktop-targeting.md +1 -1
- package/desktop/electron-discovery.md +1 -1
- package/developer/github-forensics.md +1 -1
- package/dist/bundled/weavetab-all.md +1704 -1699
- package/dist/bundled/weavetab-browser.md +23 -23
- package/dist/bundled/weavetab-desktop.md +13 -13
- package/dist/bundled/weavetab-developer.md +8 -8
- package/dist/bundled/weavetab-documents.md +13 -13
- package/dist/bundled/weavetab-memory.md +182 -182
- package/dist/bundled/weavetab-network-and-perf.md +19 -19
- package/dist/bundled/weavetab-plugins.md +62 -57
- package/dist/bundled/weavetab-resilience.md +18 -18
- package/dist/bundled/weavetab-security.md +13 -13
- package/dist/granular/browser_dom-strategy.md +1 -1
- package/dist/granular/browser_form-automation.md +1 -1
- package/dist/granular/browser_interaction-pipeline.md +1 -1
- package/dist/granular/browser_tab-and-window.md +1 -1
- package/dist/granular/desktop_desktop-targeting.md +1 -1
- package/dist/granular/desktop_electron-discovery.md +1 -1
- package/dist/granular/developer_github-forensics.md +1 -1
- package/dist/granular/documents_canvas-and-visual-capture.md +1 -1
- package/dist/granular/documents_office-document-ingestion.md +1 -1
- package/dist/granular/memory_selector-memory-system.md +1 -1
- package/dist/granular/memory_session-trail.md +2 -2
- package/dist/granular/memory_site-learning.md +1 -1
- package/dist/granular/network-and-perf_device-and-environment.md +1 -1
- package/dist/granular/network-and-perf_network-intercept-and-mock.md +2 -2
- package/dist/granular/network-and-perf_performance-and-vitals.md +1 -1
- package/dist/granular/plugins_hooks-and-overrides.md +2 -3
- package/dist/granular/plugins_plugin-runtime.md +63 -60
- package/dist/granular/resilience_loop-breaker.md +1 -1
- package/dist/granular/resilience_session-time-travel.md +1 -1
- package/dist/granular/resilience_stale-ref-recovery.md +1 -1
- package/dist/granular/security_rbac-and-policies.md +1 -1
- package/dist/granular/security_secret-containment-protocol.md +1 -1
- package/documents/canvas-and-visual-capture.md +1 -1
- package/documents/office-document-ingestion.md +1 -1
- package/evals/evaluator.js +2 -2
- package/evals/scenarios.json +8 -7
- package/memory/selector-memory-system.md +1 -1
- package/memory/session-trail.md +2 -2
- package/memory/site-learning.md +1 -1
- package/network-and-perf/device-and-environment.md +1 -1
- package/network-and-perf/network-intercept-and-mock.md +2 -2
- package/network-and-perf/performance-and-vitals.md +1 -1
- package/package.json +73 -73
- package/plugins/hooks-and-overrides.md +2 -3
- package/plugins/plugin-runtime.md +63 -60
- package/resilience/loop-breaker.md +1 -1
- package/resilience/session-time-travel.md +1 -1
- package/resilience/stale-ref-recovery.md +1 -1
- package/security/rbac-and-policies.md +1 -1
- package/security/secret-containment-protocol.md +1 -1
- package/skills.json +426 -431
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Weavetab Complete Enterprise Agent Suite (v2.5.0-beta.
|
|
1
|
+
# Weavetab Complete Enterprise Agent Suite (v2.5.0-beta.5)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -8,1451 +8,1456 @@
|
|
|
8
8
|
|
|
9
9
|
# Weavetab Domain Profile: BROWSER
|
|
10
10
|
|
|
11
|
-
Generated for @weavetab/skills v2.5.0-beta.
|
|
11
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
## dom-strategy
|
|
15
15
|
|
|
16
|
-
# DOM Strategy & Token Conservation Engine
|
|
17
|
-
|
|
18
|
-
When parsing modern web applications, naive DOM dumps can consume 50,000+ tokens and cause agent degradation. Weavetab provides a high-efficiency 4-tier reading architecture.
|
|
16
|
+
# DOM Strategy & Token Conservation Engine
|
|
17
|
+
|
|
18
|
+
When parsing modern web applications, naive DOM dumps can consume 50,000+ tokens and cause agent degradation. Weavetab provides a high-efficiency 4-tier reading architecture.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. The 4-Tier Reading Filter
|
|
23
|
+
|
|
24
|
+
Always select the narrowest tool that satisfies your immediate objective:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
┌───────────────────────────────┐
|
|
28
|
+
│ Do you need full structural │
|
|
29
|
+
│ context or just a target? │
|
|
30
|
+
└──────────────┬────────────────┘
|
|
31
|
+
│
|
|
32
|
+
┌───────────────┴───────────────┐
|
|
33
|
+
▼ ▼
|
|
34
|
+
[Specific Target] [Whole Document]
|
|
35
|
+
│ │
|
|
36
|
+
┌────────┴────────┐ ┌───────┴────────┐
|
|
37
|
+
▼ ▼ ▼ ▼
|
|
38
|
+
Target by text Target by role Read articles Interactive
|
|
39
|
+
or keywords or hierarchy or prose data UI layout
|
|
40
|
+
│ │ │ │
|
|
41
|
+
▼ ▼ ▼ ▼
|
|
42
|
+
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
43
|
+
(lite: true) (lite: true)
|
|
44
|
+
│
|
|
45
|
+
[Sparse / Canvas / WebGL / <5 elements?]
|
|
46
|
+
│
|
|
47
|
+
▼
|
|
48
|
+
`browser_map`
|
|
49
|
+
(visual: "auto")
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Tier 1: Targeted Keyword Jump (`browser_find`)
|
|
53
|
+
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
54
|
+
- **Latency**: Sub-5ms CDP search.
|
|
55
|
+
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"query": "Sign In",
|
|
60
|
+
"matchType": "contains",
|
|
61
|
+
"visibleOnly": true
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
66
|
+
Use `browser_map` when you must understand the interactive structure of the page.
|
|
67
|
+
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
68
|
+
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
69
|
+
- **Viewport Filtering**: Set `"includeOffscreen": false` to only inspect elements currently visible in the active viewport.
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"lite": true,
|
|
74
|
+
"includeOffscreen": false,
|
|
75
|
+
"maxDepth": 6
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Tier 3: Markdown Prose & Data Ingestion (`browser_scrape`)
|
|
80
|
+
Use `browser_scrape` when your objective is reading articles, blog posts, documentation, or legal terms rather than clicking buttons.
|
|
81
|
+
- Converts HTML to clean, semantically structured Markdown.
|
|
82
|
+
- Automatically handles readability filtering and removes advertising/cookie banners.
|
|
83
|
+
|
|
84
|
+
### Tier 4: Set-of-Marks Visual Grounding (`browser_map` with `visual: "auto"`)
|
|
85
|
+
Use when target pages are canvas-heavy, WebGL, Figma, Google Sheets, or when standard `browser_map` returns < 5 interactive elements.
|
|
86
|
+
- Injects temporary numbered badges `[1]…[N]` over interactive elements & canvas regions.
|
|
87
|
+
- Captures an annotated screenshot + returns a structured mark list.
|
|
88
|
+
- **Zero Page Pollution**: Strips badges immediately after capture.
|
|
89
|
+
- **Action**: Pass `"mark": N` to `browser_click` to click the exact element without re-scanning the DOM.
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"visual": "auto"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Tier 5: Runtime State & JavaScript Evaluation (`browser_eval`)
|
|
98
|
+
When DOM nodes are occluded or you need direct access to in-memory window state (e.g. Redux store, localStorage keys, or complex canvas dimensions), use `browser_eval` as an escape hatch:
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"expression": "window.__INITIAL_STATE__ || document.title"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 2. Volatile Ref ID & Visual Mark Navigation
|
|
108
|
+
|
|
109
|
+
Weavetab maps elements to ephemeral handles (`w:NN`) and visual marks (`[1]…[N]`):
|
|
110
|
+
|
|
111
|
+
### Operational Rules:
|
|
112
|
+
1. **Never Construct Speculative CSS Selectors**: If an element has ref `w:14`, pass `"ref": "w:14"` to `browser_click`, `browser_fill`, `browser_type`.
|
|
113
|
+
2. **Visual Mark Targeting**: On canvas or unlabelled elements from `visual: "auto"`, pass `"mark": N` directly to `browser_click({ mark: N })`.
|
|
114
|
+
3. **Lifespan of Handles**: Ref IDs and marks invalidate on page navigation (`browser_navigate`) or heavy SPA re-renders.
|
|
115
|
+
4. **Recovery on Invalidation**: If an action fails with `ELEMENT_NOT_FOUND` or `MARK_NOT_FOUND`, re-run `browser_map({ visual: "auto" })` to refresh active handles.
|
|
19
116
|
|
|
20
|
-
---
|
|
21
117
|
|
|
22
|
-
##
|
|
118
|
+
## form-automation
|
|
23
119
|
|
|
24
|
-
|
|
120
|
+
# Form Automation: Atomic Multi-Field Execution
|
|
121
|
+
|
|
122
|
+
Submitting complex web forms one field at a time wastes agent turns and increases the probability of layout shifts. Weavetab provides atomic multi-field batching and native dropdown selectors.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 1. Atomic Multi-Field Filling (`browser_fill`)
|
|
127
|
+
|
|
128
|
+
`browser_fill` populates multiple inputs, textareas, checkboxes, and radio buttons in a single CDP roundtrip.
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"fields": [
|
|
133
|
+
{
|
|
134
|
+
"ref": "w:12",
|
|
135
|
+
"value": "Anas"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"ref": "w:14",
|
|
139
|
+
"value": "Khezaz"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"ref": "w:16",
|
|
143
|
+
"value": "contact@weavetab.com"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"ref": "w:19",
|
|
147
|
+
"value": true
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Supported Field Value Types:
|
|
154
|
+
- **Text / Search / Email / Tel**: Provide a `string`.
|
|
155
|
+
- **Checkbox**: Provide a `boolean` (`true` to check, `false` to uncheck).
|
|
156
|
+
- **Radio Buttons**: Provide `true` on the matching option ref.
|
|
157
|
+
- **ContentEditable**: Provide a `string` (automatically handles inner text formatting).
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 2. Dropdown & Select Automation (`browser_select`)
|
|
162
|
+
|
|
163
|
+
Standard `<select>` elements and custom dropdowns often fail under simple click-and-type automation. `browser_select` dispatches native CDP change events.
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"ref": "w:31",
|
|
168
|
+
"values": ["enterprise_tier"]
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Multi-Select Support:
|
|
173
|
+
For `<select multiple>` elements, pass an array of option values:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"ref": "w:35",
|
|
178
|
+
"values": ["us-east-1", "eu-central-1"]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 3. Form Submission Best Practices
|
|
185
|
+
|
|
186
|
+
1. **Pre-Validate State**: Before clicking Submit, confirm that required fields have passed HTML5/client-side validation (no active red borders or validation popups).
|
|
187
|
+
2. **Submit via Enter Key vs Click**:
|
|
188
|
+
- If the submit button has a dynamic ref or changes during typing, send `"key": "Enter"` via `browser_key` inside the last filled text field.
|
|
189
|
+
- Otherwise, locate the submit button via `browser_find` and click via `browser_click`.
|
|
190
|
+
3. **Wait for Post-Submission Route**: Always follow form submission with `browser_wait` for URL changes or target DOM confirmation rather than immediately firing subsequent actions.
|
|
25
191
|
|
|
26
|
-
```
|
|
27
|
-
┌───────────────────────────────┐
|
|
28
|
-
│ Do you need full structural │
|
|
29
|
-
│ context or just a target? │
|
|
30
|
-
└──────────────┬────────────────┘
|
|
31
|
-
│
|
|
32
|
-
┌───────────────┴───────────────┐
|
|
33
|
-
▼ ▼
|
|
34
|
-
[Specific Target] [Whole Document]
|
|
35
|
-
│ │
|
|
36
|
-
┌────────┴────────┐ ┌───────┴────────┐
|
|
37
|
-
▼ ▼ ▼ ▼
|
|
38
|
-
Target by text Target by role Read articles Interactive
|
|
39
|
-
or keywords or hierarchy or prose data UI layout
|
|
40
|
-
│ │ │ │
|
|
41
|
-
▼ ▼ ▼ ▼
|
|
42
|
-
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
43
|
-
(lite: true) (lite: true)
|
|
44
|
-
│
|
|
45
|
-
[Sparse / Canvas / WebGL / <5 elements?]
|
|
46
|
-
│
|
|
47
|
-
▼
|
|
48
|
-
`browser_map`
|
|
49
|
-
(visual: "auto")
|
|
50
|
-
```
|
|
51
192
|
|
|
52
|
-
|
|
53
|
-
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
54
|
-
- **Latency**: Sub-5ms CDP search.
|
|
55
|
-
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
193
|
+
## interaction-pipeline
|
|
56
194
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
195
|
+
# Interaction Pipeline: Physical & Synthetic Input Engine
|
|
196
|
+
|
|
197
|
+
Weavetab executes browser interactions via direct Chrome DevTools Protocol (CDP) dispatch, bypassing synthetic JavaScript event limitations and anti-automation tripwires.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## 1. Clicking Elements (`browser_click`)
|
|
202
|
+
|
|
203
|
+
Execute deterministic clicks on DOM elements using volatile handles (`ref`), CSS selectors, or exact coordinates.
|
|
204
|
+
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"ref": "w:23",
|
|
208
|
+
"clickCount": 1,
|
|
209
|
+
"button": "left"
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Advanced Modifiers:
|
|
214
|
+
- **Double Click**: Set `"clickCount": 2` for inline editing or selecting text blocks.
|
|
215
|
+
- **Context Menu**: Set `"button": "right"` to trigger native context menus.
|
|
216
|
+
- **Modifier Keys**: Pass `"modifiers": ["Control"]` or `["Meta"]` for multi-selection or opening links in background tabs.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 2. Text Input (`browser_type`)
|
|
221
|
+
|
|
222
|
+
Simulate natural keystrokes into input fields, textareas, and `contenteditable` elements.
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"ref": "w:18",
|
|
227
|
+
"text": "Enterprise Search Query",
|
|
228
|
+
"clear": true,
|
|
229
|
+
"delay": 20
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
> [!CAUTION]
|
|
234
|
+
> **Secret Boundary Enforcement**:
|
|
235
|
+
> NEVER use `browser_type` for passwords, API tokens, or payment card data. Always route sensitive credentials through [`security/secret-containment-protocol.md`](file:///c:/Users/fy2ne/Music/Weavetab/skills/security/secret-containment-protocol.md) via `browser_type_secret`.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 3. Physical Pointer Trajectories (`browser_pointer`)
|
|
240
|
+
|
|
241
|
+
Handle complex drag-and-drop interactions, canvas sketching, hover-activated navigation flyouts, and custom sliders.
|
|
242
|
+
|
|
243
|
+
### Hover / Mouse Move:
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"action": "move",
|
|
247
|
+
"x": 450,
|
|
248
|
+
"y": 180
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Drag & Drop Pipeline:
|
|
253
|
+
```json
|
|
254
|
+
// Step 1: Move to origin & press mouse
|
|
255
|
+
{ "action": "move", "x": 200, "y": 300 }
|
|
256
|
+
{ "action": "down", "button": "left" }
|
|
257
|
+
|
|
258
|
+
// Step 2: Smooth trajectory to destination
|
|
259
|
+
{ "action": "move", "x": 600, "y": 300 }
|
|
260
|
+
|
|
261
|
+
// Step 3: Release
|
|
262
|
+
{ "action": "up", "button": "left" }
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 4. Keystrokes & Shortcuts (`browser_key`)
|
|
268
|
+
|
|
269
|
+
Trigger keyboard shortcuts, navigation keys, and dialog dismissals.
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"key": "Enter"
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### High-Frequency Key Combos:
|
|
278
|
+
- **Select All & Delete**: Send `"key": "a"`, `"modifiers": ["Control"]` (or `["Meta"]` on macOS), followed by `"key": "Backspace"`.
|
|
279
|
+
- **Dismiss Overlays**: Send `"key": "Escape"`.
|
|
280
|
+
- **Form Tab Navigation**: Send `"key": "Tab"`.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 5. OS File Upload Bypass (`browser_upload`)
|
|
285
|
+
|
|
286
|
+
Native operating system file picker dialogs block autonomous agent execution because they operate outside the browser DOM. Weavetab bypasses this entirely using CDP's `DOM.setFileInputFiles`.
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"ref": "w:41",
|
|
291
|
+
"files": [
|
|
292
|
+
"C:/Users/fy2ne/Documents/contract.pdf",
|
|
293
|
+
"C:/Users/fy2ne/Documents/financial_report.xlsx"
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
- **Targeting**: Supply the volatile handle `ref` or CSS selector for the `<input type="file">`.
|
|
299
|
+
- **Hidden Inputs**: `browser_upload` automatically handles `display: none` file inputs commonly used in custom drag-and-drop upload widgets.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## 6. Viewport & Element Scrolling (`browser_scroll`)
|
|
304
|
+
|
|
305
|
+
Scroll the entire page viewport or scroll specific scrollable containers:
|
|
306
|
+
|
|
307
|
+
```json
|
|
308
|
+
{
|
|
309
|
+
"direction": "down",
|
|
310
|
+
"amount": 500
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Or scroll a specific element container:
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"ref": "w:12",
|
|
318
|
+
"direction": "down",
|
|
319
|
+
"amount": 300
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## 7. Native Dialog Handling (`browser_dialog`)
|
|
326
|
+
|
|
327
|
+
Handle native JavaScript `alert`, `confirm`, `prompt`, or `beforeunload` dialogs that block page execution:
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"action": "accept",
|
|
332
|
+
"promptText": "Confirmed"
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 8. High-Speed Action Batches (`browser_burst`)
|
|
339
|
+
|
|
340
|
+
Execute multiple sequential micro-actions in a single CDP roundtrip without waiting for intermediate LLM turns:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"steps": [
|
|
345
|
+
{ "tool": "browser_fill", "ref": "w:10", "value": "search query" },
|
|
346
|
+
{ "tool": "click_and_wait", "ref": "w:15" }
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
*(Accepts both `steps` and `actions`, with arguments either nested under `args` or specified flat on the step object).*
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## 9. Visual Element Highlighting & Consideration (`browser_highlight`)
|
|
355
|
+
|
|
356
|
+
Draw visual consideration, target lock, danger/success, or shimmer overlays without mutating the DOM. Supports multi-element candidate evaluation:
|
|
357
|
+
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"refs": ["w:12", "w:15", "w:23"],
|
|
361
|
+
"style": "consideration",
|
|
362
|
+
"label": "Evaluating form options",
|
|
363
|
+
"duration": 2000
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Presentation Styles:
|
|
368
|
+
- `"consideration"`: Soft pulsing cyan/blue outline (`#38bdf8`) with ambient glow — ideal when weighing multiple interactive candidates.
|
|
369
|
+
- `"target"`: High-contrast amber lock-on ring (`#f59e0b`) before executing high-impact clicks.
|
|
370
|
+
- `"danger"`: Red warning border (`#ef4444`) for destructive buttons (Delete, Reset, Purge).
|
|
371
|
+
- `"success"`: Emerald glow (`#10b981`) confirming completed actions.
|
|
372
|
+
- `"shimmer"`: Rapid purple accent wave (default for quick inspection).
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 10. System Clipboard Bridging (`browser_clipboard`)
|
|
377
|
+
|
|
378
|
+
Read or write system clipboard text during automation:
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
{
|
|
382
|
+
"action": "write",
|
|
383
|
+
"text": "AuthToken_xyz987"
|
|
384
|
+
}
|
|
63
385
|
```
|
|
64
386
|
|
|
65
|
-
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
66
|
-
Use `browser_map` when you must understand the interactive structure of the page.
|
|
67
|
-
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
68
|
-
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
69
|
-
- **Viewport Filtering**: Set `"includeOffscreen": false` to only inspect elements currently visible in the active viewport.
|
|
70
387
|
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
"lite": true,
|
|
74
|
-
"includeOffscreen": false,
|
|
75
|
-
"maxDepth": 6
|
|
76
|
-
}
|
|
77
|
-
```
|
|
388
|
+
## tab-and-window
|
|
78
389
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
|
|
390
|
+
# Tab & Window Lifecycle Management
|
|
391
|
+
|
|
392
|
+
Multi-tab workflows (OAuth popups, payment gateways, documentation references, desktop application windows) require deterministic tab switching, window focusing, and failure recovery. `browser_tabs` controls all CDP page and window targets.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## 1. Tab Discovery & Target Enumeration
|
|
397
|
+
|
|
398
|
+
Inspect all active targets, open URLs, and page titles:
|
|
399
|
+
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"action": "list"
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
To list targets inside a specific desktop app (e.g. Discord, Slack):
|
|
407
|
+
```json
|
|
408
|
+
{
|
|
409
|
+
"action": "list",
|
|
410
|
+
"app": "discord"
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
> [!TIP]
|
|
415
|
+
> Always pass `"app": "<name>"` when inspecting desktop applications. This guarantees that Weavetab does not launch or query the web browser.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## 2. Opening Tabs & Smart Reuse
|
|
420
|
+
|
|
421
|
+
Open a target URL. By default, `reuse: true` will focus an existing tab if the URL is already loaded:
|
|
422
|
+
|
|
423
|
+
```json
|
|
424
|
+
{
|
|
425
|
+
"action": "open",
|
|
426
|
+
"url": "https://github.com"
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
To force opening a brand-new duplicate tab instead of reusing:
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"action": "open",
|
|
434
|
+
"url": "https://github.com",
|
|
435
|
+
"reuse": false
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## 3. Context Switching
|
|
442
|
+
|
|
443
|
+
Switch active agent focus between open tabs:
|
|
444
|
+
|
|
445
|
+
```json
|
|
446
|
+
{
|
|
447
|
+
"action": "switch",
|
|
448
|
+
"tabId": "TARGET_PAGE_ID"
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## 4. Closing Tabs & Batch Cleanup
|
|
455
|
+
|
|
456
|
+
Close a single tab:
|
|
457
|
+
```json
|
|
458
|
+
{
|
|
459
|
+
"action": "close",
|
|
460
|
+
"tabId": "TARGET_PAGE_ID"
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Close multiple tabs simultaneously in a single round-trip:
|
|
465
|
+
```json
|
|
466
|
+
{
|
|
467
|
+
"action": "close",
|
|
468
|
+
"tabIds": ["TARGET_1", "TARGET_2", "TARGET_3"]
|
|
469
|
+
}
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## 5. Native Window Management
|
|
475
|
+
|
|
476
|
+
List native OS windows:
|
|
477
|
+
```json
|
|
478
|
+
{
|
|
479
|
+
"action": "list_windows"
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Bring a specific native window to the foreground:
|
|
484
|
+
```json
|
|
485
|
+
{
|
|
486
|
+
"action": "focus_window",
|
|
487
|
+
"windowId": 1
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## 6. Duplicate Consolidation & Auto-Heal
|
|
494
|
+
|
|
495
|
+
Deduplicate redundant tabs across the session:
|
|
496
|
+
```json
|
|
497
|
+
{
|
|
498
|
+
"action": "consolidate"
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
If a target page crashes or detaches due to memory limits:
|
|
503
|
+
```json
|
|
504
|
+
{
|
|
505
|
+
"action": "heal"
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
The auto-heal routine re-establishes CDP protocol sessions, reconnects event listeners, and synchronizes the active page target.
|
|
83
510
|
|
|
84
|
-
### Tier 4: Set-of-Marks Visual Grounding (`browser_map` with `visual: "auto"`)
|
|
85
|
-
Use when target pages are canvas-heavy, WebGL, Figma, Google Sheets, or when standard `browser_map` returns < 5 interactive elements.
|
|
86
|
-
- Injects temporary numbered badges `[1]…[N]` over interactive elements & canvas regions.
|
|
87
|
-
- Captures an annotated screenshot + returns a structured mark list.
|
|
88
|
-
- **Zero Page Pollution**: Strips badges immediately after capture.
|
|
89
|
-
- **Action**: Pass `"mark": N` to `browser_click` to click the exact element without re-scanning the DOM.
|
|
90
511
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
```
|
|
512
|
+
# ====================================================
|
|
513
|
+
# DOMAIN: DESKTOP
|
|
514
|
+
# ====================================================
|
|
96
515
|
|
|
97
|
-
|
|
98
|
-
When DOM nodes are occluded or you need direct access to in-memory window state (e.g. Redux store, localStorage keys, or complex canvas dimensions), use `browser_eval` as an escape hatch:
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"expression": "window.__INITIAL_STATE__ || document.title"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
516
|
+
# Weavetab Domain Profile: DESKTOP
|
|
104
517
|
|
|
105
|
-
|
|
518
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
106
519
|
|
|
107
|
-
## 2. Volatile Ref ID & Visual Mark Navigation
|
|
108
520
|
|
|
109
|
-
|
|
521
|
+
## desktop-targeting
|
|
110
522
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
523
|
+
# Desktop App Targeting & Multi-Window Routing
|
|
524
|
+
|
|
525
|
+
Once a desktop application is detected via `browser_detect`, every standard Weavetab tool can be scoped directly to that desktop application without opening or disturbing the user's web browser.
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## 1. Direct App Parameter Routing
|
|
530
|
+
|
|
531
|
+
Pass `"app": "<application_name>"` to target the Electron application.
|
|
532
|
+
|
|
533
|
+
### Example: Reading Discord Channels
|
|
534
|
+
```json
|
|
535
|
+
// Tool: browser_map
|
|
536
|
+
{
|
|
537
|
+
"app": "discord",
|
|
538
|
+
"scope": "main_content"
|
|
539
|
+
}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### Example: Sending a Message in Discord
|
|
543
|
+
```json
|
|
544
|
+
// Tool: browser_type
|
|
545
|
+
{
|
|
546
|
+
"app": "discord",
|
|
547
|
+
"ref": "w:88",
|
|
548
|
+
"text": "Deployment v2.5.0-beta.3 completed successfully."
|
|
549
|
+
}
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
### Example: Listing Discord Tabs/Windows
|
|
553
|
+
```json
|
|
554
|
+
// Tool: browser_tabs
|
|
555
|
+
{
|
|
556
|
+
"action": "list",
|
|
557
|
+
"app": "discord"
|
|
558
|
+
}
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
> [!IMPORTANT]
|
|
562
|
+
> Always pass `"app": "discord"` (or the target app name) to `browser_tabs` when working with desktop apps. This prevents Weavetab from accidentally launching or switching to the web browser.
|
|
563
|
+
|
|
564
|
+
---
|
|
565
|
+
|
|
566
|
+
## 2. Smart Domain Auto-Routing & Sticky Context
|
|
567
|
+
|
|
568
|
+
Weavetab features automatic target resolution to eliminate accidental browser popups:
|
|
569
|
+
|
|
570
|
+
### A. Automatic Domain Matching
|
|
571
|
+
If you call `browser_navigate` or `browser_tabs(action: "open")` with a known domain (e.g. `discord.com`, `slack.com`, `linear.app`, `notion.so`), Weavetab automatically routes the command to the configured Electron desktop application.
|
|
572
|
+
|
|
573
|
+
### B. Sticky App Sessions
|
|
574
|
+
When you interact with an Electron application (e.g., clicking or typing in Discord), Weavetab remembers the active application context. If a subsequent tool call omits `app` and no web browser instance is active, Weavetab stays attached to the active desktop app rather than spawning an unwanted Chrome window.
|
|
575
|
+
|
|
576
|
+
### C. Explicit Browser Override
|
|
577
|
+
If you specifically want to open a URL in the web browser instead of a desktop application, pass `"app": "browser"`.
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
## 3. Multi-Window Focus Management
|
|
582
|
+
|
|
583
|
+
Some Electron apps open secondary windows (e.g. popout editors, settings panels, or call windows).
|
|
584
|
+
|
|
585
|
+
1. Use `browser_tabs(action: "list", app: "discord")` to view all open windows and page targets for that specific app.
|
|
586
|
+
2. Switch focus between windows using `browser_tabs(action: "switch", tabId: "<id>", app: "discord")`.
|
|
587
|
+
3. To bring a specific native window to the foreground, use `browser_tabs(action: "focus_window", windowId: <id>, app: "discord")`.
|
|
116
588
|
|
|
117
589
|
|
|
118
|
-
##
|
|
590
|
+
## electron-discovery
|
|
119
591
|
|
|
120
|
-
#
|
|
592
|
+
# Electron Discovery & Environment Handshake
|
|
593
|
+
|
|
594
|
+
Modern desktop applications (Discord, Slack, VS Code, Notion, Obsidian, Figma) are built on Chromium and Electron. Weavetab can inspect and drive these native applications through standard CDP interfaces without third-party drivers or OS-level accessibility hacks.
|
|
595
|
+
|
|
596
|
+
`browser_detect` is the **critical initialization handshake** tool. Every agent should call `browser_detect` before interacting with the user's desktop environment to gain immediate situational awareness.
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
## 1. Running Discovery via `browser_detect`
|
|
601
|
+
|
|
602
|
+
Call `browser_detect` with empty parameters `{}`:
|
|
603
|
+
|
|
604
|
+
```json
|
|
605
|
+
{}
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### Response Schema:
|
|
609
|
+
```json
|
|
610
|
+
{
|
|
611
|
+
"available": [
|
|
612
|
+
{
|
|
613
|
+
"engine": "chromium",
|
|
614
|
+
"name": "Google Chrome",
|
|
615
|
+
"path": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"current": "chromium",
|
|
619
|
+
"configuredApps": [
|
|
620
|
+
{
|
|
621
|
+
"name": "discord",
|
|
622
|
+
"status": "running_no_debug",
|
|
623
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Discord\\app-1.0.9256\\Discord.exe"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "slack",
|
|
627
|
+
"status": "connected",
|
|
628
|
+
"port": 9222,
|
|
629
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\slack\\app-4.38.125\\slack.exe",
|
|
630
|
+
"activeTabs": [
|
|
631
|
+
{
|
|
632
|
+
"id": "PAGE_1",
|
|
633
|
+
"title": "general - Weavetab Slack",
|
|
634
|
+
"url": "https://app.slack.com/client/..."
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "vscode",
|
|
640
|
+
"status": "offline",
|
|
641
|
+
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
"toolCoverage": {
|
|
645
|
+
"chromium": 100,
|
|
646
|
+
"firefox": 78,
|
|
647
|
+
"webkit": 55
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
---
|
|
653
|
+
|
|
654
|
+
## 2. Understanding Application Status
|
|
655
|
+
|
|
656
|
+
Each configured desktop app reports one of three distinct lifecycle statuses:
|
|
657
|
+
|
|
658
|
+
| Status | Meaning | Agent Action |
|
|
659
|
+
| :--- | :--- | :--- |
|
|
660
|
+
| **`connected`** | App is running with CDP remote debugging active. Weavetab has an active session. | Immediately interact using any tool with `"app": "<name>"`. Tabs and port are available. |
|
|
661
|
+
| **`running_no_debug`** | The app process is currently open on the user's OS, but was launched normally by the user without `--remote-debugging-port`. | Do NOT send click/type commands. To attach, inform the user or close and launch via `browser_navigate(app: "<name>")` so Weavetab supplies the debugging port. |
|
|
662
|
+
| **`offline`** | The application is not currently running on the OS. | Launch and attach in one step by calling `browser_navigate(app: "<name>")`. |
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
## 3. Dynamic Squirrel Updates on Windows
|
|
667
|
+
|
|
668
|
+
On Windows, Squirrel-managed applications (Discord, Slack, Teams) update dynamically into versioned sibling directories (e.g. `Discord\app-1.0.9256\Discord.exe`).
|
|
669
|
+
|
|
670
|
+
Weavetab automatically handles this:
|
|
671
|
+
- If a configured path points to an outdated version or the parent folder, Weavetab scans the directory, resolves the highest semantic version folder (`app-1.0.xxxx`), and launches the valid executable.
|
|
672
|
+
- The dynamically resolved path is reported in `browser_detect` under `configuredPath`.
|
|
673
|
+
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
## 4. Launching Desktop Apps Manually with Debugging
|
|
677
|
+
|
|
678
|
+
If the user prefers to launch apps manually from a terminal or shortcut with remote debugging enabled:
|
|
679
|
+
|
|
680
|
+
```bash
|
|
681
|
+
# Discord
|
|
682
|
+
Discord.exe --remote-debugging-port=9222
|
|
683
|
+
|
|
684
|
+
# Slack
|
|
685
|
+
slack.exe --remote-debugging-port=9223
|
|
686
|
+
|
|
687
|
+
# VS Code
|
|
688
|
+
code.exe --remote-debugging-port=9225
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
Once launched with `--remote-debugging-port`, `browser_detect` immediately reflects the application as connectable.
|
|
121
692
|
|
|
122
|
-
Submitting complex web forms one field at a time wastes agent turns and increases the probability of layout shifts. Weavetab provides atomic multi-field batching and native dropdown selectors.
|
|
123
693
|
|
|
124
|
-
|
|
694
|
+
# ====================================================
|
|
695
|
+
# DOMAIN: MEMORY
|
|
696
|
+
# ====================================================
|
|
125
697
|
|
|
126
|
-
|
|
698
|
+
# Weavetab Domain Profile: MEMORY
|
|
127
699
|
|
|
128
|
-
|
|
700
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
129
701
|
|
|
130
|
-
```json
|
|
131
|
-
{
|
|
132
|
-
"fields": [
|
|
133
|
-
{
|
|
134
|
-
"ref": "w:12",
|
|
135
|
-
"value": "Anas"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"ref": "w:14",
|
|
139
|
-
"value": "Khezaz"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"ref": "w:16",
|
|
143
|
-
"value": "contact@weavetab.com"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"ref": "w:19",
|
|
147
|
-
"value": true
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
702
|
|
|
153
|
-
|
|
154
|
-
- **Text / Search / Email / Tel**: Provide a `string`.
|
|
155
|
-
- **Checkbox**: Provide a `boolean` (`true` to check, `false` to uncheck).
|
|
156
|
-
- **Radio Buttons**: Provide `true` on the matching option ref.
|
|
157
|
-
- **ContentEditable**: Provide a `string` (automatically handles inner text formatting).
|
|
703
|
+
## selector-memory-system
|
|
158
704
|
|
|
159
|
-
|
|
705
|
+
# Two-Tier Memory System
|
|
706
|
+
|
|
707
|
+
Weavetab operates a two-tier persistent memory system. Understanding both layers prevents wasted DOM traversals and makes agents dramatically faster across sessions.
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
## Tier 1 — Selector Confidence Cache (`~/.weavetab-system/memory/`)
|
|
712
|
+
|
|
713
|
+
Per-domain JSON files (one per hostname) track individual element selectors and their interaction history.
|
|
714
|
+
|
|
715
|
+
Every time an element is located and interacted with, Weavetab calculates a confidence score based on:
|
|
716
|
+
1. **Attribute Stability**: Prefers `data-testid`, `id`, `aria-label`, and semantic roles over dynamic Tailwind/CSS-module class strings.
|
|
717
|
+
2. **Success Count**: Selectors that successfully trigger navigation or state changes gain reinforcement.
|
|
718
|
+
3. **Origin Isolation**: Learned selectors are strictly namespaced to the origin to prevent cross-site contamination.
|
|
719
|
+
|
|
720
|
+
### Strike Degradation
|
|
721
|
+
- **Strike 1**: Marked as degraded — falls back to secondary candidates or fuzzy label match.
|
|
722
|
+
- **Strike 2**: Deprecated — immediate fallback to full DOM inspection via `browser_find` or `browser_map`.
|
|
723
|
+
- **Strike 3**: Purged from memory cache to prevent stale lookups.
|
|
724
|
+
|
|
725
|
+
### Agent Discipline for Tier 1
|
|
726
|
+
1. **Rely on Native Tool Resolution**: When you pass a `ref`, Weavetab queries both the active volatile registry and the Tier 1 memory cache automatically.
|
|
727
|
+
2. **Don't Hardcode Fragile Selectors**: Never pass brittle absolute CSS paths like `div:nth-child(3) > ul > li:nth-child(2) > button`.
|
|
728
|
+
3. **Trust Heuristic Recovery**: If a button moves slightly on the page, the underlying engine re-anchors before reporting failure.
|
|
729
|
+
|
|
730
|
+
---
|
|
731
|
+
|
|
732
|
+
## Tier 2 — Site Profiles & Workflow Patterns (`~/.weavetab-system/memory/sites/`)
|
|
733
|
+
|
|
734
|
+
One JSON file per origin stores named multi-step workflow patterns, site quirks, and reliability scores. This is the **Intelligent Memory** layer — agents learn entire flows, not just individual selectors.
|
|
735
|
+
|
|
736
|
+
### Checking a Site Profile at Session Start
|
|
737
|
+
Always call `browser_pattern_learn` with `action: "get"` when starting an automation session on a site you may have visited before:
|
|
738
|
+
|
|
739
|
+
```json
|
|
740
|
+
{ "origin": "https://github.com" }
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Response tells you:
|
|
744
|
+
- `known_patterns`: named flows with reliability scores and step counts
|
|
745
|
+
- `quirks`: known cookie banners, rate limits, modal popups to handle automatically
|
|
746
|
+
- `framework`: detected frontend stack
|
|
747
|
+
- `_hint`: compact hint string summarizing everything
|
|
748
|
+
|
|
749
|
+
### Fast-Path Decision Rule
|
|
750
|
+
| Reliability | Action |
|
|
751
|
+
|---|---|
|
|
752
|
+
| **≥ 0.8** | Use pattern steps directly via `browser_burst` — skip exploratory navigation |
|
|
753
|
+
| **0.5 – 0.79** | Attempt pattern but verify success indicator before moving on |
|
|
754
|
+
| **< 0.5 or strikes ≥ 3** | Ignore pattern, re-explore from scratch, then teach via `browser_pattern_learn` |
|
|
755
|
+
|
|
756
|
+
### Teaching a New Pattern After Completing a Workflow
|
|
757
|
+
After successfully completing a multi-step flow:
|
|
758
|
+
|
|
759
|
+
```json
|
|
760
|
+
{
|
|
761
|
+
"origin": "https://github.com",
|
|
762
|
+
"action": "learn",
|
|
763
|
+
"name": "login_flow",
|
|
764
|
+
"steps": [
|
|
765
|
+
{ "tool": "browser_click", "target": ".btn-login" },
|
|
766
|
+
{ "tool": "browser_fill", "target": "#login_field", "value": "{{username}}" },
|
|
767
|
+
{ "tool": "browser_fill", "target": "#password", "value": "{{password}}" },
|
|
768
|
+
{ "tool": "browser_click", "target": "[type=submit]" }
|
|
769
|
+
],
|
|
770
|
+
"success_indicator": "a[aria-label='Homepage']"
|
|
771
|
+
}
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
### Recording Execution Outcomes (Reliability Upkeep)
|
|
775
|
+
After replaying a pattern, always report the outcome:
|
|
776
|
+
|
|
777
|
+
```json
|
|
778
|
+
{
|
|
779
|
+
"origin": "https://github.com",
|
|
780
|
+
"action": "record_execution",
|
|
781
|
+
"name": "login_flow",
|
|
782
|
+
"success": true,
|
|
783
|
+
"duration_ms": 3200
|
|
784
|
+
}
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### Recording Site Quirks
|
|
788
|
+
When you discover a cookie banner or rate limit:
|
|
789
|
+
|
|
790
|
+
```json
|
|
791
|
+
{
|
|
792
|
+
"origin": "https://github.com",
|
|
793
|
+
"action": "record_quirk",
|
|
794
|
+
"quirk_key": "cookie_banner",
|
|
795
|
+
"quirk_data": { "selector": "#cookie-consent", "action": "click .accept-all", "appears": "first_visit" }
|
|
796
|
+
}
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
On future visits, the quirk is present in the profile so you can dismiss banners before starting your main workflow — zero wasted agent turns.
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## File Locations (Never Write to ~/.weavetab/)
|
|
804
|
+
|
|
805
|
+
| Tier | Path | Owner |
|
|
806
|
+
|---|---|---|
|
|
807
|
+
| Tier 1 selectors | `~/.weavetab-system/memory/<hostname>.json` | Engine (auto) |
|
|
808
|
+
| Tier 2 site profiles | `~/.weavetab-system/memory/sites/<origin>.json` | Engine via `browser_pattern_learn` |
|
|
809
|
+
| Knowledge hints | `~/.weavetab-system/knowledge/<hostname>.md` | Engine (auto, 20-token notes) |
|
|
810
|
+
| User config | `~/.weavetab/config.json` | Human — never written by agents |
|
|
160
811
|
|
|
161
|
-
## 2. Dropdown & Select Automation (`browser_select`)
|
|
162
812
|
|
|
163
|
-
|
|
813
|
+
## session-trail
|
|
164
814
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
815
|
+
# Session Trails & Deterministic Macro Compilation
|
|
816
|
+
|
|
817
|
+
When an agent executes an exploratory workflow (e.g. logging into a dashboard, navigating to analytics, setting date filters, and downloading a CSV), re-running that flow autonomously in the future should not require 15 reasoning steps.
|
|
818
|
+
|
|
819
|
+
`browser_burst` with `compile_from_history: true` automatically converts recent successful session actions into a high-performance, deterministic execution script.
|
|
820
|
+
|
|
821
|
+
---
|
|
822
|
+
|
|
823
|
+
## 1. Compiling and Replaying Recent Actions (`browser_burst`)
|
|
824
|
+
|
|
825
|
+
Replay recent successful actions directly in a single turn:
|
|
826
|
+
|
|
827
|
+
```json
|
|
828
|
+
{
|
|
829
|
+
"compile_from_history": true
|
|
830
|
+
}
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
Or pass `dry_run: true` to inspect the compiled macro steps before running them:
|
|
834
|
+
|
|
835
|
+
```json
|
|
836
|
+
{
|
|
837
|
+
"compile_from_history": true,
|
|
838
|
+
"dry_run": true,
|
|
839
|
+
"history_limit": 15
|
|
840
|
+
}
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
### Response Example:
|
|
844
|
+
```json
|
|
845
|
+
{
|
|
846
|
+
"success": true,
|
|
847
|
+
"steps_completed": 0,
|
|
848
|
+
"compiled_steps": [
|
|
849
|
+
{ "tool": "browser_navigate", "args": { "url": "https://analytics.example.com" } },
|
|
850
|
+
{ "tool": "browser_fill", "args": { "ref": "w:12", "value": "metrics" } },
|
|
851
|
+
{ "tool": "click_and_wait", "args": { "ref": "w:15" } }
|
|
852
|
+
],
|
|
853
|
+
"message": "compiled 3 macro steps from history"
|
|
854
|
+
}
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
---
|
|
858
|
+
|
|
859
|
+
## 2. Parameterizing Variable Inputs
|
|
860
|
+
|
|
861
|
+
When `"parameterizeInputs": true` is passed:
|
|
862
|
+
- Text inputs and dates entered during the exploratory session are replaced with named parameters.
|
|
863
|
+
- Secrets entered via `browser_type_secret` are never hardcoded; they are replaced with environment variable or secret lookups.
|
|
864
|
+
|
|
865
|
+
---
|
|
866
|
+
|
|
867
|
+
## 3. Replaying Compiled Automations
|
|
868
|
+
|
|
869
|
+
Compiled macros can be executed in sub-second time without LLM inference overhead using `browser_automation`:
|
|
870
|
+
|
|
871
|
+
```json
|
|
872
|
+
{
|
|
873
|
+
"macroId": "macro_8f7b2c",
|
|
874
|
+
"parameters": {
|
|
875
|
+
"startDate": "2026-09-01",
|
|
876
|
+
"endDate": "2026-09-03"
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
---
|
|
882
|
+
|
|
883
|
+
## 4. Emitting Operational Thoughts (`browser_thoughts`)
|
|
884
|
+
|
|
885
|
+
Log agent rationale and internal reasoning directly to the Weavetab HUD and telemetry stream without bloating user chat responses:
|
|
886
|
+
|
|
887
|
+
```json
|
|
888
|
+
{
|
|
889
|
+
"thought": "Detected dynamic React hydration delay. Holding interaction until DOM mutation settles."
|
|
890
|
+
}
|
|
170
891
|
```
|
|
171
892
|
|
|
172
|
-
### Multi-Select Support:
|
|
173
|
-
For `<select multiple>` elements, pass an array of option values:
|
|
174
893
|
|
|
175
|
-
|
|
176
|
-
{
|
|
177
|
-
"ref": "w:35",
|
|
178
|
-
"values": ["us-east-1", "eu-central-1"]
|
|
179
|
-
}
|
|
180
|
-
```
|
|
894
|
+
## site-learning
|
|
181
895
|
|
|
182
|
-
|
|
896
|
+
# Site Learning — Autonomous Workflow Memory
|
|
183
897
|
|
|
184
|
-
|
|
898
|
+
Weavetab's Site Learning engine accumulates cross-session knowledge about websites and multi-step automation flows. Each site gets one profile file at ~/.weavetab-system/memory/sites/<origin>.json — never duplicated, always merged on write.
|
|
185
899
|
|
|
186
|
-
|
|
187
|
-
2. **Submit via Enter Key vs Click**:
|
|
188
|
-
- If the submit button has a dynamic ref or changes during typing, send `"key": "Enter"` via `browser_key` inside the last filled text field.
|
|
189
|
-
- Otherwise, locate the submit button via `browser_find` and click via `browser_click`.
|
|
190
|
-
3. **Wait for Post-Submission Route**: Always follow form submission with `browser_wait` for URL changes or target DOM confirmation rather than immediately firing subsequent actions.
|
|
900
|
+
---
|
|
191
901
|
|
|
902
|
+
## 1. Session Start Protocol
|
|
192
903
|
|
|
193
|
-
|
|
904
|
+
On every session visiting a known or potentially-known site, run:
|
|
194
905
|
|
|
195
|
-
|
|
906
|
+
`json
|
|
907
|
+
{ "tool": "browser_pattern_learn", "action": "get", "origin": "https://github.com" }
|
|
908
|
+
`
|
|
196
909
|
|
|
197
|
-
|
|
910
|
+
Parse the response:
|
|
911
|
+
- known: false → site is new, proceed exploratorily, teach after completion
|
|
912
|
+
- known_patterns → list of named workflows with reliability scores
|
|
913
|
+
- quirks → auto-handle any listed quirks (cookie banners, rate limits) before main task
|
|
914
|
+
- ramework → adjust interaction strategy accordingly (React, Vue, etc.)
|
|
198
915
|
|
|
199
916
|
---
|
|
200
917
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
Execute deterministic clicks on DOM elements using volatile handles (`ref`), CSS selectors, or exact coordinates.
|
|
918
|
+
## 2. Fast-Path vs. Exploratory Decision
|
|
204
919
|
|
|
205
|
-
|
|
206
|
-
{
|
|
207
|
-
"ref": "w:23",
|
|
208
|
-
"clickCount": 1,
|
|
209
|
-
"button": "left"
|
|
210
|
-
}
|
|
211
|
-
```
|
|
920
|
+
Use the _hint field or individual
|
|
212
921
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
922
|
+
| Reliability | Strikes | Strategy |
|
|
923
|
+
|---|---|---|
|
|
924
|
+
| ≥ 0.8, strikes = 0 | ✓ | **Fast path**: replay steps via rowser_burst directly |
|
|
925
|
+
| 0.5–0.79 | 0–1 | **Cautious path**: replay steps, verify success_indicator after each critical step |
|
|
926
|
+
| < 0.5 | any | **Re-explore**: navigate manually, collect correct steps, then teach |
|
|
927
|
+
| any | ≥ 3 | **Re-learn**: ignore cached pattern, re-explore, then call rowser_pattern_learn with updated steps |
|
|
217
928
|
|
|
218
929
|
---
|
|
219
930
|
|
|
220
|
-
##
|
|
931
|
+
## 3. Quirk Auto-Handling
|
|
221
932
|
|
|
222
|
-
|
|
933
|
+
If a profile has known quirks, resolve them immediately after navigation before executing your main task:
|
|
223
934
|
|
|
224
|
-
|
|
225
|
-
{
|
|
226
|
-
|
|
227
|
-
"text": "Enterprise Search Query",
|
|
228
|
-
"clear": true,
|
|
229
|
-
"delay": 20
|
|
230
|
-
}
|
|
231
|
-
```
|
|
935
|
+
`
|
|
936
|
+
Profile quirks: { cookie_banner: { selector: "#cookie-consent", action: "click .accept-all", appears: "first_visit" } }
|
|
937
|
+
`
|
|
232
938
|
|
|
233
|
-
|
|
234
|
-
> **Secret Boundary Enforcement**:
|
|
235
|
-
> NEVER use `browser_type` for passwords, API tokens, or payment card data. Always route sensitive credentials through [`security/secret-containment-protocol.md`](file:///c:/Users/fy2ne/Music/Weavetab/skills/security/secret-containment-protocol.md) via `browser_type_secret`.
|
|
939
|
+
Execute the action before doing anything else. Never spend reasoning turns on a known dismissible popup.
|
|
236
940
|
|
|
237
941
|
---
|
|
238
942
|
|
|
239
|
-
##
|
|
943
|
+
## 4. Teaching a Workflow Pattern
|
|
240
944
|
|
|
241
|
-
|
|
945
|
+
After successfully completing a multi-step flow for the first time (or after re-learning):
|
|
242
946
|
|
|
243
|
-
|
|
244
|
-
```json
|
|
947
|
+
`json
|
|
245
948
|
{
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
949
|
+
"tool": "browser_pattern_learn",
|
|
950
|
+
"origin": "https://github.com",
|
|
951
|
+
"action": "learn",
|
|
952
|
+
"name": "login_flow",
|
|
953
|
+
"steps": [
|
|
954
|
+
{ "tool": "browser_navigate", "target": "https://github.com/login" },
|
|
955
|
+
{ "tool": "browser_fill", "target": "#login_field", "value": "{{username}}" },
|
|
956
|
+
{ "tool": "browser_fill", "target": "#password", "value": "{{password}}" },
|
|
957
|
+
{ "tool": "browser_click", "target": "[type=submit]" }
|
|
958
|
+
],
|
|
959
|
+
"success_indicator": "a[aria-label='Homepage']",
|
|
960
|
+
"entry": "/login"
|
|
249
961
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
### Drag & Drop Pipeline:
|
|
253
|
-
```json
|
|
254
|
-
// Step 1: Move to origin & press mouse
|
|
255
|
-
{ "action": "move", "x": 200, "y": 300 }
|
|
256
|
-
{ "action": "down", "button": "left" }
|
|
962
|
+
`
|
|
257
963
|
|
|
258
|
-
|
|
259
|
-
|
|
964
|
+
**Pattern Naming Rules**:
|
|
965
|
+
- Use snake_case
|
|
966
|
+
- Be descriptive: login_flow, pr_review, csv_export, checkout_flow
|
|
967
|
+
- Duplicate name on same origin = **update** (merge), never creates a second pattern
|
|
260
968
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
969
|
+
**Step Quality Rules**:
|
|
970
|
+
- Use semantic selectors: data-testid, id, ria-label, readable text-based selectors
|
|
971
|
+
- Avoid: .hash_abc123, div:nth-child(4), deep anonymous chains like div > div > div > span
|
|
972
|
+
(the engine automatically drops volatile selectors during compilation)
|
|
973
|
+
- For sensitive inputs, record the step with a placeholder like {{username}} — never hardcode credentials
|
|
264
974
|
|
|
265
975
|
---
|
|
266
976
|
|
|
267
|
-
##
|
|
977
|
+
## 5. Reliability Upkeep After Replay
|
|
268
978
|
|
|
269
|
-
|
|
979
|
+
Every time you replay a pattern, report the outcome:
|
|
270
980
|
|
|
271
|
-
|
|
981
|
+
`json
|
|
272
982
|
{
|
|
273
|
-
"
|
|
983
|
+
"tool": "browser_pattern_learn",
|
|
984
|
+
"origin": "https://github.com",
|
|
985
|
+
"action": "record_execution",
|
|
986
|
+
"name": "login_flow",
|
|
987
|
+
"success": true,
|
|
988
|
+
"duration_ms": 3100
|
|
274
989
|
}
|
|
275
|
-
|
|
990
|
+
`
|
|
276
991
|
|
|
277
|
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
- **Form Tab Navigation**: Send `"key": "Tab"`.
|
|
992
|
+
The engine uses EWMA (α=0.15) to update the reliability score:
|
|
993
|
+
- Success run → reliability climbs toward 1.0 slowly
|
|
994
|
+
- Failure run → reliability drops; 3 consecutive failures trigger [RE-LEARN NEEDED] flag
|
|
281
995
|
|
|
282
996
|
---
|
|
283
997
|
|
|
284
|
-
##
|
|
998
|
+
## 6. Recording a New Quirk
|
|
285
999
|
|
|
286
|
-
|
|
1000
|
+
When you encounter a cookie consent modal, popup, or rate limit for the first time:
|
|
287
1001
|
|
|
288
|
-
|
|
1002
|
+
`json
|
|
289
1003
|
{
|
|
290
|
-
"
|
|
291
|
-
"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
1004
|
+
"tool": "browser_pattern_learn",
|
|
1005
|
+
"origin": "https://example.com",
|
|
1006
|
+
"action": "record_quirk",
|
|
1007
|
+
"quirk_key": "cookie_banner",
|
|
1008
|
+
"quirk_data": {
|
|
1009
|
+
"selector": "#cookie-consent",
|
|
1010
|
+
"action": "click .accept-all",
|
|
1011
|
+
"appears": "first_visit"
|
|
1012
|
+
}
|
|
295
1013
|
}
|
|
296
|
-
|
|
1014
|
+
`
|
|
1015
|
+
|
|
1016
|
+
Supported quirk_key values: cookie_banner,
|
|
297
1017
|
|
|
298
|
-
|
|
299
|
-
|
|
1018
|
+
For rate limits:
|
|
1019
|
+
`json
|
|
1020
|
+
{
|
|
1021
|
+
"quirk_key": "rate_limit",
|
|
1022
|
+
"quirk_data": { "threshold": "60req/min", "recovery": "wait 30s" }
|
|
1023
|
+
}
|
|
1024
|
+
`
|
|
300
1025
|
|
|
301
1026
|
---
|
|
302
1027
|
|
|
303
|
-
##
|
|
1028
|
+
## 7. Anti-Patterns to Avoid
|
|
304
1029
|
|
|
305
|
-
|
|
1030
|
+
- **Never create per-session pattern names** like login_2026_09_16 — one name per workflow per origin, forever updated in place.
|
|
1031
|
+
- **Never call rowser_pattern_learn in a loop** — one call per workflow completion. The write is idempotent (skips disk write if nothing changed).
|
|
1032
|
+
- **Never store credentials in steps** — use placeholders or rowser_type_secret in actual execution.
|
|
1033
|
+
- **Never write to ~/.weavetab/** — all memory belongs in ~/.weavetab-system/memory/sites/.
|
|
306
1034
|
|
|
307
|
-
|
|
308
|
-
{
|
|
309
|
-
"direction": "down",
|
|
310
|
-
"amount": 500
|
|
311
|
-
}
|
|
312
|
-
```
|
|
1035
|
+
---
|
|
313
1036
|
|
|
314
|
-
|
|
315
|
-
```json
|
|
316
|
-
{
|
|
317
|
-
"ref": "w:12",
|
|
318
|
-
"direction": "down",
|
|
319
|
-
"amount": 300
|
|
320
|
-
}
|
|
321
|
-
```
|
|
1037
|
+
## 8. Full Session Example: GitHub PR Review
|
|
322
1038
|
|
|
323
|
-
|
|
1039
|
+
`
|
|
1040
|
+
1. browser_pattern_learn { action: "get", origin: "https://github.com" }
|
|
1041
|
+
→ patterns: { pr_review: { reliability: 0.95, steps: 3 } }
|
|
1042
|
+
→ quirks: {} (none)
|
|
324
1043
|
|
|
325
|
-
|
|
1044
|
+
2. Since reliability=0.95 (≥ 0.8): use fast path
|
|
1045
|
+
browser_burst with the 3 stored steps
|
|
326
1046
|
|
|
327
|
-
|
|
1047
|
+
3. After completion:
|
|
1048
|
+
browser_pattern_learn {
|
|
1049
|
+
action: "record_execution",
|
|
1050
|
+
name: "pr_review",
|
|
1051
|
+
success: true,
|
|
1052
|
+
duration_ms: 2800
|
|
1053
|
+
}
|
|
1054
|
+
`
|
|
328
1055
|
|
|
329
|
-
|
|
330
|
-
{
|
|
331
|
-
"action": "accept",
|
|
332
|
-
"promptText": "Confirmed"
|
|
333
|
-
}
|
|
334
|
-
```
|
|
1056
|
+
Total agent turns for a known site: **3 tool calls** vs. potentially 12+ with full exploration.
|
|
335
1057
|
|
|
336
|
-
---
|
|
337
1058
|
|
|
338
|
-
|
|
1059
|
+
# ====================================================
|
|
1060
|
+
# DOMAIN: RESILIENCE
|
|
1061
|
+
# ====================================================
|
|
339
1062
|
|
|
340
|
-
|
|
1063
|
+
# Weavetab Domain Profile: RESILIENCE
|
|
341
1064
|
|
|
342
|
-
|
|
343
|
-
{
|
|
344
|
-
"steps": [
|
|
345
|
-
{ "tool": "browser_fill", "ref": "w:10", "value": "search query" },
|
|
346
|
-
{ "tool": "click_and_wait", "ref": "w:15" }
|
|
347
|
-
]
|
|
348
|
-
}
|
|
349
|
-
```
|
|
350
|
-
*(Accepts both `steps` and `actions`, with arguments either nested under `args` or specified flat on the step object).*
|
|
1065
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
351
1066
|
|
|
352
|
-
---
|
|
353
1067
|
|
|
354
|
-
##
|
|
1068
|
+
## loop-breaker
|
|
1069
|
+
|
|
1070
|
+
# Loop Breaker & CAPTCHA Escalation Protocol
|
|
1071
|
+
|
|
1072
|
+
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.
|
|
1073
|
+
|
|
1074
|
+
---
|
|
1075
|
+
|
|
1076
|
+
## 1. Loop Detection & Strike Reset (`browser_map`)
|
|
1077
|
+
|
|
1078
|
+
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`.
|
|
1079
|
+
|
|
1080
|
+
### How to Break the Loop:
|
|
1081
|
+
1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
|
|
1082
|
+
```json
|
|
1083
|
+
{ "action": "read" }
|
|
1084
|
+
```
|
|
1085
|
+
Or use `browser_map` to see if a validation banner or unhandled modal appeared.
|
|
1086
|
+
2. **Reset the Circuit Breaker**:
|
|
1087
|
+
- Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
|
|
1088
|
+
```json
|
|
1089
|
+
{ "force": true }
|
|
1090
|
+
```
|
|
1091
|
+
|
|
1092
|
+
---
|
|
1093
|
+
|
|
1094
|
+
## 2. CAPTCHA Handling Protocol (`browser_captcha`)
|
|
1095
|
+
|
|
1096
|
+
When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
|
|
1097
|
+
|
|
1098
|
+
Invoke `browser_captcha` to analyze and manage the challenge:
|
|
1099
|
+
|
|
1100
|
+
```json
|
|
1101
|
+
{
|
|
1102
|
+
"action": "detect"
|
|
1103
|
+
}
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
### Response Example:
|
|
1107
|
+
```json
|
|
1108
|
+
{
|
|
1109
|
+
"detected": true,
|
|
1110
|
+
"type": "turnstile",
|
|
1111
|
+
"provider": "cloudflare",
|
|
1112
|
+
"interactive": true,
|
|
1113
|
+
"ref": "w:99"
|
|
1114
|
+
}
|
|
1115
|
+
```
|
|
1116
|
+
|
|
1117
|
+
### Action Strategy:
|
|
1118
|
+
1. If the challenge is interactive and requires human intervention (e.g. image classification), inform the user cleanly or request human bypass.
|
|
1119
|
+
2. If the challenge is a simple checkbox Turnstile widget, pass `"action": "solve"` or click the detected widget ref with `browser_click`.
|
|
355
1120
|
|
|
356
|
-
Draw visual consideration, target lock, danger/success, or shimmer overlays without mutating the DOM. Supports multi-element candidate evaluation:
|
|
357
1121
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
1122
|
+
## session-time-travel
|
|
1123
|
+
|
|
1124
|
+
# Session Time-Travel & Instant State Rollback
|
|
1125
|
+
|
|
1126
|
+
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.
|
|
1127
|
+
|
|
1128
|
+
`browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
|
|
1129
|
+
|
|
1130
|
+
---
|
|
1131
|
+
|
|
1132
|
+
## 1. What a Checkpoint Captures
|
|
1133
|
+
|
|
1134
|
+
A single named checkpoint atomically preserves:
|
|
1135
|
+
- **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
|
|
1136
|
+
- **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
|
|
1137
|
+
- **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
|
|
1138
|
+
|
|
1139
|
+
---
|
|
1140
|
+
|
|
1141
|
+
## 2. Checkpoint Operations
|
|
1142
|
+
|
|
1143
|
+
### A. Saving a Checkpoint (`save`)
|
|
1144
|
+
Create a checkpoint right before undertaking risky, branching, or destructive actions:
|
|
1145
|
+
|
|
1146
|
+
```json
|
|
1147
|
+
{
|
|
1148
|
+
"action": "save",
|
|
1149
|
+
"name": "pre_checkout_authenticated"
|
|
1150
|
+
}
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
### B. Restoring a Checkpoint (`restore`)
|
|
1154
|
+
If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
|
|
1155
|
+
|
|
1156
|
+
```json
|
|
1157
|
+
{
|
|
1158
|
+
"action": "restore",
|
|
1159
|
+
"name": "pre_checkout_authenticated"
|
|
1160
|
+
}
|
|
1161
|
+
```
|
|
1162
|
+
*Latency: ~15ms*. The page navigates back to the checkpoint URL with cookies and storage atomically injected.
|
|
1163
|
+
|
|
1164
|
+
### C. Listing Checkpoints (`list`)
|
|
1165
|
+
Inspect all active checkpoints for the current page target:
|
|
1166
|
+
|
|
1167
|
+
```json
|
|
1168
|
+
{
|
|
1169
|
+
"action": "list"
|
|
1170
|
+
}
|
|
1171
|
+
```
|
|
1172
|
+
|
|
1173
|
+
### D. Cleaning Up (`delete`)
|
|
1174
|
+
Free memory once a workflow has concluded:
|
|
1175
|
+
|
|
1176
|
+
```json
|
|
1177
|
+
{
|
|
1178
|
+
"action": "delete",
|
|
1179
|
+
"name": "pre_checkout_authenticated"
|
|
1180
|
+
}
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
---
|
|
1184
|
+
|
|
1185
|
+
## 3. High-Leverage Agent Pattern
|
|
1186
|
+
|
|
1187
|
+
```
|
|
1188
|
+
1. Authenticate to Target Portal
|
|
1189
|
+
2. browser_checkpoint({ action: "save", name: "auth_ready" })
|
|
1190
|
+
3. Attempt automated action sequence (e.g. form filling or testing)
|
|
1191
|
+
4. IF error occurs:
|
|
1192
|
+
browser_checkpoint({ action: "restore", name: "auth_ready" })
|
|
1193
|
+
-> Agent is immediately back at authenticated state without re-login!
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
---
|
|
1197
|
+
|
|
1198
|
+
## 4. Fine-Grained Cookie Management (`browser_cookies`)
|
|
1199
|
+
|
|
1200
|
+
Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
|
|
1201
|
+
|
|
1202
|
+
```json
|
|
1203
|
+
{
|
|
1204
|
+
"action": "get",
|
|
1205
|
+
"urls": ["https://example.com"]
|
|
1206
|
+
}
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
Or inject an authentication cookie:
|
|
1210
|
+
```json
|
|
1211
|
+
{
|
|
1212
|
+
"action": "set",
|
|
1213
|
+
"cookies": [
|
|
1214
|
+
{
|
|
1215
|
+
"name": "session_token",
|
|
1216
|
+
"value": "xyz123",
|
|
1217
|
+
"domain": "example.com",
|
|
1218
|
+
"httpOnly": true,
|
|
1219
|
+
"secure": true
|
|
1220
|
+
}
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
---
|
|
1226
|
+
|
|
1227
|
+
## 5. Web Storage Inspection & Injection (`browser_storage`)
|
|
1228
|
+
|
|
1229
|
+
Query or clear `localStorage` and `sessionStorage` keys:
|
|
1230
|
+
|
|
1231
|
+
```json
|
|
1232
|
+
{
|
|
1233
|
+
"storageType": "localStorage",
|
|
1234
|
+
"action": "get",
|
|
1235
|
+
"key": "authToken"
|
|
1236
|
+
}
|
|
365
1237
|
```
|
|
366
1238
|
|
|
367
|
-
### Presentation Styles:
|
|
368
|
-
- `"consideration"`: Soft pulsing cyan/blue outline (`#38bdf8`) with ambient glow — ideal when weighing multiple interactive candidates.
|
|
369
|
-
- `"target"`: High-contrast amber lock-on ring (`#f59e0b`) before executing high-impact clicks.
|
|
370
|
-
- `"danger"`: Red warning border (`#ef4444`) for destructive buttons (Delete, Reset, Purge).
|
|
371
|
-
- `"success"`: Emerald glow (`#10b981`) confirming completed actions.
|
|
372
|
-
- `"shimmer"`: Rapid purple accent wave (default for quick inspection).
|
|
373
1239
|
|
|
374
|
-
|
|
1240
|
+
## stale-ref-recovery
|
|
375
1241
|
|
|
376
|
-
|
|
1242
|
+
# Stale Ref Recovery & SPA Hydration Resilience
|
|
1243
|
+
|
|
1244
|
+
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.
|
|
1245
|
+
|
|
1246
|
+
---
|
|
1247
|
+
|
|
1248
|
+
## 1. The 4-Tier Auto-Recovery Chain
|
|
1249
|
+
|
|
1250
|
+
When a tool receives a stale or missing `ref`, Weavetab does not immediately fail. It activates an internal 4-tier recovery chain:
|
|
1251
|
+
|
|
1252
|
+
```
|
|
1253
|
+
[Action on w:14 Fails / Stale]
|
|
1254
|
+
│
|
|
1255
|
+
▼
|
|
1256
|
+
[Tier 1: Stored Selector] ──▶ Re-queries cached stable selector (data-testid, id)
|
|
1257
|
+
│ (if not found)
|
|
1258
|
+
▼
|
|
1259
|
+
[Tier 2: Exact Label Match] ──▶ Queries element with identical visible text & tag
|
|
1260
|
+
│ (if not found)
|
|
1261
|
+
▼
|
|
1262
|
+
[Tier 3: Semantic Role Match] ──▶ Queries nearest sibling with matching ARIA role
|
|
1263
|
+
│ (if not found)
|
|
1264
|
+
▼
|
|
1265
|
+
[Tier 4: Fuzzy Match] ──▶ Re-anchors to highest-confidence visual candidate
|
|
1266
|
+
```
|
|
1267
|
+
|
|
1268
|
+
If the recovery chain succeeds, the action executes seamlessly and the return payload notifies the agent that the handle was refreshed.
|
|
1269
|
+
|
|
1270
|
+
---
|
|
1271
|
+
|
|
1272
|
+
## 2. Agent Reactive Behavior
|
|
1273
|
+
|
|
1274
|
+
If an action returns `ERROR: STALE_ELEMENT_REFERENCE` because all 4 recovery tiers were exhausted:
|
|
1275
|
+
|
|
1276
|
+
1. **Do NOT Repeat the Identical Call**: Retrying the exact same stale `ref` (`w:14`) will fail again.
|
|
1277
|
+
2. **Execute a Fast Targeted Lookup**: Run `browser_find` with the text of the button or input field.
|
|
1278
|
+
3. **Execute the Action on the New Handle**: Use the updated handle returned by `browser_find`.
|
|
377
1279
|
|
|
378
|
-
Read or write system clipboard text during automation:
|
|
379
1280
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
"text": "AuthToken_xyz987"
|
|
384
|
-
}
|
|
385
|
-
```
|
|
1281
|
+
# ====================================================
|
|
1282
|
+
# DOMAIN: SECURITY
|
|
1283
|
+
# ====================================================
|
|
386
1284
|
|
|
1285
|
+
# Weavetab Domain Profile: SECURITY
|
|
387
1286
|
|
|
388
|
-
|
|
1287
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
389
1288
|
|
|
390
|
-
# Tab & Window Lifecycle Management
|
|
391
1289
|
|
|
392
|
-
|
|
1290
|
+
## rbac-and-policies
|
|
393
1291
|
|
|
394
|
-
|
|
1292
|
+
# Role-Based Access Control (RBAC) & Agent Guardrails
|
|
1293
|
+
|
|
1294
|
+
Weavetab allows developers to run untrusted or lower-privilege subagents within strict security boundaries to prevent accidental destructive operations or data leaks.
|
|
1295
|
+
|
|
1296
|
+
---
|
|
1297
|
+
|
|
1298
|
+
## 1. The 4 Security Tiers
|
|
1299
|
+
|
|
1300
|
+
| Tier | Name | Allowed Tools & Capabilities | Intended Role |
|
|
1301
|
+
| :--- | :--- | :--- | :--- |
|
|
1302
|
+
| **0** | `admin` | Full tool access (all 48 tools), plugin loading, arbitrary script eval, cookies/storage write. | Primary Operator / Lead Agent. |
|
|
1303
|
+
| **1** | `operator` | Interactive tools (`browser_click`, `browser_fill`, `browser_upload`), but blocked from loading untrusted plugins. | Standard Automation Agent. |
|
|
1304
|
+
| **2** | `automation` | Pre-approved deterministic macros (`browser_automation`), scoped form filling, no arbitrary script execution. | Background Cron / Worker. |
|
|
1305
|
+
| **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. |
|
|
1306
|
+
|
|
1307
|
+
---
|
|
1308
|
+
|
|
1309
|
+
## 2. Handling `PERMISSION_DENIED` Errors
|
|
1310
|
+
|
|
1311
|
+
If an agent attempts an action outside its allocated role tier:
|
|
1312
|
+
```json
|
|
1313
|
+
{
|
|
1314
|
+
"error_code": "PERMISSION_DENIED",
|
|
1315
|
+
"message": "Tool 'browser_click' is disabled under role 'viewer'. Only read operations are permitted."
|
|
1316
|
+
}
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
### Protocol:
|
|
1320
|
+
1. Do not retry the denied tool.
|
|
1321
|
+
2. Delegate the interactive action to the parent agent or primary operator.
|
|
1322
|
+
3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
|
|
395
1323
|
|
|
396
|
-
## 1. Tab Discovery & Target Enumeration
|
|
397
1324
|
|
|
398
|
-
|
|
1325
|
+
## secret-containment-protocol
|
|
399
1326
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1327
|
+
# Secret Containment Protocol & Zero-Bleed Execution
|
|
1328
|
+
|
|
1329
|
+
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.
|
|
1330
|
+
|
|
1331
|
+
---
|
|
1332
|
+
|
|
1333
|
+
## 1. Entering Credentials with `browser_type_secret`
|
|
1334
|
+
|
|
1335
|
+
Whenever an agent inputs passwords, two-factor backup codes, credit card numbers, or proprietary API keys, you MUST use `browser_type_secret`:
|
|
1336
|
+
|
|
1337
|
+
```json
|
|
1338
|
+
{
|
|
1339
|
+
"ref": "w:12",
|
|
1340
|
+
"secret": "MySuperSecretPassword!2026",
|
|
1341
|
+
"clear": true
|
|
1342
|
+
}
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
---
|
|
1346
|
+
|
|
1347
|
+
## 2. The Zero-Bleed Guarantee Architecture
|
|
1348
|
+
|
|
1349
|
+
When `browser_type_secret` is invoked:
|
|
1350
|
+
1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
|
|
1351
|
+
2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
|
|
1352
|
+
3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
|
|
1353
|
+
```json
|
|
1354
|
+
{
|
|
1355
|
+
"success": true,
|
|
1356
|
+
"message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
|
|
1357
|
+
}
|
|
1358
|
+
```
|
|
1359
|
+
4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
|
|
1360
|
+
|
|
1361
|
+
---
|
|
1362
|
+
|
|
1363
|
+
## 3. Strict Operating Prohibition
|
|
1364
|
+
|
|
1365
|
+
> [!CAUTION]
|
|
1366
|
+
> Under NO circumstances should an agent pass passwords or credentials to:
|
|
1367
|
+
> - `browser_type`
|
|
1368
|
+
> - `browser_fill`
|
|
1369
|
+
> - `browser_eval`
|
|
1370
|
+
>
|
|
1371
|
+
> Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.
|
|
405
1372
|
|
|
406
|
-
To list targets inside a specific desktop app (e.g. Discord, Slack):
|
|
407
|
-
```json
|
|
408
|
-
{
|
|
409
|
-
"action": "list",
|
|
410
|
-
"app": "discord"
|
|
411
|
-
}
|
|
412
|
-
```
|
|
413
1373
|
|
|
414
|
-
|
|
415
|
-
|
|
1374
|
+
# ====================================================
|
|
1375
|
+
# DOMAIN: PLUGINS
|
|
1376
|
+
# ====================================================
|
|
416
1377
|
|
|
417
|
-
|
|
1378
|
+
# Weavetab Domain Profile: PLUGINS
|
|
418
1379
|
|
|
419
|
-
|
|
1380
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
420
1381
|
|
|
421
|
-
Open a target URL. By default, `reuse: true` will focus an existing tab if the URL is already loaded:
|
|
422
1382
|
|
|
423
|
-
|
|
424
|
-
{
|
|
425
|
-
"action": "open",
|
|
426
|
-
"url": "https://github.com"
|
|
427
|
-
}
|
|
428
|
-
```
|
|
1383
|
+
## hooks-and-overrides
|
|
429
1384
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
1385
|
+
# Plugin Hooks & Lifecycle Overrides
|
|
1386
|
+
|
|
1387
|
+
Plugins built with `@weavetab/sdk` register lifecycle hooks that run before and after tool executions. Understanding these hooks helps agents interpret metadata and custom tool responses.
|
|
1388
|
+
|
|
1389
|
+
---
|
|
1390
|
+
|
|
1391
|
+
## 1. Supported Plugin Hooks
|
|
1392
|
+
|
|
1393
|
+
1. **`beforeToolCall(toolName, args)`**:
|
|
1394
|
+
- Validates arguments against custom enterprise schemas.
|
|
1395
|
+
- Injects tenant IDs, authentication headers, or proxy routing.
|
|
1396
|
+
2. **`afterToolCall(toolName, result, durationMs)`**:
|
|
1397
|
+
- Emits OpenTelemetry metrics and timing waterfalls to external APM platforms.
|
|
1398
|
+
- Enriches return objects with contextual metadata.
|
|
1399
|
+
3. **`onNavigate(url, targetId)`**:
|
|
1400
|
+
- Triggers automated cookie injection or session setup upon page navigation.
|
|
1401
|
+
|
|
1402
|
+
---
|
|
1403
|
+
|
|
1404
|
+
## 2. Agent Operational Awareness
|
|
1405
|
+
|
|
1406
|
+
When plugins are active, tool return payloads may include an optional `_pluginMetadata` object containing trace IDs, custom metrics, or security audit timestamps. Agents should treat this object as informational telemetry.
|
|
438
1407
|
|
|
439
|
-
---
|
|
440
1408
|
|
|
441
|
-
##
|
|
1409
|
+
## plugin-runtime
|
|
442
1410
|
|
|
443
|
-
|
|
1411
|
+
# Plugin Runtime: Weavetab Plugin Architecture
|
|
444
1412
|
|
|
445
|
-
|
|
446
|
-
{
|
|
447
|
-
"action": "switch",
|
|
448
|
-
"tabId": "TARGET_PAGE_ID"
|
|
449
|
-
}
|
|
450
|
-
```
|
|
1413
|
+
Weavetab features an extensible plugin architecture powered by `@weavetab/sdk`. All installed plugins are loaded automatically at server startup — their tools appear directly in the MCP tool list alongside built-in tools. Agents never need to discover or activate plugins manually.
|
|
451
1414
|
|
|
452
1415
|
---
|
|
453
1416
|
|
|
454
|
-
##
|
|
455
|
-
|
|
456
|
-
Close a single tab:
|
|
457
|
-
```json
|
|
458
|
-
{
|
|
459
|
-
"action": "close",
|
|
460
|
-
"tabId": "TARGET_PAGE_ID"
|
|
461
|
-
}
|
|
462
|
-
```
|
|
1417
|
+
## 1. How Plugin Tools Appear
|
|
463
1418
|
|
|
464
|
-
|
|
465
|
-
```json
|
|
466
|
-
{
|
|
467
|
-
"action": "close",
|
|
468
|
-
"tabIds": ["TARGET_1", "TARGET_2", "TARGET_3"]
|
|
469
|
-
}
|
|
470
|
-
```
|
|
1419
|
+
Plugin tools are first-class MCP tools. If `@weavetab/plugin-recaptcha-solver` is installed, `captcha_solve_token` appears in the tool list immediately on startup — no discovery step needed.
|
|
471
1420
|
|
|
472
|
-
|
|
1421
|
+
There are **no** `list_plugins` or `load_plugin` tools. Managing plugins is a CLI operation:
|
|
473
1422
|
|
|
474
|
-
|
|
1423
|
+
```bash
|
|
1424
|
+
# Install a plugin (restart required)
|
|
1425
|
+
weavetab plugin add @weavetab/plugin-youtube
|
|
475
1426
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
{
|
|
479
|
-
"action": "list_windows"
|
|
480
|
-
}
|
|
481
|
-
```
|
|
1427
|
+
# Remove a plugin
|
|
1428
|
+
weavetab plugin rm @weavetab/plugin-youtube
|
|
482
1429
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
{
|
|
486
|
-
"action": "focus_window",
|
|
487
|
-
"windowId": 1
|
|
488
|
-
}
|
|
1430
|
+
# List installed plugins
|
|
1431
|
+
weavetab plugin list
|
|
489
1432
|
```
|
|
490
1433
|
|
|
491
1434
|
---
|
|
492
1435
|
|
|
493
|
-
##
|
|
1436
|
+
## 2. Plugin Permission Model
|
|
494
1437
|
|
|
495
|
-
|
|
496
|
-
```json
|
|
497
|
-
{
|
|
498
|
-
"action": "consolidate"
|
|
499
|
-
}
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
If a target page crashes or detaches due to memory limits:
|
|
503
|
-
```json
|
|
504
|
-
{
|
|
505
|
-
"action": "heal"
|
|
506
|
-
}
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
The auto-heal routine re-establishes CDP protocol sessions, reconnects event listeners, and synchronizes the active page target.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
# ====================================================
|
|
513
|
-
# DOMAIN: DESKTOP
|
|
514
|
-
# ====================================================
|
|
515
|
-
|
|
516
|
-
# Weavetab Domain Profile: DESKTOP
|
|
517
|
-
|
|
518
|
-
Generated for @weavetab/skills v2.5.0-beta.4
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
## desktop-targeting
|
|
522
|
-
|
|
523
|
-
# Desktop App Targeting & Multi-Window Routing
|
|
524
|
-
|
|
525
|
-
Once a desktop application is detected via `browser_detect`, every standard Weavetab tool can be scoped directly to that desktop application without opening or disturbing the user's web browser.
|
|
526
|
-
|
|
527
|
-
---
|
|
528
|
-
|
|
529
|
-
## 1. Direct App Parameter Routing
|
|
530
|
-
|
|
531
|
-
Pass `"app": "<application_name>"` to target the Electron application.
|
|
532
|
-
|
|
533
|
-
### Example: Reading Discord Channels
|
|
534
|
-
```json
|
|
535
|
-
// Tool: browser_map
|
|
536
|
-
{
|
|
537
|
-
"app": "discord",
|
|
538
|
-
"scope": "main_content"
|
|
539
|
-
}
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
### Example: Sending a Message in Discord
|
|
543
|
-
```json
|
|
544
|
-
// Tool: browser_type
|
|
545
|
-
{
|
|
546
|
-
"app": "discord",
|
|
547
|
-
"ref": "w:88",
|
|
548
|
-
"text": "Deployment v2.5.0-beta.3 completed successfully."
|
|
549
|
-
}
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
### Example: Listing Discord Tabs/Windows
|
|
553
|
-
```json
|
|
554
|
-
// Tool: browser_tabs
|
|
555
|
-
{
|
|
556
|
-
"action": "list",
|
|
557
|
-
"app": "discord"
|
|
558
|
-
}
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
> [!IMPORTANT]
|
|
562
|
-
> Always pass `"app": "discord"` (or the target app name) to `browser_tabs` when working with desktop apps. This prevents Weavetab from accidentally launching or switching to the web browser.
|
|
563
|
-
|
|
564
|
-
---
|
|
565
|
-
|
|
566
|
-
## 2. Smart Domain Auto-Routing & Sticky Context
|
|
567
|
-
|
|
568
|
-
Weavetab features automatic target resolution to eliminate accidental browser popups:
|
|
569
|
-
|
|
570
|
-
### A. Automatic Domain Matching
|
|
571
|
-
If you call `browser_navigate` or `browser_tabs(action: "open")` with a known domain (e.g. `discord.com`, `slack.com`, `linear.app`, `notion.so`), Weavetab automatically routes the command to the configured Electron desktop application.
|
|
572
|
-
|
|
573
|
-
### B. Sticky App Sessions
|
|
574
|
-
When you interact with an Electron application (e.g., clicking or typing in Discord), Weavetab remembers the active application context. If a subsequent tool call omits `app` and no web browser instance is active, Weavetab stays attached to the active desktop app rather than spawning an unwanted Chrome window.
|
|
575
|
-
|
|
576
|
-
### C. Explicit Browser Override
|
|
577
|
-
If you specifically want to open a URL in the web browser instead of a desktop application, pass `"app": "browser"`.
|
|
578
|
-
|
|
579
|
-
---
|
|
580
|
-
|
|
581
|
-
## 3. Multi-Window Focus Management
|
|
582
|
-
|
|
583
|
-
Some Electron apps open secondary windows (e.g. popout editors, settings panels, or call windows).
|
|
584
|
-
|
|
585
|
-
1. Use `browser_tabs(action: "list", app: "discord")` to view all open windows and page targets for that specific app.
|
|
586
|
-
2. Switch focus between windows using `browser_tabs(action: "switch", tabId: "<id>", app: "discord")`.
|
|
587
|
-
3. To bring a specific native window to the foreground, use `browser_tabs(action: "focus_window", windowId: <id>, app: "discord")`.
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
## electron-discovery
|
|
591
|
-
|
|
592
|
-
# Electron Discovery & Environment Handshake
|
|
593
|
-
|
|
594
|
-
Modern desktop applications (Discord, Slack, VS Code, Notion, Obsidian, Figma) are built on Chromium and Electron. Weavetab can inspect and drive these native applications through standard CDP interfaces without third-party drivers or OS-level accessibility hacks.
|
|
595
|
-
|
|
596
|
-
`browser_detect` is the **critical initialization handshake** tool. Every agent should call `browser_detect` before interacting with the user's desktop environment to gain immediate situational awareness.
|
|
597
|
-
|
|
598
|
-
---
|
|
599
|
-
|
|
600
|
-
## 1. Running Discovery via `browser_detect`
|
|
601
|
-
|
|
602
|
-
Call `browser_detect` with empty parameters `{}`:
|
|
603
|
-
|
|
604
|
-
```json
|
|
605
|
-
{}
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
### Response Schema:
|
|
609
|
-
```json
|
|
610
|
-
{
|
|
611
|
-
"available": [
|
|
612
|
-
{
|
|
613
|
-
"engine": "chromium",
|
|
614
|
-
"name": "Google Chrome",
|
|
615
|
-
"path": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
|
|
616
|
-
}
|
|
617
|
-
],
|
|
618
|
-
"current": "chromium",
|
|
619
|
-
"configuredApps": [
|
|
620
|
-
{
|
|
621
|
-
"name": "discord",
|
|
622
|
-
"status": "running_no_debug",
|
|
623
|
-
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Discord\\app-1.0.9256\\Discord.exe"
|
|
624
|
-
},
|
|
625
|
-
{
|
|
626
|
-
"name": "slack",
|
|
627
|
-
"status": "connected",
|
|
628
|
-
"port": 9222,
|
|
629
|
-
"configuredPath": "C:\\Users\\username\\AppData\\Local\\slack\\app-4.38.125\\slack.exe",
|
|
630
|
-
"activeTabs": [
|
|
631
|
-
{
|
|
632
|
-
"id": "PAGE_1",
|
|
633
|
-
"title": "general - Weavetab Slack",
|
|
634
|
-
"url": "https://app.slack.com/client/..."
|
|
635
|
-
}
|
|
636
|
-
]
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
"name": "vscode",
|
|
640
|
-
"status": "offline",
|
|
641
|
-
"configuredPath": "C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
|
642
|
-
}
|
|
643
|
-
],
|
|
644
|
-
"toolCoverage": {
|
|
645
|
-
"chromium": 100,
|
|
646
|
-
"firefox": 78,
|
|
647
|
-
"webkit": 55
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
---
|
|
653
|
-
|
|
654
|
-
## 2. Understanding Application Status
|
|
655
|
-
|
|
656
|
-
Each configured desktop app reports one of three distinct lifecycle statuses:
|
|
657
|
-
|
|
658
|
-
| Status | Meaning | Agent Action |
|
|
659
|
-
| :--- | :--- | :--- |
|
|
660
|
-
| **`connected`** | App is running with CDP remote debugging active. Weavetab has an active session. | Immediately interact using any tool with `"app": "<name>"`. Tabs and port are available. |
|
|
661
|
-
| **`running_no_debug`** | The app process is currently open on the user's OS, but was launched normally by the user without `--remote-debugging-port`. | Do NOT send click/type commands. To attach, inform the user or close and launch via `browser_navigate(app: "<name>")` so Weavetab supplies the debugging port. |
|
|
662
|
-
| **`offline`** | The application is not currently running on the OS. | Launch and attach in one step by calling `browser_navigate(app: "<name>")`. |
|
|
663
|
-
|
|
664
|
-
---
|
|
665
|
-
|
|
666
|
-
## 3. Dynamic Squirrel Updates on Windows
|
|
667
|
-
|
|
668
|
-
On Windows, Squirrel-managed applications (Discord, Slack, Teams) update dynamically into versioned sibling directories (e.g. `Discord\app-1.0.9256\Discord.exe`).
|
|
669
|
-
|
|
670
|
-
Weavetab automatically handles this:
|
|
671
|
-
- If a configured path points to an outdated version or the parent folder, Weavetab scans the directory, resolves the highest semantic version folder (`app-1.0.xxxx`), and launches the valid executable.
|
|
672
|
-
- The dynamically resolved path is reported in `browser_detect` under `configuredPath`.
|
|
673
|
-
|
|
674
|
-
---
|
|
675
|
-
|
|
676
|
-
## 4. Launching Desktop Apps Manually with Debugging
|
|
677
|
-
|
|
678
|
-
If the user prefers to launch apps manually from a terminal or shortcut with remote debugging enabled:
|
|
679
|
-
|
|
680
|
-
```bash
|
|
681
|
-
# Discord
|
|
682
|
-
Discord.exe --remote-debugging-port=9222
|
|
683
|
-
|
|
684
|
-
# Slack
|
|
685
|
-
slack.exe --remote-debugging-port=9223
|
|
686
|
-
|
|
687
|
-
# VS Code
|
|
688
|
-
code.exe --remote-debugging-port=9225
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
Once launched with `--remote-debugging-port`, `browser_detect` immediately reflects the application as connectable.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
# ====================================================
|
|
695
|
-
# DOMAIN: MEMORY
|
|
696
|
-
# ====================================================
|
|
697
|
-
|
|
698
|
-
# Weavetab Domain Profile: MEMORY
|
|
699
|
-
|
|
700
|
-
Generated for @weavetab/skills v2.5.0-beta.4
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
## selector-memory-system
|
|
704
|
-
|
|
705
|
-
# Two-Tier Memory System
|
|
706
|
-
|
|
707
|
-
Weavetab operates a two-tier persistent memory system. Understanding both layers prevents wasted DOM traversals and makes agents dramatically faster across sessions.
|
|
708
|
-
|
|
709
|
-
---
|
|
710
|
-
|
|
711
|
-
## Tier 1 — Selector Confidence Cache (`~/.weavetab-system/memory/`)
|
|
712
|
-
|
|
713
|
-
Per-domain JSON files (one per hostname) track individual element selectors and their interaction history.
|
|
714
|
-
|
|
715
|
-
Every time an element is located and interacted with, Weavetab calculates a confidence score based on:
|
|
716
|
-
1. **Attribute Stability**: Prefers `data-testid`, `id`, `aria-label`, and semantic roles over dynamic Tailwind/CSS-module class strings.
|
|
717
|
-
2. **Success Count**: Selectors that successfully trigger navigation or state changes gain reinforcement.
|
|
718
|
-
3. **Origin Isolation**: Learned selectors are strictly namespaced to the origin to prevent cross-site contamination.
|
|
719
|
-
|
|
720
|
-
### Strike Degradation
|
|
721
|
-
- **Strike 1**: Marked as degraded — falls back to secondary candidates or fuzzy label match.
|
|
722
|
-
- **Strike 2**: Deprecated — immediate fallback to full DOM inspection via `browser_find` or `browser_map`.
|
|
723
|
-
- **Strike 3**: Purged from memory cache to prevent stale lookups.
|
|
724
|
-
|
|
725
|
-
### Agent Discipline for Tier 1
|
|
726
|
-
1. **Rely on Native Tool Resolution**: When you pass a `ref`, Weavetab queries both the active volatile registry and the Tier 1 memory cache automatically.
|
|
727
|
-
2. **Don't Hardcode Fragile Selectors**: Never pass brittle absolute CSS paths like `div:nth-child(3) > ul > li:nth-child(2) > button`.
|
|
728
|
-
3. **Trust Heuristic Recovery**: If a button moves slightly on the page, the underlying engine re-anchors before reporting failure.
|
|
729
|
-
|
|
730
|
-
---
|
|
731
|
-
|
|
732
|
-
## Tier 2 — Site Profiles & Workflow Patterns (`~/.weavetab-system/memory/sites/`)
|
|
733
|
-
|
|
734
|
-
One JSON file per origin stores named multi-step workflow patterns, site quirks, and reliability scores. This is the **Intelligent Memory** layer — agents learn entire flows, not just individual selectors.
|
|
735
|
-
|
|
736
|
-
### Checking a Site Profile at Session Start
|
|
737
|
-
Always call `browser_pattern_learn` with `action: "get"` when starting an automation session on a site you may have visited before:
|
|
738
|
-
|
|
739
|
-
```json
|
|
740
|
-
{ "origin": "https://github.com" }
|
|
741
|
-
```
|
|
742
|
-
|
|
743
|
-
Response tells you:
|
|
744
|
-
- `known_patterns`: named flows with reliability scores and step counts
|
|
745
|
-
- `quirks`: known cookie banners, rate limits, modal popups to handle automatically
|
|
746
|
-
- `framework`: detected frontend stack
|
|
747
|
-
- `_hint`: compact hint string summarizing everything
|
|
748
|
-
|
|
749
|
-
### Fast-Path Decision Rule
|
|
750
|
-
| Reliability | Action |
|
|
751
|
-
|---|---|
|
|
752
|
-
| **≥ 0.8** | Use pattern steps directly via `browser_burst` — skip exploratory navigation |
|
|
753
|
-
| **0.5 – 0.79** | Attempt pattern but verify success indicator before moving on |
|
|
754
|
-
| **< 0.5 or strikes ≥ 3** | Ignore pattern, re-explore from scratch, then teach via `browser_pattern_learn` |
|
|
755
|
-
|
|
756
|
-
### Teaching a New Pattern After Completing a Workflow
|
|
757
|
-
After successfully completing a multi-step flow:
|
|
758
|
-
|
|
759
|
-
```json
|
|
760
|
-
{
|
|
761
|
-
"origin": "https://github.com",
|
|
762
|
-
"action": "learn",
|
|
763
|
-
"name": "login_flow",
|
|
764
|
-
"steps": [
|
|
765
|
-
{ "tool": "browser_click", "target": ".btn-login" },
|
|
766
|
-
{ "tool": "browser_fill", "target": "#login_field", "value": "{{username}}" },
|
|
767
|
-
{ "tool": "browser_fill", "target": "#password", "value": "{{password}}" },
|
|
768
|
-
{ "tool": "browser_click", "target": "[type=submit]" }
|
|
769
|
-
],
|
|
770
|
-
"success_indicator": "a[aria-label='Homepage']"
|
|
771
|
-
}
|
|
772
|
-
```
|
|
773
|
-
|
|
774
|
-
### Recording Execution Outcomes (Reliability Upkeep)
|
|
775
|
-
After replaying a pattern, always report the outcome:
|
|
776
|
-
|
|
777
|
-
```json
|
|
778
|
-
{
|
|
779
|
-
"origin": "https://github.com",
|
|
780
|
-
"action": "record_execution",
|
|
781
|
-
"name": "login_flow",
|
|
782
|
-
"success": true,
|
|
783
|
-
"duration_ms": 3200
|
|
784
|
-
}
|
|
785
|
-
```
|
|
786
|
-
|
|
787
|
-
### Recording Site Quirks
|
|
788
|
-
When you discover a cookie banner or rate limit:
|
|
789
|
-
|
|
790
|
-
```json
|
|
791
|
-
{
|
|
792
|
-
"origin": "https://github.com",
|
|
793
|
-
"action": "record_quirk",
|
|
794
|
-
"quirk_key": "cookie_banner",
|
|
795
|
-
"quirk_data": { "selector": "#cookie-consent", "action": "click .accept-all", "appears": "first_visit" }
|
|
796
|
-
}
|
|
797
|
-
```
|
|
798
|
-
|
|
799
|
-
On future visits, the quirk is present in the profile so you can dismiss banners before starting your main workflow — zero wasted agent turns.
|
|
800
|
-
|
|
801
|
-
---
|
|
802
|
-
|
|
803
|
-
## File Locations (Never Write to ~/.weavetab/)
|
|
804
|
-
|
|
805
|
-
| Tier | Path | Owner |
|
|
806
|
-
|---|---|---|
|
|
807
|
-
| Tier 1 selectors | `~/.weavetab-system/memory/<hostname>.json` | Engine (auto) |
|
|
808
|
-
| Tier 2 site profiles | `~/.weavetab-system/memory/sites/<origin>.json` | Engine via `browser_pattern_learn` |
|
|
809
|
-
| Knowledge hints | `~/.weavetab-system/knowledge/<hostname>.md` | Engine (auto, 20-token notes) |
|
|
810
|
-
| User config | `~/.weavetab/config.json` | Human — never written by agents |
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
## session-trail
|
|
814
|
-
|
|
815
|
-
# Session Trails & Deterministic Macro Compilation
|
|
816
|
-
|
|
817
|
-
When an agent executes an exploratory workflow (e.g. logging into a dashboard, navigating to analytics, setting date filters, and downloading a CSV), re-running that flow autonomously in the future should not require 15 reasoning steps.
|
|
818
|
-
|
|
819
|
-
`browser_burst` with `compile_from_history: true` automatically converts recent successful session actions into a high-performance, deterministic execution script.
|
|
820
|
-
|
|
821
|
-
---
|
|
822
|
-
|
|
823
|
-
## 1. Compiling and Replaying Recent Actions (`browser_burst`)
|
|
824
|
-
|
|
825
|
-
Replay recent successful actions directly in a single turn:
|
|
826
|
-
|
|
827
|
-
```json
|
|
828
|
-
{
|
|
829
|
-
"compile_from_history": true
|
|
830
|
-
}
|
|
831
|
-
```
|
|
832
|
-
|
|
833
|
-
Or pass `dry_run: true` to inspect the compiled macro steps before running them:
|
|
834
|
-
|
|
835
|
-
```json
|
|
836
|
-
{
|
|
837
|
-
"compile_from_history": true,
|
|
838
|
-
"dry_run": true,
|
|
839
|
-
"history_limit": 15
|
|
840
|
-
}
|
|
841
|
-
```
|
|
842
|
-
|
|
843
|
-
### Response Example:
|
|
844
|
-
```json
|
|
845
|
-
{
|
|
846
|
-
"success": true,
|
|
847
|
-
"steps_completed": 0,
|
|
848
|
-
"compiled_steps": [
|
|
849
|
-
{ "tool": "browser_go", "args": { "url": "https://analytics.example.com" } },
|
|
850
|
-
{ "tool": "browser_fill", "args": { "ref": "w:12", "value": "metrics" } },
|
|
851
|
-
{ "tool": "click_and_wait", "args": { "ref": "w:15" } }
|
|
852
|
-
],
|
|
853
|
-
"message": "compiled 3 macro steps from history"
|
|
854
|
-
}
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
---
|
|
858
|
-
|
|
859
|
-
## 2. Parameterizing Variable Inputs
|
|
860
|
-
|
|
861
|
-
When `"parameterizeInputs": true` is passed:
|
|
862
|
-
- Text inputs and dates entered during the exploratory session are replaced with named parameters.
|
|
863
|
-
- Secrets entered via `browser_type_secret` are never hardcoded; they are replaced with environment variable or secret lookups.
|
|
864
|
-
|
|
865
|
-
---
|
|
866
|
-
|
|
867
|
-
## 3. Replaying Compiled Automations
|
|
868
|
-
|
|
869
|
-
Compiled macros can be executed in sub-second time without LLM inference overhead using `browser_automation`:
|
|
870
|
-
|
|
871
|
-
```json
|
|
872
|
-
{
|
|
873
|
-
"macroId": "macro_8f7b2c",
|
|
874
|
-
"parameters": {
|
|
875
|
-
"startDate": "2026-09-01",
|
|
876
|
-
"endDate": "2026-09-03"
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
```
|
|
880
|
-
|
|
881
|
-
---
|
|
882
|
-
|
|
883
|
-
## 4. Emitting Operational Thoughts (`browser_thoughts`)
|
|
884
|
-
|
|
885
|
-
Log agent rationale and internal reasoning directly to the Weavetab HUD and telemetry stream without bloating user chat responses:
|
|
886
|
-
|
|
887
|
-
```json
|
|
888
|
-
{
|
|
889
|
-
"thought": "Detected dynamic React hydration delay. Holding interaction until DOM mutation settles."
|
|
890
|
-
}
|
|
891
|
-
```
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
## site-learning
|
|
895
|
-
|
|
896
|
-
# Site Learning — Autonomous Workflow Memory
|
|
897
|
-
|
|
898
|
-
Weavetab's Site Learning engine accumulates cross-session knowledge about websites and multi-step automation flows. Each site gets one profile file at ~/.weavetab-system/memory/sites/<origin>.json — never duplicated, always merged on write.
|
|
899
|
-
|
|
900
|
-
---
|
|
901
|
-
|
|
902
|
-
## 1. Session Start Protocol
|
|
903
|
-
|
|
904
|
-
On every session visiting a known or potentially-known site, run:
|
|
905
|
-
|
|
906
|
-
`json
|
|
907
|
-
{ "tool": "browser_pattern_learn", "action": "get", "origin": "https://github.com" }
|
|
908
|
-
`
|
|
909
|
-
|
|
910
|
-
Parse the response:
|
|
911
|
-
- known: false → site is new, proceed exploratorily, teach after completion
|
|
912
|
-
- known_patterns → list of named workflows with reliability scores
|
|
913
|
-
- quirks → auto-handle any listed quirks (cookie banners, rate limits) before main task
|
|
914
|
-
- ramework → adjust interaction strategy accordingly (React, Vue, etc.)
|
|
915
|
-
|
|
916
|
-
---
|
|
917
|
-
|
|
918
|
-
## 2. Fast-Path vs. Exploratory Decision
|
|
919
|
-
|
|
920
|
-
Use the _hint field or individual
|
|
921
|
-
|
|
922
|
-
| Reliability | Strikes | Strategy |
|
|
923
|
-
|---|---|---|
|
|
924
|
-
| ≥ 0.8, strikes = 0 | ✓ | **Fast path**: replay steps via rowser_burst directly |
|
|
925
|
-
| 0.5–0.79 | 0–1 | **Cautious path**: replay steps, verify success_indicator after each critical step |
|
|
926
|
-
| < 0.5 | any | **Re-explore**: navigate manually, collect correct steps, then teach |
|
|
927
|
-
| any | ≥ 3 | **Re-learn**: ignore cached pattern, re-explore, then call rowser_pattern_learn with updated steps |
|
|
928
|
-
|
|
929
|
-
---
|
|
930
|
-
|
|
931
|
-
## 3. Quirk Auto-Handling
|
|
932
|
-
|
|
933
|
-
If a profile has known quirks, resolve them immediately after navigation before executing your main task:
|
|
934
|
-
|
|
935
|
-
`
|
|
936
|
-
Profile quirks: { cookie_banner: { selector: "#cookie-consent", action: "click .accept-all", appears: "first_visit" } }
|
|
937
|
-
`
|
|
938
|
-
|
|
939
|
-
Execute the action before doing anything else. Never spend reasoning turns on a known dismissible popup.
|
|
940
|
-
|
|
941
|
-
---
|
|
942
|
-
|
|
943
|
-
## 4. Teaching a Workflow Pattern
|
|
944
|
-
|
|
945
|
-
After successfully completing a multi-step flow for the first time (or after re-learning):
|
|
946
|
-
|
|
947
|
-
`json
|
|
948
|
-
{
|
|
949
|
-
"tool": "browser_pattern_learn",
|
|
950
|
-
"origin": "https://github.com",
|
|
951
|
-
"action": "learn",
|
|
952
|
-
"name": "login_flow",
|
|
953
|
-
"steps": [
|
|
954
|
-
{ "tool": "browser_navigate", "target": "https://github.com/login" },
|
|
955
|
-
{ "tool": "browser_fill", "target": "#login_field", "value": "{{username}}" },
|
|
956
|
-
{ "tool": "browser_fill", "target": "#password", "value": "{{password}}" },
|
|
957
|
-
{ "tool": "browser_click", "target": "[type=submit]" }
|
|
958
|
-
],
|
|
959
|
-
"success_indicator": "a[aria-label='Homepage']",
|
|
960
|
-
"entry": "/login"
|
|
961
|
-
}
|
|
962
|
-
`
|
|
963
|
-
|
|
964
|
-
**Pattern Naming Rules**:
|
|
965
|
-
- Use snake_case
|
|
966
|
-
- Be descriptive: login_flow, pr_review, csv_export, checkout_flow
|
|
967
|
-
- Duplicate name on same origin = **update** (merge), never creates a second pattern
|
|
968
|
-
|
|
969
|
-
**Step Quality Rules**:
|
|
970
|
-
- Use semantic selectors: data-testid, id, ria-label, readable text-based selectors
|
|
971
|
-
- Avoid: .hash_abc123, div:nth-child(4), deep anonymous chains like div > div > div > span
|
|
972
|
-
(the engine automatically drops volatile selectors during compilation)
|
|
973
|
-
- For sensitive inputs, record the step with a placeholder like {{username}} — never hardcode credentials
|
|
974
|
-
|
|
975
|
-
---
|
|
976
|
-
|
|
977
|
-
## 5. Reliability Upkeep After Replay
|
|
978
|
-
|
|
979
|
-
Every time you replay a pattern, report the outcome:
|
|
980
|
-
|
|
981
|
-
`json
|
|
982
|
-
{
|
|
983
|
-
"tool": "browser_pattern_learn",
|
|
984
|
-
"origin": "https://github.com",
|
|
985
|
-
"action": "record_execution",
|
|
986
|
-
"name": "login_flow",
|
|
987
|
-
"success": true,
|
|
988
|
-
"duration_ms": 3100
|
|
989
|
-
}
|
|
990
|
-
`
|
|
991
|
-
|
|
992
|
-
The engine uses EWMA (α=0.15) to update the reliability score:
|
|
993
|
-
- Success run → reliability climbs toward 1.0 slowly
|
|
994
|
-
- Failure run → reliability drops; 3 consecutive failures trigger [RE-LEARN NEEDED] flag
|
|
995
|
-
|
|
996
|
-
---
|
|
997
|
-
|
|
998
|
-
## 6. Recording a New Quirk
|
|
999
|
-
|
|
1000
|
-
When you encounter a cookie consent modal, popup, or rate limit for the first time:
|
|
1001
|
-
|
|
1002
|
-
`json
|
|
1003
|
-
{
|
|
1004
|
-
"tool": "browser_pattern_learn",
|
|
1005
|
-
"origin": "https://example.com",
|
|
1006
|
-
"action": "record_quirk",
|
|
1007
|
-
"quirk_key": "cookie_banner",
|
|
1008
|
-
"quirk_data": {
|
|
1009
|
-
"selector": "#cookie-consent",
|
|
1010
|
-
"action": "click .accept-all",
|
|
1011
|
-
"appears": "first_visit"
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
`
|
|
1015
|
-
|
|
1016
|
-
Supported quirk_key values: cookie_banner,
|
|
1017
|
-
|
|
1018
|
-
For rate limits:
|
|
1019
|
-
`json
|
|
1020
|
-
{
|
|
1021
|
-
"quirk_key": "rate_limit",
|
|
1022
|
-
"quirk_data": { "threshold": "60req/min", "recovery": "wait 30s" }
|
|
1023
|
-
}
|
|
1024
|
-
`
|
|
1025
|
-
|
|
1026
|
-
---
|
|
1027
|
-
|
|
1028
|
-
## 7. Anti-Patterns to Avoid
|
|
1029
|
-
|
|
1030
|
-
- **Never create per-session pattern names** like login_2026_09_16 — one name per workflow per origin, forever updated in place.
|
|
1031
|
-
- **Never call rowser_pattern_learn in a loop** — one call per workflow completion. The write is idempotent (skips disk write if nothing changed).
|
|
1032
|
-
- **Never store credentials in steps** — use placeholders or rowser_type_secret in actual execution.
|
|
1033
|
-
- **Never write to ~/.weavetab/** — all memory belongs in ~/.weavetab-system/memory/sites/.
|
|
1034
|
-
|
|
1035
|
-
---
|
|
1036
|
-
|
|
1037
|
-
## 8. Full Session Example: GitHub PR Review
|
|
1038
|
-
|
|
1039
|
-
`
|
|
1040
|
-
1. browser_pattern_learn { action: "get", origin: "https://github.com" }
|
|
1041
|
-
→ patterns: { pr_review: { reliability: 0.95, steps: 3 } }
|
|
1042
|
-
→ quirks: {} (none)
|
|
1043
|
-
|
|
1044
|
-
2. Since reliability=0.95 (≥ 0.8): use fast path
|
|
1045
|
-
browser_burst with the 3 stored steps
|
|
1046
|
-
|
|
1047
|
-
3. After completion:
|
|
1048
|
-
browser_pattern_learn {
|
|
1049
|
-
action: "record_execution",
|
|
1050
|
-
name: "pr_review",
|
|
1051
|
-
success: true,
|
|
1052
|
-
duration_ms: 2800
|
|
1053
|
-
}
|
|
1054
|
-
`
|
|
1055
|
-
|
|
1056
|
-
Total agent turns for a known site: **3 tool calls** vs. potentially 12+ with full exploration.
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
# ====================================================
|
|
1060
|
-
# DOMAIN: RESILIENCE
|
|
1061
|
-
# ====================================================
|
|
1062
|
-
|
|
1063
|
-
# Weavetab Domain Profile: RESILIENCE
|
|
1064
|
-
|
|
1065
|
-
Generated for @weavetab/skills v2.5.0-beta.4
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
## loop-breaker
|
|
1069
|
-
|
|
1070
|
-
# Loop Breaker & CAPTCHA Escalation Protocol
|
|
1071
|
-
|
|
1072
|
-
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.
|
|
1073
|
-
|
|
1074
|
-
---
|
|
1075
|
-
|
|
1076
|
-
## 1. Loop Detection & Strike Reset (`browser_map`)
|
|
1077
|
-
|
|
1078
|
-
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`.
|
|
1079
|
-
|
|
1080
|
-
### How to Break the Loop:
|
|
1081
|
-
1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
|
|
1082
|
-
```json
|
|
1083
|
-
{ "action": "read" }
|
|
1084
|
-
```
|
|
1085
|
-
Or use `browser_map` to see if a validation banner or unhandled modal appeared.
|
|
1086
|
-
2. **Reset the Circuit Breaker**:
|
|
1087
|
-
- Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
|
|
1088
|
-
```json
|
|
1089
|
-
{ "force": true }
|
|
1090
|
-
```
|
|
1091
|
-
|
|
1092
|
-
---
|
|
1093
|
-
|
|
1094
|
-
## 2. CAPTCHA Handling Protocol (`browser_captcha`)
|
|
1095
|
-
|
|
1096
|
-
When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
|
|
1097
|
-
|
|
1098
|
-
Invoke `browser_captcha` to analyze and manage the challenge:
|
|
1099
|
-
|
|
1100
|
-
```json
|
|
1101
|
-
{
|
|
1102
|
-
"action": "detect"
|
|
1103
|
-
}
|
|
1104
|
-
```
|
|
1105
|
-
|
|
1106
|
-
### Response Example:
|
|
1107
|
-
```json
|
|
1108
|
-
{
|
|
1109
|
-
"detected": true,
|
|
1110
|
-
"type": "turnstile",
|
|
1111
|
-
"provider": "cloudflare",
|
|
1112
|
-
"interactive": true,
|
|
1113
|
-
"ref": "w:99"
|
|
1114
|
-
}
|
|
1115
|
-
```
|
|
1116
|
-
|
|
1117
|
-
### Action Strategy:
|
|
1118
|
-
1. If the challenge is interactive and requires human intervention (e.g. image classification), inform the user cleanly or request human bypass.
|
|
1119
|
-
2. If the challenge is a simple checkbox Turnstile widget, pass `"action": "solve"` or click the detected widget ref with `browser_click`.
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
## session-time-travel
|
|
1123
|
-
|
|
1124
|
-
# Session Time-Travel & Instant State Rollback
|
|
1125
|
-
|
|
1126
|
-
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.
|
|
1127
|
-
|
|
1128
|
-
`browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
|
|
1129
|
-
|
|
1130
|
-
---
|
|
1131
|
-
|
|
1132
|
-
## 1. What a Checkpoint Captures
|
|
1133
|
-
|
|
1134
|
-
A single named checkpoint atomically preserves:
|
|
1135
|
-
- **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
|
|
1136
|
-
- **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
|
|
1137
|
-
- **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
|
|
1138
|
-
|
|
1139
|
-
---
|
|
1140
|
-
|
|
1141
|
-
## 2. Checkpoint Operations
|
|
1142
|
-
|
|
1143
|
-
### A. Saving a Checkpoint (`save`)
|
|
1144
|
-
Create a checkpoint right before undertaking risky, branching, or destructive actions:
|
|
1145
|
-
|
|
1146
|
-
```json
|
|
1147
|
-
{
|
|
1148
|
-
"action": "save",
|
|
1149
|
-
"name": "pre_checkout_authenticated"
|
|
1150
|
-
}
|
|
1151
|
-
```
|
|
1152
|
-
|
|
1153
|
-
### B. Restoring a Checkpoint (`restore`)
|
|
1154
|
-
If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
|
|
1155
|
-
|
|
1156
|
-
```json
|
|
1157
|
-
{
|
|
1158
|
-
"action": "restore",
|
|
1159
|
-
"name": "pre_checkout_authenticated"
|
|
1160
|
-
}
|
|
1161
|
-
```
|
|
1162
|
-
*Latency: ~15ms*. The page navigates back to the checkpoint URL with cookies and storage atomically injected.
|
|
1163
|
-
|
|
1164
|
-
### C. Listing Checkpoints (`list`)
|
|
1165
|
-
Inspect all active checkpoints for the current page target:
|
|
1166
|
-
|
|
1167
|
-
```json
|
|
1168
|
-
{
|
|
1169
|
-
"action": "list"
|
|
1170
|
-
}
|
|
1171
|
-
```
|
|
1172
|
-
|
|
1173
|
-
### D. Cleaning Up (`delete`)
|
|
1174
|
-
Free memory once a workflow has concluded:
|
|
1175
|
-
|
|
1176
|
-
```json
|
|
1177
|
-
{
|
|
1178
|
-
"action": "delete",
|
|
1179
|
-
"name": "pre_checkout_authenticated"
|
|
1180
|
-
}
|
|
1181
|
-
```
|
|
1182
|
-
|
|
1183
|
-
---
|
|
1184
|
-
|
|
1185
|
-
## 3. High-Leverage Agent Pattern
|
|
1186
|
-
|
|
1187
|
-
```
|
|
1188
|
-
1. Authenticate to Target Portal
|
|
1189
|
-
2. browser_checkpoint({ action: "save", name: "auth_ready" })
|
|
1190
|
-
3. Attempt automated action sequence (e.g. form filling or testing)
|
|
1191
|
-
4. IF error occurs:
|
|
1192
|
-
browser_checkpoint({ action: "restore", name: "auth_ready" })
|
|
1193
|
-
-> Agent is immediately back at authenticated state without re-login!
|
|
1194
|
-
```
|
|
1195
|
-
|
|
1196
|
-
---
|
|
1197
|
-
|
|
1198
|
-
## 4. Fine-Grained Cookie Management (`browser_cookies`)
|
|
1199
|
-
|
|
1200
|
-
Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
|
|
1201
|
-
|
|
1202
|
-
```json
|
|
1203
|
-
{
|
|
1204
|
-
"action": "get",
|
|
1205
|
-
"urls": ["https://example.com"]
|
|
1206
|
-
}
|
|
1207
|
-
```
|
|
1208
|
-
|
|
1209
|
-
Or inject an authentication cookie:
|
|
1210
|
-
```json
|
|
1211
|
-
{
|
|
1212
|
-
"action": "set",
|
|
1213
|
-
"cookies": [
|
|
1214
|
-
{
|
|
1215
|
-
"name": "session_token",
|
|
1216
|
-
"value": "xyz123",
|
|
1217
|
-
"domain": "example.com",
|
|
1218
|
-
"httpOnly": true,
|
|
1219
|
-
"secure": true
|
|
1220
|
-
}
|
|
1221
|
-
]
|
|
1222
|
-
}
|
|
1223
|
-
```
|
|
1224
|
-
|
|
1225
|
-
---
|
|
1226
|
-
|
|
1227
|
-
## 5. Web Storage Inspection & Injection (`browser_storage`)
|
|
1228
|
-
|
|
1229
|
-
Query or clear `localStorage` and `sessionStorage` keys:
|
|
1230
|
-
|
|
1231
|
-
```json
|
|
1232
|
-
{
|
|
1233
|
-
"storageType": "localStorage",
|
|
1234
|
-
"action": "get",
|
|
1235
|
-
"key": "authToken"
|
|
1236
|
-
}
|
|
1237
|
-
```
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
## stale-ref-recovery
|
|
1241
|
-
|
|
1242
|
-
# Stale Ref Recovery & SPA Hydration Resilience
|
|
1243
|
-
|
|
1244
|
-
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.
|
|
1245
|
-
|
|
1246
|
-
---
|
|
1247
|
-
|
|
1248
|
-
## 1. The 4-Tier Auto-Recovery Chain
|
|
1249
|
-
|
|
1250
|
-
When a tool receives a stale or missing `ref`, Weavetab does not immediately fail. It activates an internal 4-tier recovery chain:
|
|
1251
|
-
|
|
1252
|
-
```
|
|
1253
|
-
[Action on w:14 Fails / Stale]
|
|
1254
|
-
│
|
|
1255
|
-
▼
|
|
1256
|
-
[Tier 1: Stored Selector] ──▶ Re-queries cached stable selector (data-testid, id)
|
|
1257
|
-
│ (if not found)
|
|
1258
|
-
▼
|
|
1259
|
-
[Tier 2: Exact Label Match] ──▶ Queries element with identical visible text & tag
|
|
1260
|
-
│ (if not found)
|
|
1261
|
-
▼
|
|
1262
|
-
[Tier 3: Semantic Role Match] ──▶ Queries nearest sibling with matching ARIA role
|
|
1263
|
-
│ (if not found)
|
|
1264
|
-
▼
|
|
1265
|
-
[Tier 4: Fuzzy Match] ──▶ Re-anchors to highest-confidence visual candidate
|
|
1266
|
-
```
|
|
1267
|
-
|
|
1268
|
-
If the recovery chain succeeds, the action executes seamlessly and the return payload notifies the agent that the handle was refreshed.
|
|
1269
|
-
|
|
1270
|
-
---
|
|
1271
|
-
|
|
1272
|
-
## 2. Agent Reactive Behavior
|
|
1273
|
-
|
|
1274
|
-
If an action returns `ERROR: STALE_ELEMENT_REFERENCE` because all 4 recovery tiers were exhausted:
|
|
1275
|
-
|
|
1276
|
-
1. **Do NOT Repeat the Identical Call**: Retrying the exact same stale `ref` (`w:14`) will fail again.
|
|
1277
|
-
2. **Execute a Fast Targeted Lookup**: Run `browser_find` with the text of the button or input field.
|
|
1278
|
-
3. **Execute the Action on the New Handle**: Use the updated handle returned by `browser_find`.
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
# ====================================================
|
|
1282
|
-
# DOMAIN: SECURITY
|
|
1283
|
-
# ====================================================
|
|
1284
|
-
|
|
1285
|
-
# Weavetab Domain Profile: SECURITY
|
|
1286
|
-
|
|
1287
|
-
Generated for @weavetab/skills v2.5.0-beta.4
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
## rbac-and-policies
|
|
1291
|
-
|
|
1292
|
-
# Role-Based Access Control (RBAC) & Agent Guardrails
|
|
1293
|
-
|
|
1294
|
-
Weavetab allows developers to run untrusted or lower-privilege subagents within strict security boundaries to prevent accidental destructive operations or data leaks.
|
|
1295
|
-
|
|
1296
|
-
---
|
|
1297
|
-
|
|
1298
|
-
## 1. The 4 Security Tiers
|
|
1299
|
-
|
|
1300
|
-
| Tier | Name | Allowed Tools & Capabilities | Intended Role |
|
|
1301
|
-
| :--- | :--- | :--- | :--- |
|
|
1302
|
-
| **0** | `admin` | Full tool access (all 48 tools), plugin loading, arbitrary script eval, cookies/storage write. | Primary Operator / Lead Agent. |
|
|
1303
|
-
| **1** | `operator` | Interactive tools (`browser_click`, `browser_fill`, `browser_upload`), but blocked from loading untrusted plugins. | Standard Automation Agent. |
|
|
1304
|
-
| **2** | `automation` | Pre-approved deterministic macros (`browser_automation`), scoped form filling, no arbitrary script execution. | Background Cron / Worker. |
|
|
1305
|
-
| **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. |
|
|
1306
|
-
|
|
1307
|
-
---
|
|
1308
|
-
|
|
1309
|
-
## 2. Handling `PERMISSION_DENIED` Errors
|
|
1310
|
-
|
|
1311
|
-
If an agent attempts an action outside its allocated role tier:
|
|
1312
|
-
```json
|
|
1313
|
-
{
|
|
1314
|
-
"error_code": "PERMISSION_DENIED",
|
|
1315
|
-
"message": "Tool 'browser_click' is disabled under role 'viewer'. Only read operations are permitted."
|
|
1316
|
-
}
|
|
1317
|
-
```
|
|
1318
|
-
|
|
1319
|
-
### Protocol:
|
|
1320
|
-
1. Do not retry the denied tool.
|
|
1321
|
-
2. Delegate the interactive action to the parent agent or primary operator.
|
|
1322
|
-
3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
## secret-containment-protocol
|
|
1438
|
+
Every plugin declares what it can do in `weavetab.json`. The runtime enforces this at load time:
|
|
1326
1439
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
Whenever an agent inputs passwords, two-factor backup codes, credit card numbers, or proprietary API keys, you MUST use `browser_type_secret`:
|
|
1336
|
-
|
|
1337
|
-
```json
|
|
1338
|
-
{
|
|
1339
|
-
"ref": "w:12",
|
|
1340
|
-
"secret": "MySuperSecretPassword!2026",
|
|
1341
|
-
"clear": true
|
|
1342
|
-
}
|
|
1343
|
-
```
|
|
1344
|
-
|
|
1345
|
-
---
|
|
1346
|
-
|
|
1347
|
-
## 2. The Zero-Bleed Guarantee Architecture
|
|
1348
|
-
|
|
1349
|
-
When `browser_type_secret` is invoked:
|
|
1350
|
-
1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
|
|
1351
|
-
2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
|
|
1352
|
-
3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
|
|
1353
|
-
```json
|
|
1354
|
-
{
|
|
1355
|
-
"success": true,
|
|
1356
|
-
"message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
|
|
1357
|
-
}
|
|
1358
|
-
```
|
|
1359
|
-
4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
|
|
1360
|
-
|
|
1361
|
-
---
|
|
1362
|
-
|
|
1363
|
-
## 3. Strict Operating Prohibition
|
|
1364
|
-
|
|
1365
|
-
> [!CAUTION]
|
|
1366
|
-
> Under NO circumstances should an agent pass passwords or credentials to:
|
|
1367
|
-
> - `browser_type`
|
|
1368
|
-
> - `browser_fill`
|
|
1369
|
-
> - `browser_eval`
|
|
1370
|
-
>
|
|
1371
|
-
> Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
# ====================================================
|
|
1375
|
-
# DOMAIN: PLUGINS
|
|
1376
|
-
# ====================================================
|
|
1377
|
-
|
|
1378
|
-
# Weavetab Domain Profile: PLUGINS
|
|
1379
|
-
|
|
1380
|
-
Generated for @weavetab/skills v2.5.0-beta.4
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
## hooks-and-overrides
|
|
1384
|
-
|
|
1385
|
-
# Plugin Hooks & Lifecycle Overrides
|
|
1386
|
-
|
|
1387
|
-
Plugins built with `@weavetab/sdk` register lifecycle hooks that run before and after tool executions. Understanding these hooks helps agents interpret metadata and custom tool responses.
|
|
1388
|
-
|
|
1389
|
-
---
|
|
1390
|
-
|
|
1391
|
-
## 1. Supported Plugin Hooks
|
|
1392
|
-
|
|
1393
|
-
1. **`beforeToolCall(toolName, args)`**:
|
|
1394
|
-
- Validates arguments against custom enterprise schemas.
|
|
1395
|
-
- Injects tenant IDs, authentication headers, or proxy routing.
|
|
1396
|
-
2. **`afterToolCall(toolName, result, durationMs)`**:
|
|
1397
|
-
- Emits OpenTelemetry metrics and timing waterfalls to external APM platforms.
|
|
1398
|
-
- Enriches return objects with contextual metadata.
|
|
1399
|
-
3. **`onNavigate(url, targetId)`**:
|
|
1400
|
-
- Triggers automated cookie injection or session setup upon page navigation.
|
|
1401
|
-
|
|
1402
|
-
---
|
|
1403
|
-
|
|
1404
|
-
## 2. Agent Operational Awareness
|
|
1405
|
-
|
|
1406
|
-
When plugins are active, tool return payloads may include an optional `_pluginMetadata` object containing trace IDs, custom metrics, or security audit timestamps. Agents should treat this object as informational telemetry.
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
## plugin-runtime
|
|
1410
|
-
|
|
1411
|
-
# Plugin Runtime: Dynamic Extension Loading
|
|
1412
|
-
|
|
1413
|
-
Weavetab features an extensible plugin architecture powered by `@weavetab/sdk`. Agents can query loaded extensions and dynamically load community or official plugins into the live MCP runtime without restarting the server.
|
|
1414
|
-
|
|
1415
|
-
---
|
|
1416
|
-
|
|
1417
|
-
## 1. Inspecting Active Plugins (`list_plugins`)
|
|
1418
|
-
|
|
1419
|
-
Discover all installed plugins, their versions, and the tools or hooks they expose:
|
|
1420
|
-
|
|
1421
|
-
```json
|
|
1422
|
-
{}
|
|
1423
|
-
```
|
|
1440
|
+
| Permission | What it gates |
|
|
1441
|
+
|---|---|
|
|
1442
|
+
| `tools.add: true` | Plugin can register new MCP tools |
|
|
1443
|
+
| `tools.override: ["browser_navigate"]` | Plugin can wrap/replace that built-in tool |
|
|
1444
|
+
| `tools.remove: ["browser_pdf"]` | Plugin can disable that built-in tool |
|
|
1445
|
+
| `hooks.onBeforeAction: true` | Plugin can intercept all tool calls before execution |
|
|
1446
|
+
| `hooks.onAfterAction: true` | Plugin can inspect/transform all tool results |
|
|
1424
1447
|
|
|
1425
|
-
|
|
1426
|
-
```json
|
|
1427
|
-
{
|
|
1428
|
-
"plugins": [
|
|
1429
|
-
{
|
|
1430
|
-
"name": "@weavetab/plugin-recaptcha-solver",
|
|
1431
|
-
"version": "1.2.0",
|
|
1432
|
-
"status": "active",
|
|
1433
|
-
"toolsProvided": ["captcha_solve_token"],
|
|
1434
|
-
"hooks": ["beforeToolCall"]
|
|
1435
|
-
}
|
|
1436
|
-
]
|
|
1437
|
-
}
|
|
1438
|
-
```
|
|
1448
|
+
Plugins that attempt to exceed their declared permissions are blocked with a stderr warning — they do not crash.
|
|
1439
1449
|
|
|
1440
1450
|
---
|
|
1441
1451
|
|
|
1442
|
-
##
|
|
1452
|
+
## 3. Trust Tiers
|
|
1443
1453
|
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
}
|
|
1450
|
-
```
|
|
1454
|
+
| Tier | Badge | Condition |
|
|
1455
|
+
|---|---|---|
|
|
1456
|
+
| Official | `✚ [Official]` | `@weavetab/plugin-*` packages |
|
|
1457
|
+
| Verified | `✔ [Verified]` | Listed in the Weavetab verified registry |
|
|
1458
|
+
| Unverified | `⚠ [Unverified]` | Unknown community package |
|
|
1451
1459
|
|
|
1452
|
-
|
|
1453
|
-
- Plugins must implement the `@weavetab/sdk` standard interface.
|
|
1454
|
-
- Loaded tools become immediately callable by the agent in subsequent turns.
|
|
1455
|
-
- If an agent is in the `viewer` RBAC tier, `load_plugin` is rejected with `PERMISSION_DENIED`.
|
|
1460
|
+
Unverified plugins are loaded but their permissions are logged visibly at startup for user review.
|
|
1456
1461
|
|
|
1457
1462
|
|
|
1458
1463
|
# ====================================================
|
|
@@ -1461,226 +1466,226 @@ Load a verified plugin package into the active runtime session:
|
|
|
1461
1466
|
|
|
1462
1467
|
# Weavetab Domain Profile: NETWORK-AND-PERF
|
|
1463
1468
|
|
|
1464
|
-
Generated for @weavetab/skills v2.5.0-beta.
|
|
1469
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
1465
1470
|
|
|
1466
1471
|
|
|
1467
1472
|
## device-and-environment
|
|
1468
1473
|
|
|
1469
|
-
# Device Emulation & Environment Simulation
|
|
1470
|
-
|
|
1471
|
-
Auditing mobile responsive layouts, testing geographic restrictions, and simulating degraded network conditions can all be accomplished with `browser_emulate`.
|
|
1472
|
-
|
|
1473
|
-
---
|
|
1474
|
-
|
|
1475
|
-
## 1. Device Presets & Viewport Simulation
|
|
1476
|
-
|
|
1477
|
-
Switch from desktop to realistic mobile hardware profiles:
|
|
1478
|
-
|
|
1479
|
-
```json
|
|
1480
|
-
{
|
|
1481
|
-
"device": "iPhone 15 Pro",
|
|
1482
|
-
"orientation": "portrait"
|
|
1483
|
-
}
|
|
1484
|
-
```
|
|
1485
|
-
|
|
1486
|
-
Or configure custom screen geometries:
|
|
1487
|
-
|
|
1488
|
-
```json
|
|
1489
|
-
{
|
|
1490
|
-
"viewport": {
|
|
1491
|
-
"width": 393,
|
|
1492
|
-
"height": 852,
|
|
1493
|
-
"deviceScaleFactor": 3,
|
|
1494
|
-
"isMobile": true,
|
|
1495
|
-
"hasTouch": true
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
```
|
|
1499
|
-
|
|
1500
|
-
---
|
|
1501
|
-
|
|
1502
|
-
## 2. Network Throttling Simulation
|
|
1503
|
-
|
|
1504
|
-
Verify how web applications degrade under poor connectivity:
|
|
1505
|
-
|
|
1506
|
-
```json
|
|
1507
|
-
{
|
|
1508
|
-
"network": {
|
|
1509
|
-
"offline": false,
|
|
1510
|
-
"downloadThroughput": 1024 * 500, // 500 kb/s (Slow 3G)
|
|
1511
|
-
"uploadThroughput": 1024 * 250,
|
|
1512
|
-
"latency": 400 // ms
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
```
|
|
1516
|
-
|
|
1517
|
-
---
|
|
1518
|
-
|
|
1519
|
-
## 3. Geolocation & Timezone Overrides
|
|
1520
|
-
|
|
1521
|
-
Bypass localized IP redirects or verify localized content rendering:
|
|
1522
|
-
|
|
1523
|
-
```json
|
|
1524
|
-
{
|
|
1525
|
-
"geolocation": {
|
|
1526
|
-
"latitude": 37.7749,
|
|
1527
|
-
"longitude": -122.4194,
|
|
1528
|
-
"accuracy": 100
|
|
1529
|
-
},
|
|
1530
|
-
"timezoneId": "America/Los_Angeles",
|
|
1531
|
-
"locale": "en-US"
|
|
1532
|
-
}
|
|
1533
|
-
```
|
|
1534
|
-
|
|
1535
|
-
To reset all overrides back to default host system parameters:
|
|
1536
|
-
```json
|
|
1537
|
-
{
|
|
1538
|
-
"reset": true
|
|
1539
|
-
}
|
|
1474
|
+
# Device Emulation & Environment Simulation
|
|
1475
|
+
|
|
1476
|
+
Auditing mobile responsive layouts, testing geographic restrictions, and simulating degraded network conditions can all be accomplished with `browser_emulate`.
|
|
1477
|
+
|
|
1478
|
+
---
|
|
1479
|
+
|
|
1480
|
+
## 1. Device Presets & Viewport Simulation
|
|
1481
|
+
|
|
1482
|
+
Switch from desktop to realistic mobile hardware profiles:
|
|
1483
|
+
|
|
1484
|
+
```json
|
|
1485
|
+
{
|
|
1486
|
+
"device": "iPhone 15 Pro",
|
|
1487
|
+
"orientation": "portrait"
|
|
1488
|
+
}
|
|
1489
|
+
```
|
|
1490
|
+
|
|
1491
|
+
Or configure custom screen geometries:
|
|
1492
|
+
|
|
1493
|
+
```json
|
|
1494
|
+
{
|
|
1495
|
+
"viewport": {
|
|
1496
|
+
"width": 393,
|
|
1497
|
+
"height": 852,
|
|
1498
|
+
"deviceScaleFactor": 3,
|
|
1499
|
+
"isMobile": true,
|
|
1500
|
+
"hasTouch": true
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
```
|
|
1504
|
+
|
|
1505
|
+
---
|
|
1506
|
+
|
|
1507
|
+
## 2. Network Throttling Simulation
|
|
1508
|
+
|
|
1509
|
+
Verify how web applications degrade under poor connectivity:
|
|
1510
|
+
|
|
1511
|
+
```json
|
|
1512
|
+
{
|
|
1513
|
+
"network": {
|
|
1514
|
+
"offline": false,
|
|
1515
|
+
"downloadThroughput": 1024 * 500, // 500 kb/s (Slow 3G)
|
|
1516
|
+
"uploadThroughput": 1024 * 250,
|
|
1517
|
+
"latency": 400 // ms
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
---
|
|
1523
|
+
|
|
1524
|
+
## 3. Geolocation & Timezone Overrides
|
|
1525
|
+
|
|
1526
|
+
Bypass localized IP redirects or verify localized content rendering:
|
|
1527
|
+
|
|
1528
|
+
```json
|
|
1529
|
+
{
|
|
1530
|
+
"geolocation": {
|
|
1531
|
+
"latitude": 37.7749,
|
|
1532
|
+
"longitude": -122.4194,
|
|
1533
|
+
"accuracy": 100
|
|
1534
|
+
},
|
|
1535
|
+
"timezoneId": "America/Los_Angeles",
|
|
1536
|
+
"locale": "en-US"
|
|
1537
|
+
}
|
|
1538
|
+
```
|
|
1539
|
+
|
|
1540
|
+
To reset all overrides back to default host system parameters:
|
|
1541
|
+
```json
|
|
1542
|
+
{
|
|
1543
|
+
"reset": true
|
|
1544
|
+
}
|
|
1540
1545
|
```
|
|
1541
1546
|
|
|
1542
1547
|
|
|
1543
1548
|
## network-intercept-and-mock
|
|
1544
1549
|
|
|
1545
|
-
# Network Interception, Mocking & TLS Forensics
|
|
1546
|
-
|
|
1547
|
-
Autonomous testing and debugging often require simulating backend error states (e.g. 500 Internal Server Error, 429 Rate Limit), stubbing third-party analytics, or verifying TLS/SSL certificates.
|
|
1548
|
-
|
|
1549
|
-
`browser_network_intercept` provides fine-grained CDP request and response modification.
|
|
1550
|
-
|
|
1551
|
-
---
|
|
1552
|
-
|
|
1553
|
-
## 1. Mocking API Responses
|
|
1554
|
-
|
|
1555
|
-
Intercept outgoing HTTP requests matching a URL pattern and return custom mock data:
|
|
1556
|
-
|
|
1557
|
-
```json
|
|
1558
|
-
{
|
|
1559
|
-
"pattern": "*/api/v1/user/profile",
|
|
1560
|
-
"response": {
|
|
1561
|
-
"status": 200,
|
|
1562
|
-
"headers": {
|
|
1563
|
-
"Content-Type": "application/json"
|
|
1564
|
-
},
|
|
1565
|
-
"body": "{\"id\": \"usr_test\", \"role\": \"admin\", \"credits\": 9999}"
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
```
|
|
1569
|
-
|
|
1570
|
-
---
|
|
1571
|
-
|
|
1572
|
-
## 2. Blocking Unnecessary Traffic & Trackers
|
|
1573
|
-
|
|
1574
|
-
Accelerate page loads and eliminate token bloat by aborting non-essential requests:
|
|
1575
|
-
|
|
1576
|
-
```json
|
|
1577
|
-
{
|
|
1578
|
-
"pattern": "*google-analytics.com*",
|
|
1579
|
-
"action": "abort",
|
|
1580
|
-
"errorReason": "BlockedByClient"
|
|
1581
|
-
}
|
|
1582
|
-
```
|
|
1583
|
-
|
|
1584
|
-
---
|
|
1585
|
-
|
|
1586
|
-
## 3. TLS / SSL Forensics & Timing Waterfalls
|
|
1587
|
-
|
|
1588
|
-
Extract cryptographic handshake metadata, cipher suites, expiration dates, and microsecond network waterfalls (DNS lookup, TCP connect, SSL handshake, TTFB):
|
|
1589
|
-
|
|
1590
|
-
```json
|
|
1591
|
-
{
|
|
1592
|
-
"action": "auditTls",
|
|
1593
|
-
"url": "https://weavetab.
|
|
1594
|
-
}
|
|
1595
|
-
```
|
|
1596
|
-
|
|
1597
|
-
### Response Example:
|
|
1598
|
-
```json
|
|
1599
|
-
{
|
|
1600
|
-
"security": {
|
|
1601
|
-
"protocol": "TLS 1.3",
|
|
1602
|
-
"cipher": "AES_128_GCM",
|
|
1603
|
-
"issuer": "Let's Encrypt",
|
|
1604
|
-
"validTo": "2026-11-15T00:00:00.000Z"
|
|
1605
|
-
},
|
|
1606
|
-
"waterfall": {
|
|
1607
|
-
"dnsMs": 1.4,
|
|
1608
|
-
"tcpMs": 3.2,
|
|
1609
|
-
"sslMs": 4.1,
|
|
1610
|
-
"ttfbMs": 12.8
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1550
|
+
# Network Interception, Mocking & TLS Forensics
|
|
1551
|
+
|
|
1552
|
+
Autonomous testing and debugging often require simulating backend error states (e.g. 500 Internal Server Error, 429 Rate Limit), stubbing third-party analytics, or verifying TLS/SSL certificates.
|
|
1553
|
+
|
|
1554
|
+
`browser_network_intercept` provides fine-grained CDP request and response modification.
|
|
1555
|
+
|
|
1556
|
+
---
|
|
1557
|
+
|
|
1558
|
+
## 1. Mocking API Responses
|
|
1559
|
+
|
|
1560
|
+
Intercept outgoing HTTP requests matching a URL pattern and return custom mock data:
|
|
1561
|
+
|
|
1562
|
+
```json
|
|
1563
|
+
{
|
|
1564
|
+
"pattern": "*/api/v1/user/profile",
|
|
1565
|
+
"response": {
|
|
1566
|
+
"status": 200,
|
|
1567
|
+
"headers": {
|
|
1568
|
+
"Content-Type": "application/json"
|
|
1569
|
+
},
|
|
1570
|
+
"body": "{\"id\": \"usr_test\", \"role\": \"admin\", \"credits\": 9999}"
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
```
|
|
1574
|
+
|
|
1575
|
+
---
|
|
1576
|
+
|
|
1577
|
+
## 2. Blocking Unnecessary Traffic & Trackers
|
|
1578
|
+
|
|
1579
|
+
Accelerate page loads and eliminate token bloat by aborting non-essential requests:
|
|
1580
|
+
|
|
1581
|
+
```json
|
|
1582
|
+
{
|
|
1583
|
+
"pattern": "*google-analytics.com*",
|
|
1584
|
+
"action": "abort",
|
|
1585
|
+
"errorReason": "BlockedByClient"
|
|
1586
|
+
}
|
|
1587
|
+
```
|
|
1588
|
+
|
|
1589
|
+
---
|
|
1590
|
+
|
|
1591
|
+
## 3. TLS / SSL Forensics & Timing Waterfalls
|
|
1592
|
+
|
|
1593
|
+
Extract cryptographic handshake metadata, cipher suites, expiration dates, and microsecond network waterfalls (DNS lookup, TCP connect, SSL handshake, TTFB):
|
|
1594
|
+
|
|
1595
|
+
```json
|
|
1596
|
+
{
|
|
1597
|
+
"action": "auditTls",
|
|
1598
|
+
"url": "https://weavetab.dev"
|
|
1599
|
+
}
|
|
1600
|
+
```
|
|
1601
|
+
|
|
1602
|
+
### Response Example:
|
|
1603
|
+
```json
|
|
1604
|
+
{
|
|
1605
|
+
"security": {
|
|
1606
|
+
"protocol": "TLS 1.3",
|
|
1607
|
+
"cipher": "AES_128_GCM",
|
|
1608
|
+
"issuer": "Let's Encrypt",
|
|
1609
|
+
"validTo": "2026-11-15T00:00:00.000Z"
|
|
1610
|
+
},
|
|
1611
|
+
"waterfall": {
|
|
1612
|
+
"dnsMs": 1.4,
|
|
1613
|
+
"tcpMs": 3.2,
|
|
1614
|
+
"sslMs": 4.1,
|
|
1615
|
+
"ttfbMs": 12.8
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1613
1618
|
```
|
|
1614
1619
|
|
|
1615
1620
|
|
|
1616
1621
|
## performance-and-vitals
|
|
1617
1622
|
|
|
1618
|
-
# Performance Forensics & Core Web Vitals
|
|
1619
|
-
|
|
1620
|
-
Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
|
|
1621
|
-
|
|
1622
|
-
---
|
|
1623
|
-
|
|
1624
|
-
## 1. Core Web Vitals Auditing (`browser_performance`)
|
|
1625
|
-
|
|
1626
|
-
Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
|
|
1627
|
-
|
|
1628
|
-
```json
|
|
1629
|
-
{
|
|
1630
|
-
"metrics": ["vitals", "memory", "navigationTiming"]
|
|
1631
|
-
}
|
|
1632
|
-
```
|
|
1633
|
-
|
|
1634
|
-
### Response Example:
|
|
1635
|
-
```json
|
|
1636
|
-
{
|
|
1637
|
-
"vitals": {
|
|
1638
|
-
"fcp": 320,
|
|
1639
|
-
"lcp": 780,
|
|
1640
|
-
"cls": 0.012,
|
|
1641
|
-
"fid": 8,
|
|
1642
|
-
"inp": 45
|
|
1643
|
-
},
|
|
1644
|
-
"memory": {
|
|
1645
|
-
"jsHeapUsedSizeMb": 42.1,
|
|
1646
|
-
"jsHeapTotalSizeMb": 68.4
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
```
|
|
1650
|
-
|
|
1651
|
-
---
|
|
1652
|
-
|
|
1653
|
-
## 2. Deterministic Synchronization (`browser_wait`)
|
|
1654
|
-
|
|
1655
|
-
> [!WARNING]
|
|
1656
|
-
> NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
|
|
1657
|
-
|
|
1658
|
-
Always synchronize with deterministic browser conditions:
|
|
1659
|
-
|
|
1660
|
-
### Wait for Network Idle:
|
|
1661
|
-
```json
|
|
1662
|
-
{
|
|
1663
|
-
"condition": "network_idle",
|
|
1664
|
-
"timeout": 10000
|
|
1665
|
-
}
|
|
1666
|
-
```
|
|
1667
|
-
|
|
1668
|
-
### Wait for DOM Mutation Stability:
|
|
1669
|
-
```json
|
|
1670
|
-
{
|
|
1671
|
-
"condition": "dom_stable",
|
|
1672
|
-
"duration": 500,
|
|
1673
|
-
"timeout": 10000
|
|
1674
|
-
}
|
|
1675
|
-
```
|
|
1676
|
-
|
|
1677
|
-
### Wait for a Specific Element to Appear:
|
|
1678
|
-
```json
|
|
1679
|
-
{
|
|
1680
|
-
"condition": "element_visible",
|
|
1681
|
-
"selector": "[data-testid=\"checkout-complete\"]",
|
|
1682
|
-
"timeout": 15000
|
|
1683
|
-
}
|
|
1623
|
+
# Performance Forensics & Core Web Vitals
|
|
1624
|
+
|
|
1625
|
+
Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
|
|
1626
|
+
|
|
1627
|
+
---
|
|
1628
|
+
|
|
1629
|
+
## 1. Core Web Vitals Auditing (`browser_performance`)
|
|
1630
|
+
|
|
1631
|
+
Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
|
|
1632
|
+
|
|
1633
|
+
```json
|
|
1634
|
+
{
|
|
1635
|
+
"metrics": ["vitals", "memory", "navigationTiming"]
|
|
1636
|
+
}
|
|
1637
|
+
```
|
|
1638
|
+
|
|
1639
|
+
### Response Example:
|
|
1640
|
+
```json
|
|
1641
|
+
{
|
|
1642
|
+
"vitals": {
|
|
1643
|
+
"fcp": 320,
|
|
1644
|
+
"lcp": 780,
|
|
1645
|
+
"cls": 0.012,
|
|
1646
|
+
"fid": 8,
|
|
1647
|
+
"inp": 45
|
|
1648
|
+
},
|
|
1649
|
+
"memory": {
|
|
1650
|
+
"jsHeapUsedSizeMb": 42.1,
|
|
1651
|
+
"jsHeapTotalSizeMb": 68.4
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
```
|
|
1655
|
+
|
|
1656
|
+
---
|
|
1657
|
+
|
|
1658
|
+
## 2. Deterministic Synchronization (`browser_wait`)
|
|
1659
|
+
|
|
1660
|
+
> [!WARNING]
|
|
1661
|
+
> NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
|
|
1662
|
+
|
|
1663
|
+
Always synchronize with deterministic browser conditions:
|
|
1664
|
+
|
|
1665
|
+
### Wait for Network Idle:
|
|
1666
|
+
```json
|
|
1667
|
+
{
|
|
1668
|
+
"condition": "network_idle",
|
|
1669
|
+
"timeout": 10000
|
|
1670
|
+
}
|
|
1671
|
+
```
|
|
1672
|
+
|
|
1673
|
+
### Wait for DOM Mutation Stability:
|
|
1674
|
+
```json
|
|
1675
|
+
{
|
|
1676
|
+
"condition": "dom_stable",
|
|
1677
|
+
"duration": 500,
|
|
1678
|
+
"timeout": 10000
|
|
1679
|
+
}
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
### Wait for a Specific Element to Appear:
|
|
1683
|
+
```json
|
|
1684
|
+
{
|
|
1685
|
+
"condition": "element_visible",
|
|
1686
|
+
"selector": "[data-testid=\"checkout-complete\"]",
|
|
1687
|
+
"timeout": 15000
|
|
1688
|
+
}
|
|
1684
1689
|
```
|
|
1685
1690
|
|
|
1686
1691
|
|
|
@@ -1690,145 +1695,145 @@ Always synchronize with deterministic browser conditions:
|
|
|
1690
1695
|
|
|
1691
1696
|
# Weavetab Domain Profile: DOCUMENTS
|
|
1692
1697
|
|
|
1693
|
-
Generated for @weavetab/skills v2.5.0-beta.
|
|
1698
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
1694
1699
|
|
|
1695
1700
|
|
|
1696
1701
|
## canvas-and-visual-capture
|
|
1697
1702
|
|
|
1698
|
-
# Visual Capture, Canvas Forensics & Design Extraction
|
|
1699
|
-
|
|
1700
|
-
Beyond textual DOM manipulation, modern web applications contain dynamic HTML5 canvas renderings (charts, maps, WebGL games), and agents often need high-fidelity visual artifacts.
|
|
1701
|
-
|
|
1702
|
-
---
|
|
1703
|
-
|
|
1704
|
-
## 1. Targeted Screenshots (`browser_screenshot`)
|
|
1705
|
-
|
|
1706
|
-
Capture full page layouts, the visible viewport, or specific element bounding boxes:
|
|
1707
|
-
|
|
1708
|
-
```json
|
|
1709
|
-
{
|
|
1710
|
-
"fullPage": true,
|
|
1711
|
-
"format": "png"
|
|
1712
|
-
}
|
|
1713
|
-
```
|
|
1714
|
-
|
|
1715
|
-
Or target a specific element ref:
|
|
1716
|
-
```json
|
|
1717
|
-
{
|
|
1718
|
-
"ref": "w:55",
|
|
1719
|
-
"format": "jpeg",
|
|
1720
|
-
"quality": 80
|
|
1721
|
-
}
|
|
1722
|
-
```
|
|
1723
|
-
|
|
1724
|
-
---
|
|
1725
|
-
|
|
1726
|
-
## 2. PDF Document Generation (`browser_pdf`)
|
|
1727
|
-
|
|
1728
|
-
Render the current page into a print-ready PDF document with print CSS styles applied:
|
|
1729
|
-
|
|
1730
|
-
```json
|
|
1731
|
-
{
|
|
1732
|
-
"landscape": false,
|
|
1733
|
-
"printBackground": true,
|
|
1734
|
-
"paperWidth": 8.5,
|
|
1735
|
-
"paperHeight": 11
|
|
1736
|
-
}
|
|
1737
|
-
```
|
|
1738
|
-
|
|
1739
|
-
---
|
|
1740
|
-
|
|
1741
|
-
## 3. HTML5 Canvas Pixel Inspection & Visual Grounding (`browser_canvas` & `browser_map`)
|
|
1742
|
-
|
|
1743
|
-
When a chart or graphic is rendered via `<canvas>`, standard DOM reading tools cannot see individual buttons or nodes. You have two strategies:
|
|
1744
|
-
|
|
1745
|
-
### A. Set-of-Marks Visual Grounding (Recommended for Canvas UIs & WebGL)
|
|
1746
|
-
Run `browser_map({ visual: "auto" })`. It detects canvas elements and high-contrast regions, attaches numbered badges `[1]…[N]`, and returns an annotated image:
|
|
1747
|
-
```json
|
|
1748
|
-
{
|
|
1749
|
-
"visual": "auto"
|
|
1750
|
-
}
|
|
1751
|
-
```
|
|
1752
|
-
Then interact directly by mark number without guessing pixel coordinates:
|
|
1753
|
-
```json
|
|
1754
|
-
{
|
|
1755
|
-
"mark": 3
|
|
1756
|
-
}
|
|
1757
|
-
```
|
|
1758
|
-
|
|
1759
|
-
### B. Direct Canvas Pixel Export (`browser_canvas`)
|
|
1760
|
-
To extract the raw image data or draw programmatic gesture paths:
|
|
1761
|
-
```json
|
|
1762
|
-
{
|
|
1763
|
-
"ref": "w:19",
|
|
1764
|
-
"action": "toDataURL"
|
|
1765
|
-
}
|
|
1766
|
-
```
|
|
1767
|
-
|
|
1768
|
-
---
|
|
1769
|
-
|
|
1770
|
-
## 4. Design System Extraction (`browser_extract_design`)
|
|
1771
|
-
|
|
1772
|
-
Reverse-engineer UI stylesheets, active CSS custom properties (variables), typography scales, and color palettes:
|
|
1773
|
-
|
|
1774
|
-
```json
|
|
1775
|
-
{
|
|
1776
|
-
"selector": ".antigravity-hud-panel"
|
|
1777
|
-
}
|
|
1778
|
-
```
|
|
1779
|
-
|
|
1703
|
+
# Visual Capture, Canvas Forensics & Design Extraction
|
|
1704
|
+
|
|
1705
|
+
Beyond textual DOM manipulation, modern web applications contain dynamic HTML5 canvas renderings (charts, maps, WebGL games), and agents often need high-fidelity visual artifacts.
|
|
1706
|
+
|
|
1707
|
+
---
|
|
1708
|
+
|
|
1709
|
+
## 1. Targeted Screenshots (`browser_screenshot`)
|
|
1710
|
+
|
|
1711
|
+
Capture full page layouts, the visible viewport, or specific element bounding boxes:
|
|
1712
|
+
|
|
1713
|
+
```json
|
|
1714
|
+
{
|
|
1715
|
+
"fullPage": true,
|
|
1716
|
+
"format": "png"
|
|
1717
|
+
}
|
|
1718
|
+
```
|
|
1719
|
+
|
|
1720
|
+
Or target a specific element ref:
|
|
1721
|
+
```json
|
|
1722
|
+
{
|
|
1723
|
+
"ref": "w:55",
|
|
1724
|
+
"format": "jpeg",
|
|
1725
|
+
"quality": 80
|
|
1726
|
+
}
|
|
1727
|
+
```
|
|
1728
|
+
|
|
1729
|
+
---
|
|
1730
|
+
|
|
1731
|
+
## 2. PDF Document Generation (`browser_pdf`)
|
|
1732
|
+
|
|
1733
|
+
Render the current page into a print-ready PDF document with print CSS styles applied:
|
|
1734
|
+
|
|
1735
|
+
```json
|
|
1736
|
+
{
|
|
1737
|
+
"landscape": false,
|
|
1738
|
+
"printBackground": true,
|
|
1739
|
+
"paperWidth": 8.5,
|
|
1740
|
+
"paperHeight": 11
|
|
1741
|
+
}
|
|
1742
|
+
```
|
|
1743
|
+
|
|
1744
|
+
---
|
|
1745
|
+
|
|
1746
|
+
## 3. HTML5 Canvas Pixel Inspection & Visual Grounding (`browser_canvas` & `browser_map`)
|
|
1747
|
+
|
|
1748
|
+
When a chart or graphic is rendered via `<canvas>`, standard DOM reading tools cannot see individual buttons or nodes. You have two strategies:
|
|
1749
|
+
|
|
1750
|
+
### A. Set-of-Marks Visual Grounding (Recommended for Canvas UIs & WebGL)
|
|
1751
|
+
Run `browser_map({ visual: "auto" })`. It detects canvas elements and high-contrast regions, attaches numbered badges `[1]…[N]`, and returns an annotated image:
|
|
1752
|
+
```json
|
|
1753
|
+
{
|
|
1754
|
+
"visual": "auto"
|
|
1755
|
+
}
|
|
1756
|
+
```
|
|
1757
|
+
Then interact directly by mark number without guessing pixel coordinates:
|
|
1758
|
+
```json
|
|
1759
|
+
{
|
|
1760
|
+
"mark": 3
|
|
1761
|
+
}
|
|
1762
|
+
```
|
|
1763
|
+
|
|
1764
|
+
### B. Direct Canvas Pixel Export (`browser_canvas`)
|
|
1765
|
+
To extract the raw image data or draw programmatic gesture paths:
|
|
1766
|
+
```json
|
|
1767
|
+
{
|
|
1768
|
+
"ref": "w:19",
|
|
1769
|
+
"action": "toDataURL"
|
|
1770
|
+
}
|
|
1771
|
+
```
|
|
1772
|
+
|
|
1773
|
+
---
|
|
1774
|
+
|
|
1775
|
+
## 4. Design System Extraction (`browser_extract_design`)
|
|
1776
|
+
|
|
1777
|
+
Reverse-engineer UI stylesheets, active CSS custom properties (variables), typography scales, and color palettes:
|
|
1778
|
+
|
|
1779
|
+
```json
|
|
1780
|
+
{
|
|
1781
|
+
"selector": ".antigravity-hud-panel"
|
|
1782
|
+
}
|
|
1783
|
+
```
|
|
1784
|
+
|
|
1780
1785
|
Returns structured JSON representing colors, font families, shadows, and spacing tokens.
|
|
1781
1786
|
|
|
1782
1787
|
|
|
1783
1788
|
## office-document-ingestion
|
|
1784
1789
|
|
|
1785
|
-
# Office Document Ingestion: Word, Excel & CSV Parsing
|
|
1786
|
-
|
|
1787
|
-
Agents frequently need to parse structured spreadsheets or corporate documents downloaded during automation runs. `browser_office` parses `.docx`, `.xlsx`, `.xls`, and `.csv` files directly into clean JSON structures.
|
|
1788
|
-
|
|
1789
|
-
---
|
|
1790
|
-
|
|
1791
|
-
## 1. Parsing Spreadsheets (`.xlsx`, `.csv`)
|
|
1792
|
-
|
|
1793
|
-
Stream structured sheet data, headers, and cell values:
|
|
1794
|
-
|
|
1795
|
-
```json
|
|
1796
|
-
{
|
|
1797
|
-
"filePath": "C:/Users/fy2ne/Downloads/quarterly_revenue.xlsx",
|
|
1798
|
-
"sheet": "Q3_Summary",
|
|
1799
|
-
"headerRow": 1,
|
|
1800
|
-
"maxRows": 100
|
|
1801
|
-
}
|
|
1802
|
-
```
|
|
1803
|
-
|
|
1804
|
-
### Response Example:
|
|
1805
|
-
```json
|
|
1806
|
-
{
|
|
1807
|
-
"fileType": "xlsx",
|
|
1808
|
-
"sheets": ["Q1", "Q2", "Q3_Summary"],
|
|
1809
|
-
"rowCount": 45,
|
|
1810
|
-
"data": [
|
|
1811
|
-
{ "Department": "Engineering", "Budget": 1250000, "Actual": 1180000 },
|
|
1812
|
-
{ "Department": "Marketing", "Budget": 600000, "Actual": 620000 }
|
|
1813
|
-
]
|
|
1814
|
-
}
|
|
1815
|
-
```
|
|
1816
|
-
|
|
1817
|
-
---
|
|
1818
|
-
|
|
1819
|
-
## 2. Ingesting Word Documents (`.docx`)
|
|
1820
|
-
|
|
1821
|
-
Extract semantic paragraphs, document headings, tables, and lists:
|
|
1822
|
-
|
|
1823
|
-
```json
|
|
1824
|
-
{
|
|
1825
|
-
"filePath": "C:/Users/fy2ne/Documents/service_agreement.docx",
|
|
1826
|
-
"extractTables": true
|
|
1827
|
-
}
|
|
1828
|
-
```
|
|
1829
|
-
|
|
1830
|
-
### Operational Advantages:
|
|
1831
|
-
- Eliminates the need for heavy external Python libraries or microservices.
|
|
1790
|
+
# Office Document Ingestion: Word, Excel & CSV Parsing
|
|
1791
|
+
|
|
1792
|
+
Agents frequently need to parse structured spreadsheets or corporate documents downloaded during automation runs. `browser_office` parses `.docx`, `.xlsx`, `.xls`, and `.csv` files directly into clean JSON structures.
|
|
1793
|
+
|
|
1794
|
+
---
|
|
1795
|
+
|
|
1796
|
+
## 1. Parsing Spreadsheets (`.xlsx`, `.csv`)
|
|
1797
|
+
|
|
1798
|
+
Stream structured sheet data, headers, and cell values:
|
|
1799
|
+
|
|
1800
|
+
```json
|
|
1801
|
+
{
|
|
1802
|
+
"filePath": "C:/Users/fy2ne/Downloads/quarterly_revenue.xlsx",
|
|
1803
|
+
"sheet": "Q3_Summary",
|
|
1804
|
+
"headerRow": 1,
|
|
1805
|
+
"maxRows": 100
|
|
1806
|
+
}
|
|
1807
|
+
```
|
|
1808
|
+
|
|
1809
|
+
### Response Example:
|
|
1810
|
+
```json
|
|
1811
|
+
{
|
|
1812
|
+
"fileType": "xlsx",
|
|
1813
|
+
"sheets": ["Q1", "Q2", "Q3_Summary"],
|
|
1814
|
+
"rowCount": 45,
|
|
1815
|
+
"data": [
|
|
1816
|
+
{ "Department": "Engineering", "Budget": 1250000, "Actual": 1180000 },
|
|
1817
|
+
{ "Department": "Marketing", "Budget": 600000, "Actual": 620000 }
|
|
1818
|
+
]
|
|
1819
|
+
}
|
|
1820
|
+
```
|
|
1821
|
+
|
|
1822
|
+
---
|
|
1823
|
+
|
|
1824
|
+
## 2. Ingesting Word Documents (`.docx`)
|
|
1825
|
+
|
|
1826
|
+
Extract semantic paragraphs, document headings, tables, and lists:
|
|
1827
|
+
|
|
1828
|
+
```json
|
|
1829
|
+
{
|
|
1830
|
+
"filePath": "C:/Users/fy2ne/Documents/service_agreement.docx",
|
|
1831
|
+
"extractTables": true
|
|
1832
|
+
}
|
|
1833
|
+
```
|
|
1834
|
+
|
|
1835
|
+
### Operational Advantages:
|
|
1836
|
+
- Eliminates the need for heavy external Python libraries or microservices.
|
|
1832
1837
|
- Safely sanitizes binary formats before passing content into LLM context.
|
|
1833
1838
|
|
|
1834
1839
|
|
|
@@ -1838,68 +1843,68 @@ Extract semantic paragraphs, document headings, tables, and lists:
|
|
|
1838
1843
|
|
|
1839
1844
|
# Weavetab Domain Profile: DEVELOPER
|
|
1840
1845
|
|
|
1841
|
-
Generated for @weavetab/skills v2.5.0-beta.
|
|
1846
|
+
Generated for @weavetab/skills v2.5.0-beta.5
|
|
1842
1847
|
|
|
1843
1848
|
|
|
1844
1849
|
## github-forensics
|
|
1845
1850
|
|
|
1846
|
-
# GitHub Forensics & Repository Architecture Inspection
|
|
1847
|
-
|
|
1848
|
-
Navigating GitHub repositories via web browsing burns massive token budgets loading HTML chrome, comment threads, and diff trees. Weavetab includes a dedicated `browser_github` tool that interacts directly with git metadata and raw endpoints.
|
|
1849
|
-
|
|
1850
|
-
---
|
|
1851
|
-
|
|
1852
|
-
## 1. High-Level Repository Analysis (action: "analyze")
|
|
1853
|
-
|
|
1854
|
-
Quickly summarize repo structure, languages, dependency graphs, and recent commit frequency:
|
|
1855
|
-
|
|
1856
|
-
```json
|
|
1857
|
-
{
|
|
1858
|
-
"action": "analyze",
|
|
1859
|
-
"repo": "Weavetab/MCP"
|
|
1860
|
-
}
|
|
1861
|
-
```
|
|
1862
|
-
|
|
1863
|
-
---
|
|
1864
|
-
|
|
1865
|
-
## 2. Reading Repository Source Files (action: "read")
|
|
1866
|
-
|
|
1867
|
-
Directly stream files and directories from any public or authenticated GitHub repo without cloning or burning API rate limits:
|
|
1868
|
-
|
|
1869
|
-
```json
|
|
1870
|
-
{
|
|
1871
|
-
"action": "read",
|
|
1872
|
-
"repo": "Weavetab/MCP",
|
|
1873
|
-
"paths": ["src/server.ts"],
|
|
1874
|
-
"line_range": [1, 200]
|
|
1875
|
-
}
|
|
1876
|
-
```
|
|
1877
|
-
|
|
1878
|
-
---
|
|
1879
|
-
|
|
1880
|
-
## 3. Pull Request Forensics (action: "pr")
|
|
1881
|
-
|
|
1882
|
-
Retrieve PR diffs, changed files, review comments, CI checks, and mergeability status:
|
|
1883
|
-
|
|
1884
|
-
```json
|
|
1885
|
-
{
|
|
1886
|
-
"action": "pr",
|
|
1887
|
-
"repo": "Weavetab/MCP",
|
|
1888
|
-
"number": 42
|
|
1889
|
-
}
|
|
1890
|
-
```
|
|
1891
|
-
|
|
1892
|
-
---
|
|
1893
|
-
|
|
1894
|
-
## 4. Issue Triage & Search (action: "issues")
|
|
1895
|
-
|
|
1896
|
-
Query repository issue trackers with state, label, and keyword filters:
|
|
1897
|
-
|
|
1898
|
-
```json
|
|
1899
|
-
{
|
|
1900
|
-
"action": "issues",
|
|
1901
|
-
"repo": "Weavetab/MCP",
|
|
1902
|
-
"state": "open",
|
|
1903
|
-
"labels": ["bug", "priority"]
|
|
1904
|
-
}
|
|
1851
|
+
# GitHub Forensics & Repository Architecture Inspection
|
|
1852
|
+
|
|
1853
|
+
Navigating GitHub repositories via web browsing burns massive token budgets loading HTML chrome, comment threads, and diff trees. Weavetab includes a dedicated `browser_github` tool that interacts directly with git metadata and raw endpoints.
|
|
1854
|
+
|
|
1855
|
+
---
|
|
1856
|
+
|
|
1857
|
+
## 1. High-Level Repository Analysis (action: "analyze")
|
|
1858
|
+
|
|
1859
|
+
Quickly summarize repo structure, languages, dependency graphs, and recent commit frequency:
|
|
1860
|
+
|
|
1861
|
+
```json
|
|
1862
|
+
{
|
|
1863
|
+
"action": "analyze",
|
|
1864
|
+
"repo": "Weavetab/MCP"
|
|
1865
|
+
}
|
|
1866
|
+
```
|
|
1867
|
+
|
|
1868
|
+
---
|
|
1869
|
+
|
|
1870
|
+
## 2. Reading Repository Source Files (action: "read")
|
|
1871
|
+
|
|
1872
|
+
Directly stream files and directories from any public or authenticated GitHub repo without cloning or burning API rate limits:
|
|
1873
|
+
|
|
1874
|
+
```json
|
|
1875
|
+
{
|
|
1876
|
+
"action": "read",
|
|
1877
|
+
"repo": "Weavetab/MCP",
|
|
1878
|
+
"paths": ["src/server.ts"],
|
|
1879
|
+
"line_range": [1, 200]
|
|
1880
|
+
}
|
|
1881
|
+
```
|
|
1882
|
+
|
|
1883
|
+
---
|
|
1884
|
+
|
|
1885
|
+
## 3. Pull Request Forensics (action: "pr")
|
|
1886
|
+
|
|
1887
|
+
Retrieve PR diffs, changed files, review comments, CI checks, and mergeability status:
|
|
1888
|
+
|
|
1889
|
+
```json
|
|
1890
|
+
{
|
|
1891
|
+
"action": "pr",
|
|
1892
|
+
"repo": "Weavetab/MCP",
|
|
1893
|
+
"number": 42
|
|
1894
|
+
}
|
|
1895
|
+
```
|
|
1896
|
+
|
|
1897
|
+
---
|
|
1898
|
+
|
|
1899
|
+
## 4. Issue Triage & Search (action: "issues")
|
|
1900
|
+
|
|
1901
|
+
Query repository issue trackers with state, label, and keyword filters:
|
|
1902
|
+
|
|
1903
|
+
```json
|
|
1904
|
+
{
|
|
1905
|
+
"action": "issues",
|
|
1906
|
+
"repo": "Weavetab/MCP",
|
|
1907
|
+
"state": "open",
|
|
1908
|
+
"labels": ["bug", "priority"]
|
|
1909
|
+
}
|
|
1905
1910
|
```
|