@weavetab/skills 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -108
- package/ROUTER.md +43 -43
- package/bin/cli.js +232 -232
- package/browser/dom-strategy.md +121 -119
- package/browser/form-automation.md +84 -87
- package/browser/interaction-pipeline.md +242 -216
- package/browser/tab-and-window.md +136 -136
- package/desktop/desktop-targeting.md +85 -85
- package/desktop/electron-discovery.md +115 -115
- package/developer/github-forensics.md +89 -74
- package/dist/bundled/weavetab-all.md +1885 -1709
- package/dist/bundled/weavetab-browser.md +526 -501
- package/dist/bundled/weavetab-desktop.md +176 -176
- package/dist/bundled/weavetab-developer.md +84 -67
- package/dist/bundled/weavetab-documents.md +184 -142
- package/dist/bundled/weavetab-memory.md +259 -233
- package/dist/bundled/weavetab-network-and-perf.md +250 -223
- package/dist/bundled/weavetab-plugins.md +88 -83
- package/dist/bundled/weavetab-resilience.md +244 -216
- package/dist/bundled/weavetab-security.md +93 -87
- package/dist/granular/browser_dom-strategy.md +121 -119
- package/dist/granular/browser_form-automation.md +84 -87
- package/dist/granular/browser_interaction-pipeline.md +242 -216
- package/dist/granular/browser_tab-and-window.md +136 -136
- package/dist/granular/desktop_desktop-targeting.md +85 -85
- package/dist/granular/desktop_electron-discovery.md +115 -115
- package/dist/granular/developer_github-forensics.md +89 -74
- package/dist/granular/documents_canvas-and-visual-capture.md +117 -103
- package/dist/granular/documents_office-document-ingestion.md +91 -63
- package/dist/granular/memory_selector-memory-system.md +127 -127
- package/dist/granular/memory_session-trail.md +111 -95
- package/dist/granular/memory_site-learning.md +62 -53
- package/dist/granular/network-and-perf_device-and-environment.md +100 -87
- package/dist/granular/network-and-perf_network-intercept-and-mock.md +97 -84
- package/dist/granular/network-and-perf_performance-and-vitals.md +86 -84
- package/dist/granular/plugins_hooks-and-overrides.md +40 -35
- package/dist/granular/plugins_plugin-runtime.md +63 -63
- package/dist/granular/resilience_loop-breaker.md +72 -67
- package/dist/granular/resilience_session-time-travel.md +146 -131
- package/dist/granular/resilience_stale-ref-recovery.md +61 -53
- package/dist/granular/security_rbac-and-policies.md +50 -47
- package/dist/granular/security_secret-containment-protocol.md +62 -59
- package/documents/canvas-and-visual-capture.md +117 -103
- package/documents/office-document-ingestion.md +91 -63
- package/evals/evaluator.js +146 -146
- package/evals/scenarios.json +239 -239
- package/memory/selector-memory-system.md +127 -127
- package/memory/session-trail.md +111 -95
- package/memory/site-learning.md +61 -52
- package/network-and-perf/device-and-environment.md +100 -87
- package/network-and-perf/network-intercept-and-mock.md +97 -84
- package/network-and-perf/performance-and-vitals.md +86 -84
- package/package.json +74 -73
- package/plugins/hooks-and-overrides.md +40 -35
- package/plugins/plugin-runtime.md +63 -63
- package/resilience/loop-breaker.md +72 -67
- package/resilience/session-time-travel.md +146 -131
- package/resilience/stale-ref-recovery.md +61 -53
- package/security/rbac-and-policies.md +50 -47
- package/security/secret-containment-protocol.md +62 -59
- package/skills.json +425 -426
- package/src/api.js +239 -239
|
@@ -1,501 +1,526 @@
|
|
|
1
|
-
# Weavetab Domain Profile: BROWSER
|
|
2
|
-
|
|
3
|
-
Generated for @weavetab/skills v2.5.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## dom-strategy
|
|
7
|
-
|
|
8
|
-
# DOM Strategy & Token Conservation Engine
|
|
9
|
-
|
|
10
|
-
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.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## 1. The 4-Tier Reading Filter
|
|
15
|
-
|
|
16
|
-
Always select the narrowest tool that satisfies your immediate objective:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
┌───────────────────────────────┐
|
|
20
|
-
│ Do you need full structural │
|
|
21
|
-
│ context or just a target? │
|
|
22
|
-
└──────────────┬────────────────┘
|
|
23
|
-
│
|
|
24
|
-
┌───────────────┴───────────────┐
|
|
25
|
-
▼ ▼
|
|
26
|
-
[Specific Target] [Whole Document]
|
|
27
|
-
│ │
|
|
28
|
-
┌────────┴────────┐ ┌───────┴────────┐
|
|
29
|
-
▼ ▼ ▼ ▼
|
|
30
|
-
Target by text Target by role Read articles Interactive
|
|
31
|
-
or keywords or hierarchy or prose data UI layout
|
|
32
|
-
│ │ │ │
|
|
33
|
-
▼ ▼ ▼ ▼
|
|
34
|
-
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
35
|
-
(lite: true) (lite: true)
|
|
36
|
-
│
|
|
37
|
-
[Sparse / Canvas / WebGL / <5 elements?]
|
|
38
|
-
│
|
|
39
|
-
▼
|
|
40
|
-
`browser_map`
|
|
41
|
-
(visual: "auto")
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Tier 1: Targeted Keyword Jump (`browser_find`)
|
|
45
|
-
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
46
|
-
- **Latency**: Sub-5ms CDP search.
|
|
47
|
-
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"query": "Sign In"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
58
|
-
Use `browser_map` when you must understand the interactive structure of the page.
|
|
59
|
-
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
60
|
-
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
61
|
-
- **
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- **
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- **
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"
|
|
427
|
-
"
|
|
428
|
-
}
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
"
|
|
452
|
-
"
|
|
453
|
-
}
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
1
|
+
# Weavetab Domain Profile: BROWSER
|
|
2
|
+
|
|
3
|
+
Generated for @weavetab/skills v2.5.1
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## dom-strategy
|
|
7
|
+
|
|
8
|
+
# DOM Strategy & Token Conservation Engine
|
|
9
|
+
|
|
10
|
+
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.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. The 4-Tier Reading Filter
|
|
15
|
+
|
|
16
|
+
Always select the narrowest tool that satisfies your immediate objective:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌───────────────────────────────┐
|
|
20
|
+
│ Do you need full structural │
|
|
21
|
+
│ context or just a target? │
|
|
22
|
+
└──────────────┬────────────────┘
|
|
23
|
+
│
|
|
24
|
+
┌───────────────┴───────────────┐
|
|
25
|
+
▼ ▼
|
|
26
|
+
[Specific Target] [Whole Document]
|
|
27
|
+
│ │
|
|
28
|
+
┌────────┴────────┐ ┌───────┴────────┐
|
|
29
|
+
▼ ▼ ▼ ▼
|
|
30
|
+
Target by text Target by role Read articles Interactive
|
|
31
|
+
or keywords or hierarchy or prose data UI layout
|
|
32
|
+
│ │ │ │
|
|
33
|
+
▼ ▼ ▼ ▼
|
|
34
|
+
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
35
|
+
(lite: true) (lite: true)
|
|
36
|
+
│
|
|
37
|
+
[Sparse / Canvas / WebGL / <5 elements?]
|
|
38
|
+
│
|
|
39
|
+
▼
|
|
40
|
+
`browser_map`
|
|
41
|
+
(visual: "auto")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Tier 1: Targeted Keyword Jump (`browser_find`)
|
|
45
|
+
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
46
|
+
- **Latency**: Sub-5ms CDP search.
|
|
47
|
+
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"query": "Sign In"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Set `"all": true` to return every match (with `"limit"` capping the count, default 10) instead of only the first.
|
|
56
|
+
|
|
57
|
+
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
58
|
+
Use `browser_map` when you must understand the interactive structure of the page.
|
|
59
|
+
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
60
|
+
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
61
|
+
- **Scope & filter**: Narrow a dense page with `"scope": "main"` (or `navigation`, `sidebar`, `form`, `modal`, `utility`) and `"query": "<substring>"` to filter by label/role.
|
|
62
|
+
- **Delta mode**: Set `"delta": true` on repeated maps to receive only what changed since the last call (up to 97% token savings).
|
|
63
|
+
- **Pruning**: Set `"prune": true` to drop hidden, non-interactive subtrees and collapse SVG icons in this snapshot.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"lite": true,
|
|
68
|
+
"scope": "main",
|
|
69
|
+
"delta": true
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Tier 3: Markdown Prose & Data Ingestion (`browser_scrape`)
|
|
74
|
+
Use `browser_scrape` when your objective is reading articles, blog posts, documentation, or legal terms rather than clicking buttons.
|
|
75
|
+
- Converts HTML to clean, semantically structured Markdown.
|
|
76
|
+
- Automatically handles readability filtering and removes advertising/cookie banners.
|
|
77
|
+
|
|
78
|
+
### Tier 4: Set-of-Marks Visual Grounding (`browser_map` with `visual: "auto"`)
|
|
79
|
+
Use when target pages are canvas-heavy, WebGL, Figma, Google Sheets, or when standard `browser_map` returns < 5 interactive elements.
|
|
80
|
+
- Injects temporary numbered badges `[1]…[N]` over interactive elements & canvas regions.
|
|
81
|
+
- Captures an annotated screenshot + returns a structured mark list.
|
|
82
|
+
- **Zero Page Pollution**: Strips badges immediately after capture.
|
|
83
|
+
- **Action**: Pass `"mark": N` to `browser_click` to click the exact element without re-scanning the DOM.
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"visual": "auto"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Tier 5: Runtime State & JavaScript Evaluation (`browser_eval`)
|
|
92
|
+
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:
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"expression": "window.__INITIAL_STATE__ || document.title"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 2. Volatile Ref ID & Visual Mark Navigation
|
|
102
|
+
|
|
103
|
+
Weavetab maps elements to ephemeral handles (`w:NN`) and visual marks (`[1]…[N]`):
|
|
104
|
+
|
|
105
|
+
### Operational Rules:
|
|
106
|
+
1. **Never Construct Speculative CSS Selectors**: If an element has ref `w:14`, pass `"ref": "w:14"` to `browser_click`, `browser_fill`, `browser_type`.
|
|
107
|
+
2. **Visual Mark Targeting**: On canvas or unlabelled elements from `visual: "auto"`, pass `"mark": N` directly to `browser_click({ mark: N })`.
|
|
108
|
+
3. **Lifespan of Handles**: Ref IDs and marks invalidate on page navigation (`browser_navigate`) or heavy SPA re-renders.
|
|
109
|
+
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.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## form-automation
|
|
113
|
+
|
|
114
|
+
# Form Automation: Atomic Multi-Field Execution
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 1. Atomic Multi-Field Filling (`browser_fill`)
|
|
121
|
+
|
|
122
|
+
`browser_fill` populates multiple inputs, textareas, checkboxes, and radio buttons in a single CDP roundtrip.
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"fields": [
|
|
127
|
+
{
|
|
128
|
+
"ref": "w:12",
|
|
129
|
+
"value": "Anas"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"ref": "w:14",
|
|
133
|
+
"value": "Khezaz"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"ref": "w:16",
|
|
137
|
+
"value": "contact@weavetab.com"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"ref": "w:19",
|
|
141
|
+
"value": "true"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Supported Field Value Types:
|
|
148
|
+
Every `value` is a **string**.
|
|
149
|
+
- **Text / Search / Email / Tel**: The literal text to type.
|
|
150
|
+
- **Checkbox / ARIA switch**: A truthy string (`"true"`, `"yes"`, `"checked"`, `"1"`, or `"on"`) checks it; anything else unchecks it.
|
|
151
|
+
- **Radio Buttons**: Set the matching option's ref to a truthy string to select it.
|
|
152
|
+
- **Select**: The option `value` or visible text to choose.
|
|
153
|
+
- **ContentEditable**: The text content to set (inner text formatting handled automatically).
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 2. Dropdown & Select Automation (`browser_select`)
|
|
158
|
+
|
|
159
|
+
Standard `<select>` elements and custom dropdowns often fail under simple click-and-type automation. `browser_select` dispatches native CDP change events.
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"ref": "w:31",
|
|
164
|
+
"value": "enterprise_tier"
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`value` is a **single string** (required) and matches either the option's `value` or its visible text, trimmed. For a custom ARIA/React dropdown it opens the popover, scans `[role="option"]`/`[role="menuitem"]` candidates, and clicks the best match.
|
|
169
|
+
|
|
170
|
+
### Multi-Select Support:
|
|
171
|
+
`browser_select` selects one option per call. For a `<select multiple>` element, call it once per option you want selected.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 3. Form Submission Best Practices
|
|
176
|
+
|
|
177
|
+
1. **Pre-Validate State**: Before clicking Submit, confirm that required fields have passed HTML5/client-side validation (no active red borders or validation popups).
|
|
178
|
+
2. **Submit via Enter Key vs Click**:
|
|
179
|
+
- If the submit button has a dynamic ref or changes during typing, send `"key": "Enter"` via `browser_key` inside the last filled text field.
|
|
180
|
+
- Otherwise, locate the submit button via `browser_find` and click via `browser_click`.
|
|
181
|
+
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.
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
## interaction-pipeline
|
|
185
|
+
|
|
186
|
+
# Interaction Pipeline: Physical & Synthetic Input Engine
|
|
187
|
+
|
|
188
|
+
Weavetab executes browser interactions via direct Chrome DevTools Protocol (CDP) dispatch, bypassing synthetic JavaScript event limitations and anti-automation tripwires.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 1. Clicking Elements (`browser_click`)
|
|
193
|
+
|
|
194
|
+
Execute deterministic clicks on DOM elements using volatile handles (`ref`/`id`), CSS selectors, labels, marks, or coordinates.
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"ref": "w:23"
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Targeting & Options:
|
|
203
|
+
- **By ref**: pass `id` (or its alias `ref`) from `browser_map`.
|
|
204
|
+
- **By selector / label**: pass `selector` (alias `target`) or `label` (visible text or aria-label).
|
|
205
|
+
- **By visual mark**: pass `mark: N` from `browser_map({ visual: "auto" })` for canvas/WebGL pages.
|
|
206
|
+
- **By coordinates**: pass `x`/`y`, or a raw `backendNodeId`.
|
|
207
|
+
- **`intent`**: an optional semantic description (e.g. `"submit login form"`) — Weavetab checks learned memory first and clicks a high-confidence selector without DOM resolution.
|
|
208
|
+
- **`include_map`**: set `true` to return a refreshed page map with the result.
|
|
209
|
+
|
|
210
|
+
> `browser_click` always dispatches a left-button single click. To double-click or right-click, use `browser_pointer` (`double_click`) or open the native context menu another way.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 2. Text Input (`browser_type`)
|
|
215
|
+
|
|
216
|
+
Simulate natural keystrokes into input fields, textareas, and `contenteditable` elements.
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"ref": "w:18",
|
|
221
|
+
"text": "Enterprise Search Query",
|
|
222
|
+
"clearFirst": true
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Useful options:
|
|
227
|
+
- **`clearFirst`**: wipe existing field content before typing.
|
|
228
|
+
- **`paste`**: instant paste mode via clipboard, auto-enabled for text longer than 8 chars.
|
|
229
|
+
- If `id`/`selector`/`label` is omitted, text is typed into the currently focused element.
|
|
230
|
+
|
|
231
|
+
> [!CAUTION]
|
|
232
|
+
> **Secret Boundary Enforcement**:
|
|
233
|
+
> NEVER use `browser_type` for passwords, API tokens, or payment card data. Always route sensitive credentials through [`security/secret-containment-protocol.md`](../security/secret-containment-protocol.md) via `browser_type_secret`.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 3. Physical Pointer Trajectories (`browser_pointer`)
|
|
238
|
+
|
|
239
|
+
Handle complex drag-and-drop interactions, canvas sketching, hover-activated navigation flyouts, and custom sliders.
|
|
240
|
+
|
|
241
|
+
Actions: `hover`, `click`, `double_click`, `drag_and_drop`, `hover_chain`.
|
|
242
|
+
|
|
243
|
+
### Hover:
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"action": "hover",
|
|
247
|
+
"ref": "w:12",
|
|
248
|
+
"waitForChild": ".submenu",
|
|
249
|
+
"holdMs": 200
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Double Click:
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"action": "double_click",
|
|
257
|
+
"ref": "w:30"
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Drag & Drop Pipeline:
|
|
262
|
+
A single `drag_and_drop` action drives the whole drag — supply the source (`ref`/`selector`/`x`/`y`) and destination (`end_ref`/`end_selector`/`end_x`/`end_y`):
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"action": "drag_and_drop",
|
|
266
|
+
"ref": "w:20",
|
|
267
|
+
"end_ref": "w:35"
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Multi-Level Flyout Menus (`hover_chain`):
|
|
272
|
+
Hover each element in order and click the last one (e.g. Photoshop/Figma-style menus):
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"hover_chain": ["File", "Export As", "PNG"]
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## 4. Keystrokes & Shortcuts (`browser_key`)
|
|
282
|
+
|
|
283
|
+
Trigger keyboard shortcuts, navigation keys, and dialog dismissals.
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"key": "Enter"
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### High-Frequency Key Combos:
|
|
292
|
+
- **Select All & Delete**: Send `"key": "a"` with `"modifiers": ["Ctrl"]` (or `["Meta"]` on macOS), followed by `"key": "Backspace"`.
|
|
293
|
+
- **Dismiss Overlays**: Send `"key": "Escape"`.
|
|
294
|
+
- **Form Tab Navigation**: Send `"key": "Tab"`.
|
|
295
|
+
|
|
296
|
+
Valid modifiers are `Alt`, `Ctrl`, `Meta`, and `Shift`.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## 5. OS File Upload Bypass (`browser_upload`)
|
|
301
|
+
|
|
302
|
+
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`.
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"nodeId": 4821,
|
|
307
|
+
"filePaths": [
|
|
308
|
+
"C:/Users/me/Documents/contract.pdf",
|
|
309
|
+
"C:/Users/me/Documents/financial_report.xlsx"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
- **Targeting**: Supply the CDP `nodeId` (backendNodeId) of the `<input type="file">` element — obtain it from `browser_map`, `browser_inspect`, or `browser_find` output.
|
|
315
|
+
- **Hidden Inputs**: `browser_upload` automatically handles `display: none` file inputs commonly used in custom drag-and-drop upload widgets.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## 6. Viewport & Element Scrolling (`browser_scroll`)
|
|
320
|
+
|
|
321
|
+
Scroll the entire page viewport or scroll specific scrollable containers:
|
|
322
|
+
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"direction": "down",
|
|
326
|
+
"distance": 500
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Or scroll a specific element container:
|
|
331
|
+
```json
|
|
332
|
+
{
|
|
333
|
+
"ref": "w:12",
|
|
334
|
+
"direction": "down",
|
|
335
|
+
"distance": 300
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## 7. Native Dialog Handling (`browser_dialog`)
|
|
342
|
+
|
|
343
|
+
Handle native JavaScript `alert`, `confirm`, `prompt`, or `beforeunload` dialogs that block page execution:
|
|
344
|
+
|
|
345
|
+
```json
|
|
346
|
+
{
|
|
347
|
+
"action": "accept",
|
|
348
|
+
"promptText": "Confirmed"
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## 8. High-Speed Action Batches (`browser_burst`)
|
|
355
|
+
|
|
356
|
+
Execute multiple sequential micro-actions in a single CDP roundtrip without waiting for intermediate LLM turns:
|
|
357
|
+
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"steps": [
|
|
361
|
+
{ "tool": "browser_type", "ref": "w:10", "text": "search query" },
|
|
362
|
+
{ "tool": "click_and_wait", "ref": "w:15" }
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Macro steps (`type_and_send`, `click_and_wait`, `navigate_and_read`, `scroll_and_read`, `fill_form`) collapse common two-step patterns into one entry. *(Accepts both `steps` and `actions`, with arguments either nested under `args` or specified flat on the step object.)*
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## 9. Visual Element Highlighting & Consideration (`browser_highlight`)
|
|
372
|
+
|
|
373
|
+
Draw visual consideration, target lock, danger/success, or shimmer overlays without mutating the DOM. Supports multi-element candidate evaluation:
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"refs": ["w:12", "w:15", "w:23"],
|
|
378
|
+
"style": "consideration",
|
|
379
|
+
"label": "Evaluating form options",
|
|
380
|
+
"duration": 2000
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Presentation Styles:
|
|
385
|
+
- `"consideration"`: Soft pulsing cyan/blue outline (`#38bdf8`) with ambient glow — ideal when weighing multiple interactive candidates.
|
|
386
|
+
- `"target"`: High-contrast amber lock-on ring (`#f59e0b`) before executing high-impact clicks.
|
|
387
|
+
- `"danger"`: Red warning border (`#ef4444`) for destructive buttons (Delete, Reset, Purge).
|
|
388
|
+
- `"success"`: Emerald glow (`#10b981`) confirming completed actions.
|
|
389
|
+
- `"shimmer"`: Rapid purple accent wave (default for quick inspection).
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## 10. System Clipboard Bridging (`browser_clipboard`)
|
|
394
|
+
|
|
395
|
+
Read or write system clipboard text during automation:
|
|
396
|
+
|
|
397
|
+
```json
|
|
398
|
+
{
|
|
399
|
+
"action": "write",
|
|
400
|
+
"text": "AuthToken_xyz987"
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
## tab-and-window
|
|
406
|
+
|
|
407
|
+
# Tab & Window Lifecycle Management
|
|
408
|
+
|
|
409
|
+
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.
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## 1. Tab Discovery & Target Enumeration
|
|
414
|
+
|
|
415
|
+
Inspect all active targets, open URLs, and page titles:
|
|
416
|
+
|
|
417
|
+
```json
|
|
418
|
+
{
|
|
419
|
+
"action": "list"
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
To list targets inside a specific desktop app (e.g. Discord, Slack):
|
|
424
|
+
```json
|
|
425
|
+
{
|
|
426
|
+
"action": "list",
|
|
427
|
+
"app": "discord"
|
|
428
|
+
}
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
> [!TIP]
|
|
432
|
+
> Always pass `"app": "<name>"` when inspecting desktop applications. This guarantees that Weavetab does not launch or query the web browser.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 2. Opening Tabs & Smart Reuse
|
|
437
|
+
|
|
438
|
+
Open a target URL. By default, `reuse: true` will focus an existing tab if the URL is already loaded:
|
|
439
|
+
|
|
440
|
+
```json
|
|
441
|
+
{
|
|
442
|
+
"action": "open",
|
|
443
|
+
"url": "https://github.com"
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
To force opening a brand-new duplicate tab instead of reusing:
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"action": "open",
|
|
451
|
+
"url": "https://github.com",
|
|
452
|
+
"reuse": false
|
|
453
|
+
}
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## 3. Context Switching
|
|
459
|
+
|
|
460
|
+
Switch active agent focus between open tabs:
|
|
461
|
+
|
|
462
|
+
```json
|
|
463
|
+
{
|
|
464
|
+
"action": "switch",
|
|
465
|
+
"tabId": "TARGET_PAGE_ID"
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
---
|
|
470
|
+
|
|
471
|
+
## 4. Closing Tabs & Batch Cleanup
|
|
472
|
+
|
|
473
|
+
Close a single tab:
|
|
474
|
+
```json
|
|
475
|
+
{
|
|
476
|
+
"action": "close",
|
|
477
|
+
"tabId": "TARGET_PAGE_ID"
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Close multiple tabs simultaneously in a single round-trip:
|
|
482
|
+
```json
|
|
483
|
+
{
|
|
484
|
+
"action": "close",
|
|
485
|
+
"tabIds": ["TARGET_1", "TARGET_2", "TARGET_3"]
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## 5. Native Window Management
|
|
492
|
+
|
|
493
|
+
List native OS windows:
|
|
494
|
+
```json
|
|
495
|
+
{
|
|
496
|
+
"action": "list_windows"
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Bring a specific native window to the foreground:
|
|
501
|
+
```json
|
|
502
|
+
{
|
|
503
|
+
"action": "focus_window",
|
|
504
|
+
"windowId": 1
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## 6. Duplicate Consolidation & Auto-Heal
|
|
511
|
+
|
|
512
|
+
Deduplicate redundant tabs across the session:
|
|
513
|
+
```json
|
|
514
|
+
{
|
|
515
|
+
"action": "consolidate"
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
If a target page crashes or detaches due to memory limits:
|
|
520
|
+
```json
|
|
521
|
+
{
|
|
522
|
+
"action": "heal"
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
The auto-heal routine re-establishes CDP protocol sessions, reconnects event listeners, and synchronizes the active page target.
|