cbrowser 7.4.4 → 7.4.7
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.
- package/README.md +84 -2
- package/dist/cli.js +83 -1
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server-remote.d.ts +6 -0
- package/dist/mcp-server-remote.d.ts.map +1 -1
- package/dist/mcp-server-remote.js +231 -29
- package/dist/mcp-server-remote.js.map +1 -1
- package/docs/AUTH0-SETUP.md +201 -0
- package/docs/REMOTE-MCP-SERVER.md +65 -17
- package/examples/remote-mcp.ts +137 -0
- package/examples/smart-automation.ts +5 -2
- package/examples/visual-testing.ts +177 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -203,6 +203,77 @@ npx cbrowser assert "page contains 'Welcome'"
|
|
|
203
203
|
npx cbrowser generate-tests "https://example.com"
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
+
## v7.x Features
|
|
207
|
+
|
|
208
|
+
### AI Visual Regression (v7.0)
|
|
209
|
+
|
|
210
|
+
Semantic screenshot comparison using AI—not just pixel diffs:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Capture a baseline
|
|
214
|
+
npx cbrowser ai-visual capture "https://example.com" --name homepage
|
|
215
|
+
|
|
216
|
+
# Compare against baseline
|
|
217
|
+
npx cbrowser ai-visual test "https://staging.example.com" homepage --html
|
|
218
|
+
|
|
219
|
+
# List baselines
|
|
220
|
+
npx cbrowser ai-visual list
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
The AI understands what changed semantically (button moved, text changed, new section added) rather than flagging every pixel difference.
|
|
224
|
+
|
|
225
|
+
### Cross-Browser Visual Testing (v7.1)
|
|
226
|
+
|
|
227
|
+
Compare rendering across Chrome, Firefox, and Safari:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
npx cbrowser cross-browser "https://example.com" --html
|
|
231
|
+
npx cbrowser cross-browser "https://example.com" --browsers chromium,firefox,webkit
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Responsive Visual Testing (v7.2)
|
|
235
|
+
|
|
236
|
+
Test across viewport sizes (mobile, tablet, desktop):
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npx cbrowser responsive "https://example.com" --html
|
|
240
|
+
npx cbrowser responsive "https://example.com" --viewports mobile,tablet,desktop-lg
|
|
241
|
+
npx cbrowser responsive viewports # list available presets
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### A/B Visual Comparison (v7.3)
|
|
245
|
+
|
|
246
|
+
Compare two different URLs (staging vs production, old vs new design):
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
npx cbrowser ab "https://staging.example.com" "https://example.com" --html
|
|
250
|
+
npx cbrowser ab "https://old.site.com" "https://new.site.com" --label-a "Old" --label-b "New"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Modular Architecture (v7.4.1)
|
|
254
|
+
|
|
255
|
+
Tree-shakeable imports for smaller bundles:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
// Import everything (unchanged)
|
|
259
|
+
import { CBrowser, runVisualRegression, detectFlakyTests } from 'cbrowser';
|
|
260
|
+
|
|
261
|
+
// Import only what you need (modular)
|
|
262
|
+
import { runVisualRegression, runCrossBrowserTest } from 'cbrowser/visual';
|
|
263
|
+
import { runNLTestSuite, detectFlakyTests, repairTest } from 'cbrowser/testing';
|
|
264
|
+
import { huntBugs, runChaosTest, findElementByIntent } from 'cbrowser/analysis';
|
|
265
|
+
import { capturePerformanceBaseline, detectPerformanceRegression } from 'cbrowser/performance';
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
| Module | Purpose |
|
|
269
|
+
|--------|---------|
|
|
270
|
+
| `cbrowser/visual` | Visual testing (regression, cross-browser, responsive, A/B) |
|
|
271
|
+
| `cbrowser/testing` | Test automation (NL suites, repair, flaky detection, coverage) |
|
|
272
|
+
| `cbrowser/analysis` | AI analysis (bug hunting, chaos testing, persona comparison) |
|
|
273
|
+
| `cbrowser/performance` | Performance (baselines, regression detection) |
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
206
277
|
## v6.0.0 Features
|
|
207
278
|
|
|
208
279
|
### Multi-Persona Comparison
|
|
@@ -643,10 +714,19 @@ CBrowser can run as an MCP server for both Claude Desktop (local) and claude.ai
|
|
|
643
714
|
Connect claude.ai directly to a remote CBrowser server:
|
|
644
715
|
|
|
645
716
|
1. Deploy CBrowser on your server ([full guide](docs/REMOTE-MCP-SERVER.md))
|
|
646
|
-
2. In claude.ai: Settings →
|
|
717
|
+
2. In claude.ai: Settings → Connectors → Add Custom Connector
|
|
647
718
|
3. Add URL: `https://your-cbrowser-domain.com/mcp`
|
|
719
|
+
4. Configure OAuth with Auth0 ([setup guide](docs/AUTH0-SETUP.md))
|
|
720
|
+
|
|
721
|
+
**Public Demo (rate-limited):** `https://cbrowser-mcp-demo.wyldfyre.ai/mcp`
|
|
722
|
+
- No authentication required
|
|
723
|
+
- Rate limit: 5 requests/minute, burst of 10
|
|
724
|
+
- For evaluation purposes only
|
|
648
725
|
|
|
649
|
-
**
|
|
726
|
+
**Authenticated Server:** `https://cbrowser-mcp.wyldfyre.ai/mcp`
|
|
727
|
+
- **OAuth 2.1 via Auth0** - For claude.ai web interface ([setup guide](docs/AUTH0-SETUP.md))
|
|
728
|
+
- **API Key** - For Claude Code CLI and programmatic access
|
|
729
|
+
- No rate limits for authenticated users
|
|
650
730
|
|
|
651
731
|
#### Option 2: Local MCP (Claude Desktop)
|
|
652
732
|
|
|
@@ -904,6 +984,8 @@ See the [`examples/`](examples/) directory:
|
|
|
904
984
|
|
|
905
985
|
- `basic-usage.ts` - Navigation, extraction, sessions
|
|
906
986
|
- `smart-automation.ts` - Smart click, assertions, test generation
|
|
987
|
+
- `visual-testing.ts` - AI visual regression, cross-browser, responsive, A/B comparison
|
|
988
|
+
- `remote-mcp.ts` - Remote MCP server, Auth0 OAuth, demo server setup
|
|
907
989
|
- `journeys/checkout-flow.json` - Persona journey definition
|
|
908
990
|
- `personas/custom-persona.json` - Custom persona template
|
|
909
991
|
|
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ const daemon_js_1 = require("./daemon.js");
|
|
|
23
23
|
function showHelp() {
|
|
24
24
|
console.log(`
|
|
25
25
|
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
26
|
-
║ CBrowser CLI v7.4.
|
|
26
|
+
║ CBrowser CLI v7.4.6 ║
|
|
27
27
|
║ AI-powered browser automation with cross-browser visual testing ║
|
|
28
28
|
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
29
29
|
|
|
@@ -430,6 +430,11 @@ MCP SERVER (v5.0.0)
|
|
|
430
430
|
mcp-remote Start remote HTTP MCP server for claude.ai connectors
|
|
431
431
|
--port <port> Port to listen on (default: 3000)
|
|
432
432
|
--host <host> Host to bind to (default: 0.0.0.0)
|
|
433
|
+
|
|
434
|
+
PAI SKILL INSTALLATION (v7.4.6)
|
|
435
|
+
install-skill Install CBrowser as a PAI skill to ~/.claude/skills/
|
|
436
|
+
Downloads skill files from GitHub and creates directory structure
|
|
437
|
+
Add to skill-index.json after installation
|
|
433
438
|
--stateful Use stateful session mode
|
|
434
439
|
|
|
435
440
|
DAEMON MODE (v6.4.0)
|
|
@@ -855,6 +860,83 @@ async function main() {
|
|
|
855
860
|
await (0, mcp_server_remote_js_1.startRemoteMcpServer)();
|
|
856
861
|
return;
|
|
857
862
|
}
|
|
863
|
+
// Install PAI skill
|
|
864
|
+
if (command === "install-skill") {
|
|
865
|
+
const { execSync } = await import("child_process");
|
|
866
|
+
const path = await import("path");
|
|
867
|
+
const fs = await import("fs");
|
|
868
|
+
const os = await import("os");
|
|
869
|
+
const skillDir = path.join(os.homedir(), ".claude", "skills", "CBrowser");
|
|
870
|
+
const repoUrl = "https://raw.githubusercontent.com/alexandriashai/cbrowser/main";
|
|
871
|
+
console.log(`
|
|
872
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
873
|
+
║ CBrowser PAI Skill Installer v7.4.6 ║
|
|
874
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
875
|
+
`);
|
|
876
|
+
// Check if ~/.claude/skills exists
|
|
877
|
+
const skillsDir = path.join(os.homedir(), ".claude", "skills");
|
|
878
|
+
if (!fs.existsSync(skillsDir)) {
|
|
879
|
+
console.log("Creating ~/.claude/skills directory...");
|
|
880
|
+
fs.mkdirSync(skillsDir, { recursive: true });
|
|
881
|
+
}
|
|
882
|
+
// Check if skill exists
|
|
883
|
+
if (fs.existsSync(skillDir)) {
|
|
884
|
+
console.log("CBrowser skill already exists. Updating...");
|
|
885
|
+
fs.rmSync(skillDir, { recursive: true });
|
|
886
|
+
}
|
|
887
|
+
// Create directories
|
|
888
|
+
console.log("Creating skill directory structure...");
|
|
889
|
+
fs.mkdirSync(path.join(skillDir, "Workflows"), { recursive: true });
|
|
890
|
+
fs.mkdirSync(path.join(skillDir, "Tools"), { recursive: true });
|
|
891
|
+
fs.mkdirSync(path.join(skillDir, ".memory", "sessions"), { recursive: true });
|
|
892
|
+
// Download files
|
|
893
|
+
console.log("Downloading skill files...");
|
|
894
|
+
const files = [
|
|
895
|
+
"SKILL.md",
|
|
896
|
+
"Philosophy.md",
|
|
897
|
+
"AIVision.md",
|
|
898
|
+
"SessionManagement.md",
|
|
899
|
+
"Credentials.md",
|
|
900
|
+
"Personas.md",
|
|
901
|
+
"Workflows/Navigate.md",
|
|
902
|
+
"Workflows/Interact.md",
|
|
903
|
+
"Workflows/Extract.md",
|
|
904
|
+
"Workflows/Authenticate.md",
|
|
905
|
+
"Workflows/Test.md",
|
|
906
|
+
"Workflows/Journey.md",
|
|
907
|
+
"Tools/CBrowser.ts",
|
|
908
|
+
];
|
|
909
|
+
for (const file of files) {
|
|
910
|
+
try {
|
|
911
|
+
const url = `${repoUrl}/skill/${file}`;
|
|
912
|
+
const dest = path.join(skillDir, file);
|
|
913
|
+
console.log(` - ${file}`);
|
|
914
|
+
execSync(`curl -fsSL "${url}" -o "${dest}"`, { stdio: "pipe" });
|
|
915
|
+
}
|
|
916
|
+
catch {
|
|
917
|
+
console.log(` Warning: Could not download ${file}`);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
console.log(`
|
|
921
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
922
|
+
║ CBrowser Skill Installed Successfully! ║
|
|
923
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
924
|
+
|
|
925
|
+
Skill installed to: ${skillDir}
|
|
926
|
+
|
|
927
|
+
Next steps:
|
|
928
|
+
1. Add to your skill-index.json:
|
|
929
|
+
"CBrowser": "${skillDir}/SKILL.md"
|
|
930
|
+
|
|
931
|
+
2. Install all Playwright browsers (for cross-browser testing):
|
|
932
|
+
npx playwright install
|
|
933
|
+
|
|
934
|
+
3. Start using CBrowser in Claude Code!
|
|
935
|
+
|
|
936
|
+
Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
937
|
+
`);
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
858
940
|
// Daemon mode commands
|
|
859
941
|
if (command === "daemon") {
|
|
860
942
|
const subCommand = args[0];
|