@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,223 +1,250 @@
1
1
  # Weavetab Domain Profile: NETWORK-AND-PERF
2
2
 
3
- Generated for @weavetab/skills v2.5.0-beta.5
3
+ Generated for @weavetab/skills v2.5.1
4
4
 
5
5
 
6
6
  ## device-and-environment
7
7
 
8
- # Device Emulation & Environment Simulation
9
-
10
- Auditing mobile responsive layouts, testing geographic restrictions, and simulating degraded network conditions can all be accomplished with `browser_emulate`.
11
-
12
- ---
13
-
14
- ## 1. Device Presets & Viewport Simulation
15
-
16
- Switch from desktop to realistic mobile hardware profiles:
17
-
18
- ```json
19
- {
20
- "device": "iPhone 15 Pro",
21
- "orientation": "portrait"
22
- }
23
- ```
24
-
25
- Or configure custom screen geometries:
26
-
27
- ```json
28
- {
29
- "viewport": {
30
- "width": 393,
31
- "height": 852,
32
- "deviceScaleFactor": 3,
33
- "isMobile": true,
34
- "hasTouch": true
35
- }
36
- }
37
- ```
38
-
39
- ---
40
-
41
- ## 2. Network Throttling Simulation
42
-
43
- Verify how web applications degrade under poor connectivity:
44
-
45
- ```json
46
- {
47
- "network": {
48
- "offline": false,
49
- "downloadThroughput": 1024 * 500, // 500 kb/s (Slow 3G)
50
- "uploadThroughput": 1024 * 250,
51
- "latency": 400 // ms
52
- }
53
- }
54
- ```
55
-
56
- ---
57
-
58
- ## 3. Geolocation & Timezone Overrides
59
-
60
- Bypass localized IP redirects or verify localized content rendering:
61
-
62
- ```json
63
- {
64
- "geolocation": {
65
- "latitude": 37.7749,
66
- "longitude": -122.4194,
67
- "accuracy": 100
68
- },
69
- "timezoneId": "America/Los_Angeles",
70
- "locale": "en-US"
71
- }
72
- ```
73
-
74
- To reset all overrides back to default host system parameters:
75
- ```json
76
- {
77
- "reset": true
78
- }
8
+ # Device Emulation & Environment Simulation
9
+
10
+ Auditing mobile responsive layouts, testing geographic restrictions, and simulating degraded network conditions are split across two tools: `browser_viewport` owns device geometry, locale, timezone, and color-scheme emulation; `browser_emulate` owns network throttling and CPU slowdown.
11
+
12
+ ---
13
+
14
+ ## 1. Device Presets & Viewport Simulation (`browser_viewport`)
15
+
16
+ List the available hardware presets, then apply one:
17
+
18
+ ```json
19
+ { "action": "list" }
20
+ ```
21
+
22
+ ```json
23
+ {
24
+ "action": "preset",
25
+ "devicePreset": "iPhone 15 Pro"
26
+ }
27
+ ```
28
+
29
+ Or configure custom screen geometry directly with `action: "set"`:
30
+
31
+ ```json
32
+ {
33
+ "action": "set",
34
+ "width": 393,
35
+ "height": 852,
36
+ "deviceScaleFactor": 3,
37
+ "mobile": true,
38
+ "hasTouch": true,
39
+ "screenOrientation": "portrait"
40
+ }
41
+ ```
42
+
43
+ Clear all viewport and emulation overrides back to the host defaults:
44
+
45
+ ```json
46
+ { "action": "clear" }
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 2. Network & CPU Throttling (`browser_emulate`)
52
+
53
+ Verify how web applications degrade under poor connectivity:
54
+
55
+ ```json
56
+ {
57
+ "network": {
58
+ "offline": false,
59
+ "downloadThroughput": 512000,
60
+ "uploadThroughput": 256000,
61
+ "latency": 400
62
+ },
63
+ "cpuThrottlingRate": 4
64
+ }
65
+ ```
66
+
67
+ Use a named profile for common cases (`"slow3g"`, `"fast3g"`, `"4g"`, `"offline"`, `"online"`):
68
+
69
+ ```json
70
+ { "network": "slow3g" }
71
+ ```
72
+
73
+ ---
74
+
75
+ ## 3. Geolocation, Timezone, Locale & Color Scheme (`browser_viewport`)
76
+
77
+ Bypass localized IP redirects or verify localized content rendering:
78
+
79
+ ```json
80
+ {
81
+ "action": "set",
82
+ "geolocation": {
83
+ "latitude": 37.7749,
84
+ "longitude": -122.4194,
85
+ "accuracy": 100
86
+ },
87
+ "timezoneId": "America/Los_Angeles",
88
+ "locale": "en-US",
89
+ "colorScheme": "dark"
90
+ }
79
91
  ```
80
92
 
81
93
 
82
94
  ## network-intercept-and-mock
83
95
 
84
- # Network Interception, Mocking & TLS Forensics
85
-
86
- Autonomous testing and debugging often require simulating backend error states (e.g. 500 Internal Server Error, 429 Rate Limit), stubbing third-party analytics, or verifying TLS/SSL certificates.
87
-
88
- `browser_network_intercept` provides fine-grained CDP request and response modification.
89
-
90
- ---
91
-
92
- ## 1. Mocking API Responses
93
-
94
- Intercept outgoing HTTP requests matching a URL pattern and return custom mock data:
95
-
96
- ```json
97
- {
98
- "pattern": "*/api/v1/user/profile",
99
- "response": {
100
- "status": 200,
101
- "headers": {
102
- "Content-Type": "application/json"
103
- },
104
- "body": "{\"id\": \"usr_test\", \"role\": \"admin\", \"credits\": 9999}"
105
- }
106
- }
107
- ```
108
-
109
- ---
110
-
111
- ## 2. Blocking Unnecessary Traffic & Trackers
112
-
113
- Accelerate page loads and eliminate token bloat by aborting non-essential requests:
114
-
115
- ```json
116
- {
117
- "pattern": "*google-analytics.com*",
118
- "action": "abort",
119
- "errorReason": "BlockedByClient"
120
- }
121
- ```
122
-
123
- ---
124
-
125
- ## 3. TLS / SSL Forensics & Timing Waterfalls
126
-
127
- Extract cryptographic handshake metadata, cipher suites, expiration dates, and microsecond network waterfalls (DNS lookup, TCP connect, SSL handshake, TTFB):
128
-
129
- ```json
130
- {
131
- "action": "auditTls",
132
- "url": "https://weavetab.dev"
133
- }
134
- ```
135
-
136
- ### Response Example:
137
- ```json
138
- {
139
- "security": {
140
- "protocol": "TLS 1.3",
141
- "cipher": "AES_128_GCM",
142
- "issuer": "Let's Encrypt",
143
- "validTo": "2026-11-15T00:00:00.000Z"
144
- },
145
- "waterfall": {
146
- "dnsMs": 1.4,
147
- "tcpMs": 3.2,
148
- "sslMs": 4.1,
149
- "ttfbMs": 12.8
150
- }
151
- }
96
+ # Network Interception, Mocking & Telemetry
97
+
98
+ Autonomous testing and debugging often require simulating backend error states (e.g. 500 Internal Server Error, 429 Rate Limit), stubbing third-party analytics, or inspecting real request timing and TLS metadata.
99
+
100
+ `browser_network_intercept` exposes four actions: `enable`, `disable`, `get_telemetry`, and `clear_telemetry`.
101
+
102
+ ---
103
+
104
+ ## 1. Mocking API Responses (`enable`)
105
+
106
+ `enable` requires a `pattern` (URL glob). Every matching response is fulfilled with your mock:
107
+
108
+ ```json
109
+ {
110
+ "action": "enable",
111
+ "pattern": "*/api/v1/user/profile",
112
+ "mockStatus": 200,
113
+ "mockBody": "{\"id\": \"usr_test\", \"role\": \"admin\", \"credits\": 9999}"
114
+ }
115
+ ```
116
+
117
+ - **`pattern`** — URL glob, e.g. `*api/users*`. `*` and `?` are treated as wildcards.
118
+ - **`mockStatus`** — HTTP status to return (default `200`). Use `500`/`429`/`404` to simulate failures.
119
+ - **`mockBody`** — response body string (default `{}`). Pass JSON as a string.
120
+
121
+ Mocks are served from the extension when present, otherwise via CDP's Fetch domain (fallback mode).
122
+
123
+ ---
124
+
125
+ ## 2. Stopping Interception (`disable`)
126
+
127
+ Return the browser to live traffic when a test completes:
128
+
129
+ ```json
130
+ {
131
+ "action": "disable"
132
+ }
133
+ ```
134
+
135
+ ---
136
+
137
+ ## 3. Network Telemetry (`get_telemetry`)
138
+
139
+ `get_telemetry` starts a background capture (if not already running) and returns the recorded requests — including per-request protocol timing phases, TLS/SSL certificate details when the connection exposes them, and failure reasons:
140
+
141
+ ```json
142
+ {
143
+ "action": "get_telemetry",
144
+ "pattern": "*api/*"
145
+ }
146
+ ```
147
+
148
+ An optional `pattern` filters the returned requests by URL. The response includes:
149
+
150
+ ```json
151
+ {
152
+ "success": true,
153
+ "count": 12,
154
+ "requests": [
155
+ {
156
+ "url": "https://weavetab.dev/api/v1/session",
157
+ "timing": { "dnsMs": 1.4, "tcpMs": 3.2, "sslMs": 4.1, "ttfbMs": 12.8 }
158
+ }
159
+ ],
160
+ "navigationOccurred": false,
161
+ "errors": []
162
+ }
163
+ ```
164
+
165
+ > Certificates and timing fields are surfaced only when the underlying connection exposes them; treat missing fields as "not reported", not "absent".
166
+
167
+ ---
168
+
169
+ ## 4. Clearing the Buffer (`clear_telemetry`)
170
+
171
+ Reset the capture buffer between scenarios without tearing down the session:
172
+
173
+ ```json
174
+ {
175
+ "action": "clear_telemetry"
176
+ }
152
177
  ```
153
178
 
154
179
 
155
180
  ## performance-and-vitals
156
181
 
157
- # Performance Forensics & Core Web Vitals
158
-
159
- Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
160
-
161
- ---
162
-
163
- ## 1. Core Web Vitals Auditing (`browser_performance`)
164
-
165
- Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
166
-
167
- ```json
168
- {
169
- "metrics": ["vitals", "memory", "navigationTiming"]
170
- }
171
- ```
172
-
173
- ### Response Example:
174
- ```json
175
- {
176
- "vitals": {
177
- "fcp": 320,
178
- "lcp": 780,
179
- "cls": 0.012,
180
- "fid": 8,
181
- "inp": 45
182
- },
183
- "memory": {
184
- "jsHeapUsedSizeMb": 42.1,
185
- "jsHeapTotalSizeMb": 68.4
186
- }
187
- }
188
- ```
189
-
190
- ---
191
-
192
- ## 2. Deterministic Synchronization (`browser_wait`)
193
-
194
- > [!WARNING]
195
- > NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
196
-
197
- Always synchronize with deterministic browser conditions:
198
-
199
- ### Wait for Network Idle:
200
- ```json
201
- {
202
- "condition": "network_idle",
203
- "timeout": 10000
204
- }
205
- ```
206
-
207
- ### Wait for DOM Mutation Stability:
208
- ```json
209
- {
210
- "condition": "dom_stable",
211
- "duration": 500,
212
- "timeout": 10000
213
- }
214
- ```
215
-
216
- ### Wait for a Specific Element to Appear:
217
- ```json
218
- {
219
- "condition": "element_visible",
220
- "selector": "[data-testid=\"checkout-complete\"]",
221
- "timeout": 15000
222
- }
182
+ # Performance Forensics & Core Web Vitals
183
+
184
+ Optimizing agent execution and auditing client performance requires objective metrics rather than arbitrary sleep timers.
185
+
186
+ ---
187
+
188
+ ## 1. Core Web Vitals Auditing (`browser_performance`)
189
+
190
+ Retrieve Google Core Web Vitals, memory consumption, and frame rendering bottlenecks directly from the Chromium engine:
191
+
192
+ ```json
193
+ {
194
+ "metrics": ["vitals", "memory", "navigation"]
195
+ }
196
+ ```
197
+
198
+ ### Response Example:
199
+ ```json
200
+ {
201
+ "vitals": {
202
+ "fcp": 320,
203
+ "lcp": 780,
204
+ "cls": 0.012,
205
+ "inp": 45,
206
+ "ttfb": 12
207
+ },
208
+ "memory": {
209
+ "usedJSHeapSize": 44154880,
210
+ "totalJSHeapSize": 71729152,
211
+ "jsHeapSizeLimit": 4294705152
212
+ }
213
+ }
214
+ ```
215
+
216
+ 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).
217
+
218
+ ---
219
+
220
+ ## 2. Deterministic Synchronization (`browser_wait`)
221
+
222
+ > [!WARNING]
223
+ > NEVER call arbitrary fixed sleep timers (e.g. `sleep 5000`). Fixed sleeps waste user time and still fail when network latency spikes.
224
+
225
+ Always synchronize with deterministic browser conditions:
226
+
227
+ ### Wait for Network Idle:
228
+ ```json
229
+ {
230
+ "for": "network",
231
+ "timeout": 10000
232
+ }
233
+ ```
234
+
235
+ ### Wait for DOM Mutation Stability:
236
+ ```json
237
+ {
238
+ "for": "stable",
239
+ "timeout": 10000
240
+ }
241
+ ```
242
+
243
+ ### Wait for a Specific Element to Appear:
244
+ ```json
245
+ {
246
+ "for": "element",
247
+ "value": "[data-testid=\"checkout-complete\"]",
248
+ "timeout": 15000
249
+ }
223
250
  ```
@@ -1,32 +1,37 @@
1
1
  # Weavetab Domain Profile: PLUGINS
2
2
 
3
- Generated for @weavetab/skills v2.5.0-beta.5
3
+ Generated for @weavetab/skills v2.5.1
4
4
 
5
5
 
6
6
  ## hooks-and-overrides
7
7
 
8
- # Plugin Hooks & Lifecycle Overrides
9
-
10
- 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.
11
-
12
- ---
13
-
14
- ## 1. Supported Plugin Hooks
15
-
16
- 1. **`beforeToolCall(toolName, args)`**:
17
- - Validates arguments against custom enterprise schemas.
18
- - Injects tenant IDs, authentication headers, or proxy routing.
19
- 2. **`afterToolCall(toolName, result, durationMs)`**:
20
- - Emits OpenTelemetry metrics and timing waterfalls to external APM platforms.
21
- - Enriches return objects with contextual metadata.
22
- 3. **`onNavigate(url, targetId)`**:
23
- - Triggers automated cookie injection or session setup upon page navigation.
24
-
25
- ---
26
-
27
- ## 2. Agent Operational Awareness
28
-
29
- 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.
8
+ # Plugin Hooks & Lifecycle Overrides
9
+
10
+ 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.
11
+
12
+ ---
13
+
14
+ ## 1. Supported Plugin Hooks
15
+
16
+ The `PluginHooks` interface exposes three primary interceptors (with backwards-compatible aliases):
17
+
18
+ 1. **`onBeforeAction(handler)`** — *alias:* `beforeToolCall`
19
+ - `handler(tool, args, session)` runs **before** any tool executes.
20
+ - It may return a modified `args` object (replacing the arguments) or `{ __blocked: true, reason }` to abort the call.
21
+ - Typical uses: argument validation, tenant/header injection, proxy routing.
22
+ 2. **`onAfterAction(handler)`** — *alias:* `afterToolCall`
23
+ - `handler(tool, result, session, args)` runs **after** a tool completes.
24
+ - Its return value replaces the tool result — used for telemetry, timing, or enriching output.
25
+ 3. **`onDOMMutation(handler)`** — *alias:* `onPageNavigate`
26
+ - `handler(delta, session)` observes real-time DOM mutation / action deltas (added, removed, and changed elements, `significantChange`, `stable_count`).
27
+
28
+ ---
29
+
30
+ ## 2. Agent Operational Awareness
31
+
32
+ - 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.
33
+ - An `onAfterAction` handler can rewrite a tool's result. Treat the returned payload as authoritative, not a fixed schema.
34
+ - Plugins never inject plaintext secrets into results; the Redaction Layer runs on all error output (`SessionSecretTracker.redactAll`).
30
35
 
31
36
 
32
37
  ## plugin-runtime
@@ -39,9 +44,9 @@ Weavetab features an extensible plugin architecture powered by `@weavetab/sdk`.
39
44
 
40
45
  ## 1. How Plugin Tools Appear
41
46
 
42
- 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.
47
+ 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.
43
48
 
44
- There are **no** `list_plugins` or `load_plugin` tools. Managing plugins is a CLI operation:
49
+ There is no MCP tool for discovering or activating plugins. Managing plugins is a CLI operation:
45
50
 
46
51
  ```bash
47
52
  # Install a plugin (restart required)