@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.
Files changed (151) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +15 -0
  3. package/corpus/core/docs/content/deployment.mdx +1 -1
  4. package/corpus/core/docs/content/frames.mdx +1 -1
  5. package/corpus/core/docs/content/integrations.mdx +27 -27
  6. package/corpus/core/docs/content/pr-visual-recap.mdx +17 -13
  7. package/corpus/core/docs/content/workspace-management.mdx +1 -1
  8. package/corpus/core/package.json +2 -1
  9. package/corpus/core/src/agent/engine/builder-engine.ts +4 -0
  10. package/corpus/core/src/client/AgentPanel.tsx +10 -4
  11. package/corpus/core/src/client/ConnectBuilderCard.tsx +5 -1
  12. package/corpus/core/src/client/chat/markdown-renderer.tsx +3 -5
  13. package/corpus/core/src/client/error-format.ts +2 -1
  14. package/corpus/core/src/client/index.ts +1 -0
  15. package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +2 -18
  16. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +43 -32
  17. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +4 -2
  18. package/corpus/core/src/client/settings/BackgroundAgentSection.tsx +5 -1
  19. package/corpus/core/src/client/settings/SettingsPanel.tsx +4 -4
  20. package/corpus/core/src/client/settings/useBuilderStatus.ts +3 -0
  21. package/corpus/core/src/localization/default-messages.ts +1 -7
  22. package/corpus/core/src/server/builder-browser.ts +4 -0
  23. package/corpus/core/src/server/builder-design-systems.ts +6 -1
  24. package/corpus/core/src/server/fusion-app.ts +5 -1
  25. package/corpus/core/src/shared/builder-link-tracking.ts +41 -0
  26. package/corpus/core/src/shared/index.ts +1 -0
  27. package/corpus/templates/analytics/AGENTS.md +10 -1
  28. package/corpus/templates/analytics/actions/save-dashboard-report-subscription.ts +10 -2
  29. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +5 -4
  30. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +20 -32
  31. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/report-panel-window.ts +62 -0
  32. package/corpus/templates/analytics/changelog/2026-07-21-chart-series-controls-stay-open-while-moving-from-the-legend.md +6 -0
  33. package/corpus/templates/analytics/changelog/2026-07-21-dashboard-email-captures-complete-large-dashboards-in-chunks.md +6 -0
  34. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +4 -4
  35. package/corpus/templates/analytics/server/jobs/dashboard-report.ts +1 -8
  36. package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +39 -7
  37. package/corpus/templates/analytics/server/lib/dashboard-report.ts +341 -251
  38. package/corpus/templates/analytics/server/lib/first-party-dashboard-repair.ts +114 -0
  39. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +84 -6
  40. package/corpus/templates/analytics/server/plugins/db.ts +13 -0
  41. package/corpus/templates/clips/app/components/player/video-player.tsx +10 -4
  42. package/corpus/templates/clips/changelog/2026-07-21-choose-which-whisper-model-to-use-in-settings.md +6 -0
  43. package/corpus/templates/clips/changelog/2026-07-21-fixed-organization-recording-visibility-default.md +6 -0
  44. package/corpus/templates/clips/changelog/2026-07-21-meeting-notes-stop-when-calls-end.md +6 -0
  45. package/corpus/templates/clips/desktop/src/app.tsx +66 -75
  46. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +2 -0
  47. package/corpus/templates/clips/desktop/src/hooks/useWhisperSettings.ts +172 -0
  48. package/corpus/templates/clips/desktop/src/lib/meeting-call-app.ts +41 -0
  49. package/corpus/templates/clips/desktop/src/lib/silence-events.ts +1 -0
  50. package/corpus/templates/clips/desktop/src/shared/config.ts +1 -0
  51. package/corpus/templates/clips/desktop/src/styles.css +80 -7
  52. package/corpus/templates/clips/desktop/src-tauri/src/config.rs +32 -0
  53. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +3 -0
  54. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +268 -20
  55. package/corpus/templates/clips/desktop/src-tauri/src/whisper_model.rs +285 -164
  56. package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +18 -7
  57. package/corpus/templates/clips/learnings.defaults.md +1 -1
  58. package/corpus/templates/clips/server/plugins/db.ts +11 -0
  59. package/corpus/templates/clips/shared/builder-credits.ts +1 -1
  60. package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +9 -1
  61. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +5 -1
  62. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +9 -1
  63. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +9 -1
  64. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  65. package/dist/agent/engine/builder-engine.js +4 -0
  66. package/dist/agent/engine/builder-engine.js.map +1 -1
  67. package/dist/client/AgentPanel.d.ts.map +1 -1
  68. package/dist/client/AgentPanel.js +10 -3
  69. package/dist/client/AgentPanel.js.map +1 -1
  70. package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
  71. package/dist/client/ConnectBuilderCard.js +5 -1
  72. package/dist/client/ConnectBuilderCard.js.map +1 -1
  73. package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
  74. package/dist/client/chat/markdown-renderer.js +3 -2
  75. package/dist/client/chat/markdown-renderer.js.map +1 -1
  76. package/dist/client/error-format.d.ts +1 -1
  77. package/dist/client/error-format.d.ts.map +1 -1
  78. package/dist/client/error-format.js +1 -1
  79. package/dist/client/error-format.js.map +1 -1
  80. package/dist/client/index.d.ts +1 -0
  81. package/dist/client/index.d.ts.map +1 -1
  82. package/dist/client/index.js +1 -0
  83. package/dist/client/index.js.map +1 -1
  84. package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
  85. package/dist/client/integrations/IntegrationsPanel.js +3 -4
  86. package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
  87. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  88. package/dist/client/resources/McpIntegrationDialog.js +21 -7
  89. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  90. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  91. package/dist/client/resources/mcp-integration-catalog.js +2 -2
  92. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  93. package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -1
  94. package/dist/client/settings/BackgroundAgentSection.js +5 -1
  95. package/dist/client/settings/BackgroundAgentSection.js.map +1 -1
  96. package/dist/client/settings/SettingsPanel.js +1 -1
  97. package/dist/client/settings/SettingsPanel.js.map +1 -1
  98. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
  99. package/dist/client/settings/useBuilderStatus.js +2 -0
  100. package/dist/client/settings/useBuilderStatus.js.map +1 -1
  101. package/dist/collab/struct-routes.d.ts +1 -1
  102. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  103. package/dist/localization/default-messages.d.ts +0 -6
  104. package/dist/localization/default-messages.d.ts.map +1 -1
  105. package/dist/localization/default-messages.js +1 -7
  106. package/dist/localization/default-messages.js.map +1 -1
  107. package/dist/notifications/routes.d.ts +3 -3
  108. package/dist/observability/routes.d.ts +1 -1
  109. package/dist/resources/handlers.d.ts +1 -1
  110. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  111. package/dist/server/builder-browser.d.ts.map +1 -1
  112. package/dist/server/builder-browser.js +4 -0
  113. package/dist/server/builder-browser.js.map +1 -1
  114. package/dist/server/builder-design-systems.d.ts.map +1 -1
  115. package/dist/server/builder-design-systems.js +6 -1
  116. package/dist/server/builder-design-systems.js.map +1 -1
  117. package/dist/server/fusion-app.d.ts.map +1 -1
  118. package/dist/server/fusion-app.js +2 -1
  119. package/dist/server/fusion-app.js.map +1 -1
  120. package/dist/shared/builder-link-tracking.d.ts +14 -0
  121. package/dist/shared/builder-link-tracking.d.ts.map +1 -0
  122. package/dist/shared/builder-link-tracking.js +26 -0
  123. package/dist/shared/builder-link-tracking.js.map +1 -0
  124. package/dist/shared/index.d.ts +1 -0
  125. package/dist/shared/index.d.ts.map +1 -1
  126. package/dist/shared/index.js +1 -0
  127. package/dist/shared/index.js.map +1 -1
  128. package/docs/content/deployment.mdx +1 -1
  129. package/docs/content/frames.mdx +1 -1
  130. package/docs/content/integrations.mdx +27 -27
  131. package/docs/content/pr-visual-recap.mdx +17 -13
  132. package/docs/content/workspace-management.mdx +1 -1
  133. package/package.json +3 -2
  134. package/src/agent/engine/builder-engine.ts +4 -0
  135. package/src/client/AgentPanel.tsx +10 -4
  136. package/src/client/ConnectBuilderCard.tsx +5 -1
  137. package/src/client/chat/markdown-renderer.tsx +3 -5
  138. package/src/client/error-format.ts +2 -1
  139. package/src/client/index.ts +1 -0
  140. package/src/client/integrations/IntegrationsPanel.tsx +2 -18
  141. package/src/client/resources/McpIntegrationDialog.tsx +43 -32
  142. package/src/client/resources/mcp-integration-catalog.ts +4 -2
  143. package/src/client/settings/BackgroundAgentSection.tsx +5 -1
  144. package/src/client/settings/SettingsPanel.tsx +4 -4
  145. package/src/client/settings/useBuilderStatus.ts +3 -0
  146. package/src/localization/default-messages.ts +1 -7
  147. package/src/server/builder-browser.ts +4 -0
  148. package/src/server/builder-design-systems.ts +6 -1
  149. package/src/server/fusion-app.ts +5 -1
  150. package/src/shared/builder-link-tracking.ts +41 -0
  151. package/src/shared/index.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,+B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B,cAAc,GAIf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,GAS3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,GAKnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,cAAc,EACd,2BAA2B,GAU5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,GAgB/B,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * @deprecated Import from a focused @agent-native/core/client/* entrypoint instead.\n * Compatibility aggregation only; new code must not import this barrel.\n */\nexport * from \"./agent-chat/index.js\";\nexport * from \"./hooks/index.js\";\nexport * from \"./navigation/index.js\";\nexport * from \"./host/index.js\";\nexport * from \"./widgets/index.js\";\nexport * from \"./ui/index.js\";\n\nexport { cn } from \"@agent-native/toolkit/utils\";\nexport {\n AgentNativeI18nProvider,\n LanguagePicker,\n getLocaleInitScript,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n useFormatters,\n useLocale,\n useT,\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n type AgentNativeI18nCatalog,\n type AgentNativeI18nProviderProps,\n type LocaleCode,\n type LocaleHydrationPayload,\n type LocaleMessages,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"./i18n.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport {\n FeatureFlagsEditor,\n evaluatedFeatureFlagValues,\n featureFlagValue,\n useFeatureFlag,\n useFeatureFlags,\n type FeatureFlagActor,\n type FeatureFlagMetadata,\n type FeatureFlagRules,\n type SetFeatureFlagInput,\n} from \"./feature-flags/index.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n getAgentSettingsSearchTabs,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type AgentSettingsSearchTab,\n type OpenBuilderConnectPopupOptions,\n type SecretsSectionProps,\n type SettingsPanelProps,\n type SettingsSearchEntry,\n type SettingsTabItem,\n type SettingsTabsPageProps,\n} from \"./settings/index.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { DbAdminPage } from \"./db-admin/DbAdminPage.js\";\nexport {\n installRouteChunkRecovery,\n reloadForStaleChunk,\n recoverFromStaleChunkError,\n} from \"./route-chunk-recovery.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackAgentChatLifecycle,\n trackSessionStatus,\n configureTracking,\n setTrackingContentCaptureEnabled,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n setTrackingIdentity,\n getSessionReplayContext,\n getSessionReplayUrl,\n captureError,\n captureClientException,\n // First-party, Sentry-style error capture (auto + manual API).\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureException,\n captureMessage,\n isErrorCaptureInstalled,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type AgentChatLifecycleEvent,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayOptions,\n type SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\n} from \"./analytics.js\";\nexport { track } from \"./track.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n dedupeCollabUsersByEmail,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n usePresence,\n toNormalized,\n fromNormalized,\n type OtherPresence,\n type PresencePayload,\n type UsePresenceResult,\n type NormalizedPoint,\n} from \"../collab/presence.js\";\nexport {\n useFollowUser,\n type UseFollowUserOptions,\n type UseFollowUserResult,\n type ViewportDescriptor,\n} from \"../collab/follow-mode.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n DEFAULT_MCP_INTEGRATIONS,\n getDefaultMcpIntegrations,\n mergeDefaultMcpIntegrations,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n type DefaultMcpIntegration,\n} from \"./resources/index.js\";\nexport type { ResourcesPanelProps } from \"./resources/ResourcesPanel.js\";\nexport {\n HistoryTimeline,\n VersionHistoryPanel,\n useCreateResourceVersion,\n useResourceHistory,\n useResourceVersion,\n useResourceVersions,\n useRestoreResourceVersion,\n type CreateResourceVersionInput,\n type GetResourceVersionInput,\n type GetResourceVersionResult,\n type ListResourceHistoryResult,\n type ListResourceVersionsResult,\n type ResourceHistoryParams,\n type ResourceVersionsParams,\n type RestoreResourceVersionInput,\n type RestoreResourceVersionResult,\n type VersionHistoryPanelProps,\n} from \"./history/index.js\";\nexport {\n ReviewCommentComposer,\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSendReviewThreadToAgent,\n useSetReviewStatus,\n type ConsumeReviewFeedbackInput,\n type CreateReviewCommentInput,\n type DeleteReviewCommentInput,\n type GetReviewFeedbackParams,\n type GetReviewFeedbackResult,\n type ListReviewCommentsParams,\n type ListReviewCommentsResult,\n type ReplyReviewCommentInput,\n type ResolveReviewThreadInput,\n type ReviewStatusBadgeProps,\n type ReviewCommentComposerProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n type SendReviewThreadToAgentInput,\n} from \"./review/index.js\";\nexport {\n BuilderConnectCard,\n ProviderReadinessBadge,\n SetupConnectionsPage,\n type BuilderConnectCardProps,\n type ProviderReadinessBadgeProps,\n type SetupConnectionsPageProps,\n} from \"./setup-connections/index.js\";\nexport {\n listIntegrationEnvStatuses,\n listIntegrationStatuses,\n saveIntegrationEnvVars,\n setIntegrationEnabled,\n setupIntegration,\n disconnectManagedIntegrationInstallation,\n listManagedIntegrationInstallations,\n managedIntegrationOAuthUrl,\n managedSlackAgentManifestUrl,\n listManagedIntegrationScopes,\n saveManagedIntegrationScope,\n listManagedIntegrationBudgets,\n listManagedIntegrationMemory,\n forgetManagedIntegrationMemory,\n saveManagedIntegrationBudget,\n testManagedIntegrationInstallation,\n IntegrationClientError,\n type ClientIntegrationInstallation,\n type ClientIntegrationScope,\n type ClientIntegrationUsageBudget,\n type ClientIntegrationMemory,\n type ClientIntegrationStatus,\n type IntegrationEnvStatus,\n type SavedEnvVarsResult,\n} from \"./integrations/index.js\";\nexport {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"./automation.js\";\nexport {\n ChangelogDialog,\n ChangelogSettingsCard,\n useChangelogSeen,\n parseChangelog,\n type ChangelogDialogProps,\n type ChangelogSettingsCardProps,\n type ChangelogEntry,\n} from \"./changelog/Changelog.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n ShareButton,\n ShareDialog,\n type ShareButtonProps,\n type ShareDialogProps,\n} from \"./sharing/index.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\nexport {\n appendRecentEdit,\n collectRecentEdits,\n publishRecentEdit,\n useRecentEdits,\n RECENT_EDITS_MAX,\n RECENT_EDIT_TTL_MS,\n type RecentEdit,\n type RecentEditDescriptor,\n type AttributedRecentEdit,\n type UseRecentEditsOptions,\n} from \"../collab/recent-edits.js\";\nexport {\n useCollabUndo,\n useLocalOpUndo,\n createLocalOpUndoController,\n type UseCollabUndoOptions,\n type UseCollabUndoResult,\n type CollabUndoScope,\n type UseLocalOpUndoOptions,\n type UseLocalOpUndoResult,\n type LocalOpUndoEntry,\n type LocalOpUndoController,\n type CreateLocalOpUndoOptions,\n type UndoKeyboardOptions,\n} from \"../collab/undo.js\";\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\nexport {\n defineBlock,\n BlockRegistry,\n registerBlocks,\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n BlockView,\n SchemaBlockEditor,\n markdown,\n richtext,\n introspect,\n serializeSpecBlock,\n parseSpecBlock,\n createAttrReader,\n childCodeFenceFields,\n serializeChildCodeFenceFields,\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type FieldKind,\n type FieldDescriptor,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n type BlockAgentDoc,\n} from \"./blocks/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,IAAI,EACJ,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,GASlB,MAAM,WAAW,CA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,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,GAS3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,GAKnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,cAAc,EACd,2BAA2B,GAU5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,GAgB/B,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * @deprecated Import from a focused @agent-native/core/client/* entrypoint instead.\n * Compatibility aggregation only; new code must not import this barrel.\n */\nexport * from \"./agent-chat/index.js\";\nexport * from \"./hooks/index.js\";\nexport * from \"./navigation/index.js\";\nexport * from \"./host/index.js\";\nexport * from \"./widgets/index.js\";\nexport * from \"./ui/index.js\";\n\nexport { cn } from \"@agent-native/toolkit/utils\";\nexport {\n AgentNativeI18nProvider,\n LanguagePicker,\n getLocaleInitScript,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n useFormatters,\n useLocale,\n useT,\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n type AgentNativeI18nCatalog,\n type AgentNativeI18nProviderProps,\n type LocaleCode,\n type LocaleHydrationPayload,\n type LocaleMessages,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"./i18n.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport {\n FeatureFlagsEditor,\n evaluatedFeatureFlagValues,\n featureFlagValue,\n useFeatureFlag,\n useFeatureFlags,\n type FeatureFlagActor,\n type FeatureFlagMetadata,\n type FeatureFlagRules,\n type SetFeatureFlagInput,\n} from \"./feature-flags/index.js\";\nexport { withBuilderUtmTrackingParams } from \"../shared/builder-link-tracking.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n getAgentSettingsSearchTabs,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type AgentSettingsSearchTab,\n type OpenBuilderConnectPopupOptions,\n type SecretsSectionProps,\n type SettingsPanelProps,\n type SettingsSearchEntry,\n type SettingsTabItem,\n type SettingsTabsPageProps,\n} from \"./settings/index.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { DbAdminPage } from \"./db-admin/DbAdminPage.js\";\nexport {\n installRouteChunkRecovery,\n reloadForStaleChunk,\n recoverFromStaleChunkError,\n} from \"./route-chunk-recovery.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackAgentChatLifecycle,\n trackSessionStatus,\n configureTracking,\n setTrackingContentCaptureEnabled,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n setTrackingIdentity,\n getSessionReplayContext,\n getSessionReplayUrl,\n captureError,\n captureClientException,\n // First-party, Sentry-style error capture (auto + manual API).\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureException,\n captureMessage,\n isErrorCaptureInstalled,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type AgentChatLifecycleEvent,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayOptions,\n type SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\n} from \"./analytics.js\";\nexport { track } from \"./track.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n dedupeCollabUsersByEmail,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n usePresence,\n toNormalized,\n fromNormalized,\n type OtherPresence,\n type PresencePayload,\n type UsePresenceResult,\n type NormalizedPoint,\n} from \"../collab/presence.js\";\nexport {\n useFollowUser,\n type UseFollowUserOptions,\n type UseFollowUserResult,\n type ViewportDescriptor,\n} from \"../collab/follow-mode.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n DEFAULT_MCP_INTEGRATIONS,\n getDefaultMcpIntegrations,\n mergeDefaultMcpIntegrations,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n type DefaultMcpIntegration,\n} from \"./resources/index.js\";\nexport type { ResourcesPanelProps } from \"./resources/ResourcesPanel.js\";\nexport {\n HistoryTimeline,\n VersionHistoryPanel,\n useCreateResourceVersion,\n useResourceHistory,\n useResourceVersion,\n useResourceVersions,\n useRestoreResourceVersion,\n type CreateResourceVersionInput,\n type GetResourceVersionInput,\n type GetResourceVersionResult,\n type ListResourceHistoryResult,\n type ListResourceVersionsResult,\n type ResourceHistoryParams,\n type ResourceVersionsParams,\n type RestoreResourceVersionInput,\n type RestoreResourceVersionResult,\n type VersionHistoryPanelProps,\n} from \"./history/index.js\";\nexport {\n ReviewCommentComposer,\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSendReviewThreadToAgent,\n useSetReviewStatus,\n type ConsumeReviewFeedbackInput,\n type CreateReviewCommentInput,\n type DeleteReviewCommentInput,\n type GetReviewFeedbackParams,\n type GetReviewFeedbackResult,\n type ListReviewCommentsParams,\n type ListReviewCommentsResult,\n type ReplyReviewCommentInput,\n type ResolveReviewThreadInput,\n type ReviewStatusBadgeProps,\n type ReviewCommentComposerProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n type SendReviewThreadToAgentInput,\n} from \"./review/index.js\";\nexport {\n BuilderConnectCard,\n ProviderReadinessBadge,\n SetupConnectionsPage,\n type BuilderConnectCardProps,\n type ProviderReadinessBadgeProps,\n type SetupConnectionsPageProps,\n} from \"./setup-connections/index.js\";\nexport {\n listIntegrationEnvStatuses,\n listIntegrationStatuses,\n saveIntegrationEnvVars,\n setIntegrationEnabled,\n setupIntegration,\n disconnectManagedIntegrationInstallation,\n listManagedIntegrationInstallations,\n managedIntegrationOAuthUrl,\n managedSlackAgentManifestUrl,\n listManagedIntegrationScopes,\n saveManagedIntegrationScope,\n listManagedIntegrationBudgets,\n listManagedIntegrationMemory,\n forgetManagedIntegrationMemory,\n saveManagedIntegrationBudget,\n testManagedIntegrationInstallation,\n IntegrationClientError,\n type ClientIntegrationInstallation,\n type ClientIntegrationScope,\n type ClientIntegrationUsageBudget,\n type ClientIntegrationMemory,\n type ClientIntegrationStatus,\n type IntegrationEnvStatus,\n type SavedEnvVarsResult,\n} from \"./integrations/index.js\";\nexport {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"./automation.js\";\nexport {\n ChangelogDialog,\n ChangelogSettingsCard,\n useChangelogSeen,\n parseChangelog,\n type ChangelogDialogProps,\n type ChangelogSettingsCardProps,\n type ChangelogEntry,\n} from \"./changelog/Changelog.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n ShareButton,\n ShareDialog,\n type ShareButtonProps,\n type ShareDialogProps,\n} from \"./sharing/index.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\nexport {\n appendRecentEdit,\n collectRecentEdits,\n publishRecentEdit,\n useRecentEdits,\n RECENT_EDITS_MAX,\n RECENT_EDIT_TTL_MS,\n type RecentEdit,\n type RecentEditDescriptor,\n type AttributedRecentEdit,\n type UseRecentEditsOptions,\n} from \"../collab/recent-edits.js\";\nexport {\n useCollabUndo,\n useLocalOpUndo,\n createLocalOpUndoController,\n type UseCollabUndoOptions,\n type UseCollabUndoResult,\n type CollabUndoScope,\n type UseLocalOpUndoOptions,\n type UseLocalOpUndoResult,\n type LocalOpUndoEntry,\n type LocalOpUndoController,\n type CreateLocalOpUndoOptions,\n type UndoKeyboardOptions,\n} from \"../collab/undo.js\";\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\nexport {\n defineBlock,\n BlockRegistry,\n registerBlocks,\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n BlockView,\n SchemaBlockEditor,\n markdown,\n richtext,\n introspect,\n serializeSpecBlock,\n parseSpecBlock,\n createAttrReader,\n childCodeFenceFields,\n serializeChildCodeFenceFields,\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type FieldKind,\n type FieldDescriptor,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n type BlockAgentDoc,\n} from \"./blocks/index.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/integrations/IntegrationsPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0chE,wBAAgB,iBAAiB,sBAgKhC"}
1
+ {"version":3,"file":"IntegrationsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/integrations/IntegrationsPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0chE,wBAAgB,iBAAiB,sBAgJhC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { IconPlus, IconBrandSlack, IconBrandTelegram, IconBrandWhatsapp, IconBrandGoogleDrive, IconTerminal2, IconBuildingSkyscraper, IconCopy, IconCheck, IconChevronLeft, IconExternalLink, IconCircleCheck, } from "@tabler/icons-react";
3
3
  import { useState, useCallback, useEffect } from "react";
4
- import { AgentAskPopover } from "../AgentAskPopover.js";
5
4
  import { agentNativePath } from "../api-path.js";
6
5
  import { Tooltip, TooltipContent, TooltipTrigger, } from "../components/ui/tooltip.js";
7
6
  import { useT } from "../i18n.js";
@@ -97,7 +96,7 @@ const PLATFORMS = [
97
96
  "Builder.io discovers each agent's skills via A2A",
98
97
  "Chat with one agent that can trigger actions across all your apps",
99
98
  ],
100
- docsUrl: "https://www.builder.io",
99
+ docsUrl: "https://www.builder.io?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=integrations_panel",
101
100
  },
102
101
  ];
103
102
  function useAgentEngineConfigured() {
@@ -198,12 +197,12 @@ export function IntegrationsPanel() {
198
197
  return (_jsx(IntegrationDetail, { platform: selectedPlatform, serverStatus: statusMap.get(selectedPlatform.id), onBack: () => setSelectedPlatform(null), onRefresh: refetch }));
199
198
  }
200
199
  if (showPicker) {
201
- return (_jsxs("div", { children: [_jsxs("button", { onClick: () => setShowPicker(false), className: "flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2", children: [_jsx(IconChevronLeft, { size: 12, className: "rtl:-scale-x-100" }), t("integrations.back")] }), _jsx("div", { className: "text-[10px] font-medium text-muted-foreground mb-1.5", children: t("integrations.addChatIntegration") }), _jsx(AgentAskPopover, { label: t("integrations.addSomething"), title: t("integrations.addSomethingTitle"), placeholder: t("integrations.addSomethingPlaceholder"), prompt: "", context: "The user wants to add a chat or workspace integration that is not in the current directory. Research the provider's official OAuth or MCP setup, explain any app registration or allowlist requirements, and add a reusable integration preset when it is supported. Never ask the user to paste credentials into a prompt.", className: "mb-2 h-7 w-full justify-center border-dashed px-2 text-[10px]" }), _jsx(AddIntegrationPicker, { connectedIds: connectedIds, onSelect: (p) => {
200
+ return (_jsxs("div", { children: [_jsxs("button", { onClick: () => setShowPicker(false), className: "flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2", children: [_jsx(IconChevronLeft, { size: 12, className: "rtl:-scale-x-100" }), t("integrations.back")] }), _jsx("div", { className: "text-[10px] font-medium text-muted-foreground mb-1.5", children: t("integrations.addChatIntegration") }), _jsx(AddIntegrationPicker, { connectedIds: connectedIds, onSelect: (p) => {
202
201
  setSelectedPlatform(p);
203
202
  setShowPicker(false);
204
203
  } })] }));
205
204
  }
206
- return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between mb-1.5", children: [_jsxs("div", { children: [_jsx("div", { className: "text-xs font-medium text-foreground", children: t("integrations.chatIntegrations") }), _jsx("div", { className: "text-[10px] text-muted-foreground", children: t("integrations.chatIntegrationsDescription") })] }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { onClick: () => setShowPicker(true), className: "flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground", children: _jsx(IconPlus, { size: 12 }) }) }), _jsx(TooltipContent, { children: t("integrations.addIntegration") })] }), _jsx(AgentAskPopover, { label: t("integrations.addSomething"), title: t("integrations.addSomethingTitle"), placeholder: t("integrations.addSomethingPlaceholder"), prompt: "", context: "The user wants to add a chat or workspace integration that is not in the current directory. Research the provider's official OAuth or MCP setup, explain any app registration or allowlist requirements, and add a reusable integration preset when it is supported. Never ask the user to paste credentials into a prompt.", className: "h-7 px-2 text-[10px]" })] })] }), loading ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "h-6 w-full rounded bg-muted/50 animate-pulse" }), _jsx("div", { className: "h-6 w-3/4 rounded bg-muted/50 animate-pulse" })] })) : connectedPlatforms.length === 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsxs("button", { onClick: () => setShowPicker(true), className: "flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground hover:bg-accent/30", children: [_jsx(IconPlus, { size: 12, className: "shrink-0" }), t("integrations.addIntegration")] }), _jsxs("div", { className: "rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground", children: [t("integrations.dispatchEntrypoint"), " ", _jsx("a", { href: "https://dispatch.agent-native.com", target: "_blank", rel: "noopener noreferrer", className: "no-underline font-medium text-foreground hover:text-foreground/80", children: "dispatch template" }), "."] })] })) : (_jsxs("div", { className: "space-y-2", children: [connectedPlatforms.map((platform) => {
205
+ return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between mb-1.5", children: [_jsxs("div", { children: [_jsx("div", { className: "text-xs font-medium text-foreground", children: t("integrations.chatIntegrations") }), _jsx("div", { className: "text-[10px] text-muted-foreground", children: t("integrations.chatIntegrationsDescription") })] }), _jsx("div", { className: "flex items-center gap-1", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { onClick: () => setShowPicker(true), className: "flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground", children: _jsx(IconPlus, { size: 12 }) }) }), _jsx(TooltipContent, { children: t("integrations.addIntegration") })] }) })] }), loading ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "h-6 w-full rounded bg-muted/50 animate-pulse" }), _jsx("div", { className: "h-6 w-3/4 rounded bg-muted/50 animate-pulse" })] })) : connectedPlatforms.length === 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsxs("button", { onClick: () => setShowPicker(true), className: "flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground hover:bg-accent/30", children: [_jsx(IconPlus, { size: 12, className: "shrink-0" }), t("integrations.addIntegration")] }), _jsxs("div", { className: "rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground", children: [t("integrations.dispatchEntrypoint"), " ", _jsx("a", { href: "https://dispatch.agent-native.com", target: "_blank", rel: "noopener noreferrer", className: "no-underline font-medium text-foreground hover:text-foreground/80", children: "dispatch template" }), "."] })] })) : (_jsxs("div", { className: "space-y-2", children: [connectedPlatforms.map((platform) => {
207
206
  const s = statusMap.get(platform.id);
208
207
  return (_jsxs("button", { onClick: () => setSelectedPlatform(platform), className: "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start hover:bg-accent/50", children: [_jsx(platform.icon, { size: 14, className: "shrink-0 text-muted-foreground" }), _jsx("span", { className: "flex-1 text-[11px] font-medium text-foreground truncate", children: platform.label }), s && (_jsx("span", { className: `inline-block h-1.5 w-1.5 rounded-full shrink-0 ${s.enabled && s.configured
209
208
  ? "bg-green-500"
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsPanel.js","sourceRoot":"","sources":["../../../src/client/integrations/IntegrationsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EACL,oBAAoB,GAErB,MAAM,2BAA2B,CAAC;AAgBnC,MAAM,SAAS,GAAmB;IAChC;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,gBAAgB;QACvB,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,oFAAoF;QACtF,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;QACpD,UAAU,EAAE;YACV,iEAAiE;YACjE,0EAA0E;YAC1E,yGAAyG;SAC1G;QACD,OAAO,EAAE,4BAA4B;KACtC;IACD;QACE,EAAE,EAAE,UA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,CAAC,CAAC,8BAA8B,CAAC,GAC9B,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconPlus,\n IconBrandSlack,\n IconBrandTelegram,\n IconBrandWhatsapp,\n IconBrandGoogleDrive,\n IconTerminal2,\n IconBuildingSkyscraper,\n IconCopy,\n IconCheck,\n IconChevronLeft,\n IconExternalLink,\n IconCircleCheck,\n} from \"@tabler/icons-react\";\nimport React, { useState, useCallback, useEffect } from \"react\";\n\nimport { AgentAskPopover } from \"../AgentAskPopover.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport {\n useIntegrationStatus,\n type IntegrationStatus,\n} from \"./useIntegrationStatus.js\";\n\n// ─── Platform config ─────────────────────────────────────────────────────────\n\ninterface PlatformInfo {\n id: string;\n label: string;\n icon: React.ComponentType<any>;\n description: string;\n envVars: string[];\n setupSteps: string[];\n docsUrl?: string;\n /** If true, this is a \"client\" integration (user connects TO the agent) rather than a webhook */\n isClient?: boolean;\n}\n\nconst PLATFORMS: PlatformInfo[] = [\n {\n id: \"slack\",\n label: \"Slack (legacy)\",\n icon: IconBrandSlack,\n description:\n \"Legacy single-workspace setup. Use Settings → Messaging for new Slack connections.\",\n envVars: [\"SLACK_BOT_TOKEN\", \"SLACK_SIGNING_SECRET\"],\n setupSteps: [\n \"Open Settings → Messaging for the supported managed Slack setup\",\n \"Use this legacy setup only for an existing single-workspace installation\",\n \"Managed OAuth stores workspace bot tokens automatically; do not add SLACK_BOT_TOKEN for new connections\",\n ],\n docsUrl: \"https://api.slack.com/apps\",\n },\n {\n id: \"telegram\",\n label: \"Telegram\",\n icon: IconBrandTelegram,\n description: \"Chat with your agent via a Telegram bot.\",\n envVars: [\"TELEGRAM_BOT_TOKEN\"],\n setupSteps: [\n \"Message @BotFather on Telegram to create a new bot\",\n \"Copy the bot token into your environment\",\n 'Click \"Setup webhook\" below to register automatically',\n ],\n },\n {\n id: \"whatsapp\",\n label: \"WhatsApp\",\n icon: IconBrandWhatsapp,\n description: \"Connect your agent to WhatsApp Business.\",\n envVars: [\"WHATSAPP_TOKEN\", \"WHATSAPP_VERIFY_TOKEN\"],\n setupSteps: [\n \"Create a Meta Business app at developers.facebook.com\",\n \"Set up WhatsApp Business API\",\n \"Configure the webhook URL and verify token\",\n \"Copy the access token into your environment\",\n ],\n docsUrl: \"https://developers.facebook.com/docs/whatsapp\",\n },\n {\n id: \"google-docs\",\n label: \"Google Docs\",\n icon: IconBrandGoogleDrive,\n description: \"Tag the agent in Google Doc comments to get responses.\",\n envVars: [\"GOOGLE_SERVICE_ACCOUNT_KEY\"],\n setupSteps: [\n \"Create a Google Cloud service account and download the JSON key\",\n \"Set GOOGLE_SERVICE_ACCOUNT_KEY in your environment (JSON string or file path)\",\n \"Share your Google Docs with the service account email\",\n 'Write a comment containing \"@Agent\" to trigger the agent',\n ],\n },\n {\n id: \"openclaw\",\n label: \"OpenClaw\",\n icon: IconTerminal2,\n description: \"Access this agent from OpenClaw's unified agent interface.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Install OpenClaw: npm install -g openclaw\",\n \"Add this agent's URL as a provider in your OpenClaw config\",\n \"OpenClaw discovers your agent's capabilities via the A2A protocol\",\n ],\n },\n {\n id: \"claude-code\",\n label: \"Claude Code\",\n icon: IconTerminal2,\n description:\n \"Let Claude Code call this agent via A2A for data and actions.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Your agent exposes an A2A endpoint at /.well-known/agent-card.json\",\n \"In Claude Code, reference your agent's URL when asking for data\",\n \"Claude Code will discover and call your agent's skills automatically\",\n ],\n },\n {\n id: \"builder\",\n label: \"Builder.io\",\n icon: IconBuildingSkyscraper,\n description:\n \"One chat interface that orchestrates all your agents together.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Connect your agent-native apps in your Builder.io workspace\",\n \"Builder.io discovers each agent's skills via A2A\",\n \"Chat with one agent that can trigger actions across all your apps\",\n ],\n docsUrl: \"https://www.builder.io\",\n },\n];\n\nfunction useAgentEngineConfigured() {\n const [configured, setConfigured] = useState<boolean | undefined>(undefined);\n\n const refresh = useCallback(() => {\n fetch(agentNativePath(\"/_agent-native/agent-engine/status\"))\n .then((r) => (r.ok ? r.json() : null))\n .then((data) => {\n if (typeof data?.configured === \"boolean\") {\n setConfigured(data.configured);\n }\n })\n .catch(() => {});\n }, []);\n\n useEffect(() => {\n refresh();\n window.addEventListener(\"agent-engine:configured-changed\", refresh);\n return () =>\n window.removeEventListener(\"agent-engine:configured-changed\", refresh);\n }, [refresh]);\n\n return configured;\n}\n\n// ─── Integration detail view ─────────────────────────────────────────────────\n\nfunction IntegrationDetail({\n platform,\n serverStatus,\n onBack,\n onRefresh,\n}: {\n platform: PlatformInfo;\n serverStatus?: IntegrationStatus;\n onBack: () => void;\n onRefresh: () => void;\n}) {\n const t = useT();\n const [toggling, setToggling] = useState(false);\n const [copied, setCopied] = useState(false);\n const [toggleError, setToggleError] = useState<string | null>(null);\n const agentEngineConfigured = useAgentEngineConfigured();\n\n const handleToggle = useCallback(async () => {\n setToggling(true);\n setToggleError(null);\n try {\n const action = serverStatus?.enabled ? \"disable\" : \"enable\";\n const res = await fetch(\n agentNativePath(`/_agent-native/integrations/${platform.id}/${action}`),\n { method: \"POST\" },\n );\n if (res.ok) {\n onRefresh();\n return;\n }\n // Surface the real reason instead of silently doing nothing.\n // The endpoint returns `{ error }` for known failures (admin gating,\n // missing secrets, etc.); fall back to status text otherwise.\n const data = (await res.json().catch(() => null)) as {\n error?: string;\n } | null;\n setToggleError(\n data?.error ||\n res.statusText ||\n `Couldn't ${action} ${platform.label} (HTTP ${res.status})`,\n );\n } catch (err) {\n setToggleError(\n err instanceof Error ? err.message : t(\"integrations.networkError\"),\n );\n } finally {\n setToggling(false);\n }\n }, [platform.id, platform.label, serverStatus?.enabled, onRefresh]);\n\n const handleCopy = useCallback(async (text: string) => {\n await navigator.clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }, []);\n\n const handleOpenLlmSettings = useCallback(() => {\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"llm\" },\n }),\n );\n }, []);\n\n const isConfigured = serverStatus?.configured ?? false;\n const isEnabled = serverStatus?.enabled ?? false;\n const showAgentEnginePrereq =\n !platform.isClient && agentEngineConfigured === false;\n const serviceAccountEmail =\n typeof serverStatus?.details?.serviceAccountEmail === \"string\"\n ? serverStatus.details.serviceAccountEmail\n : null;\n\n return (\n <div>\n <button\n onClick={onBack}\n className=\"flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2\"\n >\n <IconChevronLeft size={12} className=\"rtl:-scale-x-100\" />\n {t(\"integrations.back\")}\n </button>\n\n <div className=\"flex items-center gap-2 mb-2\">\n <platform.icon size={18} className=\"text-foreground shrink-0\" />\n <div>\n <div className=\"text-xs font-medium text-foreground\">\n {platform.label}\n </div>\n <div className=\"text-[10px] text-muted-foreground\">\n {platform.description}\n </div>\n </div>\n </div>\n\n {showAgentEnginePrereq && (\n <div className=\"mb-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"text-[10px] font-medium text-foreground\">\n {t(\"integrations.agentEngineRequired\")}\n </div>\n <p className=\"mt-0.5 text-[10px] leading-relaxed text-muted-foreground\">\n {t(\"integrations.agentEngineDescription\", {\n platform: platform.label,\n })}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={handleOpenLlmSettings}\n className=\"shrink-0 rounded border border-border bg-background px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground\"\n >\n {t(\"integrations.openLlm\")}\n </button>\n </div>\n </div>\n )}\n\n {/* Setup steps */}\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1.5\">\n {t(\"integrations.setup\")}\n </div>\n <ol className=\"space-y-1\">\n {platform.setupSteps.map((step, i) => (\n <li\n key={i}\n className=\"flex gap-1.5 text-[10px] text-muted-foreground leading-relaxed\"\n >\n <span className=\"shrink-0 text-muted-foreground/50\">\n {i + 1}.\n </span>\n {step}\n </li>\n ))}\n </ol>\n </div>\n\n {serviceAccountEmail && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.shareDocumentsWith\")}\n </div>\n <div className=\"flex items-center gap-1\">\n <code className=\"flex-1 truncate rounded bg-muted px-1.5 py-0.5 text-[10px] text-foreground\">\n {serviceAccountEmail}\n </code>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => handleCopy(serviceAccountEmail)}\n className=\"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent/50\"\n >\n {copied ? <IconCheck size={12} /> : <IconCopy size={12} />}\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"integrations.copyServiceAccountEmail\")}\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n )}\n\n {/* Required secrets */}\n {platform.envVars.length > 0 && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.requiredSecrets\")}\n </div>\n <div className=\"space-y-0.5\">\n {platform.envVars.map((v) => (\n <div key={v} className=\"flex items-center gap-1\">\n <code className=\"text-[10px] text-foreground bg-muted px-1 py-0.5 rounded\">\n {v}\n </code>\n {isConfigured && (\n <IconCircleCheck\n size={11}\n className=\"text-green-500 shrink-0\"\n />\n )}\n </div>\n ))}\n </div>\n {!isConfigured && (\n <p className=\"text-[10px] text-amber-500 mt-1\">\n {t(\"integrations.envHelp\")}\n </p>\n )}\n </div>\n )}\n\n {/* Webhook URL */}\n {serverStatus?.webhookUrl && !platform.isClient && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.webhookUrl\")}\n </div>\n <div className=\"flex items-center gap-1\">\n <code className=\"flex-1 truncate rounded bg-muted px-1.5 py-0.5 text-[10px] text-foreground\">\n {serverStatus.webhookUrl}\n </code>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => handleCopy(serverStatus.webhookUrl!)}\n className=\"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent/50\"\n >\n {copied ? <IconCheck size={12} /> : <IconCopy size={12} />}\n </button>\n </TooltipTrigger>\n <TooltipContent>{t(\"integrations.copy\")}</TooltipContent>\n </Tooltip>\n </div>\n </div>\n )}\n\n {/* Docs link */}\n {platform.docsUrl && (\n <a\n href={platform.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-[10px] text-blue-400 hover:text-blue-300 mb-3\"\n >\n {t(\"integrations.documentation\")}\n <IconExternalLink size={10} />\n </a>\n )}\n\n {/* Enable/disable for server integrations */}\n {serverStatus && !platform.isClient && isConfigured && (\n <button\n onClick={handleToggle}\n disabled={toggling}\n className={`w-full rounded-md border px-2 py-1.5 text-[11px] font-medium disabled:opacity-50 ${\n isEnabled\n ? \"border-border text-foreground hover:bg-accent/50\"\n : \"border-green-600/50 text-green-400 hover:bg-green-900/20\"\n }`}\n >\n {toggling\n ? t(\"integrations.toggling\")\n : isEnabled\n ? t(\"integrations.disable\")\n : t(\"integrations.enable\")}\n </button>\n )}\n\n {/* Status for client integrations */}\n {platform.isClient && (\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.clientAvailable\")}\n </div>\n )}\n\n {serverStatus?.error && (\n <p className=\"text-[10px] text-destructive mt-2\">\n {serverStatus.error}\n </p>\n )}\n\n {toggleError && (\n <p className=\"text-[10px] text-destructive mt-2\">{toggleError}</p>\n )}\n </div>\n );\n}\n\n// ─── Add integration picker ──────────────────────────────────────────────────\n\nfunction AddIntegrationPicker({\n connectedIds,\n onSelect,\n}: {\n connectedIds: Set<string>;\n onSelect: (platform: PlatformInfo) => void;\n}) {\n return (\n <div className=\"space-y-1\">\n {PLATFORMS.filter((p) => !connectedIds.has(p.id)).map((platform) => (\n <button\n key={platform.id}\n onClick={() => onSelect(platform)}\n className=\"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start hover:bg-accent/50\"\n >\n <platform.icon size={14} className=\"shrink-0 text-muted-foreground\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-[11px] font-medium text-foreground\">\n {platform.label}\n </div>\n <div className=\"text-[10px] text-muted-foreground truncate\">\n {platform.description}\n </div>\n </div>\n </button>\n ))}\n </div>\n );\n}\n\n// ─── Main panel ──────────────────────────────────────────────────────────────\n\nexport function IntegrationsPanel() {\n const t = useT();\n const { statuses, loading, refetch } = useIntegrationStatus();\n const [selectedPlatform, setSelectedPlatform] = useState<PlatformInfo | null>(\n null,\n );\n const [showPicker, setShowPicker] = useState(false);\n\n const statusMap = new Map(statuses.map((s) => [s.platform, s]));\n\n // Show connected (enabled or configured) integrations\n const connectedPlatforms = PLATFORMS.filter((p) => {\n const s = statusMap.get(p.id);\n return s?.configured || s?.enabled;\n });\n\n const connectedIds = new Set(connectedPlatforms.map((p) => p.id));\n\n if (selectedPlatform) {\n return (\n <IntegrationDetail\n platform={selectedPlatform}\n serverStatus={statusMap.get(selectedPlatform.id)}\n onBack={() => setSelectedPlatform(null)}\n onRefresh={refetch}\n />\n );\n }\n\n if (showPicker) {\n return (\n <div>\n <button\n onClick={() => setShowPicker(false)}\n className=\"flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2\"\n >\n <IconChevronLeft size={12} className=\"rtl:-scale-x-100\" />\n {t(\"integrations.back\")}\n </button>\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1.5\">\n {t(\"integrations.addChatIntegration\")}\n </div>\n <AgentAskPopover\n label={t(\"integrations.addSomething\")}\n title={t(\"integrations.addSomethingTitle\")}\n placeholder={t(\"integrations.addSomethingPlaceholder\")}\n prompt=\"\"\n context=\"The user wants to add a chat or workspace integration that is not in the current directory. Research the provider's official OAuth or MCP setup, explain any app registration or allowlist requirements, and add a reusable integration preset when it is supported. Never ask the user to paste credentials into a prompt.\"\n className=\"mb-2 h-7 w-full justify-center border-dashed px-2 text-[10px]\"\n />\n <AddIntegrationPicker\n connectedIds={connectedIds}\n onSelect={(p) => {\n setSelectedPlatform(p);\n setShowPicker(false);\n }}\n />\n </div>\n );\n }\n\n return (\n <div>\n <div className=\"flex items-center justify-between mb-1.5\">\n <div>\n <div className=\"text-xs font-medium text-foreground\">\n {t(\"integrations.chatIntegrations\")}\n </div>\n <div className=\"text-[10px] text-muted-foreground\">\n {t(\"integrations.chatIntegrationsDescription\")}\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => setShowPicker(true)}\n className=\"flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground\"\n >\n <IconPlus size={12} />\n </button>\n </TooltipTrigger>\n <TooltipContent>{t(\"integrations.addIntegration\")}</TooltipContent>\n </Tooltip>\n <AgentAskPopover\n label={t(\"integrations.addSomething\")}\n title={t(\"integrations.addSomethingTitle\")}\n placeholder={t(\"integrations.addSomethingPlaceholder\")}\n prompt=\"\"\n context=\"The user wants to add a chat or workspace integration that is not in the current directory. Research the provider's official OAuth or MCP setup, explain any app registration or allowlist requirements, and add a reusable integration preset when it is supported. Never ask the user to paste credentials into a prompt.\"\n className=\"h-7 px-2 text-[10px]\"\n />\n </div>\n </div>\n\n {loading ? (\n <div className=\"space-y-1.5\">\n <div className=\"h-6 w-full rounded bg-muted/50 animate-pulse\" />\n <div className=\"h-6 w-3/4 rounded bg-muted/50 animate-pulse\" />\n </div>\n ) : connectedPlatforms.length === 0 ? (\n <div className=\"space-y-2\">\n <button\n onClick={() => setShowPicker(true)}\n className=\"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground hover:bg-accent/30\"\n >\n <IconPlus size={12} className=\"shrink-0\" />\n {t(\"integrations.addIntegration\")}\n </button>\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.dispatchEntrypoint\")}{\" \"}\n <a\n href=\"https://dispatch.agent-native.com\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"no-underline font-medium text-foreground hover:text-foreground/80\"\n >\n dispatch template\n </a>\n .\n </div>\n </div>\n ) : (\n <div className=\"space-y-2\">\n {connectedPlatforms.map((platform) => {\n const s = statusMap.get(platform.id);\n return (\n <button\n key={platform.id}\n onClick={() => setSelectedPlatform(platform)}\n className=\"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start hover:bg-accent/50\"\n >\n <platform.icon\n size={14}\n className=\"shrink-0 text-muted-foreground\"\n />\n <span className=\"flex-1 text-[11px] font-medium text-foreground truncate\">\n {platform.label}\n </span>\n {s && (\n <span\n className={`inline-block h-1.5 w-1.5 rounded-full shrink-0 ${\n s.enabled && s.configured\n ? \"bg-green-500\"\n : s.configured\n ? \"bg-yellow-500\"\n : \"bg-muted-foreground/55\"\n }`}\n />\n )}\n </button>\n );\n })}\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.sharedMessaging\")}\n </div>\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"IntegrationsPanel.js","sourceRoot":"","sources":["../../../src/client/integrations/IntegrationsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhE,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C;oBACJ,CAAC,CAAC,EACF,cAAK,SAAS,EAAC,2FAA2F,YACvG,CAAC,CAAC,8BAA8B,CAAC,GAC9B,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconPlus,\n IconBrandSlack,\n IconBrandTelegram,\n IconBrandWhatsapp,\n IconBrandGoogleDrive,\n IconTerminal2,\n IconBuildingSkyscraper,\n IconCopy,\n IconCheck,\n IconChevronLeft,\n IconExternalLink,\n IconCircleCheck,\n} from \"@tabler/icons-react\";\nimport React, { useState, useCallback, useEffect } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport {\n useIntegrationStatus,\n type IntegrationStatus,\n} from \"./useIntegrationStatus.js\";\n\n// ─── Platform config ─────────────────────────────────────────────────────────\n\ninterface PlatformInfo {\n id: string;\n label: string;\n icon: React.ComponentType<any>;\n description: string;\n envVars: string[];\n setupSteps: string[];\n docsUrl?: string;\n /** If true, this is a \"client\" integration (user connects TO the agent) rather than a webhook */\n isClient?: boolean;\n}\n\nconst PLATFORMS: PlatformInfo[] = [\n {\n id: \"slack\",\n label: \"Slack (legacy)\",\n icon: IconBrandSlack,\n description:\n \"Legacy single-workspace setup. Use Settings → Messaging for new Slack connections.\",\n envVars: [\"SLACK_BOT_TOKEN\", \"SLACK_SIGNING_SECRET\"],\n setupSteps: [\n \"Open Settings → Messaging for the supported managed Slack setup\",\n \"Use this legacy setup only for an existing single-workspace installation\",\n \"Managed OAuth stores workspace bot tokens automatically; do not add SLACK_BOT_TOKEN for new connections\",\n ],\n docsUrl: \"https://api.slack.com/apps\",\n },\n {\n id: \"telegram\",\n label: \"Telegram\",\n icon: IconBrandTelegram,\n description: \"Chat with your agent via a Telegram bot.\",\n envVars: [\"TELEGRAM_BOT_TOKEN\"],\n setupSteps: [\n \"Message @BotFather on Telegram to create a new bot\",\n \"Copy the bot token into your environment\",\n 'Click \"Setup webhook\" below to register automatically',\n ],\n },\n {\n id: \"whatsapp\",\n label: \"WhatsApp\",\n icon: IconBrandWhatsapp,\n description: \"Connect your agent to WhatsApp Business.\",\n envVars: [\"WHATSAPP_TOKEN\", \"WHATSAPP_VERIFY_TOKEN\"],\n setupSteps: [\n \"Create a Meta Business app at developers.facebook.com\",\n \"Set up WhatsApp Business API\",\n \"Configure the webhook URL and verify token\",\n \"Copy the access token into your environment\",\n ],\n docsUrl: \"https://developers.facebook.com/docs/whatsapp\",\n },\n {\n id: \"google-docs\",\n label: \"Google Docs\",\n icon: IconBrandGoogleDrive,\n description: \"Tag the agent in Google Doc comments to get responses.\",\n envVars: [\"GOOGLE_SERVICE_ACCOUNT_KEY\"],\n setupSteps: [\n \"Create a Google Cloud service account and download the JSON key\",\n \"Set GOOGLE_SERVICE_ACCOUNT_KEY in your environment (JSON string or file path)\",\n \"Share your Google Docs with the service account email\",\n 'Write a comment containing \"@Agent\" to trigger the agent',\n ],\n },\n {\n id: \"openclaw\",\n label: \"OpenClaw\",\n icon: IconTerminal2,\n description: \"Access this agent from OpenClaw's unified agent interface.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Install OpenClaw: npm install -g openclaw\",\n \"Add this agent's URL as a provider in your OpenClaw config\",\n \"OpenClaw discovers your agent's capabilities via the A2A protocol\",\n ],\n },\n {\n id: \"claude-code\",\n label: \"Claude Code\",\n icon: IconTerminal2,\n description:\n \"Let Claude Code call this agent via A2A for data and actions.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Your agent exposes an A2A endpoint at /.well-known/agent-card.json\",\n \"In Claude Code, reference your agent's URL when asking for data\",\n \"Claude Code will discover and call your agent's skills automatically\",\n ],\n },\n {\n id: \"builder\",\n label: \"Builder.io\",\n icon: IconBuildingSkyscraper,\n description:\n \"One chat interface that orchestrates all your agents together.\",\n envVars: [],\n isClient: true,\n setupSteps: [\n \"Connect your agent-native apps in your Builder.io workspace\",\n \"Builder.io discovers each agent's skills via A2A\",\n \"Chat with one agent that can trigger actions across all your apps\",\n ],\n docsUrl:\n \"https://www.builder.io?utm_source=agent-native&utm_medium=product&utm_campaign=integrations&utm_content=integrations_panel\",\n },\n];\n\nfunction useAgentEngineConfigured() {\n const [configured, setConfigured] = useState<boolean | undefined>(undefined);\n\n const refresh = useCallback(() => {\n fetch(agentNativePath(\"/_agent-native/agent-engine/status\"))\n .then((r) => (r.ok ? r.json() : null))\n .then((data) => {\n if (typeof data?.configured === \"boolean\") {\n setConfigured(data.configured);\n }\n })\n .catch(() => {});\n }, []);\n\n useEffect(() => {\n refresh();\n window.addEventListener(\"agent-engine:configured-changed\", refresh);\n return () =>\n window.removeEventListener(\"agent-engine:configured-changed\", refresh);\n }, [refresh]);\n\n return configured;\n}\n\n// ─── Integration detail view ─────────────────────────────────────────────────\n\nfunction IntegrationDetail({\n platform,\n serverStatus,\n onBack,\n onRefresh,\n}: {\n platform: PlatformInfo;\n serverStatus?: IntegrationStatus;\n onBack: () => void;\n onRefresh: () => void;\n}) {\n const t = useT();\n const [toggling, setToggling] = useState(false);\n const [copied, setCopied] = useState(false);\n const [toggleError, setToggleError] = useState<string | null>(null);\n const agentEngineConfigured = useAgentEngineConfigured();\n\n const handleToggle = useCallback(async () => {\n setToggling(true);\n setToggleError(null);\n try {\n const action = serverStatus?.enabled ? \"disable\" : \"enable\";\n const res = await fetch(\n agentNativePath(`/_agent-native/integrations/${platform.id}/${action}`),\n { method: \"POST\" },\n );\n if (res.ok) {\n onRefresh();\n return;\n }\n // Surface the real reason instead of silently doing nothing.\n // The endpoint returns `{ error }` for known failures (admin gating,\n // missing secrets, etc.); fall back to status text otherwise.\n const data = (await res.json().catch(() => null)) as {\n error?: string;\n } | null;\n setToggleError(\n data?.error ||\n res.statusText ||\n `Couldn't ${action} ${platform.label} (HTTP ${res.status})`,\n );\n } catch (err) {\n setToggleError(\n err instanceof Error ? err.message : t(\"integrations.networkError\"),\n );\n } finally {\n setToggling(false);\n }\n }, [platform.id, platform.label, serverStatus?.enabled, onRefresh]);\n\n const handleCopy = useCallback(async (text: string) => {\n await navigator.clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }, []);\n\n const handleOpenLlmSettings = useCallback(() => {\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"llm\" },\n }),\n );\n }, []);\n\n const isConfigured = serverStatus?.configured ?? false;\n const isEnabled = serverStatus?.enabled ?? false;\n const showAgentEnginePrereq =\n !platform.isClient && agentEngineConfigured === false;\n const serviceAccountEmail =\n typeof serverStatus?.details?.serviceAccountEmail === \"string\"\n ? serverStatus.details.serviceAccountEmail\n : null;\n\n return (\n <div>\n <button\n onClick={onBack}\n className=\"flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2\"\n >\n <IconChevronLeft size={12} className=\"rtl:-scale-x-100\" />\n {t(\"integrations.back\")}\n </button>\n\n <div className=\"flex items-center gap-2 mb-2\">\n <platform.icon size={18} className=\"text-foreground shrink-0\" />\n <div>\n <div className=\"text-xs font-medium text-foreground\">\n {platform.label}\n </div>\n <div className=\"text-[10px] text-muted-foreground\">\n {platform.description}\n </div>\n </div>\n </div>\n\n {showAgentEnginePrereq && (\n <div className=\"mb-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"text-[10px] font-medium text-foreground\">\n {t(\"integrations.agentEngineRequired\")}\n </div>\n <p className=\"mt-0.5 text-[10px] leading-relaxed text-muted-foreground\">\n {t(\"integrations.agentEngineDescription\", {\n platform: platform.label,\n })}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={handleOpenLlmSettings}\n className=\"shrink-0 rounded border border-border bg-background px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground\"\n >\n {t(\"integrations.openLlm\")}\n </button>\n </div>\n </div>\n )}\n\n {/* Setup steps */}\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1.5\">\n {t(\"integrations.setup\")}\n </div>\n <ol className=\"space-y-1\">\n {platform.setupSteps.map((step, i) => (\n <li\n key={i}\n className=\"flex gap-1.5 text-[10px] text-muted-foreground leading-relaxed\"\n >\n <span className=\"shrink-0 text-muted-foreground/50\">\n {i + 1}.\n </span>\n {step}\n </li>\n ))}\n </ol>\n </div>\n\n {serviceAccountEmail && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.shareDocumentsWith\")}\n </div>\n <div className=\"flex items-center gap-1\">\n <code className=\"flex-1 truncate rounded bg-muted px-1.5 py-0.5 text-[10px] text-foreground\">\n {serviceAccountEmail}\n </code>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => handleCopy(serviceAccountEmail)}\n className=\"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent/50\"\n >\n {copied ? <IconCheck size={12} /> : <IconCopy size={12} />}\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"integrations.copyServiceAccountEmail\")}\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n )}\n\n {/* Required secrets */}\n {platform.envVars.length > 0 && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.requiredSecrets\")}\n </div>\n <div className=\"space-y-0.5\">\n {platform.envVars.map((v) => (\n <div key={v} className=\"flex items-center gap-1\">\n <code className=\"text-[10px] text-foreground bg-muted px-1 py-0.5 rounded\">\n {v}\n </code>\n {isConfigured && (\n <IconCircleCheck\n size={11}\n className=\"text-green-500 shrink-0\"\n />\n )}\n </div>\n ))}\n </div>\n {!isConfigured && (\n <p className=\"text-[10px] text-amber-500 mt-1\">\n {t(\"integrations.envHelp\")}\n </p>\n )}\n </div>\n )}\n\n {/* Webhook URL */}\n {serverStatus?.webhookUrl && !platform.isClient && (\n <div className=\"mb-3\">\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1\">\n {t(\"integrations.webhookUrl\")}\n </div>\n <div className=\"flex items-center gap-1\">\n <code className=\"flex-1 truncate rounded bg-muted px-1.5 py-0.5 text-[10px] text-foreground\">\n {serverStatus.webhookUrl}\n </code>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => handleCopy(serverStatus.webhookUrl!)}\n className=\"shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground hover:bg-accent/50\"\n >\n {copied ? <IconCheck size={12} /> : <IconCopy size={12} />}\n </button>\n </TooltipTrigger>\n <TooltipContent>{t(\"integrations.copy\")}</TooltipContent>\n </Tooltip>\n </div>\n </div>\n )}\n\n {/* Docs link */}\n {platform.docsUrl && (\n <a\n href={platform.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-[10px] text-blue-400 hover:text-blue-300 mb-3\"\n >\n {t(\"integrations.documentation\")}\n <IconExternalLink size={10} />\n </a>\n )}\n\n {/* Enable/disable for server integrations */}\n {serverStatus && !platform.isClient && isConfigured && (\n <button\n onClick={handleToggle}\n disabled={toggling}\n className={`w-full rounded-md border px-2 py-1.5 text-[11px] font-medium disabled:opacity-50 ${\n isEnabled\n ? \"border-border text-foreground hover:bg-accent/50\"\n : \"border-green-600/50 text-green-400 hover:bg-green-900/20\"\n }`}\n >\n {toggling\n ? t(\"integrations.toggling\")\n : isEnabled\n ? t(\"integrations.disable\")\n : t(\"integrations.enable\")}\n </button>\n )}\n\n {/* Status for client integrations */}\n {platform.isClient && (\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.clientAvailable\")}\n </div>\n )}\n\n {serverStatus?.error && (\n <p className=\"text-[10px] text-destructive mt-2\">\n {serverStatus.error}\n </p>\n )}\n\n {toggleError && (\n <p className=\"text-[10px] text-destructive mt-2\">{toggleError}</p>\n )}\n </div>\n );\n}\n\n// ─── Add integration picker ──────────────────────────────────────────────────\n\nfunction AddIntegrationPicker({\n connectedIds,\n onSelect,\n}: {\n connectedIds: Set<string>;\n onSelect: (platform: PlatformInfo) => void;\n}) {\n return (\n <div className=\"space-y-1\">\n {PLATFORMS.filter((p) => !connectedIds.has(p.id)).map((platform) => (\n <button\n key={platform.id}\n onClick={() => onSelect(platform)}\n className=\"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start hover:bg-accent/50\"\n >\n <platform.icon size={14} className=\"shrink-0 text-muted-foreground\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-[11px] font-medium text-foreground\">\n {platform.label}\n </div>\n <div className=\"text-[10px] text-muted-foreground truncate\">\n {platform.description}\n </div>\n </div>\n </button>\n ))}\n </div>\n );\n}\n\n// ─── Main panel ──────────────────────────────────────────────────────────────\n\nexport function IntegrationsPanel() {\n const t = useT();\n const { statuses, loading, refetch } = useIntegrationStatus();\n const [selectedPlatform, setSelectedPlatform] = useState<PlatformInfo | null>(\n null,\n );\n const [showPicker, setShowPicker] = useState(false);\n\n const statusMap = new Map(statuses.map((s) => [s.platform, s]));\n\n // Show connected (enabled or configured) integrations\n const connectedPlatforms = PLATFORMS.filter((p) => {\n const s = statusMap.get(p.id);\n return s?.configured || s?.enabled;\n });\n\n const connectedIds = new Set(connectedPlatforms.map((p) => p.id));\n\n if (selectedPlatform) {\n return (\n <IntegrationDetail\n platform={selectedPlatform}\n serverStatus={statusMap.get(selectedPlatform.id)}\n onBack={() => setSelectedPlatform(null)}\n onRefresh={refetch}\n />\n );\n }\n\n if (showPicker) {\n return (\n <div>\n <button\n onClick={() => setShowPicker(false)}\n className=\"flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground mb-2\"\n >\n <IconChevronLeft size={12} className=\"rtl:-scale-x-100\" />\n {t(\"integrations.back\")}\n </button>\n <div className=\"text-[10px] font-medium text-muted-foreground mb-1.5\">\n {t(\"integrations.addChatIntegration\")}\n </div>\n <AddIntegrationPicker\n connectedIds={connectedIds}\n onSelect={(p) => {\n setSelectedPlatform(p);\n setShowPicker(false);\n }}\n />\n </div>\n );\n }\n\n return (\n <div>\n <div className=\"flex items-center justify-between mb-1.5\">\n <div>\n <div className=\"text-xs font-medium text-foreground\">\n {t(\"integrations.chatIntegrations\")}\n </div>\n <div className=\"text-[10px] text-muted-foreground\">\n {t(\"integrations.chatIntegrationsDescription\")}\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={() => setShowPicker(true)}\n className=\"flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-accent/50 hover:text-foreground\"\n >\n <IconPlus size={12} />\n </button>\n </TooltipTrigger>\n <TooltipContent>{t(\"integrations.addIntegration\")}</TooltipContent>\n </Tooltip>\n </div>\n </div>\n\n {loading ? (\n <div className=\"space-y-1.5\">\n <div className=\"h-6 w-full rounded bg-muted/50 animate-pulse\" />\n <div className=\"h-6 w-3/4 rounded bg-muted/50 animate-pulse\" />\n </div>\n ) : connectedPlatforms.length === 0 ? (\n <div className=\"space-y-2\">\n <button\n onClick={() => setShowPicker(true)}\n className=\"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground hover:bg-accent/30\"\n >\n <IconPlus size={12} className=\"shrink-0\" />\n {t(\"integrations.addIntegration\")}\n </button>\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.dispatchEntrypoint\")}{\" \"}\n <a\n href=\"https://dispatch.agent-native.com\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"no-underline font-medium text-foreground hover:text-foreground/80\"\n >\n dispatch template\n </a>\n .\n </div>\n </div>\n ) : (\n <div className=\"space-y-2\">\n {connectedPlatforms.map((platform) => {\n const s = statusMap.get(platform.id);\n return (\n <button\n key={platform.id}\n onClick={() => setSelectedPlatform(platform)}\n className=\"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start hover:bg-accent/50\"\n >\n <platform.icon\n size={14}\n className=\"shrink-0 text-muted-foreground\"\n />\n <span className=\"flex-1 text-[11px] font-medium text-foreground truncate\">\n {platform.label}\n </span>\n {s && (\n <span\n className={`inline-block h-1.5 w-1.5 rounded-full shrink-0 ${\n s.enabled && s.configured\n ? \"bg-green-500\"\n : s.configured\n ? \"bg-yellow-500\"\n : \"bg-muted-foreground/55\"\n }`}\n />\n )}\n </button>\n );\n })}\n <div className=\"rounded-md border border-border bg-muted/30 px-2.5 py-2 text-[10px] text-muted-foreground\">\n {t(\"integrations.sharedMessaging\")}\n </div>\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"McpIntegrationDialog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAgCD,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,oBAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,yBAAyB,sCAosB3B"}
1
+ {"version":3,"file":"McpIntegrationDialog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAkED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,oBAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,yBAAyB,sCA8qB3B"}
@@ -1,7 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { IconArrowLeft, IconCheck, IconExternalLink, IconLoader2, IconSearch, } from "@tabler/icons-react";
3
3
  import { useEffect, useMemo, useRef, useState } from "react";
4
- import { AgentAskPopover } from "../AgentAskPopover.js";
5
4
  import { agentNativePath } from "../api-path.js";
6
5
  import { openAgentSettings } from "../CommandMenu.js";
7
6
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../components/ui/dialog.js";
@@ -10,6 +9,21 @@ import { useT } from "../i18n.js";
10
9
  import { cn } from "../utils.js";
11
10
  import { buildMcpOAuthStartUrl, createMcpIntegrationFormDefaults, filterMcpIntegrations, getMcpIntegrationApiFallback, getDefaultMcpIntegrations, isCustomMcpIntegrationEnabled, resolveMcpIntegrationScope, } from "./mcp-integration-catalog.js";
12
11
  import { formatMcpServerError, getMcpUrlValidationError, testMcpServerUrl, useMcpServers, } from "./use-mcp-servers.js";
12
+ function IntegrationLogo({ name, logoUrl }) {
13
+ const [loaded, setLoaded] = useState(false);
14
+ const [loadFailed, setLoadFailed] = useState(false);
15
+ useEffect(() => {
16
+ setLoaded(false);
17
+ setLoadFailed(false);
18
+ }, [logoUrl]);
19
+ return (_jsxs("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", children: [_jsx("span", { "aria-hidden": "true", hidden: loaded, children: name.slice(0, 1) }), _jsx("img", { src: logoUrl, alt: "", loading: "lazy", decoding: "async", className: "absolute inset-1 h-6 w-6 object-contain", hidden: loadFailed, onLoad: () => {
20
+ setLoadFailed(false);
21
+ setLoaded(true);
22
+ }, onError: () => {
23
+ setLoadFailed(true);
24
+ setLoaded(false);
25
+ } })] }));
26
+ }
13
27
  function parseHeaderLines(text) {
14
28
  const out = {};
15
29
  for (const line of text.split(/\r?\n/)) {
@@ -261,16 +275,16 @@ export function McpIntegrationDialog({ open, onOpenChange, initialIntegrationId
261
275
  };
262
276
  if (!showCatalog && !customIntegrationEnabled)
263
277
  return null;
264
- return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsx(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))]", children: mode === "catalog" ? (_jsxs(_Fragment, { children: [_jsxs(DialogHeader, { className: "shrink-0 px-7 pb-5 pe-14 pt-6", children: [_jsx(DialogTitle, { children: t("mcpIntegrations.title") }), _jsx(DialogDescription, { children: t("mcpIntegrations.description") })] }), _jsxs("div", { className: "flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row", children: [_jsxs("label", { className: "relative min-w-0 flex-1", children: [_jsx(IconSearch, { className: "pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { value: query, onChange: (event) => setQuery(event.target.value), 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", placeholder: t("mcpIntegrations.searchPlaceholder") })] }), _jsx("button", { type: "button", onClick: () => openForm(null), className: cn("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", !customIntegrationEnabled && "hidden"), children: t("mcpIntegrations.addYourOwn") }), _jsx(AgentAskPopover, { label: t("mcpIntegrations.addSomething"), title: t("mcpIntegrations.addSomethingTitle"), placeholder: t("mcpIntegrations.addSomethingPlaceholder"), prompt: "", 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.", className: "h-9 whitespace-nowrap border-dashed px-3 text-[12px] font-medium" })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto px-7 pb-7", children: [error && (_jsx("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", children: error })), _jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: filteredIntegrations.map((integration) => {
278
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsx(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))]", children: mode === "catalog" ? (_jsxs(_Fragment, { children: [_jsxs(DialogHeader, { className: "shrink-0 px-7 pb-5 pe-14 pt-6", children: [_jsx(DialogTitle, { children: t("mcpIntegrations.title") }), _jsx(DialogDescription, { children: t("mcpIntegrations.description", {
279
+ count: defaultIntegrations.length,
280
+ }) })] }), _jsxs("div", { className: "flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row", children: [_jsxs("label", { className: "relative min-w-0 flex-1", children: [_jsx(IconSearch, { className: "pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { value: query, onChange: (event) => setQuery(event.target.value), 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", placeholder: t("mcpIntegrations.searchPlaceholder") })] }), _jsx("button", { type: "button", onClick: () => openForm(null), className: cn("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", !customIntegrationEnabled && "hidden"), children: t("mcpIntegrations.addYourOwn") })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto px-7 pb-7", children: [error && (_jsx("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", children: error })), _jsx("div", { className: "grid gap-3 sm:grid-cols-2", children: filteredIntegrations.map((integration) => {
265
281
  const apiFallback = getMcpIntegrationApiFallback(integration);
266
282
  const connected = connectedUrls.has(compareUrl(integration.url));
267
283
  const requiresHeaders = integration.authMode === "headers";
268
284
  const setupOnly = integration.connectionMode === "manual" ||
269
285
  integration.availability === "provider-setup" ||
270
286
  integration.availability === "client-restricted";
271
- return (_jsxs("article", { 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", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("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", children: [_jsx("span", { "aria-hidden": "true", children: integration.name.slice(0, 1) }), _jsx("img", { src: integration.logoUrl, alt: "", loading: "lazy", decoding: "async", className: "absolute inset-1 h-6 w-6 object-contain", onError: (event) => {
272
- event.currentTarget.hidden = true;
273
- } })] }), _jsxs("div", { className: "min-w-0", children: [_jsx("h3", { className: "truncate text-[13px] font-semibold text-foreground", children: integration.name }), integration.availability !== "ready" && (_jsx("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", children: integration.availability === "beta"
287
+ return (_jsxs("article", { 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", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(IntegrationLogo, { name: integration.name, logoUrl: integration.logoUrl }), _jsxs("div", { className: "min-w-0", children: [_jsx("h3", { className: "truncate text-[13px] font-semibold text-foreground", children: integration.name }), integration.availability !== "ready" && (_jsx("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", children: integration.availability === "beta"
274
288
  ? t("mcpIntegrations.status.beta")
275
289
  : integration.availability ===
276
290
  "client-restricted"
@@ -279,7 +293,7 @@ export function McpIntegrationDialog({ open, onOpenChange, initialIntegrationId
279
293
  ? t("mcpIntegrations.status.verified")
280
294
  : integration.verification === "restricted"
281
295
  ? t("mcpIntegrations.status.restricted")
282
- : t("mcpIntegrations.status.preflightOnly") })] })] }), _jsx("p", { className: "mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground", children: t(integration.descriptionKey) }), integration.setupNoteKey && (_jsx("p", { className: "mt-2 line-clamp-3 text-[10px] leading-relaxed text-amber-700 dark:text-amber-300", children: t(integration.setupNoteKey) })), _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [connected ? (_jsx("button", { type: "button", disabled: true, 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", children: t("mcpIntegrations.connected") })) : setupOnly ? (_jsxs(_Fragment, { children: [apiFallback && (_jsx("button", { type: "button", onClick: () => openAgentSettings(`secrets:${apiFallback.secretKey}`), 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", children: t("mcpIntegrations.useApiToken") })), _jsxs("a", { href: integration.docsUrl, target: "_blank", rel: "noopener noreferrer", 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", children: [t("mcpIntegrations.viewSetup"), _jsx(IconExternalLink, { className: "h-3.5 w-3.5" })] })] })) : (_jsxs("button", { type: "button", onClick: () => quickConnect(integration), disabled: busy, className: cn("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", busy && "cursor-not-allowed opacity-70"), children: [quickBusyId === integration.id ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : null, integration.authMode === "oauth"
296
+ : t("mcpIntegrations.status.preflightOnly") })] })] }), _jsx("p", { className: "mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground", children: t(integration.descriptionKey) }), _jsxs("div", { className: "mt-3 flex items-center gap-2", children: [connected ? (_jsx("button", { type: "button", disabled: true, 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", children: t("mcpIntegrations.connected") })) : setupOnly ? (_jsxs(_Fragment, { children: [apiFallback && (_jsx("button", { type: "button", onClick: () => openAgentSettings(`secrets:${apiFallback.secretKey}`), 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", children: t("mcpIntegrations.useApiToken") })), _jsxs("a", { href: integration.docsUrl, target: "_blank", rel: "noopener noreferrer", 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", children: [t("mcpIntegrations.viewSetup"), _jsx(IconExternalLink, { className: "h-3.5 w-3.5" })] })] })) : (_jsxs("button", { type: "button", onClick: () => quickConnect(integration), disabled: busy, className: cn("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", busy && "cursor-not-allowed opacity-70"), children: [quickBusyId === integration.id ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : null, integration.authMode === "oauth"
283
297
  ? t("mcpIntegrations.connectWithOAuth")
284
298
  : requiresHeaders
285
299
  ? t("mcpIntegrations.configure")
@@ -299,7 +313,7 @@ export function McpIntegrationDialog({ open, onOpenChange, initialIntegrationId
299
313
  ? selected.authMode === "none"
300
314
  ? t("mcpIntegrations.presetNoAuthDescription")
301
315
  : t("mcpIntegrations.presetAuthDescription")
302
- : t("mcpIntegrations.customDescription") })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-7 py-5", children: _jsxs("div", { className: "space-y-3", children: [renderScopeSelector(), selected?.setupNoteKey && (_jsx("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", children: t(selected.setupNoteKey) })), selected?.authMode === "oauth" && (_jsx("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", children: t("mcpIntegrations.oauthNotice") })), _jsxs("label", { className: "block", children: [_jsx("span", { className: "mb-1 block text-[10px] font-medium text-muted-foreground", children: t("mcpIntegrations.serverName") }), _jsx("input", { ref: inputRef, value: name, onChange: (event) => {
316
+ : t("mcpIntegrations.customDescription") })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-7 py-5", children: _jsxs("div", { className: "space-y-3", children: [renderScopeSelector(), selected?.setupNoteKey && (_jsx("div", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground", children: t(selected.setupNoteKey) })), selected?.authMode === "oauth" && (_jsx("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", children: t("mcpIntegrations.oauthNotice") })), _jsxs("label", { className: "block", children: [_jsx("span", { className: "mb-1 block text-[10px] font-medium text-muted-foreground", children: t("mcpIntegrations.serverName") }), _jsx("input", { ref: inputRef, value: name, onChange: (event) => {
303
317
  setName(event.target.value);
304
318
  clearFeedback();
305
319
  }, 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", placeholder: t("mcpIntegrations.serverNamePlaceholder") })] }), _jsxs("label", { className: "block", children: [_jsx("span", { className: "mb-1 block text-[10px] font-medium text-muted-foreground", children: t("mcpIntegrations.url") }), _jsx("input", { value: url, onChange: (event) => {