From b0391561a128bff0786e1bae7257a23388932a0c Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sun, 13 Sep 2026 19:42:48 -0400 Subject: [PATCH] docs: address Copilot review round 1 (#1745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - requestAppElicitation.ts, appElicitation.ts, docs/test-servers.md: ext-apps 2.0.0 does not "predate" #733 (the PR is from July; the release from September) — it simply does not include it. Reworded as omission, and the version the appElicitation.ts JSDoc names is now 2.0.0 rather than 1.7.5. - core/mcp/types.ts: the public `AppRendererClient` JSDoc described the app-renderer proxy; it is the real SDK `Client`, handed out only while connected, since #1745 removed the proxy. - appCapabilities.test.ts: the two comments verified against 1.7.5 now cite 2.0.0, which the test runs against. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp Signed-off-by: cliffhall --- .../elements/AppRenderer/appCapabilities.test.ts | 4 ++-- .../elements/AppRenderer/requestAppElicitation.ts | 5 +++-- core/mcp/appElicitation.ts | 5 +++-- core/mcp/types.ts | 10 +++++++--- docs/test-servers.md | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/clients/web/src/components/elements/AppRenderer/appCapabilities.test.ts b/clients/web/src/components/elements/AppRenderer/appCapabilities.test.ts index 8a111e8f..29e07b8f 100644 --- a/clients/web/src/components/elements/AppRenderer/appCapabilities.test.ts +++ b/clients/web/src/components/elements/AppRenderer/appCapabilities.test.ts @@ -38,7 +38,7 @@ function initializeFrame( describe("appCapabilities (#1854)", () => { it("records the raw ui/initialize capabilities the bridge's schema strips", () => { - // The whole reason this module exists: ext-apps 1.7.5 parses away the + // The whole reason this module exists: ext-apps 2.0.0 parses away the // `elicitation` key, so an app that DID advertise it reads as one that did // not — and every negotiated elicitation silently becomes a fallback. const bridge = makeBridge({}); @@ -146,7 +146,7 @@ describe("appCapabilities (#1854)", () => { }); it("takes the latest accepted handshake, in both directions", () => { - // Verified against ext-apps 1.7.5: a second `ui/initialize` is accepted — + // Verified against ext-apps 2.0.0: a second `ui/initialize` is accepted — // the bridge warns about the double-mount and the latest appInfo and // capabilities REPLACE the previous ones. Freezing this at the first frame // would leave the gate reporting capabilities the bridge no longer holds. diff --git a/clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts b/clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts index 5cfcf50b..dd756846 100644 --- a/clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts +++ b/clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts @@ -20,8 +20,9 @@ export const APP_ELICITATION_TIMEOUT_MS = 10 * 60 * 1000; * * This is ext-apps' own `AppBridge.requestElicitation` from * modelcontextprotocol/ext-apps#733 — same method, same params, same result — - * implemented against the bridge's generic `request()` because the released - * package (2.0.0) predates that PR. Replace the body with a call to + * implemented against the bridge's generic `request()` because #733 is not + * yet in a published release (2.0.0 does not include it). Replace the body + * with a call to * `bridge.requestElicitation(params)` once a release containing #733 ships; * nothing on the wire changes when that happens. * diff --git a/core/mcp/appElicitation.ts b/core/mcp/appElicitation.ts index 1ea84651..b15039e7 100644 --- a/core/mcp/appElicitation.ts +++ b/core/mcp/appElicitation.ts @@ -21,8 +21,9 @@ import { MCP_APP_MIME_TYPE, UI_EXTENSION_KEY } from "./extensions.js"; * * The helpers here mirror the ext-apps draft (modelcontextprotocol/ext-apps#733, * SEP-3118) so the Inspector speaks exactly the proposed protocol. They are - * declared locally only because the released `@modelcontextprotocol/ext-apps` - * (1.7.5) predates that PR and exports none of them; replace + * declared locally only because #733 is not yet in a published release — the + * installed `@modelcontextprotocol/ext-apps` (2.0.0) does not include it and + * exports none of them; replace * {@link supportsAppElicitation} / {@link getElicitationUiResourceUri} with the * package's `/server` exports once a release containing #733 ships. */ diff --git a/core/mcp/types.ts b/core/mcp/types.ts index 5755018c..d55bb95f 100644 --- a/core/mcp/types.ts +++ b/core/mcp/types.ts @@ -1023,9 +1023,13 @@ export type CreateTransport = ( ) => CreateTransportResult; /** - * Type for the client-like object passed to AppRenderer / @mcp-ui. - * Structurally compatible with the MCP SDK Client but denotes the app-renderer - * proxy, not the raw client. Use this type when passing the client to the Apps tab. + * The SDK `Client` handed to the MCP Apps host bridge (`AppBridge` in + * `@modelcontextprotocol/ext-apps`), obtained through + * `InspectorClient.getAppRendererClient()`, which returns it only while the + * connection status is `connected` and `null` otherwise. It is the real client, + * not a wrapper: since ext-apps 2.0.0 peers on SDK v2 the bridge registers on + * it directly, and the v1-peer translation proxy this alias used to denote is + * gone (#1745). Use this type when passing the client to the Apps tab. */ export type AppRendererClient = Client; diff --git a/docs/test-servers.md b/docs/test-servers.md index b0c33587..833b25c8 100644 --- a/docs/test-servers.md +++ b/docs/test-servers.md @@ -243,7 +243,7 @@ Only the **web** client advertises the nested client-side setting, and only beca Everything else falls back to the built-in elicitation form, by design: metadata that is absent or not an absolute `ui://` URI, a resource that fails to load, a sandbox or bridge that fails to initialize, an app that did not advertise `elicitation`, a request that times out, and any result that is not a valid `ElicitResult` for the requested schema. An explicit `decline` or `cancel` is **not** a fallback — it is a completed elicitation and goes back to the server as-is. -> The Inspector speaks the ext-apps#733 wire protocol but does not yet consume its helpers: the released `@modelcontextprotocol/ext-apps` (2.0.0) predates that PR. `core/mcp/appElicitation.ts` and `clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts` mirror it exactly and are marked for deletion in favour of the package's own exports once a release containing it ships. +> The Inspector speaks the ext-apps#733 wire protocol but does not yet consume its helpers: #733 is not yet in a published release — the installed `@modelcontextprotocol/ext-apps` (2.0.0) does not include it. `core/mcp/appElicitation.ts` and `clients/web/src/components/elements/AppRenderer/requestAppElicitation.ts` mirror it exactly and are marked for deletion in favour of the package's own exports once a release containing it ships. ## MRTR