cbrowser 19.6.0 → 20.0.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 (170) hide show
  1. package/README.md +292 -232
  2. package/THIRD_PARTY_LICENSES.md +416 -7
  3. package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
  4. package/dist/analysis/accessibility-empathy.js +2 -0
  5. package/dist/analysis/accessibility-empathy.js.map +1 -1
  6. package/dist/analysis/competitive-benchmark.d.ts.map +1 -1
  7. package/dist/analysis/competitive-benchmark.js +70 -558
  8. package/dist/analysis/competitive-benchmark.js.map +1 -1
  9. package/dist/analysis/natural-language.d.ts.map +1 -1
  10. package/dist/analysis/natural-language.js +43 -0
  11. package/dist/analysis/natural-language.js.map +1 -1
  12. package/dist/analysis/persona-comparison.d.ts +7 -0
  13. package/dist/analysis/persona-comparison.d.ts.map +1 -1
  14. package/dist/analysis/persona-comparison.js +8 -1
  15. package/dist/analysis/persona-comparison.js.map +1 -1
  16. package/dist/browser-options.d.ts +23 -0
  17. package/dist/browser-options.d.ts.map +1 -0
  18. package/dist/browser-options.js +24 -0
  19. package/dist/browser-options.js.map +1 -0
  20. package/dist/browser.d.ts +36 -14
  21. package/dist/browser.d.ts.map +1 -1
  22. package/dist/browser.js +139 -196
  23. package/dist/browser.js.map +1 -1
  24. package/dist/cli-args.d.ts +9 -1
  25. package/dist/cli-args.d.ts.map +1 -1
  26. package/dist/cli-args.js +35 -7
  27. package/dist/cli-args.js.map +1 -1
  28. package/dist/cli-browser-flags.d.ts +33 -0
  29. package/dist/cli-browser-flags.d.ts.map +1 -0
  30. package/dist/cli-browser-flags.js +89 -0
  31. package/dist/cli-browser-flags.js.map +1 -0
  32. package/dist/cli.js +979 -401
  33. package/dist/cli.js.map +1 -1
  34. package/dist/cognitive/index.d.ts +0 -13
  35. package/dist/cognitive/index.d.ts.map +1 -1
  36. package/dist/cognitive/index.js +39 -15
  37. package/dist/cognitive/index.js.map +1 -1
  38. package/dist/config.d.ts.map +1 -1
  39. package/dist/config.js +16 -6
  40. package/dist/config.js.map +1 -1
  41. package/dist/daemon.d.ts +5 -4
  42. package/dist/daemon.d.ts.map +1 -1
  43. package/dist/daemon.js +87 -29
  44. package/dist/daemon.js.map +1 -1
  45. package/dist/devices.d.ts +20 -0
  46. package/dist/devices.d.ts.map +1 -1
  47. package/dist/devices.js +18 -0
  48. package/dist/devices.js.map +1 -1
  49. package/dist/help-client.d.ts +48 -0
  50. package/dist/help-client.d.ts.map +1 -0
  51. package/dist/help-client.js +96 -0
  52. package/dist/help-client.js.map +1 -0
  53. package/dist/mcp-server.d.ts.map +1 -1
  54. package/dist/mcp-server.js +165 -2281
  55. package/dist/mcp-server.js.map +1 -1
  56. package/dist/mcp-tools/base/advanced-interaction-tools.d.ts.map +1 -1
  57. package/dist/mcp-tools/base/advanced-interaction-tools.js +21 -21
  58. package/dist/mcp-tools/base/advanced-interaction-tools.js.map +1 -1
  59. package/dist/mcp-tools/base/assertion-tools.d.ts.map +1 -1
  60. package/dist/mcp-tools/base/assertion-tools.js +6 -3
  61. package/dist/mcp-tools/base/assertion-tools.js.map +1 -1
  62. package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
  63. package/dist/mcp-tools/base/audit-tools.js +15 -4
  64. package/dist/mcp-tools/base/audit-tools.js.map +1 -1
  65. package/dist/mcp-tools/base/browser-state-tools.d.ts.map +1 -1
  66. package/dist/mcp-tools/base/browser-state-tools.js +33 -27
  67. package/dist/mcp-tools/base/browser-state-tools.js.map +1 -1
  68. package/dist/mcp-tools/base/bug-analysis-tools.d.ts.map +1 -1
  69. package/dist/mcp-tools/base/bug-analysis-tools.js +9 -2
  70. package/dist/mcp-tools/base/bug-analysis-tools.js.map +1 -1
  71. package/dist/mcp-tools/base/capture-tools.d.ts +60 -4
  72. package/dist/mcp-tools/base/capture-tools.d.ts.map +1 -1
  73. package/dist/mcp-tools/base/capture-tools.js +118 -14
  74. package/dist/mcp-tools/base/capture-tools.js.map +1 -1
  75. package/dist/mcp-tools/base/index.d.ts +6 -5
  76. package/dist/mcp-tools/base/index.d.ts.map +1 -1
  77. package/dist/mcp-tools/base/index.js +7 -6
  78. package/dist/mcp-tools/base/index.js.map +1 -1
  79. package/dist/mcp-tools/base/interaction-tools.d.ts.map +1 -1
  80. package/dist/mcp-tools/base/interaction-tools.js +20 -6
  81. package/dist/mcp-tools/base/interaction-tools.js.map +1 -1
  82. package/dist/mcp-tools/base/navigation-tools.d.ts +1 -1
  83. package/dist/mcp-tools/base/navigation-tools.d.ts.map +1 -1
  84. package/dist/mcp-tools/base/navigation-tools.js +83 -3
  85. package/dist/mcp-tools/base/navigation-tools.js.map +1 -1
  86. package/dist/mcp-tools/base/site-knowledge-tools.d.ts.map +1 -1
  87. package/dist/mcp-tools/base/site-knowledge-tools.js +11 -23
  88. package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
  89. package/dist/mcp-tools/base/visual-testing-tools.d.ts.map +1 -1
  90. package/dist/mcp-tools/base/visual-testing-tools.js +13 -3
  91. package/dist/mcp-tools/base/visual-testing-tools.js.map +1 -1
  92. package/dist/mcp-tools/enterprise-stubs.d.ts +2 -2
  93. package/dist/mcp-tools/enterprise-stubs.d.ts.map +1 -1
  94. package/dist/mcp-tools/enterprise-stubs.js +29 -16
  95. package/dist/mcp-tools/enterprise-stubs.js.map +1 -1
  96. package/dist/mcp-tools/index.d.ts +19 -14
  97. package/dist/mcp-tools/index.d.ts.map +1 -1
  98. package/dist/mcp-tools/index.js +2 -2
  99. package/dist/mcp-tools/index.js.map +1 -1
  100. package/dist/mcp-tools/red-zone-refusal.d.ts +33 -0
  101. package/dist/mcp-tools/red-zone-refusal.d.ts.map +1 -0
  102. package/dist/mcp-tools/red-zone-refusal.js +43 -0
  103. package/dist/mcp-tools/red-zone-refusal.js.map +1 -0
  104. package/dist/mcp-tools/tier-gate.js +1 -1
  105. package/dist/mcp-tools/tier-gate.js.map +1 -1
  106. package/dist/mcp-tools/tool-categories.d.ts.map +1 -1
  107. package/dist/mcp-tools/tool-categories.js +2 -0
  108. package/dist/mcp-tools/tool-categories.js.map +1 -1
  109. package/dist/output.d.ts.map +1 -1
  110. package/dist/output.js +18 -2
  111. package/dist/output.js.map +1 -1
  112. package/dist/performance/metrics.d.ts +8 -3
  113. package/dist/performance/metrics.d.ts.map +1 -1
  114. package/dist/performance/metrics.js +16 -5
  115. package/dist/performance/metrics.js.map +1 -1
  116. package/dist/recording/contact-sheet.js.map +1 -1
  117. package/dist/security/tool-permissions.d.ts.map +1 -1
  118. package/dist/security/tool-permissions.js +1 -0
  119. package/dist/security/tool-permissions.js.map +1 -1
  120. package/dist/testing/coverage.d.ts +2 -2
  121. package/dist/testing/coverage.d.ts.map +1 -1
  122. package/dist/testing/coverage.js +6 -2
  123. package/dist/testing/coverage.js.map +1 -1
  124. package/dist/testing/flaky-detection.d.ts +2 -2
  125. package/dist/testing/flaky-detection.d.ts.map +1 -1
  126. package/dist/testing/flaky-detection.js +11 -3
  127. package/dist/testing/flaky-detection.js.map +1 -1
  128. package/dist/testing/nl-test-suite.d.ts +13 -0
  129. package/dist/testing/nl-test-suite.d.ts.map +1 -1
  130. package/dist/testing/nl-test-suite.js +5 -1
  131. package/dist/testing/nl-test-suite.js.map +1 -1
  132. package/dist/testing/suite-results.d.ts +27 -0
  133. package/dist/testing/suite-results.d.ts.map +1 -0
  134. package/dist/testing/suite-results.js +54 -0
  135. package/dist/testing/suite-results.js.map +1 -0
  136. package/dist/testing/test-repair.d.ts +2 -2
  137. package/dist/testing/test-repair.d.ts.map +1 -1
  138. package/dist/testing/test-repair.js +6 -2
  139. package/dist/testing/test-repair.js.map +1 -1
  140. package/dist/types.d.ts +61 -7
  141. package/dist/types.d.ts.map +1 -1
  142. package/dist/types.js +17 -4
  143. package/dist/types.js.map +1 -1
  144. package/dist/visual/ab-comparison.d.ts.map +1 -1
  145. package/dist/visual/ab-comparison.js +7 -2
  146. package/dist/visual/ab-comparison.js.map +1 -1
  147. package/dist/visual/cross-browser.d.ts +7 -2
  148. package/dist/visual/cross-browser.d.ts.map +1 -1
  149. package/dist/visual/cross-browser.js +33 -5
  150. package/dist/visual/cross-browser.js.map +1 -1
  151. package/dist/visual/distance-metrics.d.ts +7 -0
  152. package/dist/visual/distance-metrics.d.ts.map +1 -1
  153. package/dist/visual/distance-metrics.js.map +1 -1
  154. package/dist/visual/heatmap-overlay.js.map +1 -1
  155. package/dist/visual/llm-relevance.d.ts.map +1 -1
  156. package/dist/visual/llm-relevance.js.map +1 -1
  157. package/dist/visual/regression.d.ts +17 -7
  158. package/dist/visual/regression.d.ts.map +1 -1
  159. package/dist/visual/regression.js +77 -38
  160. package/dist/visual/regression.js.map +1 -1
  161. package/dist/visual/responsive.d.ts +22 -0
  162. package/dist/visual/responsive.d.ts.map +1 -1
  163. package/dist/visual/responsive.js +44 -7
  164. package/dist/visual/responsive.js.map +1 -1
  165. package/dist/visual/visual-overlays.js.map +1 -1
  166. package/dist/webhooks.d.ts +67 -0
  167. package/dist/webhooks.d.ts.map +1 -0
  168. package/dist/webhooks.js +128 -0
  169. package/dist/webhooks.js.map +1 -0
  170. package/package.json +23 -24
package/README.md CHANGED
@@ -1,62 +1,78 @@
1
- # CBrowser — Cognitive Browser Automation
1
+ # CBrowser: Cognitive Browser Automation
2
2
 
3
- > **The browser automation that thinks like your users.** 122 MCP tools. 25 cognitive traits. 11 disability personas. The only framework that predicts when users give up.
3
+ > **Browser automation that thinks like your users.** 130 MCP tools, 21 built-in personas, a CLI, and a library. It predicts where a real person gives up before they do.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/cbrowser.svg)](https://www.npmjs.com/package/cbrowser)
6
6
  [![Documentation](https://img.shields.io/badge/Docs-cbrowser.ai-blue.svg)](https://cbrowser.ai/docs)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
8
- [![MCP Ready](https://img.shields.io/badge/MCP-122%20Tools-blue)](https://modelcontextprotocol.io)
9
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
10
- [![Node](https://img.shields.io/badge/Node-%3E%3D18-green.svg)](https://nodejs.org/)
8
+ [![MCP Ready](https://img.shields.io/badge/MCP-130%20Tools-blue)](https://modelcontextprotocol.io)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
10
+ [![Node](https://img.shields.io/badge/Node-%3E%3D20.9-green.svg)](https://nodejs.org/)
11
11
 
12
12
  ```bash
13
- npm install cbrowser
14
- npx cbrowser cognitive-effort --url "https://your-site.com" --persona first-timer
13
+ npx cbrowser agent-ready-audit "https://your-site.com" --html
15
14
  ```
16
15
 
17
16
  ---
18
17
 
19
- ## 5-Minute Quickstart
20
-
21
- Get from zero to your first cognitive insight in 3 commands:
18
+ ## Quickstart
22
19
 
23
20
  ```bash
24
- # 1. Install CBrowser
25
- npm install cbrowser
21
+ # 1. Install (Node.js 20.9 or newer). Installing also downloads Chromium.
22
+ npm install -g cbrowser
23
+
24
+ # 2. Check the environment
25
+ cbrowser doctor
26
26
 
27
- # 2. Install the browser engine (~150MB)
28
- npx playwright install chromium
27
+ # 3. Free, keyless audits
28
+ cbrowser agent-ready-audit "https://your-site.com" --html
29
+ cbrowser empathy-audit "https://your-site.com" --personas cognitive-adhd,low-vision-magnified --html
29
30
 
30
- # 3. Run your first cognitive audit
31
- npx cbrowser cognitive-effort --url "https://your-site.com" --persona first-timer
31
+ # 4. A simulated visitor (needs an Anthropic API key)
32
+ cbrowser config set-api-key <your-anthropic-key>
33
+ cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up"
32
34
  ```
33
35
 
34
- **What you get:** A cognitive transport score (0-1), abandonment risk percentage, and the UX bottleneck — in under 30 seconds.
36
+ If the browser download was skipped (for example with `--ignore-scripts`), run `npx playwright install chromium`.
35
37
 
36
- **No API key needed** for basic commands (navigate, screenshot, click, extract, explore). Cognitive journeys require an Anthropic API key:
38
+ **Stuck? Ask the docs.** `cbrowser ask` sends your question to cbrowser.ai and prints an AI answer grounded in the documentation, with its sources. No account or API key is needed; it is rate-limited.
37
39
 
38
40
  ```bash
39
- npx cbrowser config set-api-key <your-anthropic-key>
41
+ cbrowser ask "Which persona should I use for a screen reader user?"
40
42
  ```
41
43
 
42
- **Check your environment:** Run `npx cbrowser doctor` to verify everything is set up correctly.
44
+ The `question_answer` MCP tool does the same from Claude, including on the local `npx cbrowser mcp-server`.
43
45
 
44
- **Accessibility:** CBrowser supports `--no-color` (or `NO_COLOR` env var), `--plain` (no emoji/decorations), and `--json-output` (structured JSON) for screen readers, CI pipelines, and scripting.
46
+ ### What needs an API key
47
+
48
+ | Free, no key | Needs an Anthropic API key (each step is a model call) |
49
+ |---|---|
50
+ | `navigate`, `click`, `fill`, `type`, `scroll`, `screenshot`, `extract`, `evaluate` | `cognitive-journey` |
51
+ | `agent-ready-audit`, `ai-benchmark`, `empathy-audit` (without `--goal`) | `explore` (a short cognitive journey) |
52
+ | `test-suite`, `repair-tests`, `flaky-check`, `hunt-bugs`, `chaos` | `compare-personas` (one journey per persona) |
53
+ | `ai-visual`, `cross-browser`, `responsive`, `ab`, `perf`, `a11y audit` | `competitive-benchmark` (one journey per site) |
54
+ | `capture`, `har`, `network`, `console`, `daemon`, `ask` | `empathy-audit --goal` (the journey part) |
55
+
56
+ Since 20.0 nothing falls back to a keyless guess. The old keyless modes of `explore` and `competitive-benchmark` reported goals as reached when a goal word, "the" included, appeared on the page, so they now refuse without a key. A journey that is replayed from a saved trace is free (see [Replay](#replay-a-journey-for-free)).
57
+
58
+ **Output for scripts and screen readers:** `--no-color` (or `NO_COLOR`), `--plain` (no emoji or box drawing; pass and fail marks become `[PASS]` and `[FAIL]`), and `--json-output` (one JSON envelope on stdout).
45
59
 
46
60
  ---
47
61
 
48
62
  ## Table of Contents
49
63
 
50
- - [5-Minute Quickstart](#5-minute-quickstart)
64
+ - [Quickstart](#quickstart)
65
+ - [Upgrading to 20.0.0](#upgrading-to-2000)
51
66
  - [Cognitive Transport Chain](#cognitive-transport-chain)
52
- - [Visual Overlays & Attention Analysis](#visual-overlays--attention-analysis)
67
+ - [Visual Overlays and Attention Analysis](#visual-overlays-and-attention-analysis)
53
68
  - [AI Friendliness Suite](#ai-friendliness-suite)
54
69
  - [Cognitive User Simulation](#cognitive-user-simulation)
55
70
  - [Accessibility Empathy Testing](#accessibility-empathy-testing)
56
71
  - [Constitutional AI Safety](#constitutional-ai-safety)
57
- - [Site Knowledge System](#site-knowledge-system)
72
+ - [Browser Control from the CLI](#browser-control-from-the-cli)
58
73
  - [Natural Language Testing](#natural-language-testing)
59
74
  - [Visual Testing](#visual-testing)
75
+ - [Screen Capture](#screen-capture)
60
76
  - [Competitive UX Benchmark](#competitive-ux-benchmark)
61
77
  - [Geo Proxy](#geo-proxy)
62
78
  - [MCP Server Integration](#mcp-server-integration)
@@ -64,14 +80,47 @@ npx cbrowser config set-api-key <your-anthropic-key>
64
80
  - [API Reference](#api-reference)
65
81
  - [Configuration](#configuration)
66
82
  - [Enterprise Edition](#enterprise-edition)
67
- - [Contributing](#contributing)
68
83
  - [License](#license)
69
84
 
70
85
  ---
71
86
 
87
+ ## Upgrading to 20.0.0
88
+
89
+ 20.0 is a breaking release. Most of it makes commands that used to succeed silently either do what they claim or fail out loud. The full list is in [CHANGELOG.md](CHANGELOG.md).
90
+
91
+ **Runtime**
92
+ - Node.js 20.9 or newer. Node 18 is end of life and sharp 0.35 dropped it; stay on cbrowser 19.x if you need Node 18.
93
+
94
+ **Behaviour you may notice**
95
+ - The default page size is **1920x1080** (was 1280x800), the size `desktop` means everywhere else. Set `CBROWSER_VIEWPORT_WIDTH`/`CBROWSER_VIEWPORT_HEIGHT` or `viewport` in the config file to keep the old size.
96
+ - Pages render in the host's locale and timezone unless you set `--locale`/`--timezone`, `CBROWSER_LOCALE`/`CBROWSER_TIMEZONE` or the config file (it was en-US and America/Denver). Env vars and the config file are no longer overridden by built-in values.
97
+ - A one-off `--device` or `--geo` no longer sticks to later commands.
98
+ - `explore`, `CBrowser.journey()` and `competitive-benchmark` need an Anthropic API key. Their keyless heuristic modes are gone (see above).
99
+ - Commands that fail exit 1. That includes unknown subcommands, failed clicks and navigations through the daemon, `record start/stop/save` (which never recorded across commands and now refuse), `perf audit` and `visual compare` failures, and `daemon status` when nothing is running.
100
+ - Commands that check their flags reject flags they never read. `--quiet` is gone, since nothing read it.
101
+ - `--json-output`: `extract`, `analyze` and `network list` put their data in `data`. Other commands still return captured text lines in `data.output`.
102
+ - `--plain` and `--json-output` text keep pass, fail and warning marks as `[PASS]`, `[FAIL]` and `[WARN]`.
103
+ - With `--html` and an `--output` that does not end in `.json`, the HTML report goes to `<name>.report.html` instead of overwriting the JSON.
104
+ - `repair-tests` saves its report with `--json-out <file>`; `--json` prints it.
105
+ - Size names: `mobile` is 393x852, `tablet` 834x1194 and `desktop` 1920x1080 in every tool (the CLI's `responsive` and MCP `responsive_test` used smaller sizes). The old sizes remain as `tablet-sm` (768x1024) and `desktop-md` (1440x900); `desktop-xl` is 2560x1440.
106
+
107
+ **MCP**
108
+ - `npx cbrowser mcp-server` (stdio) now registers the same tool set as the hosted server, 130 tools plus 7 local-only ones. It had its own copy of 82 tools.
109
+ - Red-zone refusals from `click`, `smart_click`, `press_key`, `type_text`, `drag` and `evaluate_script` are tool errors with one shape (`isError`, `zone: "red"`, `howToRun`). On the hosted server a refused call is refunded.
110
+ - `get_network_requests` returns the newest 50. `manage_cookies` `set` writes a session cookie unless `expires` is given.
111
+ - `compare_personas_record_result` and `compare_personas_summarize` are removed; nothing could create the session they needed.
112
+ - The five Enterprise marketing stubs use the Enterprise server's tool names and parameters.
113
+
114
+ **CI**
115
+ - The GitHub Action's `sensitivity` input is removed (test-suite never read it).
116
+
117
+ Upgrading from 18.x? The 19.0 change was the agent-ready `accessibility` axis becoming `agentPerceivability`: `score.accessibility` is `score.agentPerceivability`, `summary.dynamicContentCount` is `summary.deferredLoadingPatterns`, and `comparison.bestAccessibility` is `comparison.bestAgentPerceivability`.
118
+
119
+ ---
120
+
72
121
  ## Cognitive Transport Chain
73
122
 
74
- The eight-layer Sequential Transport Chain computes exactly how hard your page is for any persona - and predicts whether they'll abandon. Each layer answers one question about the visitor:
123
+ The eight-layer Sequential Transport Chain computes how hard a page is for a given persona, and predicts whether they abandon. Each layer answers one question about the visitor:
75
124
 
76
125
  | Layer | The Question It Answers | Research Basis |
77
126
  |-------|------------------------|----------------|
@@ -84,66 +133,60 @@ The eight-layer Sequential Transport Chain computes exactly how hard your page i
84
133
  | **Readability** | Can they decode the words on the page? | Perry & Zorzi (2013) reading model |
85
134
  | **Reading Attention** | Can they hold the line long enough to finish? | Sustained attention (split from Readability) |
86
135
 
87
- The chain is *sequential* because attention is a budget, not a checklist. Each layer's cost is paid from whatever the layers before it left behind: a visitor who burned working memory just finding the button has less left for the form, and a persona who arrives at your pricing table already frustrated reads it differently than one who got there clean. That's why a page that exhausts people early scores differently from one that is uniformly hard, and why the bottleneck layer matters more than the average.
136
+ The chain is *sequential* because attention is a budget, not a checklist. Each layer's cost is paid from whatever the layers before it left behind: a visitor who burned working memory just finding the button has less left for the form, and a persona who arrives at your pricing table already frustrated reads it differently from one who got there clean. That is why a page that exhausts people early scores differently from one that is uniformly hard, and why the bottleneck layer matters more than the average.
88
137
 
89
- Two layers were split out of their neighbors because they fail for different reasons. **Motor Procedure** is separate from **Motor** because hitting a target and completing a sequence are different failures - you can land every click and still lose your place halfway through a form. **Reading Attention** is separate from **Readability** because decoding text and holding your place in it are different abilities - an ADHD reader typically decodes fine and loses the thread, and a single "reading" score can't say that.
138
+ Two layers were split out of their neighbours because they fail for different reasons. **Motor Procedure** is separate from **Motor** because hitting a target and completing a sequence are different failures: you can land every click and still lose your place halfway through a form. **Reading Attention** is separate from **Readability** because decoding text and holding your place in it are different abilities: an ADHD reader typically decodes fine and loses the thread, and a single "reading" score cannot say that.
90
139
 
91
- ```bash
92
- npx cbrowser cognitive-effort --url "https://your-site.com" --persona first-timer
93
- # → CTC: 0.76, abandonment risk: 42%, bottleneck: decision
94
- ```
140
+ The chain runs through the MCP tool `cognitive_effort` (there is no CLI command for it):
95
141
 
96
- Returns: total CTC score, per-layer breakdown, bottleneck identification, abandonment risk percentage, and motor accessibility overlay.
142
+ ```text
143
+ cognitive_effort(url: "https://your-site.com", persona: "first-timer")
144
+ -> CTC score, per-layer breakdown, bottleneck layer, abandonment risk, motor overlay
145
+ ```
97
146
 
98
147
  ---
99
148
 
100
- ## Visual Overlays & Attention Analysis
101
-
102
- See where users look, what they miss, and whether your CTAs capture attention — per persona:
149
+ ## Visual Overlays and Attention Analysis
103
150
 
104
- ```bash
105
- # Full visual cognitive story — 4 annotated images + narrative
106
- npx cbrowser visual-cognitive-story --url "https://your-site.com" --persona cognitive-adhd
151
+ See where users look, what they miss, and whether your calls to action capture attention, per persona. These are MCP tools:
107
152
 
108
- # Attention heatmap — where does this persona look?
109
- npx cbrowser attention-analysis --url "https://your-site.com" --persona first-timer
110
-
111
- # Compare how two personas experience the same page
112
- npx cbrowser attention-compare --url "https://your-site.com" --persona-a first-timer --persona-b power-user
113
- ```
153
+ | MCP tool | What it returns |
154
+ |---|---|
155
+ | `visual_cognitive_story` | Four annotated images and a narrative for one persona |
156
+ | `attention_analysis` | Predicted attention heatmap for one persona |
157
+ | `attention_compare` | How two personas experience the same page |
158
+ | `journey_heatmap_gif` | An animated heatmap of a journey |
114
159
 
115
- **Overlays generated:**
116
- - **Attention heatmap** — CIE-Lab saliency on grayscale base (red = high attention)
117
- - **Motor accessibility** — Green/yellow/red per element by P(hit)
118
- - **Attention quality** — CTAs green, distractors red, headings blue
119
- - **Comparison diff** — Blue = persona A attention, red = persona B
160
+ **Overlays:** attention heatmap (CIE-Lab saliency on a grayscale base, red is high attention), motor accessibility (green, yellow or red per element by probability of a hit), attention quality (calls to action green, distractors red, headings blue) and a comparison diff (blue is persona A, red is persona B).
120
161
 
121
- **Metrics:** CTA capture rate, value prop salience, distractor ratio, quality score (0-100), entropy.
162
+ **Metrics:** CTA capture rate, value-prop salience, distractor ratio, quality score (0-100), entropy.
122
163
 
123
164
  ---
124
165
 
125
166
  ## AI Friendliness Suite
126
167
 
127
- Five tools to make your site ready for the AI agent era:
168
+ Make your site work for AI agents as well as people:
128
169
 
129
170
  | Tool | What It Does |
130
171
  |------|-------------|
131
- | `agent_ready_audit` | Score site on findability, stability, agent-perceivability, semantics (A-F grade) |
132
- | `ai_benchmark` | Compare AI-friendliness across competitor URLs |
133
- | `webmcp_ready_audit` | Audit MCP server for WebMCP compatibility |
134
- | `remediation_patches` | Generate actionable code fixes for audit findings |
135
- | `llms_txt_generate` | Generate AI-readable llms.txt site description |
172
+ | `agent_ready_audit` | Scores findability, stability, agent-perceivability and semantics (A-F grade) |
173
+ | `ai_benchmark` | Compares AI-friendliness across competitor URLs |
174
+ | `webmcp_ready_audit` | Audits a site for WebMCP readiness |
175
+ | `remediation_patches` | Generates code fixes for audit findings |
176
+ | `llms_txt_generate` | Generates an AI-readable llms.txt for a site |
136
177
 
137
178
  ```bash
138
- npx cbrowser agent-ready-audit "https://your-site.com" --html
139
- npx cbrowser ai-benchmark "https://site-a.com,https://site-b.com"
179
+ cbrowser agent-ready-audit "https://your-site.com" --html
180
+ cbrowser ai-benchmark --urls "https://site-a.com,https://site-b.com" --html
140
181
  ```
141
182
 
183
+ The agent-perceivability axis measures whether a machine can perceive your elements (ARIA present, elements carry text). It is not a WCAG conformance score; run `empathy-audit` for that, and expect the two to differ.
184
+
142
185
  ---
143
186
 
144
187
  ## Cognitive User Simulation
145
188
 
146
- **26 research-backed cognitive traits + 10 motivational values** model how real users think, struggle, and give up:
189
+ Research-backed cognitive traits and motivational values model how real users think, struggle and give up:
147
190
 
148
191
  | Trait | Research Basis | What It Models |
149
192
  |-------|---------------|----------------|
@@ -151,238 +194,235 @@ npx cbrowser ai-benchmark "https://site-a.com,https://site-b.com"
151
194
  | **Working Memory** | Miller (1956) | 7±2 item capacity; affects form complexity tolerance |
152
195
  | **Comprehension** | Card, Moran & Newell (1983) | UI convention understanding; GOMS model timing |
153
196
  | **Risk Tolerance** | Kahneman & Tversky (1979) | Prospect theory; loss aversion affects CTA clicks |
154
- | **Self-Efficacy** | Bandura (1977) | Belief in ability to solve problems; low = faster abandonment |
155
- | **Satisficing** | Simon (1956) | Accept "good enough" vs. optimize; 50% faster decisions |
156
- | **Trust Calibration** | Fogg (2003) | 8 trust signals; affects click-through by 40% |
157
- | **Information Foraging** | Pirolli & Card (1999) | "Scent" following behavior; predicts navigation patterns |
158
- | **Social Proof** | Cialdini (2001) | Influence of reviews, ratings, popularity indicators |
197
+ | **Self-Efficacy** | Bandura (1977) | Belief in ability to solve problems; low means faster abandonment |
198
+ | **Satisficing** | Simon (1956) | Accept "good enough" or optimize; faster decisions |
199
+ | **Trust Calibration** | Fogg (2003) | Trust signals; affects click-through |
200
+ | **Information Foraging** | Pirolli & Card (1999) | "Scent" following; predicts navigation patterns |
201
+ | **Social Proof** | Cialdini (2001) | Influence of reviews, ratings and popularity indicators |
159
202
  | **FOMO** | Przybylski et al. (2013) | Fear of missing out; urgency and scarcity responses |
160
203
 
161
- *See [Trait Index](https://cbrowser.ai/docs/Trait-Index) for all 25 traits including: Persistence, Resilience, Curiosity, Change Blindness, Anchoring Bias, Time Horizon, Attribution Style, Metacognitive Planning, Procedural Fluency, Transfer Learning, Authority Sensitivity, Emotional Contagion, Mental Model Rigidity, Interrupt Recovery, Reading Tendency, and Site Familiarity.*
204
+ The [Trait Index](https://cbrowser.ai/docs/Trait-Index) lists every trait with its citations, including Persistence, Resilience, Curiosity, Change Blindness, Anchoring Bias, Time Horizon, Attribution Style, Metacognitive Planning, Procedural Fluency, Transfer Learning, Authority Sensitivity, Emotional Contagion, Mental Model Rigidity, Interrupt Recovery, Reading Tendency and Site Familiarity.
162
205
 
163
206
  **Full documentation:** [Research Methodology](https://cbrowser.ai/docs/Research-Methodology) · [Trait Index](https://cbrowser.ai/docs/Trait-Index) · [Bibliography](https://cbrowser.ai/docs/Bibliography)
164
207
 
165
- ### 17 Built-in Personas
208
+ ### 21 Built-in Personas
166
209
 
167
- **6 general:** first-timer, power-user, mobile-user, screen-reader-user, elderly-user, impatient-user
210
+ **10 general:** power-user, first-timer, mobile-user, screen-reader-user, elderly-user, impatient-user, distracted-user, careful-reader, explorer, task-focused
168
211
 
169
212
  **11 accessibility:** motor-impairment-tremor, low-vision-magnified, cognitive-adhd, dyslexic-user, deaf-user, elderly-low-vision, color-blind-deuteranopia, autism-spectrum, intellectual-disability, aphasia-receptive, dyscalculia
170
213
 
214
+ `cbrowser persona list` shows them with any custom personas you have made.
215
+
171
216
  ### Values System
172
217
 
173
- Beyond cognitive traits, CBrowser models **10 motivational values** from three psychological frameworks:
218
+ Beyond cognitive traits, CBrowser models motivational values from three psychological frameworks:
174
219
 
175
220
  | Framework | Research Basis |
176
221
  |-----------|---------------|
177
- | **Schwartz's Universal Values** | Schwartz (1992) — 10 core values: Power, Achievement, Hedonism, Stimulation, Self-Direction, Universalism, Benevolence, Tradition, Conformity, Security |
178
- | **Self-Determination Theory** | Deci & Ryan (1985) — Autonomy, Competence, Relatedness |
179
- | **Maslow's Hierarchy** | Maslow (1943) — 5 need levels |
222
+ | **Schwartz's Universal Values** | Schwartz (1992): Power, Achievement, Hedonism, Stimulation, Self-Direction, Universalism, Benevolence, Tradition, Conformity, Security |
223
+ | **Self-Determination Theory** | Deci & Ryan (1985): Autonomy, Competence, Relatedness |
224
+ | **Maslow's Hierarchy** | Maslow (1943): 5 need levels |
180
225
 
181
- See [Values Framework](https://cbrowser.ai/docs/Values-Framework) for full documentation.
226
+ See [Values Framework](https://cbrowser.ai/docs/Values-Framework).
182
227
 
183
- ### Custom Persona Builder
228
+ ### Custom Personas
184
229
 
185
230
  ```bash
186
- # Interactive questionnaire (8 core traits)
187
- npx cbrowser persona-questionnaire start
231
+ # Interactive questionnaire (13 core traits)
232
+ cbrowser persona-questionnaire start
188
233
 
189
- # Comprehensive questionnaire (all 25 traits)
190
- npx cbrowser persona-questionnaire start --comprehensive --name "my-tester"
234
+ # Comprehensive questionnaire (all 30 traits)
235
+ cbrowser persona-questionnaire start --comprehensive --name "my-tester"
191
236
 
192
- # From a description — AI generates trait values
193
- npx cbrowser persona-create "A 68-year-old retiree who just got their first smartphone"
237
+ # From a description
238
+ cbrowser persona create "A 68-year-old retiree who just got their first smartphone" --name retiree
194
239
  ```
195
240
 
196
241
  ### Abandonment Detection
197
242
 
198
- The simulation stops when a realistic user would give up:
243
+ A cognitive journey stops when a realistic user would give up:
199
244
 
200
- ```bash
201
- ⚠️ ABANDONED after 8 steps
245
+ ```text
246
+ ABANDONED after 8 steps
202
247
  Reason: Patience depleted (0.08) - "This is taking too long..."
203
248
  Friction points:
204
249
  1. Password requirements unclear (step 4)
205
250
  2. Form validation error not visible (step 6)
206
251
  ```
207
252
 
253
+ ### Replay a Journey for Free
254
+
255
+ Record a journey once with `--trace`, then replay it with no model calls. Replay is deterministic; a page that has changed since the recording stops the replay at the step that diverged.
256
+
257
+ ```bash
258
+ cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up" --trace
259
+ cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up" \
260
+ --replay-trace ~/.cbrowser/traces/<journeyId>.jsonl
261
+ ```
262
+
208
263
  ---
209
264
 
210
265
  ## Accessibility Empathy Testing
211
266
 
212
- Simulate how users with disabilities experience your site:
267
+ Simulate how people with disabilities experience your site. Without `--goal` it checks the page for barriers and needs no key; with `--goal` it also runs a short journey per persona.
213
268
 
214
269
  ```bash
215
- npx cbrowser empathy-audit "https://your-site.com" \
216
- --goal "complete signup" \
217
- --disabilities "motor-impairment-tremor" \
270
+ cbrowser empathy-audit "https://your-site.com" \
271
+ --personas motor-impairment-tremor,dyslexic-user \
272
+ --device iphone-16 \
218
273
  --html
219
274
  ```
220
275
 
276
+ Persona names accept the short aliases too (`adhd`, `autism`, `tremor`, `dyslexia`, ...). `--disabilities` is the older spelling of `--personas`.
277
+
221
278
  ---
222
279
 
223
280
  ## Constitutional AI Safety
224
281
 
225
- AI agents need boundaries. CBrowser classifies every action by risk level:
282
+ AI agents need boundaries. CBrowser classifies every action by risk:
226
283
 
227
284
  | Zone | Examples | Behavior |
228
285
  |------|----------|----------|
229
- | 🟢 **Green** | Navigate, read, screenshot | Auto-execute |
230
- | 🟡 **Yellow** | Click buttons, fill forms | Log and proceed |
231
- | 🔴 **Red** | Submit, delete, purchase | Requires verification |
232
- | ⬛ **Black** | Bypass auth, inject scripts | Never executes |
286
+ | 🟢 **Green** | Navigate, read, screenshot | Runs |
287
+ | 🟡 **Yellow** | Click buttons, fill forms | Logged and runs |
288
+ | 🔴 **Red** | Submit, delete, purchase | Refused unless forced |
289
+ | ⬛ **Black** | Bypass auth, inject scripts | Never runs |
290
+
291
+ **How red is decided:** by the element an action would activate as well as by the selector text. The selector string is classified first, so naming a dangerous action in a selector is refused even when the element reads harmless. The element is then classified however it is addressed: the same "Delete account" button is refused by its label, its id, its test id or a structural path, and an element with only a delegated click listener is judged by its own text. A click on a container is judged at the point it lands (beneath fixed bars and overlays, into open shadow roots, slots and same-origin frames, up to the control, pointer-cursor item or text-bearing item there) and the click is sent to that judged point. A refused click is never retried with a "healed" selector.
233
292
 
234
- **How red is decided:** by the element an action would activate as well as by the selector text. The selector string is classified first, as before, so naming a dangerous action in a selector is refused even when the element reads harmless. The element is then classified however it is addressed: the same "Delete account" button is refused by its label, its id, its test id or a structural path, and an element with only a delegated click listener is judged by its own text. A click on a container is judged at the point it lands - beneath fixed bars and overlays, into open shadow roots, slots and same-origin frames, up to the control, pointer-cursor item or text-bearing item there - and the click is sent to that judged point. A refused click is never retried with a "healed" selector. Gated: `click`, `smart_click`, hover-click and the daemon's click; `press_key`, `type_text` and `keyboard` (Enter, including a typed or pressed newline, or Space on the focused control - followed into shadow roots and same-origin frames - and Enter in a field whose form submits one, judged together with a combobox's `aria-activedescendant` item); a `drag` whose press and release share a control; and the NL test runner's `click at X, Y`. Caller-supplied page script is red by itself, whatever it does: `evaluate_script` over MCP, `evaluate`/`eval` on the CLI and the daemon's evaluate are refused without force and run nothing, because a script can activate any control without passing the element gate (`document.querySelector('#delete-account').click()` is the click `click` refuses, in one line). Names below a control (icon labels, image alts, slotted and open-shadow text, `<label for>`) and the path a form submits to (a submitter's `formaction`, otherwise the form's `action`) feed the same keyword classification. `force: true` on the MCP `click`, `press_key`, `type_text`, `drag` and `evaluate_script` tools (`smart_click` has none: use `click`), or `--force` on the CLI, proceeds and reports the zone.
293
+ **Gated:** `click`, `smart_click`, hover-click and the daemon's click; `press_key`, `type_text` and `keyboard` (Enter, including a typed or pressed newline, or Space on the focused control, followed into shadow roots and same-origin frames, and Enter in a field whose form submits one, judged together with a combobox's `aria-activedescendant` item); a `drag` whose press and release share a control; and the natural-language runner's `click at X, Y`. Caller-supplied page script is red by itself: `evaluate_script` over MCP, `evaluate`/`eval` on the CLI and the daemon's evaluate are refused without force and run nothing, because a script can activate any control without passing the element gate. Names below a control (icon labels, image alts, slotted and open-shadow text, `<label for>`) and the path a form submits to feed the same keyword classification. `force: true` on the MCP `click`, `smart_click`, `press_key`, `type_text`, `drag` and `evaluate_script` tools, or `--force` on the CLI, proceeds and reports the zone.
235
294
 
236
- Not judged, by design: clicking or typing into a text field or a contenteditable editor, and choosing a value with a native checkbox, radio or select or a `role=checkbox`, `radio` or `switch` - the submit that commits them is judged, but a switch or checkbox that saves on its own as it changes commits immediately and is not refused; and a link's address (a link to `/buy` is navigation). Not gated: cognitive journeys and other engines that choose their own clicks. Known limits: labels inside closed shadow roots or drawn by CSS, controls inside cross-origin frames, icon-only controls with no accessible name, a confirmation button with neutral text ("Confirm", "OK") inside a dialog, a form with no `action` or an empty `formaction` (it submits to the page's own address, which is not judged), an `aria-activedescendant` id that only resolves outside the field's own document or shadow root (not followed; ARIA references do not cross roots), a Tab inside typed text that moves focus before a later Enter, one round trip between the check and the click in which a page could swap the element, and keyword false positives: a "Purchase history" tab, a "Buyer protection" link, a `role=option` value picker such as "Pay with PayPal", a harmless "Apply" in a form posting to `/checkout/discount`, and an inert heading such as "Checkout" clicked by id (refusing it costs one forced retry; missing a listener-only "Delete account" cannot be undone). Classification uses English keyword patterns; when the element cannot be read, the selector text alone decides.
295
+ **Not judged, by design:** clicking or typing into a text field or a contenteditable editor; choosing a value with a native checkbox, radio or select, or a `role=checkbox`, `radio` or `switch` (the submit that commits them is judged, but a switch that saves as it changes commits immediately); and a link's address (a link to `/buy` is navigation). **Not gated:** cognitive journeys and other engines that choose their own clicks.
296
+
297
+ **Known limits:** labels inside closed shadow roots or drawn by CSS, controls inside cross-origin frames, icon-only controls with no accessible name, a confirmation button with neutral text ("Confirm", "OK") inside a dialog, a form with no `action` or an empty `formaction`, an `aria-activedescendant` id that only resolves outside the field's own root, a Tab inside typed text that moves focus before a later Enter, one round trip between the check and the click in which a page could swap the element, and keyword false positives such as a "Purchase history" tab, a "Buyer protection" link, a `role=option` picker such as "Pay with PayPal", or a harmless "Apply" in a form posting to `/checkout/discount`. Classification uses English keyword patterns; when the element cannot be read, the selector text alone decides.
237
298
 
238
299
  ---
239
300
 
240
- ## Site Knowledge System
301
+ ## Browser Control from the CLI
302
+
303
+ Each `cbrowser` command is its own process. The persistent profile keeps cookies and the last URL between commands, but not the page itself, so the next command reloads it. To keep one live page across commands (scroll position, open menus, form state), start the daemon:
304
+
305
+ ```bash
306
+ cbrowser daemon start --device iphone-16 --timeout 45m
307
+ cbrowser navigate "https://your-site.com"
308
+ cbrowser scroll down 600
309
+ cbrowser click "Pricing"
310
+ cbrowser screenshot pricing.png
311
+ cbrowser network list --filter api --json
312
+ cbrowser console --filter error
313
+ cbrowser daemon stop
314
+ ```
241
315
 
242
- CBrowser learns your site over time:
316
+ While the daemon runs, `navigate`, `click`, `fill`, `hover`, `type`, `press`, `keyboard`, `screenshot`, `extract`, `run`, `scroll`, `evaluate`, `capture`, `har`, `network` and `console` use its browser. Commands that would open a second browser on its profile refuse until you stop it.
243
317
 
244
- - **Page Understanding** — DOM analysis, page type classification, available affordances
245
- - **Site Model Learning** — Persistent knowledge graph across sessions
246
- - **Cross-Session Profiles** — AES-256-GCM encrypted cookie/state profiles
247
- - **Goal Decomposition** — Sub-goal trees with fallback strategies
318
+ Global browser flags work on every command that opens a browser: `--device <name>` (200+ presets; `cbrowser device list`), `--viewport 390x844` or a size name, `--browser chromium|firefox|webkit`, `--geo <preset or lat,lon>`, `--locale`, `--timezone`, `--no-headless` and `--no-persistent`. Flags also take `--flag=value`.
248
319
 
249
320
  ---
250
321
 
251
322
  ## Natural Language Testing
252
323
 
253
324
  ```txt
254
- # Test: Checkout Flow
255
- go to https://your-site.com/products
256
- click "Add to Cart" button
257
- verify page contains "1 item in cart"
258
- click checkout
259
- fill email with "test@example.com"
260
- click "Place Order"
261
- verify url contains "/confirmation"
325
+ # Test: Search
326
+ go to https://your-site.com
327
+ type "lamps" in the search box
328
+ click the search button
329
+ verify page contains "results"
330
+ verify url contains "/search"
262
331
  ```
263
332
 
264
333
  ```bash
265
- npx cbrowser test-suite checkout-test.txt --html
334
+ cbrowser test-suite search-test.txt --html --output report.json
266
335
 
267
336
  # Auto-repair broken tests
268
- npx cbrowser repair-tests broken-test.txt --auto-apply --verify
337
+ cbrowser repair-tests broken-test.txt --auto-apply --verify
269
338
  ```
270
339
 
340
+ Steps that would submit, delete or buy (for example `click "Place Order"`) are red zone, and the test runner never forces them. Keep those out of unattended suites or test them against a sandbox account.
341
+
271
342
  ---
272
343
 
273
344
  ## Visual Testing
274
345
 
275
346
  ```bash
276
347
  # AI visual regression
277
- npx cbrowser ai-visual capture "https://your-site.com" --name homepage
278
- npx cbrowser ai-visual test "https://staging.your-site.com" homepage --html
348
+ cbrowser ai-visual capture "https://your-site.com" --name homepage
349
+ cbrowser ai-visual test "https://staging.your-site.com" homepage --html
279
350
 
280
- # Cross-browser (Chrome, Firefox, Safari)
281
- npx cbrowser cross-browser "https://your-site.com" --html
351
+ # Cross-browser (Chromium, Firefox, WebKit)
352
+ cbrowser cross-browser "https://your-site.com" --html
282
353
 
283
- # Responsive (mobile, tablet, desktop)
284
- npx cbrowser responsive "https://your-site.com" --html
354
+ # Responsive (mobile, tablet, desktop by default)
355
+ cbrowser responsive "https://your-site.com" --html
285
356
 
286
- # A/B comparison (staging vs production)
287
- npx cbrowser ab "https://staging.your-site.com" "https://your-site.com" --html
357
+ # A/B comparison (staging against production)
358
+ cbrowser ab "https://staging.your-site.com" "https://your-site.com" --html
288
359
  ```
289
360
 
290
361
  ---
291
362
 
292
- ## Competitive UX Benchmark
363
+ ## Screen Capture
293
364
 
294
- Run identical cognitive journeys across your site and competitors:
365
+ Record a GIF, animated WebP or video of a page, plus a frame manifest an AI can read:
295
366
 
296
367
  ```bash
297
- npx cbrowser competitive-benchmark \
298
- --sites "https://your-site.com,https://competitor-a.com,https://competitor-b.com" \
299
- --goal "sign up for free trial" \
300
- --persona first-timer \
301
- --html
368
+ cbrowser capture start "https://your-site.com" --duration 5s --format gif,webp
369
+ cbrowser capture start "https://your-site.com" --until-element-gone ".spinner" --timeout 20s
302
370
  ```
303
371
 
304
- ---
305
-
306
- ## Upgrading to 19.0.0
307
-
308
- One breaking change: the agent-ready **accessibility** axis is now
309
- **agentPerceivability**, and three deprecated aliases are removed.
372
+ With the daemon running, `capture start` records the daemon's page while you drive it with other commands, and `capture stop` finishes it.
310
373
 
311
- | removed | use instead |
312
- |---|---|
313
- | `score.accessibility` | `score.agentPerceivability` |
314
- | `summary.dynamicContentCount` | `summary.deferredLoadingPatterns` |
315
- | `comparison.bestAccessibility` | `comparison.bestAgentPerceivability` |
316
- | issue `category: "accessibility"` | `category: "agentPerceivability"` |
374
+ ---
317
375
 
318
- All three replacements have carried identical values since 18.82.0, so if you
319
- upgraded within that range you can switch keys before upgrading and take this
320
- release with no further change.
376
+ ## Competitive UX Benchmark
321
377
 
322
- The rename is not cosmetic. That axis measures whether a *machine* can perceive
323
- your elements — ARIA present, elements carry text. It is **not** a WCAG
324
- conformance score, and it returned 100 on a page where `empathy_audit` found two
325
- WCAG violations. Both numbers were right; calling one of them "accessibility" was
326
- not. Run `empathy_audit` for conformance, and expect the two to differ.
378
+ Run identical cognitive journeys on your site and your competitors' (needs an Anthropic API key; one journey per site):
327
379
 
328
- On input, `category: "accessibility"` is still accepted and scores identically, so
329
- tools that *send* issues need not change immediately. Tools that *read* scores do.
380
+ ```bash
381
+ cbrowser competitive-benchmark \
382
+ --sites "https://your-site.com,https://competitor-a.com,https://competitor-b.com" \
383
+ --goal "sign up for free trial" \
384
+ --persona first-timer \
385
+ --html
386
+ ```
330
387
 
331
388
  ---
332
389
 
333
390
  ## Geo Proxy
334
391
 
335
- Test from 10 global regions via residential proxies:
392
+ Test from 10 global regions via residential proxies. Today `agent-ready-audit` is the command that routes through them:
336
393
 
337
394
  ```bash
338
- npx cbrowser cognitive-journey \
339
- --start "https://your-site.com" \
340
- --persona first-timer \
341
- --goal "sign up" \
342
- --geo-region uk
395
+ cbrowser agent-ready-audit "https://your-site.com" --geo-region uk
343
396
  ```
344
397
 
345
398
  **Regions:** `us-west`, `us-east`, `us-central`, `uk`, `germany`, `france`, `japan`, `australia`, `canada`, `brazil`
346
399
 
347
- Geo routing needs your own residential-proxy credentials — the package ships the
348
- mechanism and no keys. Set `IPROYAL_USERNAME` / `IPROYAL_PASSWORD`, or place a
349
- `geo-proxy.json` at `~/.cbrowser/`. Without either, `--geo-region` fails loudly
350
- rather than silently running from your own IP.
351
-
352
- A `geo-proxy.json` may define additional regions; they merge over the ten above.
400
+ Geo routing needs your own residential-proxy credentials; the package ships the mechanism and no keys. Set `IPROYAL_USERNAME` / `IPROYAL_PASSWORD`, or place a `geo-proxy.json` in `~/.cbrowser/`. Without either, `--geo-region` exits 1 rather than silently running from your own IP. A `geo-proxy.json` may define additional regions; they merge over the ten above.
353
401
 
354
- > **Corrected 2026-08-11.** This section previously advertised 12 regions
355
- > including `india` and `singapore`. Those are not in the shipped defaults and
356
- > resolve to nothing on a clean install — they existed only in a local config
357
- > file on one machine. Advertising them was a claim the package could not keep.
402
+ For location without a proxy (the browser's reported geolocation, not its IP), use `--geo new-york` or `--geo 40.71,-74.00` on any command.
358
403
 
359
404
  ---
360
405
 
361
406
  ## MCP Server Integration
362
407
 
363
- CBrowser runs as an MCP server for Claude.ai, Claude Desktop, and Claude Code.
408
+ CBrowser runs as an MCP server for Claude.ai, Claude Desktop and Claude Code.
364
409
 
365
- ### Claude.ai (Easiest — No Install)
410
+ ### Claude.ai (no install)
366
411
 
367
- Add the MCP connector and optionally install the Claude.ai Skill:
368
-
369
- 1. Go to [Customize → Connectors](https://claude.ai/customize/connectors) → "Add custom connector"
412
+ 1. Go to [Customize → Connectors](https://claude.ai/customize/connectors) and choose "Add custom connector".
370
413
  2. Paste: `https://demo.cbrowser.ai/mcp`
371
- 3. Download the [Claude.ai Skill (.zip)](https://cbrowser.ai/downloads/cbrowser-claudeai.skill) — gives Claude context about tools, pricing, and workflows
372
- 4. Go to Customize → Skills → Upload the zip
373
-
374
- > **Note:** The Claude.ai Skill is a lightweight knowledge file for the web interface. It is NOT the same as the Claude Code Skill (see below).
414
+ 3. Optionally download the [Claude.ai Skill (.zip)](https://cbrowser.ai/downloads/cbrowser-claudeai.skill), which gives Claude context about the tools and workflows, and upload it under Customize → Skills.
375
415
 
376
- ### Claude Code Skill (CLI — Not for Claude.ai)
416
+ The Claude.ai Skill is a small knowledge file for the web interface. It is not the Claude Code Skill below.
377
417
 
378
- For [Claude Code](https://claude.ai/claude-code) terminal users:
418
+ ### Claude Code Skill
379
419
 
380
420
  ```bash
381
421
  curl -fsSL https://raw.githubusercontent.com/alexandriashai/cbrowser/main/scripts/install-skill.sh | bash
382
- npm install -g cbrowser && npx playwright install
422
+ npm install -g cbrowser
383
423
  ```
384
424
 
385
- The Claude Code Skill is a full CLI integration with workflow routing, TypeScript tools, persistent memory, and constitutional safety. See [Skill Installation Guide](https://cbrowser.ai/docs/claude-skill-installation) for details.
425
+ See the [Skill Installation Guide](https://cbrowser.ai/docs/claude-skill-installation).
386
426
 
387
427
  ### Claude Desktop
388
428
 
@@ -409,50 +449,57 @@ The Claude Code Skill is a full CLI integration with workflow routing, TypeScrip
409
449
  }
410
450
  ```
411
451
 
412
- ### 122 MCP Tools
452
+ The local stdio server registers the same 130 tools as the hosted one, plus 7 that keep their state in the local process (`empathy_audit_init`, `empathy_audit_record_barrier`, `empathy_audit_complete_persona`, `empathy_audit_summarize`, `get_emotional_state`, `list_emotional_personas`, `trigger_emotional_event`). `cbrowser mcp-remote` runs your own HTTP server for remote clients.
453
+
454
+ ### 130 MCP Tools
413
455
 
414
456
  | Category | Tools | Count |
415
457
  |----------|-------|-------|
416
- | **Navigation** | `navigate`, `screenshot`, `scroll`, `extract`, `analyze_page`, `find_element_by_intent` | 6 |
417
- | **Interaction** | `click`, `smart_click`, `fill`, `dismiss_overlay` | 4 |
418
- | **Cognitive Core** | `cognitive_journey_init`, `cognitive_journey_update_state`, `cognitive_journey_autonomous`, `cognitive_effort`, `cognitive_load_estimate`, `site_cognitive_assessment` | 6 |
419
- | **Cognitive Transport** | `cognitive_distance`, `cognitive_interpolate`, `cognitive_coverage`, `transport_map` | 4 |
420
- | **Attention & Visual Story** | `attention_analysis`, `attention_compare`, `visual_cognitive_story` | 3 |
421
- | **Persona** | `list_cognitive_personas`, `compare_personas`, `persona_create_*`, `persona_questionnaire_*`, `persona_trait_lookup`, `persona_values_*` | 15 |
422
- | **Testing** | `nl_test_inline`, `nl_test_file`, `generate_tests`, `repair_test`, `detect_flaky_tests`, `coverage_map` | 6 |
423
- | **Visual Testing** | `visual_baseline`, `visual_regression`, `responsive_test`, `cross_browser_test`, `cross_browser_diff`, `ab_comparison` | 6 |
424
- | **Site Intelligence** | `page_understand`, `site_model_query`, `site_model_status`, `site_profile_*` | 6 |
425
- | **AI Friendliness** | `agent_ready_audit`, `ai_benchmark`, `webmcp_ready_audit`, `remediation_patches`, `llms_txt_generate`, `llms_txt_validate`, `llms_txt_diff`, `structured_data_suggest` | 8 |
426
- | **Analysis** | `hunt_bugs`, `chaos_test`, `competitive_benchmark`, `empathy_audit` | 4 |
427
- | **Performance** | `perf_baseline`, `perf_regression` | 2 |
428
- | **Marketing** *(Enterprise)* | `marketing_campaign_*`, `marketing_audience_discover`, `marketing_compete`, `marketing_funnel_analyze`, `marketing_influence_matrix`, `marketing_lever_analysis`, `marketing_personas_list`, `list_influence_patterns` | 11 |
429
- | **Security** | `security_audit`, `web_security_scan` | 2 |
430
- | **Stealth** *(Enterprise)* | `stealth_enable`, `stealth_disable`, `stealth_status`, `stealth_check`, `stealth_diagnose`, `cloudflare_detect`, `cloudflare_wait` | 7 |
431
- | **Session & Browser** | `save_session`, `load_session`, `delete_session`, `list_sessions`, `list_baselines`, `browser_health`, `browser_recover`, `reset_browser`, `heal_stats`, `status` | 10 |
432
- | **Utility** | `assert`, `ask_user`, `set_api_key`, `api_key_status`, `clear_api_key`, `get_api_key_prompt` | 6 |
433
-
434
- ### Token Cost & Selective Loading
435
-
436
- 122 MCP tools consume ~45,000 tokens in LLM context. For cost-sensitive use, load selectively:
458
+ | **Navigation and extraction** | `navigate`, `list_devices`, `screenshot`, `extract` | 4 |
459
+ | **Interaction** | `click`, `smart_click`, `fill`, `scroll`, `dismiss_overlay`, `hover`, `type_text`, `press_key`, `handle_dialog`, `upload_file`, `drag` | 11 |
460
+ | **Browser state** | `evaluate_script`, `get_console_messages`, `get_network_requests`, `manage_cookies`, `manage_storage`, `manage_tabs` | 6 |
461
+ | **Cognitive journeys** | `cognitive_journey_init`, `cognitive_journey_update_state`, `list_cognitive_personas` | 3 |
462
+ | **Cognitive transport and comparison** | `cognitive_effort`, `cognitive_load_estimate`, `cognitive_distance`, `cognitive_coverage`, `cognitive_interpolate`, `compare_personas`, `compare_personas_init`, `compare_personas_complete` | 8 |
463
+ | **Attention and visual testing** | `attention_analysis`, `attention_compare`, `transport_map`, `visual_baseline`, `visual_regression`, `cross_browser_test`, `cross_browser_diff`, `responsive_test`, `ab_comparison` | 9 |
464
+ | **Audits** | `agent_ready_audit`, `empathy_audit`, `webmcp_ready_audit`, `competitive_benchmark`, `site_cognitive_assessment`, `visual_cognitive_story` | 6 |
465
+ | **Analysis and bugs** | `analyze_page`, `generate_tests`, `find_element_by_intent`, `ai_benchmark`, `hunt_bugs`, `chaos_test` | 6 |
466
+ | **Testing** | `nl_test_inline`, `nl_test_file`, `repair_test`, `detect_flaky_tests`, `coverage_map`, `assert` | 6 |
467
+ | **Performance** | `perf_baseline`, `perf_regression`, `list_baselines` | 3 |
468
+ | **Remediation and llms.txt** | `remediation_patches`, `llms_txt_generate`, `llms_txt_validate`, `llms_txt_diff`, `structured_data_suggest` | 5 |
469
+ | **Site knowledge** | `page_understand`, `site_model_status`, `site_model_query`, `site_profile_list`, `site_profile_status`, `site_profile_delete`, `question_answer` | 7 |
470
+ | **Personas and values** | `persona_create_*` (6), `persona_traits_list`, `persona_manager`, `persona_update`, `persona_delete`, `persona_lookup`, `persona_values_list`, `persona_values_lookup`, `persona_trait_lookup`, `persona_category_guidance`, `persona_questionnaire_get`, `persona_questionnaire_build`, `list_influence_patterns` | 18 |
471
+ | **Capture and artifacts** | `capture_start`, `capture_stop`, `capture_status`, `journey_heatmap_gif`, `artifact_fetch` | 5 |
472
+ | **Sessions and browser** | `save_session`, `load_session`, `list_sessions`, `delete_session`, `status`, `browser_health`, `browser_recover`, `reset_browser`, `heal_stats` | 9 |
473
+ | **Security** | `security_audit` | 1 |
474
+ | **Marketing** | `marketing_personas_list`, `marketing_campaign_create`, `marketing_campaign_run`, `marketing_campaign_report_result` | 4 |
475
+ | **Utility** | `ask_user` | 1 |
476
+ | **Enterprise** *(stubs in the public package)* | `set_api_key`, `clear_api_key`, `api_key_status`, `get_api_key_prompt`, `cognitive_journey_autonomous`, `marketing_influence_matrix`, `marketing_lever_analysis`, `marketing_funnel_analyze`, `marketing_compete`, `marketing_audience_discover`, `marketing_discover_status`, `stealth_*` (5), `cloudflare_detect`, `cloudflare_wait` | 18 |
477
+
478
+ The 18 Enterprise tools are listed by the public package so clients can discover them; they run on [CBrowser Enterprise](#enterprise-edition) and answer with an upgrade notice elsewhere.
479
+
480
+ ### Token Cost and Selective Loading
481
+
482
+ All 130 tool definitions take a large share of an LLM's context. To expose only what you need, register tool families yourself:
437
483
 
438
484
  ```typescript
439
485
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
486
+ import { CBrowser } from "cbrowser";
440
487
  import {
441
488
  registerNavigationTools,
442
489
  registerInteractionTools,
443
490
  registerExtractionTools,
444
491
  } from "cbrowser/mcp-tools";
445
492
 
493
+ const browser = new CBrowser({ headless: true });
446
494
  const server = new McpServer({ name: "my-app", version: "1.0.0" });
447
- const context = { getBrowser: () => browser };
495
+ const context = { getBrowser: async () => browser };
448
496
 
449
- // ~5,000 tokens instead of ~45,000
450
497
  registerNavigationTools(server, context);
451
498
  registerInteractionTools(server, context);
452
499
  registerExtractionTools(server, context);
453
500
  ```
454
501
 
455
- **Categories:** `navigation`, `interaction`, `extraction`, `assertion`, `analysis`, `session`, `healing`, `visualTesting`, `testing`, `bugAnalysis`, `personaComparison`, `cognitive`, `cognitiveTransport`, `attention`, `siteKnowledge`, `values`, `performance`, `audit`, `browserManagement`, `security`, `marketing`, `remediation`, `llmsTxt`.
502
+ **Families:** `registerNavigationTools`, `registerInteractionTools`, `registerAdvancedInteractionTools`, `registerExtractionTools`, `registerBrowserStateTools`, `registerAssertionTools`, `registerAnalysisTools`, `registerAuditTools`, `registerBugAnalysisTools`, `registerCaptureTools`, `registerCognitiveTools`, `registerPersonaComparisonTools`, `registerVisualTestingTools`, `registerTestingTools`, `registerPerformanceTools`, `registerRemediationTools`, `registerLlmsTxtTools`, `registerSiteKnowledgeTools`, `registerValuesTools`, `registerPersonaLifecycleTools`, `registerPersonaCreationTools`, `registerSessionTools`, `registerHealingTools`, `registerBrowserManagementTools`, `registerSecurityTools`, `registerMarketingTools`, `registerGifTools`, `registerArtifactTools`, `registerAskUserTool`.
456
503
 
457
504
  ---
458
505
 
@@ -469,17 +516,20 @@ jobs:
469
516
  runs-on: ubuntu-latest
470
517
  steps:
471
518
  - uses: actions/checkout@v4
472
- - uses: alexandriashai/cbrowser@v18
519
+ - uses: alexandriashai/cbrowser@v20.0.0
473
520
  with:
474
- test-file: tests/e2e/checkout.txt
475
- sensitivity: strict
521
+ test-file: tests/e2e/search.txt
476
522
  ```
477
523
 
524
+ The action installs cbrowser and the browsers, then runs one of: `test-file` (a natural-language suite, with a JSON and an HTML report), `url` (writes a page analysis), or `command` (any cbrowser command). Outputs land in `cbrowser-output/` and are uploaded as an artifact. Pin the action to a release tag.
525
+
478
526
  ### Docker
479
527
 
528
+ There is no published image. Build one from the repository's `Dockerfile`:
529
+
480
530
  ```bash
481
- docker run --rm -v $(pwd)/tests:/work/tests ghcr.io/alexandriashai/cbrowser:latest \
482
- test-suite tests/checkout.txt --html
531
+ docker build -t cbrowser .
532
+ docker run --rm -v "$(pwd)/tests:/work/tests" cbrowser test-suite tests/search.txt --html
483
533
  ```
484
534
 
485
535
  ---
@@ -487,16 +537,16 @@ docker run --rm -v $(pwd)/tests:/work/tests ghcr.io/alexandriashai/cbrowser:late
487
537
  ## API Reference
488
538
 
489
539
  ```typescript
490
- import { CBrowser } from 'cbrowser';
540
+ import { CBrowser } from "cbrowser";
491
541
 
492
542
  const browser = new CBrowser({
493
543
  headless: true,
494
544
  persistent: true,
495
545
  });
496
546
 
497
- await browser.navigate('https://example.com');
547
+ await browser.navigate("https://example.com");
498
548
 
499
- const result = await browser.smartClick('Sign In', {
549
+ const result = await browser.smartClick("Sign In", {
500
550
  maxRetries: 3,
501
551
  minConfidence: 0.8,
502
552
  });
@@ -512,26 +562,38 @@ await browser.close();
512
562
  ### Modular Imports
513
563
 
514
564
  ```typescript
515
- import { runVisualRegression, runCrossBrowserTest } from 'cbrowser/visual';
516
- import { runNLTestSuite, detectFlakyTests, repairTest } from 'cbrowser/testing';
517
- import { huntBugs, runChaosTest, findElementByIntent } from 'cbrowser/analysis';
518
- import { capturePerformanceBaseline, detectPerformanceRegression } from 'cbrowser/performance';
565
+ import { runVisualRegression, runCrossBrowserTest } from "cbrowser/visual";
566
+ import { runNLTestSuite, detectFlakyTests, repairTest } from "cbrowser/testing";
567
+ import { huntBugs, runChaosTest, findElementByIntent } from "cbrowser/analysis";
568
+ import { capturePerformanceBaseline, detectPerformanceRegression } from "cbrowser/performance";
519
569
  ```
520
570
 
571
+ Also exported: `cbrowser/mcp-tools`, `cbrowser/mcp-remote`, `cbrowser/values` and `cbrowser/stealth`.
572
+
521
573
  ---
522
574
 
523
575
  ## Configuration
524
576
 
577
+ Environment variables override the config file, and command-line flags override both.
578
+
525
579
  | Variable | Default | Description |
526
580
  |----------|---------|-------------|
527
581
  | `CBROWSER_DATA_DIR` | `~/.cbrowser` | Data storage directory |
528
- | `CBROWSER_HEADLESS` | `true` | Run headless |
529
- | `CBROWSER_BROWSER` | `chromium` | Browser engine |
582
+ | `CBROWSER_HEADLESS` | `true` | Set `false` to show the browser |
583
+ | `CBROWSER_BROWSER` | `chromium` | `chromium`, `firefox` or `webkit` |
584
+ | `CBROWSER_VIEWPORT_WIDTH` / `CBROWSER_VIEWPORT_HEIGHT` | `1920` / `1080` | Default page size |
585
+ | `CBROWSER_DEVICE` | none | Default device preset |
586
+ | `CBROWSER_LOCALE` / `CBROWSER_TIMEZONE` | the host's | Browser locale and timezone |
530
587
  | `CBROWSER_TIMEOUT` | `30000` | Default timeout (ms) |
531
- | `CBROWSER_PROXY` | — | Proxy URL |
588
+ | `CBROWSER_PROXY` | none | Proxy URL (or `CBROWSER_PROXY_SERVER`, `_USERNAME`, `_PASSWORD`) |
589
+ | `CBROWSER_RECORD_VIDEO` | `false` | Record video of browser sessions |
590
+ | `NO_COLOR` | unset | Disable colour output |
591
+
592
+ **Config file:** the first of `./.cbrowserrc.json`, `./.cbrowserrc`, `./cbrowser.config.json`, `<data dir>/config.json` or `~/.cbrowserrc.json`. Keys include `browser`, `headless`, `viewport` (`{ "width", "height" }`), `device`, `locale`, `timezone`, `timeout` and `recordVideo`.
532
593
 
533
594
  ```bash
534
- npx cbrowser config set-api-key # Required for cognitive journeys
595
+ cbrowser config set-api-key <key> # for cognitive journeys
596
+ cbrowser doctor # check Node, Playwright, the browsers and the key
535
597
  ```
536
598
 
537
599
  ---
@@ -542,38 +604,36 @@ npx cbrowser config set-api-key # Required for cognitive journeys
542
604
 
543
605
  | Feature | Description |
544
606
  |---------|-------------|
545
- | **Marketing Suite** | Test which design/copy/UX patterns influence which buyer segments |
546
- | **8 Marketing Personas** | B2B (enterprise-buyer, startup-founder, procurement-manager, technical-evaluator) + Consumer (impulse-shopper, price-researcher, loyal-customer, skeptical-first-timer) |
547
- | **Influence Matrix** | Conversion effectiveness for variant × persona combinations |
548
- | **Lever Analysis** | Which psychological persuasion patterns work for each persona |
549
- | **Constitutional Stealth** | Full stealth measures for authorized penetration testing |
607
+ | **Marketing Suite** | Test which design, copy and UX patterns influence which buyer segments |
608
+ | **8 Marketing Personas** | B2B (enterprise-buyer, startup-founder, procurement-manager, technical-evaluator) and consumer (impulse-shopper, price-researcher, loyal-customer, skeptical-first-timer) |
609
+ | **Influence Matrix** | Conversion effectiveness for each variant and persona combination |
610
+ | **Lever Analysis** | Which persuasion patterns work for each persona |
611
+ | **Constitutional Stealth** | Stealth measures for authorized penetration testing |
550
612
  | **Web Security Scan** | OWASP-based security scanning |
613
+ | **Your own API key** | Per-account Anthropic keys for autonomous journeys |
551
614
 
552
- All 125 MCP tools included with no rate limits.
615
+ Unlimited tool use, with no credits.
553
616
 
554
617
  ---
555
618
 
556
619
  ## License
557
620
 
558
- **MIT License** — Free and open source. See [LICENSE](LICENSE).
621
+ **MIT License.** Free and open source. See [LICENSE](LICENSE).
559
622
 
560
623
  ---
561
624
 
562
625
  © 2026 Alexandria Eden · [cbrowser.ai](https://cbrowser.ai) · [alexandria.shai.eden@gmail.com](mailto:alexandria.shai.eden@gmail.com)
563
626
 
564
- ---
565
-
566
627
  ## Links
567
628
 
568
- - **[Documentation](https://cbrowser.ai/docs)** — Full docs, guides, API reference
629
+ - **[Documentation](https://cbrowser.ai/docs)**: guides and API reference
569
630
  - [NPM Package](https://www.npmjs.com/package/cbrowser)
570
631
  - [GitHub](https://github.com/alexandriashai/cbrowser)
571
632
  - [Issue Tracker](https://github.com/alexandriashai/cbrowser/issues)
572
- - [Roadmap](https://cbrowser.ai/docs/Roadmap)
573
633
 
574
634
  ### Research
575
635
 
576
- - [Research Methodology](https://cbrowser.ai/docs/Research-Methodology) — How the 25 traits were selected and validated
577
- - [Trait Index](https://cbrowser.ai/docs/Trait-Index) — All cognitive traits with citations
578
- - [Bibliography](https://cbrowser.ai/docs/Bibliography) — Academic references
579
- - [Persona Index](https://cbrowser.ai/docs/Persona-Index) — All 17 cognitive + 8 marketing personas
636
+ - [Research Methodology](https://cbrowser.ai/docs/Research-Methodology): how the traits were selected and validated
637
+ - [Trait Index](https://cbrowser.ai/docs/Trait-Index): every cognitive trait with citations
638
+ - [Bibliography](https://cbrowser.ai/docs/Bibliography): academic references
639
+ - [Persona Index](https://cbrowser.ai/docs/Persona-Index): every cognitive and marketing persona