@weavetab/skills 1.0.1 → 2.5.0-beta.4
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 -50
- package/ROUTER.md +43 -0
- package/bin/cli.js +232 -132
- package/browser/dom-strategy.md +119 -0
- package/browser/form-automation.md +87 -0
- package/browser/interaction-pipeline.md +216 -0
- package/browser/tab-and-window.md +136 -0
- package/desktop/desktop-targeting.md +85 -0
- package/desktop/electron-discovery.md +115 -0
- package/developer/github-forensics.md +74 -0
- package/dist/bundled/weavetab-all.md +1905 -0
- package/dist/bundled/weavetab-browser.md +501 -0
- package/dist/bundled/weavetab-desktop.md +176 -0
- package/dist/bundled/weavetab-developer.md +67 -0
- package/dist/bundled/weavetab-documents.md +142 -0
- package/dist/bundled/weavetab-memory.md +359 -0
- package/dist/bundled/weavetab-network-and-perf.md +223 -0
- package/dist/bundled/weavetab-plugins.md +78 -0
- package/dist/bundled/weavetab-resilience.md +216 -0
- package/dist/bundled/weavetab-security.md +87 -0
- package/dist/granular/browser_dom-strategy.md +119 -0
- package/dist/granular/browser_form-automation.md +87 -0
- package/dist/granular/browser_interaction-pipeline.md +216 -0
- package/dist/granular/browser_tab-and-window.md +136 -0
- package/dist/granular/desktop_desktop-targeting.md +85 -0
- package/dist/granular/desktop_electron-discovery.md +115 -0
- package/dist/granular/developer_github-forensics.md +74 -0
- package/dist/granular/documents_canvas-and-visual-capture.md +103 -0
- package/dist/granular/documents_office-document-ingestion.md +63 -0
- package/dist/granular/memory_selector-memory-system.md +127 -0
- package/dist/granular/memory_session-trail.md +95 -0
- package/dist/granular/memory_site-learning.md +180 -0
- package/dist/granular/network-and-perf_device-and-environment.md +87 -0
- package/dist/granular/network-and-perf_network-intercept-and-mock.md +84 -0
- package/dist/granular/network-and-perf_performance-and-vitals.md +84 -0
- package/dist/granular/plugins_hooks-and-overrides.md +36 -0
- package/dist/granular/plugins_plugin-runtime.md +60 -0
- package/dist/granular/resilience_loop-breaker.md +67 -0
- package/dist/granular/resilience_session-time-travel.md +131 -0
- package/dist/granular/resilience_stale-ref-recovery.md +53 -0
- package/dist/granular/security_rbac-and-policies.md +47 -0
- package/dist/granular/security_secret-containment-protocol.md +59 -0
- package/documents/canvas-and-visual-capture.md +103 -0
- package/documents/office-document-ingestion.md +63 -0
- package/evals/evaluator.js +146 -0
- package/evals/scenarios.json +238 -0
- package/memory/selector-memory-system.md +127 -0
- package/memory/session-trail.md +95 -0
- package/memory/site-learning.md +180 -0
- package/network-and-perf/device-and-environment.md +87 -0
- package/network-and-perf/network-intercept-and-mock.md +84 -0
- package/network-and-perf/performance-and-vitals.md +84 -0
- package/package.json +73 -42
- package/plugins/hooks-and-overrides.md +36 -0
- package/plugins/plugin-runtime.md +60 -0
- package/resilience/loop-breaker.md +67 -0
- package/resilience/session-time-travel.md +131 -0
- package/resilience/stale-ref-recovery.md +53 -0
- package/security/rbac-and-policies.md +47 -0
- package/security/secret-containment-protocol.md +59 -0
- package/skills.json +431 -308
- package/src/api.js +239 -128
- package/.github/FUNDING.yml +0 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -28
- package/.github/ISSUE_TEMPLATE/skill_request.md +0 -24
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- package/CONTRIBUTING.md +0 -34
- package/SECURITY.md +0 -26
- package/advanced/README.md +0 -2
- package/automation/README.md +0 -2
- package/general/captcha-evasion.md +0 -13
- package/general/context-awareness.md +0 -13
- package/general/cookie-consent.md +0 -13
- package/general/data-extraction.md +0 -13
- package/general/dynamic-interaction.md +0 -13
- package/general/error-recovery.md +0 -13
- package/general/file-upload.md +0 -13
- package/general/form-filling.md +0 -16
- package/general/guardrails.md +0 -13
- package/general/iframe-handling.md +0 -13
- package/general/infinite-scroll.md +0 -13
- package/general/login-flow.md +0 -16
- package/general/multi-tab-management.md +0 -13
- package/general/spa-navigation.md +0 -13
- package/general/table-scraping.md +0 -13
- package/scripts/build.js +0 -48
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stale-ref-recovery
|
|
3
|
+
domain: resilience
|
|
4
|
+
triggers:
|
|
5
|
+
- "stale element reference"
|
|
6
|
+
- "detached from dom"
|
|
7
|
+
- "spa re-render"
|
|
8
|
+
- "react hydration"
|
|
9
|
+
- "element not found"
|
|
10
|
+
tools:
|
|
11
|
+
- "browser_find"
|
|
12
|
+
- "browser_map"
|
|
13
|
+
- "browser_click"
|
|
14
|
+
weavetab: ">=2.5.0-beta.4"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Stale Ref Recovery & SPA Hydration Resilience
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. The 4-Tier Auto-Recovery Chain
|
|
24
|
+
|
|
25
|
+
When a tool receives a stale or missing `ref`, Weavetab does not immediately fail. It activates an internal 4-tier recovery chain:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
[Action on w:14 Fails / Stale]
|
|
29
|
+
│
|
|
30
|
+
▼
|
|
31
|
+
[Tier 1: Stored Selector] ──▶ Re-queries cached stable selector (data-testid, id)
|
|
32
|
+
│ (if not found)
|
|
33
|
+
▼
|
|
34
|
+
[Tier 2: Exact Label Match] ──▶ Queries element with identical visible text & tag
|
|
35
|
+
│ (if not found)
|
|
36
|
+
▼
|
|
37
|
+
[Tier 3: Semantic Role Match] ──▶ Queries nearest sibling with matching ARIA role
|
|
38
|
+
│ (if not found)
|
|
39
|
+
▼
|
|
40
|
+
[Tier 4: Fuzzy Match] ──▶ Re-anchors to highest-confidence visual candidate
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If the recovery chain succeeds, the action executes seamlessly and the return payload notifies the agent that the handle was refreshed.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 2. Agent Reactive Behavior
|
|
48
|
+
|
|
49
|
+
If an action returns `ERROR: STALE_ELEMENT_REFERENCE` because all 4 recovery tiers were exhausted:
|
|
50
|
+
|
|
51
|
+
1. **Do NOT Repeat the Identical Call**: Retrying the exact same stale `ref` (`w:14`) will fail again.
|
|
52
|
+
2. **Execute a Fast Targeted Lookup**: Run `browser_find` with the text of the button or input field.
|
|
53
|
+
3. **Execute the Action on the New Handle**: Use the updated handle returned by `browser_find`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rbac-and-policies
|
|
3
|
+
domain: security
|
|
4
|
+
triggers:
|
|
5
|
+
- "rbac"
|
|
6
|
+
- "security policy"
|
|
7
|
+
- "role boundaries"
|
|
8
|
+
- "viewer agent"
|
|
9
|
+
- "permission denied"
|
|
10
|
+
tools:
|
|
11
|
+
- "browser_inspect"
|
|
12
|
+
- "browser_scrape"
|
|
13
|
+
- "browser_map"
|
|
14
|
+
weavetab: ">=2.5.0-beta.4"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Role-Based Access Control (RBAC) & Agent Guardrails
|
|
18
|
+
|
|
19
|
+
Weavetab allows developers to run untrusted or lower-privilege subagents within strict security boundaries to prevent accidental destructive operations or data leaks.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. The 4 Security Tiers
|
|
24
|
+
|
|
25
|
+
| Tier | Name | Allowed Tools & Capabilities | Intended Role |
|
|
26
|
+
| :--- | :--- | :--- | :--- |
|
|
27
|
+
| **0** | `admin` | Full tool access (all 48 tools), plugin loading, arbitrary script eval, cookies/storage write. | Primary Operator / Lead Agent. |
|
|
28
|
+
| **1** | `operator` | Interactive tools (`browser_click`, `browser_fill`, `browser_upload`), but blocked from loading untrusted plugins. | Standard Automation Agent. |
|
|
29
|
+
| **2** | `automation` | Pre-approved deterministic macros (`browser_automation`), scoped form filling, no arbitrary script execution. | Background Cron / Worker. |
|
|
30
|
+
| **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. |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Handling `PERMISSION_DENIED` Errors
|
|
35
|
+
|
|
36
|
+
If an agent attempts an action outside its allocated role tier:
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"error_code": "PERMISSION_DENIED",
|
|
40
|
+
"message": "Tool 'browser_click' is disabled under role 'viewer'. Only read operations are permitted."
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Protocol:
|
|
45
|
+
1. Do not retry the denied tool.
|
|
46
|
+
2. Delegate the interactive action to the parent agent or primary operator.
|
|
47
|
+
3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: secret-containment-protocol
|
|
3
|
+
domain: security
|
|
4
|
+
triggers:
|
|
5
|
+
- "enter password"
|
|
6
|
+
- "input credentials"
|
|
7
|
+
- "api key entry"
|
|
8
|
+
- "sensitive token"
|
|
9
|
+
- "secret containment"
|
|
10
|
+
tools:
|
|
11
|
+
- "browser_type_secret"
|
|
12
|
+
weavetab: ">=2.5.0-beta.4"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Secret Containment Protocol & Zero-Bleed Execution
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. Entering Credentials with `browser_type_secret`
|
|
22
|
+
|
|
23
|
+
Whenever an agent inputs passwords, two-factor backup codes, credit card numbers, or proprietary API keys, you MUST use `browser_type_secret`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"ref": "w:12",
|
|
28
|
+
"secret": "MySuperSecretPassword!2026",
|
|
29
|
+
"clear": true
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. The Zero-Bleed Guarantee Architecture
|
|
36
|
+
|
|
37
|
+
When `browser_type_secret` is invoked:
|
|
38
|
+
1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
|
|
39
|
+
2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
|
|
40
|
+
3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"success": true,
|
|
44
|
+
"message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 3. Strict Operating Prohibition
|
|
52
|
+
|
|
53
|
+
> [!CAUTION]
|
|
54
|
+
> Under NO circumstances should an agent pass passwords or credentials to:
|
|
55
|
+
> - `browser_type`
|
|
56
|
+
> - `browser_fill`
|
|
57
|
+
> - `browser_eval`
|
|
58
|
+
>
|
|
59
|
+
> Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.
|