@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
|
@@ -1,223 +1,250 @@
|
|
|
1
|
-
# Weavetab Domain Profile: NETWORK-AND-PERF
|
|
2
|
-
|
|
3
|
-
Generated for @weavetab/skills v2.5.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## device-and-environment
|
|
7
|
-
|
|
8
|
-
# Device Emulation & Environment Simulation
|
|
9
|
-
|
|
10
|
-
Auditing mobile responsive layouts, testing geographic restrictions, and simulating degraded network conditions
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## 1. Device Presets & Viewport Simulation
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```json
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
##
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"action": "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
{
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1
|
+
# Weavetab Domain Profile: NETWORK-AND-PERF
|
|
2
|
+
|
|
3
|
+
Generated for @weavetab/skills v2.5.1
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## device-and-environment
|
|
7
|
+
|
|
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
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## network-intercept-and-mock
|
|
95
|
+
|
|
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
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## performance-and-vitals
|
|
181
|
+
|
|
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
|
+
}
|
|
250
|
+
```
|
|
@@ -1,83 +1,88 @@
|
|
|
1
|
-
# Weavetab Domain Profile: PLUGINS
|
|
2
|
-
|
|
3
|
-
Generated for @weavetab/skills v2.5.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## hooks-and-overrides
|
|
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
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## 1. Supported Plugin Hooks
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
1
|
+
# Weavetab Domain Profile: PLUGINS
|
|
2
|
+
|
|
3
|
+
Generated for @weavetab/skills v2.5.1
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## hooks-and-overrides
|
|
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 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`).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## plugin-runtime
|
|
38
|
+
|
|
39
|
+
# Plugin Runtime: Weavetab Plugin Architecture
|
|
40
|
+
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 1. How Plugin Tools Appear
|
|
46
|
+
|
|
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.
|
|
48
|
+
|
|
49
|
+
There is no MCP tool for discovering or activating plugins. Managing plugins is a CLI operation:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install a plugin (restart required)
|
|
53
|
+
weavetab plugin add @weavetab/plugin-youtube
|
|
54
|
+
|
|
55
|
+
# Remove a plugin
|
|
56
|
+
weavetab plugin rm @weavetab/plugin-youtube
|
|
57
|
+
|
|
58
|
+
# List installed plugins
|
|
59
|
+
weavetab plugin list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Plugin Permission Model
|
|
65
|
+
|
|
66
|
+
Every plugin declares what it can do in `weavetab.json`. The runtime enforces this at load time:
|
|
67
|
+
|
|
68
|
+
| Permission | What it gates |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `tools.add: true` | Plugin can register new MCP tools |
|
|
71
|
+
| `tools.override: ["browser_navigate"]` | Plugin can wrap/replace that built-in tool |
|
|
72
|
+
| `tools.remove: ["browser_pdf"]` | Plugin can disable that built-in tool |
|
|
73
|
+
| `hooks.onBeforeAction: true` | Plugin can intercept all tool calls before execution |
|
|
74
|
+
| `hooks.onAfterAction: true` | Plugin can inspect/transform all tool results |
|
|
75
|
+
|
|
76
|
+
Plugins that attempt to exceed their declared permissions are blocked with a stderr warning — they do not crash.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 3. Trust Tiers
|
|
81
|
+
|
|
82
|
+
| Tier | Badge | Condition |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| Official | `✚ [Official]` | `@weavetab/plugin-*` packages |
|
|
85
|
+
| Verified | `✔ [Verified]` | Listed in the Weavetab verified registry |
|
|
86
|
+
| Unverified | `⚠ [Unverified]` | Unknown community package |
|
|
87
|
+
|
|
88
|
+
Unverified plugins are loaded but their permissions are logged visibly at startup for user review.
|