@weavetab/skills 2.5.0 → 2.5.2

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 (63) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +108 -108
  3. package/ROUTER.md +43 -43
  4. package/bin/cli.js +232 -232
  5. package/browser/dom-strategy.md +121 -119
  6. package/browser/form-automation.md +84 -87
  7. package/browser/interaction-pipeline.md +242 -216
  8. package/browser/tab-and-window.md +136 -136
  9. package/desktop/desktop-targeting.md +85 -85
  10. package/desktop/electron-discovery.md +115 -115
  11. package/developer/github-forensics.md +89 -74
  12. package/dist/bundled/weavetab-all.md +1885 -1709
  13. package/dist/bundled/weavetab-browser.md +526 -501
  14. package/dist/bundled/weavetab-desktop.md +176 -176
  15. package/dist/bundled/weavetab-developer.md +84 -67
  16. package/dist/bundled/weavetab-documents.md +184 -142
  17. package/dist/bundled/weavetab-memory.md +259 -233
  18. package/dist/bundled/weavetab-network-and-perf.md +250 -223
  19. package/dist/bundled/weavetab-plugins.md +88 -83
  20. package/dist/bundled/weavetab-resilience.md +244 -216
  21. package/dist/bundled/weavetab-security.md +93 -87
  22. package/dist/granular/browser_dom-strategy.md +121 -119
  23. package/dist/granular/browser_form-automation.md +84 -87
  24. package/dist/granular/browser_interaction-pipeline.md +242 -216
  25. package/dist/granular/browser_tab-and-window.md +136 -136
  26. package/dist/granular/desktop_desktop-targeting.md +85 -85
  27. package/dist/granular/desktop_electron-discovery.md +115 -115
  28. package/dist/granular/developer_github-forensics.md +89 -74
  29. package/dist/granular/documents_canvas-and-visual-capture.md +117 -103
  30. package/dist/granular/documents_office-document-ingestion.md +91 -63
  31. package/dist/granular/memory_selector-memory-system.md +127 -127
  32. package/dist/granular/memory_session-trail.md +111 -95
  33. package/dist/granular/memory_site-learning.md +62 -53
  34. package/dist/granular/network-and-perf_device-and-environment.md +100 -87
  35. package/dist/granular/network-and-perf_network-intercept-and-mock.md +97 -84
  36. package/dist/granular/network-and-perf_performance-and-vitals.md +86 -84
  37. package/dist/granular/plugins_hooks-and-overrides.md +40 -35
  38. package/dist/granular/plugins_plugin-runtime.md +63 -63
  39. package/dist/granular/resilience_loop-breaker.md +72 -67
  40. package/dist/granular/resilience_session-time-travel.md +146 -131
  41. package/dist/granular/resilience_stale-ref-recovery.md +61 -53
  42. package/dist/granular/security_rbac-and-policies.md +50 -47
  43. package/dist/granular/security_secret-containment-protocol.md +62 -59
  44. package/documents/canvas-and-visual-capture.md +117 -103
  45. package/documents/office-document-ingestion.md +91 -63
  46. package/evals/evaluator.js +146 -146
  47. package/evals/scenarios.json +239 -239
  48. package/memory/selector-memory-system.md +127 -127
  49. package/memory/session-trail.md +111 -95
  50. package/memory/site-learning.md +61 -52
  51. package/network-and-perf/device-and-environment.md +100 -87
  52. package/network-and-perf/network-intercept-and-mock.md +97 -84
  53. package/network-and-perf/performance-and-vitals.md +86 -84
  54. package/package.json +74 -73
  55. package/plugins/hooks-and-overrides.md +40 -35
  56. package/plugins/plugin-runtime.md +63 -63
  57. package/resilience/loop-breaker.md +72 -67
  58. package/resilience/session-time-travel.md +146 -131
  59. package/resilience/stale-ref-recovery.md +61 -53
  60. package/security/rbac-and-policies.md +50 -47
  61. package/security/secret-containment-protocol.md +62 -59
  62. package/skills.json +425 -426
  63. package/src/api.js +239 -239
@@ -1,131 +1,146 @@
1
- ---
2
- id: session-time-travel
3
- domain: resilience
4
- triggers:
5
- - "time travel"
6
- - "browser checkpoint"
7
- - "rollback session"
8
- - "save state"
9
- - "restore cookies"
10
- tools:
11
- - "browser_checkpoint"
12
- - "browser_cookies"
13
- - "browser_storage"
14
- weavetab: ">=2.5.0"
15
- ---
16
-
17
- # Session Time-Travel & Instant State Rollback
18
-
19
- In complex multi-step workflows (e.g. checkout funnels, multi-page configuration wizards, onboarding questionnaires), an error at Step 7 traditionally forces an agent to reload the root URL, re-authenticate, and waste 10+ turns repeating steps.
20
-
21
- `browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
22
-
23
- ---
24
-
25
- ## 1. What a Checkpoint Captures
26
-
27
- A single named checkpoint atomically preserves:
28
- - **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
29
- - **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
30
- - **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
31
-
32
- ---
33
-
34
- ## 2. Checkpoint Operations
35
-
36
- ### A. Saving a Checkpoint (`save`)
37
- Create a checkpoint right before undertaking risky, branching, or destructive actions:
38
-
39
- ```json
40
- {
41
- "action": "save",
42
- "name": "pre_checkout_authenticated"
43
- }
44
- ```
45
-
46
- ### B. Restoring a Checkpoint (`restore`)
47
- If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
48
-
49
- ```json
50
- {
51
- "action": "restore",
52
- "name": "pre_checkout_authenticated"
53
- }
54
- ```
55
- *Latency: ~15ms*. The page navigates back to the checkpoint URL with cookies and storage atomically injected.
56
-
57
- ### C. Listing Checkpoints (`list`)
58
- Inspect all active checkpoints for the current page target:
59
-
60
- ```json
61
- {
62
- "action": "list"
63
- }
64
- ```
65
-
66
- ### D. Cleaning Up (`delete`)
67
- Free memory once a workflow has concluded:
68
-
69
- ```json
70
- {
71
- "action": "delete",
72
- "name": "pre_checkout_authenticated"
73
- }
74
- ```
75
-
76
- ---
77
-
78
- ## 3. High-Leverage Agent Pattern
79
-
80
- ```
81
- 1. Authenticate to Target Portal
82
- 2. browser_checkpoint({ action: "save", name: "auth_ready" })
83
- 3. Attempt automated action sequence (e.g. form filling or testing)
84
- 4. IF error occurs:
85
- browser_checkpoint({ action: "restore", name: "auth_ready" })
86
- -> Agent is immediately back at authenticated state without re-login!
87
- ```
88
-
89
- ---
90
-
91
- ## 4. Fine-Grained Cookie Management (`browser_cookies`)
92
-
93
- Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
94
-
95
- ```json
96
- {
97
- "action": "get",
98
- "urls": ["https://example.com"]
99
- }
100
- ```
101
-
102
- Or inject an authentication cookie:
103
- ```json
104
- {
105
- "action": "set",
106
- "cookies": [
107
- {
108
- "name": "session_token",
109
- "value": "xyz123",
110
- "domain": "example.com",
111
- "httpOnly": true,
112
- "secure": true
113
- }
114
- ]
115
- }
116
- ```
117
-
118
- ---
119
-
120
- ## 5. Web Storage Inspection & Injection (`browser_storage`)
121
-
122
- Query or clear `localStorage` and `sessionStorage` keys:
123
-
124
- ```json
125
- {
126
- "storageType": "localStorage",
127
- "action": "get",
128
- "key": "authToken"
129
- }
130
- ```
131
-
1
+ ---
2
+ id: session-time-travel
3
+ domain: resilience
4
+ triggers:
5
+ - "time travel"
6
+ - "browser checkpoint"
7
+ - "rollback session"
8
+ - "save state"
9
+ - "restore cookies"
10
+ tools:
11
+ - "browser_checkpoint"
12
+ - "browser_cookies"
13
+ - "browser_storage"
14
+ weavetab: ">=2.5.0"
15
+ ---
16
+
17
+ # Session Time-Travel & Instant State Rollback
18
+
19
+ In complex multi-step workflows (e.g. checkout funnels, multi-page configuration wizards, onboarding questionnaires), an error at Step 7 traditionally forces an agent to reload the root URL, re-authenticate, and waste 10+ turns repeating steps.
20
+
21
+ `browser_checkpoint` enables instantaneous time-travel by snapshotting and restoring complete browser session state.
22
+
23
+ ---
24
+
25
+ ## 1. What a Checkpoint Captures
26
+
27
+ A single named checkpoint atomically preserves:
28
+ - **Cookies**: Full domain cookies including `HttpOnly`, `Secure`, and `SameSite` flags.
29
+ - **Web Storage**: Entire `localStorage` and `sessionStorage` key-value maps.
30
+ - **Navigation State**: Exact page URL, scroll positions (`x`, `y`), and page title.
31
+
32
+ ---
33
+
34
+ ## 2. Checkpoint Operations
35
+
36
+ ### A. Saving a Checkpoint (`save`)
37
+ Create a checkpoint right before undertaking risky, branching, or destructive actions:
38
+
39
+ ```json
40
+ {
41
+ "action": "save",
42
+ "name": "pre_checkout_authenticated"
43
+ }
44
+ ```
45
+
46
+ ### B. Restoring a Checkpoint (`restore`)
47
+ If a downstream step errors out, times out, or hits an invalid state, roll back immediately:
48
+
49
+ ```json
50
+ {
51
+ "action": "restore",
52
+ "name": "pre_checkout_authenticated"
53
+ }
54
+ ```
55
+ The page navigates back to the checkpoint URL with cookies and storage atomically injected.
56
+
57
+ ### C. Listing Checkpoints (`list`)
58
+ Inspect all active checkpoints for the current page target:
59
+
60
+ ```json
61
+ {
62
+ "action": "list"
63
+ }
64
+ ```
65
+
66
+ ### D. Cleaning Up (`delete`)
67
+ Free memory once a workflow has concluded:
68
+
69
+ ```json
70
+ {
71
+ "action": "delete",
72
+ "name": "pre_checkout_authenticated"
73
+ }
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 3. High-Leverage Agent Pattern
79
+
80
+ ```
81
+ 1. Authenticate to Target Portal
82
+ 2. browser_checkpoint({ action: "save", name: "auth_ready" })
83
+ 3. Attempt automated action sequence (e.g. form filling or testing)
84
+ 4. IF error occurs:
85
+ browser_checkpoint({ action: "restore", name: "auth_ready" })
86
+ -> Agent is immediately back at authenticated state without re-login!
87
+ ```
88
+
89
+ ---
90
+
91
+ ## 4. Fine-Grained Cookie Management (`browser_cookies`)
92
+
93
+ Inspect, set, or delete individual browser session cookies without restoring an entire checkpoint:
94
+
95
+ ```json
96
+ {
97
+ "action": "get",
98
+ "url": "https://example.com"
99
+ }
100
+ ```
101
+
102
+ Or inject an authentication cookie (one cookie per call):
103
+
104
+ ```json
105
+ {
106
+ "action": "set",
107
+ "name": "session_token",
108
+ "value": "xyz123",
109
+ "domain": "example.com",
110
+ "path": "/",
111
+ "httpOnly": true,
112
+ "secure": true,
113
+ "sameSite": "Lax"
114
+ }
115
+ ```
116
+
117
+ Delete a cookie by name (and optionally domain/path):
118
+
119
+ ```json
120
+ {
121
+ "action": "delete",
122
+ "name": "session_token",
123
+ "domain": "example.com"
124
+ }
125
+ ```
126
+
127
+ Accepted fields: `name`, `value`, `domain`, `path`, `expires` (Unix seconds), `httpOnly`, `secure`, `sameSite` (`Strict`/`Lax`/`None`), and `url` (for `get`).
128
+
129
+ ---
130
+
131
+ ## 5. Web Storage Inspection & Injection (`browser_storage`)
132
+
133
+ Query or clear `localStorage` and `sessionStorage` keys. Choose the store with `scope`:
134
+
135
+ ```json
136
+ {
137
+ "scope": "local",
138
+ "action": "get",
139
+ "key": "authToken"
140
+ }
141
+ ```
142
+
143
+ - **`scope`**: `"local"` or `"session"`.
144
+ - **`action`**: `get`, `set`, `remove`, `list` (all keys + values), or `clear` (the whole scope).
145
+ - **`key`** is required for `get`, `set`, and `remove`; **`value`** is required for `set`.
146
+
@@ -1,53 +1,61 @@
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"
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`.
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"
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 can invalidate a volatile `w:NN` handle between reads and actions.
20
+
21
+ ---
22
+
23
+ ## 1. The Multi-Tier Auto-Recovery Heuristic
24
+
25
+ When a tool receives a detached or invalidated `ref`, Weavetab attempts to re-resolve it instead of failing immediately. The recovery runs an in-memory heuristic over these strategies (in order) and re-stamps `data-wt-id="NN"` onto the live node:
26
+
27
+ ```
28
+ [Action on w:14 fails / handle detached]
29
+ │
30
+ ▼
31
+ [1. Connected node + fingerprint check]
32
+ │ (if not found)
33
+ ▼
34
+ [2. Stored CSS selector] (data-testid, id, class)
35
+ │ (if not found)
36
+ ▼
37
+ [3. Exact label / aria-label match]
38
+ │ (if not found)
39
+ ▼
40
+ [4. Placeholder / name attribute match]
41
+ │ (if not found)
42
+ ▼
43
+ [5. Fuzzy substring match] (when label length >= 3)
44
+ ```
45
+
46
+ The successful strategy is reported back to the agent (`stored_selector`, `exact_label`, `placeholder_or_name`, `fuzzy_label`). If every strategy misses, the tool returns a hard failure.
47
+
48
+ ---
49
+
50
+ ## 2. Agent Reactive Behavior
51
+
52
+ If an action fails because all recovery strategies were exhausted, the tool returns one of:
53
+
54
+ - `error_code: "ELEMENT_NOT_FOUND"` — the ref was in the cached map but no longer exists in the DOM.
55
+ - `error_code: "FINGERPRINT_MISMATCH"` — an element exists but its tag/role fingerprint no longer matches; the DOM was likely rebuilt.
56
+
57
+ Either way:
58
+
59
+ 1. **Do NOT Repeat the Identical Call**: retrying the exact same stale `ref` (`w:14`) will fail again.
60
+ 2. **Execute a Fast Targeted Lookup**: run `browser_find` with the text of the button or input, or refresh handles with `browser_map`.
61
+ 3. **Execute the Action on the New Handle**: use the updated ref returned by `browser_find`/`browser_map`.
@@ -1,47 +1,50 @@
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"
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`).
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"
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
+ Roles are configured per agent (in `config.json`). The server checks the role **before** launching a browser or resolving the target.
22
+
23
+ ---
24
+
25
+ ## 1. The 5 Security Roles
26
+
27
+ | Role | Tool Access | Intended Use |
28
+ | :--- | :--- | :--- |
29
+ | `admin` | Full access (`*`). | Primary operator / lead agent. |
30
+ | `operator` | Full access (`*`). | Standard automation agent. |
31
+ | `automation` | Every tool except `browser_thoughts` — automation agents must be non-interactive. | Background cron / worker. |
32
+ | `viewer` | Read-only set only: `browser_map`, `browser_find`, `browser_scrape`, `browser_console`, `browser_eval`, `browser_inspect`, `browser_extract_design`, `browser_snapshot`, `browser_screenshot`, `browser_pdf`, `browser_cookies`, `browser_tabs`, `browser_wait`, `browser_pattern_learn`. | Research subagents / scrapers. |
33
+ | `system` | `browser_thoughts`, `browser_detect`, `browser_performance`, `browser_checkpoint`, `browser_pattern_learn`. | Internal/system operations. |
34
+
35
+ Any other role value is treated as fully allowed.
36
+
37
+ ---
38
+
39
+ ## 2. Handling Permission Denials
40
+
41
+ There is no JSON `error_code` for RBAC. A denied call fails with `isError: true` and a plain-text message prefixed with `[!]`:
42
+
43
+ ```
44
+ [!] Role 'viewer' does not have permission to use 'browser_click'. Viewer role only permits read-only tools (map/find/scrape/console/eval/inspect/snapshot/pdf/cookies).
45
+ ```
46
+
47
+ ### Protocol:
48
+ 1. Do not retry the denied tool — the role will not change mid-session.
49
+ 2. Delegate the interactive action to the parent agent or a higher-privilege operator.
50
+ 3. Limit your output to findings gathered via read-only tools (`browser_scrape`, `browser_map`, `browser_inspect`).
@@ -1,59 +1,62 @@
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"
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.
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"
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
+ `browser_type_secret` never accepts a plaintext secret. It reads the value from an **environment variable** on the host running the MCP server, so the secret never reaches the agent transcript. Set the variable first (e.g. `export PORTAL_PASSWORD="…"`), then reference it by key:
26
+
27
+ ```json
28
+ {
29
+ "ref": "w:12",
30
+ "envKey": "PORTAL_PASSWORD"
31
+ }
32
+ ```
33
+
34
+ Accepted targeting parameters: `id` (alias `ref`) or `target` (CSS selector). `envKey` is **required**.
35
+
36
+ ---
37
+
38
+ ## 2. The Zero-Bleed Guarantee Architecture
39
+
40
+ When `browser_type_secret` is invoked:
41
+ 1. **CDP Interception**: The secret is typed via masked CDP synthetic key events.
42
+ 2. **HUD Redaction**: The browser Heads-Up Display (HUD) and visual overlay strictly renders bullets (`••••••••`).
43
+ 3. **Log Sanitization**: Console logs, MCP server logs, and JSON return values strip the secret string and return:
44
+ ```json
45
+ {
46
+ "success": true,
47
+ "message": "Secret typed successfully into ref 'w:12' (length: 26). Value redacted."
48
+ }
49
+ ```
50
+ 4. **No Re-Emission**: Never print or echo raw credentials into subsequent model thoughts or conversation messages.
51
+
52
+ ---
53
+
54
+ ## 3. Strict Operating Prohibition
55
+
56
+ > [!CAUTION]
57
+ > Under NO circumstances should an agent pass passwords or credentials to:
58
+ > - `browser_type`
59
+ > - `browser_fill`
60
+ > - `browser_eval`
61
+ >
62
+ > Doing so causes plaintext secrets to enter unmasked transcripts and tool logs.