cbrowser 7.4.0 → 7.4.3

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 (107) hide show
  1. package/README.md +156 -45
  2. package/dist/analysis/bug-hunter.d.ts +0 -0
  3. package/dist/analysis/bug-hunter.d.ts.map +0 -0
  4. package/dist/analysis/bug-hunter.js +0 -0
  5. package/dist/analysis/bug-hunter.js.map +0 -0
  6. package/dist/analysis/chaos-testing.d.ts +0 -0
  7. package/dist/analysis/chaos-testing.d.ts.map +0 -0
  8. package/dist/analysis/chaos-testing.js +0 -0
  9. package/dist/analysis/chaos-testing.js.map +0 -0
  10. package/dist/analysis/index.d.ts +0 -0
  11. package/dist/analysis/index.d.ts.map +0 -0
  12. package/dist/analysis/index.js +0 -0
  13. package/dist/analysis/index.js.map +0 -0
  14. package/dist/analysis/natural-language.d.ts +0 -0
  15. package/dist/analysis/natural-language.d.ts.map +0 -0
  16. package/dist/analysis/natural-language.js +0 -0
  17. package/dist/analysis/natural-language.js.map +0 -0
  18. package/dist/analysis/persona-comparison.d.ts +0 -0
  19. package/dist/analysis/persona-comparison.d.ts.map +0 -0
  20. package/dist/analysis/persona-comparison.js +0 -0
  21. package/dist/analysis/persona-comparison.js.map +0 -0
  22. package/dist/browser.d.ts +0 -0
  23. package/dist/browser.d.ts.map +0 -0
  24. package/dist/browser.js +0 -0
  25. package/dist/browser.js.map +0 -0
  26. package/dist/cli.d.ts +0 -0
  27. package/dist/cli.d.ts.map +0 -0
  28. package/dist/cli.js +17 -1
  29. package/dist/cli.js.map +1 -1
  30. package/dist/config.d.ts +0 -0
  31. package/dist/config.d.ts.map +0 -0
  32. package/dist/config.js +0 -0
  33. package/dist/config.js.map +0 -0
  34. package/dist/daemon.d.ts +0 -0
  35. package/dist/daemon.d.ts.map +0 -0
  36. package/dist/daemon.js +0 -0
  37. package/dist/daemon.js.map +0 -0
  38. package/dist/index.d.ts +0 -0
  39. package/dist/index.d.ts.map +0 -0
  40. package/dist/index.js +0 -0
  41. package/dist/index.js.map +0 -0
  42. package/dist/mcp-server-remote.d.ts +21 -0
  43. package/dist/mcp-server-remote.d.ts.map +1 -0
  44. package/dist/mcp-server-remote.js +821 -0
  45. package/dist/mcp-server-remote.js.map +1 -0
  46. package/dist/mcp-server.d.ts +0 -0
  47. package/dist/mcp-server.d.ts.map +1 -1
  48. package/dist/mcp-server.js +406 -1
  49. package/dist/mcp-server.js.map +1 -1
  50. package/dist/performance/index.d.ts +0 -0
  51. package/dist/performance/index.d.ts.map +0 -0
  52. package/dist/performance/index.js +0 -0
  53. package/dist/performance/index.js.map +0 -0
  54. package/dist/performance/metrics.d.ts +0 -0
  55. package/dist/performance/metrics.d.ts.map +0 -0
  56. package/dist/performance/metrics.js +0 -0
  57. package/dist/performance/metrics.js.map +0 -0
  58. package/dist/personas.d.ts +0 -0
  59. package/dist/personas.d.ts.map +0 -0
  60. package/dist/personas.js +0 -0
  61. package/dist/personas.js.map +0 -0
  62. package/dist/testing/coverage.d.ts +0 -0
  63. package/dist/testing/coverage.d.ts.map +0 -0
  64. package/dist/testing/coverage.js +0 -0
  65. package/dist/testing/coverage.js.map +0 -0
  66. package/dist/testing/flaky-detection.d.ts +0 -0
  67. package/dist/testing/flaky-detection.d.ts.map +0 -0
  68. package/dist/testing/flaky-detection.js +0 -0
  69. package/dist/testing/flaky-detection.js.map +0 -0
  70. package/dist/testing/index.d.ts +0 -0
  71. package/dist/testing/index.d.ts.map +0 -0
  72. package/dist/testing/index.js +0 -0
  73. package/dist/testing/index.js.map +0 -0
  74. package/dist/testing/nl-test-suite.d.ts +0 -0
  75. package/dist/testing/nl-test-suite.d.ts.map +0 -0
  76. package/dist/testing/nl-test-suite.js +0 -0
  77. package/dist/testing/nl-test-suite.js.map +0 -0
  78. package/dist/testing/test-repair.d.ts +0 -0
  79. package/dist/testing/test-repair.d.ts.map +0 -0
  80. package/dist/testing/test-repair.js +0 -0
  81. package/dist/testing/test-repair.js.map +0 -0
  82. package/dist/types.d.ts +0 -0
  83. package/dist/types.d.ts.map +0 -0
  84. package/dist/types.js +0 -0
  85. package/dist/types.js.map +0 -0
  86. package/dist/visual/ab-comparison.d.ts +0 -0
  87. package/dist/visual/ab-comparison.d.ts.map +1 -1
  88. package/dist/visual/ab-comparison.js +3 -2
  89. package/dist/visual/ab-comparison.js.map +1 -1
  90. package/dist/visual/cross-browser.d.ts +0 -0
  91. package/dist/visual/cross-browser.d.ts.map +1 -1
  92. package/dist/visual/cross-browser.js +2 -1
  93. package/dist/visual/cross-browser.js.map +1 -1
  94. package/dist/visual/index.d.ts +0 -0
  95. package/dist/visual/index.d.ts.map +0 -0
  96. package/dist/visual/index.js +0 -0
  97. package/dist/visual/index.js.map +0 -0
  98. package/dist/visual/regression.d.ts +0 -0
  99. package/dist/visual/regression.d.ts.map +1 -1
  100. package/dist/visual/regression.js +2 -1
  101. package/dist/visual/regression.js.map +1 -1
  102. package/dist/visual/responsive.d.ts +0 -0
  103. package/dist/visual/responsive.d.ts.map +1 -1
  104. package/dist/visual/responsive.js +3 -2
  105. package/dist/visual/responsive.js.map +1 -1
  106. package/docs/REMOTE-MCP-SERVER.md +484 -0
  107. package/package.json +6 -1
package/README.md CHANGED
@@ -1,66 +1,159 @@
1
1
  # CBrowser
2
2
 
3
- **The only browser automation that asks: "Can a real user complete this safely?"**
3
+ **The browser automation built for AI agents, not human developers.**
4
4
 
5
- Most AI automation tools ask if a task *can* be completed. CBrowser asks if an **elderly first-timer on mobile** can complete itand whether the automation should even be allowed to try.
5
+ Most browser automation tools are built for humans writing scripts. CBrowser is built from the ground up as an MCP server for AI agentsnatural language is the primary interface, not an afterthought.
6
6
 
7
7
  [![npm version](https://badge.fury.io/js/cbrowser.svg)](https://www.npmjs.com/package/cbrowser)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![MCP Ready](https://img.shields.io/badge/MCP-Remote%20%2B%20Local-blue)](https://modelcontextprotocol.io)
9
10
 
10
- ## Why CBrowser Exists
11
+ ## The AI-Native Difference
11
12
 
12
- Every AI browser tool now has self-healing selectors and natural language commands. That's table stakes.
13
+ Traditional automation tools were built for developers writing scripts. CBrowser was built for **AI agents operating autonomously**. This fundamental difference shapes everything:
13
14
 
14
- **CBrowser solves three problems no one else does:**
15
+ | Traditional Tools | CBrowser (AI-Native) |
16
+ |-------------------|----------------------|
17
+ | Scripts written by humans | Natural language as primary interface |
18
+ | Stateless between calls | **Session persistence across calls** |
19
+ | Manual test maintenance | **Self-healing selectors + AI test repair** |
20
+ | Only does what you script | **Autonomous discovery (hunt_bugs)** |
21
+ | Breaks when sites change | **Multi-dimensional baselines track drift** |
22
+ | Single execution path | **Persona-based testing for real users** |
23
+ | Fails silently | **Built-in chaos engineering for resilience** |
24
+ | Developer perspective | **Constitutional safety for AI autonomy** |
15
25
 
16
- ### 1. Constitutional AI Safety (No One Else Has This)
26
+ ---
17
27
 
18
- Other tools will happily click "Delete All Data" or "Transfer $10,000" if you ask. CBrowser classifies every action by risk:
28
+ ## 8 Things Only CBrowser Does
19
29
 
20
- | Zone | Actions | Behavior |
21
- |------|---------|----------|
22
- | 🟢 **Green** | Navigate, read, screenshot | Auto-execute |
23
- | 🟡 **Yellow** | Click buttons, fill forms | Log and proceed |
24
- | 🔴 **Red** | Submit, delete, purchase | **Requires verification** |
25
- | ⬛ **Black** | Bypass auth, inject scripts | **Never executes** |
30
+ ### 1. 🤖 AI-Native Architecture
31
+
32
+ Built from the ground up as an MCP server for AI agents. Every tool is designed to be called by Claude, not scripted by developers. Natural language is the primary interface—not a wrapper around CSS selectors.
26
33
 
27
- This isn't just guardrails—it's the only AI browser automation with built-in ethical boundaries.
34
+ ```bash
35
+ # Remote MCP for Claude.ai
36
+ https://cbrowser-mcp.wyldfyre.ai/mcp
37
+
38
+ # Local MCP for Claude Desktop
39
+ npx cbrowser mcp-server
40
+ ```
28
41
 
29
- ### 2. User Perspective Testing (Not Just "Does It Work?")
42
+ ### 2. 💬 Natural Language as First-Class Input
30
43
 
31
- Other tools test if buttons click. CBrowser tests if **real humans** can use your site:
44
+ Not just "convenience" natural language on top of selectors. The entire API is natural language native:
45
+
46
+ ```bash
47
+ npx cbrowser smart-click "the blue submit button in the checkout form"
48
+ npx cbrowser fill "email field" "user@example.com"
49
+ npx cbrowser assert "page shows order confirmation with total over $50"
50
+ ```
51
+
52
+ ### 3. 🔍 Autonomous Discovery (hunt_bugs)
53
+
54
+ Most tools wait for you to tell them what to test. CBrowser proactively hunts for bugs:
55
+
56
+ ```bash
57
+ npx cbrowser hunt-bugs "https://your-site.com" --depth 3
58
+ ```
59
+
60
+ It explores your site autonomously, finding broken links, console errors, accessibility violations, and UX issues you didn't know to look for.
61
+
62
+ ### 4. 💥 Built-in Chaos Engineering
63
+
64
+ Inject failures to see how your site handles them:
65
+
66
+ ```bash
67
+ npx cbrowser chaos-test "https://your-site.com" \
68
+ --inject network-slowdown,random-timeouts,failed-assets
69
+ ```
70
+
71
+ ### 5. 🔄 Self-Healing Selectors + AI Test Repair
72
+
73
+ When elements change, CBrowser adapts automatically. When tests break, it repairs them:
74
+
75
+ ```bash
76
+ # Auto-repair broken tests
77
+ npx cbrowser repair-tests broken-test.txt --auto-apply --verify
78
+ ```
79
+
80
+ ### 6. 📊 Multi-Dimensional Baselines
81
+
82
+ Not just visual diffs—CBrowser tracks visual appearance AND performance metrics together:
83
+
84
+ ```bash
85
+ npx cbrowser visual-baseline "https://your-site.com" --with-performance
86
+ npx cbrowser visual-compare --check-perf-regression
87
+ ```
88
+
89
+ ### 7. 👥 Persona-Based Testing
90
+
91
+ Test as different user types with realistic human behavior:
32
92
 
33
93
  ```bash
34
94
  npx cbrowser compare-personas \
35
95
  --start "https://your-site.com" \
36
96
  --goal "Complete checkout" \
37
- --personas power-user,elderly-user,mobile-user
97
+ --personas power-user,elderly-user,mobile-user,first-timer
38
98
  ```
39
99
 
40
- Each persona has realistic human behavior: reaction times, typo rates, mouse jitter, attention patterns. You'll discover that your checkout works fine for developers but fails for 40% of real users.
100
+ Each persona has realistic timing, error rates, and attention patterns.
101
+
102
+ ### 8. 🗂️ Session Persistence Across Calls
103
+
104
+ The killer feature for AI agents: state persists between invocations. Your AI agent can log in, do work across multiple calls, and maintain context—solving the statelessness problem that makes other tools impractical for agents.
105
+
106
+ ```bash
107
+ npx cbrowser session save "logged-in"
108
+ # ... later, in a new session ...
109
+ npx cbrowser session load "logged-in"
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Constitutional AI Safety
41
115
 
42
- ### 3. Claude-Native MCP Integration
116
+ CBrowser is the only browser automation with built-in ethical boundaries—critical when AI agents operate autonomously:
43
117
 
44
- Built for the Claude ecosystem. Add to Claude Desktop and get browser automation as a native capability—no API keys, no external services, no vendor lock-in.
118
+ | Zone | Actions | Behavior |
119
+ |------|---------|----------|
120
+ | 🟢 **Green** | Navigate, read, screenshot | Auto-execute |
121
+ | 🟡 **Yellow** | Click buttons, fill forms | Log and proceed |
122
+ | 🔴 **Red** | Submit, delete, purchase | **Requires verification** |
123
+ | ⬛ **Black** | Bypass auth, inject scripts | **Never executes** |
124
+
125
+ This isn't optional safety theater—it's how you give AI agents browser access without risking catastrophic actions.
45
126
 
46
127
  ---
47
128
 
48
129
  ## Feature Comparison
49
130
 
50
- | Feature | CBrowser | Skyvern | Browser-Use | Testim |
51
- |---------|:--------:|:-------:|:-----------:|:------:|
52
- | Self-healing selectors | | | | |
53
- | Natural language | ✅ | ✅ | ✅ | ⚠️ |
54
- | **Constitutional safety zones** | ✅ | ❌ | ❌ | ❌ |
55
- | **Multi-persona comparison** | ✅ | ❌ | ❌ | ❌ |
56
- | **Human behavior simulation** | ✅ | ❌ | ❌ | |
57
- | **Claude MCP server** | ✅ | ❌ | ❌ | ❌ |
58
- | Flaky test detection | ✅ | ❌ | ❌ | |
59
- | AI test repair | ✅ | ❌ | ❌ | ⚠️ |
131
+ ### AI-Native Capabilities (Only CBrowser)
132
+
133
+ | Capability | CBrowser | Skyvern | Browser-Use | Playwright |
134
+ |------------|:--------:|:-------:|:-----------:|:----------:|
135
+ | **Built as MCP Server** | ✅ Native | ❌ | ❌ | ❌ |
136
+ | **Remote MCP (claude.ai)** | ✅ | ❌ | ❌ | ❌ |
137
+ | **Session persistence** | ✅ | ❌ | ❌ | Manual |
138
+ | **Autonomous bug hunting** | ✅ | ❌ | ❌ | ❌ |
139
+ | **Chaos engineering** | ✅ | ❌ | ❌ | |
140
+ | **Constitutional safety** | ✅ | ❌ | ❌ | |
141
+ | **Multi-persona testing** | ✅ | ❌ | ❌ | ❌ |
142
+ | **AI test repair** | ✅ | ❌ | ❌ | ❌ |
143
+ | **Visual + perf baselines** | ✅ | ❌ | ❌ | ❌ |
144
+
145
+ ### Table Stakes (Everyone Has)
146
+
147
+ | Feature | CBrowser | Others |
148
+ |---------|:--------:|:------:|
149
+ | Natural language selectors | ✅ | ✅ |
150
+ | Self-healing selectors | ✅ | ✅ |
151
+ | Screenshot capture | ✅ | ✅ |
152
+ | Form filling | ✅ | ✅ |
60
153
 
61
154
  ---
62
155
 
63
- ## Also Included (Table Stakes)
156
+ ## Also Included
64
157
 
65
158
  | Traditional Automation | CBrowser |
66
159
  |------------------------|----------|
@@ -69,7 +162,7 @@ Built for the Claude ecosystem. Add to Claude Desktop and get browser automation
69
162
  | Crashes on element not found | **Smart retry** finds alternatives |
70
163
  | Manual test assertions | **Natural language assertions** |
71
164
  | Scripted tests only | **AI test generation** from page analysis |
72
- | Stateless between runs | Persistent sessions, cookies, localStorage |
165
+ | Stateless between runs | **Persistent sessions, cookies, localStorage** |
73
166
 
74
167
  ## Quick Start
75
168
 
@@ -539,9 +632,23 @@ Output:
539
632
  Has Navigation: ✅
540
633
  ```
541
634
 
542
- ### MCP Server Mode
635
+ ### MCP Server Integration
636
+
637
+ CBrowser can run as an MCP server for both Claude Desktop (local) and claude.ai (remote).
543
638
 
544
- Run CBrowser as an MCP server for Claude Desktop integration:
639
+ #### Option 1: Remote MCP (claude.ai)
640
+
641
+ Connect claude.ai directly to a remote CBrowser server:
642
+
643
+ 1. Deploy CBrowser on your server ([full guide](docs/REMOTE-MCP-SERVER.md))
644
+ 2. In claude.ai: Settings → Integrations → Custom MCP Servers
645
+ 3. Add URL: `https://your-cbrowser-domain.com/mcp`
646
+
647
+ **Try our public demo:** `https://cbrowser-mcp.wyldfyre.ai/mcp`
648
+
649
+ #### Option 2: Local MCP (Claude Desktop)
650
+
651
+ Run CBrowser locally for Claude Desktop:
545
652
 
546
653
  ```bash
547
654
  npx cbrowser mcp-server
@@ -560,17 +667,21 @@ Add to Claude Desktop config (`~/.config/claude-desktop/config.json`):
560
667
  }
561
668
  ```
562
669
 
563
- **Available MCP Tools:**
564
- - `navigate` - Navigate to URL and screenshot
565
- - `click` / `smart_click` - Click elements
566
- - `fill` - Fill form fields
567
- - `screenshot` - Capture page
568
- - `extract` - Extract page data
569
- - `assert` - Natural language assertions
570
- - `analyze_page` - Analyze page structure
571
- - `generate_tests` - Generate test scenarios
572
- - `save_session` / `load_session` - Session management
573
- - `heal_stats` - Self-healing cache stats
670
+ #### Available MCP Tools (31 total)
671
+
672
+ | Category | Tools |
673
+ |----------|-------|
674
+ | **Navigation** | `navigate`, `screenshot`, `extract` |
675
+ | **Interaction** | `click`, `smart_click`, `fill`, `scroll`, `press_key` |
676
+ | **Assertions** | `assert`, `analyze_page` |
677
+ | **Testing** | `generate_tests`, `test_suite`, `repair_tests`, `flaky_check` |
678
+ | **Visual** | `visual_baseline`, `visual_compare`, `responsive_test`, `cross_browser_test`, `ab_compare` |
679
+ | **Personas** | `journey`, `compare_personas`, `create_persona`, `list_personas` |
680
+ | **Sessions** | `save_session`, `load_session`, `list_sessions` |
681
+ | **Analysis** | `hunt_bugs`, `chaos_test`, `performance_audit` |
682
+ | **Utilities** | `heal_stats`, `list_baselines` |
683
+
684
+ See [Remote MCP Server Guide](docs/REMOTE-MCP-SERVER.md) for full deployment instructions.
574
685
 
575
686
  ## Core Features
576
687
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/browser.d.ts CHANGED
File without changes
File without changes
package/dist/browser.js CHANGED
File without changes
File without changes
package/dist/cli.d.ts CHANGED
File without changes
package/dist/cli.d.ts.map CHANGED
File without changes
package/dist/cli.js CHANGED
@@ -18,11 +18,12 @@ const index_js_4 = require("./visual/index.js");
18
18
  const personas_js_1 = require("./personas.js");
19
19
  const types_js_1 = require("./types.js");
20
20
  const mcp_server_js_1 = require("./mcp-server.js");
21
+ const mcp_server_remote_js_1 = require("./mcp-server-remote.js");
21
22
  const daemon_js_1 = require("./daemon.js");
22
23
  function showHelp() {
23
24
  console.log(`
24
25
  ╔══════════════════════════════════════════════════════════════════════════════╗
25
- ║ CBrowser CLI v7.4.0
26
+ ║ CBrowser CLI v7.4.2
26
27
  ║ AI-powered browser automation with cross-browser visual testing ║
27
28
  ╚══════════════════════════════════════════════════════════════════════════════╝
28
29
 
@@ -426,6 +427,10 @@ AI TEST GENERATION (v5.0.0)
426
427
  MCP SERVER (v5.0.0)
427
428
  mcp-server Start CBrowser as MCP server for Claude integration
428
429
  Use with Claude Desktop or other MCP-compatible clients
430
+ mcp-remote Start remote HTTP MCP server for claude.ai connectors
431
+ --port <port> Port to listen on (default: 3000)
432
+ --host <host> Host to bind to (default: 0.0.0.0)
433
+ --stateful Use stateful session mode
429
434
 
430
435
  DAEMON MODE (v6.4.0)
431
436
  daemon start Start background daemon (keeps browser running)
@@ -839,6 +844,17 @@ async function main() {
839
844
  await (0, mcp_server_js_1.startMcpServer)();
840
845
  return;
841
846
  }
847
+ // Remote MCP Server mode - HTTP server for claude.ai connectors
848
+ if (command === "mcp-remote") {
849
+ if (options.port)
850
+ process.env.PORT = String(options.port);
851
+ if (options.host)
852
+ process.env.HOST = String(options.host);
853
+ if (options.stateful)
854
+ process.env.MCP_SESSION_MODE = "stateful";
855
+ await (0, mcp_server_remote_js_1.startRemoteMcpServer)();
856
+ return;
857
+ }
842
858
  // Daemon mode commands
843
859
  if (command === "daemon") {
844
860
  const subCommand = args[0];