cbrowser 17.6.1 → 18.1.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.
Files changed (37) hide show
  1. package/dist/browser.d.ts +4 -0
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +37 -1
  4. package/dist/browser.js.map +1 -1
  5. package/dist/cli.js +10 -5
  6. package/dist/cli.js.map +1 -1
  7. package/dist/mcp-server-remote.d.ts.map +1 -1
  8. package/dist/mcp-server-remote.js +3 -1
  9. package/dist/mcp-server-remote.js.map +1 -1
  10. package/dist/mcp-tools/base/navigation-tools.d.ts.map +1 -1
  11. package/dist/mcp-tools/base/navigation-tools.js +33 -12
  12. package/dist/mcp-tools/base/navigation-tools.js.map +1 -1
  13. package/dist/mcp-tools/index.d.ts +1 -0
  14. package/dist/mcp-tools/index.d.ts.map +1 -1
  15. package/dist/mcp-tools/index.js +2 -0
  16. package/dist/mcp-tools/index.js.map +1 -1
  17. package/dist/mcp-tools/screenshot-utils.d.ts +45 -0
  18. package/dist/mcp-tools/screenshot-utils.d.ts.map +1 -0
  19. package/dist/mcp-tools/screenshot-utils.js +131 -0
  20. package/dist/mcp-tools/screenshot-utils.js.map +1 -0
  21. package/docs/Tool-Cognitive-Journey-Autonomous.md +264 -0
  22. package/docs/Tool-Competitive-Benchmark.md +287 -0
  23. package/docs/Tool-Empathy-Audit.md +325 -0
  24. package/docs/Tool-Hunt-Bugs.md +299 -0
  25. package/docs/Tool-Marketing-Campaign.md +292 -0
  26. package/docs/Tool-Persona-Create.md +268 -0
  27. package/docs/Tools-Accessibility.md +202 -0
  28. package/docs/Tools-Browser-Automation.md +305 -0
  29. package/docs/Tools-Cognitive-Journeys.md +227 -0
  30. package/docs/Tools-Marketing-Intelligence.md +265 -0
  31. package/docs/Tools-Overview.md +143 -0
  32. package/docs/Tools-Persona-System.md +294 -0
  33. package/docs/Tools-Session-State.md +272 -0
  34. package/docs/Tools-Testing-Quality.md +251 -0
  35. package/docs/Tools-Utilities.md +176 -0
  36. package/docs/Tools-Visual-Performance.md +272 -0
  37. package/package.json +1 -1
@@ -0,0 +1,299 @@
1
+ # Hunt Bugs
2
+
3
+ **Turn AI loose on your site. See what's broken.**
4
+
5
+ `hunt_bugs` is autonomous exploratory testing. You give it a URL, it crawls your site looking for bugs — broken links, JavaScript errors, accessibility issues, visual glitches, and security problems. No test cases required.
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ ```json
12
+ {
13
+ "url": "https://example.com",
14
+ "scope": "all",
15
+ "depth": 4,
16
+ "maxPages": 50
17
+ }
18
+ ```
19
+
20
+ **What happens**:
21
+ 1. AI starts at your URL and begins exploring
22
+ 2. On each page, it checks for functional, visual, accessibility, and security issues
23
+ 3. It follows links, fills forms, clicks buttons — looking for things that break
24
+ 4. You get a report of everything found, with reproduction steps and screenshots
25
+
26
+ ---
27
+
28
+ ## Parameters
29
+
30
+ | Parameter | Type | Required | Default | Description |
31
+ |-----------|------|----------|---------|-------------|
32
+ | `url` | string | Yes | — | Starting URL |
33
+ | `scope` | string | No | `all` | Bug types: `all`, `functional`, `visual`, `accessibility`, `security` |
34
+ | `depth` | number | No | 3 | How deep to crawl |
35
+ | `maxPages` | number | No | 20 | Maximum pages to visit |
36
+ | `focus` | string | No | — | Focus area (e.g., "forms", "checkout", "navigation") |
37
+ | `exclude` | array | No | — | URL patterns to skip |
38
+
39
+ ---
40
+
41
+ ## What It Finds
42
+
43
+ ### Functional Bugs
44
+
45
+ | Bug Type | How It's Detected |
46
+ |----------|-------------------|
47
+ | Broken links | Links that return 4xx/5xx errors |
48
+ | Dead ends | Pages with no way to navigate away |
49
+ | Form errors | Submissions that fail silently |
50
+ | JavaScript exceptions | Console errors during interaction |
51
+ | Failed network requests | XHR/fetch that error |
52
+ | Infinite loops | Redirect chains, infinite scrolls |
53
+ | Missing content | Empty states, placeholder text |
54
+
55
+ ### Visual Bugs
56
+
57
+ | Bug Type | How It's Detected |
58
+ |----------|-------------------|
59
+ | Overlapping elements | Content that covers other content |
60
+ | Horizontal overflow | Content breaking viewport |
61
+ | Missing images | Broken `src` attributes |
62
+ | Layout breaks | Elements far from expected position |
63
+ | Z-index issues | Content hidden behind other layers |
64
+ | Responsive failures | Elements that break at viewport edges |
65
+
66
+ ### Accessibility Bugs
67
+
68
+ | Bug Type | How It's Detected |
69
+ |----------|-------------------|
70
+ | Missing alt text | Images without descriptions |
71
+ | Low contrast | Text that fails WCAG contrast |
72
+ | Keyboard traps | Can't escape a component with keyboard |
73
+ | Missing labels | Form fields without associated labels |
74
+ | Focus issues | Interactive elements without focus styles |
75
+ | ARIA violations | Invalid ARIA attributes |
76
+
77
+ ### Security Issues
78
+
79
+ | Bug Type | How It's Detected |
80
+ |----------|-------------------|
81
+ | Exposed credentials | Visible API keys, passwords |
82
+ | Insecure forms | HTTP forms on HTTPS pages |
83
+ | Data in URLs | Sensitive info in query strings |
84
+ | Missing HTTPS | Insecure resource loading |
85
+ | Open redirects | Redirects to external domains |
86
+ | Debug endpoints | Exposed dev/debug routes |
87
+
88
+ ---
89
+
90
+ ## Output
91
+
92
+ ```json
93
+ {
94
+ "url": "https://example.com",
95
+ "pagesVisited": 34,
96
+ "timeElapsed": 187,
97
+ "bugs": [
98
+ {
99
+ "severity": "critical",
100
+ "type": "functional",
101
+ "category": "form-error",
102
+ "url": "https://example.com/checkout",
103
+ "description": "Payment form silently fails when CVV is left empty",
104
+ "reproduction": [
105
+ "Navigate to /checkout",
106
+ "Fill all fields except CVV",
107
+ "Click 'Pay Now'",
108
+ "Form shows loading spinner but never completes"
109
+ ],
110
+ "screenshot": "base64...",
111
+ "consoleErrors": [
112
+ "Uncaught TypeError: Cannot read property 'value' of null at payment.js:142"
113
+ ]
114
+ },
115
+ {
116
+ "severity": "serious",
117
+ "type": "accessibility",
118
+ "category": "missing-label",
119
+ "url": "https://example.com/contact",
120
+ "description": "Phone number field has no associated label",
121
+ "wcag": "1.3.1",
122
+ "element": "<input type='tel' name='phone' placeholder='Phone'>",
123
+ "remediation": "Add <label for='phone'>Phone Number</label>"
124
+ },
125
+ {
126
+ "severity": "moderate",
127
+ "type": "visual",
128
+ "category": "overflow",
129
+ "url": "https://example.com/pricing",
130
+ "description": "Pricing table overflows viewport on mobile",
131
+ "viewport": "375x667",
132
+ "screenshot": "base64..."
133
+ },
134
+ {
135
+ "severity": "serious",
136
+ "type": "security",
137
+ "category": "exposed-credentials",
138
+ "url": "https://example.com/config",
139
+ "description": "API key visible in page source",
140
+ "evidence": "const API_KEY = 'sk-...'",
141
+ "recommendation": "Move API key to environment variable"
142
+ }
143
+ ],
144
+ "summary": {
145
+ "critical": 1,
146
+ "serious": 4,
147
+ "moderate": 7,
148
+ "minor": 12,
149
+ "byType": {
150
+ "functional": 6,
151
+ "visual": 8,
152
+ "accessibility": 5,
153
+ "security": 5
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Use Cases
162
+
163
+ ### 1. Pre-Release Smoke Test
164
+
165
+ Before deploying, run a quick bug hunt:
166
+
167
+ ```json
168
+ {
169
+ "url": "https://staging.example.com",
170
+ "scope": "functional",
171
+ "depth": 3,
172
+ "maxPages": 30
173
+ }
174
+ ```
175
+
176
+ Catches obvious breaks before they reach production.
177
+
178
+ ---
179
+
180
+ ### 2. Security Reconnaissance
181
+
182
+ Find exposed secrets and vulnerabilities:
183
+
184
+ ```json
185
+ {
186
+ "url": "https://example.com",
187
+ "scope": "security",
188
+ "depth": 5,
189
+ "maxPages": 100
190
+ }
191
+ ```
192
+
193
+ ---
194
+
195
+ ### 3. Accessibility Sweep
196
+
197
+ Find accessibility issues across the entire site:
198
+
199
+ ```json
200
+ {
201
+ "url": "https://example.com",
202
+ "scope": "accessibility",
203
+ "depth": 5
204
+ }
205
+ ```
206
+
207
+ For deeper analysis of specific issues, follow up with [empathy_audit](/docs/Tool-Empathy-Audit/).
208
+
209
+ ---
210
+
211
+ ### 4. Focused Testing
212
+
213
+ Hunt bugs only in a specific area:
214
+
215
+ ```json
216
+ {
217
+ "url": "https://example.com/checkout",
218
+ "focus": "checkout",
219
+ "exclude": ["/blog/*", "/docs/*"]
220
+ }
221
+ ```
222
+
223
+ ---
224
+
225
+ ## How It Explores
226
+
227
+ 1. **Starts at your URL** and analyzes the page
228
+ 2. **Identifies interactive elements** — links, buttons, forms
229
+ 3. **Executes interactions** — clicks, fills, submits
230
+ 4. **Records everything** — console logs, network, screenshots
231
+ 5. **Follows promising paths** — prioritizes unexplored areas
232
+ 6. **Avoids traps** — detects infinite loops, skips logout/delete
233
+ 7. **Moves to next page** and repeats
234
+
235
+ The AI uses constitutional safety rules to avoid destructive actions — it won't click "Delete Account" or "Cancel Subscription".
236
+
237
+ ---
238
+
239
+ ## CI/CD Integration
240
+
241
+ ```bash
242
+ # Run in CI, fail if critical bugs found
243
+ npx cbrowser hunt-bugs https://staging.example.com \
244
+ --scope all \
245
+ --depth 3 \
246
+ --fail-on critical \
247
+ --output bugs.json
248
+
249
+ # Generate HTML report
250
+ npx cbrowser hunt-bugs https://example.com \
251
+ --output report.html
252
+ ```
253
+
254
+ ---
255
+
256
+ ## Tips
257
+
258
+ ### Start Shallow, Go Deep
259
+
260
+ ```json
261
+ // First run: quick sweep
262
+ { "depth": 2, "maxPages": 20 }
263
+
264
+ // Second run: deep dive on problem areas
265
+ { "url": "https://example.com/checkout", "depth": 5 }
266
+ ```
267
+
268
+ ### Exclude Known Issues
269
+
270
+ ```json
271
+ {
272
+ "exclude": [
273
+ "/legacy/*", // Old pages being deprecated
274
+ "/admin/*" // Requires auth
275
+ ]
276
+ }
277
+ ```
278
+
279
+ ### Focus on What Matters
280
+
281
+ ```json
282
+ // Only care about checkout working?
283
+ { "focus": "checkout", "scope": "functional" }
284
+
285
+ // Preparing for accessibility audit?
286
+ { "scope": "accessibility", "depth": 10 }
287
+ ```
288
+
289
+ ---
290
+
291
+ ## Related Tools
292
+
293
+ - [`nl_test_file`](/docs/Tools-Testing-Quality/) — Run specific test scenarios
294
+ - [`empathy_audit`](/docs/Tool-Empathy-Audit/) — Deep accessibility testing
295
+ - [`competitive_benchmark`](/docs/Tool-Competitive-Benchmark/) — Compare against competitors
296
+
297
+ ---
298
+
299
+ *Last updated: v17.6.0*
@@ -0,0 +1,292 @@
1
+ # Marketing Campaigns
2
+
3
+ **Test which messages work for which audiences — with scientific rigor.**
4
+
5
+ Marketing campaigns in CBrowser let you run structured A/B tests using cognitive personas. Instead of testing at the population level (where results average out), test at the *segment* level — find out that scarcity messaging works for impulse-shoppers but backfires with enterprise-buyers.
6
+
7
+ ---
8
+
9
+ ## Campaign Lifecycle
10
+
11
+ ### 1. Create Campaign
12
+
13
+ Define variants and personas to test.
14
+
15
+ ```json
16
+ {
17
+ "tool": "marketing_campaign_create",
18
+ "params": {
19
+ "name": "Pricing Page Optimization Q1 2026",
20
+ "variants": [
21
+ { "name": "Control", "url": "https://example.com/pricing" },
22
+ { "name": "Social Proof", "url": "https://example.com/pricing-v2" },
23
+ { "name": "Scarcity", "url": "https://example.com/pricing-v3" }
24
+ ],
25
+ "personas": [
26
+ "enterprise-buyer",
27
+ "startup-founder",
28
+ "impulse-shopper",
29
+ "price-researcher"
30
+ ],
31
+ "goal": "Click 'Start Free Trial'",
32
+ "metrics": ["time_to_goal", "friction_count", "abandonment_rate"]
33
+ }
34
+ }
35
+ ```
36
+
37
+ **Returns**: Campaign ID and test matrix (3 variants × 4 personas = 12 test cells)
38
+
39
+ ---
40
+
41
+ ### 2. Run Journeys
42
+
43
+ Run cognitive journeys for each cell in the matrix.
44
+
45
+ **With Enterprise** (automatic):
46
+ ```json
47
+ {
48
+ "tool": "marketing_campaign_run",
49
+ "params": {
50
+ "campaignId": "camp_abc123"
51
+ }
52
+ }
53
+ ```
54
+
55
+ **With Demo** (manual orchestration):
56
+ ```json
57
+ // For each variant × persona combination:
58
+ {
59
+ "tool": "cognitive_journey_init",
60
+ "params": {
61
+ "persona": "enterprise-buyer",
62
+ "startUrl": "https://example.com/pricing",
63
+ "goal": "Click 'Start Free Trial'"
64
+ }
65
+ }
66
+ // ... orchestrate journey ...
67
+
68
+ // Report result back
69
+ {
70
+ "tool": "marketing_campaign_report_result",
71
+ "params": {
72
+ "campaignId": "camp_abc123",
73
+ "variantIndex": 0,
74
+ "persona": "enterprise-buyer",
75
+ "success": false,
76
+ "abandonmentReason": "No security certification visible",
77
+ "friction": ["Couldn't find SOC 2 badge", "Pricing unclear for enterprise"],
78
+ "timeToGoal": null
79
+ }
80
+ }
81
+ ```
82
+
83
+ ---
84
+
85
+ ### 3. Analyze Results 🔒 Enterprise
86
+
87
+ Generate insights from campaign data.
88
+
89
+ ```json
90
+ // Influence effectiveness matrix
91
+ {
92
+ "tool": "marketing_influence_matrix",
93
+ "params": { "campaignId": "camp_abc123" }
94
+ }
95
+
96
+ // Psychological lever analysis
97
+ {
98
+ "tool": "marketing_lever_analysis",
99
+ "params": { "campaignId": "camp_abc123" }
100
+ }
101
+
102
+ // Funnel comparison
103
+ {
104
+ "tool": "marketing_funnel_analyze",
105
+ "params": { "campaignId": "camp_abc123" }
106
+ }
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Campaign Results
112
+
113
+ ### Success Matrix
114
+
115
+ | | Enterprise Buyer | Startup Founder | Impulse Shopper | Price Researcher |
116
+ |---|:---:|:---:|:---:|:---:|
117
+ | **Control** | ❌ | ✅ | ❌ | ❌ |
118
+ | **Social Proof** | ✅ | ✅ | ✅ | ❌ |
119
+ | **Scarcity** | ❌ | ✅ | ✅ | ❌ |
120
+
121
+ ### Influence Matrix 🔒 Enterprise
122
+
123
+ Shows which influence patterns work for which personas:
124
+
125
+ ```json
126
+ {
127
+ "matrix": {
128
+ "enterprise-buyer": {
129
+ "social_proof": { "effectiveness": 0.85, "evidence": "Converted after seeing Fortune 500 logos" },
130
+ "scarcity": { "effectiveness": 0.10, "evidence": "Dismissed 'Limited time' as marketing" },
131
+ "authority": { "effectiveness": 0.90, "evidence": "Sought SOC 2 badge before proceeding" }
132
+ },
133
+ "impulse-shopper": {
134
+ "social_proof": { "effectiveness": 0.75, "evidence": "Clicked after seeing 'Trusted by 10,000+'" },
135
+ "scarcity": { "effectiveness": 0.95, "evidence": "Converted immediately on countdown" },
136
+ "authority": { "effectiveness": 0.30, "evidence": "Didn't notice security badges" }
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ ### Lever Analysis 🔒 Enterprise
143
+
144
+ Deep dive into *why* variants worked:
145
+
146
+ ```json
147
+ {
148
+ "variant": "Social Proof",
149
+ "successRate": 0.75,
150
+ "leverBreakdown": {
151
+ "customer_logos": {
152
+ "impact": "high",
153
+ "evidence": "3 of 4 personas clicked CTAs near logos"
154
+ },
155
+ "testimonial_quotes": {
156
+ "impact": "medium",
157
+ "evidence": "Enterprise buyer read full testimonial before converting"
158
+ },
159
+ "user_count": {
160
+ "impact": "low",
161
+ "evidence": "Price researcher dismissed as vanity metric"
162
+ }
163
+ }
164
+ }
165
+ ```
166
+
167
+ ### Funnel Analysis 🔒 Enterprise
168
+
169
+ Where in the journey did each persona drop off?
170
+
171
+ ```json
172
+ {
173
+ "variant": "Scarcity",
174
+ "persona": "enterprise-buyer",
175
+ "funnel": [
176
+ { "step": "Land on page", "reached": true, "time": 0 },
177
+ { "step": "Scroll to pricing", "reached": true, "time": 12 },
178
+ { "step": "See countdown timer", "reached": true, "time": 15 },
179
+ { "step": "Click 'Start Trial'", "reached": false, "time": null }
180
+ ],
181
+ "dropOffAnalysis": {
182
+ "step": "See countdown timer",
183
+ "innerMonologue": "This seems like a pressure tactic. I need to verify this with my team first.",
184
+ "frictionType": "trust_violation",
185
+ "recommendation": "Remove artificial urgency for enterprise audience"
186
+ }
187
+ }
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Designing Effective Campaigns
193
+
194
+ ### Choose Contrasting Variants
195
+
196
+ Test different *strategies*, not minor copy changes:
197
+
198
+ **Good**:
199
+ - Control (baseline)
200
+ - Social proof emphasis (testimonials, logos)
201
+ - Scarcity emphasis (limited offer, countdown)
202
+ - Authority emphasis (certifications, awards)
203
+
204
+ **Bad**:
205
+ - "Start Free Trial" button
206
+ - "Begin Free Trial" button
207
+ - "Get Started Free" button
208
+
209
+ ### Select Representative Personas
210
+
211
+ Include personas that matter for your business:
212
+
213
+ | Business Type | Key Personas |
214
+ |---------------|--------------|
215
+ | B2B SaaS | enterprise-buyer, startup-founder, technical-evaluator |
216
+ | E-commerce | impulse-shopper, price-researcher, loyal-customer |
217
+ | Consumer app | first-timer, power-user, mobile-user |
218
+ | Accessibility | motor-tremor, low-vision, cognitive-adhd |
219
+
220
+ ### Define Clear Goals
221
+
222
+ Specific, measurable goals:
223
+
224
+ **Good**: "Click 'Start Free Trial' button"
225
+ **Bad**: "Understand the product"
226
+
227
+ ---
228
+
229
+ ## Demo vs Enterprise
230
+
231
+ | Capability | Demo | Enterprise |
232
+ |------------|:----:|:----------:|
233
+ | Create campaigns | ✅ | ✅ |
234
+ | Report journey results | ✅ | ✅ |
235
+ | List marketing personas | ✅ | ✅ |
236
+ | Run campaigns automatically | ❌ | ✅ |
237
+ | Influence matrix | ❌ | ✅ |
238
+ | Lever analysis | ❌ | ✅ |
239
+ | Funnel analysis | ❌ | ✅ |
240
+ | Competitive comparison | ❌ | ✅ |
241
+ | Audience discovery | ❌ | ✅ |
242
+
243
+ **Demo** gives you the testing framework — create campaigns, run journeys manually with Claude orchestrating, report results.
244
+
245
+ **Enterprise** gives you automation and insights — run all journeys automatically, get influence matrices and lever analysis.
246
+
247
+ ---
248
+
249
+ ## Example: Full Campaign
250
+
251
+ ### Setup
252
+
253
+ ```json
254
+ {
255
+ "name": "Homepage CTA Test",
256
+ "variants": [
257
+ { "name": "Control", "url": "https://example.com" },
258
+ { "name": "Social Proof", "url": "https://example.com?v=social" },
259
+ { "name": "Feature Focus", "url": "https://example.com?v=features" }
260
+ ],
261
+ "personas": ["first-timer", "enterprise-buyer", "technical-evaluator"],
262
+ "goal": "Click primary CTA"
263
+ }
264
+ ```
265
+
266
+ ### Results
267
+
268
+ | | First-Timer | Enterprise Buyer | Technical Evaluator |
269
+ |---|:---:|:---:|:---:|
270
+ | Control | ✅ (23s) | ❌ | ❌ |
271
+ | Social Proof | ✅ (18s) | ✅ (45s) | ❌ |
272
+ | Feature Focus | ❌ | ❌ | ✅ (67s) |
273
+
274
+ ### Insights
275
+
276
+ - **First-timers** convert fastest on Social Proof (18s vs 23s control)
277
+ - **Enterprise buyers** need social proof (logos, testimonials) — don't convert without it
278
+ - **Technical evaluators** need feature details — social proof feels like marketing fluff
279
+ - **Recommendation**: Show different hero sections by referral source
280
+
281
+ ---
282
+
283
+ ## Related Documentation
284
+
285
+ - [Marketing Suite](/docs/Marketing-Suite/) — Full marketing capabilities
286
+ - [Marketing Intelligence Tools](/docs/Tools-Marketing-Intelligence/) — All marketing tools
287
+ - [Cognitive Journeys](/docs/Tools-Cognitive-Journeys/) — Journey simulation
288
+ - [Values Framework](/docs/Values-Framework/) — What motivates each persona
289
+
290
+ ---
291
+
292
+ *Last updated: v17.6.0*