Releases: remorses/playwriter
playwriter@0.3.1
- Auto-page creation enabled by default — MCP and CLI sessions now automatically create a blank Playwriter-enabled tab when no targets are available, so agents can start working immediately without manual tab setup. Set
PLAYWRITER_AUTO_ENABLE=falseto disable.
playwriter@0.3.0
- New
sinceLastCalloption forgetLatestLogs()— inspect browser logs after every action without seeing duplicate messages:The first call returns all buffered console logs and page errors for the page. Later calls return only new entries since the previousplaywriter -s 1 -e 'console.log(await getLatestLogs({ page, sinceLastCall: true }))'sinceLastCallread. Logs also persist across navigations, so hydration errors, redirect failures, and startup exceptions are not lost when the page changes. - CDP logs now rotate automatically —
~/.playwriter/cdp.jsonlis capped at 10,000 entries by default to prevent unbounded disk growth. SetPLAYWRITER_CDP_LOG_MAX_ENTRIESto tune the cap. Rotation keeps the newest half of the log and writes through an atomic temp-file rename to avoid corrupting the JSONL file. - More reliable
getLatestLogs({ page })results — page runtime errors and console messages emitted by related frame targets now appear in the returned log stream. This makes React and hydration failures visible throughpageerrorentries instead of requiring manual console listeners. - CLI-created sessions auto-open pages more reliably —
playwriter session newcan auto-create an initial extension tab even when the shared relay was originally started by MCP. This avoidsNo Playwright pages are availableafter all enabled tabs have closed. - Remote status checks send bearer tokens —
/extensions/statusand/extension/statusrequests now include the configured auth token, so remote relays using--tokenno longer reject status checks with 403 responses. - Concurrent relay startup no longer crashes on port races — simultaneous CLI and MCP commands now deduplicate startup work and treat a competing process winning port
19988as a clean handoff instead of surfacingEADDRINUSE. - Clearer multi-browser names in
playwriter session new— browser lists now use full user-agent client hints when available, so Chromium-family browsers such as Chrome Canary can show a more specific name. - Skill docs prefer
getLatestLogs()for page diagnostics — the generated Playwriter skill now tells agents to callgetLatestLogs({ page })instead of adding manual console listeners that miss errors emitted before listener setup.
Extension 0.0.94
-
Copy React Component Source Path right-click menu item. Right-click an element on a React page to copy the source file path (e.g.
src/components/Button.tsx:42) to your clipboard. Uses bippy to walk the React fiber tree. -
In-page floating toolbar with pin element mode. A compact dark pill toolbar injected into tabs with Playwriter attached. Pin elements to assign them to
globalThis.playwriterPinnedElemNand copy the reference to clipboard. Shared pin counter between toolbar and context menu. -
Pinned element clipboard copies a shell-ready command. Toolbar pins and context menu now copy
playwriter -e 'inspectPinnedElement(...)'with React component inspection when supported. Bash-safe single-quote wrapping handles any page content. -
Always-on ghost cursor injected into every attached tab via
Page.addScriptToEvaluateOnNewDocument. Auto-hides after 5s of inactivity. Press feedback uses a dedicated 140ms ease-out, independent of move duration. Scale and transform-origin tuned per Emil Kowalski design principles. -
Auto-relocate popup windows into tabs. OAuth popups and similar windows opened by connected tabs are moved into the source tab's window automatically, so agents no longer need
cmd+clickworkarounds. -
Cross-browser relay identity. Per-install
installIdpersisted inchrome.storage.localprevents relay takeover when multiple Chromium-family browsers connect. -
Fix debugger crash on pages with chrome-extension:// iframes (LastPass, SurfingKeys, password managers). Restricted iframes are removed before attach, and restricted child targets are filtered from CDP events.
-
Fix Target.detachFromTarget routing on root CDP session. Commands without a top-level sessionId now resolve via
params.sessionIdfallback instead of throwing. -
Runtime-scoped root CDP tab session IDs prevent collisions across multiple Chrome profiles.
-
Skip welcome tab in packaged automation builds. The CLI-bundled extension no longer opens
welcome.htmlon install.
playwriter@0.2.0
-
New
-f/--fileflag — execute JavaScript from a file instead of inline-estrings:playwriter -s 1 -f script.js
The file runs in the same sandbox as
-ewith all context variables (state,page,context, etc.) available.-eand-fare mutually exclusive. -
React component inspection for pinned elements — call
getReactComponentInfo({ locator })to get the nearest React component name, parent hierarchy, sanitized props, and source file locations. Non-React elements returnnull. -
Performance profiling guide — new
performance-profiling.mdresource covering TTFB, FCP, LCP, CLS measurement, heavy request detection, and interactivity blockers with concrete Playwriter + CDP snippets. -
Shell tab completions —
playwriternow supports shell completions via goke for tab completion on commands and flags. -
Security: token required on all requests regardless of source — the previous loopback bypass on
/cli/*,/recording/*, and/mcp-loglet any request from127.0.0.1skip auth. Under tunnel setups (traforo/ngrok/cloudflared), every public request arrives from localhost, making the bypass equivalent to no auth. Fixed. -
--tokenworks on every remote subcommand —session new,session list,session delete,session reset, andbrowser listall forwardAuthorization: Bearer …to the relay. Previously onlyplaywriter -esent the token. Thanks @ivanleomk for the original fix. -
POST /mcp-logis now token-protected — previously open to any reachable client. -
Fixed Next.js webpack layer prefixes in React source paths —
/(app-pages-browser)/,/(ssr)/,/(rsc)/and other webpack layer prefixes are now stripped correctly. -
Docs: absolute paths required for saved artifacts —
page.screenshot({ path }),page.pdf({ path }), etc. must use absolute paths since Playwright resolves them outside the sandboxedfs.
playwriter@0.1.0
- New in-page toolbar with pin mode (available when extension review completes) — every attached tab now gets a floating toolbar you can use to pin elements directly from the page. Pinning copies a natural-language prompt plus the exact
playwriter -e '…'code needed to inspect that element later, so pasted prompts are immediately useful to an agent instead of just exposing a fragile DOM handle. - Always-on ghost cursor with better motion (available when extension review completes) — the cursor overlay now appears on every Playwriter-attached tab, survives hard navigations, uses smoother move/press animation timing, and fades away after 5 seconds of idle time so manual browsing stays uncluttered. The next Playwright-driven mouse action brings it back instantly.
- Shared JavaScript dialogs no longer crash multi-client sessions — when multiple
connectOverCDP()clients auto-close the samealert()/confirm()/prompt(), duplicate best-effort closes are now ignored instead of surfacing an unhandled rejection that kills the process.
playwriter@0.0.105
-
Popup windows auto-relocate to tabs — when a connected page opens a popup via
window.openortarget="_blank", the extension moves it into the source window as a regular tab and auto-attaches it. Agents no longer need thecmd+clickworkaround for OAuth flows. -
New page warning replaces unreachable popup warning — the executor now emits
[WARNING] New page opened from current page (index N, initial url: ...)pointing agents at the new tab. The oldPopup window detected ... cannot be controlled by playwriterwarning is gone. -
Minimum extension version enforcement — if the installed extension is older than
0.0.80, the CLI and MCP warn the user to update viachrome://extensions. The warning is also surfaced in the MCP agent's warning stream. -
Fix multi-browser relay collisions — Chromium-based browsers that don't have a signed-in Google account (Chromium, Vivaldi, Helium, Dia, etc.) previously all shared the same
browser:Chromiumrelay key, causing them to replace each other's WebSocket connection. The extension now persists a per-install ID inchrome.storage.localand uses it as a stable fallback key. -
Fix extension takeover loop — after being replaced by another instance, the extension's reconnect loop now waits until the replacement is fully gone before reclaiming the relay slot. Previously it checked
activeTargets === 0, which is briefly true right after a fresh replacement connects, causing the old worker to steal the slot back and drop the active Playwright tab.
playwriter@0.0.103
Fixes env var leak and noisy output when auto-returning Playwright objects from the CLI.
-
Auto-returned Playwright handles are now silently skipped —
await page.goto(url)and similar single-expression code no longer prints anything when the return value is a Playwright handle (Response, Page, Browser, Request, Frame, etc.). These are programmatic references, not display data. The previous behavior also leaked everyprocess.envvariable (API keys, tokens, credentials) viautil.inspectat depth 4.By default expression results are printed and that was the cause — now we don't print those objects which would also waste LLM context.
To see data, explicitly return specific fields or use
console.log:return response.url() // prints the URL return response.status() // prints 200 console.log(response) // prints safe summary
-
console.log(response)now renders a clean summary (via@xmorse/playwright-core@1.59.7) — no env var dump, no 400K+ output:Response@response@abc123 { url: 'https://...', status: 200, statusText: 'OK', headers: [...] }
Fixes #82.
playwriter@0.0.102
-
Direct CDP connection mode (
--direct) — connect to Chrome's built-in debugging WebSocket without needing the Playwriter extension. Works with any Chromium-based browser (Chrome, Brave, Ghost Browser, Arc, Edge, etc.) that has debugging enabled viachrome://inspect/#remote-debuggingor--remote-debugging-port. Auto-discovers instances via DevToolsActivePort files and port scanning. For MCP, setPLAYWRITER_DIRECT=1env var.playwriter session new --direct playwriter browser list
In direct mode,
browser.contexts()gives access to pages across all open Chrome profiles. -
playwriter browser start(experimental) — launched a managed Chrome instance with the bundled Playwriter extension preloaded, useful for fresh VPS/AVPS setups. Now deprecated in favor ofsession new --direct. The command still works but is hidden from--help. -
Kitty Graphics Protocol support — when
AGENT_GRAPHICS=kittyis set, the CLI emits screenshots and resized images as Kitty Graphics Protocol escape sequences. Agents withkitty-graphics-agentautomatically extract images and pass them to the LLM as media parts.AGENT_GRAPHICS=kitty playwriter -s 1 -e "await screenshot({ page })" -
Screenshots and images now use PNG —
screenshotWithAccessibilityLabels()andresizeImageForAgent()now consistently output PNG instead of JPEG, fixingimage/pngvsimage/jpegmismatch errors in MCP clients. -
resizeImageForAgent— renamed fromresizeImage. Resized images are now automatically collected and included in responses. The old name still works as a backward-compatible alias. -
Chrome 136+ direct CDP discovery —
--directauto-discovery now detects Chrome instances where/json/versionreturns 404 (Chrome 136+ withchrome://inspectdebugging). Uses HTTP-only probing and never triggers Chrome's approval dialog. -
Show session cwd in
playwriter session list— session table now includes the working directory, making it easier to tell similar sessions apart. -
Fix session cwd leakage across relay restarts — relative
fspaths in the sandbox now resolve from the cwd captured bysession new. -
Contenteditable detection in snapshots — bare
contenteditableelements are now correctly detected as interactive textboxes in accessibility snapshots. -
PLAYWRITER_DIRECTonly accepts'1'— removed'auto'and'true'aliases. Explicitws://endpoints still work.
playwriter@0.0.89
-
More reliable downloads in extension mode: download behavior now stays compatible with both
Page.download*andBrowser.download*event paths, so flows likepage.waitForEvent('download')work consistently through the relay. -
Default action timeout is now 60 seconds, which reduces false click failures on slower real-world pages when interactions succeed but post-action waiting exceeds short budgets.
-
Ghost cursor injection is more stable for recording flows by using direct per-page injection instead of the unreliable init-script persistence path.
playwriter@0.0.80
-
Ghost cursor overlay during recording — smooth animated cursor visualizes automated mouse actions (clicks, moves, presses) directly on the page during screen recordings, driven by Playwright
onMouseActioncallbacks so bothpage.mouse.*andlocator.click()are captured -
Demo video creation — new
createDemoVideo()automatically detects and speeds up idle sections between interactions, with hardware encoder detection (h264_videotoolbox, etc.) and optimized FFmpeg output for social media -
resizeImage()sandbox utility — shrink screenshots before feeding them to LLMs; default mode fits within 1568×1568px, supports explicit width/height/maxDimension -
Descriptive click timeout errors — when
locator.click()times out, the error now explains why ("Element is not visible", "Element is not stable", etc.) instead of a generic timeout message -
Faster action timeouts — default Playwright action timeout reduced from 10s to 2s so agents get fast failures with descriptive errors; navigation timeout unchanged at 10s
-
State-aware page-close warnings — executor warns when a closed page is referenced in session state and reports which state key(s) need reassignment, with automatic fallback to another open tab
-
Popup detection warnings — executor emits
[WARNING]when popup windows open during execution so agents are aware of context changes -
recordingandghostCursornamespaces — cleaner API in the execute sandbox:recording.start/stop/isRecording/cancelandghostCursor.show/hide, with backward-compatible top-level aliases -
Multi-profile Chrome support — auto-selects the correct extension when multiple Chrome profiles are connected simultaneously
-
Snapshot diff scoped by locator —
showDiffSinceLastCallcache now isolated per locator scope; also skipped automatically whensearchis provided -
Relay state centralized to Zustand store — internal relay state (extensions, targets, playwright clients) unified in a single immutable atom, eliminating scattered Maps and fixing edge-case reconnect bugs
-
page.onMouseActioncallback in Playwright fork — fires for bothpage.mouse.*andlocator.click()actions;Locator.selector()now publicly typed (@xmorse/playwright-core@1.59.6) -
Suppress stack traces for timeout/abort errors — CLI and MCP output is cleaner; only the message is shown for expected timeout failures