refactor: re-export AppRendererClient from types.ts instead of defining it twice (#1745)

Dropping the v1 translation proxy made the protocol's alias identical to the
one core/mcp/types.ts already exported. Keep one definition and re-export it,
so the two cannot drift.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-09-13 19:49:46 -04:00
commit 4a1e1ad7a3

View file

@ -22,10 +22,10 @@ import type {
ResourceSubscriptionStreamState, ResourceSubscriptionStreamState,
ExcludedTool, ExcludedTool,
RequestMetadata, RequestMetadata,
AppRendererClient,
} from "./types.js"; } from "./types.js";
import type { import type {
CacheMode, CacheMode,
Client,
ClientCapabilities, ClientCapabilities,
DiscoverResult, DiscoverResult,
Implementation, Implementation,
@ -48,13 +48,11 @@ import type { SamplingCreateMessage } from "./samplingCreateMessage.js";
import type { ElicitationCreateMessage } from "./elicitationCreateMessage.js"; import type { ElicitationCreateMessage } from "./elicitationCreateMessage.js";
/** /**
* The SDK `Client` the MCP Apps host bridge is built over. ext-apps' * Re-exported from `./types.js`, where it is defined and documented, so hook
* `AppBridge` takes it directly and forwards a running app's * code that types against this protocol (`core/react/useInspectorClient.ts`)
* tools/resources/prompts calls (and list-changed notifications) through it. * can import it here without a second, drift-prone definition (#1745).
* Since ext-apps 2.0.0 peers on SDK v2 this is the real client with nothing in
* between — the v1-peer translation proxy it used to name is gone (#1745).
*/ */
export type AppRendererClient = Client; export type { AppRendererClient } from "./types.js";
/** /**
* The contract every state manager and hook depends on. Anything that holds * The contract every state manager and hook depends on. Anything that holds