cbrowser 7.4.1 → 7.4.4

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 +159 -46
  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 +23 -0
  43. package/dist/mcp-server-remote.d.ts.map +1 -0
  44. package/dist/mcp-server-remote.js +890 -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 +0 -0
  48. package/dist/mcp-server.js +1 -1
  49. package/dist/mcp-server.js.map +0 -0
  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 +520 -0
  107. package/package.json +6 -1
package/README.md CHANGED
@@ -1,66 +1,161 @@
1
- # CBrowser
1
+ # CBrowser (Cognitive Browser)
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
+ *CBrowser = Cognitive Browserbrowser automation that thinks.*
6
+
7
+ Most browser automation tools are built for humans writing scripts. CBrowser is built from the ground up as an MCP server for AI agents—natural language is the primary interface, not an afterthought.
6
8
 
7
9
  [![npm version](https://badge.fury.io/js/cbrowser.svg)](https://www.npmjs.com/package/cbrowser)
8
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+ [![MCP Ready](https://img.shields.io/badge/MCP-Remote%20%2B%20Local-blue)](https://modelcontextprotocol.io)
9
12
 
10
- ## Why CBrowser Exists
13
+ ## The AI-Native Difference
11
14
 
12
- Every AI browser tool now has self-healing selectors and natural language commands. That's table stakes.
15
+ Traditional automation tools were built for developers writing scripts. CBrowser was built for **AI agents operating autonomously**. This fundamental difference shapes everything:
13
16
 
14
- **CBrowser solves three problems no one else does:**
17
+ | Traditional Tools | CBrowser (AI-Native) |
18
+ |-------------------|----------------------|
19
+ | Scripts written by humans | Natural language as primary interface |
20
+ | Stateless between calls | **Session persistence across calls** |
21
+ | Manual test maintenance | **Self-healing selectors + AI test repair** |
22
+ | Only does what you script | **Autonomous discovery (hunt_bugs)** |
23
+ | Breaks when sites change | **Multi-dimensional baselines track drift** |
24
+ | Single execution path | **Persona-based testing for real users** |
25
+ | Fails silently | **Built-in chaos engineering for resilience** |
26
+ | Developer perspective | **Constitutional safety for AI autonomy** |
15
27
 
16
- ### 1. Constitutional AI Safety (No One Else Has This)
28
+ ---
17
29
 
18
- Other tools will happily click "Delete All Data" or "Transfer $10,000" if you ask. CBrowser classifies every action by risk:
30
+ ## 8 Things Only CBrowser Does
19
31
 
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** |
32
+ ### 1. 🤖 AI-Native Architecture
33
+
34
+ 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.
35
+
36
+ ```bash
37
+ # Remote MCP for Claude.ai
38
+ https://cbrowser-mcp.wyldfyre.ai/mcp
39
+
40
+ # Local MCP for Claude Desktop
41
+ npx cbrowser mcp-server
42
+ ```
43
+
44
+ ### 2. 💬 Natural Language as First-Class Input
45
+
46
+ Not just "convenience" natural language on top of selectors. The entire API is natural language native:
47
+
48
+ ```bash
49
+ npx cbrowser smart-click "the blue submit button in the checkout form"
50
+ npx cbrowser fill "email field" "user@example.com"
51
+ npx cbrowser assert "page shows order confirmation with total over $50"
52
+ ```
53
+
54
+ ### 3. 🔍 Autonomous Discovery (hunt_bugs)
55
+
56
+ Most tools wait for you to tell them what to test. CBrowser proactively hunts for bugs:
57
+
58
+ ```bash
59
+ npx cbrowser hunt-bugs "https://your-site.com" --depth 3
60
+ ```
61
+
62
+ It explores your site autonomously, finding broken links, console errors, accessibility violations, and UX issues you didn't know to look for.
63
+
64
+ ### 4. 💥 Built-in Chaos Engineering
65
+
66
+ Inject failures to see how your site handles them:
67
+
68
+ ```bash
69
+ npx cbrowser chaos-test "https://your-site.com" \
70
+ --inject network-slowdown,random-timeouts,failed-assets
71
+ ```
72
+
73
+ ### 5. 🔄 Self-Healing Selectors + AI Test Repair
26
74
 
27
- This isn't just guardrails—it's the only AI browser automation with built-in ethical boundaries.
75
+ When elements change, CBrowser adapts automatically. When tests break, it repairs them:
28
76
 
29
- ### 2. User Perspective Testing (Not Just "Does It Work?")
77
+ ```bash
78
+ # Auto-repair broken tests
79
+ npx cbrowser repair-tests broken-test.txt --auto-apply --verify
80
+ ```
81
+
82
+ ### 6. 📊 Multi-Dimensional Baselines
83
+
84
+ Not just visual diffs—CBrowser tracks visual appearance AND performance metrics together:
85
+
86
+ ```bash
87
+ npx cbrowser visual-baseline "https://your-site.com" --with-performance
88
+ npx cbrowser visual-compare --check-perf-regression
89
+ ```
90
+
91
+ ### 7. 👥 Persona-Based Testing
30
92
 
31
- Other tools test if buttons click. CBrowser tests if **real humans** can use your site:
93
+ Test as different user types with realistic human behavior:
32
94
 
33
95
  ```bash
34
96
  npx cbrowser compare-personas \
35
97
  --start "https://your-site.com" \
36
98
  --goal "Complete checkout" \
37
- --personas power-user,elderly-user,mobile-user
99
+ --personas power-user,elderly-user,mobile-user,first-timer
38
100
  ```
39
101
 
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.
102
+ Each persona has realistic timing, error rates, and attention patterns.
41
103
 
42
- ### 3. Claude-Native MCP Integration
104
+ ### 8. 🗂️ Session Persistence Across Calls
43
105
 
44
- Built for the Claude ecosystem. Add to Claude Desktop and get browser automation as a native capabilityno API keys, no external services, no vendor lock-in.
106
+ The killer feature for AI agents: state persists between invocations. Your AI agent can log in, do work across multiple calls, and maintain contextsolving the statelessness problem that makes other tools impractical for agents.
107
+
108
+ ```bash
109
+ npx cbrowser session save "logged-in"
110
+ # ... later, in a new session ...
111
+ npx cbrowser session load "logged-in"
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Constitutional AI Safety
117
+
118
+ CBrowser is the only browser automation with built-in ethical boundaries—critical when AI agents operate autonomously:
119
+
120
+ | Zone | Actions | Behavior |
121
+ |------|---------|----------|
122
+ | 🟢 **Green** | Navigate, read, screenshot | Auto-execute |
123
+ | 🟡 **Yellow** | Click buttons, fill forms | Log and proceed |
124
+ | 🔴 **Red** | Submit, delete, purchase | **Requires verification** |
125
+ | ⬛ **Black** | Bypass auth, inject scripts | **Never executes** |
126
+
127
+ This isn't optional safety theater—it's how you give AI agents browser access without risking catastrophic actions.
45
128
 
46
129
  ---
47
130
 
48
131
  ## Feature Comparison
49
132
 
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 | ✅ | ❌ | ❌ | ⚠️ |
133
+ ### AI-Native Capabilities (Only CBrowser)
134
+
135
+ | Capability | CBrowser | Skyvern | Browser-Use | Playwright |
136
+ |------------|:--------:|:-------:|:-----------:|:----------:|
137
+ | **Built as MCP Server** | ✅ Native | ❌ | ❌ | ❌ |
138
+ | **Remote MCP (claude.ai)** | ✅ | ❌ | ❌ | ❌ |
139
+ | **Session persistence** | ✅ | ❌ | ❌ | Manual |
140
+ | **Autonomous bug hunting** | ✅ | ❌ | ❌ | ❌ |
141
+ | **Chaos engineering** | ✅ | ❌ | ❌ | |
142
+ | **Constitutional safety** | ✅ | ❌ | ❌ | |
143
+ | **Multi-persona testing** | ✅ | ❌ | ❌ | ❌ |
144
+ | **AI test repair** | ✅ | ❌ | ❌ | ❌ |
145
+ | **Visual + perf baselines** | ✅ | ❌ | ❌ | ❌ |
146
+
147
+ ### Table Stakes (Everyone Has)
148
+
149
+ | Feature | CBrowser | Others |
150
+ |---------|:--------:|:------:|
151
+ | Natural language selectors | ✅ | ✅ |
152
+ | Self-healing selectors | ✅ | ✅ |
153
+ | Screenshot capture | ✅ | ✅ |
154
+ | Form filling | ✅ | ✅ |
60
155
 
61
156
  ---
62
157
 
63
- ## Also Included (Table Stakes)
158
+ ## Also Included
64
159
 
65
160
  | Traditional Automation | CBrowser |
66
161
  |------------------------|----------|
@@ -69,7 +164,7 @@ Built for the Claude ecosystem. Add to Claude Desktop and get browser automation
69
164
  | Crashes on element not found | **Smart retry** finds alternatives |
70
165
  | Manual test assertions | **Natural language assertions** |
71
166
  | Scripted tests only | **AI test generation** from page analysis |
72
- | Stateless between runs | Persistent sessions, cookies, localStorage |
167
+ | Stateless between runs | **Persistent sessions, cookies, localStorage** |
73
168
 
74
169
  ## Quick Start
75
170
 
@@ -539,9 +634,23 @@ Output:
539
634
  Has Navigation: ✅
540
635
  ```
541
636
 
542
- ### MCP Server Mode
637
+ ### MCP Server Integration
638
+
639
+ CBrowser can run as an MCP server for both Claude Desktop (local) and claude.ai (remote).
543
640
 
544
- Run CBrowser as an MCP server for Claude Desktop integration:
641
+ #### Option 1: Remote MCP (claude.ai)
642
+
643
+ Connect claude.ai directly to a remote CBrowser server:
644
+
645
+ 1. Deploy CBrowser on your server ([full guide](docs/REMOTE-MCP-SERVER.md))
646
+ 2. In claude.ai: Settings → Integrations → Custom MCP Servers
647
+ 3. Add URL: `https://your-cbrowser-domain.com/mcp`
648
+
649
+ **Try our public demo:** `https://cbrowser-mcp.wyldfyre.ai/mcp`
650
+
651
+ #### Option 2: Local MCP (Claude Desktop)
652
+
653
+ Run CBrowser locally for Claude Desktop:
545
654
 
546
655
  ```bash
547
656
  npx cbrowser mcp-server
@@ -560,17 +669,21 @@ Add to Claude Desktop config (`~/.config/claude-desktop/config.json`):
560
669
  }
561
670
  ```
562
671
 
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
672
+ #### Available MCP Tools (31 total)
673
+
674
+ | Category | Tools |
675
+ |----------|-------|
676
+ | **Navigation** | `navigate`, `screenshot`, `extract` |
677
+ | **Interaction** | `click`, `smart_click`, `fill`, `scroll`, `press_key` |
678
+ | **Assertions** | `assert`, `analyze_page` |
679
+ | **Testing** | `generate_tests`, `test_suite`, `repair_tests`, `flaky_check` |
680
+ | **Visual** | `visual_baseline`, `visual_compare`, `responsive_test`, `cross_browser_test`, `ab_compare` |
681
+ | **Personas** | `journey`, `compare_personas`, `create_persona`, `list_personas` |
682
+ | **Sessions** | `save_session`, `load_session`, `list_sessions` |
683
+ | **Analysis** | `hunt_bugs`, `chaos_test`, `performance_audit` |
684
+ | **Utilities** | `heal_stats`, `list_baselines` |
685
+
686
+ See [Remote MCP Server Guide](docs/REMOTE-MCP-SERVER.md) for full deployment instructions.
574
687
 
575
688
  ## Core Features
576
689
 
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];