Repository navigation
Match WebMCP shape where executeTools takes an object - #19
Merged
Merged
Conversation
Chromium (M155 and M156 respectively) added two members to the ToolAnnotations dictionary. Dictionary conversion means every member reads back as false once annotations are present, so getTools() descriptors from the polyfill were missing keys that WPT getTools-imperative-annotations now asserts at the revision this branch pins.
…Context Chromium moved toolactivated and toolcancel from window to document.modelContext as ToolActivatedEvent/ToolCancelEvent instances (M156) and removed the window dispatch; WPT executeTool-abort at the pinned revision asserts the new target, the interface brand and event.target identity, and timed out against the polyfill's window-targeted plain Events. The local backend now fires the two interfaces at itself and the facade re-dispatches fresh instances so page code observes document.modelContext as the target, the same way toolchange was already forwarded. ontoolactivated and ontoolcancel join ontoolchange; the three handler attributes share one Web IDL style definition instead of a hand-written accessor pair per class.
The bridge now sends executeTool() an object, which Chromium before M155 (DOMString inputArguments) cannot parse, so keeping the lifecycle's parse of string inputSchema values only let a catalog load whose every call would fail. Native and polyfill both expose inputSchema as an object; pass it through. M154 left stable on 2026-10-06 and the WebMCP origin trial runs on 155+, so no supported configuration still speaks the string shape.
tests/browser/webmcp-wpt.mjs already pins a WPT revision and runs the built polyfill against it with native WebMCP disabled, but only by hand. This branch bumped that pin and would have merged with two files red had the harness not been run manually, so it now runs on the 24.x leg next to the other browser tests. Chrome's wpt product needs no hosts-file changes, so no sudo is required.
A fresh `git clone --no-checkout --sparse` reports every tracked file in WPT as deleted, so `git status --porcelain` produced 12 MB of output and spawnSync failed with ENOBUFS at its 1 MB buffer. That path never ran on a machine that already had local/wpt, and CI is the first fresh clone. The guard exists to protect modifications in an existing checkout, so it now runs only there.
…thon < 3.12.7 argparse before 3.12.7 matches a trailing nargs='*' positional as empty when options separate it from the preceding positional, so `wpt run chrome --yes ... test.html` reported every test path as an unrecognized argument. Stock python3 on Ubuntu 24.04 (the CI runner) is 3.12.3; local runs on newer interpreters never hit it. Options now come first and `chrome` is followed directly by the tests, which parses on every version. Reproduced and verified with a fresh clone and a 3.12.3 venv: the old order fails, the new order runs 19/19 files.
…s are built wpt run defaults to every test type, and the presence of aamtest makes it install requirements_platform_accessibility.txt: on Linux that is PyGObject, which builds pycairo from source and fails on CI without cairo headers. On macOS the same file resolves to pyobjc wheels, so local runs never noticed. The canonical WebMCP files are testharness tests plus one crashtest; naming those two types skips the file entirely instead of adding system packages. Verified with a fresh clone and a Python 3.12.3 venv: no accessibility packages installed, 19/19 files and 39/39 subtests pass.
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.
Chrome 155 added a breaking change to
executeTools()'s input schema.This PR adapts AgentBoard and its polyfill to that change.