cbrowser 9.3.1 → 9.4.1

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 CHANGED
@@ -5,8 +5,47 @@
5
5
  Built on Playwright with cognitive user simulation, constitutional safety boundaries, and the only UX testing that models how humans actually think.
6
6
 
7
7
  [![npm version](https://badge.fury.io/js/cbrowser.svg)](https://www.npmjs.com/package/cbrowser)
8
+ [![Tests](https://github.com/alexandriashai/cbrowser/actions/workflows/test.yml/badge.svg)](https://github.com/alexandriashai/cbrowser/actions/workflows/test.yml)
8
9
  [![License: BSL-1.1](https://img.shields.io/badge/License-BSL--1.1-blue.svg)](LICENSE)
9
10
  [![MCP Ready](https://img.shields.io/badge/MCP-Remote%20%2B%20Local-blue)](https://modelcontextprotocol.io)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
12
+ [![Node](https://img.shields.io/badge/Node-%3E%3D18-green.svg)](https://nodejs.org/)
13
+
14
+ ---
15
+
16
+ ## The Story Behind CBrowser
17
+
18
+ I spent 16 years in international higher education marketing and UX, where I learned that the biggest accessibility and usability problems are the ones you can't see coming. A button that works perfectly for me might be invisible to a first-generation student in rural Indonesia using a slow connection on a small screen.
19
+
20
+ Traditional testing tools couldn't help—they tested whether buttons clicked, not whether real humans could use them.
21
+
22
+ Then came the AI agent revolution. I watched autonomous agents navigate websites, and I saw two problems:
23
+
24
+ 1. **They broke things.** Agents would accidentally submit forms, delete data, or get stuck in infinite loops. There were no guardrails.
25
+
26
+ 2. **They exposed how shallow our testing was.** If an AI couldn't figure out a UI, what chance did a confused first-timer have?
27
+
28
+ I realized: **The industry needs tools that think like users, not like developers.** Tools that model patience, frustration, and the moment someone gives up. Tools that prevent autonomous agents from causing harm.
29
+
30
+ So I built CBrowser.
31
+
32
+ ### Why These Technical Choices
33
+
34
+ | Decision | Why |
35
+ |----------|-----|
36
+ | **TypeScript** | Type safety for a complex codebase; better IDE experience for contributors |
37
+ | **Playwright over Puppeteer** | Cross-browser support (Chromium, Firefox, WebKit) out of the box; better auto-waiting |
38
+ | **Constitutional AI safety** | AI agents need boundaries. Borrowed from Anthropic's constitutional AI principles to create risk zones |
39
+ | **Cognitive simulation** | Based on UX research (Nielsen Norman Group, Baymard Institute) on how humans actually scan and interact with pages |
40
+ | **MCP-first architecture** | Built for the Claude ecosystem. MCP is the future of AI tool integration |
41
+
42
+ ### What I Learned Building This
43
+
44
+ - **Shipping beats perfecting.** 80+ npm versions taught me to iterate in public
45
+ - **Real users reveal real problems.** Features I thought were clever often weren't useful; user feedback redirected the roadmap
46
+ - **AI safety is a UX problem.** The same patterns that make sites confusing to humans make them dangerous for agents
47
+
48
+ ---
10
49
 
11
50
  ## Why CBrowser?
12
51
 
@@ -33,9 +72,9 @@ Most browser automation tests if buttons click. CBrowser tests if **real humans*
33
72
 
34
73
  ## Quick Start
35
74
 
36
- ### Option 1: PAI Skill Installation (Claude Code Users)
75
+ ### Option 1: Claude Code Skill Installation
37
76
 
38
- If you use [Claude Code](https://claude.ai/claude-code) with [PAI (Personal AI Infrastructure)](https://github.com/danielmiessler/Personal_AI_Infrastructure), install CBrowser as a skill:
77
+ If you use [Claude Code](https://claude.ai/claude-code), install CBrowser as a skill for seamless AI-assisted browser automation:
39
78
 
40
79
  ```bash
41
80
  # One-line installation
@@ -48,7 +87,7 @@ npx cbrowser install-skill
48
87
  This installs CBrowser to `~/.claude/skills/CBrowser/` with full skill structure:
49
88
  - `SKILL.md` - Main skill file with workflow routing
50
89
  - `Workflows/` - Navigate, Interact, Extract, Test, Journey workflows
51
- - `Tools/CBrowser.ts` - CLI wrapper for PAI
90
+ - `Tools/CBrowser.ts` - CLI wrapper
52
91
  - `.memory/` - Session, selector, and persona storage
53
92
 
54
93
  After installation, add to your `~/.claude/skills/skill-index.json`:
@@ -919,18 +958,12 @@ Connect claude.ai directly to a remote CBrowser server:
919
958
  1. Deploy CBrowser on your server ([full guide](docs/REMOTE-MCP-SERVER.md))
920
959
  2. In claude.ai: Settings > Connectors > Add Custom Connector
921
960
  3. Add URL: `https://your-cbrowser-domain.com/mcp`
922
- 4. Configure OAuth with Auth0 ([setup guide](docs/AUTH0-SETUP.md))
923
961
 
924
962
  **Public Demo (rate-limited):** `https://cbrowser-mcp-demo.wyldfyre.ai/mcp`
925
963
  - No authentication required
926
964
  - Rate limit: 5 requests/minute, burst of 10
927
965
  - For evaluation purposes only
928
966
 
929
- **Authenticated Server:** `https://cbrowser-mcp.wyldfyre.ai/mcp`
930
- - **OAuth 2.1 via Auth0** - For claude.ai web interface ([setup guide](docs/AUTH0-SETUP.md))
931
- - **API Key** - For Claude Code CLI and programmatic access
932
- - No rate limits for authenticated users
933
-
934
967
  ### Local MCP (Claude Desktop)
935
968
 
936
969
  Run CBrowser locally for Claude Desktop:
@@ -1161,7 +1194,7 @@ See the [`examples/`](examples/) directory:
1161
1194
  - [`basic-usage.ts`](examples/basic-usage.ts) - Navigation, extraction, sessions
1162
1195
  - [`smart-automation.ts`](examples/smart-automation.ts) - Smart click, assertions, test generation
1163
1196
  - [`visual-testing.ts`](examples/visual-testing.ts) - AI visual regression, cross-browser, responsive, A/B comparison
1164
- - [`remote-mcp.ts`](examples/remote-mcp.ts) - Remote MCP server, Auth0 OAuth, demo server setup
1197
+ - [`remote-mcp.ts`](examples/remote-mcp.ts) - Remote MCP server setup and demo server connection
1165
1198
  - [`cognitive-journey.ts`](examples/cognitive-journey.ts) - Cognitive user simulation with personas, abandonment, and friction detection
1166
1199
 
1167
1200
  ### Workflow Recipes
package/dist/cli.js CHANGED
@@ -1166,7 +1166,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
1166
1166
  const daemonRunning = await isDaemonRunning();
1167
1167
  if (daemonRunning && ["navigate", "click", "fill", "hover", "screenshot", "extract", "run"].includes(command)) {
1168
1168
  console.log("🔌 Connected to running daemon");
1169
- let daemonCommand = command;
1169
+ const daemonCommand = command;
1170
1170
  let daemonArgs = {};
1171
1171
  switch (command) {
1172
1172
  case "navigate":
@@ -3789,7 +3789,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
3789
3789
  const stepBrowser = new CBrowser({ headless });
3790
3790
  await stepBrowser.launch();
3791
3791
  try {
3792
- let totalSteps = suite.tests.reduce((sum, t) => sum + t.steps.length, 0);
3792
+ const totalSteps = suite.tests.reduce((sum, t) => sum + t.steps.length, 0);
3793
3793
  let stepNum = 0;
3794
3794
  let stopped = false;
3795
3795
  for (const test of suite.tests) {