Repository navigation
feat: add PWA automation tools - #2430
Merged
Merged
Conversation
Contributor
Author
|
@OrKoN Puppeteer 25.4.0 now contains the merged browser-level PWA APIs, and the MCP integration is ready for review. |
OrKoN
requested changes
Jul 28, 2026
OrKoN
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR. A few comments below:
OrKoN
reviewed
Jul 28, 2026
LuHuangMSFT
force-pushed
the
feat-pwa-tools
branch
from
July 28, 2026 17:40
7df28d2 to
f648aad
Compare
Contributor
Author
OrKoN
reviewed
Jul 29, 2026
LuHuangMSFT
force-pushed
the
feat-pwa-tools
branch
2 times, most recently
from
August 6, 2026 18:53
0b2092f to
1071cbf
Compare
Contributor
Author
|
@OrKoN Puppeteer 25.5.0 is now on main, so I rebased and removed the duplicate MCP network-restriction guard. Ready for another look. Thanks! |
LuHuangMSFT
force-pushed
the
feat-pwa-tools
branch
from
August 9, 2026 21:36
f8ed28d to
c1f06fd
Compare
Add an off-by-default Progressive Web Apps category backed by the Puppeteer 25.4.0 browser APIs. The tools install, launch, inspect, and uninstall PWAs, plus install the currently selected page using Chrome parsed manifest data. Reject install and launch operations while URL restrictions are configured because Chromium browser-scoped PWA requests bypass Puppeteer network filtering. Refs ChromeDevTools#2270
Browser.installPWA requires an install URL and refetches it through the default profile instead of using the selected loaded document. This makes the current-page wrapper unreliable for transient, authenticated, and isolated-context pages. Remove the tool until the Web Install API provides page-native semantics, keeping this PR focused on the four direct Puppeteer browser wrappers.
PWA install, launch, uninstall, and state operations are browser-scoped and should remain available when the selected page is closed or missing. Expose the browser through the tool context and cover all four tools without a selected page.
Chromium exposes the privileged PWA domain only to pipe-launched clients. Reject browser URL, WebSocket endpoint, and auto-connect configurations when the PWA category is enabled instead of advertising tools that fail at runtime.
Describe installation as a dialog-free DevTools operation rather than the omnibox flow, and state that launch follows the app's saved display mode instead of always opening a standalone window.
Expose only the four browser-scoped PWA operations required by tools instead of the full Puppeteer Browser.
Use the CLI option conflict configuration instead of custom post-parse validation.
Exercise the yargs conflict through parseArguments and leave the off-by-default flag undefined so conflicts apply only when enabled.
Drop the deprecated metric for a tool that was removed before release and never shipped.
Cover file bundle root validation, explicit URL launch forwarding, OS file-handler output, and selected-page fallback after uninstall.
Keep the declarative yargs conflicts without exposing a test-only exitProcess parameter through parseArguments. Existing connection-mode parser coverage already protects their established behavior.
Puppeteer 25.5.0 rejects PWA APIs whenever network restrictions are configured. Remove the duplicate MCP guard, its context plumbing, and MCP-specific tests so Puppeteer remains the single enforcement layer.
Clarify that manifestId is the resolved manifest id and defaults to start_url when the manifest omits id. This is a documentation-only change and does not alter runtime behavior.
OrKoN
approved these changes
Aug 10, 2026
OrKoN
enabled auto-merge
August 10, 2026 09:13
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.
What / Why
Adds an opt-in Progressive Web Apps tool category that exposes the installed web app lifecycle to MCP clients and agents.
The browser-level PWA APIs were introduced in Puppeteer 25.4.0 (puppeteer/puppeteer#15235). The current base uses Puppeteer 25.5.0, which also enforces URL restrictions for browser-level PWA operations (puppeteer/puppeteer#15271).
Tools
install_pwalaunch_pwaget_os_app_stateuninstall_pwaThe category is disabled by default and enabled with
--category-pwa.These are browser-scoped operations and do not require a selected page. Callers provide the resolved manifest ID and, for installation, an explicit page or bundle URL.
open_current_page_in_appand automatic current-page installation are intentionally deferred until Puppeteer exposes page-native APIs with reliable loaded-document and browser-context semantics.Compatibility and safety
--category-pwawhen combined with--auto-connect,--browser-url, or--ws-endpoint.displayMode: "standalone"is supplied. Launch uses the app's saved display preference.Testing
Refs #2270