@agent-native/core 0.117.2 → 0.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. package/corpus/README.md +3 -3
  2. package/corpus/core/CHANGELOG.md +30 -0
  3. package/corpus/core/docs/content/custom-design-system.mdx +445 -0
  4. package/corpus/core/docs/content/toolkit-ui.mdx +16 -0
  5. package/corpus/core/package.json +1 -1
  6. package/corpus/core/src/a2a/types.ts +1 -0
  7. package/corpus/core/src/agent/types.ts +1 -1
  8. package/corpus/core/src/client/AgentPanel.tsx +90 -107
  9. package/corpus/core/src/client/AssistantChat.tsx +30 -13
  10. package/corpus/core/src/client/CommandMenu.tsx +68 -178
  11. package/corpus/core/src/client/agent-chat-adapter.ts +3 -1
  12. package/corpus/core/src/client/app-providers.tsx +1 -1
  13. package/corpus/core/src/client/chat/message-components.tsx +116 -10
  14. package/corpus/core/src/client/chat/tool-call-display.tsx +26 -5
  15. package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +14 -40
  16. package/corpus/core/src/client/components/ui/message-scroller.tsx +15 -1
  17. package/corpus/core/src/client/i18n.tsx +22 -0
  18. package/corpus/core/src/client/index.ts +17 -0
  19. package/corpus/core/src/client/org/TeamPage.tsx +257 -153
  20. package/corpus/core/src/client/progress/RunsTray.tsx +89 -88
  21. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +5 -2
  22. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +34 -13
  23. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +13 -0
  24. package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -18
  25. package/corpus/core/src/client/settings/SecretsSection.tsx +97 -52
  26. package/corpus/core/src/client/settings/SettingsPanel.tsx +202 -246
  27. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +23 -2
  28. package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
  29. package/corpus/core/src/client/settings/index.ts +7 -0
  30. package/corpus/core/src/client/settings/useSettingsPanelController.ts +155 -0
  31. package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
  32. package/corpus/core/src/client/setup-connections/index.ts +10 -0
  33. package/corpus/core/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
  34. package/corpus/core/src/client/sharing/ShareButton.tsx +64 -586
  35. package/corpus/core/src/client/sharing/ShareDialog.tsx +299 -633
  36. package/corpus/core/src/client/sharing/index.ts +42 -0
  37. package/corpus/core/src/client/sharing/share-controller-helpers.ts +318 -0
  38. package/corpus/core/src/client/sharing/useShareButtonController.ts +600 -0
  39. package/corpus/core/src/client/sharing/useShareDialogController.ts +559 -0
  40. package/corpus/core/src/client/sse-event-processor.ts +23 -0
  41. package/corpus/core/src/client/tool-display.ts +71 -0
  42. package/corpus/core/src/client/use-agent-engine-configured.ts +12 -19
  43. package/corpus/core/src/client/use-chat-threads.ts +33 -12
  44. package/corpus/core/src/localization/default-messages.ts +5 -0
  45. package/corpus/core/src/mcp-client/oauth-routes.ts +16 -2
  46. package/corpus/core/src/scripts/call-agent.ts +5 -1
  47. package/corpus/core/src/server/realtime-voice.ts +1 -1
  48. package/corpus/core/src/styles/agent-native.css +0 -24
  49. package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  50. package/corpus/core/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  51. package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  52. package/corpus/core/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  53. package/corpus/core/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  54. package/corpus/core/src/templates/default/app/design-system.ts +3 -0
  55. package/corpus/core/src/templates/default/app/root.tsx +5 -2
  56. package/corpus/core/src/templates/default/package.json +1 -0
  57. package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  58. package/corpus/core/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  59. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  60. package/corpus/core/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  61. package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  62. package/corpus/core/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  63. package/corpus/core/src/vite/client.ts +39 -0
  64. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  65. package/corpus/templates/analytics/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  66. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +22 -2
  67. package/corpus/templates/analytics/.agents/skills/shadcn-ui/SKILL.md +28 -4
  68. package/corpus/templates/analytics/app/components/ui/toolkit-provider.tsx +6 -1
  69. package/corpus/templates/analytics/app/design-system.ts +3 -0
  70. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  71. package/corpus/templates/assets/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  72. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +22 -2
  73. package/corpus/templates/assets/.agents/skills/shadcn-ui/SKILL.md +28 -4
  74. package/corpus/templates/assets/app/components/ui/alert.tsx +1 -0
  75. package/corpus/templates/assets/app/components/ui/toolkit-provider.tsx +6 -1
  76. package/corpus/templates/assets/app/design-system.ts +3 -0
  77. package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +26 -30
  78. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  79. package/corpus/templates/brain/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  80. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +22 -2
  81. package/corpus/templates/brain/.agents/skills/shadcn-ui/SKILL.md +28 -4
  82. package/corpus/templates/brain/app/components/ui/dialog.tsx +1 -0
  83. package/corpus/templates/brain/app/components/ui/toolkit-provider.tsx +6 -1
  84. package/corpus/templates/brain/app/design-system.ts +3 -0
  85. package/corpus/templates/brain/app/routes/sources.tsx +8 -8
  86. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  87. package/corpus/templates/calendar/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  88. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +22 -2
  89. package/corpus/templates/calendar/.agents/skills/shadcn-ui/SKILL.md +28 -4
  90. package/corpus/templates/calendar/app/components/ui/toolkit-provider.tsx +6 -1
  91. package/corpus/templates/calendar/app/design-system.ts +3 -0
  92. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  93. package/corpus/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  94. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  95. package/corpus/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  96. package/corpus/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  97. package/corpus/templates/chat/app/design-system.ts +3 -0
  98. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  99. package/corpus/templates/clips/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  100. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +22 -2
  101. package/corpus/templates/clips/.agents/skills/shadcn-ui/SKILL.md +28 -4
  102. package/corpus/templates/clips/app/components/ui/toolkit-provider.tsx +6 -1
  103. package/corpus/templates/clips/app/design-system.ts +3 -0
  104. package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
  105. package/corpus/templates/clips/changelog/2026-07-22-fixed-windows-recordings-aborting-during-the-countdown.md +6 -0
  106. package/corpus/templates/clips/changelog/2026-07-22-permissions-and-rewind-controls-are-now-grouped-with-clearer.md +6 -0
  107. package/corpus/templates/clips/changelog/2026-07-22-the-desktop-popover-opens-centered-under-the-menu-bar-icon-o.md +6 -0
  108. package/corpus/templates/clips/desktop/src/app.tsx +86 -82
  109. package/corpus/templates/clips/desktop/src/styles.css +13 -0
  110. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +10 -1
  111. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +37 -2
  112. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -0
  113. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  114. package/corpus/templates/content/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  115. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +22 -2
  116. package/corpus/templates/content/.agents/skills/shadcn-ui/SKILL.md +28 -4
  117. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +41 -59
  118. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
  119. package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +2 -1
  120. package/corpus/templates/content/app/components/editor/database/ListView.tsx +2 -1
  121. package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +9 -9
  122. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +7 -7
  123. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +11 -11
  124. package/corpus/templates/content/app/components/ui/checkbox.tsx +1 -0
  125. package/corpus/templates/content/app/components/ui/collapsible.tsx +1 -0
  126. package/corpus/templates/content/app/components/ui/toolkit-provider.tsx +6 -1
  127. package/corpus/templates/content/app/design-system.ts +3 -0
  128. package/corpus/templates/content/app/global.css +29 -3
  129. package/corpus/templates/content/changelog/2026-07-22-page-actions-are-grouped-into-the-three-dots-menu-for-a-clea.md +6 -0
  130. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  131. package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  132. package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +10 -10
  133. package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +1 -6
  134. package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +3 -2
  135. package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +13 -12
  136. package/corpus/templates/crm/app/components/crm/RecordActions.tsx +17 -17
  137. package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +8 -8
  138. package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +3 -8
  139. package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +2 -1
  140. package/corpus/templates/crm/app/components/crm/Surface.tsx +3 -2
  141. package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +2 -2
  142. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +7 -7
  143. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +1 -1
  144. package/corpus/templates/crm/app/components/ui/alert-dialog.tsx +1 -0
  145. package/corpus/templates/crm/app/components/ui/badge.tsx +1 -0
  146. package/corpus/templates/crm/app/components/ui/button.tsx +1 -0
  147. package/corpus/templates/crm/app/components/ui/card.tsx +1 -0
  148. package/corpus/templates/crm/app/components/ui/dialog.tsx +1 -0
  149. package/corpus/templates/crm/app/components/ui/input.tsx +1 -0
  150. package/corpus/templates/crm/app/components/ui/label.tsx +1 -0
  151. package/corpus/templates/crm/app/components/ui/select.tsx +1 -0
  152. package/corpus/templates/crm/app/components/ui/sheet.tsx +1 -0
  153. package/corpus/templates/crm/app/components/ui/skeleton.tsx +1 -0
  154. package/corpus/templates/crm/app/components/ui/switch.tsx +1 -0
  155. package/corpus/templates/crm/app/components/ui/table.tsx +1 -0
  156. package/corpus/templates/crm/app/components/ui/tabs.tsx +1 -0
  157. package/corpus/templates/crm/app/components/ui/textarea.tsx +1 -0
  158. package/corpus/templates/crm/app/components/ui/toolkit-provider.tsx +17 -0
  159. package/corpus/templates/crm/app/design-system.ts +3 -0
  160. package/corpus/templates/crm/app/root.tsx +9 -6
  161. package/corpus/templates/crm/app/routes/dashboard.tsx +1 -1
  162. package/corpus/templates/crm/app/routes/proposals.tsx +13 -13
  163. package/corpus/templates/crm/app/routes/setup.tsx +9 -9
  164. package/corpus/templates/crm/app/routes/tasks.tsx +14 -14
  165. package/corpus/templates/crm/app/routes/views.tsx +16 -16
  166. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  167. package/corpus/templates/design/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  168. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +22 -2
  169. package/corpus/templates/design/.agents/skills/shadcn-ui/SKILL.md +28 -4
  170. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -8
  171. package/corpus/templates/design/app/components/ui/command.tsx +1 -0
  172. package/corpus/templates/design/app/components/ui/toolkit-provider.tsx +6 -1
  173. package/corpus/templates/design/app/design-system.ts +3 -0
  174. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  175. package/corpus/templates/dispatch/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  176. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +22 -2
  177. package/corpus/templates/dispatch/.agents/skills/shadcn-ui/SKILL.md +28 -4
  178. package/corpus/templates/dispatch/app/components/ui/button.tsx +1 -0
  179. package/corpus/templates/dispatch/app/components/ui/toolkit-provider.tsx +17 -0
  180. package/corpus/templates/dispatch/app/design-system.ts +3 -0
  181. package/corpus/templates/dispatch/app/root.tsx +10 -7
  182. package/corpus/templates/dispatch/package.json +1 -0
  183. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  184. package/corpus/templates/forms/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  185. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +22 -2
  186. package/corpus/templates/forms/.agents/skills/shadcn-ui/SKILL.md +28 -4
  187. package/corpus/templates/forms/app/components/ui/toolkit-provider.tsx +6 -1
  188. package/corpus/templates/forms/app/design-system.ts +3 -0
  189. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  190. package/corpus/templates/macros/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  191. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +22 -2
  192. package/corpus/templates/macros/.agents/skills/shadcn-ui/SKILL.md +28 -4
  193. package/corpus/templates/macros/app/components/ui/toolkit-provider.tsx +6 -1
  194. package/corpus/templates/macros/app/design-system.ts +3 -0
  195. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  196. package/corpus/templates/mail/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  197. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +22 -2
  198. package/corpus/templates/mail/.agents/skills/shadcn-ui/SKILL.md +28 -4
  199. package/corpus/templates/mail/app/components/email/EmailThread.tsx +134 -93
  200. package/corpus/templates/mail/app/components/email/email-iframe-document.ts +8 -2
  201. package/corpus/templates/mail/app/components/ui/textarea.tsx +1 -21
  202. package/corpus/templates/mail/app/components/ui/toolkit-provider.tsx +6 -1
  203. package/corpus/templates/mail/app/design-system.ts +3 -0
  204. package/corpus/templates/mail/changelog/2026-07-22-email-messages-no-longer-flash-with-an-unstyled-page-while-l.md +6 -0
  205. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  206. package/corpus/templates/plan/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  207. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +22 -2
  208. package/corpus/templates/plan/.agents/skills/shadcn-ui/SKILL.md +28 -4
  209. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
  210. package/corpus/templates/plan/app/components/ui/toolkit-provider.tsx +6 -1
  211. package/corpus/templates/plan/app/design-system.ts +3 -0
  212. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  213. package/corpus/templates/slides/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  214. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +22 -2
  215. package/corpus/templates/slides/.agents/skills/shadcn-ui/SKILL.md +28 -4
  216. package/corpus/templates/slides/app/components/ui/toolkit-provider.tsx +6 -1
  217. package/corpus/templates/slides/app/design-system.ts +3 -0
  218. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  219. package/corpus/templates/tasks/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  220. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +22 -2
  221. package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +28 -4
  222. package/corpus/templates/tasks/app/components/ui/toolkit-provider.tsx +17 -0
  223. package/corpus/templates/tasks/app/design-system.ts +3 -0
  224. package/corpus/templates/tasks/app/root.tsx +5 -2
  225. package/corpus/toolkit/CHANGELOG.md +14 -0
  226. package/corpus/toolkit/agent-native.eject.json +71 -0
  227. package/corpus/toolkit/package.json +31 -1
  228. package/corpus/toolkit/src/chat-history/ChatHistoryRail.tsx +100 -39
  229. package/corpus/toolkit/src/chat-history/index.ts +9 -0
  230. package/corpus/toolkit/src/chat-history/useChatHistoryRailController.ts +76 -0
  231. package/corpus/toolkit/src/chat-history.css +2 -0
  232. package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +11 -8
  233. package/corpus/toolkit/src/composer/PromptComposer.tsx +27 -6
  234. package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +107 -22
  235. package/corpus/toolkit/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
  236. package/corpus/toolkit/src/conformance/index.ts +3 -0
  237. package/corpus/toolkit/src/conformance/runner.tsx +710 -0
  238. package/corpus/toolkit/src/conformance/types.ts +45 -0
  239. package/corpus/toolkit/src/conformance/version.ts +22 -0
  240. package/corpus/toolkit/src/design-system/components.tsx +146 -0
  241. package/corpus/toolkit/src/design-system/context.tsx +31 -0
  242. package/corpus/toolkit/src/design-system/default-adapter.tsx +915 -0
  243. package/corpus/toolkit/src/design-system/definition.ts +14 -0
  244. package/corpus/toolkit/src/design-system/error-boundary.tsx +37 -0
  245. package/corpus/toolkit/src/design-system/index.ts +7 -0
  246. package/corpus/toolkit/src/design-system/theme.ts +145 -0
  247. package/corpus/toolkit/src/design-system/types.ts +363 -0
  248. package/corpus/toolkit/src/provider.tsx +98 -5
  249. package/corpus/toolkit/src/ui/button.tsx +95 -6
  250. package/corpus/toolkit/src/ui/dialog.tsx +48 -23
  251. package/corpus/toolkit/src/ui/popover.tsx +16 -2
  252. package/corpus/toolkit/src/ui/select.tsx +7 -3
  253. package/corpus/toolkit/src/ui/sidebar.tsx +47 -48
  254. package/corpus/toolkit/src/ui/tooltip.tsx +7 -3
  255. package/dist/a2a/types.d.ts +1 -1
  256. package/dist/a2a/types.d.ts.map +1 -1
  257. package/dist/a2a/types.js.map +1 -1
  258. package/dist/agent/types.d.ts +1 -1
  259. package/dist/agent/types.d.ts.map +1 -1
  260. package/dist/agent/types.js.map +1 -1
  261. package/dist/client/AgentPanel.d.ts.map +1 -1
  262. package/dist/client/AgentPanel.js +14 -14
  263. package/dist/client/AgentPanel.js.map +1 -1
  264. package/dist/client/AssistantChat.d.ts.map +1 -1
  265. package/dist/client/AssistantChat.js +26 -15
  266. package/dist/client/AssistantChat.js.map +1 -1
  267. package/dist/client/CommandMenu.d.ts.map +1 -1
  268. package/dist/client/CommandMenu.js +18 -106
  269. package/dist/client/CommandMenu.js.map +1 -1
  270. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  271. package/dist/client/agent-chat-adapter.js +2 -1
  272. package/dist/client/agent-chat-adapter.js.map +1 -1
  273. package/dist/client/app-providers.d.ts.map +1 -1
  274. package/dist/client/app-providers.js +1 -1
  275. package/dist/client/app-providers.js.map +1 -1
  276. package/dist/client/chat/message-components.d.ts +9 -1
  277. package/dist/client/chat/message-components.d.ts.map +1 -1
  278. package/dist/client/chat/message-components.js +62 -7
  279. package/dist/client/chat/message-components.js.map +1 -1
  280. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  281. package/dist/client/chat/tool-call-display.js +20 -5
  282. package/dist/client/chat/tool-call-display.js.map +1 -1
  283. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
  284. package/dist/client/chat/widgets/InlineExtensionWidget.js +9 -12
  285. package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
  286. package/dist/client/components/ui/message-scroller.d.ts +1 -1
  287. package/dist/client/components/ui/message-scroller.d.ts.map +1 -1
  288. package/dist/client/components/ui/message-scroller.js +4 -3
  289. package/dist/client/components/ui/message-scroller.js.map +1 -1
  290. package/dist/client/i18n.d.ts.map +1 -1
  291. package/dist/client/i18n.js +9 -0
  292. package/dist/client/i18n.js.map +1 -1
  293. package/dist/client/index.d.ts +2 -2
  294. package/dist/client/index.d.ts.map +1 -1
  295. package/dist/client/index.js +2 -2
  296. package/dist/client/index.js.map +1 -1
  297. package/dist/client/org/TeamPage.d.ts.map +1 -1
  298. package/dist/client/org/TeamPage.js +41 -33
  299. package/dist/client/org/TeamPage.js.map +1 -1
  300. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  301. package/dist/client/progress/RunsTray.js +9 -10
  302. package/dist/client/progress/RunsTray.js.map +1 -1
  303. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  304. package/dist/client/resources/McpConnectionSuggestion.js +5 -4
  305. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  306. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  307. package/dist/client/resources/McpIntegrationDialog.js +10 -8
  308. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  309. package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
  310. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  311. package/dist/client/resources/mcp-integration-catalog.js +13 -0
  312. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  313. package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
  314. package/dist/client/settings/DemoModeSection.js +2 -5
  315. package/dist/client/settings/DemoModeSection.js.map +1 -1
  316. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  317. package/dist/client/settings/SecretsSection.js +18 -6
  318. package/dist/client/settings/SecretsSection.js.map +1 -1
  319. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  320. package/dist/client/settings/SettingsPanel.js +52 -117
  321. package/dist/client/settings/SettingsPanel.js.map +1 -1
  322. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  323. package/dist/client/settings/SettingsTabsPage.js +16 -1
  324. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  325. package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
  326. package/dist/client/settings/VoiceTranscriptionSection.js +2 -5
  327. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  328. package/dist/client/settings/index.d.ts +1 -0
  329. package/dist/client/settings/index.d.ts.map +1 -1
  330. package/dist/client/settings/index.js +1 -0
  331. package/dist/client/settings/index.js.map +1 -1
  332. package/dist/client/settings/useSettingsPanelController.d.ts +22 -0
  333. package/dist/client/settings/useSettingsPanelController.d.ts.map +1 -0
  334. package/dist/client/settings/useSettingsPanelController.js +103 -0
  335. package/dist/client/settings/useSettingsPanelController.js.map +1 -0
  336. package/dist/client/setup-connections/BuilderConnectCard.d.ts +14 -6
  337. package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -1
  338. package/dist/client/setup-connections/BuilderConnectCard.js +24 -16
  339. package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -1
  340. package/dist/client/setup-connections/index.d.ts +2 -1
  341. package/dist/client/setup-connections/index.d.ts.map +1 -1
  342. package/dist/client/setup-connections/index.js +2 -1
  343. package/dist/client/setup-connections/index.js.map +1 -1
  344. package/dist/client/setup-connections/useBuilderConnectCardController.d.ts +34 -0
  345. package/dist/client/setup-connections/useBuilderConnectCardController.d.ts.map +1 -0
  346. package/dist/client/setup-connections/useBuilderConnectCardController.js +39 -0
  347. package/dist/client/setup-connections/useBuilderConnectCardController.js.map +1 -0
  348. package/dist/client/sharing/ShareButton.d.ts +2 -1
  349. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  350. package/dist/client/sharing/ShareButton.js +17 -463
  351. package/dist/client/sharing/ShareButton.js.map +1 -1
  352. package/dist/client/sharing/ShareDialog.d.ts +6 -6
  353. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  354. package/dist/client/sharing/ShareDialog.js +69 -283
  355. package/dist/client/sharing/ShareDialog.js.map +1 -1
  356. package/dist/client/sharing/index.d.ts +3 -0
  357. package/dist/client/sharing/index.d.ts.map +1 -1
  358. package/dist/client/sharing/index.js +3 -0
  359. package/dist/client/sharing/index.js.map +1 -1
  360. package/dist/client/sharing/share-controller-helpers.d.ts +70 -0
  361. package/dist/client/sharing/share-controller-helpers.d.ts.map +1 -0
  362. package/dist/client/sharing/share-controller-helpers.js +224 -0
  363. package/dist/client/sharing/share-controller-helpers.js.map +1 -0
  364. package/dist/client/sharing/useShareButtonController.d.ts +91 -0
  365. package/dist/client/sharing/useShareButtonController.d.ts.map +1 -0
  366. package/dist/client/sharing/useShareButtonController.js +397 -0
  367. package/dist/client/sharing/useShareButtonController.js.map +1 -0
  368. package/dist/client/sharing/useShareDialogController.d.ts +109 -0
  369. package/dist/client/sharing/useShareDialogController.d.ts.map +1 -0
  370. package/dist/client/sharing/useShareDialogController.js +348 -0
  371. package/dist/client/sharing/useShareDialogController.js.map +1 -0
  372. package/dist/client/sse-event-processor.d.ts.map +1 -1
  373. package/dist/client/sse-event-processor.js +21 -0
  374. package/dist/client/sse-event-processor.js.map +1 -1
  375. package/dist/client/tool-display.d.ts +16 -0
  376. package/dist/client/tool-display.d.ts.map +1 -1
  377. package/dist/client/tool-display.js +52 -0
  378. package/dist/client/tool-display.js.map +1 -1
  379. package/dist/client/use-agent-engine-configured.d.ts +3 -2
  380. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  381. package/dist/client/use-agent-engine-configured.js +7 -19
  382. package/dist/client/use-agent-engine-configured.js.map +1 -1
  383. package/dist/client/use-chat-threads.d.ts.map +1 -1
  384. package/dist/client/use-chat-threads.js +21 -8
  385. package/dist/client/use-chat-threads.js.map +1 -1
  386. package/dist/localization/default-messages.d.ts +4 -0
  387. package/dist/localization/default-messages.d.ts.map +1 -1
  388. package/dist/localization/default-messages.js +4 -0
  389. package/dist/localization/default-messages.js.map +1 -1
  390. package/dist/mcp-client/oauth-routes.d.ts +2 -0
  391. package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
  392. package/dist/mcp-client/oauth-routes.js +12 -2
  393. package/dist/mcp-client/oauth-routes.js.map +1 -1
  394. package/dist/observability/routes.d.ts +3 -3
  395. package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
  396. package/dist/scripts/call-agent.d.ts.map +1 -1
  397. package/dist/scripts/call-agent.js +5 -1
  398. package/dist/scripts/call-agent.js.map +1 -1
  399. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  400. package/dist/server/realtime-voice.js +1 -1
  401. package/dist/server/realtime-voice.js.map +1 -1
  402. package/dist/server/transcribe-voice.d.ts +1 -1
  403. package/dist/styles/agent-native.css +0 -24
  404. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  405. package/dist/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  406. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  407. package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  408. package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  409. package/dist/templates/chat/app/design-system.ts +3 -0
  410. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  411. package/dist/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  412. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  413. package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  414. package/dist/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  415. package/dist/templates/default/app/design-system.ts +3 -0
  416. package/dist/templates/default/app/root.tsx +5 -2
  417. package/dist/templates/default/package.json +1 -0
  418. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  419. package/dist/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  420. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  421. package/dist/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  422. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  423. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  424. package/dist/vite/client.d.ts +3 -0
  425. package/dist/vite/client.d.ts.map +1 -1
  426. package/dist/vite/client.js +31 -0
  427. package/dist/vite/client.js.map +1 -1
  428. package/docs/content/custom-design-system.mdx +445 -0
  429. package/docs/content/toolkit-ui.mdx +16 -0
  430. package/package.json +2 -2
  431. package/src/a2a/types.ts +1 -0
  432. package/src/agent/types.ts +1 -1
  433. package/src/client/AgentPanel.tsx +90 -107
  434. package/src/client/AssistantChat.tsx +30 -13
  435. package/src/client/CommandMenu.tsx +68 -178
  436. package/src/client/agent-chat-adapter.ts +3 -1
  437. package/src/client/app-providers.tsx +1 -1
  438. package/src/client/chat/message-components.tsx +116 -10
  439. package/src/client/chat/tool-call-display.tsx +26 -5
  440. package/src/client/chat/widgets/InlineExtensionWidget.tsx +14 -40
  441. package/src/client/components/ui/message-scroller.tsx +15 -1
  442. package/src/client/i18n.tsx +22 -0
  443. package/src/client/index.ts +17 -0
  444. package/src/client/org/TeamPage.tsx +257 -153
  445. package/src/client/progress/RunsTray.tsx +89 -88
  446. package/src/client/resources/McpConnectionSuggestion.tsx +5 -2
  447. package/src/client/resources/McpIntegrationDialog.tsx +34 -13
  448. package/src/client/resources/mcp-integration-catalog.ts +13 -0
  449. package/src/client/settings/DemoModeSection.tsx +6 -18
  450. package/src/client/settings/SecretsSection.tsx +97 -52
  451. package/src/client/settings/SettingsPanel.tsx +202 -246
  452. package/src/client/settings/SettingsTabsPage.tsx +23 -2
  453. package/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
  454. package/src/client/settings/index.ts +7 -0
  455. package/src/client/settings/useSettingsPanelController.ts +155 -0
  456. package/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
  457. package/src/client/setup-connections/index.ts +10 -0
  458. package/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
  459. package/src/client/sharing/ShareButton.tsx +64 -586
  460. package/src/client/sharing/ShareDialog.tsx +299 -633
  461. package/src/client/sharing/index.ts +42 -0
  462. package/src/client/sharing/share-controller-helpers.ts +318 -0
  463. package/src/client/sharing/useShareButtonController.ts +600 -0
  464. package/src/client/sharing/useShareDialogController.ts +559 -0
  465. package/src/client/sse-event-processor.ts +23 -0
  466. package/src/client/tool-display.ts +71 -0
  467. package/src/client/use-agent-engine-configured.ts +12 -19
  468. package/src/client/use-chat-threads.ts +33 -12
  469. package/src/localization/default-messages.ts +5 -0
  470. package/src/mcp-client/oauth-routes.ts +16 -2
  471. package/src/scripts/call-agent.ts +5 -1
  472. package/src/server/realtime-voice.ts +1 -1
  473. package/src/styles/agent-native.css +0 -24
  474. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  475. package/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  476. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  477. package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  478. package/src/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  479. package/src/templates/chat/app/design-system.ts +3 -0
  480. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  481. package/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  482. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  483. package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  484. package/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  485. package/src/templates/default/app/design-system.ts +3 -0
  486. package/src/templates/default/app/root.tsx +5 -2
  487. package/src/templates/default/package.json +1 -0
  488. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  489. package/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  490. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  491. package/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  492. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  493. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  494. package/src/vite/client.ts +39 -0
  495. package/corpus/templates/analytics/app/components/ui/calendar.tsx +0 -70
  496. package/corpus/templates/analytics/app/components/ui/chart.tsx +0 -386
  497. package/corpus/templates/calendar/app/components/ui/sonner.tsx +0 -58
  498. package/corpus/templates/forms/app/components/ui/calendar.tsx +0 -214
  499. package/corpus/templates/forms/app/components/ui/chart.tsx +0 -379
  500. package/corpus/templates/forms/app/components/ui/command.tsx +0 -153
  501. package/corpus/templates/forms/app/components/ui/context-menu.tsx +0 -198
  502. package/corpus/templates/forms/app/components/ui/menubar.tsx +0 -254
  503. package/corpus/templates/macros/app/components/ui/menubar.tsx +0 -238
  504. package/corpus/templates/macros/app/components/ui/progress.tsx +0 -26
  505. package/corpus/templates/mail/app/components/ui/calendar.tsx +0 -211
  506. package/corpus/templates/mail/app/components/ui/chart.tsx +0 -379
  507. package/corpus/templates/mail/app/components/ui/command.tsx +0 -153
  508. package/corpus/templates/mail/app/components/ui/context-menu.tsx +0 -198
  509. package/corpus/templates/mail/app/components/ui/menubar.tsx +0 -254
  510. package/corpus/templates/tasks/app/components/ui/accordion.tsx +0 -56
  511. package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +0 -5
  512. package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +0 -115
  513. package/corpus/templates/tasks/app/components/ui/calendar.tsx +0 -70
  514. package/corpus/templates/tasks/app/components/ui/carousel.tsx +0 -260
  515. package/corpus/templates/tasks/app/components/ui/chart.tsx +0 -379
  516. package/corpus/templates/tasks/app/components/ui/form.tsx +0 -177
  517. package/corpus/templates/tasks/app/components/ui/hover-card.tsx +0 -27
  518. package/corpus/templates/tasks/app/components/ui/input-otp.tsx +0 -69
  519. package/corpus/templates/tasks/app/components/ui/menubar.tsx +0 -254
  520. package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +0 -128
  521. package/corpus/templates/tasks/app/components/ui/pagination.tsx +0 -121
  522. package/corpus/templates/tasks/app/components/ui/resizable.tsx +0 -43
  523. package/corpus/templates/tasks/app/components/ui/sidebar.tsx +0 -782
  524. package/corpus/templates/tasks/app/components/ui/toggle.tsx +0 -43
@@ -1 +1 @@
1
- {"version":3,"file":"McpIntegrationDialog.js","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,GAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO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I,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,EAC7C,SAAS,EAAC,qNAAqN,aAE9N,IAAI,IAAI,KAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG,EAC5D,CAAC,CAAC,yBAAyB,CAAC,IACtB,CACV,IACG,IACL,CACJ,GACa,GACT,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconArrowLeft,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport { openAgentSettings } from \"../CommandMenu.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport { cn } from \"../utils.js\";\nimport {\n buildMcpOAuthStartUrl,\n createMcpIntegrationFormDefaults,\n filterMcpIntegrations,\n getMcpIntegrationApiFallback,\n getDefaultMcpIntegrations,\n isCustomMcpIntegrationEnabled,\n resolveMcpIntegrationScope,\n type DefaultMcpIntegration,\n} from \"./mcp-integration-catalog.js\";\nimport {\n formatMcpServerError,\n getMcpUrlValidationError,\n testMcpServerUrl,\n useMcpServers,\n type CreateMcpServerArgs,\n type McpServerScope,\n} from \"./use-mcp-servers.js\";\n\ntype DialogMode = \"catalog\" | \"form\";\n\nexport interface McpIntegrationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n initialIntegrationId?: string | null;\n defaultScope: McpServerScope;\n canCreateOrgMcp: boolean;\n hasOrg: boolean;\n onCreateMcpServer: (args: CreateMcpServerArgs) => Promise<unknown>;\n onCreated?: () => void;\n integrations?: DefaultMcpIntegration[];\n}\n\ninterface TestResult {\n ok: boolean;\n message: string;\n}\n\nfunction IntegrationLogo({ name, logoUrl }: { name: string; logoUrl: string }) {\n const [loaded, setLoaded] = useState(false);\n const [loadFailed, setLoadFailed] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setLoadFailed(false);\n }, [logoUrl]);\n\n return (\n <div className=\"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background text-[11px] font-semibold text-muted-foreground\">\n <span aria-hidden=\"true\" hidden={loaded}>\n {name.slice(0, 1)}\n </span>\n <img\n src={logoUrl}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"absolute inset-1 h-6 w-6 object-contain\"\n hidden={loadFailed}\n onLoad={() => {\n setLoadFailed(false);\n setLoaded(true);\n }}\n onError={() => {\n setLoadFailed(true);\n setLoaded(false);\n }}\n />\n </div>\n );\n}\n\nfunction parseHeaderLines(text: string): Record<string, string> | undefined {\n const out: Record<string, string> = {};\n for (const line of text.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const idx = trimmed.indexOf(\":\");\n if (idx <= 0) continue;\n const key = trimmed.slice(0, idx).trim();\n const value = trimmed.slice(idx + 1).trim();\n if (!key || !value) continue;\n out[key] = value;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\nfunction compareUrl(value: string): string {\n try {\n const url = new URL(value.trim());\n url.hash = \"\";\n return url.toString().replace(/\\/+$/, \"\");\n } catch {\n return value.trim().replace(/\\/+$/, \"\");\n }\n}\n\nexport function McpIntegrationDialog({\n open,\n onOpenChange,\n initialIntegrationId = null,\n defaultScope,\n canCreateOrgMcp,\n hasOrg,\n onCreateMcpServer,\n onCreated,\n integrations,\n}: McpIntegrationDialogProps) {\n const t = useT();\n const [mode, setMode] = useState<DialogMode>(\"catalog\");\n const [query, setQuery] = useState(\"\");\n const [selected, setSelected] = useState<DefaultMcpIntegration | null>(null);\n const safeDefaultScope = resolveMcpIntegrationScope(\n defaultScope,\n hasOrg,\n canCreateOrgMcp,\n );\n const [scope, setScope] = useState<McpServerScope>(safeDefaultScope);\n const [name, setName] = useState(\"\");\n const [url, setUrl] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [headersText, setHeadersText] = useState(\"\");\n const [busy, setBusy] = useState(false);\n const [quickBusyId, setQuickBusyId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [testResult, setTestResult] = useState<TestResult | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const mcpServersQuery = useMcpServers();\n const defaultIntegrations = useMemo(\n () => integrations ?? getDefaultMcpIntegrations(),\n [integrations],\n );\n const customIntegrationEnabled = useMemo(\n () => isCustomMcpIntegrationEnabled(),\n [],\n );\n const showCatalog = defaultIntegrations.length > 0;\n\n const connectedUrls = useMemo(() => {\n const servers = [\n ...(mcpServersQuery.data?.user ?? []),\n ...(mcpServersQuery.data?.org ?? []),\n ];\n // A saved server is not necessarily a working connection. The settings\n // page reports failed and unknown health states separately, so only mark\n // catalog entries as connected after the health probe succeeds.\n return new Set(\n servers\n .filter((server) => server.status.state === \"connected\")\n .map((server) => compareUrl(server.url)),\n );\n }, [mcpServersQuery.data]);\n\n const filteredIntegrations = useMemo(\n () => filterMcpIntegrations(query, defaultIntegrations),\n [defaultIntegrations, query],\n );\n\n const selectedRequiresSetup = Boolean(\n selected &&\n (selected.connectionMode === \"manual\" ||\n selected.availability === \"provider-setup\" ||\n selected.availability === \"client-restricted\"),\n );\n\n useEffect(() => {\n if (!open) return;\n const initialIntegration = initialIntegrationId\n ? defaultIntegrations.find(\n (integration) => integration.id === initialIntegrationId,\n )\n : null;\n const initialDefaults =\n createMcpIntegrationFormDefaults(initialIntegration);\n setMode(initialIntegration || !showCatalog ? \"form\" : \"catalog\");\n setQuery(\"\");\n setSelected(initialIntegration ?? null);\n setScope(safeDefaultScope);\n setName(initialDefaults.name);\n setUrl(initialDefaults.url);\n setDescription(initialDefaults.description);\n setHeadersText(initialDefaults.headersText);\n setBusy(false);\n setQuickBusyId(null);\n setError(null);\n setTestResult(null);\n }, [\n defaultIntegrations,\n initialIntegrationId,\n open,\n safeDefaultScope,\n showCatalog,\n ]);\n\n useEffect(() => {\n if (open && mode === \"form\") {\n const timer = window.setTimeout(() => inputRef.current?.focus(), 60);\n return () => window.clearTimeout(timer);\n }\n }, [mode, open]);\n\n const clearFeedback = () => {\n setError(null);\n setTestResult(null);\n };\n\n const openForm = (integration?: DefaultMcpIntegration | null) => {\n const defaults = createMcpIntegrationFormDefaults(integration);\n setSelected(integration ?? null);\n setScope(safeDefaultScope);\n setName(defaults.name);\n setUrl(defaults.url);\n setDescription(defaults.description);\n setHeadersText(defaults.headersText);\n setError(null);\n setTestResult(null);\n setMode(\"form\");\n };\n\n const beginOAuth = (args: {\n name: string;\n url: string;\n description: string;\n }) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n const returnUrl =\n typeof window === \"undefined\"\n ? \"/\"\n : window.location.pathname +\n window.location.search +\n window.location.hash;\n window.location.assign(\n agentNativePath(\n buildMcpOAuthStartUrl({\n name: args.name,\n url: args.url,\n description: args.description,\n scope: safeDefaultScope,\n returnUrl,\n }),\n ),\n );\n };\n\n const connectWithOAuth = (integration: DefaultMcpIntegration) =>\n beginOAuth({\n name: integration.name,\n url: integration.url,\n description: integration.description,\n });\n\n const connectCustomWithOAuth = () => {\n if (!name.trim()) {\n setError(t(\"mcpIntegrations.serverNameRequired\"));\n return;\n }\n beginOAuth({\n name: name.trim(),\n url: url.trim(),\n description: description.trim(),\n });\n };\n\n const createServer = async (\n args: CreateMcpServerArgs,\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n\n if (options?.quickId) setQuickBusyId(options.quickId);\n setBusy(true);\n setError(null);\n try {\n await onCreateMcpServer(args);\n onOpenChange(false);\n onCreated?.();\n } catch (err) {\n setError(formatMcpServerError(err));\n } finally {\n setBusy(false);\n setQuickBusyId(null);\n }\n };\n\n const submitForm = () => {\n const trimmedName = name.trim();\n const trimmedUrl = url.trim();\n if (!trimmedName || !trimmedUrl || busy) return;\n void createServer({\n scope,\n name: trimmedName,\n url: trimmedUrl,\n headers: parseHeaderLines(headersText),\n description: description.trim() || undefined,\n });\n };\n\n const quickConnect = (integration: DefaultMcpIntegration) => {\n if (\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\"\n ) {\n return;\n }\n if (integration.authMode === \"oauth\") {\n connectWithOAuth(integration);\n return;\n }\n if (integration.authMode === \"headers\") {\n openForm(integration);\n return;\n }\n void createServer(\n {\n scope: safeDefaultScope,\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n { quickId: integration.id },\n );\n };\n\n const runTest = async () => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl || busy) return;\n const validationError = getMcpUrlValidationError(trimmedUrl);\n if (validationError) {\n setTestResult({ ok: false, message: validationError });\n setError(null);\n return;\n }\n setBusy(true);\n setError(null);\n setTestResult(null);\n try {\n const res = await testMcpServerUrl(\n trimmedUrl,\n parseHeaderLines(headersText),\n );\n setTestResult(\n res.ok\n ? {\n ok: true,\n message: t(\"mcpIntegrations.toolsAvailable\", {\n count: res.toolCount ?? 0,\n }),\n }\n : { ok: false, message: res.error ?? t(\"mcpIntegrations.failed\") },\n );\n } catch (err) {\n setTestResult({ ok: false, message: formatMcpServerError(err) });\n } finally {\n setBusy(false);\n }\n };\n\n const renderScopeSelector = () => {\n const orgTooltip = !hasOrg\n ? t(\"mcpIntegrations.orgNoOrg\")\n : !canCreateOrgMcp\n ? t(\"mcpIntegrations.orgAdminOnly\")\n : null;\n\n return (\n <div className=\"flex gap-1 rounded-md border border-border bg-background p-0.5\">\n <button\n type=\"button\"\n onClick={() => setScope(\"user\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"user\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.personal\")}\n </button>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => hasOrg && canCreateOrgMcp && setScope(\"org\")}\n disabled={!hasOrg || !canCreateOrgMcp}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"org\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n (!hasOrg || !canCreateOrgMcp) &&\n \"cursor-not-allowed opacity-50 hover:text-muted-foreground\",\n )}\n >\n {t(\"mcpIntegrations.organization\")}\n </button>\n </TooltipTrigger>\n {orgTooltip && <TooltipContent>{orgTooltip}</TooltipContent>}\n </Tooltip>\n </div>\n );\n };\n\n if (!showCatalog && !customIntegrationEnabled) return null;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"flex max-h-[min(820px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-[760px] flex-col gap-0 p-0 sm:w-[min(760px,calc(100vw-48px))]\">\n {mode === \"catalog\" ? (\n <>\n <DialogHeader className=\"shrink-0 px-7 pb-5 pe-14 pt-6\">\n <DialogTitle>{t(\"mcpIntegrations.title\")}</DialogTitle>\n <DialogDescription>\n {t(\"mcpIntegrations.description\", {\n count: defaultIntegrations.length,\n })}\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row\">\n <label className=\"relative min-w-0 flex-1\">\n <IconSearch className=\"pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n className=\"h-9 w-full rounded-md border border-border bg-background pe-3 ps-8 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.searchPlaceholder\")}\n />\n </label>\n <button\n type=\"button\"\n onClick={() => openForm(null)}\n className={cn(\n \"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 text-[12px] font-medium text-foreground hover:bg-accent\",\n !customIntegrationEnabled && \"hidden\",\n )}\n >\n {t(\"mcpIntegrations.addYourOwn\")}\n </button>\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 pb-7\">\n {error && (\n <div className=\"mb-3 rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2 text-[12px] leading-relaxed text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {filteredIntegrations.map((integration) => {\n const apiFallback = getMcpIntegrationApiFallback(integration);\n const connected = connectedUrls.has(\n compareUrl(integration.url),\n );\n const requiresHeaders = integration.authMode === \"headers\";\n const setupOnly =\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\" ||\n integration.availability === \"client-restricted\";\n return (\n <article\n key={integration.id}\n className=\"flex min-h-[128px] flex-col rounded-md border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20\"\n >\n <div className=\"flex items-center gap-3\">\n <IntegrationLogo\n name={integration.name}\n logoUrl={integration.logoUrl}\n />\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-[13px] font-semibold text-foreground\">\n {integration.name}\n </h3>\n {integration.availability !== \"ready\" && (\n <span className=\"mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.availability === \"beta\"\n ? t(\"mcpIntegrations.status.beta\")\n : integration.availability ===\n \"client-restricted\"\n ? t(\"mcpIntegrations.status.clientRestricted\")\n : t(\"mcpIntegrations.status.setupRequired\")}\n </span>\n )}\n <span className=\"ms-1 mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.verification === \"verified\"\n ? t(\"mcpIntegrations.status.verified\")\n : integration.verification === \"restricted\"\n ? t(\"mcpIntegrations.status.restricted\")\n : t(\"mcpIntegrations.status.preflightOnly\")}\n </span>\n </div>\n </div>\n <p className=\"mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground\">\n {t(integration.descriptionKey)}\n </p>\n <div className=\"mt-3 flex items-center gap-2\">\n {connected ? (\n <button\n type=\"button\"\n disabled\n className=\"inline-flex h-8 flex-1 cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border bg-muted px-2.5 text-[12px] font-medium text-muted-foreground opacity-70\"\n >\n {t(\"mcpIntegrations.connected\")}\n </button>\n ) : setupOnly ? (\n <>\n {apiFallback && (\n <button\n type=\"button\"\n onClick={() =>\n openAgentSettings(\n `secrets:${apiFallback.secretKey}`,\n )\n }\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.useApiToken\")}\n </button>\n )}\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-[12px] font-medium text-foreground hover:bg-accent\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </>\n ) : (\n <button\n type=\"button\"\n onClick={() => quickConnect(integration)}\n disabled={busy}\n className={cn(\n \"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\",\n busy && \"cursor-not-allowed opacity-70\",\n )}\n >\n {quickBusyId === integration.id ? (\n <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />\n ) : null}\n {integration.authMode === \"oauth\"\n ? t(\"mcpIntegrations.connectWithOAuth\")\n : requiresHeaders\n ? t(\"mcpIntegrations.configure\")\n : t(\"mcpIntegrations.connect\")}\n </button>\n )}\n {integration.docsUrl && (\n <Tooltip>\n <TooltipTrigger asChild>\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label={t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n >\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </article>\n );\n })}\n </div>\n {filteredIntegrations.length === 0 && (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-[12px] text-muted-foreground\">\n {t(\"mcpIntegrations.noMatches\")}\n </div>\n )}\n </div>\n </>\n ) : (\n <>\n <DialogHeader className=\"shrink-0 border-b border-border px-7 pb-5 pe-14 pt-6\">\n <button\n type=\"button\"\n onClick={() => {\n clearFeedback();\n setMode(\"catalog\");\n }}\n className={cn(\n \"mb-1 inline-flex w-fit items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground\",\n !showCatalog && \"hidden\",\n )}\n >\n <IconArrowLeft className=\"h-3 w-3 rtl:-scale-x-100\" />\n {t(\"mcpIntegrations.backToIntegrations\")}\n </button>\n <DialogTitle>\n {selected\n ? t(\"mcpIntegrations.configureTitle\", {\n name: selected.name,\n })\n : t(\"mcpIntegrations.customTitle\")}\n </DialogTitle>\n <DialogDescription>\n {selected\n ? selected.authMode === \"none\"\n ? t(\"mcpIntegrations.presetNoAuthDescription\")\n : t(\"mcpIntegrations.presetAuthDescription\")\n : t(\"mcpIntegrations.customDescription\")}\n </DialogDescription>\n </DialogHeader>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 py-5\">\n <div className=\"space-y-3\">\n {renderScopeSelector()}\n {selected?.setupNoteKey && (\n <div className=\"rounded-md border border-border bg-muted/40 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground\">\n {t(selected.setupNoteKey)}\n </div>\n )}\n {selected?.authMode === \"oauth\" && (\n <div className=\"rounded-md border border-blue-500/20 bg-blue-500/5 px-3 py-2 text-[11px] leading-relaxed text-blue-700 dark:text-blue-300\">\n {t(\"mcpIntegrations.oauthNotice\")}\n </div>\n )}\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.serverName\")}\n </span>\n <input\n ref={inputRef}\n value={name}\n onChange={(event) => {\n setName(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.serverNamePlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.url\")}\n </span>\n <input\n value={url}\n onChange={(event) => {\n setUrl(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.urlPlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.fieldDescription\")}\n </span>\n <input\n value={description}\n onChange={(event) => {\n setDescription(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.descriptionPlaceholder\")}\n />\n </label>\n {selected?.authMode !== \"oauth\" && (\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.headers\")}\n </span>\n <textarea\n value={headersText}\n onChange={(event) => {\n setHeadersText(event.target.value);\n clearFeedback();\n }}\n rows={3}\n className=\"w-full resize-y rounded-md border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n style={{\n fontFamily:\n 'ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace',\n }}\n placeholder={\n selected?.headerPlaceholder ??\n t(\"mcpIntegrations.headersPlaceholder\")\n }\n />\n </label>\n )}\n {selected?.docsUrl && (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-[11px] text-muted-foreground underline hover:text-foreground\"\n >\n {t(\"mcpIntegrations.openSetupDocs\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n )}\n {testResult && (\n <div\n className={cn(\n \"flex items-start gap-1 rounded-md px-3 py-2 text-[11px] leading-snug\",\n testResult.ok\n ? \"bg-green-500/5 text-green-600 dark:text-green-400\"\n : \"bg-red-500/5 text-red-600 dark:text-red-400\",\n )}\n >\n {testResult.ok && (\n <IconCheck className=\"mt-0.5 h-3 w-3 shrink-0\" />\n )}\n <span className=\"min-w-0 break-words\">\n {testResult.message}\n </span>\n </div>\n )}\n {error && (\n <div className=\"break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4\">\n <button\n type=\"button\"\n onClick={runTest}\n disabled={!url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.test\")}\n </button>\n {selected?.authMode === \"oauth\" && !selectedRequiresSetup ? (\n <button\n type=\"button\"\n onClick={() => connectWithOAuth(selected)}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : !selected ? (\n <button\n type=\"button\"\n onClick={connectCustomWithOAuth}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : null}\n {selectedRequiresSetup ? (\n selected?.docsUrl ? (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n ) : null\n ) : (\n <button\n type=\"button\"\n onClick={submitForm}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connect\")}\n </button>\n )}\n </div>\n </>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
1
+ {"version":3,"file":"McpIntegrationDialog.js","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,W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AC/B,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,eAClC,IAAI,EACf,SAAS,EAAC,oKAAoK,aAE7K,IAAI,IAAI,CACP,KAAC,WAAW,IAAC,SAAS,EAAC,wCAAwC,GAAG,CACnE,EACA,CAAC,CAAC,kCAAkC,CAAC,IAC/B,CACV,CAAC,CAAC,CAAC,IAAI,EACP,qBAAqB,CAAC,CAAC,CAAC,CACvB,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAClB,aACE,IAAI,EAAE,QAAQ,CAAC,OAAO,EACtB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,oKAAoK,aAE7K,CAAC,CAAC,2BAA2B,CAAC,EAC/B,KAAC,gBAAgB,IAAC,SAAS,EAAC,SAAS,GAAG,IACtC,CACL,CAAC,CAAC,CAAC,IAAI,CACT,CAAC,CAAC,CAAC,CACF,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,EAC7C,SAAS,EAAC,qNAAqN,aAE9N,IAAI,IAAI,KAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG,EAC5D,CAAC,CAAC,yBAAyB,CAAC,IACtB,CACV,IACG,IACL,CACJ,GACa,GACT,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconArrowLeft,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport { openAgentSettings } from \"../CommandMenu.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport { cn } from \"../utils.js\";\nimport {\n buildMcpOAuthStartUrl,\n createMcpIntegrationFormDefaults,\n filterMcpIntegrations,\n getMcpIntegrationApiFallback,\n getDefaultMcpIntegrations,\n isCustomMcpIntegrationEnabled,\n navigateToMcpOAuthStart,\n resolveMcpIntegrationScope,\n type DefaultMcpIntegration,\n} from \"./mcp-integration-catalog.js\";\nimport {\n formatMcpServerError,\n getMcpUrlValidationError,\n testMcpServerUrl,\n useMcpServers,\n type CreateMcpServerArgs,\n type McpServerScope,\n} from \"./use-mcp-servers.js\";\n\ntype DialogMode = \"catalog\" | \"form\";\n\nexport interface McpIntegrationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n initialIntegrationId?: string | null;\n defaultScope: McpServerScope;\n canCreateOrgMcp: boolean;\n hasOrg: boolean;\n onCreateMcpServer: (args: CreateMcpServerArgs) => Promise<unknown>;\n onCreated?: () => void;\n integrations?: DefaultMcpIntegration[];\n}\n\ninterface TestResult {\n ok: boolean;\n message: string;\n}\n\nfunction IntegrationLogo({ name, logoUrl }: { name: string; logoUrl: string }) {\n const [loaded, setLoaded] = useState(false);\n const [loadFailed, setLoadFailed] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setLoadFailed(false);\n }, [logoUrl]);\n\n return (\n <div className=\"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background text-[11px] font-semibold text-muted-foreground\">\n <span aria-hidden=\"true\" hidden={loaded}>\n {name.slice(0, 1)}\n </span>\n <img\n src={logoUrl}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"absolute inset-1 h-6 w-6 object-contain\"\n hidden={loadFailed}\n onLoad={() => {\n setLoadFailed(false);\n setLoaded(true);\n }}\n onError={() => {\n setLoadFailed(true);\n setLoaded(false);\n }}\n />\n </div>\n );\n}\n\nfunction parseHeaderLines(text: string): Record<string, string> | undefined {\n const out: Record<string, string> = {};\n for (const line of text.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const idx = trimmed.indexOf(\":\");\n if (idx <= 0) continue;\n const key = trimmed.slice(0, idx).trim();\n const value = trimmed.slice(idx + 1).trim();\n if (!key || !value) continue;\n out[key] = value;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\nfunction compareUrl(value: string): string {\n try {\n const url = new URL(value.trim());\n url.hash = \"\";\n return url.toString().replace(/\\/+$/, \"\");\n } catch {\n return value.trim().replace(/\\/+$/, \"\");\n }\n}\n\nexport function McpIntegrationDialog({\n open,\n onOpenChange,\n initialIntegrationId = null,\n defaultScope,\n canCreateOrgMcp,\n hasOrg,\n onCreateMcpServer,\n onCreated,\n integrations,\n}: McpIntegrationDialogProps) {\n const t = useT();\n const [mode, setMode] = useState<DialogMode>(\"catalog\");\n const [query, setQuery] = useState(\"\");\n const [selected, setSelected] = useState<DefaultMcpIntegration | null>(null);\n const safeDefaultScope = resolveMcpIntegrationScope(\n defaultScope,\n hasOrg,\n canCreateOrgMcp,\n );\n const [scope, setScope] = useState<McpServerScope>(safeDefaultScope);\n const [name, setName] = useState(\"\");\n const [url, setUrl] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [headersText, setHeadersText] = useState(\"\");\n const [busy, setBusy] = useState(false);\n const [quickBusyId, setQuickBusyId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [testResult, setTestResult] = useState<TestResult | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const mcpServersQuery = useMcpServers();\n const defaultIntegrations = useMemo(\n () => integrations ?? getDefaultMcpIntegrations(),\n [integrations],\n );\n const customIntegrationEnabled = useMemo(\n () => isCustomMcpIntegrationEnabled(),\n [],\n );\n const showCatalog = defaultIntegrations.length > 0;\n\n const connectedUrls = useMemo(() => {\n const servers = [\n ...(mcpServersQuery.data?.user ?? []),\n ...(mcpServersQuery.data?.org ?? []),\n ];\n // A saved server is not necessarily a working connection. The settings\n // page reports failed and unknown health states separately, so only mark\n // catalog entries as connected after the health probe succeeds.\n return new Set(\n servers\n .filter((server) => server.status.state === \"connected\")\n .map((server) => compareUrl(server.url)),\n );\n }, [mcpServersQuery.data]);\n\n const filteredIntegrations = useMemo(\n () => filterMcpIntegrations(query, defaultIntegrations),\n [defaultIntegrations, query],\n );\n\n const selectedRequiresSetup = Boolean(\n selected &&\n (selected.connectionMode === \"manual\" ||\n selected.availability === \"provider-setup\" ||\n selected.availability === \"client-restricted\"),\n );\n\n useEffect(() => {\n if (!open) return;\n const initialIntegration = initialIntegrationId\n ? defaultIntegrations.find(\n (integration) => integration.id === initialIntegrationId,\n )\n : null;\n const initialDefaults =\n createMcpIntegrationFormDefaults(initialIntegration);\n setMode(initialIntegration || !showCatalog ? \"form\" : \"catalog\");\n setQuery(\"\");\n setSelected(initialIntegration ?? null);\n setScope(safeDefaultScope);\n setName(initialDefaults.name);\n setUrl(initialDefaults.url);\n setDescription(initialDefaults.description);\n setHeadersText(initialDefaults.headersText);\n setBusy(false);\n setQuickBusyId(null);\n setError(null);\n setTestResult(null);\n }, [\n defaultIntegrations,\n initialIntegrationId,\n open,\n safeDefaultScope,\n showCatalog,\n ]);\n\n useEffect(() => {\n if (open && mode === \"form\") {\n const timer = window.setTimeout(() => inputRef.current?.focus(), 60);\n return () => window.clearTimeout(timer);\n }\n }, [mode, open]);\n\n const clearFeedback = () => {\n setError(null);\n setTestResult(null);\n };\n\n const openForm = (integration?: DefaultMcpIntegration | null) => {\n const defaults = createMcpIntegrationFormDefaults(integration);\n setSelected(integration ?? null);\n setScope(safeDefaultScope);\n setName(defaults.name);\n setUrl(defaults.url);\n setDescription(defaults.description);\n setHeadersText(defaults.headersText);\n setError(null);\n setTestResult(null);\n setMode(\"form\");\n };\n\n const beginOAuth = (\n args: {\n name: string;\n url: string;\n description: string;\n },\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n setBusy(true);\n setQuickBusyId(options?.quickId ?? null);\n const returnUrl =\n typeof window === \"undefined\"\n ? \"/\"\n : window.location.pathname +\n window.location.search +\n window.location.hash;\n navigateToMcpOAuthStart(\n agentNativePath(\n buildMcpOAuthStartUrl({\n name: args.name,\n url: args.url,\n description: args.description,\n scope: safeDefaultScope,\n returnUrl,\n }),\n ),\n );\n };\n\n const connectWithOAuth = (\n integration: DefaultMcpIntegration,\n options?: { quickId?: string },\n ) =>\n beginOAuth(\n {\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n options,\n );\n\n const connectCustomWithOAuth = () => {\n if (!name.trim()) {\n setError(t(\"mcpIntegrations.serverNameRequired\"));\n return;\n }\n beginOAuth({\n name: name.trim(),\n url: url.trim(),\n description: description.trim(),\n });\n };\n\n const createServer = async (\n args: CreateMcpServerArgs,\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n\n if (options?.quickId) setQuickBusyId(options.quickId);\n setBusy(true);\n setError(null);\n try {\n await onCreateMcpServer(args);\n onOpenChange(false);\n onCreated?.();\n } catch (err) {\n setError(formatMcpServerError(err));\n } finally {\n setBusy(false);\n setQuickBusyId(null);\n }\n };\n\n const submitForm = () => {\n const trimmedName = name.trim();\n const trimmedUrl = url.trim();\n if (!trimmedName || !trimmedUrl || busy) return;\n void createServer({\n scope,\n name: trimmedName,\n url: trimmedUrl,\n headers: parseHeaderLines(headersText),\n description: description.trim() || undefined,\n });\n };\n\n const quickConnect = (integration: DefaultMcpIntegration) => {\n if (\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\"\n ) {\n return;\n }\n if (integration.authMode === \"oauth\") {\n connectWithOAuth(integration, { quickId: integration.id });\n return;\n }\n if (integration.authMode === \"headers\") {\n openForm(integration);\n return;\n }\n void createServer(\n {\n scope: safeDefaultScope,\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n { quickId: integration.id },\n );\n };\n\n const runTest = async () => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl || busy) return;\n const validationError = getMcpUrlValidationError(trimmedUrl);\n if (validationError) {\n setTestResult({ ok: false, message: validationError });\n setError(null);\n return;\n }\n setBusy(true);\n setError(null);\n setTestResult(null);\n try {\n const res = await testMcpServerUrl(\n trimmedUrl,\n parseHeaderLines(headersText),\n );\n setTestResult(\n res.ok\n ? {\n ok: true,\n message: t(\"mcpIntegrations.toolsAvailable\", {\n count: res.toolCount ?? 0,\n }),\n }\n : { ok: false, message: res.error ?? t(\"mcpIntegrations.failed\") },\n );\n } catch (err) {\n setTestResult({ ok: false, message: formatMcpServerError(err) });\n } finally {\n setBusy(false);\n }\n };\n\n const renderScopeSelector = () => {\n const orgTooltip = !hasOrg\n ? t(\"mcpIntegrations.orgNoOrg\")\n : !canCreateOrgMcp\n ? t(\"mcpIntegrations.orgAdminOnly\")\n : null;\n\n return (\n <div className=\"flex gap-1 rounded-md border border-border bg-background p-0.5\">\n <button\n type=\"button\"\n onClick={() => setScope(\"user\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"user\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.personal\")}\n </button>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => hasOrg && canCreateOrgMcp && setScope(\"org\")}\n disabled={!hasOrg || !canCreateOrgMcp}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"org\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n (!hasOrg || !canCreateOrgMcp) &&\n \"cursor-not-allowed opacity-50 hover:text-muted-foreground\",\n )}\n >\n {t(\"mcpIntegrations.organization\")}\n </button>\n </TooltipTrigger>\n {orgTooltip && <TooltipContent>{orgTooltip}</TooltipContent>}\n </Tooltip>\n </div>\n );\n };\n\n if (!showCatalog && !customIntegrationEnabled) return null;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"flex max-h-[min(820px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-[760px] flex-col gap-0 p-0 sm:w-[min(760px,calc(100vw-48px))]\">\n {mode === \"catalog\" ? (\n <>\n <DialogHeader className=\"shrink-0 px-7 pb-5 pe-14 pt-6\">\n <DialogTitle>{t(\"mcpIntegrations.title\")}</DialogTitle>\n <DialogDescription>\n {t(\"mcpIntegrations.description\", {\n count: defaultIntegrations.length,\n })}\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row\">\n <label className=\"relative min-w-0 flex-1\">\n <IconSearch className=\"pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n className=\"h-9 w-full rounded-md border border-border bg-background pe-3 ps-8 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.searchPlaceholder\")}\n />\n </label>\n <button\n type=\"button\"\n onClick={() => openForm(null)}\n className={cn(\n \"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 text-[12px] font-medium text-foreground hover:bg-accent\",\n !customIntegrationEnabled && \"hidden\",\n )}\n >\n {t(\"mcpIntegrations.addYourOwn\")}\n </button>\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 pb-7\">\n {error && (\n <div className=\"mb-3 rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2 text-[12px] leading-relaxed text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {filteredIntegrations.map((integration) => {\n const apiFallback = getMcpIntegrationApiFallback(integration);\n const connected = connectedUrls.has(\n compareUrl(integration.url),\n );\n const requiresHeaders = integration.authMode === \"headers\";\n const setupOnly =\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\" ||\n integration.availability === \"client-restricted\";\n return (\n <article\n key={integration.id}\n className=\"flex min-h-[128px] flex-col rounded-md border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20\"\n >\n <div className=\"flex items-center gap-3\">\n <IntegrationLogo\n name={integration.name}\n logoUrl={integration.logoUrl}\n />\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-[13px] font-semibold text-foreground\">\n {integration.name}\n </h3>\n {integration.availability !== \"ready\" && (\n <span className=\"mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.availability === \"beta\"\n ? t(\"mcpIntegrations.status.beta\")\n : integration.availability ===\n \"client-restricted\"\n ? t(\"mcpIntegrations.status.clientRestricted\")\n : t(\"mcpIntegrations.status.setupRequired\")}\n </span>\n )}\n <span className=\"ms-1 mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.verification === \"verified\"\n ? t(\"mcpIntegrations.status.verified\")\n : integration.verification === \"restricted\"\n ? t(\"mcpIntegrations.status.restricted\")\n : t(\"mcpIntegrations.status.preflightOnly\")}\n </span>\n </div>\n </div>\n <p className=\"mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground\">\n {t(integration.descriptionKey)}\n </p>\n <div className=\"mt-3 flex items-center gap-2\">\n {connected ? (\n <button\n type=\"button\"\n disabled\n className=\"inline-flex h-8 flex-1 cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border bg-muted px-2.5 text-[12px] font-medium text-muted-foreground opacity-70\"\n >\n {t(\"mcpIntegrations.connected\")}\n </button>\n ) : setupOnly ? (\n <>\n {apiFallback && (\n <button\n type=\"button\"\n onClick={() =>\n openAgentSettings(\n `secrets:${apiFallback.secretKey}`,\n )\n }\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.useApiToken\")}\n </button>\n )}\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-[12px] font-medium text-foreground hover:bg-accent\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </>\n ) : (\n <button\n type=\"button\"\n onClick={() => quickConnect(integration)}\n disabled={busy}\n aria-busy={quickBusyId === integration.id}\n className={cn(\n \"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\",\n busy && \"cursor-not-allowed opacity-70\",\n )}\n >\n {quickBusyId === integration.id ? (\n <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />\n ) : null}\n {integration.authMode === \"oauth\"\n ? t(\"mcpIntegrations.connectWithOAuth\")\n : requiresHeaders\n ? t(\"mcpIntegrations.configure\")\n : t(\"mcpIntegrations.connect\")}\n </button>\n )}\n {integration.docsUrl && (\n <Tooltip>\n <TooltipTrigger asChild>\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label={t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n >\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </article>\n );\n })}\n </div>\n {filteredIntegrations.length === 0 && (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-[12px] text-muted-foreground\">\n {t(\"mcpIntegrations.noMatches\")}\n </div>\n )}\n </div>\n </>\n ) : (\n <>\n <DialogHeader className=\"shrink-0 border-b border-border px-7 pb-5 pe-14 pt-6\">\n <button\n type=\"button\"\n onClick={() => {\n clearFeedback();\n setMode(\"catalog\");\n }}\n className={cn(\n \"mb-1 inline-flex w-fit items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground\",\n !showCatalog && \"hidden\",\n )}\n >\n <IconArrowLeft className=\"h-3 w-3 rtl:-scale-x-100\" />\n {t(\"mcpIntegrations.backToIntegrations\")}\n </button>\n <DialogTitle>\n {selected\n ? t(\"mcpIntegrations.configureTitle\", {\n name: selected.name,\n })\n : t(\"mcpIntegrations.customTitle\")}\n </DialogTitle>\n <DialogDescription>\n {selected\n ? selected.authMode === \"none\"\n ? t(\"mcpIntegrations.presetNoAuthDescription\")\n : t(\"mcpIntegrations.presetAuthDescription\")\n : t(\"mcpIntegrations.customDescription\")}\n </DialogDescription>\n </DialogHeader>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 py-5\">\n <div className=\"space-y-3\">\n {renderScopeSelector()}\n {selected?.setupNoteKey && (\n <div className=\"rounded-md border border-border bg-muted/40 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground\">\n {t(selected.setupNoteKey)}\n </div>\n )}\n {selected?.authMode === \"oauth\" && (\n <div className=\"rounded-md border border-blue-500/20 bg-blue-500/5 px-3 py-2 text-[11px] leading-relaxed text-blue-700 dark:text-blue-300\">\n {t(\"mcpIntegrations.oauthNotice\")}\n </div>\n )}\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.serverName\")}\n </span>\n <input\n ref={inputRef}\n value={name}\n onChange={(event) => {\n setName(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.serverNamePlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.url\")}\n </span>\n <input\n value={url}\n onChange={(event) => {\n setUrl(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.urlPlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.fieldDescription\")}\n </span>\n <input\n value={description}\n onChange={(event) => {\n setDescription(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.descriptionPlaceholder\")}\n />\n </label>\n {selected?.authMode !== \"oauth\" && (\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.headers\")}\n </span>\n <textarea\n value={headersText}\n onChange={(event) => {\n setHeadersText(event.target.value);\n clearFeedback();\n }}\n rows={3}\n className=\"w-full resize-y rounded-md border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n style={{\n fontFamily:\n 'ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace',\n }}\n placeholder={\n selected?.headerPlaceholder ??\n t(\"mcpIntegrations.headersPlaceholder\")\n }\n />\n </label>\n )}\n {selected?.docsUrl && (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-[11px] text-muted-foreground underline hover:text-foreground\"\n >\n {t(\"mcpIntegrations.openSetupDocs\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n )}\n {testResult && (\n <div\n className={cn(\n \"flex items-start gap-1 rounded-md px-3 py-2 text-[11px] leading-snug\",\n testResult.ok\n ? \"bg-green-500/5 text-green-600 dark:text-green-400\"\n : \"bg-red-500/5 text-red-600 dark:text-red-400\",\n )}\n >\n {testResult.ok && (\n <IconCheck className=\"mt-0.5 h-3 w-3 shrink-0\" />\n )}\n <span className=\"min-w-0 break-words\">\n {testResult.message}\n </span>\n </div>\n )}\n {error && (\n <div className=\"break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4\">\n <button\n type=\"button\"\n onClick={runTest}\n disabled={!url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.test\")}\n </button>\n {selected?.authMode === \"oauth\" && !selectedRequiresSetup ? (\n <button\n type=\"button\"\n onClick={() => connectWithOAuth(selected)}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && (\n <IconLoader2 className=\"me-1.5 inline h-3.5 w-3.5 animate-spin\" />\n )}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : !selected ? (\n <button\n type=\"button\"\n onClick={connectCustomWithOAuth}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && (\n <IconLoader2 className=\"me-1.5 inline h-3.5 w-3.5 animate-spin\" />\n )}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : null}\n {selectedRequiresSetup ? (\n selected?.docsUrl ? (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n ) : null\n ) : (\n <button\n type=\"button\"\n onClick={submitForm}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connect\")}\n </button>\n )}\n </div>\n </>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
@@ -49,6 +49,7 @@ export declare function isCustomMcpIntegrationEnabled(config?: McpIntegrationsCo
49
49
  export declare function isMcpIntegrationCatalogAvailable(config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig): boolean;
50
50
  export declare function mcpIntegrationAuthLabel(mode: McpIntegrationAuthMode): string;
51
51
  export declare function buildMcpOAuthStartUrl({ name, url, description, scope, returnUrl, }: McpOAuthStartParams): string;
52
+ export declare function navigateToMcpOAuthStart(url: string): void;
52
53
  export declare function resolveMcpIntegrationScope(defaultScope: "user" | "org", hasOrg: boolean, canCreateOrgMcp: boolean): "user" | "org";
53
54
  export declare function filterMcpIntegrations(query: string, integrations?: DefaultMcpIntegration[]): DefaultMcpIntegration[];
54
55
  export declare function findMcpIntegrationForText(text: string, integrations?: DefaultMcpIntegration[]): DefaultMcpIntegration | null;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-integration-catalog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/mcp-integration-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,K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qBAAqB,EAAE,CAgBzB;AAuDD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,qBAAqB,EAAgC,GAClE,qBAAqB,GAAG,IAAI,CA0B9B;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,CAAC,EAAE,qBAAqB,GAAG,IAAI,GACzC,0BAA0B,CAe5B"}
1
+ {"version":3,"file":"mcp-integration-catalog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/mcp-integration-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACrC,MAAM,wCAAwC,CAAC;AAIhD,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAClE,MAAM,MAAM,4BAA4B,GACpC,QAAQ,GACR,SAAS,GACT,OAAO,GACP,QAAQ,CAAC;AACb,MAAM,MAAM,0BAA0B,GAClC,OAAO,GACP,MAAM,GACN,gBAAgB,GAChB,mBAAmB,CAAC;AACxB,MAAM,MAAM,0BAA0B,GAClC,UAAU,GACV,gBAAgB,GAChB,YAAY,CAAC;AAOjB,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,sBAAsB,CAAC;IACjC,cAAc,EAAE,4BAA4B,CAAC;IAC7C,YAAY,EAAE,0BAA0B,CAAC;IACzC,YAAY,EAAE,0BAA0B,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,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AED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAI5E;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,GAAG,EACH,WAAW,EACX,KAAK,EACL,SAAS,GACV,EAAE,mBAAmB,GAAG,MAAM,CAS9B;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAWzD;AAED,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,GAAG,KAAK,EAC5B,MAAM,EAAE,OAAO,EACf,eAAe,EAAE,OAAO,GACvB,MAAM,GAAG,KAAK,CAEhB;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,qBAAqB,EAAgC,GAClE,qBAAqB,EAAE,CAgBzB;AAuDD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,qBAAqB,EAAgC,GAClE,qBAAqB,GAAG,IAAI,CA0B9B;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,CAAC,EAAE,qBAAqB,GAAG,IAAI,GACzC,0BAA0B,CAe5B"}
@@ -579,6 +579,19 @@ export function buildMcpOAuthStartUrl({ name, url, description, scope, returnUrl
579
579
  });
580
580
  return `/_agent-native/mcp/servers/oauth/start?${params.toString()}`;
581
581
  }
582
+ export function navigateToMcpOAuthStart(url) {
583
+ if (typeof window === "undefined")
584
+ return;
585
+ const navigate = () => {
586
+ window.setTimeout(() => window.location.assign(url), 0);
587
+ };
588
+ if (typeof window.requestAnimationFrame === "function") {
589
+ window.requestAnimationFrame(navigate);
590
+ }
591
+ else {
592
+ navigate();
593
+ }
594
+ }
582
595
  export function resolveMcpIntegrationScope(defaultScope, hasOrg, canCreateOrgMcp) {
583
596
  return defaultScope === "org" && hasOrg && canCreateOrgMcp ? "org" : "user";
584
597
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-integration-catalog.js","sourceRoot":"","sources":["../../../src/client/resources/mcp-integration-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,GAG/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgEhE,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAC/D;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,4CAA4C;QACzD,cAAc,EAAE,8CAA8C;QAC9D,OAAO,EAAE,gEAAgE;QACzE,UAAU,EAAE,0CAA0C;QACtD,GAAG,EAAE,8BAA8B;QACnC,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE,QAAQ;QACxB,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,UAAU;QACxB,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC;QACvC,OAAO,EAAE,uBAAuB;QAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,CAAC;KAC/D;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,4CAA4C;QAC5D,OAAO,EAAE,yDAAyD;QAClE,UAAU,EAAE,wCAAwC;QACpD,GAAG,EAAE,4BAA4B;QACjC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,gBAAgB;QAC9B,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC;QACrC,OAAO,EAAE,4CAA4C;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,Q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Input,\n type NormalizedMcpIntegrationsConfig,\n} from \"../../shared/mcp-integration-config.js\";\nimport { mergeDefinitionsById } from \"../../shared/merge-by-id.js\";\nimport { mcpIntegrationLogo } from \"./mcp-integration-logos.js\";\n\nexport type McpIntegrationAuthMode = \"none\" | \"headers\" | \"oauth\";\nexport type McpIntegrationConnectionMode =\n | \"direct\"\n | \"headers\"\n | \"oauth\"\n | \"manual\";\nexport type McpIntegrationAvailability =\n | \"ready\"\n | \"beta\"\n | \"provider-setup\"\n | \"client-restricted\";\nexport type McpIntegrationVerification =\n | \"verified\"\n | \"preflight-only\"\n | \"restricted\";\n\ndeclare const __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__:\n | NormalizedMcpIntegrationsConfig\n | undefined;\ndeclare const __AGENT_NATIVE_TEMPLATE__: string | undefined;\n\nexport interface DefaultMcpIntegration {\n id: string;\n name: string;\n provider: string;\n description: string;\n descriptionKey: string;\n useCase: string;\n useCaseKey: string;\n url: string;\n authMode: McpIntegrationAuthMode;\n connectionMode: McpIntegrationConnectionMode;\n availability: McpIntegrationAvailability;\n verification: McpIntegrationVerification;\n logoUrl: string;\n docsUrl?: string;\n setupNoteKey?: string;\n apiFallback?: {\n secretKey: string;\n docsUrl: string;\n templateUses?: readonly string[];\n };\n headerPlaceholder?: string;\n aliases?: string[];\n keywords: string[];\n}\n\nexport interface McpIntegrationFormDefaults {\n name: string;\n url: string;\n description: string;\n headersText: string;\n}\n\nexport interface McpOAuthStartParams {\n name: string;\n url: string;\n description: string;\n scope: \"user\" | \"org\";\n returnUrl: string;\n}\n\nexport const DEFAULT_MCP_INTEGRATIONS: DefaultMcpIntegration[] = [\n {\n id: \"context7\",\n name: \"Context7\",\n provider: \"context7\",\n description: \"Fetch current library docs in agent chats.\",\n descriptionKey: \"mcpIntegrations.catalog.context7.description\",\n useCase: \"documentation, technical reference, API docs, framework guides\",\n useCaseKey: \"mcpIntegrations.catalog.context7.useCase\",\n url: \"https://mcp.context7.com/mcp\",\n authMode: \"none\",\n connectionMode: \"direct\",\n availability: \"ready\",\n verification: \"verified\",\n logoUrl: mcpIntegrationLogo(\"context7\"),\n docsUrl: \"https://context7.com/\",\n keywords: [\"docs\", \"documentation\", \"libraries\", \"frameworks\"],\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n provider: \"sentry\",\n description: \"Inspect issues, events, and debugging data.\",\n descriptionKey: \"mcpIntegrations.catalog.sentry.description\",\n useCase: \"error monitoring, debugging, performance, crash reports\",\n useCaseKey: \"mcpIntegrations.catalog.sentry.useCase\",\n url: \"https://mcp.sentry.dev/mcp\",\n authMode: \"headers\",\n connectionMode: \"headers\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"sentry\"),\n docsUrl: \"https://docs.sentry.io/product/sentry-mcp/\",\n headerPlaceholder: \"Authorization: Bearer <sentry-token>\",\n keywords: [\"errors\", \"monitoring\", \"debugging\", \"issues\"],\n },\n {\n id: \"notion\",\n name: \"Notion\",\n provider: \"notion\",\n description: \"Search pages and team knowledge.\",\n descriptionKey: \"mcpIntegrations.catalog.notion.description\",\n useCase: \"documentation, knowledge management, notes, content creation\",\n useCaseKey: \"mcpIntegrations.catalog.notion.useCase\",\n url: \"https://mcp.notion.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"notion\"),\n docsUrl: \"https://developers.notion.com/guides/mcp/get-started-with-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.notion.setupNote\",\n keywords: [\"docs\", \"knowledge\", \"notes\", \"pages\"],\n },\n {\n id: \"granola\",\n name: \"Granola\",\n provider: \"granola\",\n description: \"Search meeting notes, transcripts, and action items.\",\n descriptionKey: \"mcpIntegrations.catalog.granola.description\",\n useCase: \"meeting notes, recordings, transcripts, action items, follow-ups\",\n useCaseKey: \"mcpIntegrations.catalog.granola.useCase\",\n url: \"https://mcp.granola.ai/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"granola\"),\n docsUrl: \"https://docs.granola.ai/help-center/sharing/integrations/mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.granola.setupNote\",\n aliases: [\n \"meeting notes\",\n \"meeting recordings\",\n \"recordings\",\n \"transcripts\",\n \"action items\",\n \"follow-ups\",\n \"follow ups\",\n \"decisions\",\n ],\n keywords: [\n \"meetings\",\n \"meeting notes\",\n \"recordings\",\n \"transcripts\",\n \"action items\",\n \"follow-ups\",\n \"decisions\",\n ],\n },\n {\n id: \"semgrep\",\n name: \"Semgrep\",\n provider: \"semgrep\",\n description: \"Scan code for security findings.\",\n descriptionKey: \"mcpIntegrations.catalog.semgrep.description\",\n useCase: \"security scanning, vulnerability detection, code analysis\",\n useCaseKey: \"mcpIntegrations.catalog.semgrep.useCase\",\n url: \"https://mcp.semgrep.ai/mcp\",\n authMode: \"none\",\n connectionMode: \"direct\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"semgrep\"),\n docsUrl: \"https://github.com/semgrep/mcp#readme\",\n keywords: [\"security\", \"sast\", \"code scanning\", \"vulnerabilities\"],\n },\n {\n id: \"linear\",\n name: \"Linear\",\n provider: \"linear\",\n description: \"Read and write Linear issues.\",\n descriptionKey: \"mcpIntegrations.catalog.linear.description\",\n useCase: \"project management, issue tracking, planning, bug reports\",\n useCaseKey: \"mcpIntegrations.catalog.linear.useCase\",\n url: \"https://mcp.linear.app/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"linear\"),\n docsUrl: \"https://linear.app/docs/mcp\",\n keywords: [\"issues\", \"tickets\", \"planning\", \"project management\"],\n },\n {\n id: \"atlassian\",\n name: \"Atlassian\",\n provider: \"atlassian\",\n description: \"Read and write Jira issues and Confluence content.\",\n descriptionKey: \"mcpIntegrations.catalog.atlassian.description\",\n useCase:\n \"project management, issue tracking, documentation, team collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.atlassian.useCase\",\n url: \"https://mcp.atlassian.com/v1/mcp/authv2\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"atlassian\"),\n docsUrl:\n \"https://developer.atlassian.com/cloud/rovo-mcp/guides/getting-started/\",\n setupNoteKey: \"mcpIntegrations.catalog.atlassian.setupNote\",\n aliases: [\"jira\", \"confluence\", \"rovo\"],\n keywords: [\"atlassian\", \"jira\", \"confluence\", \"issues\", \"tickets\"],\n },\n {\n id: \"supabase\",\n name: \"Supabase\",\n provider: \"supabase\",\n description: \"Manage data, auth, and backend services.\",\n descriptionKey: \"mcpIntegrations.catalog.supabase.description\",\n useCase: \"database, authentication, storage, edge functions\",\n useCaseKey: \"mcpIntegrations.catalog.supabase.useCase\",\n url: \"https://mcp.supabase.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"supabase\"),\n docsUrl:\n \"https://www.builder.io/c/docs/fusion-connect-to-supabase?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=fusion_connect_supabase\",\n keywords: [\"database\", \"auth\", \"postgres\", \"storage\"],\n },\n {\n id: \"neon\",\n name: \"Neon\",\n provider: \"neon\",\n description: \"Work with serverless Postgres projects.\",\n descriptionKey: \"mcpIntegrations.catalog.neon.description\",\n useCase: \"database management, serverless postgres, data storage\",\n useCaseKey: \"mcpIntegrations.catalog.neon.useCase\",\n url: \"https://mcp.neon.tech/sse\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"neon\"),\n docsUrl:\n \"https://www.builder.io/c/docs/fusion-connect-to-neon?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=fusion_connect_neon\",\n keywords: [\"database\", \"postgres\", \"serverless\", \"backend\"],\n },\n {\n id: \"stripe\",\n name: \"Stripe\",\n provider: \"stripe\",\n description: \"Manage payments, subscriptions, and customers.\",\n descriptionKey: \"mcpIntegrations.catalog.stripe.description\",\n useCase: \"payments, subscriptions, invoicing, customer management\",\n useCaseKey: \"mcpIntegrations.catalog.stripe.useCase\",\n url: \"https://mcp.stripe.com\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"stripe\"),\n docsUrl: \"https://docs.stripe.com/mcp\",\n keywords: [\"payments\", \"billing\", \"subscriptions\", \"customers\"],\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n provider: \"cloudflare\",\n description: \"Search and operate Cloudflare services through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.cloudflare.description\",\n useCase: \"DNS, Workers, domains, security, observability, platform APIs\",\n useCaseKey: \"mcpIntegrations.catalog.cloudflare.useCase\",\n url: \"https://mcp.cloudflare.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"cloudflare\"),\n docsUrl:\n \"https://developers.cloudflare.com/agents/model-context-protocol/cloudflare/servers-for-cloudflare/\",\n setupNoteKey: \"mcpIntegrations.catalog.cloudflare.setupNote\",\n keywords: [\"cloud\", \"workers\", \"dns\", \"security\", \"observability\"],\n },\n {\n id: \"gitlab\",\n name: \"GitLab\",\n provider: \"gitlab\",\n description: \"Read and manage GitLab projects, issues, and merge requests.\",\n descriptionKey: \"mcpIntegrations.catalog.gitlab.description\",\n useCase: \"repositories, issues, merge requests, CI/CD, code analytics\",\n useCaseKey: \"mcpIntegrations.catalog.gitlab.useCase\",\n url: \"https://gitlab.com/api/v4/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"beta\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"gitlab\"),\n docsUrl: \"https://docs.gitlab.com/user/model_context_protocol/mcp_server/\",\n setupNoteKey: \"mcpIntegrations.catalog.gitlab.setupNote\",\n keywords: [\"git\", \"repositories\", \"issues\", \"merge requests\", \"ci\"],\n },\n {\n id: \"figma\",\n name: \"Figma\",\n provider: \"figma\",\n description: \"Bring Figma design context and canvas actions into an agent.\",\n descriptionKey: \"mcpIntegrations.catalog.figma.description\",\n useCase: \"design files, components, variables, design systems, canvas\",\n useCaseKey: \"mcpIntegrations.catalog.figma.useCase\",\n url: \"https://mcp.figma.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"figma\"),\n docsUrl: \"https://developers.figma.com/docs/figma-mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.figma.setupNote\",\n apiFallback: {\n secretKey: \"FIGMA_ACCESS_TOKEN\",\n docsUrl:\n \"https://developers.figma.com/docs/rest-api/personal-access-tokens/\",\n templateUses: [\"design\"],\n },\n keywords: [\"design\", \"figjam\", \"components\", \"variables\", \"canvas\"],\n },\n {\n id: \"canva\",\n name: \"Canva\",\n provider: \"canva\",\n description: \"Search, create, and update Canva designs and assets.\",\n descriptionKey: \"mcpIntegrations.catalog.canva.description\",\n useCase: \"designs, templates, assets, brand kits, exports, collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.canva.useCase\",\n url: \"https://mcp.canva.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"canva\"),\n docsUrl: \"https://www.canva.dev/docs/mcp/\",\n setupNoteKey: \"mcpIntegrations.catalog.canva.setupNote\",\n keywords: [\"design\", \"templates\", \"assets\", \"brand\", \"exports\"],\n },\n {\n id: \"vercel\",\n name: \"Vercel\",\n provider: \"vercel\",\n description:\n \"Search Vercel docs and inspect projects, deployments, and logs.\",\n descriptionKey: \"mcpIntegrations.catalog.vercel.description\",\n useCase: \"deployments, projects, logs, domains, hosting, documentation\",\n useCaseKey: \"mcpIntegrations.catalog.vercel.useCase\",\n url: \"https://mcp.vercel.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"vercel\"),\n docsUrl: \"https://vercel.com/docs/agent-resources/vercel-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.vercel.setupNote\",\n keywords: [\"deployments\", \"hosting\", \"projects\", \"logs\", \"domains\"],\n },\n {\n id: \"github\",\n name: \"GitHub\",\n provider: \"github\",\n description: \"Read repositories, issues, pull requests, and code context.\",\n descriptionKey: \"mcpIntegrations.catalog.github.description\",\n useCase: \"repositories, issues, pull requests, code, engineering analytics\",\n useCaseKey: \"mcpIntegrations.catalog.github.useCase\",\n url: \"https://api.githubcopilot.com/mcp/\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"github\"),\n docsUrl: \"https://github.com/github/github-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.github.setupNote\",\n keywords: [\"git\", \"repositories\", \"issues\", \"pull requests\", \"code\"],\n },\n {\n id: \"slack\",\n name: \"Slack\",\n provider: \"slack\",\n description:\n \"Search Slack conversations and take workspace actions through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.slack.description\",\n useCase: \"messages, channels, people, company memory, workflows\",\n useCaseKey: \"mcpIntegrations.catalog.slack.useCase\",\n url: \"https://mcp.slack.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"slack\"),\n docsUrl: \"https://docs.slack.dev/ai/slack-mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.slack.setupNote\",\n keywords: [\"messages\", \"channels\", \"search\", \"people\", \"chat\"],\n },\n {\n id: \"asana\",\n name: \"Asana\",\n provider: \"asana\",\n description:\n \"Search and manage Asana tasks, projects, and work graph data.\",\n descriptionKey: \"mcpIntegrations.catalog.asana.description\",\n useCase: \"tasks, projects, portfolios, planning, workload\",\n useCaseKey: \"mcpIntegrations.catalog.asana.useCase\",\n url: \"https://mcp.asana.com/v2/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"asana\"),\n docsUrl:\n \"https://developers.asana.com/docs/integrating-with-asanas-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.asana.setupNote\",\n keywords: [\"tasks\", \"projects\", \"planning\", \"workload\", \"portfolios\"],\n },\n {\n id: \"hubspot\",\n name: \"HubSpot\",\n provider: \"hubspot\",\n description: \"Search and update HubSpot CRM records through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.hubspot.description\",\n useCase: \"CRM, contacts, companies, deals, tickets, customer analytics\",\n useCaseKey: \"mcpIntegrations.catalog.hubspot.useCase\",\n url: \"https://mcp.hubspot.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"hubspot\"),\n docsUrl:\n \"https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.hubspot.setupNote\",\n keywords: [\"crm\", \"contacts\", \"companies\", \"deals\", \"tickets\"],\n },\n {\n id: \"intercom\",\n name: \"Intercom\",\n provider: \"intercom\",\n description: \"Search conversations and customer support knowledge.\",\n descriptionKey: \"mcpIntegrations.catalog.intercom.description\",\n useCase: \"customer support, conversations, contacts, help center content\",\n useCaseKey: \"mcpIntegrations.catalog.intercom.useCase\",\n url: \"https://mcp.intercom.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"intercom\"),\n docsUrl: \"https://developers.intercom.com/docs/guides/mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.intercom.setupNote\",\n keywords: [\"support\", \"conversations\", \"customers\", \"help center\"],\n },\n {\n id: \"monday\",\n name: \"monday.com\",\n provider: \"monday\",\n description: \"Work with boards, items, and team workflows.\",\n descriptionKey: \"mcpIntegrations.catalog.monday.description\",\n useCase: \"work management, boards, projects, tasks, team operations\",\n useCaseKey: \"mcpIntegrations.catalog.monday.useCase\",\n url: \"https://mcp.monday.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"monday\"),\n docsUrl:\n \"https://developer.monday.com/api-reference/docs/build-on-monday-with-ai\",\n setupNoteKey: \"mcpIntegrations.catalog.monday.setupNote\",\n keywords: [\"work management\", \"boards\", \"projects\", \"tasks\", \"teams\"],\n },\n {\n id: \"webflow\",\n name: \"Webflow\",\n provider: \"webflow\",\n description: \"Read and update Webflow sites and content.\",\n descriptionKey: \"mcpIntegrations.catalog.webflow.description\",\n useCase: \"websites, CMS, site content, publishing, design workflows\",\n useCaseKey: \"mcpIntegrations.catalog.webflow.useCase\",\n url: \"https://mcp.webflow.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"webflow\"),\n docsUrl: \"https://developers.webflow.com/mcp/reference/getting-started\",\n setupNoteKey: \"mcpIntegrations.catalog.webflow.setupNote\",\n keywords: [\"websites\", \"cms\", \"content\", \"publishing\", \"design\"],\n },\n {\n id: \"paypal\",\n name: \"PayPal\",\n provider: \"paypal\",\n description: \"Work with PayPal payments, invoices, and commerce data.\",\n descriptionKey: \"mcpIntegrations.catalog.paypal.description\",\n useCase: \"payments, invoices, transactions, merchant operations\",\n useCaseKey: \"mcpIntegrations.catalog.paypal.useCase\",\n url: \"https://mcp.paypal.com/sse\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"paypal\"),\n docsUrl: \"https://developer.paypal.com/ai-tools/mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.paypal.setupNote\",\n keywords: [\"payments\", \"invoices\", \"transactions\", \"commerce\"],\n },\n {\n id: \"box\",\n name: \"Box\",\n provider: \"box\",\n description: \"Search and manage files and folders in Box.\",\n descriptionKey: \"mcpIntegrations.catalog.box.description\",\n useCase: \"files, folders, enterprise content, search, collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.box.useCase\",\n url: \"https://mcp.box.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"box\"),\n docsUrl: \"https://developer.box.com/guides/box-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.box.setupNote\",\n keywords: [\"files\", \"folders\", \"documents\", \"enterprise content\"],\n },\n {\n id: \"netlify\",\n name: \"Netlify\",\n provider: \"netlify\",\n description: \"Inspect and operate Netlify sites and deployments.\",\n descriptionKey: \"mcpIntegrations.catalog.netlify.description\",\n useCase: \"sites, deployments, builds, domains, hosting operations\",\n useCaseKey: \"mcpIntegrations.catalog.netlify.useCase\",\n url: \"https://netlify-mcp.netlify.app/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"netlify\"),\n docsUrl:\n \"https://docs.netlify.com/build/build-with-ai/agent-setup-guides/agent-setup-overview/\",\n setupNoteKey: \"mcpIntegrations.catalog.netlify.setupNote\",\n keywords: [\"deployments\", \"builds\", \"sites\", \"hosting\", \"domains\"],\n },\n {\n id: \"zapier\",\n name: \"Zapier\",\n provider: \"zapier\",\n description: \"Connect MCP tools to thousands of app actions.\",\n descriptionKey: \"mcpIntegrations.catalog.zapier.description\",\n useCase: \"automation, workflows, app actions, cross-service operations\",\n useCaseKey: \"mcpIntegrations.catalog.zapier.useCase\",\n url: \"https://mcp.zapier.com/api/v1/connect\",\n authMode: \"headers\",\n connectionMode: \"headers\",\n availability: \"ready\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"zapier\"),\n docsUrl:\n \"https://help.zapier.com/hc/en-us/articles/36265392843917-Use-Zapier-MCP-with-your-client\",\n setupNoteKey: \"mcpIntegrations.catalog.zapier.setupNote\",\n headerPlaceholder: \"Authorization: Bearer <zapier-mcp-token>\",\n keywords: [\"automation\", \"workflows\", \"actions\", \"apps\", \"integrations\"],\n },\n];\n\nfunction readRuntimeMcpIntegrationsConfig(): NormalizedMcpIntegrationsConfig {\n try {\n if (typeof __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__ !== \"undefined\") {\n return normalizeMcpIntegrationsConfig(\n __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__,\n );\n }\n } catch {\n // Test and non-Vite contexts may not define the compile-time constant.\n }\n return normalizeMcpIntegrationsConfig();\n}\n\nfunction normalizeTemplateName(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const normalized = value.trim().toLowerCase();\n return normalized || null;\n}\n\nfunction getActiveTemplateName(): string | null {\n try {\n const compiledTemplate = normalizeTemplateName(__AGENT_NATIVE_TEMPLATE__);\n if (compiledTemplate) return compiledTemplate;\n } catch {\n // Test and non-Vite contexts may not define the compile-time constant.\n }\n\n const runtimeConfig = (\n globalThis as typeof globalThis & {\n __AGENT_NATIVE_CONFIG__?: { template?: unknown };\n }\n ).__AGENT_NATIVE_CONFIG__;\n return normalizeTemplateName(runtimeConfig?.template);\n}\n\nexport function getMcpIntegrationApiFallback(\n integration: DefaultMcpIntegration,\n templateName = getActiveTemplateName(),\n): DefaultMcpIntegration[\"apiFallback\"] | null {\n const fallback = integration.apiFallback;\n if (!fallback) return null;\n if (!fallback.templateUses?.length) return fallback;\n if (!templateName) return null;\n return fallback.templateUses.includes(templateName) ? fallback : null;\n}\n\nfunction normalizePresetConfig(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): NormalizedMcpIntegrationsConfig {\n if (config === undefined) return readRuntimeMcpIntegrationsConfig();\n return normalizeMcpIntegrationsConfig(config);\n}\n\nexport function getDefaultMcpIntegrations(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n overrides: readonly DefaultMcpIntegration[] = [],\n): DefaultMcpIntegration[] {\n const normalized = normalizePresetConfig(config);\n if (!normalized.enabled || !normalized.defaults.enabled) return [];\n\n const include = normalized.defaults.include\n ? new Set(normalized.defaults.include)\n : null;\n const exclude = new Set(normalized.defaults.exclude);\n return mergeDefaultMcpIntegrations(overrides).filter((integration) => {\n const id = integration.id.toLowerCase();\n if (include && !include.has(id)) return false;\n return !exclude.has(id);\n });\n}\n\nexport function mergeDefaultMcpIntegrations(\n overrides: readonly DefaultMcpIntegration[] = [],\n): DefaultMcpIntegration[] {\n return mergeDefinitionsById(DEFAULT_MCP_INTEGRATIONS, overrides);\n}\n\nexport function isCustomMcpIntegrationEnabled(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): boolean {\n const normalized = normalizePresetConfig(config);\n return normalized.enabled && normalized.custom;\n}\n\nexport function isMcpIntegrationCatalogAvailable(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): boolean {\n const normalized = normalizePresetConfig(config);\n if (!normalized.enabled) return false;\n return normalized.custom || getDefaultMcpIntegrations(normalized).length > 0;\n}\n\nexport function mcpIntegrationAuthLabel(mode: McpIntegrationAuthMode): string {\n if (mode === \"none\") return \"No auth\";\n if (mode === \"headers\") return \"Header\";\n return \"OAuth\";\n}\n\nexport function buildMcpOAuthStartUrl({\n name,\n url,\n description,\n scope,\n returnUrl,\n}: McpOAuthStartParams): string {\n const params = new URLSearchParams({\n name,\n url,\n description,\n scope,\n return: returnUrl,\n });\n return `/_agent-native/mcp/servers/oauth/start?${params.toString()}`;\n}\n\nexport function resolveMcpIntegrationScope(\n defaultScope: \"user\" | \"org\",\n hasOrg: boolean,\n canCreateOrgMcp: boolean,\n): \"user\" | \"org\" {\n return defaultScope === \"org\" && hasOrg && canCreateOrgMcp ? \"org\" : \"user\";\n}\n\nexport function filterMcpIntegrations(\n query: string,\n integrations: DefaultMcpIntegration[] = getDefaultMcpIntegrations(),\n): DefaultMcpIntegration[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return integrations;\n return integrations.filter((integration) => {\n const haystack = [\n integration.name,\n integration.provider,\n integration.description,\n integration.useCase,\n integration.url,\n ...integration.keywords,\n ]\n .join(\" \")\n .toLowerCase();\n return haystack.includes(needle);\n });\n}\n\nconst MCP_LINK_HOSTS: Record<string, string[]> = {\n context7: [\"context7.com\"],\n sentry: [\"sentry.io\", \"sentry.dev\"],\n notion: [\"notion.so\", \"notion.site\"],\n granola: [\"granola.ai\"],\n semgrep: [\"semgrep.dev\", \"semgrep.com\"],\n canva: [\"canva.com\", \"canva.ai\"],\n figma: [\"figma.com\"],\n linear: [\"linear.app\"],\n atlassian: [\"atlassian.com\", \"atlassian.net\", \"jira.com\", \"confluence.com\"],\n supabase: [\"supabase.com\"],\n neon: [\"neon.tech\"],\n stripe: [\"stripe.com\"],\n cloudflare: [\"cloudflare.com\"],\n github: [\"github.com\", \"github.dev\"],\n gitlab: [\"gitlab.com\"],\n slack: [\"slack.com\"],\n asana: [\"asana.com\"],\n hubspot: [\"hubspot.com\"],\n intercom: [\"intercom.com\"],\n monday: [\"monday.com\"],\n webflow: [\"webflow.com\"],\n paypal: [\"paypal.com\"],\n box: [\"box.com\"],\n netlify: [\"netlify.com\"],\n vercel: [\"vercel.com\"],\n zapier: [\"zapier.com\"],\n};\n\nfunction hostMatches(hostname: string, domain: string): boolean {\n return hostname === domain || hostname.endsWith(`.${domain}`);\n}\n\nfunction findUrlForText(text: string): URL | null {\n const candidates = text.match(/https?:\\/\\/[^\\s<>()[\\]{}]+/gi) ?? [];\n for (const candidate of candidates) {\n try {\n return new URL(candidate.replace(/[.,!?;:'\\\"]+$/, \"\"));\n } catch {\n // Ignore prose that only looks like a URL.\n }\n }\n return null;\n}\n\nconst MCP_RESOURCE_INTENT_PATTERN =\n /\\b(?:action|add|access|board|check|connect|connected|connection|create|decision|design|document|doc|do|extract|fetch|file|find|follow[- ]?ups?|get|import|integration|integrate|issue|link|list|meeting|message|notes?|open|page|populate|project|pull|read|recordings?|review|search|see|summary|summarize|sync|task|ticket|todo|transcripts?|turn|use|workspace)\\b/i;\n\nfunction textContainsTerm(text: string, term: string): boolean {\n const escaped = term.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, \"i\").test(text);\n}\n\nexport function findMcpIntegrationForText(\n text: string,\n integrations: DefaultMcpIntegration[] = getDefaultMcpIntegrations(),\n): DefaultMcpIntegration | null {\n const url = findUrlForText(text);\n if (url) {\n const match = integrations.find((integration) =>\n (MCP_LINK_HOSTS[integration.id] ?? []).some((domain) =>\n hostMatches(url.hostname.toLowerCase(), domain),\n ),\n );\n if (match) return match;\n }\n\n const normalizedText = text.toLowerCase();\n const hasResourceIntent =\n MCP_RESOURCE_INTENT_PATTERN.test(normalizedText) ||\n isMcpConnectionFailureText(normalizedText);\n if (!hasResourceIntent) return null;\n const matchesCanonicalName = (integration: DefaultMcpIntegration) =>\n [\n integration.name,\n integration.provider,\n integration.id,\n ...(integration.aliases ?? []),\n ].some((alias) => textContainsTerm(normalizedText, alias));\n const canonicalMatch = integrations.find(matchesCanonicalName);\n if (canonicalMatch) return canonicalMatch;\n return null;\n}\n\nexport function isMcpConnectionFailureText(text: string): boolean {\n return /\\b(?:can(?:not|'t|’t)|could(?: not|n't|n’t)|unable|failed|don't have access|don’t have access|not connected|not able)\\b[\\s\\S]{0,80}\\b(?:read|access|open|see|fetch|connect)\\b/i.test(\n text,\n );\n}\n\nexport function createMcpIntegrationFormDefaults(\n integration?: DefaultMcpIntegration | null,\n): McpIntegrationFormDefaults {\n if (!integration) {\n return {\n name: \"\",\n url: \"\",\n description: \"\",\n headersText: \"\",\n };\n }\n return {\n name: integration.name,\n url: integration.url,\n description: integration.description,\n headersText: \"\",\n };\n}\n"]}
1
+ {"version":3,"file":"mcp-integration-catalog.js","sourceRoot":"","sources":["../../../src/client/resources/mcp-integration-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,GAG/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgEhE,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAC/D;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,4CAA4C;QACzD,cAAc,EAAE,8CAA8C;QAC9D,OAAO,EAAE,gEAAgE;QACzE,UAAU,EAAE,0CAA0C;QACtD,GAAG,EAAE,8BAA8B;QACnC,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE,QAAQ;QACxB,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,UAAU;QACxB,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC;QACvC,OAAO,EAAE,uBAAuB;QAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,CAAC;KAC/D;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,4CAA4C;QAC5D,OAAO,EAAE,yDAAyD;QAClE,UAAU,EAAE,wCAAwC;QACpD,GAAG,EAAE,4BAA4B;QACjC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB,YAAY,EAAE,OAAO;QACrB,YAAY,E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BAAoB,CAAC,CAAC;IAC/D,IAAI,cAAc;QAAE,OAAO,cAAc,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,OAAO,gLAAgL,CAAC,IAAI,CAC1L,IAAI,CACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,WAA0C;IAE1C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;YACL,IAAI,EAAE,EAAE;YACR,GAAG,EAAE,EAAE;YACP,WAAW,EAAE,EAAE;YACf,WAAW,EAAE,EAAE;SAChB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,GAAG,EAAE,WAAW,CAAC,GAAG;QACpB,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC","sourcesContent":["import {\n normalizeMcpIntegrationsConfig,\n type McpIntegrationsConfigInput,\n type NormalizedMcpIntegrationsConfig,\n} from \"../../shared/mcp-integration-config.js\";\nimport { mergeDefinitionsById } from \"../../shared/merge-by-id.js\";\nimport { mcpIntegrationLogo } from \"./mcp-integration-logos.js\";\n\nexport type McpIntegrationAuthMode = \"none\" | \"headers\" | \"oauth\";\nexport type McpIntegrationConnectionMode =\n | \"direct\"\n | \"headers\"\n | \"oauth\"\n | \"manual\";\nexport type McpIntegrationAvailability =\n | \"ready\"\n | \"beta\"\n | \"provider-setup\"\n | \"client-restricted\";\nexport type McpIntegrationVerification =\n | \"verified\"\n | \"preflight-only\"\n | \"restricted\";\n\ndeclare const __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__:\n | NormalizedMcpIntegrationsConfig\n | undefined;\ndeclare const __AGENT_NATIVE_TEMPLATE__: string | undefined;\n\nexport interface DefaultMcpIntegration {\n id: string;\n name: string;\n provider: string;\n description: string;\n descriptionKey: string;\n useCase: string;\n useCaseKey: string;\n url: string;\n authMode: McpIntegrationAuthMode;\n connectionMode: McpIntegrationConnectionMode;\n availability: McpIntegrationAvailability;\n verification: McpIntegrationVerification;\n logoUrl: string;\n docsUrl?: string;\n setupNoteKey?: string;\n apiFallback?: {\n secretKey: string;\n docsUrl: string;\n templateUses?: readonly string[];\n };\n headerPlaceholder?: string;\n aliases?: string[];\n keywords: string[];\n}\n\nexport interface McpIntegrationFormDefaults {\n name: string;\n url: string;\n description: string;\n headersText: string;\n}\n\nexport interface McpOAuthStartParams {\n name: string;\n url: string;\n description: string;\n scope: \"user\" | \"org\";\n returnUrl: string;\n}\n\nexport const DEFAULT_MCP_INTEGRATIONS: DefaultMcpIntegration[] = [\n {\n id: \"context7\",\n name: \"Context7\",\n provider: \"context7\",\n description: \"Fetch current library docs in agent chats.\",\n descriptionKey: \"mcpIntegrations.catalog.context7.description\",\n useCase: \"documentation, technical reference, API docs, framework guides\",\n useCaseKey: \"mcpIntegrations.catalog.context7.useCase\",\n url: \"https://mcp.context7.com/mcp\",\n authMode: \"none\",\n connectionMode: \"direct\",\n availability: \"ready\",\n verification: \"verified\",\n logoUrl: mcpIntegrationLogo(\"context7\"),\n docsUrl: \"https://context7.com/\",\n keywords: [\"docs\", \"documentation\", \"libraries\", \"frameworks\"],\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n provider: \"sentry\",\n description: \"Inspect issues, events, and debugging data.\",\n descriptionKey: \"mcpIntegrations.catalog.sentry.description\",\n useCase: \"error monitoring, debugging, performance, crash reports\",\n useCaseKey: \"mcpIntegrations.catalog.sentry.useCase\",\n url: \"https://mcp.sentry.dev/mcp\",\n authMode: \"headers\",\n connectionMode: \"headers\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"sentry\"),\n docsUrl: \"https://docs.sentry.io/product/sentry-mcp/\",\n headerPlaceholder: \"Authorization: Bearer <sentry-token>\",\n keywords: [\"errors\", \"monitoring\", \"debugging\", \"issues\"],\n },\n {\n id: \"notion\",\n name: \"Notion\",\n provider: \"notion\",\n description: \"Search pages and team knowledge.\",\n descriptionKey: \"mcpIntegrations.catalog.notion.description\",\n useCase: \"documentation, knowledge management, notes, content creation\",\n useCaseKey: \"mcpIntegrations.catalog.notion.useCase\",\n url: \"https://mcp.notion.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"notion\"),\n docsUrl: \"https://developers.notion.com/guides/mcp/get-started-with-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.notion.setupNote\",\n keywords: [\"docs\", \"knowledge\", \"notes\", \"pages\"],\n },\n {\n id: \"granola\",\n name: \"Granola\",\n provider: \"granola\",\n description: \"Search meeting notes, transcripts, and action items.\",\n descriptionKey: \"mcpIntegrations.catalog.granola.description\",\n useCase: \"meeting notes, recordings, transcripts, action items, follow-ups\",\n useCaseKey: \"mcpIntegrations.catalog.granola.useCase\",\n url: \"https://mcp.granola.ai/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"granola\"),\n docsUrl: \"https://docs.granola.ai/help-center/sharing/integrations/mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.granola.setupNote\",\n aliases: [\n \"meeting notes\",\n \"meeting recordings\",\n \"recordings\",\n \"transcripts\",\n \"action items\",\n \"follow-ups\",\n \"follow ups\",\n \"decisions\",\n ],\n keywords: [\n \"meetings\",\n \"meeting notes\",\n \"recordings\",\n \"transcripts\",\n \"action items\",\n \"follow-ups\",\n \"decisions\",\n ],\n },\n {\n id: \"semgrep\",\n name: \"Semgrep\",\n provider: \"semgrep\",\n description: \"Scan code for security findings.\",\n descriptionKey: \"mcpIntegrations.catalog.semgrep.description\",\n useCase: \"security scanning, vulnerability detection, code analysis\",\n useCaseKey: \"mcpIntegrations.catalog.semgrep.useCase\",\n url: \"https://mcp.semgrep.ai/mcp\",\n authMode: \"none\",\n connectionMode: \"direct\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"semgrep\"),\n docsUrl: \"https://github.com/semgrep/mcp#readme\",\n keywords: [\"security\", \"sast\", \"code scanning\", \"vulnerabilities\"],\n },\n {\n id: \"linear\",\n name: \"Linear\",\n provider: \"linear\",\n description: \"Read and write Linear issues.\",\n descriptionKey: \"mcpIntegrations.catalog.linear.description\",\n useCase: \"project management, issue tracking, planning, bug reports\",\n useCaseKey: \"mcpIntegrations.catalog.linear.useCase\",\n url: \"https://mcp.linear.app/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"linear\"),\n docsUrl: \"https://linear.app/docs/mcp\",\n keywords: [\"issues\", \"tickets\", \"planning\", \"project management\"],\n },\n {\n id: \"atlassian\",\n name: \"Atlassian\",\n provider: \"atlassian\",\n description: \"Read and write Jira issues and Confluence content.\",\n descriptionKey: \"mcpIntegrations.catalog.atlassian.description\",\n useCase:\n \"project management, issue tracking, documentation, team collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.atlassian.useCase\",\n url: \"https://mcp.atlassian.com/v1/mcp/authv2\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"atlassian\"),\n docsUrl:\n \"https://developer.atlassian.com/cloud/rovo-mcp/guides/getting-started/\",\n setupNoteKey: \"mcpIntegrations.catalog.atlassian.setupNote\",\n aliases: [\"jira\", \"confluence\", \"rovo\"],\n keywords: [\"atlassian\", \"jira\", \"confluence\", \"issues\", \"tickets\"],\n },\n {\n id: \"supabase\",\n name: \"Supabase\",\n provider: \"supabase\",\n description: \"Manage data, auth, and backend services.\",\n descriptionKey: \"mcpIntegrations.catalog.supabase.description\",\n useCase: \"database, authentication, storage, edge functions\",\n useCaseKey: \"mcpIntegrations.catalog.supabase.useCase\",\n url: \"https://mcp.supabase.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"supabase\"),\n docsUrl:\n \"https://www.builder.io/c/docs/fusion-connect-to-supabase?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=fusion_connect_supabase\",\n keywords: [\"database\", \"auth\", \"postgres\", \"storage\"],\n },\n {\n id: \"neon\",\n name: \"Neon\",\n provider: \"neon\",\n description: \"Work with serverless Postgres projects.\",\n descriptionKey: \"mcpIntegrations.catalog.neon.description\",\n useCase: \"database management, serverless postgres, data storage\",\n useCaseKey: \"mcpIntegrations.catalog.neon.useCase\",\n url: \"https://mcp.neon.tech/sse\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"neon\"),\n docsUrl:\n \"https://www.builder.io/c/docs/fusion-connect-to-neon?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=fusion_connect_neon\",\n keywords: [\"database\", \"postgres\", \"serverless\", \"backend\"],\n },\n {\n id: \"stripe\",\n name: \"Stripe\",\n provider: \"stripe\",\n description: \"Manage payments, subscriptions, and customers.\",\n descriptionKey: \"mcpIntegrations.catalog.stripe.description\",\n useCase: \"payments, subscriptions, invoicing, customer management\",\n useCaseKey: \"mcpIntegrations.catalog.stripe.useCase\",\n url: \"https://mcp.stripe.com\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"stripe\"),\n docsUrl: \"https://docs.stripe.com/mcp\",\n keywords: [\"payments\", \"billing\", \"subscriptions\", \"customers\"],\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n provider: \"cloudflare\",\n description: \"Search and operate Cloudflare services through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.cloudflare.description\",\n useCase: \"DNS, Workers, domains, security, observability, platform APIs\",\n useCaseKey: \"mcpIntegrations.catalog.cloudflare.useCase\",\n url: \"https://mcp.cloudflare.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"cloudflare\"),\n docsUrl:\n \"https://developers.cloudflare.com/agents/model-context-protocol/cloudflare/servers-for-cloudflare/\",\n setupNoteKey: \"mcpIntegrations.catalog.cloudflare.setupNote\",\n keywords: [\"cloud\", \"workers\", \"dns\", \"security\", \"observability\"],\n },\n {\n id: \"gitlab\",\n name: \"GitLab\",\n provider: \"gitlab\",\n description: \"Read and manage GitLab projects, issues, and merge requests.\",\n descriptionKey: \"mcpIntegrations.catalog.gitlab.description\",\n useCase: \"repositories, issues, merge requests, CI/CD, code analytics\",\n useCaseKey: \"mcpIntegrations.catalog.gitlab.useCase\",\n url: \"https://gitlab.com/api/v4/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"beta\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"gitlab\"),\n docsUrl: \"https://docs.gitlab.com/user/model_context_protocol/mcp_server/\",\n setupNoteKey: \"mcpIntegrations.catalog.gitlab.setupNote\",\n keywords: [\"git\", \"repositories\", \"issues\", \"merge requests\", \"ci\"],\n },\n {\n id: \"figma\",\n name: \"Figma\",\n provider: \"figma\",\n description: \"Bring Figma design context and canvas actions into an agent.\",\n descriptionKey: \"mcpIntegrations.catalog.figma.description\",\n useCase: \"design files, components, variables, design systems, canvas\",\n useCaseKey: \"mcpIntegrations.catalog.figma.useCase\",\n url: \"https://mcp.figma.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"figma\"),\n docsUrl: \"https://developers.figma.com/docs/figma-mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.figma.setupNote\",\n apiFallback: {\n secretKey: \"FIGMA_ACCESS_TOKEN\",\n docsUrl:\n \"https://developers.figma.com/docs/rest-api/personal-access-tokens/\",\n templateUses: [\"design\"],\n },\n keywords: [\"design\", \"figjam\", \"components\", \"variables\", \"canvas\"],\n },\n {\n id: \"canva\",\n name: \"Canva\",\n provider: \"canva\",\n description: \"Search, create, and update Canva designs and assets.\",\n descriptionKey: \"mcpIntegrations.catalog.canva.description\",\n useCase: \"designs, templates, assets, brand kits, exports, collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.canva.useCase\",\n url: \"https://mcp.canva.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"canva\"),\n docsUrl: \"https://www.canva.dev/docs/mcp/\",\n setupNoteKey: \"mcpIntegrations.catalog.canva.setupNote\",\n keywords: [\"design\", \"templates\", \"assets\", \"brand\", \"exports\"],\n },\n {\n id: \"vercel\",\n name: \"Vercel\",\n provider: \"vercel\",\n description:\n \"Search Vercel docs and inspect projects, deployments, and logs.\",\n descriptionKey: \"mcpIntegrations.catalog.vercel.description\",\n useCase: \"deployments, projects, logs, domains, hosting, documentation\",\n useCaseKey: \"mcpIntegrations.catalog.vercel.useCase\",\n url: \"https://mcp.vercel.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"vercel\"),\n docsUrl: \"https://vercel.com/docs/agent-resources/vercel-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.vercel.setupNote\",\n keywords: [\"deployments\", \"hosting\", \"projects\", \"logs\", \"domains\"],\n },\n {\n id: \"github\",\n name: \"GitHub\",\n provider: \"github\",\n description: \"Read repositories, issues, pull requests, and code context.\",\n descriptionKey: \"mcpIntegrations.catalog.github.description\",\n useCase: \"repositories, issues, pull requests, code, engineering analytics\",\n useCaseKey: \"mcpIntegrations.catalog.github.useCase\",\n url: \"https://api.githubcopilot.com/mcp/\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"github\"),\n docsUrl: \"https://github.com/github/github-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.github.setupNote\",\n keywords: [\"git\", \"repositories\", \"issues\", \"pull requests\", \"code\"],\n },\n {\n id: \"slack\",\n name: \"Slack\",\n provider: \"slack\",\n description:\n \"Search Slack conversations and take workspace actions through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.slack.description\",\n useCase: \"messages, channels, people, company memory, workflows\",\n useCaseKey: \"mcpIntegrations.catalog.slack.useCase\",\n url: \"https://mcp.slack.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"client-restricted\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"slack\"),\n docsUrl: \"https://docs.slack.dev/ai/slack-mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.slack.setupNote\",\n keywords: [\"messages\", \"channels\", \"search\", \"people\", \"chat\"],\n },\n {\n id: \"asana\",\n name: \"Asana\",\n provider: \"asana\",\n description:\n \"Search and manage Asana tasks, projects, and work graph data.\",\n descriptionKey: \"mcpIntegrations.catalog.asana.description\",\n useCase: \"tasks, projects, portfolios, planning, workload\",\n useCaseKey: \"mcpIntegrations.catalog.asana.useCase\",\n url: \"https://mcp.asana.com/v2/mcp\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"asana\"),\n docsUrl:\n \"https://developers.asana.com/docs/integrating-with-asanas-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.asana.setupNote\",\n keywords: [\"tasks\", \"projects\", \"planning\", \"workload\", \"portfolios\"],\n },\n {\n id: \"hubspot\",\n name: \"HubSpot\",\n provider: \"hubspot\",\n description: \"Search and update HubSpot CRM records through MCP.\",\n descriptionKey: \"mcpIntegrations.catalog.hubspot.description\",\n useCase: \"CRM, contacts, companies, deals, tickets, customer analytics\",\n useCaseKey: \"mcpIntegrations.catalog.hubspot.useCase\",\n url: \"https://mcp.hubspot.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"hubspot\"),\n docsUrl:\n \"https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server\",\n setupNoteKey: \"mcpIntegrations.catalog.hubspot.setupNote\",\n keywords: [\"crm\", \"contacts\", \"companies\", \"deals\", \"tickets\"],\n },\n {\n id: \"intercom\",\n name: \"Intercom\",\n provider: \"intercom\",\n description: \"Search conversations and customer support knowledge.\",\n descriptionKey: \"mcpIntegrations.catalog.intercom.description\",\n useCase: \"customer support, conversations, contacts, help center content\",\n useCaseKey: \"mcpIntegrations.catalog.intercom.useCase\",\n url: \"https://mcp.intercom.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"intercom\"),\n docsUrl: \"https://developers.intercom.com/docs/guides/mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.intercom.setupNote\",\n keywords: [\"support\", \"conversations\", \"customers\", \"help center\"],\n },\n {\n id: \"monday\",\n name: \"monday.com\",\n provider: \"monday\",\n description: \"Work with boards, items, and team workflows.\",\n descriptionKey: \"mcpIntegrations.catalog.monday.description\",\n useCase: \"work management, boards, projects, tasks, team operations\",\n useCaseKey: \"mcpIntegrations.catalog.monday.useCase\",\n url: \"https://mcp.monday.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"monday\"),\n docsUrl:\n \"https://developer.monday.com/api-reference/docs/build-on-monday-with-ai\",\n setupNoteKey: \"mcpIntegrations.catalog.monday.setupNote\",\n keywords: [\"work management\", \"boards\", \"projects\", \"tasks\", \"teams\"],\n },\n {\n id: \"webflow\",\n name: \"Webflow\",\n provider: \"webflow\",\n description: \"Read and update Webflow sites and content.\",\n descriptionKey: \"mcpIntegrations.catalog.webflow.description\",\n useCase: \"websites, CMS, site content, publishing, design workflows\",\n useCaseKey: \"mcpIntegrations.catalog.webflow.useCase\",\n url: \"https://mcp.webflow.com/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"webflow\"),\n docsUrl: \"https://developers.webflow.com/mcp/reference/getting-started\",\n setupNoteKey: \"mcpIntegrations.catalog.webflow.setupNote\",\n keywords: [\"websites\", \"cms\", \"content\", \"publishing\", \"design\"],\n },\n {\n id: \"paypal\",\n name: \"PayPal\",\n provider: \"paypal\",\n description: \"Work with PayPal payments, invoices, and commerce data.\",\n descriptionKey: \"mcpIntegrations.catalog.paypal.description\",\n useCase: \"payments, invoices, transactions, merchant operations\",\n useCaseKey: \"mcpIntegrations.catalog.paypal.useCase\",\n url: \"https://mcp.paypal.com/sse\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"paypal\"),\n docsUrl: \"https://developer.paypal.com/ai-tools/mcp-server/\",\n setupNoteKey: \"mcpIntegrations.catalog.paypal.setupNote\",\n keywords: [\"payments\", \"invoices\", \"transactions\", \"commerce\"],\n },\n {\n id: \"box\",\n name: \"Box\",\n provider: \"box\",\n description: \"Search and manage files and folders in Box.\",\n descriptionKey: \"mcpIntegrations.catalog.box.description\",\n useCase: \"files, folders, enterprise content, search, collaboration\",\n useCaseKey: \"mcpIntegrations.catalog.box.useCase\",\n url: \"https://mcp.box.com\",\n authMode: \"oauth\",\n connectionMode: \"manual\",\n availability: \"provider-setup\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"box\"),\n docsUrl: \"https://developer.box.com/guides/box-mcp\",\n setupNoteKey: \"mcpIntegrations.catalog.box.setupNote\",\n keywords: [\"files\", \"folders\", \"documents\", \"enterprise content\"],\n },\n {\n id: \"netlify\",\n name: \"Netlify\",\n provider: \"netlify\",\n description: \"Inspect and operate Netlify sites and deployments.\",\n descriptionKey: \"mcpIntegrations.catalog.netlify.description\",\n useCase: \"sites, deployments, builds, domains, hosting operations\",\n useCaseKey: \"mcpIntegrations.catalog.netlify.useCase\",\n url: \"https://netlify-mcp.netlify.app/mcp\",\n authMode: \"oauth\",\n connectionMode: \"oauth\",\n availability: \"ready\",\n verification: \"preflight-only\",\n logoUrl: mcpIntegrationLogo(\"netlify\"),\n docsUrl:\n \"https://docs.netlify.com/build/build-with-ai/agent-setup-guides/agent-setup-overview/\",\n setupNoteKey: \"mcpIntegrations.catalog.netlify.setupNote\",\n keywords: [\"deployments\", \"builds\", \"sites\", \"hosting\", \"domains\"],\n },\n {\n id: \"zapier\",\n name: \"Zapier\",\n provider: \"zapier\",\n description: \"Connect MCP tools to thousands of app actions.\",\n descriptionKey: \"mcpIntegrations.catalog.zapier.description\",\n useCase: \"automation, workflows, app actions, cross-service operations\",\n useCaseKey: \"mcpIntegrations.catalog.zapier.useCase\",\n url: \"https://mcp.zapier.com/api/v1/connect\",\n authMode: \"headers\",\n connectionMode: \"headers\",\n availability: \"ready\",\n verification: \"restricted\",\n logoUrl: mcpIntegrationLogo(\"zapier\"),\n docsUrl:\n \"https://help.zapier.com/hc/en-us/articles/36265392843917-Use-Zapier-MCP-with-your-client\",\n setupNoteKey: \"mcpIntegrations.catalog.zapier.setupNote\",\n headerPlaceholder: \"Authorization: Bearer <zapier-mcp-token>\",\n keywords: [\"automation\", \"workflows\", \"actions\", \"apps\", \"integrations\"],\n },\n];\n\nfunction readRuntimeMcpIntegrationsConfig(): NormalizedMcpIntegrationsConfig {\n try {\n if (typeof __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__ !== \"undefined\") {\n return normalizeMcpIntegrationsConfig(\n __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__,\n );\n }\n } catch {\n // Test and non-Vite contexts may not define the compile-time constant.\n }\n return normalizeMcpIntegrationsConfig();\n}\n\nfunction normalizeTemplateName(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const normalized = value.trim().toLowerCase();\n return normalized || null;\n}\n\nfunction getActiveTemplateName(): string | null {\n try {\n const compiledTemplate = normalizeTemplateName(__AGENT_NATIVE_TEMPLATE__);\n if (compiledTemplate) return compiledTemplate;\n } catch {\n // Test and non-Vite contexts may not define the compile-time constant.\n }\n\n const runtimeConfig = (\n globalThis as typeof globalThis & {\n __AGENT_NATIVE_CONFIG__?: { template?: unknown };\n }\n ).__AGENT_NATIVE_CONFIG__;\n return normalizeTemplateName(runtimeConfig?.template);\n}\n\nexport function getMcpIntegrationApiFallback(\n integration: DefaultMcpIntegration,\n templateName = getActiveTemplateName(),\n): DefaultMcpIntegration[\"apiFallback\"] | null {\n const fallback = integration.apiFallback;\n if (!fallback) return null;\n if (!fallback.templateUses?.length) return fallback;\n if (!templateName) return null;\n return fallback.templateUses.includes(templateName) ? fallback : null;\n}\n\nfunction normalizePresetConfig(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): NormalizedMcpIntegrationsConfig {\n if (config === undefined) return readRuntimeMcpIntegrationsConfig();\n return normalizeMcpIntegrationsConfig(config);\n}\n\nexport function getDefaultMcpIntegrations(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n overrides: readonly DefaultMcpIntegration[] = [],\n): DefaultMcpIntegration[] {\n const normalized = normalizePresetConfig(config);\n if (!normalized.enabled || !normalized.defaults.enabled) return [];\n\n const include = normalized.defaults.include\n ? new Set(normalized.defaults.include)\n : null;\n const exclude = new Set(normalized.defaults.exclude);\n return mergeDefaultMcpIntegrations(overrides).filter((integration) => {\n const id = integration.id.toLowerCase();\n if (include && !include.has(id)) return false;\n return !exclude.has(id);\n });\n}\n\nexport function mergeDefaultMcpIntegrations(\n overrides: readonly DefaultMcpIntegration[] = [],\n): DefaultMcpIntegration[] {\n return mergeDefinitionsById(DEFAULT_MCP_INTEGRATIONS, overrides);\n}\n\nexport function isCustomMcpIntegrationEnabled(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): boolean {\n const normalized = normalizePresetConfig(config);\n return normalized.enabled && normalized.custom;\n}\n\nexport function isMcpIntegrationCatalogAvailable(\n config?: McpIntegrationsConfigInput | NormalizedMcpIntegrationsConfig,\n): boolean {\n const normalized = normalizePresetConfig(config);\n if (!normalized.enabled) return false;\n return normalized.custom || getDefaultMcpIntegrations(normalized).length > 0;\n}\n\nexport function mcpIntegrationAuthLabel(mode: McpIntegrationAuthMode): string {\n if (mode === \"none\") return \"No auth\";\n if (mode === \"headers\") return \"Header\";\n return \"OAuth\";\n}\n\nexport function buildMcpOAuthStartUrl({\n name,\n url,\n description,\n scope,\n returnUrl,\n}: McpOAuthStartParams): string {\n const params = new URLSearchParams({\n name,\n url,\n description,\n scope,\n return: returnUrl,\n });\n return `/_agent-native/mcp/servers/oauth/start?${params.toString()}`;\n}\n\nexport function navigateToMcpOAuthStart(url: string): void {\n if (typeof window === \"undefined\") return;\n\n const navigate = () => {\n window.setTimeout(() => window.location.assign(url), 0);\n };\n if (typeof window.requestAnimationFrame === \"function\") {\n window.requestAnimationFrame(navigate);\n } else {\n navigate();\n }\n}\n\nexport function resolveMcpIntegrationScope(\n defaultScope: \"user\" | \"org\",\n hasOrg: boolean,\n canCreateOrgMcp: boolean,\n): \"user\" | \"org\" {\n return defaultScope === \"org\" && hasOrg && canCreateOrgMcp ? \"org\" : \"user\";\n}\n\nexport function filterMcpIntegrations(\n query: string,\n integrations: DefaultMcpIntegration[] = getDefaultMcpIntegrations(),\n): DefaultMcpIntegration[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return integrations;\n return integrations.filter((integration) => {\n const haystack = [\n integration.name,\n integration.provider,\n integration.description,\n integration.useCase,\n integration.url,\n ...integration.keywords,\n ]\n .join(\" \")\n .toLowerCase();\n return haystack.includes(needle);\n });\n}\n\nconst MCP_LINK_HOSTS: Record<string, string[]> = {\n context7: [\"context7.com\"],\n sentry: [\"sentry.io\", \"sentry.dev\"],\n notion: [\"notion.so\", \"notion.site\"],\n granola: [\"granola.ai\"],\n semgrep: [\"semgrep.dev\", \"semgrep.com\"],\n canva: [\"canva.com\", \"canva.ai\"],\n figma: [\"figma.com\"],\n linear: [\"linear.app\"],\n atlassian: [\"atlassian.com\", \"atlassian.net\", \"jira.com\", \"confluence.com\"],\n supabase: [\"supabase.com\"],\n neon: [\"neon.tech\"],\n stripe: [\"stripe.com\"],\n cloudflare: [\"cloudflare.com\"],\n github: [\"github.com\", \"github.dev\"],\n gitlab: [\"gitlab.com\"],\n slack: [\"slack.com\"],\n asana: [\"asana.com\"],\n hubspot: [\"hubspot.com\"],\n intercom: [\"intercom.com\"],\n monday: [\"monday.com\"],\n webflow: [\"webflow.com\"],\n paypal: [\"paypal.com\"],\n box: [\"box.com\"],\n netlify: [\"netlify.com\"],\n vercel: [\"vercel.com\"],\n zapier: [\"zapier.com\"],\n};\n\nfunction hostMatches(hostname: string, domain: string): boolean {\n return hostname === domain || hostname.endsWith(`.${domain}`);\n}\n\nfunction findUrlForText(text: string): URL | null {\n const candidates = text.match(/https?:\\/\\/[^\\s<>()[\\]{}]+/gi) ?? [];\n for (const candidate of candidates) {\n try {\n return new URL(candidate.replace(/[.,!?;:'\\\"]+$/, \"\"));\n } catch {\n // Ignore prose that only looks like a URL.\n }\n }\n return null;\n}\n\nconst MCP_RESOURCE_INTENT_PATTERN =\n /\\b(?:action|add|access|board|check|connect|connected|connection|create|decision|design|document|doc|do|extract|fetch|file|find|follow[- ]?ups?|get|import|integration|integrate|issue|link|list|meeting|message|notes?|open|page|populate|project|pull|read|recordings?|review|search|see|summary|summarize|sync|task|ticket|todo|transcripts?|turn|use|workspace)\\b/i;\n\nfunction textContainsTerm(text: string, term: string): boolean {\n const escaped = term.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, \"i\").test(text);\n}\n\nexport function findMcpIntegrationForText(\n text: string,\n integrations: DefaultMcpIntegration[] = getDefaultMcpIntegrations(),\n): DefaultMcpIntegration | null {\n const url = findUrlForText(text);\n if (url) {\n const match = integrations.find((integration) =>\n (MCP_LINK_HOSTS[integration.id] ?? []).some((domain) =>\n hostMatches(url.hostname.toLowerCase(), domain),\n ),\n );\n if (match) return match;\n }\n\n const normalizedText = text.toLowerCase();\n const hasResourceIntent =\n MCP_RESOURCE_INTENT_PATTERN.test(normalizedText) ||\n isMcpConnectionFailureText(normalizedText);\n if (!hasResourceIntent) return null;\n const matchesCanonicalName = (integration: DefaultMcpIntegration) =>\n [\n integration.name,\n integration.provider,\n integration.id,\n ...(integration.aliases ?? []),\n ].some((alias) => textContainsTerm(normalizedText, alias));\n const canonicalMatch = integrations.find(matchesCanonicalName);\n if (canonicalMatch) return canonicalMatch;\n return null;\n}\n\nexport function isMcpConnectionFailureText(text: string): boolean {\n return /\\b(?:can(?:not|'t|’t)|could(?: not|n't|n’t)|unable|failed|don't have access|don’t have access|not connected|not able)\\b[\\s\\S]{0,80}\\b(?:read|access|open|see|fetch|connect)\\b/i.test(\n text,\n );\n}\n\nexport function createMcpIntegrationFormDefaults(\n integration?: DefaultMcpIntegration | null,\n): McpIntegrationFormDefaults {\n if (!integration) {\n return {\n name: \"\",\n url: \"\",\n description: \"\",\n headersText: \"\",\n };\n }\n return {\n name: integration.name,\n url: integration.url,\n description: integration.description,\n headersText: \"\",\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DemoModeSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":"AAAA,8EAA8E;AAO9E,wBAAgB,eAAe,gCAoC9B;AAED,wBAAgB,YAAY,gCAE3B"}
1
+ {"version":3,"file":"DemoModeSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":"AAAA,8EAA8E;AAQ9E,wBAAgB,eAAe,gCAuB9B;AAED,wBAAgB,YAAY,gCAE3B"}