* feat(app,app-bridge): guard requests sent before handshake completes Calling host-bound methods before the ui/initialize → ui/notifications/initialized handshake completes can race the handshake on strict hosts and leave the iframe permanently hidden. App (View side): - All 8 host-bound methods (callServerTool, readServerResource, listServerResources, sendMessage, updateModelContext, openLink, downloadFile, requestDisplayMode) now check that connect() has sent the initialized notification. - New AppOptions.strict (default false): console.error when false, throw when true. AppOptions is now exported. - useApp() forwards strict to the App constructor. - Flag resets on reconnect. AppBridge (Host side): - replaceRequestHandler is overridden to wrap every host-bound handler with a console.warn if the request arrives before ui/notifications/initialized. Never throws. ui/initialize and ping use setRequestHandler directly and are exempt; notifications are unaffected. - Catches Views that hand-roll postMessage without the SDK. - Flag resets on reconnect. Refs anthropics/claude-ai-mcp#61, anthropics/claude-ai-mcp#149. * fix(docs): drop AppOptions from intentionallyNotExported now that it is exported
66 lines
1.7 KiB
JavaScript
66 lines
1.7 KiB
JavaScript
import { OptionDefaults } from "typedoc";
|
|
|
|
/** @type {Partial<import('typedoc').TypeDocOptions>} */
|
|
const config = {
|
|
name: "MCP Apps",
|
|
readme: "README.md",
|
|
headings: {
|
|
readme: false,
|
|
},
|
|
gitRevision: "main",
|
|
projectDocuments: [
|
|
"docs/overview.md",
|
|
"docs/quickstart.md",
|
|
"docs/agent-skills.md",
|
|
"docs/testing-mcp-apps.md",
|
|
"docs/patterns.md",
|
|
"docs/authorization.md",
|
|
"docs/csp-cors.md",
|
|
"docs/migrate_from_openai_apps.md",
|
|
],
|
|
entryPoints: [
|
|
"src/server/index.ts",
|
|
"src/app.ts",
|
|
"src/react/index.tsx",
|
|
"src/app-bridge.ts",
|
|
"src/message-transport.ts",
|
|
"src/types.ts",
|
|
],
|
|
excludePrivate: true,
|
|
excludeInternal: false,
|
|
intentionallyNotExported: ["MethodSchema"],
|
|
blockTags: [...OptionDefaults.blockTags, "@description"],
|
|
jsDocCompatibility: {
|
|
exampleTag: false,
|
|
},
|
|
includeVersion: false,
|
|
categorizeByGroup: true,
|
|
groupOrder: ["Getting Started", "Security", "Modules", "*"],
|
|
navigation: {
|
|
includeGroups: true,
|
|
},
|
|
navigationLinks: {
|
|
GitHub: "https://github.com/modelcontextprotocol/ext-apps",
|
|
Specification:
|
|
"https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx",
|
|
},
|
|
hostedBaseUrl: "https://apps.extensions.modelcontextprotocol.io/api/",
|
|
customCss: "./docs/mcp-theme.css",
|
|
out: "docs/api",
|
|
plugin: [
|
|
"typedoc-github-theme",
|
|
"./scripts/typedoc-plugin-fix-mermaid-entities.mjs",
|
|
"./scripts/typedoc-plugin-seo.mjs",
|
|
"./scripts/typedoc-plugin-mcpstyle.mjs",
|
|
"@boneskull/typedoc-plugin-mermaid",
|
|
],
|
|
ignoredHighlightLanguages: ["mermaid"],
|
|
locales: {
|
|
en: {
|
|
kind_plural_document: "Getting Started",
|
|
kind_plural_module: "API Documentation",
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|