docs(skills): describe the browser run sandbox as QuickJS - #342
Merged
Conversation
The reference called `page`, `context`, `browser`, and `console` "normal Playwright globals" and never used the word QuickJS. That reads as a Node-hosted Playwright script, which is the belief that produces `'Buffer' is not defined` and `'document' is not defined`. Rewrites the reference around the actual model — your code runs in QuickJS, not in the page and not in Node — and replaces "use the vendored Playwright client as the API reference" with tables of what is available and what is blocked, each naming the supported alternative. Also corrects two stale claims, both verified against the transport: - `context.newPage()` is supported; playwright-transport.ts routes `newPage` to `scope.createPage`. The doc said it was unavailable. - `page.$`/`page.$$` are supported; DENIED_METHODS blocks only Browser.*, BrowserContext.close/newCDPSession, Page.close, and Playwright.newRequest. The SKILL.md pointer now states the surprise instead of listing chapters, because a table of contents is skippable and a warning is not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
🟢 No documentation gap found — medium confidenceThe automated review found no documentation gap in the supplied changes. This review is advisory and does not block merging. |
This was referenced Aug 18, 2026
The skills content guard pinned the old "Sandbox boundaries" and "Artifact paths" headings, which this branch renamed. Assert the concepts the doc now teaches instead — the QuickJS runtime, the page.evaluate boundary, and artifacts — which is a stronger check than the old heading match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#347 moved published skills to skill-src/*.src.md sources built by litprompt. The rewrite and SKILL.md pointer must live in the sources so 'make verify' passes; the published .md files are regenerated from them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #337.
What
Rewrites
skills/webcmd-browser/references/browser-run-playwright.mdaround what thebrowser runruntime actually is, and rewrites the pointer to it inSKILL.md.Why
The old reference was 23 lines and described the environment as "normal Playwright globals." It never used the word QuickJS. That description is consistent with a Node-hosted Playwright script — which is what every public Playwright example looks like — so an agent reaching for
Bufferto build a file payload, ordocumentto read the DOM, is reasoning correctly from what we told it.Observed in an internal agent-behaviour eval across seven browser tasks:
Both mechanisms are addressed: the pointer now states the surprise (
browser runexecutes in QuickJS,documentis not in scope,Bufferdoes not exist), and the reference now answers the questions that were being asked.Structure
page.evaluate, no Node globals)setInputFilesQuickJS promise rejected: 'X' is not definedThe rewrite also fixes two claims the old doc got wrong, both re-verified against
playwright-transport.tsrather than carried over:context.newPage()works (newPageroutes toscope.createPage; it is closing the tab that fails), andpage.$/page.$$work (absent fromDENIED_METHODS).Cloud
Adds a hosted section rather than a separate document. Verified:
webcmd-cloudimportsrunBrowserProgramfrom@agentrhq/webcmd/browser/run(src/browser/hosted-browser.ts:17), so hosted mode runs the same QuickJS sandbox against a Browser Use browser over CDP. The rules are identical in both modes and the doc now says so. Nowebcmd-cloudchange.Tests
Documentation only; no code paths touched.
🤖 Generated with Claude Code