@ticktockbent/charlotte 0.5.1 → 0.6.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.
- package/CHANGELOG.md +34 -0
- package/README.md +15 -23
- package/dist/server.js +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ All notable changes to Charlotte will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
<!-- Nothing yet -->
|
|
8
|
+
|
|
9
|
+
## [0.6.0] - 2026-04-03
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`charlotte_fill_form`** — Batch form fill tool that accepts an array of `{element_id, value}` pairs and fills an entire form in a single tool call. Supports text inputs, textareas, selects, checkboxes, radios, toggles, date inputs, and color inputs. Closes GAP-04. (#134)
|
|
14
|
+
- **Slow typing** — `charlotte_type` now accepts `slowly` (boolean) and `character_delay` (ms) parameters for character-by-character input. Required for sites with key-by-key event handlers (autocomplete, search-as-you-type). Closes GAP-05. (#126)
|
|
15
|
+
- **Lazy Chromium initialization** — Browser launch is deferred to the first tool call instead of startup, preventing idle Chromium instances when MCP clients spawn multiple server processes simultaneously. (#138)
|
|
16
|
+
- **MCP logging capability** — Server now declares `logging: {}` capability so the MCP SDK handles `logging/setLevel` requests from clients. (#138)
|
|
17
|
+
- **CLI improvements** — Migrated to `node:util` `parseArgs`, added `--help` flag, improved `--no-headless` handling. (#130, #133)
|
|
18
|
+
- **Default viewport 1440×900** — Increased from 800×600 for more realistic rendering. Centralized viewport config with device presets. (#121)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **BREAKING: Tool name prefix migration** — All 43 MCP tool names renamed from `charlotte:xxx` to `charlotte_xxx` to comply with the MCP spec's `[A-Za-z0-9_.-]` character constraint and silence SDK v1.26.0+ validation warnings. Closes #57. (#139)
|
|
23
|
+
- **Node.js requirement relaxed to >=20** — No Node 22-only APIs are used. Opens Charlotte to the broader Node 20 LTS user base. (#136)
|
|
24
|
+
- Select options capped at 50 to prevent oversized responses. (#126)
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **`pollUntilCondition` JS evaluation** — Replaced `new Function("return " + expr)` with CDP `Runtime.evaluate` in the wait utility, fixing multi-statement silent-return bug. Consistent with `evaluate.ts` and `wait-for.ts`. (#135)
|
|
29
|
+
- **Screenshot stale compositor frame** — Flush compositor frame before capture to prevent stale screenshots on SPA page transitions. (#120)
|
|
30
|
+
- **Timer leak in `waitForCompositorFrame`** — `clearTimeout` moved to `finally` block. (#120)
|
|
31
|
+
- **CDP error logging** — Unexpected CDP errors in layout extraction are now logged instead of silently swallowed. (#117)
|
|
32
|
+
- **macOS symlink test paths** — File output integration tests resolve `/var` symlinks on macOS. (#122)
|
|
33
|
+
- **CVE-2026-31988** — Override yauzl to 3.2.1 to address zip extraction vulnerability. (#106)
|
|
34
|
+
- **Server version from package.json** — Version string is now read from `package.json` at module load instead of being hardcoded. (#101)
|
|
35
|
+
|
|
36
|
+
### Improved
|
|
37
|
+
|
|
38
|
+
- **Snapshot store O(1) lookup** — Added Map index for constant-time snapshot retrieval by ID. (#116)
|
|
39
|
+
- **Interaction module split** — `interaction.ts` refactored into focused modules for maintainability. (#112, #114)
|
|
40
|
+
|
|
7
41
|
## [0.5.1] - 2026-03-14
|
|
8
42
|
|
|
9
43
|
### Added
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Charlotte decomposes each page into a typed, structured representation — landm
|
|
|
18
18
|
|
|
19
19
|
### Benchmarks
|
|
20
20
|
|
|
21
|
-
Charlotte v0.
|
|
21
|
+
Charlotte v0.6.0 vs Playwright MCP, measured by characters returned per tool call on real websites:
|
|
22
22
|
|
|
23
23
|
**Navigation** (first contact with a page):
|
|
24
24
|
|
|
@@ -35,11 +35,11 @@ Charlotte's `navigate` returns minimal detail by default — landmarks, headings
|
|
|
35
35
|
|
|
36
36
|
| Profile | Tools | Def. tokens/call | Savings vs full |
|
|
37
37
|
|:---|---:|---:|---:|
|
|
38
|
-
| full |
|
|
39
|
-
| browse (default) | 23 | ~3,900 | **~
|
|
40
|
-
| core | 7 | 1,677 | **~
|
|
38
|
+
| full | 43 | ~7,600 | — |
|
|
39
|
+
| browse (default) | 23 | ~3,900 | **~49%** |
|
|
40
|
+
| core | 7 | 1,677 | **~78%** |
|
|
41
41
|
|
|
42
|
-
Tool definitions are sent on every API round-trip. With the default `browse` profile, Charlotte carries ~
|
|
42
|
+
Tool definitions are sent on every API round-trip. With the default `browse` profile, Charlotte carries ~49% less definition overhead than loading all tools. Over a 20-call browsing session, that's **~40% fewer total tokens**. See the [profile benchmark report](docs/charlotte-profile-benchmark-report.md) for full results.
|
|
43
43
|
|
|
44
44
|
**The workflow difference:** Playwright agents receive 61K+ characters every time they look at Hacker News, whether they're reading headlines or looking for a login button. Charlotte agents get 336 characters on arrival, call `find({ type: "link", text: "login" })` to get exactly what they need, and never pay for the rest.
|
|
45
45
|
|
|
@@ -71,7 +71,7 @@ Agents receive landmarks, headings, interactive elements with typed metadata, bo
|
|
|
71
71
|
|
|
72
72
|
**Observation** — `observe` (3 detail levels, structural tree view), `find` (spatial + semantic search, CSS selector mode), `screenshot` (with persistent artifact management), `screenshots`, `screenshot_get`, `screenshot_delete`, `diff` (structural comparison against snapshots)
|
|
73
73
|
|
|
74
|
-
**Interaction** — `click`, `click_at` (coordinate-based), `type
|
|
74
|
+
**Interaction** — `click`, `click_at` (coordinate-based), `type` (with slow typing support), `select`, `toggle`, `submit`, `scroll`, `hover`, `drag`, `key` (single/sequence with element targeting), `wait_for` (async condition polling), `upload` (file input), `fill_form` (batch form fill), `dialog` (accept/dismiss JS dialogs)
|
|
75
75
|
|
|
76
76
|
**Monitoring** — `console` (all severity levels, filtering, timestamps), `requests` (full HTTP history, method/status/resource type filtering)
|
|
77
77
|
|
|
@@ -83,30 +83,30 @@ Agents receive landmarks, headings, interactive elements with typed metadata, bo
|
|
|
83
83
|
|
|
84
84
|
## Tool Profiles
|
|
85
85
|
|
|
86
|
-
Charlotte ships
|
|
86
|
+
Charlotte ships 43 tools (42 registered + the `charlotte_tools` meta-tool), but most workflows only need a subset. Startup profiles control which tools load into the agent's context, reducing definition overhead by up to 78%.
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
charlotte --profile browse # 23 tools (default) — navigate, observe, interact, tabs
|
|
90
90
|
charlotte --profile core # 7 tools — navigate, observe, find, click, type, submit
|
|
91
|
-
charlotte --profile full #
|
|
92
|
-
charlotte --profile interact #
|
|
93
|
-
charlotte --profile develop #
|
|
91
|
+
charlotte --profile full # 43 tools — everything
|
|
92
|
+
charlotte --profile interact # 31 tools — full interaction + dialog + evaluate
|
|
93
|
+
charlotte --profile develop # 34 tools — interact + dev_serve, dev_inject, dev_audit
|
|
94
94
|
charlotte --profile audit # 14 tools — navigation + observation + dev_audit + viewport
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
Agents can activate more tools mid-session without restarting:
|
|
98
98
|
|
|
99
99
|
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
charlotte_tools enable dev_mode → activates dev_serve, dev_audit, dev_inject
|
|
101
|
+
charlotte_tools disable dev_mode → deactivates them
|
|
102
|
+
charlotte_tools list → see what's loaded
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
## Quick Start
|
|
106
106
|
|
|
107
107
|
### Prerequisites
|
|
108
108
|
|
|
109
|
-
- Node.js >=
|
|
109
|
+
- Node.js >= 20
|
|
110
110
|
- npm
|
|
111
111
|
|
|
112
112
|
### Installation
|
|
@@ -443,18 +443,10 @@ Five pages cover navigation, forms, interactive elements, popups, delayed conten
|
|
|
443
443
|
|
|
444
444
|
## Known Issues
|
|
445
445
|
|
|
446
|
-
**Tool naming convention** — Charlotte uses `:` as a namespace separator in tool names (e.g., `charlotte:navigate`, `charlotte:observe`). MCP SDK v1.26.0+ logs validation warnings for this character, as the emerging [SEP standard](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) restricts tool names to `[A-Za-z0-9_.-]`. This does not affect functionality — all tools work correctly — but produces stderr warnings on server startup. Will be addressed in a future release to comply with the SEP standard.
|
|
447
|
-
|
|
448
446
|
**Shadow DOM** — Open shadow DOM works transparently. Chromium's accessibility tree pierces open shadow boundaries, so web components (e.g., GitHub's `<relative-time>`, `<tool-tip>`) render their content into Charlotte's representation without special handling. Closed shadow roots are opaque to the accessibility tree and will not be captured.
|
|
449
447
|
|
|
450
448
|
## Roadmap
|
|
451
449
|
|
|
452
|
-
### Interaction Gaps
|
|
453
|
-
|
|
454
|
-
**Batch Form Fill** — Add a `charlotte:fill_form` tool that accepts an array of `{element_id, value}` pairs and fills an entire form in a single tool call, reducing N sequential `type`/`select`/`toggle` calls to one.
|
|
455
|
-
|
|
456
|
-
**Slow Typing** — Add a `slowly` or `character_delay` parameter to `charlotte:type` for character-by-character input. Required for sites with key-by-key event handlers (autocomplete, search-as-you-type, input validation).
|
|
457
|
-
|
|
458
450
|
### Session & Configuration
|
|
459
451
|
|
|
460
452
|
**Connect to Existing Browser** — Add a `--cdp-endpoint` CLI argument so Charlotte can attach to an already-running browser via `puppeteer.connect()` instead of always launching a new instance. Enables working with logged-in sessions and browser extensions.
|
|
@@ -463,7 +455,7 @@ Five pages cover navigation, forms, interactive elements, popups, delayed conten
|
|
|
463
455
|
|
|
464
456
|
**Configuration File** — Support a `--config` CLI argument to load settings from a JSON file, simplifying repeatable setups and CI/CD integration.
|
|
465
457
|
|
|
466
|
-
**Full Device Emulation** — Extend `
|
|
458
|
+
**Full Device Emulation** — Extend `charlotte_viewport` to accept named devices (e.g., "iPhone 15") and configure user agent, touch support, and device pixel ratio via CDP, not just viewport dimensions.
|
|
467
459
|
|
|
468
460
|
### Feature Roadmap
|
|
469
461
|
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ticktockbent/charlotte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Token-efficient browser MCP server — structured web pages for AI agents, not raw accessibility dumps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -75,10 +75,13 @@
|
|
|
75
75
|
"CHANGELOG.md"
|
|
76
76
|
],
|
|
77
77
|
"engines": {
|
|
78
|
-
"node": ">=
|
|
78
|
+
"node": ">=20.0.0"
|
|
79
79
|
},
|
|
80
80
|
"mcpName": "io.github.TickTockBent/charlotte",
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
|
+
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"yauzl": "3.2.1"
|
|
83
86
|
}
|
|
84
87
|
}
|