{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/mcp/catalog.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,eAAe;IAC/B,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,KAAK,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;CACnE;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EAazD,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAevD","sourcesContent":["// Built-in MCP integrations we ship a skill package for. User servers go in the `mcpServers` setting instead.\n\nimport { getOAuthProvider, registerOAuthProvider } from \"../utils/oauth/index.js\";\nimport { createMcpOAuthProvider, type McpOAuthConfig } from \"./oauth.js\";\n\nexport interface McpCatalogEntry {\n\t/** Matches the skill package import name and the auth.json key `mcp:<server>`. */\n\tserver: string;\n\tlabel: string;\n\turl: string;\n\toauth?: Omit<McpOAuthConfig, \"server\" | \"url\"> & { kind: \"oauth\" };\n}\n\nexport const BUILTIN_MCP_CATALOG: readonly McpCatalogEntry[] = [\n\t{\n\t\tserver: \"linear\",\n\t\tlabel: \"Linear\",\n\t\turl: \"https://mcp.linear.app/mcp\",\n\t\toauth: { kind: \"oauth\", label: \"Linear\" },\n\t},\n\t{\n\t\tserver: \"notion\",\n\t\tlabel: \"Notion\",\n\t\turl: \"https://mcp.notion.com/mcp\",\n\t\toauth: { kind: \"oauth\", label: \"Notion\" },\n\t},\n];\n\nexport function getCatalogEntry(server: string): McpCatalogEntry | undefined {\n\treturn BUILTIN_MCP_CATALOG.find((entry) => entry.server === server);\n}\n\n/**\n * Register the built-in catalog's OAuth providers. Idempotent. Must be called\n * after any resetOAuthProviders() (e.g. ModelRegistry.refresh) since reset drops\n * everything but the model-provider built-ins.\n */\nexport function registerBuiltinMcpOAuthProviders(): void {\n\tfor (const entry of BUILTIN_MCP_CATALOG) {\n\t\tif (entry.oauth?.kind !== \"oauth\") continue;\n\t\tconst id = `mcp:${entry.server}`;\n\t\tif (getOAuthProvider(id)) continue;\n\t\tregisterOAuthProvider(\n\t\t\tcreateMcpOAuthProvider({\n\t\t\t\tserver: entry.server,\n\t\t\t\tlabel: entry.label,\n\t\t\t\turl: entry.url,\n\t\t\t\tscopes: entry.oauth.scopes,\n\t\t\t\tclientId: entry.oauth.clientId,\n\t\t\t}),\n\t\t);\n\t}\n}\n"]}