You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds named Playwright executor support to kernel browsers playwright.
kernel browsers playwright execute --executor <name>: runs the call in a named executor (sent only when set). Help text explains concurrency across executors, serialization within one, the always-present default executor bound to the active tab, named executors owning a background tab that page is bound to, and the limit of 8 named executors.
The execute result now shows the tab the call was bound to (Tab Target ID, Tab Created) in the table output; JSON output passes it through from the API response.
A 409 from execute (executor limit reached) is rendered as the API message followed by the current executors (name, busy marker, tab URL) and the delete command to run, instead of the generic error formatting.
New kernel browsers playwright executors list <id-or-name>: table of name, busy, created at, last used at, target ID, URL (default first); supports -o json.
New kernel browsers playwright executors delete <id-or-name> <executor> [--close-tab]: --close-tab defaults to true and is only sent when set explicitly. Deleting default reports a restart rather than a deletion, matching API semantics.
The playwright command group is now built by newBrowsersPlaywrightCommand() so it can be exercised in tests the same way the webmcp group is.
README command reference and examples updated.
Tests
cmd/browsers_playwright_executors_test.go covers command wiring and flag defaults, the executor request param (absent vs set), tab rendering in table and JSON output, the 409 limit error, list table/JSON rendering, delete path and close_tab query handling, API error cleanup, and argument validation, using an httptest server like the webmcp tests.
go build ./..., go vet ./..., go test ./..., and golangci-lint run all pass locally.
Before merge, the replace directive must be removed and github.com/kernel/kernel-go-sdk bumped to the released version that includes the executors surface (BrowserPlaywrightExecuteParams.Executor, Tab on the execute response, BrowserPlaywrightExecutorService.List/Delete, Executor, ExecutorList).
CI test and build jobs fail on this branch for that reason only: kernel/kernel-go-sdk-staging is a private module and the workflows have no credentials for it, so go mod download cannot fetch the replace target. They pass locally with access to the module and will pass in CI once the replace is dropped for the released SDK.
What failed:make test never got past go vet — the replace directive in go.mod points kernel-go-sdk at github.com/kernel/kernel-go-sdk-staging, which is a private module that CI's GITHUB_TOKEN cannot read, so every package that imports the SDK failed to resolve.
What the fix does: the executor API isn't in any released SDK version yet (checked through the latest, v0.119.0), so it can't simply be re-pinned the way the two earlier staging-replace removals were. Instead the fix drops the replace directive and keeps the feature by defining the executor types in the CLI:
executors list and executors delete call the endpoints through the SDK's generic client, with close_tab sent via option.WithQuery
execute passes executor using params.SetExtraFields, and reads tab out of the raw response, since the released response type omits it
make test passes locally and all 316 lines of the new tests pass unmodified — they assert at the HTTP level, so they verify the requests stay wire-identical to the staging-SDK version.
This is a stopgap: once the executor API ships in a released SDK, the local types should be replaced with the generated kernel.Executor/kernel.ExecutorList and the typed Executors service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds named Playwright executor support to
kernel browsers playwright.kernel browsers playwright execute --executor <name>: runs the call in a named executor (sent only when set). Help text explains concurrency across executors, serialization within one, the always-presentdefaultexecutor bound to the active tab, named executors owning a background tab thatpageis bound to, and the limit of 8 named executors.tabthe call was bound to (Tab Target ID,Tab Created) in the table output; JSON output passes it through from the API response.kernel browsers playwright executors list <id-or-name>: table of name, busy, created at, last used at, target ID, URL (default first); supports-o json.kernel browsers playwright executors delete <id-or-name> <executor> [--close-tab]:--close-tabdefaults to true and is only sent when set explicitly. Deletingdefaultreports a restart rather than a deletion, matching API semantics.newBrowsersPlaywrightCommand()so it can be exercised in tests the same way the webmcp group is.Tests
cmd/browsers_playwright_executors_test.gocovers command wiring and flag defaults, theexecutorrequest param (absent vs set), tab rendering in table and JSON output, the 409 limit error, list table/JSON rendering, delete path andclose_tabquery handling, API error cleanup, and argument validation, using anhttptestserver like the webmcp tests.go build ./...,go vet ./...,go test ./..., andgolangci-lint runall pass locally.This PR depends on kernel/kernel PR https://github.com/kernel/kernel/pull/4614 (named Playwright executors API), which is not merged yet.
It uses a preview SDK build via a
go.modreplace:Before merge, the replace directive must be removed and
github.com/kernel/kernel-go-sdkbumped to the released version that includes the executors surface (BrowserPlaywrightExecuteParams.Executor,Tabon the execute response,BrowserPlaywrightExecutorService.List/Delete,Executor,ExecutorList).CI
testandbuildjobs fail on this branch for that reason only:kernel/kernel-go-sdk-stagingis a private module and the workflows have no credentials for it, sogo mod downloadcannot fetch the replace target. They pass locally with access to the module and will pass in CI once the replace is dropped for the released SDK.