@weavetab/skills 2.5.0-beta.5 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +108 -108
  2. package/ROUTER.md +43 -43
  3. package/bin/cli.js +232 -232
  4. package/browser/dom-strategy.md +121 -119
  5. package/browser/form-automation.md +84 -87
  6. package/browser/interaction-pipeline.md +242 -216
  7. package/browser/tab-and-window.md +136 -136
  8. package/desktop/desktop-targeting.md +85 -85
  9. package/desktop/electron-discovery.md +115 -115
  10. package/developer/github-forensics.md +89 -74
  11. package/dist/bundled/weavetab-all.md +1885 -1709
  12. package/dist/bundled/weavetab-browser.md +504 -479
  13. package/dist/bundled/weavetab-desktop.md +164 -164
  14. package/dist/bundled/weavetab-developer.md +77 -60
  15. package/dist/bundled/weavetab-documents.md +173 -131
  16. package/dist/bundled/weavetab-memory.md +259 -233
  17. package/dist/bundled/weavetab-network-and-perf.md +233 -206
  18. package/dist/bundled/weavetab-plugins.md +30 -25
  19. package/dist/bundled/weavetab-resilience.md +229 -201
  20. package/dist/bundled/weavetab-security.md +81 -75
  21. package/dist/granular/browser_dom-strategy.md +121 -119
  22. package/dist/granular/browser_form-automation.md +84 -87
  23. package/dist/granular/browser_interaction-pipeline.md +242 -216
  24. package/dist/granular/browser_tab-and-window.md +136 -136
  25. package/dist/granular/desktop_desktop-targeting.md +85 -85
  26. package/dist/granular/desktop_electron-discovery.md +115 -115
  27. package/dist/granular/developer_github-forensics.md +89 -74
  28. package/dist/granular/documents_canvas-and-visual-capture.md +117 -103
  29. package/dist/granular/documents_office-document-ingestion.md +91 -63
  30. package/dist/granular/memory_selector-memory-system.md +127 -127
  31. package/dist/granular/memory_session-trail.md +111 -95
  32. package/dist/granular/memory_site-learning.md +62 -53
  33. package/dist/granular/network-and-perf_device-and-environment.md +100 -87
  34. package/dist/granular/network-and-perf_network-intercept-and-mock.md +97 -84
  35. package/dist/granular/network-and-perf_performance-and-vitals.md +86 -84
  36. package/dist/granular/plugins_hooks-and-overrides.md +40 -35
  37. package/dist/granular/plugins_plugin-runtime.md +3 -3
  38. package/dist/granular/resilience_loop-breaker.md +72 -67
  39. package/dist/granular/resilience_session-time-travel.md +146 -131
  40. package/dist/granular/resilience_stale-ref-recovery.md +61 -53
  41. package/dist/granular/security_rbac-and-policies.md +50 -47
  42. package/dist/granular/security_secret-containment-protocol.md +62 -59
  43. package/documents/canvas-and-visual-capture.md +117 -103
  44. package/documents/office-document-ingestion.md +91 -63
  45. package/evals/evaluator.js +146 -146
  46. package/evals/scenarios.json +239 -239
  47. package/memory/selector-memory-system.md +127 -127
  48. package/memory/session-trail.md +111 -95
  49. package/memory/site-learning.md +62 -53
  50. package/network-and-perf/device-and-environment.md +100 -87
  51. package/network-and-perf/network-intercept-and-mock.md +97 -84
  52. package/network-and-perf/performance-and-vitals.md +86 -84
  53. package/package.json +4 -3
  54. package/plugins/hooks-and-overrides.md +40 -35
  55. package/plugins/plugin-runtime.md +3 -3
  56. package/resilience/loop-breaker.md +72 -67
  57. package/resilience/session-time-travel.md +146 -131
  58. package/resilience/stale-ref-recovery.md +61 -53
  59. package/security/rbac-and-policies.md +50 -47
  60. package/security/secret-containment-protocol.md +62 -59
  61. package/skills.json +26 -27
  62. package/src/api.js +239 -239
@@ -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-beta.5"
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
- "matchType": "contains",
65
- "visibleOnly": true
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
- - **Viewport Filtering**: Set `"includeOffscreen": false` to only inspect elements currently visible in the active viewport.
74
-
75
- ```json
76
- {
77
- "lite": true,
78
- "includeOffscreen": false,
79
- "maxDepth": 6
80
- }
81
- ```
82
-
83
- ### Tier 3: Markdown Prose & Data Ingestion (`browser_scrape`)
84
- Use `browser_scrape` when your objective is reading articles, blog posts, documentation, or legal terms rather than clicking buttons.
85
- - Converts HTML to clean, semantically structured Markdown.
86
- - Automatically handles readability filtering and removes advertising/cookie banners.
87
-
88
- ### Tier 4: Set-of-Marks Visual Grounding (`browser_map` with `visual: "auto"`)
89
- Use when target pages are canvas-heavy, WebGL, Figma, Google Sheets, or when standard `browser_map` returns < 5 interactive elements.
90
- - Injects temporary numbered badges `[1]…[N]` over interactive elements & canvas regions.
91
- - Captures an annotated screenshot + returns a structured mark list.
92
- - **Zero Page Pollution**: Strips badges immediately after capture.
93
- - **Action**: Pass `"mark": N` to `browser_click` to click the exact element without re-scanning the DOM.
94
-
95
- ```json
96
- {
97
- "visual": "auto"
98
- }
99
- ```
100
-
101
- ### Tier 5: Runtime State & JavaScript Evaluation (`browser_eval`)
102
- 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:
103
- ```json
104
- {
105
- "expression": "window.__INITIAL_STATE__ || document.title"
106
- }
107
- ```
108
-
109
- ---
110
-
111
- ## 2. Volatile Ref ID & Visual Mark Navigation
112
-
113
- Weavetab maps elements to ephemeral handles (`w:NN`) and visual marks (`[1]…[N]`):
114
-
115
- ### Operational Rules:
116
- 1. **Never Construct Speculative CSS Selectors**: If an element has ref `w:14`, pass `"ref": "w:14"` to `browser_click`, `browser_fill`, `browser_type`.
117
- 2. **Visual Mark Targeting**: On canvas or unlabelled elements from `visual: "auto"`, pass `"mark": N` directly to `browser_click({ mark: N })`.
118
- 3. **Lifespan of Handles**: Ref IDs and marks invalidate on page navigation (`browser_navigate`) or heavy SPA re-renders.
119
- 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
+ ---
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-beta.5"
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
- - **Text / Search / Email / Tel**: Provide a `string`.
52
- - **Checkbox**: Provide a `boolean` (`true` to check, `false` to uncheck).
53
- - **Radio Buttons**: Provide `true` on the matching option ref.
54
- - **ContentEditable**: Provide a `string` (automatically handles inner text formatting).
55
-
56
- ---
57
-
58
- ## 2. Dropdown & Select Automation (`browser_select`)
59
-
60
- Standard `<select>` elements and custom dropdowns often fail under simple click-and-type automation. `browser_select` dispatches native CDP change events.
61
-
62
- ```json
63
- {
64
- "ref": "w:31",
65
- "values": ["enterprise_tier"]
66
- }
67
- ```
68
-
69
- ### Multi-Select Support:
70
- For `<select multiple>` elements, pass an array of option values:
71
-
72
- ```json
73
- {
74
- "ref": "w:35",
75
- "values": ["us-east-1", "eu-central-1"]
76
- }
77
- ```
78
-
79
- ---
80
-
81
- ## 3. Form Submission Best Practices
82
-
83
- 1. **Pre-Validate State**: Before clicking Submit, confirm that required fields have passed HTML5/client-side validation (no active red borders or validation popups).
84
- 2. **Submit via Enter Key vs Click**:
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.