@agent-native/core 0.114.13 → 0.114.15
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.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +15 -0
- package/corpus/core/docs/content/deployment.mdx +1 -1
- package/corpus/core/docs/content/frames.mdx +1 -1
- package/corpus/core/docs/content/integrations.mdx +27 -27
- package/corpus/core/docs/content/pr-visual-recap.mdx +17 -13
- package/corpus/core/docs/content/workspace-management.mdx +1 -1
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/agent/engine/builder-engine.ts +4 -0
- package/corpus/core/src/client/AgentPanel.tsx +10 -4
- package/corpus/core/src/client/ConnectBuilderCard.tsx +5 -1
- package/corpus/core/src/client/chat/markdown-renderer.tsx +3 -5
- package/corpus/core/src/client/error-format.ts +2 -1
- package/corpus/core/src/client/index.ts +1 -0
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +2 -18
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +43 -32
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +4 -2
- package/corpus/core/src/client/settings/BackgroundAgentSection.tsx +5 -1
- package/corpus/core/src/client/settings/SettingsPanel.tsx +4 -4
- package/corpus/core/src/client/settings/useBuilderStatus.ts +3 -0
- package/corpus/core/src/localization/default-messages.ts +1 -7
- package/corpus/core/src/server/builder-browser.ts +4 -0
- package/corpus/core/src/server/builder-design-systems.ts +6 -1
- package/corpus/core/src/server/fusion-app.ts +5 -1
- package/corpus/core/src/shared/builder-link-tracking.ts +41 -0
- package/corpus/core/src/shared/index.ts +1 -0
- package/corpus/templates/analytics/AGENTS.md +10 -1
- package/corpus/templates/analytics/actions/save-dashboard-report-subscription.ts +10 -2
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +5 -4
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +20 -32
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/report-panel-window.ts +62 -0
- package/corpus/templates/analytics/changelog/2026-07-21-chart-series-controls-stay-open-while-moving-from-the-legend.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-21-dashboard-email-captures-complete-large-dashboards-in-chunks.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +4 -4
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +1 -8
- package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +39 -7
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +341 -251
- package/corpus/templates/analytics/server/lib/first-party-dashboard-repair.ts +114 -0
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +84 -6
- package/corpus/templates/analytics/server/plugins/db.ts +13 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +10 -4
- package/corpus/templates/clips/changelog/2026-07-21-choose-which-whisper-model-to-use-in-settings.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-21-fixed-organization-recording-visibility-default.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-21-meeting-notes-stop-when-calls-end.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +66 -75
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +2 -0
- package/corpus/templates/clips/desktop/src/hooks/useWhisperSettings.ts +172 -0
- package/corpus/templates/clips/desktop/src/lib/meeting-call-app.ts +41 -0
- package/corpus/templates/clips/desktop/src/lib/silence-events.ts +1 -0
- package/corpus/templates/clips/desktop/src/shared/config.ts +1 -0
- package/corpus/templates/clips/desktop/src/styles.css +80 -7
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +32 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +3 -0
- package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +268 -20
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_model.rs +285 -164
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +18 -7
- package/corpus/templates/clips/learnings.defaults.md +1 -1
- package/corpus/templates/clips/server/plugins/db.ts +11 -0
- package/corpus/templates/clips/shared/builder-credits.ts +1 -1
- package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +9 -1
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +5 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +9 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +9 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +4 -0
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +10 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
- package/dist/client/ConnectBuilderCard.js +5 -1
- package/dist/client/ConnectBuilderCard.js.map +1 -1
- package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
- package/dist/client/chat/markdown-renderer.js +3 -2
- package/dist/client/chat/markdown-renderer.js.map +1 -1
- package/dist/client/error-format.d.ts +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +1 -1
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +3 -4
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +21 -7
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.js +2 -2
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.js +5 -1
- package/dist/client/settings/BackgroundAgentSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.js +1 -1
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +2 -0
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +0 -6
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +1 -7
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +4 -0
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +6 -1
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/fusion-app.d.ts.map +1 -1
- package/dist/server/fusion-app.js +2 -1
- package/dist/server/fusion-app.js.map +1 -1
- package/dist/shared/builder-link-tracking.d.ts +14 -0
- package/dist/shared/builder-link-tracking.d.ts.map +1 -0
- package/dist/shared/builder-link-tracking.js +26 -0
- package/dist/shared/builder-link-tracking.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/docs/content/deployment.mdx +1 -1
- package/docs/content/frames.mdx +1 -1
- package/docs/content/integrations.mdx +27 -27
- package/docs/content/pr-visual-recap.mdx +17 -13
- package/docs/content/workspace-management.mdx +1 -1
- package/package.json +3 -2
- package/src/agent/engine/builder-engine.ts +4 -0
- package/src/client/AgentPanel.tsx +10 -4
- package/src/client/ConnectBuilderCard.tsx +5 -1
- package/src/client/chat/markdown-renderer.tsx +3 -5
- package/src/client/error-format.ts +2 -1
- package/src/client/index.ts +1 -0
- package/src/client/integrations/IntegrationsPanel.tsx +2 -18
- package/src/client/resources/McpIntegrationDialog.tsx +43 -32
- package/src/client/resources/mcp-integration-catalog.ts +4 -2
- package/src/client/settings/BackgroundAgentSection.tsx +5 -1
- package/src/client/settings/SettingsPanel.tsx +4 -4
- package/src/client/settings/useBuilderStatus.ts +3 -0
- package/src/localization/default-messages.ts +1 -7
- package/src/server/builder-browser.ts +4 -0
- package/src/server/builder-design-systems.ts +6 -1
- package/src/server/fusion-app.ts +5 -1
- package/src/shared/builder-link-tracking.ts +41 -0
- package/src/shared/index.ts +1 -0
|
@@ -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,uBAAuB,CAAC;AACxD,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,E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rowLeft,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { AgentAskPopover } from \"../AgentAskPopover.js\";\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 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 </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 <AgentAskPopover\n label={t(\"mcpIntegrations.addSomething\")}\n title={t(\"mcpIntegrations.addSomethingTitle\")}\n placeholder={t(\"mcpIntegrations.addSomethingPlaceholder\")}\n prompt=\"\"\n context=\"The user wants to add an MCP or provider integration that is not in the current directory. Research the provider's official remote MCP endpoint and OAuth, client-registration, or allowlist requirements. Prefer Streamable HTTP endpoints over legacy SSE, reuse an existing provider OAuth connector when appropriate, and never ask the user to paste credentials into a prompt. If this should become a reusable preset, update the integration catalog, official docs link, bundled logo, localization, and tests.\"\n className=\"h-9 whitespace-nowrap border-dashed px-3 text-[12px] font-medium\"\n />\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 <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\">\n {integration.name.slice(0, 1)}\n </span>\n <img\n src={integration.logoUrl}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"absolute inset-1 h-6 w-6 object-contain\"\n onError={(event) => {\n event.currentTarget.hidden = true;\n }}\n />\n </div>\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-amber-500/20 bg-amber-500/5 px-1.5 py-0.5 text-[9px] font-medium text-amber-700 dark:text-amber-300\">\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 {integration.setupNoteKey && (\n <p className=\"mt-2 line-clamp-3 text-[10px] leading-relaxed text-amber-700 dark:text-amber-300\">\n {t(integration.setupNoteKey)}\n </p>\n )}\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-amber-500/20 bg-amber-500/5 px-3 py-2 text-[11px] leading-relaxed text-amber-700 dark:text-amber-300\">\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,EACj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ClB,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 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-integration-catalog.d.ts","sourceRoot":"","sources":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CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,wBAAwB,EAAE,qBAAqB,
|
|
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,C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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,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;AAuCD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,qBAAqB,EAAgC,GAClE,qBAAqB,GAAG,IAAI,CA2B9B;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,CAAC,EAAE,qBAAqB,GAAG,IAAI,GACzC,0BAA0B,CAe5B"}
|
|
@@ -121,7 +121,7 @@ export const DEFAULT_MCP_INTEGRATIONS = [
|
|
|
121
121
|
availability: "ready",
|
|
122
122
|
verification: "preflight-only",
|
|
123
123
|
logoUrl: mcpIntegrationLogo("supabase"),
|
|
124
|
-
docsUrl: "https://www.builder.io/c/docs/fusion-connect-to-supabase",
|
|
124
|
+
docsUrl: "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",
|
|
125
125
|
keywords: ["database", "auth", "postgres", "storage"],
|
|
126
126
|
},
|
|
127
127
|
{
|
|
@@ -138,7 +138,7 @@ export const DEFAULT_MCP_INTEGRATIONS = [
|
|
|
138
138
|
availability: "ready",
|
|
139
139
|
verification: "preflight-only",
|
|
140
140
|
logoUrl: mcpIntegrationLogo("neon"),
|
|
141
|
-
docsUrl: "https://www.builder.io/c/docs/fusion-connect-to-neon",
|
|
141
|
+
docsUrl: "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",
|
|
142
142
|
keywords: ["database", "postgres", "serverless", "backend"],
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -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;AA+DhE,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,EA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W,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 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: \"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 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: \"https://www.builder.io/c/docs/fusion-connect-to-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: \"https://www.builder.io/c/docs/fusion-connect-to-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 notion: [\"notion.so\", \"notion.site\"],\n canva: [\"canva.com\", \"canva.ai\"],\n figma: [\"figma.com\"],\n linear: [\"linear.app\"],\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};\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(?:connect|connected|connection|integration|integrate|link|page|document|doc|file|workspace|project|issue|design|board|channel|message|ticket|read|access|open|see|fetch|sync|import)\\b/i;\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 return (\n integrations.find((integration) => {\n const aliases = [integration.name, integration.provider, integration.id];\n return aliases.some((alias) => {\n const escaped = alias.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, \"i\").test(\n normalizedText,\n );\n });\n }) ?? null\n );\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;AA+DhE,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,4BAA4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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 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: \"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 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 notion: [\"notion.so\", \"notion.site\"],\n canva: [\"canva.com\", \"canva.ai\"],\n figma: [\"figma.com\"],\n linear: [\"linear.app\"],\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};\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(?:connect|connected|connection|integration|integrate|link|page|document|doc|file|workspace|project|issue|design|board|channel|message|ticket|read|access|open|see|fetch|sync|import)\\b/i;\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 return (\n integrations.find((integration) => {\n const aliases = [integration.name, integration.provider, integration.id];\n return aliases.some((alias) => {\n const escaped = alias.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, \"i\").test(\n normalizedText,\n );\n });\n }) ?? null\n );\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":"BackgroundAgentSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/BackgroundAgentSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BackgroundAgentSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/BackgroundAgentSection.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,sBAAsB,gCAwKrC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconGitBranch, IconCheck, IconExternalLink, IconLoader2, } from "@tabler/icons-react";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
+
import { withBuilderUtmTrackingParams } from "../../shared/builder-link-tracking.js";
|
|
4
5
|
import { trackEvent } from "../analytics.js";
|
|
5
6
|
import { agentNativePath } from "../api-path.js";
|
|
6
7
|
import { SettingsSection } from "./SettingsSection.js";
|
|
@@ -59,6 +60,9 @@ export function BackgroundAgentSection() {
|
|
|
59
60
|
}, className: "inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80", children: ["Connect Builder", _jsx(IconExternalLink, { size: 10 })] }))] })) : !cloudAgentsAvailable ? (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [_jsx(IconCheck, { size: 10 }), "Builder connected", builder?.orgName && (_jsxs("span", { className: "text-muted-foreground", children: ["(", builder.orgName, ")"] }))] }), _jsx("p", { className: "text-[10px] text-muted-foreground", children: "You don't have access to Builder Cloud Agents for this workspace yet; they are not enabled from Builder org settings. Use the desktop app or your local clone for code changes." }), _jsxs("a", { href: "https://www.agent-native.com/download", target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80", children: ["Download desktop app", _jsx(IconExternalLink, { size: 10 })] })] })) : (_jsxs("div", { className: "space-y-2.5", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Builder connected", builder?.orgName && (_jsxs("span", { className: "text-muted-foreground", children: ["(", builder.orgName, ")"] }))] }), _jsxs("div", { children: [_jsx("label", { className: "text-[10px] font-medium text-foreground block mb-1", children: "Builder Project URL or ID" }), _jsxs("div", { className: "flex gap-1.5", children: [_jsx("input", { type: "text", value: projectUrl, onChange: (e) => setProjectUrl(e.target.value), onKeyDown: (e) => {
|
|
60
61
|
if (e.key === "Enter")
|
|
61
62
|
handleCreateBranch();
|
|
62
|
-
}, placeholder: "https://builder.io/app/projects/...", className: "flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent" }), _jsx("button", { onClick: handleCreateBranch, disabled: !projectUrl.trim() || running, className: "rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80 disabled:opacity-40", children: running ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Create branch") })] })] }), result && (_jsxs("div", { className: "rounded-md border border-green-800/40 bg-green-900/10 px-2.5 py-2", children: [_jsx("div", { className: "text-[10px] font-medium text-green-400 mb-1", children: "Branch created" }), _jsxs("a", { href: result.url,
|
|
63
|
+
}, placeholder: "https://builder.io/app/projects/...", className: "flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent" }), _jsx("button", { onClick: handleCreateBranch, disabled: !projectUrl.trim() || running, className: "rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80 disabled:opacity-40", children: running ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Create branch") })] })] }), result && (_jsxs("div", { className: "rounded-md border border-green-800/40 bg-green-900/10 px-2.5 py-2", children: [_jsx("div", { className: "text-[10px] font-medium text-green-400 mb-1", children: "Branch created" }), _jsxs("a", { href: withBuilderUtmTrackingParams(result.url, {
|
|
64
|
+
campaign: "product",
|
|
65
|
+
content: "background_agent_branch",
|
|
66
|
+
}), target: "_blank", rel: "noopener noreferrer", className: "flex items-center gap-1 text-[10px] text-foreground hover:underline", children: [result.url, _jsx(IconExternalLink, { size: 10 })] })] })), error && _jsx("p", { className: "text-[10px] text-red-400", children: error })] })) }));
|
|
63
67
|
}
|
|
64
68
|
//# sourceMappingURL=BackgroundAgentSection.js.map
|