Commit Graph

504 Commits

Author SHA1 Message Date
Tommy D. Rossi 31bfddef74 chore: release playwriter@0.0.53 2026-01-24 14:26:26 +01:00
Tommy D. Rossi e11322905e add colors to CLI setup messages 2026-01-24 14:25:20 +01:00
Tommy D. Rossi 1d744e7995 fix CLI relay server startup and extension reconnection
- detect source vs compiled via __filename.endsWith('.ts') instead of env var
- add waitForExtension() to poll for extension connection after server start
- CLI waits up to 10s for extension to reconnect before executing commands
2026-01-24 14:23:50 +01:00
Tommy D. Rossi c8e0022790 update readme. show usage with cli first 2026-01-24 14:22:16 +01:00
Tommy D. Rossi fe28456719 Update .gitignore 2026-01-24 14:21:13 +01:00
Tommy D. Rossi 1474b2c38c chore: release playwriter@0.0.52 2026-01-24 13:36:13 +01:00
Tommy D. Rossi 61b0ced02f Update .gitignore 2026-01-24 13:34:44 +01:00
Tommy D. Rossi 2a62fa60d6 add snapshot format option with deduplication for accessibility snapshots
- add compactSnapshot, interactiveSnapshot, deduplicateSnapshot functions
- add format option to accessibilitySnapshot() with default 'interactive-dedup'
- deduplication removes redundant parent names that repeat child content
- compression stats: HN 72% smaller, GitHub 68% smaller vs raw
- add format documentation comment explaining expected aria snapshot structure
2026-01-24 13:32:25 +01:00
Tommy D. Rossi 19d8c78d90 delete files 2026-01-24 13:19:36 +01:00
Tommy D. Rossi 53758bc68c Update .gitignore 2026-01-24 13:19:32 +01:00
Tommy D. Rossi 7c1f00f0f6 refactor tests functions into utils 2026-01-24 13:19:27 +01:00
Tommy D. Rossi de3941da48 add aria snapshots functions 2026-01-24 13:19:13 +01:00
Tommy D. Rossi c2766cb386 feat: pass PLAYWRITER_AUTO_ENABLE when CLI starts relay server 2026-01-24 13:01:57 +01:00
Tommy D. Rossi f391eda881 Update package.json 2026-01-24 12:57:57 +01:00
Tommy D. Rossi 3ef771240a Update package.json 2026-01-24 12:57:41 +01:00
Tommy D. Rossi 1af5aac0cc feat: add session management CLI commands with @xmorse/cac
- Replace cac with @xmorse/cac for space-separated commands
- Add 'playwriter session new' to get new session ID
- Add 'playwriter session list' to show sessions and state keys
- Add 'playwriter session reset <id>' to reset a session
- Update SKILL.md with new CLI docs and multiline examples
- Put -s flag before -e in all examples
2026-01-24 12:57:21 +01:00
Tommy D. Rossi b7edfb52b1 refactor: make SKILL.md source of truth, generate prompt.md from it 2026-01-24 12:21:22 +01:00
Tommy D. Rossi f9869a59f2 refactor: move welcome.html to src/, simplify vite build config, cleanup cli.ts formatting 2026-01-23 23:57:25 +01:00
Tommy D. Rossi 18d0cdb646 Add prompt.md to website public and link in CLI help 2026-01-22 22:06:29 +01:00
Tommy D. Rossi 580c5f4597 docs: update error message references in agent prompts 2026-01-22 20:16:09 +01:00
Tommy D. Rossi fd6ce49a2d test: update assertion for new error message 2026-01-22 20:16:06 +01:00
Tommy D. Rossi 8b603ff766 fix: show log file path on connection refused error 2026-01-22 20:16:03 +01:00
Tommy D. Rossi 2b9d6b4952 feat: improve error messages for extension connection states
- Split NO_TABS_ERROR into EXTENSION_NOT_CONNECTED_ERROR and NO_TABS_ENABLED_ERROR
- Add checkExtensionStatus() to detect extension state before connecting
- Provide actionable guidance in error messages
2026-01-22 20:16:00 +01:00
Tommy D. Rossi 7e2b4e2546 fix: restore relay server auto-recovery on every execute
The old mcp.ts called ensureRelayServer on every execute call to
auto-recover from relay server crashes. This was missing in the
refactored code.
2026-01-22 20:04:05 +01:00
Tommy D. Rossi 62cf6db240 security: block browser access to CLI endpoints
- Add localhost-only check for /cli/* endpoints
- Reject requests with Origin header (browsers always send it, CLI tools don't)
- Prevents website-based attacks even with CORS
2026-01-22 19:54:16 +01:00
Tommy D. Rossi 67dd9aaef4 feat: add -e/--eval CLI flag for code execution
- Add -e/--eval flag to execute JavaScript code via relay server
- Extract PlaywrightExecutor class to shared executor.ts module
- Extract relay server utilities to relay-client.ts
- Add /cli/execute, /cli/reset, /cli/sessions endpoints
- Fix CDP session client ID collision by using fresh unique URLs for each connection
2026-01-22 19:48:43 +01:00
Tommy D. Rossi 58dc932990 Add CLI usage instructions to playwriter skill 2026-01-22 19:31:15 +01:00
Tommy D. Rossi eea0e57a1b Generate playwriter skill for add-skill discovery 2026-01-22 19:27:55 +01:00
Tommy D. Rossi 7fa6049b88 Update PLAYWRITER_AGENTS.md 2026-01-21 21:22:35 +01:00
Tommy D. Rossi 8ab0fda2b7 fix: preserve tabs during relay reconnects 2026-01-21 21:20:29 +01:00
Tommy D. Rossi 93fdcb6b35 feat: first extension with active tabs keeps connection instead of being replaced
- Server rejects new extension (code 4002) if existing has active tabs
- Idle extensions (no tabs) can still be replaced
- Extension properly enters polling mode when rejected during handshake
- /extension/status now returns activeTargets count for smarter reconnection
2026-01-21 19:09:37 +01:00
Tommy D. Rossi c3a6003fa9 gitignore shadcn-ui-accessibility.md snapshot 2026-01-21 18:22:34 +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 6af2373fe6 agents 2026-01-17 00:34:41 +01:00
Tommy D. Rossi 141ace59d7 Update prompt.md 2026-01-17 00:18:43 +01:00
Tommy D. Rossi d2925832aa serve: add --replace flag, make --token optional for localhost 2026-01-16 19:43:39 +01:00
Tommy D. Rossi 868d339a09 exit serve if already connected 2026-01-16 19:36:12 +01:00
Tommy D. Rossi 69ac4db338 release: playwriter@0.0.49 2026-01-16 16:25:24 +01:00
Tommy D. Rossi 11d0612736 Merge branch 'main' of https://github.com/remorses/playwriter 2026-01-16 16:24:16 +01:00
FiftyX 5631fc3d19 add CORS support to relay server for local extension development (#25)
* fix: add CORS middleware to allow extension connection

* fix(cors): validate extension ID to prevent other extensions from accessing endpoints

---------

Co-authored-by: Tommy D. Rossi <beats.by.morse@gmail.com>
2026-01-16 16:24:06 +01:00
Tommy D. Rossi cc699670b4 fix: clarify error messages when another Playwriter extension connects 2026-01-16 13:07:24 +01:00
Tommy D. Rossi 7ebd3c190e chore: release playwriter@0.0.48 2026-01-15 16:51:18 +01:00
Tommy D. Rossi 68f5896ab6 Update README.md 2026-01-15 16:50:11 +01:00
Tommy D. Rossi 0ba4acfbce fix: disable Network buffering by default to fix SSE streaming
Fixes #22

CDP's Network.enable buffers response bodies by default, which breaks
SSE/streaming - data arrives at Chrome but ReadableStream never receives it.

Changes:
- Intercept Network.enable in relay, default maxTotalBufferSize: 0
- Agents can re-enable buffering via Network.disable + Network.enable
  with explicit buffer sizes when they need response.body()
- Added test and documentation for reading response bodies
2026-01-15 15:55:18 +01:00
Tommy D. Rossi 171317f8cb fix: auto-switch to another page when default page is closed 2026-01-15 13:43:45 +01:00
Tommy D. Rossi cda69383f0 clean up deps: remove unused, update zod v4, replace chalk with picocolors 2026-01-15 13:32:54 +01:00
Tommy D. Rossi 423365caae resize screenshots with sharp to optimize Claude token usage 2026-01-15 13:26:33 +01:00
Tommy D. Rossi b7738ffdd5 tell about using css scale for screenshots 2026-01-15 13:23:28 +01:00
Tommy D. Rossi b86e215570 Create CHANGELOG.md 2026-01-15 12:51:23 +01:00