import { App, type McpUiHostContextChangedNotification } from "@modelcontextprotocol/ext-apps"; import type { ApplicationManifest } from "../types/application-manifest.js"; import type { FormattedExecutionResult } from "graphql"; import type { DocumentNode, OperationVariables } from "@apollo/client"; import type { ApolloMcpServerApps } from "./types.js"; interface ConnectToHostResult { structuredContent: ApolloMcpServerApps.StructuredContent; toolInput: Record | undefined; _meta: ApolloMcpServerApps.Meta | undefined; } export type ConnectToHostImplementation = (app: App) => Promise; /** @internal */ export declare class McpAppManager { #private; readonly app: App; constructor(manifest: ApplicationManifest, connectToHost: ConnectToHostImplementation); onHostContextChanged(cb: (params: McpUiHostContextChangedNotification["params"]) => void): () => void; connect: (() => Promise<{ structuredContent: { [x: string]: unknown; result?: FormattedExecutionResult; prefetch?: Record; toolName?: string; }; toolInput: Record | undefined; toolName: string | undefined; _meta: ApolloMcpServerApps.Meta | undefined; }>) & { reset: () => void; }; close(): Promise; executeQuery({ query, variables, }: { query: DocumentNode; variables: OperationVariables | undefined; }): Promise<{ errors?: ReadonlyArray; data?: import("graphql/jsutils/ObjMap.js").ObjMap | null; extensions?: import("graphql/jsutils/ObjMap.js").ObjMap; }>; } export {}; //# sourceMappingURL=McpAppManager.d.ts.map