Skip to content

fix MCP path resolution (addresses #10), CDP connection limit, Playwright signature#12

Open
staylor wants to merge 1 commit into
lightpanda-io:mainfrom
staylor:docs-skill-paths-cdp-playwright
Open

fix MCP path resolution (addresses #10), CDP connection limit, Playwright signature#12
staylor wants to merge 1 commit into
lightpanda-io:mainfrom
staylor:docs-skill-paths-cdp-playwright

Conversation

@staylor

@staylor staylor commented May 5, 2026

Copy link
Copy Markdown

What & why

Three small unrelated factual corrections to SKILL.md, grouped because they're all docs-only one-liners.

1. MCP path resolution (addresses point 2 of #10)

The current MCP setup snippets hard-code $HOME/.local/bin/lightpanda, which has two problems:

  • Bash form: ignores macOS where the binary may not live in ~/.local/bin.
  • JSON form: $HOME doesn't expand inside JSON config strings — this is the second bullet in greenrd's issue Fix Claude Code plugin #10.

Fix:

  • Bash form (Claude Code CLI): "$(command -v lightpanda)" resolves the absolute path at install time, regardless of where the binary lives. A one-line comment reminds users to install Lightpanda first (the Install section above MCP setup).
  • JSON form: a literal /absolute/path/to/lightpanda placeholder with explicit instruction to fill it in via command -v lightpanda after install. No per-OS path examples (those would presuppose the install method, which varies).

This does not close #10 — only the second bullet. Point 1 ("the skills field is supposed to point to a parent directory of a directory containing a SKILL.md file") is about .claude-plugin/marketplace.json, which this PR doesn't touch.

2. CDP connection limit is now 16, not 1

The Important Notes bullet currently says:

CDP connection limits: Only 1 CDP connection per process.

This hasn't been true for a while — current Lightpanda defaults to 16 simultaneous connections per process and exposes --cdp-max-connections N to tune it. Updates the bullet text and adds the flag to the lightpanda serve options list.

3. Playwright connectOverCDP snippet uses the canonical signature

Both Playwright overloads (connectOverCDP(endpointURL) and connectOverCDP({ endpointURL })) are valid and both work in playwright-core@1.58. The current example uses the object form. Switching to the string form matches what Playwright's own JSDoc Usage examples and published API docs lead with.

This one is a style preference, not a bug. Happy to drop it if you'd prefer the object form, or split it into its own PR.

Verified

  • lightpanda serve --cdp-max-connections 32 --port 9222 accepted by current Lightpanda binary.
  • chromium.connectOverCDP('ws://127.0.0.1:9222') works under playwright-core@1.58.2.
  • command -v lightpanda resolves to brew's /opt/homebrew/bin/lightpanda on Apple Silicon (verified directly). The Linux path is the install script's deterministic install location (~/.local/bin/lightpanda by default, override via LIGHTPANDA_DIR) — verified by construction, not direct execution.

Stack

Independent of #11 (install.sh fixes) and #13 (--block-private-networks defaults) — all three branch off main directly and can be reviewed/merged in any order.

@staylor staylor force-pushed the docs-skill-paths-cdp-playwright branch from 9365870 to 07bd045 Compare May 5, 2026 14:47
@staylor staylor changed the title docs(skill): fix MCP path resolution (closes #10), CDP connection limit, Playwright signature fix MCP path resolution (addresses #10), CDP connection limit, Playwright signature May 5, 2026
Three small unrelated factual corrections, grouped because they are
all docs-only one-liners.

1. MCP path resolution (addresses point 2 of lightpanda-io#10)
   - Claude Code CLI form: "$(command -v lightpanda)" resolves the
     absolute path at install time, regardless of where the binary
     lives.
   - JSON config form: literal /absolute/path/to/lightpanda
     placeholder with instruction to fill it in via
     command -v lightpanda. No per-OS examples (those would
     presuppose the install method, which varies).

   This does NOT close lightpanda-io#10 — only the second bullet of greenrd's
   issue. Point 1 (the 'skills' field in marketplace.json) is a
   different file this PR doesn't touch.

2. CDP connection limit
   The Important Notes bullet said 'Only 1 CDP connection per process'.
   Current Lightpanda defaults to 16 and exposes --cdp-max-connections
   N to tune it. Updates the bullet and adds the flag to the
   lightpanda serve options list.

3. Playwright connectOverCDP signature
   Both Playwright overloads (string and object) work in playwright-core
   1.58, but Playwright's own JSDoc Usage examples and published docs
   use the string form (chromium.connectOverCDP('ws://...')). This is
   a style preference, not a bug — happy to drop or split out.
@staylor staylor force-pushed the docs-skill-paths-cdp-playwright branch from 07bd045 to 3a1a1b5 Compare May 5, 2026 14:56
@staylor staylor marked this pull request as ready for review May 5, 2026 15:29
@krichprollsch

Copy link
Copy Markdown
Member

I tried to address point 1. into #15 but I agree your PR is better regarding that.
Can you rebase it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants