Skip to content

Add declarative tools - #9

Draft
MiguelsPizza wants to merge 7 commits into
fbeaufort/tool-lifecycle-eventsfrom
alex/declarative-tools
Draft

MiguelsPizza wants to merge 7 commits into
fbeaufort/tool-lifecycle-eventsfrom
alex/declarative-tools

Conversation

@MiguelsPizza

Copy link
Copy Markdown
Collaborator

No description provided.

@MiguelsPizza
MiguelsPizza force-pushed the alex/declarative-tools branch 2 times, most recently from 2fa37e9 to f9ee448 Compare October 2, 2026 05:29
Forms with toolname and tooldescription become tools. The draft's
declarative section is a TODO, so they follow the declarative API
explainer and Chromium at dbdbb13. Installation adds agentInvoked and
respondWith() to SubmitEvent.prototype and wraps
HTMLFormElement.prototype.submit().

Validation: 334 browser tests and the packed consumer checks pass. WPT
in Chrome Canary 157.0.8082.0 and Firefox Nightly 159.0a1: 70 files,
190 subtests, zero unexpected results. Safari cannot close the test
window after a form submits into an about:blank iframe, which a page
without the polyfill reproduces.
@MiguelsPizza
MiguelsPizza force-pushed the alex/declarative-tools branch from f9ee448 to 35413d6 Compare October 2, 2026 05:31
Read form state through native DOM accessors so named controls cannot shadow
schema discovery or submission. Use registered custom-element state, preserve
Blink whitespace rules, and test decimal step divisibility without floating-point
rounding errors.

Adopt respondWith() values into a fresh Promise and attach rejection handling
when the response is accepted. Caller-owned Promise methods must not prevent a
valid submission from settling.

Reuse public types, simplify internal control flow, and retain comments that
explain platform constraints. Add browser regressions and document the verified
conformance results and remaining limits.

Validated: 349 browser tests; 352 with the separate input-order change; packed
consumers; Chrome and Firefox WPT with zero unexpected results.
Replacing a page-defined global retains attributes omitted from the new property
descriptor. Set enumerable explicitly so ModelContext and both lifecycle event
interfaces match Web IDL even when the page assigned those names before install.

Keep focused coverage for event brands and initializers, cancellation after
dispatch is queued, and self-unregistration without cancelling the running call.

The replacement regression failed in all three engines before the fix. Lint,
build, type checking, 352 browser tests, package checks, and both local packages'
NodeNext/Bundler consumers pass. Pinned Chrome WPT completed all 70 files and
190 subtests with zero unexpected results; existing expected failures remain.
Use the pinned WPT coverage for basic schemas, duplicate form registration,
common response and navigation cases, and lifecycle interface shape. Preserve
the unique metadata, timing, conversion, installation, and regression assertions
inside the remaining local tests.

Keep local manual-submit, reset, and abort coverage: the corresponding WPT
subtests fail at unsupported pseudo-class checks before reaching that behavior.
Document this distinction so future coverage compares assertions and results.

The current upstream WebMCP tests and IDL still match the pin at fe52996.
Validated: lint, build, type checking, 352 browser tests, package consumers, and
all 70 Chrome WPT files / 190 subtests with zero unexpected results.
HTTPS WPT forms submit into about:blank frames. Safari opens a native insecure-form confirmation that WebDriver cannot dismiss, so window cleanup discards five completed subtest results. Disable that confirmation only on the disposable Safari CI runner; keep upstream tests and the 70-file, 190-subtest completeness checks intact.

Record the detached-frame harness reporting race only for Safari. Its subtest remains an expected failure because the blank helper document has no polyfill.
Address the preference store explicitly on fresh macOS runners. Writing the application domain alone did not suppress the HTTPS-to-about:blank form confirmation in the first CI replay, so the suite still lost five results during window cleanup.
Safari 26.6.2 still opens its insecure-form sheet after both application-domain and sandbox preference writes. Its current navigation guard does not consult the old setting. Restore the CI setup and document the actual blocker instead of retaining an ineffective workaround.

A local HTTPS replay verifies that same-origin HTTPS form targets preserve all five affected subtest results and let WebDriver close the tabs. That repair belongs in the upstream WPT fixtures; retain the complete-suite guard while it is unresolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant