Repository navigation
Conversation
Add an optional executor parameter to execute_playwright_code, surface the tab page was bound to in its result, and report the current executors when the browser is at its named executor limit. Add manage_playwright_executors with list and delete actions. Point @onkernel/sdk at a vendored preview build that includes the executors surface.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace the vendored preview tarball with the published package that includes the Playwright executors surface.
2a5368c to
8b6b5b0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8503898. Configure here.
| "Calls without 'executor' run in the executor named 'default', which always exists and is the same as passing 'executor: \"default\"'. In the default executor, 'page' is bound to an active tab reported by Chrome. In single-window sessions, this is the foreground tab. When multiple browser windows are open, Chrome reports one active tab per window and the selected window is unspecified. 'context' is the BrowserContext that owns the selected page. Use 'browser.contexts()' to select a context or page explicitly.\n\n" + | ||
| "Pass any other name to run the call in a named executor. The first call with a new name creates it. Each named executor owns a tab: its first call opens a new background tab in the default browser context, and 'page' is bound to that tab on every later call while it stays open. Opening it does not change the active tab of an existing window. If the tab is closed, the next call opens a new one and reports 'tab.created: true'. Executor code can still reach other tabs through 'context' and 'browser'; ownership only decides what 'page' is bound to. Use named executors to drive several tabs of one browser in parallel.\n\n" + | ||
| "A browser can have at most 8 named executors; the default executor does not count. A call that would create another fails with an error listing the current executors; delete one with manage_playwright_executors (action 'delete'). Named executors are not removed automatically while the browser runs; when it shuts down, they are removed and their tabs closed.\n\n" + | ||
| "A named call to a browser whose image predates executors fails with an error instead of running on the active tab; calls without 'executor' keep working on every image.", |
There was a problem hiding this comment.
Tool description drops WebMCP preference
Medium Severity
The rewritten execute_playwright_code description no longer tells agents to check webmcp.listTools() first and prefer a suitable structured tool, using Playwright only when none is exposed. The new text only mentions the in-process helpers, so tool selection no longer steers toward WebMCP or the empty-catalog fallback.
Triggered by learned rule: WebMCP: describe() guidance for tool_ref, empty catalog, outcome_unknown
Reviewed by Cursor Bugbot for commit 8503898. Configure here.


Summary
Adds named Playwright executor support to the MCP server, matching the browser API's executor surface.
execute_playwright_codegains an optionalexecutorparameter (^[A-Za-z0-9_-]{1,64}$), passed to the SDK only when set. Omitting it (or passingdefault) keeps today's behavior:pageis bound to the active tab. Any other name runs the call in a named executor that owns its own background tab, so independent tasks can run in parallel in separate tabs of one browser while calls on the same executor stay serialized.tab(target_id,created) when the API reports the tabpagewas bound to.manage_playwright_executorstool in theplaywrighttoolset withlistanddeleteactions.deletetakesnameand an optionalclose_tab(default true); deletingdefaultrestarts it instead of removing it.tool-names.tsand the registration tests include the new tool.Dependencies
Depends on
@onkernel/sdk0.120.0 (released), which includesbrowsers.playwright.executorsand theexecutor/tabfields on execute.package.jsonis bumped to"@onkernel/sdk": "0.120.0"and the lockfile change is limited to that dependency.Tests
src/lib/mcp/tools/playwright.test.tscovers executor passthrough, name validation,tabin the result, the 409 limit error, and list/delete (defaultclose_tab, explicitclose_tab: false,defaultrestart wording, missing name, API 404).bunx tsc --noEmit --incremental false,bun test(902 pass), andbun run check:managed-auth-apppass locally.bun run format:checkreports only a pre-existing issue inAGENTS.md, which this PR does not touch.