@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.
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 +526 -501
  13. package/dist/bundled/weavetab-desktop.md +176 -176
  14. package/dist/bundled/weavetab-developer.md +84 -67
  15. package/dist/bundled/weavetab-documents.md +184 -142
  16. package/dist/bundled/weavetab-memory.md +259 -233
  17. package/dist/bundled/weavetab-network-and-perf.md +250 -223
  18. package/dist/bundled/weavetab-plugins.md +88 -83
  19. package/dist/bundled/weavetab-resilience.md +244 -216
  20. package/dist/bundled/weavetab-security.md +93 -87
  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 +63 -63
  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 +61 -52
  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 +74 -73
  54. package/plugins/hooks-and-overrides.md +40 -35
  55. package/plugins/plugin-runtime.md +63 -63
  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 +425 -426
  62. package/src/api.js +239 -239
@@ -1,84 +1,86 @@
1
- ---
2
- id: performance-and-vitals
3
- domain: network-and-perf
4
- triggers:
5
- - "measure performance"
6
- - "core web vitals"
7
- - "lcp"
8
- - "cls"
9
- - "fcp"
10
- - "wait condition"
11
- - "page slow"
12
- tools:
13
- - "browser_performance"
14
- - "browser_wait"
15
- weavetab: ">=2.5.0-beta.5"
16
- ---
17
-
18
- # Performance Forensics & Core Web Vitals
19
-
20
- Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
21
-
22
- ---
23
-
24
- ## 1. Core Web Vitals Auditing (`browser_performance`)
25
-
26
- Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
27
-
28
- ```json
29
- {
30
- "metrics": ["vitals", "memory", "navigationTiming"]
31
- }
32
- ```
33
-
34
- ### Response Example:
35
- ```json
36
- {
37
- "vitals": {
38
- "fcp": 320,
39
- "lcp": 780,
40
- "cls": 0.012,
41
- "fid": 8,
42
- "inp": 45
43
- },
44
- "memory": {
45
- "jsHeapUsedSizeMb": 42.1,
46
- "jsHeapTotalSizeMb": 68.4
47
- }
48
- }
49
- ```
50
-
51
- ---
52
-
53
- ## 2. Deterministic Synchronization (`browser_wait`)
54
-
55
- > [!WARNING]
56
- > NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
57
-
58
- Always synchronize with deterministic browser conditions:
59
-
60
- ### Wait for Network Idle:
61
- ```json
62
- {
63
- "condition": "network_idle",
64
- "timeout": 10000
65
- }
66
- ```
67
-
68
- ### Wait for DOM Mutation Stability:
69
- ```json
70
- {
71
- "condition": "dom_stable",
72
- "duration": 500,
73
- "timeout": 10000
74
- }
75
- ```
76
-
77
- ### Wait for a Specific Element to Appear:
78
- ```json
79
- {
80
- "condition": "element_visible",
81
- "selector": "[data-testid=\"checkout-complete\"]",
82
- "timeout": 15000
83
- }
84
- ```
1
+ ---
2
+ id: performance-and-vitals
3
+ domain: network-and-perf
4
+ triggers:
5
+ - "measure performance"
6
+ - "core web vitals"
7
+ - "lcp"
8
+ - "cls"
9
+ - "fcp"
10
+ - "wait condition"
11
+ - "page slow"
12
+ tools:
13
+ - "browser_performance"
14
+ - "browser_wait"
15
+ weavetab: ">=2.5.0"
16
+ ---
17
+
18
+ # Performance Forensics & Core Web Vitals
19
+
20
+ Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
21
+
22
+ ---
23
+
24
+ ## 1. Core Web Vitals Auditing (`browser_performance`)
25
+
26
+ Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
27
+
28
+ ```json
29
+ {
30
+ "metrics": ["vitals", "memory", "navigation"]
31
+ }
32
+ ```
33
+
34
+ ### Response Example:
35
+ ```json
36
+ {
37
+ "vitals": {
38
+ "fcp": 320,
39
+ "lcp": 780,
40
+ "cls": 0.012,
41
+ "inp": 45,
42
+ "ttfb": 12
43
+ },
44
+ "memory": {
45
+ "usedJSHeapSize": 44154880,
46
+ "totalJSHeapSize": 71729152,
47
+ "jsHeapSizeLimit": 4294705152
48
+ }
49
+ }
50
+ ```
51
+
52
+ Valid `metrics` sections: `"vitals"`, `"memory"`, `"navigation"`, `"resources"`, `"raw"`. Omit `metrics` to return all sections. Heap sizes are in **bytes**. The `"resources"` section populates `slowest_resources` (top 10 by duration).
53
+
54
+ ---
55
+
56
+ ## 2. Deterministic Synchronization (`browser_wait`)
57
+
58
+ > [!WARNING]
59
+ > NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
60
+
61
+ Always synchronize with deterministic browser conditions:
62
+
63
+ ### Wait for Network Idle:
64
+ ```json
65
+ {
66
+ "for": "network",
67
+ "timeout": 10000
68
+ }
69
+ ```
70
+
71
+ ### Wait for DOM Mutation Stability:
72
+ ```json
73
+ {
74
+ "for": "stable",
75
+ "timeout": 10000
76
+ }
77
+ ```
78
+
79
+ ### Wait for a Specific Element to Appear:
80
+ ```json
81
+ {
82
+ "for": "element",
83
+ "value": "[data-testid=\"checkout-complete\"]",
84
+ "timeout": 15000
85
+ }
86
+ ```
@@ -1,35 +1,40 @@
1
- ---
2
- id: hooks-and-overrides
3
- domain: plugins
4
- triggers:
5
- - "plugin hooks"
6
- - "before tool call"
7
- - "after tool call"
8
- - "telemetry interception"
9
- - "sdk hooks"
10
- tools: []
11
- weavetab: ">=2.5.0-beta.5"
12
- ---
13
-
14
- # Plugin Hooks & Lifecycle Overrides
15
-
16
- 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.
17
-
18
- ---
19
-
20
- ## 1. Supported Plugin Hooks
21
-
22
- 1. **`beforeToolCall(toolName, args)`**:
23
- - Validates arguments against custom enterprise schemas.
24
- - Injects tenant IDs, authentication headers, or proxy routing.
25
- 2. **`afterToolCall(toolName, result, durationMs)`**:
26
- - Emits OpenTelemetry metrics and timing waterfalls to external APM platforms.
27
- - Enriches return objects with contextual metadata.
28
- 3. **`onNavigate(url, targetId)`**:
29
- - Triggers automated cookie injection or session setup upon page navigation.
30
-
31
- ---
32
-
33
- ## 2. Agent Operational Awareness
34
-
35
- 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.
1
+ ---
2
+ id: hooks-and-overrides
3
+ domain: plugins
4
+ triggers:
5
+ - "plugin hooks"
6
+ - "before tool call"
7
+ - "after tool call"
8
+ - "telemetry interception"
9
+ - "sdk hooks"
10
+ tools: []
11
+ weavetab: ">=2.5.0"
12
+ ---
13
+
14
+ # Plugin Hooks & Lifecycle Overrides
15
+
16
+ Plugins built with `@weavetab/sdk` register lifecycle hooks that run before and after tool executions. Understanding these hooks helps agents interpret custom tool behavior and blocked actions.
17
+
18
+ ---
19
+
20
+ ## 1. Supported Plugin Hooks
21
+
22
+ The `PluginHooks` interface exposes three primary interceptors (with backwards-compatible aliases):
23
+
24
+ 1. **`onBeforeAction(handler)`** — *alias:* `beforeToolCall`
25
+ - `handler(tool, args, session)` runs **before** any tool executes.
26
+ - It may return a modified `args` object (replacing the arguments) or `{ __blocked: true, reason }` to abort the call.
27
+ - Typical uses: argument validation, tenant/header injection, proxy routing.
28
+ 2. **`onAfterAction(handler)`** — *alias:* `afterToolCall`
29
+ - `handler(tool, result, session, args)` runs **after** a tool completes.
30
+ - Its return value replaces the tool result — used for telemetry, timing, or enriching output.
31
+ 3. **`onDOMMutation(handler)`** — *alias:* `onPageNavigate`
32
+ - `handler(delta, session)` observes real-time DOM mutation / action deltas (added, removed, and changed elements, `significantChange`, `stable_count`).
33
+
34
+ ---
35
+
36
+ ## 2. Agent Operational Awareness
37
+
38
+ - A blocked action surfaces as a normal tool error (the server turns `__blocked` into an error result). If a plugin blocks a tool you expected to succeed, do not retry it blindly — report the block reason and pick another approach.
39
+ - An `onAfterAction` handler can rewrite a tool's result. Treat the returned payload as authoritative, not a fixed schema.
40
+ - Plugins never inject plaintext secrets into results; the Redaction Layer runs on all error output (`SessionSecretTracker.redactAll`).
@@ -1,63 +1,63 @@
1
- ---
2
- id: plugin-runtime
3
- domain: plugins
4
- triggers:
5
- - "what plugins are installed"
6
- - "weavetab plugin"
7
- - "extend mcp"
8
- - "plugin tools"
9
- - "plugin permissions"
10
- tools: []
11
- weavetab: ">=2.5.0-beta.5"
12
- ---
13
-
14
- # Plugin Runtime: Weavetab Plugin Architecture
15
-
16
- 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.
17
-
18
- ---
19
-
20
- ## 1. How Plugin Tools Appear
21
-
22
- 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.
23
-
24
- There are **no** `list_plugins` or `load_plugin` tools. Managing plugins is a CLI operation:
25
-
26
- ```bash
27
- # Install a plugin (restart required)
28
- weavetab plugin add @weavetab/plugin-youtube
29
-
30
- # Remove a plugin
31
- weavetab plugin rm @weavetab/plugin-youtube
32
-
33
- # List installed plugins
34
- weavetab plugin list
35
- ```
36
-
37
- ---
38
-
39
- ## 2. Plugin Permission Model
40
-
41
- Every plugin declares what it can do in `weavetab.json`. The runtime enforces this at load time:
42
-
43
- | Permission | What it gates |
44
- |---|---|
45
- | `tools.add: true` | Plugin can register new MCP tools |
46
- | `tools.override: ["browser_navigate"]` | Plugin can wrap/replace that built-in tool |
47
- | `tools.remove: ["browser_pdf"]` | Plugin can disable that built-in tool |
48
- | `hooks.onBeforeAction: true` | Plugin can intercept all tool calls before execution |
49
- | `hooks.onAfterAction: true` | Plugin can inspect/transform all tool results |
50
-
51
- Plugins that attempt to exceed their declared permissions are blocked with a stderr warning — they do not crash.
52
-
53
- ---
54
-
55
- ## 3. Trust Tiers
56
-
57
- | Tier | Badge | Condition |
58
- |---|---|---|
59
- | Official | `✚ [Official]` | `@weavetab/plugin-*` packages |
60
- | Verified | `✔ [Verified]` | Listed in the Weavetab verified registry |
61
- | Unverified | `⚠ [Unverified]` | Unknown community package |
62
-
63
- Unverified plugins are loaded but their permissions are logged visibly at startup for user review.
1
+ ---
2
+ id: plugin-runtime
3
+ domain: plugins
4
+ triggers:
5
+ - "what plugins are installed"
6
+ - "weavetab plugin"
7
+ - "extend mcp"
8
+ - "plugin tools"
9
+ - "plugin permissions"
10
+ tools: []
11
+ weavetab: ">=2.5.0"
12
+ ---
13
+
14
+ # Plugin Runtime: Weavetab Plugin Architecture
15
+
16
+ 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.
17
+
18
+ ---
19
+
20
+ ## 1. How Plugin Tools Appear
21
+
22
+ 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 — alongside built-ins such as `browser_snapshot` — with no discovery step needed.
23
+
24
+ There is no MCP tool for discovering or activating plugins. Managing plugins is a CLI operation:
25
+
26
+ ```bash
27
+ # Install a plugin (restart required)
28
+ weavetab plugin add @weavetab/plugin-youtube
29
+
30
+ # Remove a plugin
31
+ weavetab plugin rm @weavetab/plugin-youtube
32
+
33
+ # List installed plugins
34
+ weavetab plugin list
35
+ ```
36
+
37
+ ---
38
+
39
+ ## 2. Plugin Permission Model
40
+
41
+ Every plugin declares what it can do in `weavetab.json`. The runtime enforces this at load time:
42
+
43
+ | Permission | What it gates |
44
+ |---|---|
45
+ | `tools.add: true` | Plugin can register new MCP tools |
46
+ | `tools.override: ["browser_navigate"]` | Plugin can wrap/replace that built-in tool |
47
+ | `tools.remove: ["browser_pdf"]` | Plugin can disable that built-in tool |
48
+ | `hooks.onBeforeAction: true` | Plugin can intercept all tool calls before execution |
49
+ | `hooks.onAfterAction: true` | Plugin can inspect/transform all tool results |
50
+
51
+ Plugins that attempt to exceed their declared permissions are blocked with a stderr warning — they do not crash.
52
+
53
+ ---
54
+
55
+ ## 3. Trust Tiers
56
+
57
+ | Tier | Badge | Condition |
58
+ |---|---|---|
59
+ | Official | `✚ [Official]` | `@weavetab/plugin-*` packages |
60
+ | Verified | `✔ [Verified]` | Listed in the Weavetab verified registry |
61
+ | Unverified | `⚠ [Unverified]` | Unknown community package |
62
+
63
+ Unverified plugins are loaded but their permissions are logged visibly at startup for user review.
@@ -1,67 +1,72 @@
1
- ---
2
- id: loop-breaker
3
- domain: resilience
4
- triggers:
5
- - "loop detected"
6
- - "stuck in loop"
7
- - "reset loop counter"
8
- - "captcha detected"
9
- - "hcaptcha"
10
- - "recaptcha"
11
- tools:
12
- - "browser_map"
13
- - "browser_console"
14
- - "browser_captcha"
15
- weavetab: ">=2.5.0-beta.5"
16
- ---
17
-
18
- # Loop Breaker & CAPTCHA Escalation Protocol
19
-
20
- 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.
21
-
22
- ---
23
-
24
- ## 1. Loop Detection & Strike Reset (`browser_map`)
25
-
26
- 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`.
27
-
28
- ### How to Break the Loop:
29
- 1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
30
- ```json
31
- { "action": "read" }
32
- ```
33
- Or use `browser_map` to see if a validation banner or unhandled modal appeared.
34
- 2. **Reset the Circuit Breaker**:
35
- - Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
36
- ```json
37
- { "force": true }
38
- ```
39
-
40
- ---
41
-
42
- ## 2. CAPTCHA Handling Protocol (`browser_captcha`)
43
-
44
- When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
45
-
46
- Invoke `browser_captcha` to analyze and manage the challenge:
47
-
48
- ```json
49
- {
50
- "action": "detect"
51
- }
52
- ```
53
-
54
- ### Response Example:
55
- ```json
56
- {
57
- "detected": true,
58
- "type": "turnstile",
59
- "provider": "cloudflare",
60
- "interactive": true,
61
- "ref": "w:99"
62
- }
63
- ```
64
-
65
- ### Action Strategy:
66
- 1. If the challenge is interactive and requires human intervention (e.g. image classification), inform the user cleanly or request human bypass.
67
- 2. If the challenge is a simple checkbox Turnstile widget, pass `"action": "solve"` or click the detected widget ref with `browser_click`.
1
+ ---
2
+ id: loop-breaker
3
+ domain: resilience
4
+ triggers:
5
+ - "loop detected"
6
+ - "stuck in loop"
7
+ - "reset loop counter"
8
+ - "captcha detected"
9
+ - "hcaptcha"
10
+ - "recaptcha"
11
+ tools:
12
+ - "browser_map"
13
+ - "browser_console"
14
+ - "browser_captcha"
15
+ weavetab: ">=2.5.0"
16
+ ---
17
+
18
+ # Loop Breaker & CAPTCHA Escalation Protocol
19
+
20
+ 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.
21
+
22
+ ---
23
+
24
+ ## 1. Loop Detection & Strike Reset (`browser_map`)
25
+
26
+ 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`.
27
+
28
+ ### How to Break the Loop:
29
+ 1. **Analyze Why the Action Failed**: Check `browser_console` for JavaScript errors:
30
+ ```json
31
+ { "action": "read" }
32
+ ```
33
+ Or use `browser_map` to see if a validation banner or unhandled modal appeared.
34
+ 2. **Reset the Circuit Breaker**:
35
+ - Re-map with `force: true` to bypass the map skip guard, refresh the DOM view, and automatically clear loop strikes:
36
+ ```json
37
+ { "force": true }
38
+ ```
39
+
40
+ ---
41
+
42
+ ## 2. CAPTCHA Handling Protocol (`browser_captcha`)
43
+
44
+ When an automated flow is blocked by Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha, do NOT repeatedly click random coordinates.
45
+
46
+ Invoke `browser_captcha` to analyze and manage the challenge:
47
+
48
+ ```json
49
+ {
50
+ "action": "detect"
51
+ }
52
+ ```
53
+
54
+ ### Response Example:
55
+ ```json
56
+ {
57
+ "success": true,
58
+ "action": "detect",
59
+ "captcha_detected": true,
60
+ "captcha_type": "turnstile",
61
+ "interaction_type": "checkbox",
62
+ "difficulty": "easy",
63
+ "confidence": 0.97,
64
+ "human_needed": false,
65
+ "message": "CAPTCHA detected: turnstile (checkbox, 97% confidence)",
66
+ "next_action": "Call browser_captcha({ action: \"solve\" }) to attempt automated solving."
67
+ }
68
+ ```
69
+
70
+ ### Action Strategy:
71
+ 1. If `human_needed` is `true` (e.g. image classification), inform the user cleanly or request human bypass — do not guess coordinates.
72
+ 2. Otherwise pass `"action": "solve"` to attempt an automated solve (slider drag, hold, checkbox, or invisible challenges). Use `"action": "status"` to check progress and `"action": "wait_for_user"` to pause for human input.