Commit Graph

84 Commits

Author SHA1 Message Date
Tommy D. Rossi c38866dea9 Serve the Playwriter skill from playwriter.dev instead of GitHub.
`npx skills add remorses/playwriter` showed the GitHub owner in every
install command. Akarso already avoids that by hosting the skills.sh
discovery document on its own domain. Do the same on playwriter.dev.

The website now answers:

  GET /.well-known/agent-skills/index.json
  GET /.well-known/agent-skills/playwriter/SKILL.md

The SKILL.md bytes are imported from skills/playwriter/SKILL.md so the
served file cannot drift from git. The index includes a sha256 digest
because skills.sh checks it.

All public install commands now use:

  npx -y skills add https://playwriter.dev

This covers the README, website docs, welcome page, and tutorial page.
The extension version is 0.0.113 because those HTML pages changed.

The tutorial page is also shorter than the previous daemon walkthrough.
That rewrite was already in the working tree with the skill URL change.

Session: ses_fd657bfa3ffe8lJ3G5L134SgMB
2026-08-22 15:39:20 +02:00
Tommy D. Rossi e0a194dad3 add native ESM imports to execute calls
Compile executor input with vm.Script and connect dynamic import expressions to Node's main-context ESM loader. Relative module specifiers now resolve from each session working directory, while imported modules retain standard Node package resolution and permissions.

Document how local .js and .mjs helpers can accept Playwright objects, keep require and importModule as restricted alternatives, and add an integration test that imports a local module with a static built-in dependency.

Add a minor playwriter changeset with the VM execution change, user-facing example, resolution behavior, and permissions model.

Session: ses_ff521a317ffelw1fY4BzqzuaTl
2026-08-16 16:22:12 +02:00
Tommy D. Rossi ea2fa9b32f move Bloome sponsor section to bottom of README, center image
Session: ses_08ed752f1ffeAq8XhT2T4wOGWG
2026-07-17 10:41:02 -07:00
Tommy D. Rossi 0c33aa02a3 Merge branch 'main' of https://github.com/remorses/playwriter 2026-07-17 10:38:48 -07:00
Friday-s 07a962c1bd docs: use Bloome homepage banner image 2026-07-17 14:32:18 +08:00
Friday-s ab278588a9 docs: update Bloome sponsor links 2026-07-17 14:30:03 +08:00
Tommy D. Rossi 310756bb38 add playwriter stream: live RTMP streaming of a tab via ffmpeg
New `playwriter stream start|stop|status` CLI commands and `stream.*`
executor API for streaming a browser tab live to RTMP endpoints
(X Live, Twitch, YouTube). Built for 24/7 auto-generated content:
render a page, stream it forever.

Architecture:

  extension MediaRecorder (fMP4 chunks, tabCapture)
        │ same WS recordingData messages as recording (no protocol
        │ or extension changes, old extensions keep working)
        ▼
  relay: StreamRelay pipes chunks to ffmpeg stdin
        │ re-encode H.264 CBR + AAC, forced GOP (MediaRecorder
        │ output is VFR with uncontrolled keyframes)
        ▼
  -f flv rtmp://... (single) or tee muxer with per-output FIFO
  threads + onfail=ignore (multi-destination, one encode)

ffmpeg is a child of the relay process, so streams survive CLI exit
and run indefinitely (no 15-min recording cap).

Details:

- defaults match X Live recommended encoder settings: 1920x1080,
  9000 kbps, 30 fps, 3s keyframes, AAC 128k 44100Hz stereo; use
  --video-bitrate 6000 --keyframe-interval 2 for Twitch
- binary/recordingData WS routing offers chunks to StreamRelay first,
  falls back to RecordingRelay (tabId sets are disjoint because the
  extension refuses a second capture of the same tab)
- /stream/start|stop|status endpoints under privileged auth
- stream keys never leak: destinations redacted in logs/status and
  raw URLs scrubbed from ffmpeg stderr before storage
- backpressure: 32MB stdin cap kills a stalled stream instead of
  buffering unbounded
- stop flow hardened after oracle review: shared stop promise for
  concurrent stops, extension stop failures and forced/nonzero
  ffmpeg exits report failure instead of false success
- --no-audio injects silent anullsrc track (X Live requires audio)
- tests: ffmpeg arg snapshots + real fMP4 pipe integration tests
  (generate with ffmpeg testsrc, stream to local flv, ffprobe verify)
- docs: website/docs/streaming.mdx, short skill.md reference, README

Session: ses_0a8205a5cffeId4FJXly9O4aOr
2026-07-12 13:45:11 -07:00
Tommy D. Rossi be17216cd9 add Bloome sponsor section to README
Session: ses_0e868431fffekU2HcKDaqnDXFG
2026-06-30 10:14:49 +02:00
Tommy D. Rossi 0ad5219fd8 Add 'vs Built-in Chrome CDP' comparison to README and website
Chrome's --remote-debugging-port shows a persistent automation infobar
that agents cannot dismiss, interrupting users mid-workflow. Playwriter
runs silently with no blocking dialogs, enabling fully autonomous agent
operation without user intervention.

Added to both README.md (markdown table + blockquote) and
website/src/content/index.mdx (ComparisonTable component).
2026-04-03 12:32:57 +02:00
Tommy D. Rossi 3dda03ea7e feat(playwriter): launch a managed browser with bundled extension
Bundle the extension into the CLI so fresh AVPS and local source checkouts can start a Playwriter-ready Chrome for Testing or Chromium without separate installation steps. Also disable the packaged welcome tab, reuse Playwright\s managed Chromium fallback, surface searched browser paths on discovery failures, and document that managed browser launches already enable the tab-capture flags needed for recording on normal web pages.
2026-03-25 21:31:47 +01:00
Tommy D. Rossi 4044f1f7c7 assets 2026-03-12 22:07:15 +01:00
Tommy D. Rossi 2a2f21dd7b docs: use single quotes in all bash examples to prevent shell expansion
All `-e` arguments in bash examples now use single quotes instead of double
quotes. This prevents bash from interpreting `$`, backticks, and backslashes
inside JS code — a major pain point for agents that construct playwriter
commands programmatically.

Changes across skill docs, README, and website copies:

- **Single quotes for one-liners**: `playwriter -s 1 -e 'await page.goto("...")'`
- **Heredoc preferred for multiline**: `<<'EOF'` disables all bash expansion
- **Quoting rules summary**: explains when to use single quotes vs heredoc vs `$'...'`
- **Rewrote mistake #6**: now explains *why* double quotes break (bash `$` expansion
  silently corrupts regex like `/\$[\d.]+/` and template literals)
- **Added locator-scoped snapshot section**: shows `snapshot({ locator: page.locator("main") })`
  which dramatically reduces output size from ~150 lines to ~20 lines by snapshotting
  only a subtree instead of the full page
- **Added single-quote tip** to README quick start and SKILL.md stub

The locator-scoped snapshot feature already existed but wasn't documented.
Discovered during real-world Cloudflare dashboard automation where full page
snapshots were dominated by 60+ sidebar navigation links.
2026-02-28 14:03:34 +01:00
Tommy D. Rossi 6b71fc5351 add Playwright CLI comparison table to website and README
Closes #57

Highlights key differences: Playwriter uses your existing Chrome
(logins, extensions, cookies), can bypass captchas by disconnecting
the extension, lets you collaborate in the same browser window,
and gives full Playwright API + raw CDP access instead of a limited
shell command set.
2026-02-27 22:41:17 +01:00
Tommy D. Rossi 5173526475 docs: clarify Playwright video recording overhead
Add a README note that Playwright video recording sends base64 images for every frame while documenting Playwriter's claimed 100x efficiency.
2026-02-25 18:00:20 +01:00
Tommy D. Rossi f87b0243cd format 2026-02-22 15:21:38 +01:00
Tommy D. Rossi e475c2f582 readme: lead with 'uses your own Chrome' differentiator
The main selling point — using your actual Chrome session instead of
spawning a fresh browser — was buried in comparison tables halfway down.

Rewrote the tagline to highlight this upfront, added a short hero
paragraph explaining why fresh Chrome is a problem, and moved the
vs Playwright MCP comparison table to the top of the page.
2026-02-21 20:00:37 +01:00
Tommy D. Rossi 539aeaac91 rename accessibilitySnapshot to snapshot for shorter agent usage
The function is now exposed as `snapshot()` in the executor sandbox scope.
`accessibilitySnapshot` remains as a backward-compatible alias pointing to
the same function, so existing agents and saved commands continue to work.

Updated all code examples across skill.md, README, PLAYWRITER_AGENTS,
docs, tests, and the extension welcome page to use the shorter name.
2026-02-18 17:13:57 +01:00
Tommy D. Rossi fa68e33a78 feat: support HTTPS URLs in PLAYWRITER_HOST + remote access guide
PLAYWRITER_HOST now accepts full URLs like `https://x-tunnel.traforo.dev`
in addition to plain hostnames. Previously it always constructed
`http://${host}:19988` which broke when using traforo tunnels (HTTPS on
port 443).

Added `parseRelayHost()` utility that detects URL protocols and returns
correct HTTP/WebSocket base URLs. Updated all consumers:
- cli.ts: getServerUrl()
- mcp.ts: getLogServerUrl(), checkRemoteServer()
- executor.ts: checkExtensionStatus()
- utils.ts: getCdpUrl() (ws:// → wss:// for HTTPS hosts)

Plain hostnames still work as before (appends :19988).

Added docs/remote-access.md covering:
- Architecture: playwriter serve + traforo tunnel through Cloudflare
- Host and remote machine setup with env vars
- Use cases: remote Mac mini, user support, multi-machine, VM/devcontainer
- Security model: non-guessable URLs, token auth, localhost-only extension
  endpoint, no open ports, visible automation, instant revocation
2026-02-14 16:31:04 +01:00
Tommy D. Rossi 8ffaa9333b Add GitHub Sponsors funding option
- Create .github/FUNDING.yml to enable Sponsor button in repo sidebar
- Add Support section to README with sponsor link

Closes #46
2026-02-11 20:36:05 +01:00
Tommy D. Rossi d6adb460d5 fix: move log dir from /tmp/playwriter to ~/.playwriter (fixes #44) 2026-02-06 10:44:28 +01:00
Tommy D. Rossi a64fc2d8a0 add cdp jsonl logging and update log docs 2026-01-26 13:28:18 +01:00
Tommy D. Rossi 28f5734b31 Remove remote agent mention from MCP section 2026-01-25 12:09:42 +01:00
Tommy D. Rossi 2cb3a95e52 Note CLI + skill is preferred in MCP section 2026-01-25 12:01:43 +01:00
Tommy D. Rossi 5a5531c3cd Update README CLI step text 2026-01-25 12:00:33 +01:00
Tommy D. Rossi 5a5266b687 Add CLI quick start step to README installation 2026-01-25 11:58:36 +01:00
Tommy D. Rossi 5469af0d30 Add playwriter logfile command and fix documentation paths 2026-01-24 18:31:33 +01:00
Tommy D. Rossi a12b3737e2 docs: simplify editor example with hardcoded URL 2026-01-24 15:26:21 +01:00
Tommy D. Rossi d64229c1ab docs: fix editor example to use grep and proper URL/string format 2026-01-24 15:25:09 +01:00
Tommy D. Rossi 157c3a62d6 docs: add sandbox variables explanation to Examples 2026-01-24 15:23:31 +01:00
Tommy D. Rossi ab113914cd docs: use waitForResponse instead of networkidle 2026-01-24 15:21:34 +01:00
Tommy D. Rossi 2d060a6c59 docs: simplify examples by removing redundant -s flag 2026-01-24 15:21:15 +01:00
Tommy D. Rossi 6f19ec6b29 docs: use waitForLoadState instead of waitForTimeout 2026-01-24 15:20:07 +01:00
Tommy D. Rossi 7d8ab09f70 docs: add examples section, fix state usage, move Playwright API to bottom 2026-01-24 15:18:10 +01:00
Tommy D. Rossi e9ea0061bd docs: clarify session is stateful sandbox 2026-01-24 15:14:48 +01:00
Tommy D. Rossi 38b1b6d3ed docs: improve session isolation, extract MCP to separate file, add remote CLI 2026-01-24 15:10:53 +01:00
Tommy D. Rossi 43ff16d941 Update README.md 2026-01-24 14:28:45 +01:00
Tommy D. Rossi c8e0022790 update readme. show usage with cli first 2026-01-24 14:22:16 +01:00
Tommy D. Rossi d444079e9f use my own install-mcp lib 2026-01-20 14:25:02 +01:00
Tommy D. Rossi 495035ccef fix: sharp fallback with viewport clipping when unavailable 2026-01-19 14:07:01 +01:00
Tommy D. Rossi 68f5896ab6 Update README.md 2026-01-15 16:50:11 +01:00
Tommy D. Rossi e6d9cfe5e4 docs: clarify WebSocket security uses Origin validation, not CORS 2026-01-14 12:09:32 +01:00
Tommy D. Rossi 481cb4ddc8 feat: add CDP discovery endpoints (/json/version, /json/list)
Standard Chrome DevTools Protocol HTTP discovery endpoints that allow
tools like Playwright to connect using just the HTTP URL without needing
to call getCdpUrl() first.

- /json/version returns browser info and webSocketDebuggerUrl
- /json/list returns array of connected targets
- Supports GET/PUT methods and trailing slashes for compatibility
2026-01-12 17:16:20 +01:00
Tommy D. Rossi 85ff79726d Update README.md 2026-01-07 14:15:59 +01:00
Tommy D. Rossi d7056292cd format 2026-01-06 12:32:32 +01:00
Tommy D. Rossi 9c1eadb536 Update README.md 2026-01-06 12:32:28 +01:00
Tommy D. Rossi c456a5101c docs: mark right-click copy and auto enable env as unreleased 2026-01-06 10:46:40 +01:00
Tommy D. Rossi 09a363d2dc screenshotWithAccessibilityLabels 2026-01-05 10:11:36 +01:00
Tommy D. Rossi 6feb459c1e docs: improve remote agents section with MCP JSON examples 2026-01-04 21:37:28 +01:00
Tommy D. Rossi b06425cbe8 add comparison vs Claude Code browser extension 2026-01-03 19:56:36 +01:00
Tommy D. Rossi 1ad94f3930 release: playwriter@0.0.39, extension@0.0.66
- fix icon not updating on WS disconnect
- increase aria-labels auto-hide timeout to 30s
2026-01-03 17:38:28 +01:00