@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
package/browser/dom-strategy.md
CHANGED
|
@@ -1,119 +1,121 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: dom-strategy
|
|
3
|
-
domain: browser
|
|
4
|
-
triggers:
|
|
5
|
-
- "read page"
|
|
6
|
-
- "inspect dom"
|
|
7
|
-
- "find element"
|
|
8
|
-
- "parse webpage"
|
|
9
|
-
- "locate button"
|
|
10
|
-
- "extract text"
|
|
11
|
-
tools:
|
|
12
|
-
- "browser_map"
|
|
13
|
-
- "browser_find"
|
|
14
|
-
- "browser_scrape"
|
|
15
|
-
- "browser_snapshot"
|
|
16
|
-
- "browser_eval"
|
|
17
|
-
weavetab: ">=2.5.0"
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
# DOM Strategy & Token Conservation Engine
|
|
21
|
-
|
|
22
|
-
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.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 1. The 4-Tier Reading Filter
|
|
27
|
-
|
|
28
|
-
Always select the narrowest tool that satisfies your immediate objective:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
┌───────────────────────────────┐
|
|
32
|
-
│ Do you need full structural │
|
|
33
|
-
│ context or just a target? │
|
|
34
|
-
└──────────────┬────────────────┘
|
|
35
|
-
│
|
|
36
|
-
┌───────────────┴───────────────┐
|
|
37
|
-
▼ ▼
|
|
38
|
-
[Specific Target] [Whole Document]
|
|
39
|
-
│ │
|
|
40
|
-
┌────────┴────────┐ ┌───────┴────────┐
|
|
41
|
-
▼ ▼ ▼ ▼
|
|
42
|
-
Target by text Target by role Read articles Interactive
|
|
43
|
-
or keywords or hierarchy or prose data UI layout
|
|
44
|
-
│ │ │ │
|
|
45
|
-
▼ ▼ ▼ ▼
|
|
46
|
-
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
47
|
-
(lite: true) (lite: true)
|
|
48
|
-
│
|
|
49
|
-
[Sparse / Canvas / WebGL / <5 elements?]
|
|
50
|
-
│
|
|
51
|
-
▼
|
|
52
|
-
`browser_map`
|
|
53
|
-
(visual: "auto")
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Tier 1: Targeted Keyword Jump (`browser_find`)
|
|
57
|
-
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
58
|
-
- **Latency**: Sub-5ms CDP search.
|
|
59
|
-
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"query": "Sign In"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
70
|
-
Use `browser_map` when you must understand the interactive structure of the page.
|
|
71
|
-
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
72
|
-
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
id: dom-strategy
|
|
3
|
+
domain: browser
|
|
4
|
+
triggers:
|
|
5
|
+
- "read page"
|
|
6
|
+
- "inspect dom"
|
|
7
|
+
- "find element"
|
|
8
|
+
- "parse webpage"
|
|
9
|
+
- "locate button"
|
|
10
|
+
- "extract text"
|
|
11
|
+
tools:
|
|
12
|
+
- "browser_map"
|
|
13
|
+
- "browser_find"
|
|
14
|
+
- "browser_scrape"
|
|
15
|
+
- "browser_snapshot"
|
|
16
|
+
- "browser_eval"
|
|
17
|
+
weavetab: ">=2.5.0"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# DOM Strategy & Token Conservation Engine
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. The 4-Tier Reading Filter
|
|
27
|
+
|
|
28
|
+
Always select the narrowest tool that satisfies your immediate objective:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
┌───────────────────────────────┐
|
|
32
|
+
│ Do you need full structural │
|
|
33
|
+
│ context or just a target? │
|
|
34
|
+
└──────────────┬────────────────┘
|
|
35
|
+
│
|
|
36
|
+
┌───────────────┴───────────────┐
|
|
37
|
+
▼ ▼
|
|
38
|
+
[Specific Target] [Whole Document]
|
|
39
|
+
│ │
|
|
40
|
+
┌────────┴────────┐ ┌───────┴────────┐
|
|
41
|
+
▼ ▼ ▼ ▼
|
|
42
|
+
Target by text Target by role Read articles Interactive
|
|
43
|
+
or keywords or hierarchy or prose data UI layout
|
|
44
|
+
│ │ │ │
|
|
45
|
+
▼ ▼ ▼ ▼
|
|
46
|
+
`browser_find` `browser_map` `browser_scrape` `browser_map`
|
|
47
|
+
(lite: true) (lite: true)
|
|
48
|
+
│
|
|
49
|
+
[Sparse / Canvas / WebGL / <5 elements?]
|
|
50
|
+
│
|
|
51
|
+
▼
|
|
52
|
+
`browser_map`
|
|
53
|
+
(visual: "auto")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Tier 1: Targeted Keyword Jump (`browser_find`)
|
|
57
|
+
Use `browser_find` when you already know the label, text snippet, placeholder, or aria-label of the target element.
|
|
58
|
+
- **Latency**: Sub-5ms CDP search.
|
|
59
|
+
- **Token Cost**: ~50–100 tokens (returns only matching candidate nodes).
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"query": "Sign In"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Set `"all": true` to return every match (with `"limit"` capping the count, default 10) instead of only the first.
|
|
68
|
+
|
|
69
|
+
### Tier 2: Token-Optimized DOM Walk (`browser_map` with `lite: true`)
|
|
70
|
+
Use `browser_map` when you must understand the interactive structure of the page.
|
|
71
|
+
- **Rule**: ALWAYS pass `"lite": true` unless you strictly need deeply nested non-interactive DOM trees.
|
|
72
|
+
- **Efficiency**: Strips decorative wrappers, SVG paths, hidden containers, and scripts. Reduces payload by **85% to 95%**.
|
|
73
|
+
- **Scope & filter**: Narrow a dense page with `"scope": "main"` (or `navigation`, `sidebar`, `form`, `modal`, `utility`) and `"query": "<substring>"` to filter by label/role.
|
|
74
|
+
- **Delta mode**: Set `"delta": true` on repeated maps to receive only what changed since the last call (up to 97% token savings).
|
|
75
|
+
- **Pruning**: Set `"prune": true` to drop hidden, non-interactive subtrees and collapse SVG icons in this snapshot.
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"lite": true,
|
|
80
|
+
"scope": "main",
|
|
81
|
+
"delta": true
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Tier 3: Markdown Prose & Data Ingestion (`browser_scrape`)
|
|
86
|
+
Use `browser_scrape` when your objective is reading articles, blog posts, documentation, or legal terms rather than clicking buttons.
|
|
87
|
+
- Converts HTML to clean, semantically structured Markdown.
|
|
88
|
+
- Automatically handles readability filtering and removes advertising/cookie banners.
|
|
89
|
+
|
|
90
|
+
### Tier 4: Set-of-Marks Visual Grounding (`browser_map` with `visual: "auto"`)
|
|
91
|
+
Use when target pages are canvas-heavy, WebGL, Figma, Google Sheets, or when standard `browser_map` returns < 5 interactive elements.
|
|
92
|
+
- Injects temporary numbered badges `[1]…[N]` over interactive elements & canvas regions.
|
|
93
|
+
- Captures an annotated screenshot + returns a structured mark list.
|
|
94
|
+
- **Zero Page Pollution**: Strips badges immediately after capture.
|
|
95
|
+
- **Action**: Pass `"mark": N` to `browser_click` to click the exact element without re-scanning the DOM.
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"visual": "auto"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Tier 5: Runtime State & JavaScript Evaluation (`browser_eval`)
|
|
104
|
+
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:
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"expression": "window.__INITIAL_STATE__ || document.title"
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 2. Volatile Ref ID & Visual Mark Navigation
|
|
114
|
+
|
|
115
|
+
Weavetab maps elements to ephemeral handles (`w:NN`) and visual marks (`[1]…[N]`):
|
|
116
|
+
|
|
117
|
+
### Operational Rules:
|
|
118
|
+
1. **Never Construct Speculative CSS Selectors**: If an element has ref `w:14`, pass `"ref": "w:14"` to `browser_click`, `browser_fill`, `browser_type`.
|
|
119
|
+
2. **Visual Mark Targeting**: On canvas or unlabelled elements from `visual: "auto"`, pass `"mark": N` directly to `browser_click({ mark: N })`.
|
|
120
|
+
3. **Lifespan of Handles**: Ref IDs and marks invalidate on page navigation (`browser_navigate`) or heavy SPA re-renders.
|
|
121
|
+
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.
|
|
@@ -1,87 +1,84 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: form-automation
|
|
3
|
-
domain: browser
|
|
4
|
-
triggers:
|
|
5
|
-
- "fill form"
|
|
6
|
-
- "submit form"
|
|
7
|
-
- "select dropdown"
|
|
8
|
-
- "multi field input"
|
|
9
|
-
- "radio button"
|
|
10
|
-
- "checkbox"
|
|
11
|
-
tools:
|
|
12
|
-
- "browser_fill"
|
|
13
|
-
- "browser_select"
|
|
14
|
-
weavetab: ">=2.5.0"
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Form Automation: Atomic Multi-Field Execution
|
|
18
|
-
|
|
19
|
-
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.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 1. Atomic Multi-Field Filling (`browser_fill`)
|
|
24
|
-
|
|
25
|
-
`browser_fill` populates multiple inputs, textareas, checkboxes, and radio buttons in a single CDP roundtrip.
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"fields": [
|
|
30
|
-
{
|
|
31
|
-
"ref": "w:12",
|
|
32
|
-
"value": "Anas"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"ref": "w:14",
|
|
36
|
-
"value": "Khezaz"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"ref": "w:16",
|
|
40
|
-
"value": "contact@weavetab.com"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"ref": "w:19",
|
|
44
|
-
"value": true
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Supported Field Value Types:
|
|
51
|
-
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
- If the submit button has a dynamic ref or changes during typing, send `"key": "Enter"` via `browser_key` inside the last filled text field.
|
|
86
|
-
- Otherwise, locate the submit button via `browser_find` and click via `browser_click`.
|
|
87
|
-
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.
|
|
1
|
+
---
|
|
2
|
+
id: form-automation
|
|
3
|
+
domain: browser
|
|
4
|
+
triggers:
|
|
5
|
+
- "fill form"
|
|
6
|
+
- "submit form"
|
|
7
|
+
- "select dropdown"
|
|
8
|
+
- "multi field input"
|
|
9
|
+
- "radio button"
|
|
10
|
+
- "checkbox"
|
|
11
|
+
tools:
|
|
12
|
+
- "browser_fill"
|
|
13
|
+
- "browser_select"
|
|
14
|
+
weavetab: ">=2.5.0"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Form Automation: Atomic Multi-Field Execution
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Atomic Multi-Field Filling (`browser_fill`)
|
|
24
|
+
|
|
25
|
+
`browser_fill` populates multiple inputs, textareas, checkboxes, and radio buttons in a single CDP roundtrip.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"fields": [
|
|
30
|
+
{
|
|
31
|
+
"ref": "w:12",
|
|
32
|
+
"value": "Anas"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"ref": "w:14",
|
|
36
|
+
"value": "Khezaz"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"ref": "w:16",
|
|
40
|
+
"value": "contact@weavetab.com"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"ref": "w:19",
|
|
44
|
+
"value": "true"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Supported Field Value Types:
|
|
51
|
+
Every `value` is a **string**.
|
|
52
|
+
- **Text / Search / Email / Tel**: The literal text to type.
|
|
53
|
+
- **Checkbox / ARIA switch**: A truthy string (`"true"`, `"yes"`, `"checked"`, `"1"`, or `"on"`) checks it; anything else unchecks it.
|
|
54
|
+
- **Radio Buttons**: Set the matching option's ref to a truthy string to select it.
|
|
55
|
+
- **Select**: The option `value` or visible text to choose.
|
|
56
|
+
- **ContentEditable**: The text content to set (inner text formatting handled automatically).
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 2. Dropdown & Select Automation (`browser_select`)
|
|
61
|
+
|
|
62
|
+
Standard `<select>` elements and custom dropdowns often fail under simple click-and-type automation. `browser_select` dispatches native CDP change events.
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"ref": "w:31",
|
|
67
|
+
"value": "enterprise_tier"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`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.
|
|
72
|
+
|
|
73
|
+
### Multi-Select Support:
|
|
74
|
+
`browser_select` selects one option per call. For a `<select multiple>` element, call it once per option you want selected.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 3. Form Submission Best Practices
|
|
79
|
+
|
|
80
|
+
1. **Pre-Validate State**: Before clicking Submit, confirm that required fields have passed HTML5/client-side validation (no active red borders or validation popups).
|
|
81
|
+
2. **Submit via Enter Key vs Click**:
|
|
82
|
+
- If the submit button has a dynamic ref or changes during typing, send `"key": "Enter"` via `browser_key` inside the last filled text field.
|
|
83
|
+
- Otherwise, locate the submit button via `browser_find` and click via `browser_click`.
|
|
84
|
+
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.
|