cbrowser 17.6.0 → 18.0.0

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.
@@ -0,0 +1,251 @@
1
+ # Testing & Quality Tools
2
+
3
+ **Write tests in plain English. Let AI fix them when they break.**
4
+
5
+ These 7 tools transform how you write, maintain, and debug tests. Natural language test suites, automatic repair of broken selectors, flaky test detection, and coverage mapping — all without writing a single line of test code.
6
+
7
+ ---
8
+
9
+ ## When to Use These Tools
10
+
11
+ - **You hate writing test scripts** but need test coverage
12
+ - **Your tests break constantly** when the UI changes
13
+ - **You have flaky tests** that randomly pass and fail
14
+ - **You don't know what's untested** and want a coverage map
15
+ - **You want autonomous bug finding** without writing test cases
16
+
17
+ ---
18
+
19
+ ## Tools
20
+
21
+ ### `nl_test_inline`
22
+
23
+ **What it does**: Run tests written in plain English, passed directly as text.
24
+
25
+ **Why you'd use it**: Quick validation without creating test files. Great for ad-hoc testing and CI pipelines.
26
+
27
+ | Parameter | Type | Required | Description |
28
+ |-----------|------|----------|-------------|
29
+ | `tests` | string | Yes | Natural language test steps, one per line |
30
+ | `stopOnFailure` | boolean | No | Stop at first failure. Default: false |
31
+ | `screenshots` | boolean | No | Capture screenshot after each step. Default: false |
32
+
33
+ **Example**:
34
+ ```json
35
+ {
36
+ "tests": "go to https://example.com\nclick the login button\nfill email with test@example.com\nfill password with secret123\nclick submit\nverify the page contains Welcome",
37
+ "screenshots": true
38
+ }
39
+ ```
40
+
41
+ ### Test Syntax
42
+
43
+ | Instruction | Examples |
44
+ |-------------|----------|
45
+ | **Navigate** | `go to https://...`, `navigate to https://...`, `open https://...` |
46
+ | **Click** | `click the login button`, `click Submit`, `press Enter` |
47
+ | **Fill** | `type "value" in email field`, `fill username with "john"` |
48
+ | **Wait** | `wait 2 seconds`, `wait for "Loading" to disappear` |
49
+ | **Assert** | `verify page contains "Welcome"`, `verify url contains "/home"` |
50
+ | **Screenshot** | `take screenshot` |
51
+
52
+ ---
53
+
54
+ ### `nl_test_file`
55
+
56
+ **What it does**: Run a test suite from a file. Supports multiple test blocks and better organization.
57
+
58
+ **Why you'd use it**: Maintain test suites as simple text files that anyone can read and edit.
59
+
60
+ | Parameter | Type | Required | Description |
61
+ |-----------|------|----------|-------------|
62
+ | `path` | string | Yes | Path to the test file |
63
+ | `filter` | string | No | Run only tests matching this pattern |
64
+ | `dryRun` | boolean | No | Parse tests without executing. Default: false |
65
+
66
+ **Example**:
67
+ ```json
68
+ {
69
+ "path": "/tests/checkout-flow.txt",
70
+ "filter": "payment"
71
+ }
72
+ ```
73
+
74
+ ### Test File Format
75
+
76
+ ```txt
77
+ # Test: Login Flow
78
+ go to https://example.com
79
+ click the login button
80
+ fill email with user@example.com
81
+ fill password with password123
82
+ click submit
83
+ verify url contains /dashboard
84
+
85
+ # Test: Failed Login
86
+ go to https://example.com/login
87
+ fill email with wrong@example.com
88
+ fill password with badpassword
89
+ click submit
90
+ verify page contains "Invalid credentials"
91
+ ```
92
+
93
+ ---
94
+
95
+ ### `generate_tests`
96
+
97
+ **What it does**: Analyze a page and automatically generate test scenarios covering its functionality.
98
+
99
+ **Why you'd use it**: Bootstrap test coverage for a new page or discover tests you didn't think to write.
100
+
101
+ | Parameter | Type | Required | Description |
102
+ |-----------|------|----------|-------------|
103
+ | `url` | string | Yes | Page to analyze |
104
+ | `depth` | string | No | Test depth: `smoke`, `standard`, `comprehensive`. Default: `standard` |
105
+ | `focus` | string | No | Focus area: `forms`, `navigation`, `errors`, `all` |
106
+
107
+ **Example**:
108
+ ```json
109
+ {
110
+ "url": "https://example.com/checkout",
111
+ "depth": "comprehensive",
112
+ "focus": "forms"
113
+ }
114
+ ```
115
+
116
+ **Returns**: Generated test file content with scenarios for happy paths, edge cases, and error conditions.
117
+
118
+ ---
119
+
120
+ ### `repair_test`
121
+
122
+ **What it does**: Automatically fix a broken test by analyzing what changed and updating selectors/assertions.
123
+
124
+ **Why you'd use it**: When a test fails due to UI changes, repair it instead of rewriting it.
125
+
126
+ | Parameter | Type | Required | Description |
127
+ |-----------|------|----------|-------------|
128
+ | `testPath` | string | Yes | Path to the broken test file |
129
+ | `errorContext` | string | No | Error message or failure details |
130
+ | `autoApply` | boolean | No | Apply fixes automatically. Default: false |
131
+ | `verify` | boolean | No | Run repaired test to verify fix. Default: true |
132
+
133
+ **Example**:
134
+ ```json
135
+ {
136
+ "testPath": "/tests/checkout.txt",
137
+ "errorContext": "Element 'Submit Order' not found",
138
+ "autoApply": true
139
+ }
140
+ ```
141
+
142
+ **Returns**: Proposed fixes, what changed, and (if verified) confirmation the repaired test passes.
143
+
144
+ ---
145
+
146
+ ### `detect_flaky_tests`
147
+
148
+ **What it does**: Run tests multiple times to identify which ones are unreliable.
149
+
150
+ **Why you'd use it**: Find tests that randomly fail so you can fix them or quarantine them.
151
+
152
+ | Parameter | Type | Required | Description |
153
+ |-----------|------|----------|-------------|
154
+ | `testPath` | string | Yes | Test file to check |
155
+ | `runs` | number | No | Number of runs. Default: 5 |
156
+ | `threshold` | number | No | Failure percentage to mark as flaky. Default: 20 |
157
+
158
+ **Example**:
159
+ ```json
160
+ {
161
+ "testPath": "/tests/full-suite.txt",
162
+ "runs": 10,
163
+ "threshold": 10
164
+ }
165
+ ```
166
+
167
+ **Returns**: List of flaky tests with failure rates, timing variance, and suggested fixes.
168
+
169
+ ---
170
+
171
+ ### `coverage_map`
172
+
173
+ **What it does**: Generate a test coverage map showing which pages and features are tested.
174
+
175
+ **Why you'd use it**: Find gaps in test coverage before they become bugs in production.
176
+
177
+ | Parameter | Type | Required | Description |
178
+ |-----------|------|----------|-------------|
179
+ | `siteUrl` | string | Yes | Base URL of the site |
180
+ | `testsPath` | string | Yes | Path to test files (supports glob patterns) |
181
+ | `depth` | number | No | Crawl depth for discovering pages. Default: 3 |
182
+
183
+ **Example**:
184
+ ```json
185
+ {
186
+ "siteUrl": "https://example.com",
187
+ "testsPath": "/tests/**/*.txt",
188
+ "depth": 3
189
+ }
190
+ ```
191
+
192
+ **Returns**: Coverage matrix showing each page, what tests cover it, and what's untested.
193
+
194
+ ---
195
+
196
+ ### `hunt_bugs`
197
+
198
+ **What it does**: Autonomously explore a site looking for bugs, errors, and accessibility issues — without being told what to test.
199
+
200
+ **Why you'd use it**: Discover issues you didn't know existed. Great for exploratory testing and security reconnaissance.
201
+
202
+ | Parameter | Type | Required | Description |
203
+ |-----------|------|----------|-------------|
204
+ | `url` | string | Yes | Starting URL |
205
+ | `scope` | string | No | Bug types: `all`, `functional`, `visual`, `accessibility`, `security` |
206
+ | `depth` | number | No | Exploration depth. Default: 3 |
207
+ | `maxPages` | number | No | Maximum pages to visit. Default: 20 |
208
+
209
+ **Example**:
210
+ ```json
211
+ {
212
+ "url": "https://example.com",
213
+ "scope": "all",
214
+ "depth": 4,
215
+ "maxPages": 50
216
+ }
217
+ ```
218
+
219
+ **Returns**: List of discovered issues with severity, reproduction steps, and screenshots.
220
+
221
+ ### What `hunt_bugs` Looks For
222
+
223
+ - **Functional**: Broken links, form errors, JavaScript exceptions, failed network requests
224
+ - **Visual**: Layout breaks, overlapping elements, missing images, rendering issues
225
+ - **Accessibility**: Missing alt text, low contrast, keyboard traps, ARIA violations
226
+ - **Security**: Exposed credentials, insecure forms, missing HTTPS, data in URLs
227
+
228
+ ---
229
+
230
+ ## Natural Language Test Advantages
231
+
232
+ | Traditional Tests | CBrowser NL Tests |
233
+ |-------------------|-------------------|
234
+ | `await page.click('#btn-submit-order-v3')` | `click the Submit Order button` |
235
+ | Breaks when ID changes | Finds button by intent |
236
+ | Requires developer to write | Anyone can write |
237
+ | Hard to read for non-devs | Self-documenting |
238
+ | Manual repair on failure | Auto-repair available |
239
+
240
+ ---
241
+
242
+ ## Related Documentation
243
+
244
+ - [Natural Language Tests](/docs/Natural-Language-Tests/) — Deep dive on NL test syntax
245
+ - [AI Test Repair](/docs/AI-Test-Repair/) — How repair works
246
+ - [Flaky Test Detection](/docs/Flaky-Test-Detection/) — Dealing with unreliable tests
247
+ - [Test Coverage Map](/docs/Test-Coverage-Map/) — Understanding coverage
248
+
249
+ ---
250
+
251
+ *Last updated: v17.6.0*
@@ -0,0 +1,176 @@
1
+ # Utility Tools
2
+
3
+ **Diagnostics, health checks, and infrastructure.**
4
+
5
+ These 6 tools handle diagnostics, self-healing statistics, agent-readiness audits, and API key management (Enterprise). The tools that keep everything else running smoothly.
6
+
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ ### `status`
12
+
13
+ **What it does**: Get comprehensive CBrowser environment diagnostics.
14
+
15
+ **Why you'd use it**: Debug configuration issues, verify installation, check capabilities.
16
+
17
+ | Parameter | Type | Required | Description |
18
+ |-----------|------|----------|-------------|
19
+ | *none* | | | |
20
+
21
+ **Returns**:
22
+ - CBrowser version
23
+ - Browser backend (Chromium/Firefox/WebKit)
24
+ - Data directory location
25
+ - Enterprise availability
26
+ - Authentication status
27
+ - Recent activity summary
28
+
29
+ ---
30
+
31
+ ### `heal_stats`
32
+
33
+ **What it does**: Get statistics on the self-healing selector cache — how many selectors have been healed, hit rate, storage usage.
34
+
35
+ **Why you'd use it**: Understand how well self-healing is working and whether the cache needs maintenance.
36
+
37
+ | Parameter | Type | Required | Description |
38
+ |-----------|------|----------|-------------|
39
+ | `detailed` | boolean | No | Include per-domain breakdown. Default: false |
40
+
41
+ **Returns**:
42
+ - Total healed selectors
43
+ - Cache hit rate
44
+ - Most frequently healed selectors
45
+ - Cache age and size
46
+
47
+ ---
48
+
49
+ ### `agent_ready_audit`
50
+
51
+ **What it does**: Audit a website for AI-agent friendliness. Scores how easily an autonomous AI could navigate and interact with the site.
52
+
53
+ **Why you'd use it**: Know if your site is ready for the AI agent future. Sites that score well are also easier for humans to use.
54
+
55
+ | Parameter | Type | Required | Description |
56
+ |-----------|------|----------|-------------|
57
+ | `url` | string | Yes | URL to audit |
58
+ | `depth` | number | No | Pages to crawl. Default: 5 |
59
+
60
+ **Example**:
61
+ ```json
62
+ {
63
+ "url": "https://example.com",
64
+ "depth": 10
65
+ }
66
+ ```
67
+
68
+ **Returns**:
69
+ - Overall score (0-100)
70
+ - Grade (A-F)
71
+ - Category scores:
72
+ - Semantic HTML quality
73
+ - ARIA completeness
74
+ - Consistent navigation
75
+ - Clear form labels
76
+ - Predictable interactive elements
77
+ - Error message clarity
78
+ - Specific recommendations
79
+
80
+ ### Scoring
81
+
82
+ | Grade | Score | Meaning |
83
+ |-------|-------|---------|
84
+ | A | 90-100 | Excellent agent compatibility |
85
+ | B | 80-89 | Good, minor improvements possible |
86
+ | C | 70-79 | Acceptable, some friction for agents |
87
+ | D | 60-69 | Poor, significant navigation challenges |
88
+ | F | <60 | Hostile to automated interaction |
89
+
90
+ ---
91
+
92
+ ## API Key Management 🔒 Enterprise
93
+
94
+ > **All API key tools require CBrowser Enterprise.**
95
+ > API keys enable autonomous cognitive journeys that make AI decisions without human orchestration.
96
+
97
+ ### `set_api_key` 🔒 Enterprise
98
+
99
+ **What it does**: Store an Anthropic API key in encrypted session memory for autonomous journey execution.
100
+
101
+ **Why you'd use it**: Enable `cognitive_journey_autonomous` and other features that require AI decision-making.
102
+
103
+ | Parameter | Type | Required | Description |
104
+ |-----------|------|----------|-------------|
105
+ | `api_key` | string | Yes | Your Anthropic API key (starts with `sk-ant-`) |
106
+
107
+ **Security**: Keys are stored in memory only, not persisted to disk. They're cleared when the session ends.
108
+
109
+ ---
110
+
111
+ ### `clear_api_key` 🔒 Enterprise
112
+
113
+ **What it does**: Remove the stored API key from session memory.
114
+
115
+ **Why you'd use it**: Clear credentials when you're done or before switching accounts.
116
+
117
+ | Parameter | Type | Required | Description |
118
+ |-----------|------|----------|-------------|
119
+ | *none* | | | |
120
+
121
+ ---
122
+
123
+ ### `api_key_status` 🔒 Enterprise
124
+
125
+ **What it does**: Check if an API key is currently stored without revealing the key itself.
126
+
127
+ **Why you'd use it**: Verify setup before running autonomous operations.
128
+
129
+ | Parameter | Type | Required | Description |
130
+ |-----------|------|----------|-------------|
131
+ | *none* | | | |
132
+
133
+ **Returns**:
134
+ - Key stored: yes/no
135
+ - Key prefix (first 8 chars, masked)
136
+ - When stored (timestamp)
137
+
138
+ ---
139
+
140
+ ### `get_api_key_prompt` 🔒 Enterprise
141
+
142
+ **What it does**: Get instructions for obtaining an Anthropic API key.
143
+
144
+ **Why you'd use it**: Help users who need to set up API access.
145
+
146
+ | Parameter | Type | Required | Description |
147
+ |-----------|------|----------|-------------|
148
+ | *none* | | | |
149
+
150
+ **Returns**: Step-by-step instructions for creating an Anthropic account and generating an API key.
151
+
152
+ ---
153
+
154
+ ## Demo vs Enterprise
155
+
156
+ | Tool | Demo | Enterprise |
157
+ |------|------|------------|
158
+ | `status` | ✅ | ✅ |
159
+ | `heal_stats` | ✅ | ✅ |
160
+ | `agent_ready_audit` | ✅ | ✅ |
161
+ | `set_api_key` | ❌ | ✅ |
162
+ | `clear_api_key` | ❌ | ✅ |
163
+ | `api_key_status` | ❌ | ✅ |
164
+ | `get_api_key_prompt` | ❌ | ✅ |
165
+
166
+ ---
167
+
168
+ ## Related Documentation
169
+
170
+ - [Tools Overview](/docs/Tools-Overview/) — All tools by category
171
+ - [MCP Server](/docs/MCP-Server/) — Running CBrowser locally
172
+ - [Remote MCP Server](/docs/Remote-MCP-Server/) — Cloud deployment
173
+
174
+ ---
175
+
176
+ *Last updated: v17.6.0*
@@ -0,0 +1,272 @@
1
+ # Visual & Performance Tools
2
+
3
+ **Catch regressions before your users see them.**
4
+
5
+ These 10 tools detect visual changes, performance degradation, cross-browser rendering differences, and responsive layout breakage. Stop finding out about broken deploys from customer complaints.
6
+
7
+ ---
8
+
9
+ ## When to Use These Tools
10
+
11
+ - **You're deploying to staging** and want to verify nothing visual broke
12
+ - **Performance matters** and you need to catch slowdowns before production
13
+ - **Your site looks different in Safari** and you need to know exactly what's wrong
14
+ - **Mobile layouts keep breaking** and you want automated viewport testing
15
+ - **You want chaos engineering** to test resilience under failure conditions
16
+
17
+ ---
18
+
19
+ ## Tools
20
+
21
+ ### `visual_baseline`
22
+
23
+ **What it does**: Capture a visual baseline (screenshot + metadata) for a URL to compare against later.
24
+
25
+ **Why you'd use it**: Establish what "correct" looks like so you can detect when it changes.
26
+
27
+ | Parameter | Type | Required | Description |
28
+ |-----------|------|----------|-------------|
29
+ | `url` | string | Yes | URL to capture |
30
+ | `name` | string | Yes | Name for this baseline |
31
+ | `viewport` | object | No | Width/height. Default: 1280x720 |
32
+ | `fullPage` | boolean | No | Capture entire page. Default: false |
33
+
34
+ **Example**:
35
+ ```json
36
+ {
37
+ "url": "https://example.com",
38
+ "name": "homepage-desktop",
39
+ "viewport": { "width": 1920, "height": 1080 },
40
+ "fullPage": true
41
+ }
42
+ ```
43
+
44
+ ---
45
+
46
+ ### `visual_regression`
47
+
48
+ **What it does**: Compare current page state against a saved baseline using AI visual analysis.
49
+
50
+ **Why you'd use it**: Detect meaningful visual changes while ignoring irrelevant differences (timestamps, ads, dynamic content).
51
+
52
+ | Parameter | Type | Required | Description |
53
+ |-----------|------|----------|-------------|
54
+ | `url` | string | Yes | URL to test |
55
+ | `baseline` | string | Yes | Baseline name to compare against |
56
+ | `threshold` | number | No | Difference tolerance (0-100). Default: 5 |
57
+
58
+ **Example**:
59
+ ```json
60
+ {
61
+ "url": "https://staging.example.com",
62
+ "baseline": "homepage-desktop"
63
+ }
64
+ ```
65
+
66
+ **Returns**: Pass/fail, difference percentage, annotated diff image, list of changed regions.
67
+
68
+ ---
69
+
70
+ ### `ab_comparison`
71
+
72
+ **What it does**: Compare two different URLs visually — staging vs production, old design vs new design.
73
+
74
+ **Why you'd use it**: Side-by-side comparison when you don't have a saved baseline, or when comparing different implementations.
75
+
76
+ | Parameter | Type | Required | Description |
77
+ |-----------|------|----------|-------------|
78
+ | `urlA` | string | Yes | First URL (e.g., production) |
79
+ | `urlB` | string | Yes | Second URL (e.g., staging) |
80
+ | `labelA` | string | No | Label for first URL. Default: "A" |
81
+ | `labelB` | string | No | Label for second URL. Default: "B" |
82
+ | `viewport` | object | No | Viewport dimensions |
83
+
84
+ **Example**:
85
+ ```json
86
+ {
87
+ "urlA": "https://example.com/pricing",
88
+ "urlB": "https://staging.example.com/pricing",
89
+ "labelA": "Production",
90
+ "labelB": "Staging"
91
+ }
92
+ ```
93
+
94
+ **Returns**: Side-by-side comparison, diff overlay, list of differences.
95
+
96
+ ---
97
+
98
+ ### `perf_baseline`
99
+
100
+ **What it does**: Capture performance baseline (Core Web Vitals, load times, resource counts) for a URL.
101
+
102
+ **Why you'd use it**: Know what your current performance is so you can detect regressions.
103
+
104
+ | Parameter | Type | Required | Description |
105
+ |-----------|------|----------|-------------|
106
+ | `url` | string | Yes | URL to measure |
107
+ | `name` | string | Yes | Baseline name |
108
+ | `runs` | number | No | Number of measurements to average. Default: 3 |
109
+
110
+ **Example**:
111
+ ```json
112
+ {
113
+ "url": "https://example.com",
114
+ "name": "homepage-perf",
115
+ "runs": 5
116
+ }
117
+ ```
118
+
119
+ **Returns**: LCP, FCP, TTFB, CLS, total load time, resource breakdown, with "good/needs-improvement/poor" ratings.
120
+
121
+ ---
122
+
123
+ ### `perf_regression`
124
+
125
+ **What it does**: Compare current performance against a baseline with configurable sensitivity.
126
+
127
+ **Why you'd use it**: Catch performance regressions before they ship.
128
+
129
+ | Parameter | Type | Required | Description |
130
+ |-----------|------|----------|-------------|
131
+ | `url` | string | Yes | URL to test |
132
+ | `baseline` | string | Yes | Baseline name |
133
+ | `profile` | string | No | Sensitivity: `strict`, `normal`, `lenient`. Default: `normal` |
134
+ | `thresholdLcp` | number | No | LCP regression threshold %. Default: 20 |
135
+ | `thresholdFcp` | number | No | FCP regression threshold %. Default: 20 |
136
+
137
+ **Example**:
138
+ ```json
139
+ {
140
+ "url": "https://staging.example.com",
141
+ "baseline": "homepage-perf",
142
+ "profile": "strict"
143
+ }
144
+ ```
145
+
146
+ **Returns**: Pass/fail, metric comparisons, which thresholds were exceeded.
147
+
148
+ ---
149
+
150
+ ### `list_baselines`
151
+
152
+ **What it does**: List all saved visual and performance baselines.
153
+
154
+ **Why you'd use it**: See what baselines exist before running regression tests.
155
+
156
+ | Parameter | Type | Required | Description |
157
+ |-----------|------|----------|-------------|
158
+ | `type` | string | No | Filter: `visual`, `performance`, `all`. Default: `all` |
159
+
160
+ ---
161
+
162
+ ### `cross_browser_test`
163
+
164
+ **What it does**: Render a page in Chromium, Firefox, and WebKit and compare the results.
165
+
166
+ **Why you'd use it**: Find browser-specific rendering bugs.
167
+
168
+ | Parameter | Type | Required | Description |
169
+ |-----------|------|----------|-------------|
170
+ | `url` | string | Yes | URL to test |
171
+ | `browsers` | array | No | Browsers to test. Default: `["chromium", "firefox", "webkit"]` |
172
+ | `viewport` | object | No | Viewport dimensions |
173
+
174
+ **Example**:
175
+ ```json
176
+ {
177
+ "url": "https://example.com/complex-layout",
178
+ "browsers": ["chromium", "webkit"]
179
+ }
180
+ ```
181
+
182
+ **Returns**: Screenshots from each browser, diff analysis, list of rendering differences.
183
+
184
+ ---
185
+
186
+ ### `cross_browser_diff`
187
+
188
+ **What it does**: Quick comparison of key metrics (layout, fonts, colors) across browsers without full screenshots.
189
+
190
+ **Why you'd use it**: Faster browser comparison when you just need to know if there are issues.
191
+
192
+ | Parameter | Type | Required | Description |
193
+ |-----------|------|----------|-------------|
194
+ | `url` | string | Yes | URL to compare |
195
+ | `browsers` | array | No | Browsers to test |
196
+
197
+ ---
198
+
199
+ ### `responsive_test`
200
+
201
+ **What it does**: Test page rendering across different viewport sizes (mobile, tablet, desktop).
202
+
203
+ **Why you'd use it**: Catch responsive layout breakage.
204
+
205
+ | Parameter | Type | Required | Description |
206
+ |-----------|------|----------|-------------|
207
+ | `url` | string | Yes | URL to test |
208
+ | `viewports` | array | No | Viewport presets or custom sizes. Default: `["mobile", "tablet", "desktop"]` |
209
+
210
+ **Example**:
211
+ ```json
212
+ {
213
+ "url": "https://example.com",
214
+ "viewports": ["mobile", "tablet", "desktop-lg"]
215
+ }
216
+ ```
217
+
218
+ ### Viewport Presets
219
+
220
+ | Preset | Dimensions |
221
+ |--------|------------|
222
+ | `mobile` | 375x667 |
223
+ | `tablet` | 768x1024 |
224
+ | `desktop` | 1280x720 |
225
+ | `desktop-lg` | 1920x1080 |
226
+
227
+ **Returns**: Screenshots at each viewport, flagged layout issues, overflow problems.
228
+
229
+ ---
230
+
231
+ ### `chaos_test`
232
+
233
+ **What it does**: Inject failures to test site resilience — offline mode, network latency, blocked resources.
234
+
235
+ **Why you'd use it**: Ensure your site degrades gracefully under adverse conditions.
236
+
237
+ | Parameter | Type | Required | Description |
238
+ |-----------|------|----------|-------------|
239
+ | `url` | string | Yes | URL to test |
240
+ | `chaos` | string | Yes | Type: `offline`, `slow-network`, `block-scripts`, `block-images`, `block-fonts` |
241
+ | `duration` | number | No | How long to apply chaos (seconds). Default: 10 |
242
+
243
+ **Example**:
244
+ ```json
245
+ {
246
+ "url": "https://example.com/checkout",
247
+ "chaos": "slow-network"
248
+ }
249
+ ```
250
+
251
+ **Returns**: How the page behaves under stress, errors encountered, recovery behavior.
252
+
253
+ ---
254
+
255
+ ## Sensitivity Profiles for Performance
256
+
257
+ | Profile | LCP | FCP | TTFB | Use Case |
258
+ |---------|-----|-----|------|----------|
259
+ | `strict` | 10% | 10% | 15% | Pre-production, critical paths |
260
+ | `normal` | 20% | 20% | 25% | Regular CI/CD |
261
+ | `lenient` | 35% | 35% | 40% | Early development, high variance |
262
+
263
+ ---
264
+
265
+ ## Related Documentation
266
+
267
+ - [Performance Regression](/docs/Performance-Regression/) — Deep dive on perf testing
268
+ - [Tools Overview](/docs/Tools-Overview/) — All tools by category
269
+
270
+ ---
271
+
272
+ *Last updated: v17.6.0*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cbrowser",
3
- "version": "17.6.0",
3
+ "version": "18.0.0",
4
4
  "type": "module",
5
5
  "description": "Cognitive browser automation that thinks like your users—and helps AI agents navigate too. Simulate real user cognition with abandonment detection, constitutional safety, chaos engineering, and UX friction discovery. Sites that pass CBrowser's cognitive tests are easier for both humans and AI agents to navigate.",
6
6
  "main": "dist/index.js",