Commit Graph

47 Commits

Author SHA1 Message Date
Tommy D. Rossi 2cb144099a Update pnpm-lock.yaml 2026-02-20 12:26:03 +01:00
Tommy D. Rossi a8481af89b add liveline page: recreation of benji.org/liveline editorial design
Recreates the benji.org/liveline page in the website folder using React,
Tailwind, and the same editorial design system. Charts are replaced with
static SVG placeholders.

Typography:
- Inter variable font from rsms.me (same source as next/font)
- font-weight 475 body, 560 headings, font-optical-sizing: auto
- 14px body, 20px line-height, -0.09px letter-spacing
- Near-black text rgb(17,17,17), 40% opacity secondary
- Display P3 accent colors with @supports fallback

Layout:
- 550px narrow content column, fixed TOC sidebar
- Stagger-in entrance animation with cascading delays
- Fixed header fade gradient (multi-stop white-to-transparent)
- Scroll-spy TOC highlighting via IntersectionObserver

Code blocks:
- Prism.js syntax highlighting with GitHub-light color palette
- Line numbers column with 20px right padding
- 12px / 18px font size

Props tables, dividers, captions, code blocks, bullet lists all
styled to match the original computed values.
2026-02-19 09:56:30 +01:00
Tommy D. Rossi 674e7c73ad release: @xmorse/playwright-core@1.59.3, playwriter@0.0.59
Fix 'Cannot find module graceful-fs' error on clean npx playwriter installs.

@xmorse/playwright-core@1.59.3:
- Add missing runtime dependencies: graceful-fs, retry, signal-exit
- Fixes GitHub #45

playwriter@0.0.59:
- Update @xmorse/playwright-core to 1.59.3
2026-02-11 19:28:08 +01:00
Tommy D. Rossi b60bbdd052 release: playwriter@0.0.58 2026-02-11 16:51:47 +01:00
Tommy D. Rossi 87188423b1 feat: reuse Playwright's internal CDP session instead of creating new WebSocket connections
Switch from getCDPSessionForPage (creates a new WS via Target.attachToTarget)
to getExistingCDPSessionForPage which reuses Playwright's internal CRSession.
This is critical for the relay server where Target.attachToTarget is intercepted
and cannot create real new sessions.

Also add FrameLocator support in accessibilitySnapshot — FrameLocator (from
locator.contentFrame()) is now auto-resolved to the real Frame object needed
for OOPIF CDP session attachment.

- New PlaywrightCDPSessionAdapter wrapping Playwright's CDPSession as ICDPSession
- New getExistingCDPSessionForPage() using context.getExistingCDPSession()
- resolveFrame() helper converts FrameLocator to Frame via elementHandle().contentFrame()
- getAriaSnapshot() frame param now accepts Frame | FrameLocator
- Executor CDP cache uses ICDPSession, borrowed sessions detach as no-op
- Test for getExistingCDPSession through the relay
- Updated framer iframe guide with alternative page.frames() example
- Bump playwright submodule to @xmorse/playwright-core@1.59.2
- Fix styles-api.md import path
2026-02-06 18:03:26 +01:00
Tommy D. Rossi 7f3fddb2af chore: update pnpm-lock.yaml 2026-02-06 10:37:45 +01:00
Tommy D. Rossi afd0840523 chore: wire forked playwright-core into workspace 2026-02-05 17:06:08 +01:00
Tommy D. Rossi bd38ba0532 feat: implicit return for single expressions using acorn parser
- Parse code with acorn to detect single expression statements
- Auto-wrap expressions with 'return await (...)' for implicit return
- Exclude side-effects: assignments, updates (x++), delete operator
- Update skill.md examples to remove console.log (keep await)
- Add unit tests for shouldAutoReturn function
2026-02-04 11:23:39 +01:00
Tommy D. Rossi 2b7cabb1c7 feat: shorten a11y labels and add ref resolver 2026-02-03 11:22:56 +01:00
Tommy D. Rossi 51704a0922 feat: add getPageMarkdown utility using Mozilla Readability
- Consolidate build scripts into single build-client-bundles.ts
- Add @mozilla/readability for Firefox Reader View content extraction
- New getPageMarkdown() utility extracts main page content as plain text
- Supports search and diff-since-last-call like other utilities
- Add test with file snapshot
2026-02-01 18:44:45 +01:00
Tommy D. Rossi a2fa91584d refactor: replace Playwright internals with in-page dom-accessibility-api
- Add a11y-client.ts: browser-side code using dom-accessibility-api (41KB)
- Single page.evaluate() call instead of multiple CDP roundtrips
- Zero element handles - everything runs in page context
- Stable refs from test IDs (data-testid, data-test-id, id) instead of e1, e2
- Add locator param to scope snapshots to subtrees
- Fixes cross-frame 'Unable to adopt element handle' error (issue #39)
2026-02-01 16:58:29 +01:00
Tommy D. Rossi f8d6640819 refactor: use vite rollupOptions instead of esbuild for offscreen.ts 2026-01-27 13:35:22 +01:00
Tommy D. Rossi 74497c2a1a feat: implement screen recording via chrome.tabCapture with offscreen document
- Use chrome.tabCapture.getMediaStreamId() from service worker
- Pass stream ID to offscreen document for MediaRecorder
- Recording survives page navigation (unlike getDisplayMedia)
- Requires user to click extension icon first (activeTab permission)
- Add esbuild to build offscreen.ts separately
- Update prompt docs with recording instructions
2026-01-27 13:35:22 +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 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 eb4d7a0f42 adding htmlrewriter 2026-01-10 19:26:00 +01:00
Tommy D. Rossi 3cd59600e9 filter labels for elements covered by opaque overlays
Uses elementsFromPoint() to check if element is blocked by opaque
overlays (modals, cookie banners, etc.). Skips elements where an
opaque element with pointer-events appears above the target in
the stacking order.

Correctly shows only visible, interactable elements.
2026-01-03 15:45:48 +01:00
Tommy D. Rossi d37b2eee92 vercel react router 2025-12-30 17:44:41 +01:00
Tommy D. Rossi 169f43599a Update pnpm-lock.yaml 2025-12-30 14:25:21 +01:00
Tommy D. Rossi 5e0cd2dd98 Add getReactSource to extract React component source location
- Add bippy library for React fiber introspection
- Create build-bippy.ts and build-selector-generator.ts using Bun.build
- Use CDP Runtime.evaluate instead of addScriptTag to bypass CSP
- Add getReactSource utility function exposed in MCP VMContext
- Works on local React dev servers with JSX transform (not production builds)
2025-12-29 16:11:13 +01:00
Tommy D. Rossi e4695e231d add support for remote agent in different host than extension. add
support for editing css.
2025-12-27 18:48:52 +01:00
Tommy D. Rossi 12dbad1ab4 do not send CDP commands too soon. 2025-12-21 17:20:07 +01:00
Tommy D. Rossi 6809ebea72 restart ws process if already running with different version 2025-12-21 16:48:07 +01:00
Tommy D. Rossi f64e7498cd fix: use os.tmpdir for logs, improving Windows compatibility 2025-12-20 22:13:13 +01:00
Tommy D. Rossi b0f786a166 less root crashes in mcp. more error logs. 2025-12-19 19:08:24 +01:00
Tommy D. Rossi daf01b8b69 use XDG data directory for log files 2025-12-18 15:43:55 +01:00
Tommy D. Rossi 31cd9b2a3f nn 2025-12-16 19:04:58 +01:00
Tommy D. Rossi d20cea7c49 add test for stagehand. Target.attachToTarget handling and better DCP types 2025-12-08 15:13:51 +01:00
Tommy D. Rossi 0df52a08c0 removed relayConnection.ts. added diff for ai snapshot. use search param 2025-11-25 10:35:39 +01:00
Tommy D. Rossi 9219912d35 add reset as tool 2025-11-25 09:57:38 +01:00
Tommy D. Rossi 7eb5060d71 fix tsc 2025-11-24 16:40:07 +01:00
Tommy D. Rossi 385a9d0642 nn 2025-11-24 16:33:57 +01:00
Tommy D. Rossi d52d591155 better test. spawn the extension with playwright 2025-11-22 11:43:52 +01:00
Tommy D. Rossi 35dbcab181 feat: add getLocatorStringForElement and fix timeout in getCurrentPage 2025-11-21 22:27:48 +01:00
Tommy D. Rossi e0292cf88b rename 2025-11-16 13:18:51 +01:00
Tommy D. Rossi eac38d8317 Update package.json 2025-11-15 22:30:40 +01:00
Tommy D. Rossi b79c480633 Update pnpm-lock.yaml 2025-11-15 18:55:51 +01:00
Tommy D. Rossi 1ac644d4bd new code 2025-11-15 13:06:08 +01:00
Tommy D. Rossi 50b453a64c nicer typescript types 2025-11-14 14:35:48 +01:00
Tommy D. Rossi 8e98c68de4 got it to work 2025-11-13 21:12:31 +01:00
Tommy D. Rossi fbacaf8832 adding more files 2025-11-13 19:47:35 +01:00
Tommy D. Rossi 078e7dd163 tsc 2025-11-13 19:27:04 +01:00
Tommy D. Rossi 1da15b71b3 updates 2025-11-13 19:25:11 +01:00
Tommy D. Rossi 8e5d68a6f2 updates 2025-11-13 19:24:05 +01:00
Tommy D. Rossi 12c5387409 init 2025-11-13 19:24:03 +01:00