From e96c40107865c219d84d954a0048f3b319079657 Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Sun, 25 Jan 2026 14:34:19 +0100 Subject: [PATCH] tell to kill relay when testing locally --- AGENTS.md | 41 ++++++++++++-------------------------- PLAYWRITER_AGENTS.md | 14 +++++++++---- skills/playwriter/SKILL.md | 2 ++ 3 files changed, 25 insertions(+), 32 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a513af9..f6dffe5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,13 +49,21 @@ make sure you have tsx installed globally: `pnpm i -g tsx` ### running CLI locally -to test CLI changes without publishing: + + +to test CLI changes without publishing you will also have to kill the relay server first, to have the latest relay server running. any commands using the cli then will restart this relay server. ```bash -tsx playwriter/src/cli.ts -e "await page.goto('https://example.com')" -tsx playwriter/src/cli.ts -e "console.log(await accessibilitySnapshot({ page }))" -tsx playwriter/src/cli.ts session new -tsx playwriter/src/cli.ts -s 1 -e "await page.click('button')" + # mac/linux: kill any existing relay on 19988 + lsof -ti :19988 | xargs kill + + # windows (powershell): kill any existing relay on 19988 + Get-NetTCPConnection -LocalPort 19988 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force } + + tsx playwriter/src/cli.ts -s 1 -e "await page.goto('https://example.com')" + tsx playwriter/src/cli.ts -s 1 -e "console.log(await accessibilitySnapshot({ page }))" + tsx playwriter/src/cli.ts session new + tsx playwriter/src/cli.ts -s 1 -e "await page.click('button')" ``` ### reloading extension during development @@ -586,26 +594,3 @@ const jsonSchema = toJSONSchema(mySchema, { ``` github.md - - - -## Source Code Reference - -Source code for dependencies is available in `opensrc/` for deeper understanding of implementation details. - -See `opensrc/sources.json` for the list of available packages and their versions. - -Use this source code when you need to understand how a package works internally, not just its types/interface. - -### Fetching Additional Source Code - -To fetch source code for a package or repository you need to understand, run: - -```bash -npx opensrc # npm package (e.g., npx opensrc zod) -npx opensrc pypi: # Python package (e.g., npx opensrc pypi:requests) -npx opensrc crates: # Rust crate (e.g., npx opensrc crates:serde) -npx opensrc / # GitHub repo (e.g., npx opensrc vercel/ai) -``` - - \ No newline at end of file diff --git a/PLAYWRITER_AGENTS.md b/PLAYWRITER_AGENTS.md index a40cf8c..9acf54f 100644 --- a/PLAYWRITER_AGENTS.md +++ b/PLAYWRITER_AGENTS.md @@ -50,10 +50,16 @@ make sure you have tsx installed globally: `pnpm i -g tsx` to test CLI changes without publishing: ```bash -tsx playwriter/src/cli.ts -e "await page.goto('https://example.com')" -tsx playwriter/src/cli.ts -e "console.log(await accessibilitySnapshot({ page }))" -tsx playwriter/src/cli.ts session new -tsx playwriter/src/cli.ts -s 1 -e "await page.click('button')" + # mac/linux: kill any existing relay on 19988 + lsof -ti :19988 | xargs kill + + # windows (powershell): kill any existing relay on 19988 + Get-NetTCPConnection -LocalPort 19988 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force } + + tsx playwriter/src/cli.ts -s 1 -e "await page.goto('https://example.com')" + tsx playwriter/src/cli.ts -s 1 -e "console.log(await accessibilitySnapshot({ page }))" + tsx playwriter/src/cli.ts session new + tsx playwriter/src/cli.ts -s 1 -e "await page.click('button')" ``` ### reloading extension during development diff --git a/skills/playwriter/SKILL.md b/skills/playwriter/SKILL.md index 1ee170e..2ac7d61 100644 --- a/skills/playwriter/SKILL.md +++ b/skills/playwriter/SKILL.md @@ -56,6 +56,8 @@ playwriter -s -e "" The `-s` flag specifies a session ID (required). Get one with `playwriter session new`. Use the same session to persist state across commands. +Default timeout is 10 seconds. you can increase the timeout with `--timeout ` + **Examples:** ```bash