From fc0f98a8b8f1f7dd84e4e6380699defa57a8a7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20T=C3=BCchler?= Date: Mon, 30 Nov 2026 06:28:41 +0000 Subject: [PATCH 1/2] Prepare v0.7.2 compatibility and registration readiness patch --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .cursor-plugin/plugin.json | 2 +- CHANGELOG.md | 15 ++++++- README.md | 11 ++--- gemini-extension.json | 2 +- package-lock.json | 4 +- package.json | 2 +- release/v0.7.2.md | 43 +++++++++++++++++++ skill.json | 2 +- skills/webmcpify/references/integrate.md | 39 +++++++++++++++++ .../references/native-compatibility.md | 12 ++++-- skills/webmcpify/references/verify.md | 9 ++++ skills/webmcpify/templates/webmcp.d.ts | 6 +++ tests/output-schema-usage.ts | 6 +++ 15 files changed, 140 insertions(+), 17 deletions(-) create mode 100644 release/v0.7.2.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index ebfef5f..e022a79 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "name": "webmcpify", "source": "./", "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", - "version": "0.7.1" + "version": "0.7.2" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index ce98499..7d1aa13 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "webmcpify", "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", - "version": "0.7.1", + "version": "0.7.2", "author": { "name": "Jonas Tüchler" } diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index ce98499..7d1aa13 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "webmcpify", "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", - "version": "0.7.1", + "version": "0.7.2", "author": { "name": "Jonas Tüchler" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d9577..3a7b866 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ reconstruct them from git history. ## [Unreleased] +## [0.7.2] — 2026-11-30 + +- Preserve original opaque Tool handles during Workbench execution; explicitly + project display metadata and reject stale simulation registrations. +- Snapshot input/output schemas in simulation, detect output-only contract drift, + and type optional output metadata without claiming automatic validation. +- Reconcile framework tool ownership, native verification and Site tools guidance + with dated primary documentation and Chrome 156/159 fixture observations. +- Document optional Chrome 160 asynchronous registration readiness and add its + feature-detected ambient type. Completion, success and verification remain separate. +- Maintain isolated public CI runners and the patched Node test runtime. + ## [0.7.1] — 2026-10-12 - Preserve the original execution callback options and signal through the TS/JS @@ -132,4 +144,5 @@ reconstruct them from git history. [0.6.1]: https://github.com/TueJon/webmcpify/compare/v0.6.0...v0.6.1 [0.7.0]: https://github.com/TueJon/webmcpify/compare/v0.6.1...v0.7.0 [0.7.1]: https://github.com/TueJon/webmcpify/compare/v0.7.0...v0.7.1 -[Unreleased]: https://github.com/TueJon/webmcpify/compare/v0.7.1...HEAD +[0.7.2]: https://github.com/TueJon/webmcpify/compare/v0.7.1...v0.7.2 +[Unreleased]: https://github.com/TueJon/webmcpify/compare/v0.7.2...HEAD diff --git a/README.md b/README.md index 911037d..a2f27d1 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,12 @@ npx skills add TueJon/webmcpify # once ``` > [!TIP] -> **New in [v0.7.1](https://github.com/TueJon/webmcpify/releases/tag/v0.7.1):** -> execution options and cancellation signals reach your handlers unchanged. The -> event bridge supports cooperative cancellation; an aborted call can still have -> unknown effects, so inspect state before retrying. See the -> [dated native compatibility evidence](skills/webmcpify/references/native-compatibility.md). +> **Prepared [v0.7.2](release/v0.7.2.md):** verification preserves the browser's +> original Tool handle and detects output-schema drift. Dated guidance separates +> Chrome 160 registration readiness from registration success and native proof. +> The [latest published release](https://github.com/TueJon/webmcpify/releases/latest) +> is authoritative for shipment status; see the +> [native compatibility evidence](skills/webmcpify/references/native-compatibility.md). ## How it works diff --git a/gemini-extension.json b/gemini-extension.json index ce98499..7d1aa13 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,7 +1,7 @@ { "name": "webmcpify", "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", - "version": "0.7.1", + "version": "0.7.2", "author": { "name": "Jonas Tüchler" } diff --git a/package-lock.json b/package-lock.json index 482e103..6159e21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "webmcpify", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "webmcpify", - "version": "0.7.1", + "version": "0.7.2", "license": "MIT", "devDependencies": { "@playwright/test": "^1.54.0", diff --git a/package.json b/package.json index 5dae8de..282c795 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", "type": "module", "license": "MIT", - "version": "0.7.1", + "version": "0.7.2", "publisher": "TueJon", "repository": { "url": "https://github.com/TueJon/webmcpify" diff --git a/release/v0.7.2.md b/release/v0.7.2.md new file mode 100644 index 0000000..96db350 --- /dev/null +++ b/release/v0.7.2.md @@ -0,0 +1,43 @@ +# webmcpify v0.7.2 + +Verification now preserves the browser's original registration handle instead of +executing a metadata copy, and notices output-schema changes before reusing saved +evidence. This patch packages the compatibility corrections in +[pull request #26](https://github.com/TueJon/webmcpify/pull/26) and dated guidance +for asynchronous tool registration. Existing approval and mutation boundaries apply. + +## What changed + +- Workbench separates opaque executable handles from explicit display metadata. + Simulation rejects stale handles even after a same-name registration replaces them. +- Simulation snapshots input/output schemas; verification accounts for output-only + contract drift. Ambient types include optional output metadata. Declaring a schema + does not enforce output validation or authorize an action. +- Framework guidance inventories existing adapter ownership before adding tools; + native verification and client documentation describe their distinct evidence. +- An optional ambient `waitForToolsUntil()` type and integration pattern reflect + [Chrome's November 26 guide](https://developer.chrome.com/docs/ai/webmcp/imperative-api#signal-tool-readiness) + and the [November 29 CG draft](https://webmachinelearning.github.io/webmcp/). + Feature-detect this Chrome 160+ readiness hint. It affects browser-agent + observations, not in-page `getTools()`. Rejection or timeout ends waiting without + proving registration success; no local Chrome 160 readiness test is claimed. +- Public tests use isolated runners and the patched Node runtime. + +## Compatibility and evidence + +The [native compatibility reference](https://github.com/TueJon/webmcpify/blob/v0.7.2/skills/webmcpify/references/native-compatibility.md) +records read-only synthetic Chrome 156.0.8078.47 and Chrome for Testing 159.0.8154.6 +observations from November 23. Chrome 159 rejected copied handles and exposed +outputSchema; the installed builds still used `window` instead of the current +draft's `source`. These observations do not establish Chrome 160 readiness, +full-agent integration, universal framework support or WPT conformance. + +Scalar serialization differs between the draft and installed browsers. Preserve +raw results and explicit result guards. Application mutations are never retried +automatically to discover compatibility; interrupted effects require reconciliation. +Runtime TS/JS behavior and dependency-free integration remain unchanged. + +No external contributor PR merged since v0.7.1. The existing community attribution +for [@arnabwithab's PR #13](https://github.com/TueJon/webmcpify/pull/13) remains accurate. + +Compare: https://github.com/TueJon/webmcpify/compare/v0.7.1...v0.7.2 diff --git a/skill.json b/skill.json index 4443732..88bb170 100644 --- a/skill.json +++ b/skill.json @@ -1,6 +1,6 @@ { "name": "webmcpify", - "version": "0.7.1", + "version": "0.7.2", "description": "WebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then verify and heal them in a real browser.", "license": "MIT", "author": { diff --git a/skills/webmcpify/references/integrate.md b/skills/webmcpify/references/integrate.md index 2908e0b..622896b 100644 --- a/skills/webmcpify/references/integrate.md +++ b/skills/webmcpify/references/integrate.md @@ -81,6 +81,45 @@ form.addEventListener('submit', (e) => { Pass the PROMISE of the result string, not an already-resolved value. +## Asynchronous registration — browser-agent readiness + +Checked 2026-11-30: the [CG draft](https://webmachinelearning.github.io/webmcp/#dom-modelcontext-waitfortoolsuntil) +and [Chrome imperative guide](https://developer.chrome.com/docs/ai/webmcp/imperative-api#signal-tool-readiness) +describe `waitForToolsUntil()`; Chrome documents it from version 160. When an +approved integration already loads or registers tools asynchronously, signal the +actual registration promise early in page setup, before an agent observes a +partial set. Feature-detect the method; older browsers retain existing behavior. +For the vendored runtime, the integration pattern is: + +```ts +import { createToolScope } from './webmcpify'; + +const mc = document.modelContext; +const scope = createToolScope('approved-area', approvedTools); +// Retain scope in the existing component/route owner and call scope() on teardown. +const registration = scope.ready.then((ok) => { + if (!ok) throw new Error('Tool registration did not complete'); +}); +mc?.waitForToolsUntil?.(registration); +registration.catch(reportRegistrationFailure); +``` + +Use the app's existing scope ownership and error reporter; `approvedTools` must +already have passed the manifest gate. If a configuration load precedes scope +creation, include that load in the promise. Do not add a second registration owner +or wrap tool execution in a readiness promise. `scope.ready` alone is an +application promise; it does not notify browser agents without this API call. + +Readiness ends when all registered promises settle, including rejection, or when +the browser timeout expires (Chrome documents ten seconds; the CG duration is +implementation-defined). It is a completion hint, never a registration-success, +coverage or authorization verdict. `getTools()` and in-page verification do not +wait for this signal; explicitly await setup and observe the expected approved +tool set. The initial document-lifecycle deadline remains under discussion in +[issue #328](https://github.com/webmachinelearning/webmcp/issues/328); no local +Chrome 160 readiness proof is claimed. Do not introduce a polyfill or browser +upgrade to make this optional guidance apply. + ## Imperative — SPAs and dynamic apps Use the vendored runtime (`runtime.md`). Tools live in a dedicated module per app diff --git a/skills/webmcpify/references/native-compatibility.md b/skills/webmcpify/references/native-compatibility.md index 75502a0..ab14297 100644 --- a/skills/webmcpify/references/native-compatibility.md +++ b/skills/webmcpify/references/native-compatibility.md @@ -1,4 +1,4 @@ -# Native compatibility — documentation checked 2026-11-23 +# Native compatibility — documentation checked 2026-11-30 WebMCP is evolving. These are separate evidence levels; simulation results are not native browser acceptance. @@ -16,11 +16,17 @@ Browser-owned `null` for declarative navigation is separate from the runtime guard against absent imperative results. The [Chrome imperative guide](https://developer.chrome.com/docs/ai/webmcp/imperative-api) -(updated 2026-11-20) documents execution cancellation via callback `{ signal }`, +(updated 2026-11-26) documents execution cancellation via callback `{ signal }`, preservation of in-flight executions from Chrome 153, deprecation of JSON-string input from Chrome 155, the `debugging` annotation from Chrome 156, and `outputSchema` from Chrome 159. The guide describes the owner as `source`. -See the versioned observations below for the local browser surfaces. +The guide updated 2026-11-26 also documents `waitForToolsUntil()` from Chrome +160. It delays browser-agent observations until registration promises settle or +a timeout expires, not in-page `getTools()`. Rejection still ends readiness; +registration success must be checked independently. The CG draft dated 2026-11-29 +leaves timeout duration implementation-defined; Chrome documents ten seconds. +See `integrate.md` for the feature-detected pattern. No local Chrome 160 readiness +proof was run; the observations below establish only their named browser surfaces. The [Chrome declarative guide](https://developer.chrome.com/docs/ai/webmcp/declarative-api) (updated 2026-09-25) documents `agentInvoked` and `respondWith` after diff --git a/skills/webmcpify/references/verify.md b/skills/webmcpify/references/verify.md index 52eece2..1f89c79 100644 --- a/skills/webmcpify/references/verify.md +++ b/skills/webmcpify/references/verify.md @@ -3,6 +3,15 @@ Before reusing a prior pass, apply [re-verification](reverify.md). After a successful check, record its inputs in the tool's `verifiedAgainst` field. +## Async registration is not verification + +`waitForToolsUntil()` is an optional Chrome 160+ browser-agent observation hint, +not an awaitable success result or a delay on in-page `getTools()`. Await the +app's actual setup, check registration failures, then poll/listen for the expected +approved tools with the existing bounded waits. Rejection or a readiness timeout +must never count as a verified tool or justify retrying a mutation. Keep declared +support separate from a recorded native browser observation; see `integrate.md`. + ## Environment - **Current Chrome** (the API moved during the trial; verification probes diff --git a/skills/webmcpify/templates/webmcp.d.ts b/skills/webmcpify/templates/webmcp.d.ts index 7e711dc..ba6ed27 100644 --- a/skills/webmcpify/templates/webmcp.d.ts +++ b/skills/webmcpify/templates/webmcp.d.ts @@ -84,6 +84,12 @@ interface ModelContext extends EventTarget { options?: { signal?: AbortSignal; exposedTo?: string[] }, ): Promise; ontoolchange: ((this: ModelContext, ev: Event) => unknown) | null; + /** + * Optional Chrome 160+ browser-agent readiness signal (docs checked 2026-11-30). + * Settlement, including rejection, or a browser timeout ends the wait; this + * does not prove registration success or delay in-page getTools() calls. + */ + waitForToolsUntil?(promise: Promise): void; /** * Enumerates exposed tools from active documents in the same traversable, * including permitted ancestors and siblings (CG clarification, 2026-11-13). diff --git a/tests/output-schema-usage.ts b/tests/output-schema-usage.ts index 8d7909d..a29a33f 100644 --- a/tests/output-schema-usage.ts +++ b/tests/output-schema-usage.ts @@ -18,3 +18,9 @@ function readOutputContract(tool: RegisteredTool): object | string | null | unde return tool.outputSchema; } void readOutputContract; + +// Compile-only optional readiness usage; no Chrome 160 runtime proof implied. +function signalRegistration(mc: ModelContext, setup: Promise): void { + mc.waitForToolsUntil?.(setup); +} +void signalRegistration; From 0500094b2a0392a227da4c5dbc327f9e771a90fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20T=C3=BCchler?= Date: Mon, 30 Nov 2026 06:44:33 +0000 Subject: [PATCH 2/2] Report async registration errors through the tool scope --- skills/webmcpify/references/integrate.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/skills/webmcpify/references/integrate.md b/skills/webmcpify/references/integrate.md index 622896b..ff82767 100644 --- a/skills/webmcpify/references/integrate.md +++ b/skills/webmcpify/references/integrate.md @@ -95,17 +95,17 @@ For the vendored runtime, the integration pattern is: import { createToolScope } from './webmcpify'; const mc = document.modelContext; -const scope = createToolScope('approved-area', approvedTools); -// Retain scope in the existing component/route owner and call scope() on teardown. -const registration = scope.ready.then((ok) => { - if (!ok) throw new Error('Tool registration did not complete'); +const scope = createToolScope('approved-area', approvedTools, { + onError: reportRegistrationFailure, }); -mc?.waitForToolsUntil?.(registration); -registration.catch(reportRegistrationFailure); +// Retain scope in the existing component/route owner and call scope() on teardown. +mc?.waitForToolsUntil?.(scope.ready); ``` -Use the app's existing scope ownership and error reporter; `approvedTools` must -already have passed the manifest gate. If a configuration load precedes scope +Use the app's existing scope ownership and error reporter. `onError` reports +registration failures. A false `scope.ready` also covers unsupported browsers, +duplicate scope keys and early disposal. `approvedTools` must already have passed +the manifest gate. If a configuration load precedes scope creation, include that load in the promise. Do not add a second registration owner or wrap tool execution in a readiness promise. `scope.ready` alone is an application promise; it does not notify browser agents without this API call.