@stigmer/react 3.12.0 → 3.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/access/ManageAccessDialog.d.ts.map +1 -1
- package/access/ManageAccessDialog.js +7 -2
- package/access/ManageAccessDialog.js.map +1 -1
- package/activity/format-relative-time.d.ts +11 -9
- package/activity/format-relative-time.d.ts.map +1 -1
- package/activity/format-relative-time.js +11 -9
- package/activity/format-relative-time.js.map +1 -1
- package/agent/steps/CapabilitiesStep.js +5 -2
- package/agent/steps/CapabilitiesStep.js.map +1 -1
- package/agent/steps/IdentityStep.d.ts.map +1 -1
- package/agent/steps/IdentityStep.js +6 -5
- package/agent/steps/IdentityStep.js.map +1 -1
- package/agent-instance/CreateAgentInstanceDialog.d.ts.map +1 -1
- package/agent-instance/CreateAgentInstanceDialog.js +10 -2
- package/agent-instance/CreateAgentInstanceDialog.js.map +1 -1
- package/api-key/ApiKeyCreatedAlert.d.ts.map +1 -1
- package/api-key/ApiKeyCreatedAlert.js +12 -20
- package/api-key/ApiKeyCreatedAlert.js.map +1 -1
- package/api-key/ApiKeyListPanel.d.ts.map +1 -1
- package/api-key/ApiKeyListPanel.js +3 -23
- package/api-key/ApiKeyListPanel.js.map +1 -1
- package/api-key/CreateApiKeyForm.d.ts.map +1 -1
- package/api-key/CreateApiKeyForm.js +6 -10
- package/api-key/CreateApiKeyForm.js.map +1 -1
- package/approval-defaults-context.d.ts +47 -0
- package/approval-defaults-context.d.ts.map +1 -0
- package/approval-defaults-context.js +27 -0
- package/approval-defaults-context.js.map +1 -0
- package/attachment/index.d.ts +2 -0
- package/attachment/index.d.ts.map +1 -1
- package/attachment/index.js +1 -0
- package/attachment/index.js.map +1 -1
- package/attachment/vision-preflight.d.ts +113 -0
- package/attachment/vision-preflight.d.ts.map +1 -0
- package/attachment/vision-preflight.js +143 -0
- package/attachment/vision-preflight.js.map +1 -0
- package/billing/AutoRechargeCard.d.ts.map +1 -1
- package/billing/AutoRechargeCard.js +3 -2
- package/billing/AutoRechargeCard.js.map +1 -1
- package/billing/BillingSection.d.ts.map +1 -1
- package/billing/BillingSection.js +3 -2
- package/billing/BillingSection.js.map +1 -1
- package/channel/ChannelConversationsDialog.d.ts.map +1 -1
- package/channel/ChannelConversationsDialog.js +5 -4
- package/channel/ChannelConversationsDialog.js.map +1 -1
- package/channel/ChannelCredentialsDialog.d.ts.map +1 -1
- package/channel/ChannelCredentialsDialog.js +9 -4
- package/channel/ChannelCredentialsDialog.js.map +1 -1
- package/channel/ChannelTemplatesDialog.d.ts.map +1 -1
- package/channel/ChannelTemplatesDialog.js +5 -4
- package/channel/ChannelTemplatesDialog.js.map +1 -1
- package/channel/ConnectSlackDialog.d.ts.map +1 -1
- package/channel/ConnectSlackDialog.js +9 -4
- package/channel/ConnectSlackDialog.js.map +1 -1
- package/channel/ConnectWhatsAppDialog.d.ts.map +1 -1
- package/channel/ConnectWhatsAppDialog.js +9 -4
- package/channel/ConnectWhatsAppDialog.js.map +1 -1
- package/channel/useChannelSessions.d.ts.map +1 -1
- package/channel/useChannelSessions.js.map +1 -1
- package/channel-app/ChannelAppDetailPanel.d.ts.map +1 -1
- package/channel-app/ChannelAppDetailPanel.js +8 -5
- package/channel-app/ChannelAppDetailPanel.js.map +1 -1
- package/channel-app/CreateChannelAppForm.d.ts.map +1 -1
- package/channel-app/CreateChannelAppForm.js +12 -7
- package/channel-app/CreateChannelAppForm.js.map +1 -1
- package/channel-app/internal.d.ts +0 -1
- package/channel-app/internal.d.ts.map +1 -1
- package/channel-app/internal.js +5 -10
- package/channel-app/internal.js.map +1 -1
- package/composer/ComposerToolbar.js +2 -1
- package/composer/ComposerToolbar.js.map +1 -1
- package/composer/SessionComposer.d.ts +1 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +120 -13
- package/composer/SessionComposer.js.map +1 -1
- package/composer/icons.d.ts +0 -1
- package/composer/icons.d.ts.map +1 -1
- package/composer/icons.js +0 -3
- package/composer/icons.js.map +1 -1
- package/conversation/ConversationComposer.js +1 -1
- package/conversation/ConversationComposer.js.map +1 -1
- package/conversation/ConversationListPane.d.ts.map +1 -1
- package/conversation/ConversationListPane.js +3 -2
- package/conversation/ConversationListPane.js.map +1 -1
- package/cursor-accounts/MemberCoverageTable.js +3 -14
- package/cursor-accounts/MemberCoverageTable.js.map +1 -1
- package/dashboard/DashboardFailedRuns.d.ts.map +1 -1
- package/dashboard/DashboardFailedRuns.js +2 -14
- package/dashboard/DashboardFailedRuns.js.map +1 -1
- package/environment/CreateEnvironmentForm.d.ts.map +1 -1
- package/environment/CreateEnvironmentForm.js +4 -8
- package/environment/CreateEnvironmentForm.js.map +1 -1
- package/environment/EnvVarForm.d.ts.map +1 -1
- package/environment/EnvVarForm.js +2 -4
- package/environment/EnvVarForm.js.map +1 -1
- package/environment/EnvironmentVariableEditor.d.ts.map +1 -1
- package/environment/EnvironmentVariableEditor.js +5 -7
- package/environment/EnvironmentVariableEditor.js.map +1 -1
- package/execution/ArtifactApplyButton.d.ts.map +1 -1
- package/execution/ArtifactApplyButton.js +2 -4
- package/execution/ArtifactApplyButton.js.map +1 -1
- package/execution/ExecutionErrorNotice.d.ts +36 -0
- package/execution/ExecutionErrorNotice.d.ts.map +1 -0
- package/execution/ExecutionErrorNotice.js +39 -0
- package/execution/ExecutionErrorNotice.js.map +1 -0
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +5 -8
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewCard.d.ts.map +1 -1
- package/execution/FileReviewCard.js +1 -6
- package/execution/FileReviewCard.js.map +1 -1
- package/execution/FollowUpInput.d.ts.map +1 -1
- package/execution/FollowUpInput.js +1 -3
- package/execution/FollowUpInput.js.map +1 -1
- package/execution/LivenessStatusLine.d.ts +40 -0
- package/execution/LivenessStatusLine.d.ts.map +1 -0
- package/execution/LivenessStatusLine.js +34 -0
- package/execution/LivenessStatusLine.js.map +1 -0
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +31 -3
- package/execution/MessageEntry.js.map +1 -1
- package/execution/MessageThread.d.ts +25 -0
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +51 -36
- package/execution/MessageThread.js.map +1 -1
- package/execution/SetupProgress.d.ts.map +1 -1
- package/execution/SetupProgress.js +1 -1
- package/execution/SetupProgress.js.map +1 -1
- package/execution/SubAgentSection.d.ts.map +1 -1
- package/execution/SubAgentSection.js +9 -7
- package/execution/SubAgentSection.js.map +1 -1
- package/execution/TerminalSession.d.ts +30 -0
- package/execution/TerminalSession.d.ts.map +1 -1
- package/execution/TerminalSession.js +37 -1
- package/execution/TerminalSession.js.map +1 -1
- package/execution/ToolCallDetail.d.ts +9 -0
- package/execution/ToolCallDetail.d.ts.map +1 -1
- package/execution/ToolCallDetail.js +16 -0
- package/execution/ToolCallDetail.js.map +1 -1
- package/execution/ToolCallItem.d.ts +20 -6
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +102 -29
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/ToolRunGroup.d.ts.map +1 -1
- package/execution/ToolRunGroup.js +11 -11
- package/execution/ToolRunGroup.js.map +1 -1
- package/execution/WriteBackCard.d.ts.map +1 -1
- package/execution/WriteBackCard.js +5 -20
- package/execution/WriteBackCard.js.map +1 -1
- package/execution/index.d.ts +6 -2
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +3 -1
- package/execution/index.js.map +1 -1
- package/execution/tool-categories.d.ts +42 -7
- package/execution/tool-categories.d.ts.map +1 -1
- package/execution/tool-categories.js +38 -4
- package/execution/tool-categories.js.map +1 -1
- package/execution/tool-presenter.d.ts +17 -1
- package/execution/tool-presenter.d.ts.map +1 -1
- package/execution/tool-presenter.js +4 -1
- package/execution/tool-presenter.js.map +1 -1
- package/execution/useArtifactInspection.d.ts.map +1 -1
- package/execution/useArtifactInspection.js +4 -7
- package/execution/useArtifactInspection.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +3 -2
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/iam-policy/GrantAccessForm.d.ts.map +1 -1
- package/iam-policy/GrantAccessForm.js +2 -4
- package/iam-policy/GrantAccessForm.js.map +1 -1
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -1
- package/iam-policy/OrgMembersPanel.js +3 -5
- package/iam-policy/OrgMembersPanel.js.map +1 -1
- package/iam-policy/RoleSelector.d.ts.map +1 -1
- package/iam-policy/RoleSelector.js +7 -1
- package/iam-policy/RoleSelector.js.map +1 -1
- package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -1
- package/identity-provider/CreateIdentityProviderForm.js +6 -9
- package/identity-provider/CreateIdentityProviderForm.js.map +1 -1
- package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -1
- package/identity-provider/IdentityProviderDetailPanel.js +17 -26
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -1
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -1
- package/identity-provider/IdentityProviderListPanel.js +2 -4
- package/identity-provider/IdentityProviderListPanel.js.map +1 -1
- package/identity-provider/IdentityProviderWizard.d.ts.map +1 -1
- package/identity-provider/IdentityProviderWizard.js +8 -7
- package/identity-provider/IdentityProviderWizard.js.map +1 -1
- package/identity-provider/SsoLoginPrompt.js +5 -6
- package/identity-provider/SsoLoginPrompt.js.map +1 -1
- package/index.d.ts +9 -8
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/internal/DecisionButton.d.ts.map +1 -1
- package/internal/DecisionButton.js +1 -6
- package/internal/DecisionButton.js.map +1 -1
- package/internal/SpinnerIcon.d.ts +22 -0
- package/internal/SpinnerIcon.d.ts.map +1 -0
- package/internal/SpinnerIcon.js +23 -0
- package/internal/SpinnerIcon.js.map +1 -0
- package/internal/isUnimplemented.d.ts +17 -0
- package/internal/isUnimplemented.d.ts.map +1 -0
- package/internal/isUnimplemented.js +26 -0
- package/internal/isUnimplemented.js.map +1 -0
- package/internal/select-element-text.d.ts +11 -0
- package/internal/select-element-text.d.ts.map +1 -0
- package/internal/select-element-text.js +19 -0
- package/internal/select-element-text.js.map +1 -0
- package/internal/thread-card/ThreadCardShell.d.ts +27 -10
- package/internal/thread-card/ThreadCardShell.d.ts.map +1 -1
- package/internal/thread-card/ThreadCardShell.js +11 -5
- package/internal/thread-card/ThreadCardShell.js.map +1 -1
- package/internal/thread-card/glyphs.d.ts +11 -2
- package/internal/thread-card/glyphs.d.ts.map +1 -1
- package/internal/thread-card/glyphs.js +9 -3
- package/internal/thread-card/glyphs.js.map +1 -1
- package/internal/thread-card/index.d.ts +1 -1
- package/internal/thread-card/index.d.ts.map +1 -1
- package/internal/thread-card/index.js.map +1 -1
- package/internal/useCopyFeedback.d.ts +28 -0
- package/internal/useCopyFeedback.d.ts.map +1 -0
- package/internal/useCopyFeedback.js +40 -0
- package/internal/useCopyFeedback.js.map +1 -0
- package/invitation/InvitationCreatedAlert.d.ts.map +1 -1
- package/invitation/InvitationCreatedAlert.js +12 -19
- package/invitation/InvitationCreatedAlert.js.map +1 -1
- package/invitation/InvitationManager.d.ts.map +1 -1
- package/invitation/InvitationManager.js +14 -21
- package/invitation/InvitationManager.js.map +1 -1
- package/invitation/InvitationRedemption.d.ts.map +1 -1
- package/invitation/InvitationRedemption.js +2 -4
- package/invitation/InvitationRedemption.js.map +1 -1
- package/library/useExportResource.d.ts.map +1 -1
- package/library/useExportResource.js +16 -27
- package/library/useExportResource.js.map +1 -1
- package/manifest/ApplyManifestDialog.js +1 -1
- package/manifest/EditResourceYamlDialog.js +1 -1
- package/mcp-server/DefinitionDriftNotice.d.ts +42 -0
- package/mcp-server/DefinitionDriftNotice.d.ts.map +1 -0
- package/mcp-server/DefinitionDriftNotice.js +52 -0
- package/mcp-server/DefinitionDriftNotice.js.map +1 -0
- package/mcp-server/McpServerConnectDialog.js +8 -4
- package/mcp-server/McpServerConnectDialog.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +47 -14
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/OAuthAppForm.d.ts.map +1 -1
- package/mcp-server/OAuthAppForm.js +2 -4
- package/mcp-server/OAuthAppForm.js.map +1 -1
- package/mcp-server/internal/definitionDrift.d.ts +39 -0
- package/mcp-server/internal/definitionDrift.d.ts.map +1 -0
- package/mcp-server/internal/definitionDrift.js +122 -0
- package/mcp-server/internal/definitionDrift.js.map +1 -0
- package/mcp-server/internal/mcpServerToInput.d.ts.map +1 -1
- package/mcp-server/internal/mcpServerToInput.js +3 -0
- package/mcp-server/internal/mcpServerToInput.js.map +1 -1
- package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -1
- package/mcp-server/steps/EnvironmentAuthStep.js +8 -4
- package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -1
- package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -1
- package/mcp-server/steps/IdentityTransportStep.js +5 -4
- package/mcp-server/steps/IdentityTransportStep.js.map +1 -1
- package/mcp-server/useMcpServerConnect.d.ts +1 -1
- package/mcp-server/useMcpServerCredentials.d.ts +38 -10
- package/mcp-server/useMcpServerCredentials.d.ts.map +1 -1
- package/mcp-server/useMcpServerCredentials.js +50 -7
- package/mcp-server/useMcpServerCredentials.js.map +1 -1
- package/mcp-server/useMcpServerDefinitionDrift.d.ts +44 -0
- package/mcp-server/useMcpServerDefinitionDrift.d.ts.map +1 -0
- package/mcp-server/useMcpServerDefinitionDrift.js +61 -0
- package/mcp-server/useMcpServerDefinitionDrift.js.map +1 -0
- package/mcp-server/useOrgOAuthApp.d.ts +22 -0
- package/mcp-server/useOrgOAuthApp.d.ts.map +1 -1
- package/mcp-server/useOrgOAuthApp.js +39 -7
- package/mcp-server/useOrgOAuthApp.js.map +1 -1
- package/models/ModelRegistryContext.d.ts +7 -1
- package/models/ModelRegistryContext.d.ts.map +1 -1
- package/models/ModelRegistryContext.js.map +1 -1
- package/models/ModelSelector.js +9 -1
- package/models/ModelSelector.js.map +1 -1
- package/models/index.d.ts +2 -2
- package/models/index.d.ts.map +1 -1
- package/models/index.js +1 -1
- package/models/index.js.map +1 -1
- package/models/registry.d.ts +88 -6
- package/models/registry.d.ts.map +1 -1
- package/models/registry.js +133 -27
- package/models/registry.js.map +1 -1
- package/models/useModelRegistry.d.ts +7 -1
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +3 -2
- package/models/useModelRegistry.js.map +1 -1
- package/oauth-app/CreateOAuthAppForm.d.ts.map +1 -1
- package/oauth-app/CreateOAuthAppForm.js +4 -5
- package/oauth-app/CreateOAuthAppForm.js.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.d.ts.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.js +5 -6
- package/oauth-app/OAuthAppDetailPanel.js.map +1 -1
- package/organization/CreateOrganizationForm.d.ts.map +1 -1
- package/organization/CreateOrganizationForm.js +5 -9
- package/organization/CreateOrganizationForm.js.map +1 -1
- package/organization/OrgProfilePanel.d.ts.map +1 -1
- package/organization/OrgProfilePanel.js +7 -16
- package/organization/OrgProfilePanel.js.map +1 -1
- package/package.json +4 -4
- package/platform-client/CreatePlatformClientForm.d.ts.map +1 -1
- package/platform-client/CreatePlatformClientForm.js +5 -6
- package/platform-client/CreatePlatformClientForm.js.map +1 -1
- package/platform-client/PlatformClientDetailPanel.d.ts.map +1 -1
- package/platform-client/PlatformClientDetailPanel.js +6 -7
- package/platform-client/PlatformClientDetailPanel.js.map +1 -1
- package/platform-client/PlatformClientListPanel.d.ts.map +1 -1
- package/platform-client/PlatformClientListPanel.js +2 -4
- package/platform-client/PlatformClientListPanel.js.map +1 -1
- package/platform-client/PlatformClientSecretAlert.d.ts.map +1 -1
- package/platform-client/PlatformClientSecretAlert.js +18 -25
- package/platform-client/PlatformClientSecretAlert.js.map +1 -1
- package/provider.d.ts +34 -1
- package/provider.d.ts.map +1 -1
- package/provider.js +14 -7
- package/provider.js.map +1 -1
- package/resource-creation/WizardNav.d.ts.map +1 -1
- package/resource-creation/WizardNav.js +2 -4
- package/resource-creation/WizardNav.js.map +1 -1
- package/resource-detail/ConfirmDialog.js +1 -1
- package/resource-detail/useCopyResource.d.ts +4 -3
- package/resource-detail/useCopyResource.d.ts.map +1 -1
- package/resource-detail/useCopyResource.js +10 -19
- package/resource-detail/useCopyResource.js.map +1 -1
- package/schedule/ScheduleDetailView.d.ts.map +1 -1
- package/schedule/ScheduleDetailView.js +2 -4
- package/schedule/ScheduleDetailView.js.map +1 -1
- package/schedule/ScheduleForm.d.ts.map +1 -1
- package/schedule/ScheduleForm.js +6 -7
- package/schedule/ScheduleForm.js.map +1 -1
- package/session/NewSessionViewer.d.ts +52 -2
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +21 -6
- package/session/NewSessionViewer.js.map +1 -1
- package/session/SessionViewer.d.ts +63 -2
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +43 -17
- package/session/SessionViewer.js.map +1 -1
- package/session/audience.d.ts +17 -0
- package/session/audience.d.ts.map +1 -1
- package/session/index.d.ts +2 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js.map +1 -1
- package/session/run-config.d.ts +50 -0
- package/session/run-config.d.ts.map +1 -0
- package/session/run-config.js +15 -0
- package/session/run-config.js.map +1 -0
- package/session/useNewSessionFlow.d.ts +11 -0
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +29 -2
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/useSessionConversation.d.ts +11 -9
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +2 -0
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts +18 -4
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +33 -6
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionPanel.d.ts +37 -2
- package/session/useSessionPanel.d.ts.map +1 -1
- package/session/useSessionPanel.js +44 -10
- package/session/useSessionPanel.js.map +1 -1
- package/settings/ApiKeysSection.d.ts.map +1 -1
- package/settings/ApiKeysSection.js +3 -2
- package/settings/ApiKeysSection.js.map +1 -1
- package/settings/ChannelAppsSection.d.ts.map +1 -1
- package/settings/ChannelAppsSection.js +3 -2
- package/settings/ChannelAppsSection.js.map +1 -1
- package/settings/EnvironmentsSection.js +5 -3
- package/settings/EnvironmentsSection.js.map +1 -1
- package/settings/IdentityProvidersSection.d.ts.map +1 -1
- package/settings/IdentityProvidersSection.js +3 -2
- package/settings/IdentityProvidersSection.js.map +1 -1
- package/settings/InvitationsSection.d.ts.map +1 -1
- package/settings/InvitationsSection.js +3 -1
- package/settings/InvitationsSection.js.map +1 -1
- package/settings/MembersSection.d.ts.map +1 -1
- package/settings/MembersSection.js +3 -1
- package/settings/MembersSection.js.map +1 -1
- package/settings/OAuthAppsSection.d.ts.map +1 -1
- package/settings/OAuthAppsSection.js +3 -2
- package/settings/OAuthAppsSection.js.map +1 -1
- package/settings/OrgProfileSection.d.ts.map +1 -1
- package/settings/OrgProfileSection.js +3 -2
- package/settings/OrgProfileSection.js.map +1 -1
- package/settings/PlatformClientsSection.d.ts.map +1 -1
- package/settings/PlatformClientsSection.js +3 -2
- package/settings/PlatformClientsSection.js.map +1 -1
- package/settings/UsageSection.d.ts.map +1 -1
- package/settings/UsageSection.js +3 -1
- package/settings/UsageSection.js.map +1 -1
- package/sharing/ShareAgentDialog.d.ts.map +1 -1
- package/sharing/ShareAgentDialog.js +18 -7
- package/sharing/ShareAgentDialog.js.map +1 -1
- package/sidebar/chrome.d.ts +3 -4
- package/sidebar/chrome.d.ts.map +1 -1
- package/sidebar/chrome.js +5 -4
- package/sidebar/chrome.js.map +1 -1
- package/skill/SkillDiffDialog.js +1 -1
- package/skill/useSkillVersions.d.ts.map +1 -1
- package/skill/useSkillVersions.js +1 -9
- package/skill/useSkillVersions.js.map +1 -1
- package/src/access/ManageAccessDialog.tsx +10 -4
- package/src/activity/format-relative-time.ts +11 -9
- package/src/agent/steps/CapabilitiesStep.tsx +6 -3
- package/src/agent/steps/IdentityStep.tsx +19 -12
- package/src/agent-instance/CreateAgentInstanceDialog.tsx +17 -8
- package/src/api-key/ApiKeyCreatedAlert.tsx +10 -19
- package/src/api-key/ApiKeyListPanel.tsx +3 -39
- package/src/api-key/CreateApiKeyForm.tsx +12 -26
- package/src/approval-defaults-context.ts +56 -0
- package/src/attachment/__tests__/vision-preflight.test.ts +311 -0
- package/src/attachment/index.ts +12 -0
- package/src/attachment/vision-preflight.ts +236 -0
- package/src/billing/AutoRechargeCard.tsx +5 -4
- package/src/billing/BillingSection.tsx +4 -3
- package/src/channel/ChannelConversationsDialog.tsx +8 -4
- package/src/channel/ChannelCredentialsDialog.tsx +14 -4
- package/src/channel/ChannelTemplatesDialog.tsx +8 -4
- package/src/channel/ConnectSlackDialog.tsx +14 -4
- package/src/channel/ConnectWhatsAppDialog.tsx +14 -4
- package/src/channel/useChannelSessions.ts +3 -0
- package/src/channel-app/ChannelAppDetailPanel.tsx +15 -12
- package/src/channel-app/CreateChannelAppForm.tsx +17 -12
- package/src/channel-app/internal.tsx +5 -25
- package/src/composer/ComposerToolbar.tsx +1 -1
- package/src/composer/SessionComposer.tsx +160 -13
- package/src/composer/__tests__/SessionComposer-modelCoherence.test.tsx +220 -0
- package/src/composer/__tests__/SessionComposer-visionPreflight.test.tsx +222 -0
- package/src/composer/icons.tsx +0 -18
- package/src/conversation/ConversationComposer.tsx +1 -1
- package/src/conversation/ConversationListPane.tsx +4 -3
- package/src/cursor-accounts/MemberCoverageTable.tsx +3 -14
- package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +2 -10
- package/src/dashboard/DashboardFailedRuns.tsx +2 -12
- package/src/environment/CreateEnvironmentForm.tsx +8 -27
- package/src/environment/EnvVarForm.tsx +2 -18
- package/src/environment/EnvironmentVariableEditor.tsx +5 -21
- package/src/execution/ArtifactApplyButton.tsx +2 -17
- package/src/execution/ExecutionErrorNotice.tsx +99 -0
- package/src/execution/FilePathLink.tsx +5 -9
- package/src/execution/FileReviewCard.tsx +1 -20
- package/src/execution/FollowUpInput.tsx +1 -16
- package/src/execution/LivenessStatusLine.tsx +59 -0
- package/src/execution/MessageEntry.tsx +136 -25
- package/src/execution/MessageThread.tsx +84 -83
- package/src/execution/SetupProgress.tsx +5 -1
- package/src/execution/SubAgentSection.tsx +9 -20
- package/src/execution/TerminalSession.tsx +97 -10
- package/src/execution/ToolCallDetail.tsx +19 -0
- package/src/execution/ToolCallItem.tsx +157 -37
- package/src/execution/ToolRunGroup.tsx +30 -32
- package/src/execution/WriteBackCard.tsx +5 -24
- package/src/execution/__tests__/MessageEntry-copy.test.tsx +125 -0
- package/src/execution/__tests__/MessageThread.test.tsx +97 -0
- package/src/execution/__tests__/TerminalSession.test.tsx +71 -1
- package/src/execution/__tests__/ToolCallDetail.test.tsx +33 -1
- package/src/execution/__tests__/ToolCallItem.test.tsx +299 -11
- package/src/execution/__tests__/ToolRunGroup.test.tsx +41 -9
- package/src/execution/__tests__/message-thread-slots.test.tsx +92 -0
- package/src/execution/__tests__/tool-presenter.test.tsx +41 -4
- package/src/execution/index.ts +8 -2
- package/src/execution/tool-categories.ts +72 -8
- package/src/execution/tool-presenter.ts +22 -1
- package/src/execution/useArtifactInspection.ts +4 -8
- package/src/execution/useCreateAgentExecution.ts +3 -2
- package/src/iam-policy/GrantAccessForm.tsx +2 -18
- package/src/iam-policy/OrgMembersPanel.tsx +3 -19
- package/src/iam-policy/RoleSelector.tsx +8 -1
- package/src/identity-provider/CreateIdentityProviderForm.tsx +13 -31
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +24 -49
- package/src/identity-provider/IdentityProviderListPanel.tsx +2 -18
- package/src/identity-provider/IdentityProviderWizard.tsx +15 -32
- package/src/identity-provider/SsoLoginPrompt.tsx +6 -21
- package/src/index.ts +23 -1
- package/src/internal/DecisionButton.tsx +1 -20
- package/src/internal/SpinnerIcon.tsx +42 -0
- package/src/internal/__tests__/ThreadCardShell.test.tsx +43 -7
- package/src/internal/__tests__/useCopyFeedback.test.ts +92 -0
- package/src/internal/isUnimplemented.ts +26 -0
- package/src/internal/select-element-text.ts +17 -0
- package/src/internal/thread-card/ThreadCardShell.tsx +53 -21
- package/src/internal/thread-card/glyphs.tsx +24 -3
- package/src/internal/thread-card/index.ts +1 -0
- package/src/internal/useCopyFeedback.ts +61 -0
- package/src/invitation/InvitationCreatedAlert.tsx +10 -18
- package/src/invitation/InvitationManager.tsx +23 -34
- package/src/invitation/InvitationRedemption.tsx +2 -18
- package/src/library/useExportResource.ts +15 -29
- package/src/manifest/ApplyManifestDialog.tsx +1 -1
- package/src/manifest/EditResourceYamlDialog.tsx +1 -1
- package/src/mcp-server/DefinitionDriftNotice.tsx +120 -0
- package/src/mcp-server/McpServerConnectDialog.tsx +30 -12
- package/src/mcp-server/McpServerDetailView.tsx +58 -26
- package/src/mcp-server/OAuthAppForm.tsx +2 -18
- package/src/mcp-server/__tests__/DefinitionDriftNotice.test.tsx +57 -0
- package/src/mcp-server/__tests__/VendorApprovalBlocked.surfaces.test.tsx +103 -5
- package/src/mcp-server/__tests__/byoaEditionDegradation.test.tsx +323 -0
- package/src/mcp-server/__tests__/definitionDrift.test.ts +245 -0
- package/src/mcp-server/__tests__/mcpServerToInput.test.ts +201 -0
- package/src/mcp-server/__tests__/useMcpServerCredentials.test.tsx +306 -0
- package/src/mcp-server/__tests__/useMcpServerDefinitionDrift.test.tsx +173 -0
- package/src/mcp-server/internal/definitionDrift.ts +158 -0
- package/src/mcp-server/internal/mcpServerToInput.ts +3 -0
- package/src/mcp-server/steps/EnvironmentAuthStep.tsx +19 -19
- package/src/mcp-server/steps/IdentityTransportStep.tsx +24 -23
- package/src/mcp-server/useMcpServerConnect.ts +1 -1
- package/src/mcp-server/useMcpServerCredentials.ts +87 -19
- package/src/mcp-server/useMcpServerDefinitionDrift.ts +95 -0
- package/src/mcp-server/useOrgOAuthApp.ts +54 -8
- package/src/models/ModelRegistryContext.ts +7 -1
- package/src/models/ModelSelector.tsx +37 -0
- package/src/models/__tests__/ModelSelector-visionIndicator.test.tsx +129 -0
- package/src/models/__tests__/resolveDefaultModel.test.ts +115 -0
- package/src/models/__tests__/useModelRegistry.test.tsx +99 -4
- package/src/models/index.ts +2 -2
- package/src/models/registry.ts +196 -29
- package/src/models/useModelRegistry.ts +10 -2
- package/src/oauth-app/CreateOAuthAppForm.tsx +16 -31
- package/src/oauth-app/OAuthAppDetailPanel.tsx +16 -31
- package/src/organization/CreateOrganizationForm.tsx +10 -29
- package/src/organization/OrgProfilePanel.tsx +13 -44
- package/src/platform-client/CreatePlatformClientForm.tsx +9 -29
- package/src/platform-client/PlatformClientDetailPanel.tsx +10 -30
- package/src/platform-client/PlatformClientListPanel.tsx +2 -18
- package/src/platform-client/PlatformClientSecretAlert.tsx +26 -55
- package/src/provider.tsx +76 -33
- package/src/resource-creation/WizardNav.tsx +2 -18
- package/src/resource-detail/ConfirmDialog.tsx +1 -1
- package/src/resource-detail/useCopyResource.ts +17 -23
- package/src/schedule/ScheduleDetailView.tsx +2 -18
- package/src/schedule/ScheduleForm.tsx +19 -34
- package/src/session/NewSessionViewer.tsx +85 -7
- package/src/session/SessionViewer.tsx +120 -17
- package/src/session/__tests__/audienceWiring.test.tsx +76 -0
- package/src/session/__tests__/panelNegotiation.test.tsx +302 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +134 -5
- package/src/session/__tests__/useSessionPageFlow.autoApprove.test.tsx +74 -0
- package/src/session/__tests__/useSessionPageFlow.runConfig.test.tsx +157 -0
- package/src/session/__tests__/useSessionPanel.test.ts +114 -0
- package/src/session/audience.ts +18 -0
- package/src/session/index.ts +2 -1
- package/src/session/run-config.ts +59 -0
- package/src/session/useNewSessionFlow.ts +39 -2
- package/src/session/useSessionConversation.ts +14 -10
- package/src/session/useSessionPageFlow.ts +51 -10
- package/src/session/useSessionPanel.ts +91 -10
- package/src/settings/ApiKeysSection.tsx +4 -3
- package/src/settings/ChannelAppsSection.tsx +4 -3
- package/src/settings/EnvironmentsSection.tsx +8 -5
- package/src/settings/IdentityProvidersSection.tsx +4 -3
- package/src/settings/InvitationsSection.tsx +4 -2
- package/src/settings/MembersSection.tsx +4 -2
- package/src/settings/OAuthAppsSection.tsx +4 -3
- package/src/settings/OrgProfileSection.tsx +4 -3
- package/src/settings/PlatformClientsSection.tsx +4 -3
- package/src/settings/UsageSection.tsx +4 -2
- package/src/sharing/ShareAgentDialog.tsx +28 -10
- package/src/sidebar/__tests__/WorkspaceSidebar.test.tsx +4 -1
- package/src/sidebar/chrome.tsx +6 -6
- package/src/skill/SkillDiffDialog.tsx +1 -1
- package/src/skill/useSkillVersions.ts +1 -11
- package/src/styles.css +43 -0
- package/src/version-history/VersionTimelineEntry.tsx +1 -21
- package/src/workflow/FailedRunsWidget.tsx +2 -9
- package/src/workflow/PendingApprovalsWidget.tsx +2 -9
- package/src/workflow/ViewYamlDialog.tsx +7 -22
- package/src/workflow/WorkflowArchitectDialog.tsx +8 -27
- package/src/workflow/WorkflowArtifactDocument.tsx +5 -9
- package/src/workflow/WorkflowCanvasEditor.tsx +39 -7
- package/src/workflow/WorkflowCanvasInner.tsx +14 -1
- package/src/workflow/WorkflowDiffGraph.tsx +7 -1
- package/src/workflow/WorkflowExecutionGraph.tsx +26 -1
- package/src/workflow/WorkflowExecutionViewer.tsx +115 -24
- package/src/workflow/WorkflowExplainDialog.tsx +8 -24
- package/src/workflow/WorkflowNode.tsx +5 -2
- package/src/workflow/WorkflowOverviewGraph.tsx +9 -1
- package/src/workflow/WorkflowRefinePanel.tsx +2 -18
- package/src/workflow/WorkflowRepairCard.tsx +2 -18
- package/src/workflow/WorkflowRunDialog.tsx +31 -24
- package/src/workflow/WorkflowTaskApprovalSummary.tsx +2 -17
- package/src/workflow/WorkflowVersionBadge.tsx +4 -13
- package/src/workflow/WorkflowVersionTimeline.tsx +1 -25
- package/src/workflow/__tests__/WorkflowExecutionViewer.reconciliation.test.tsx +48 -1
- package/src/workflow/__tests__/WorkflowNode.test.tsx +93 -0
- package/src/workflow/__tests__/WorkflowRunDialog.test.tsx +127 -0
- package/src/workflow/__tests__/graph-history.test.ts +103 -0
- package/src/workflow/__tests__/overview-graph.test.ts +17 -0
- package/src/workflow/__tests__/panelNegotiation.test.tsx +230 -0
- package/src/workflow/__tests__/useCanvasKeyboardShortcuts.undo.test.ts +115 -0
- package/src/workflow/__tests__/useWorkflowCanvas.dirty.test.tsx +178 -0
- package/src/workflow/__tests__/useWorkflowCanvas.drag.test.tsx +224 -0
- package/src/workflow/__tests__/useWorkflowCanvas.undo.test.tsx +133 -0
- package/src/workflow/__tests__/useWorkflowExecutionPanel.test.ts +100 -0
- package/src/workflow/execution-comparison/ExecutionComparisonPicker.tsx +7 -11
- package/src/workflow/execution-history/ExecutionHistoryTable.tsx +1 -25
- package/src/workflow/index.ts +1 -0
- package/src/workflow/instance/CreateWorkflowInstanceDialog.tsx +17 -8
- package/src/workflow/instance/WorkflowInstanceDetailPanel.tsx +2 -1
- package/src/workflow/instance/useDeleteWorkflowInstance.ts +9 -4
- package/src/workflow/layout/registry-dimensions.ts +2 -5
- package/src/workflow/node-shell/NodeShell.tsx +4 -0
- package/src/workflow/picker/BranchAddPopover.tsx +4 -3
- package/src/workflow/task-type-visual-registry.ts +5 -3
- package/src/workflow/templates/WorkflowTemplatePreview.tsx +1 -1
- package/src/workflow/useApprovalBoundary.ts +1 -1
- package/src/workflow/useCanvasKeyboardShortcuts.ts +33 -3
- package/src/workflow/useGraphHistory.ts +22 -41
- package/src/workflow/useWorkflowCanvas.ts +126 -21
- package/src/workflow/useWorkflowExecutionPanel.ts +95 -13
- package/src/workflow/useWorkflowSave.ts +2 -15
- package/src/workflow/workflow-graph-conversions.ts +25 -3
- package/styles.css +1 -1
- package/version-history/VersionTimelineEntry.d.ts.map +1 -1
- package/version-history/VersionTimelineEntry.js +1 -23
- package/version-history/VersionTimelineEntry.js.map +1 -1
- package/workflow/CanvasTransitionEdge.d.ts +1 -1
- package/workflow/FailedRunsWidget.d.ts.map +1 -1
- package/workflow/FailedRunsWidget.js +2 -11
- package/workflow/FailedRunsWidget.js.map +1 -1
- package/workflow/PendingApprovalsWidget.d.ts.map +1 -1
- package/workflow/PendingApprovalsWidget.js +2 -11
- package/workflow/PendingApprovalsWidget.js.map +1 -1
- package/workflow/ViewYamlDialog.d.ts.map +1 -1
- package/workflow/ViewYamlDialog.js +7 -23
- package/workflow/ViewYamlDialog.js.map +1 -1
- package/workflow/WorkflowArchitectDialog.d.ts.map +1 -1
- package/workflow/WorkflowArchitectDialog.js +7 -11
- package/workflow/WorkflowArchitectDialog.js.map +1 -1
- package/workflow/WorkflowArtifactDocument.d.ts.map +1 -1
- package/workflow/WorkflowArtifactDocument.js +5 -8
- package/workflow/WorkflowArtifactDocument.js.map +1 -1
- package/workflow/WorkflowCanvasEditor.d.ts.map +1 -1
- package/workflow/WorkflowCanvasEditor.js +31 -6
- package/workflow/WorkflowCanvasEditor.js.map +1 -1
- package/workflow/WorkflowCanvasInner.d.ts +4 -2
- package/workflow/WorkflowCanvasInner.d.ts.map +1 -1
- package/workflow/WorkflowCanvasInner.js +7 -3
- package/workflow/WorkflowCanvasInner.js.map +1 -1
- package/workflow/WorkflowDiffGraph.js +6 -2
- package/workflow/WorkflowDiffGraph.js.map +1 -1
- package/workflow/WorkflowExecutionGraph.d.ts.map +1 -1
- package/workflow/WorkflowExecutionGraph.js +27 -1
- package/workflow/WorkflowExecutionGraph.js.map +1 -1
- package/workflow/WorkflowExecutionViewer.d.ts +51 -0
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
- package/workflow/WorkflowExecutionViewer.js +49 -18
- package/workflow/WorkflowExecutionViewer.js.map +1 -1
- package/workflow/WorkflowExplainDialog.d.ts.map +1 -1
- package/workflow/WorkflowExplainDialog.js +6 -8
- package/workflow/WorkflowExplainDialog.js.map +1 -1
- package/workflow/WorkflowNode.d.ts.map +1 -1
- package/workflow/WorkflowNode.js +2 -2
- package/workflow/WorkflowNode.js.map +1 -1
- package/workflow/WorkflowOverviewGraph.js +8 -2
- package/workflow/WorkflowOverviewGraph.js.map +1 -1
- package/workflow/WorkflowRefinePanel.d.ts.map +1 -1
- package/workflow/WorkflowRefinePanel.js +2 -4
- package/workflow/WorkflowRefinePanel.js.map +1 -1
- package/workflow/WorkflowRepairCard.d.ts.map +1 -1
- package/workflow/WorkflowRepairCard.js +2 -4
- package/workflow/WorkflowRepairCard.js.map +1 -1
- package/workflow/WorkflowRunDialog.d.ts +11 -1
- package/workflow/WorkflowRunDialog.d.ts.map +1 -1
- package/workflow/WorkflowRunDialog.js +18 -9
- package/workflow/WorkflowRunDialog.js.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.js +2 -4
- package/workflow/WorkflowTaskApprovalSummary.js.map +1 -1
- package/workflow/WorkflowVersionBadge.d.ts.map +1 -1
- package/workflow/WorkflowVersionBadge.js +4 -13
- package/workflow/WorkflowVersionBadge.js.map +1 -1
- package/workflow/WorkflowVersionTimeline.d.ts.map +1 -1
- package/workflow/WorkflowVersionTimeline.js +1 -26
- package/workflow/WorkflowVersionTimeline.js.map +1 -1
- package/workflow/execution-comparison/ExecutionComparisonPicker.d.ts.map +1 -1
- package/workflow/execution-comparison/ExecutionComparisonPicker.js +7 -15
- package/workflow/execution-comparison/ExecutionComparisonPicker.js.map +1 -1
- package/workflow/execution-history/ExecutionHistoryTable.d.ts.map +1 -1
- package/workflow/execution-history/ExecutionHistoryTable.js +1 -24
- package/workflow/execution-history/ExecutionHistoryTable.js.map +1 -1
- package/workflow/index.d.ts +1 -1
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js.map +1 -1
- package/workflow/instance/CreateWorkflowInstanceDialog.d.ts.map +1 -1
- package/workflow/instance/CreateWorkflowInstanceDialog.js +10 -2
- package/workflow/instance/CreateWorkflowInstanceDialog.js.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.d.ts.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.js +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.js.map +1 -1
- package/workflow/instance/useDeleteWorkflowInstance.d.ts +9 -4
- package/workflow/instance/useDeleteWorkflowInstance.d.ts.map +1 -1
- package/workflow/instance/useDeleteWorkflowInstance.js +4 -2
- package/workflow/instance/useDeleteWorkflowInstance.js.map +1 -1
- package/workflow/layout/registry-dimensions.d.ts.map +1 -1
- package/workflow/layout/registry-dimensions.js +2 -5
- package/workflow/layout/registry-dimensions.js.map +1 -1
- package/workflow/node-shell/NodeShell.js +1 -1
- package/workflow/node-shell/NodeShell.js.map +1 -1
- package/workflow/picker/BranchAddPopover.d.ts.map +1 -1
- package/workflow/picker/BranchAddPopover.js +3 -2
- package/workflow/picker/BranchAddPopover.js.map +1 -1
- package/workflow/task-type-visual-registry.d.ts.map +1 -1
- package/workflow/task-type-visual-registry.js +5 -3
- package/workflow/task-type-visual-registry.js.map +1 -1
- package/workflow/templates/WorkflowTemplatePreview.js +1 -1
- package/workflow/useApprovalBoundary.d.ts +1 -1
- package/workflow/useApprovalBoundary.js +1 -1
- package/workflow/useCanvasKeyboardShortcuts.d.ts +15 -4
- package/workflow/useCanvasKeyboardShortcuts.d.ts.map +1 -1
- package/workflow/useCanvasKeyboardShortcuts.js +25 -4
- package/workflow/useCanvasKeyboardShortcuts.js.map +1 -1
- package/workflow/useGraphHistory.d.ts +16 -9
- package/workflow/useGraphHistory.d.ts.map +1 -1
- package/workflow/useGraphHistory.js +19 -33
- package/workflow/useGraphHistory.js.map +1 -1
- package/workflow/useWorkflowCanvas.d.ts +6 -4
- package/workflow/useWorkflowCanvas.d.ts.map +1 -1
- package/workflow/useWorkflowCanvas.js +115 -23
- package/workflow/useWorkflowCanvas.js.map +1 -1
- package/workflow/useWorkflowExecutionPanel.d.ts +38 -2
- package/workflow/useWorkflowExecutionPanel.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionPanel.js +46 -13
- package/workflow/useWorkflowExecutionPanel.js.map +1 -1
- package/workflow/useWorkflowSave.d.ts.map +1 -1
- package/workflow/useWorkflowSave.js +2 -15
- package/workflow/useWorkflowSave.js.map +1 -1
- package/workflow/workflow-graph-conversions.d.ts +19 -1
- package/workflow/workflow-graph-conversions.d.ts.map +1 -1
- package/workflow/workflow-graph-conversions.js +17 -3
- package/workflow/workflow-graph-conversions.js.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useState } from "react";
|
|
3
|
+
import { useCallback, useId, useState } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
/**
|
|
6
6
|
* Wizard step 2: Environment variables and auth configuration.
|
|
@@ -14,14 +14,18 @@ import { cn } from "@stigmer/theme";
|
|
|
14
14
|
* builders, guided tours) can render any configuration state from props.
|
|
15
15
|
*/
|
|
16
16
|
export function EnvironmentAuthStep({ data, updateData, }) {
|
|
17
|
+
const baseId = useId();
|
|
17
18
|
const [envExpanded, setEnvExpanded] = useState(data.env.length > 0);
|
|
18
|
-
return (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "stg:text-lg stg:font-semibold stg:text-foreground", children: "Environment & Auth" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Declare environment variables and configure authentication. Both sections are optional." })] }), _jsx(CollapsibleSection, {
|
|
19
|
+
return (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "stg:text-lg stg:font-semibold stg:text-foreground", children: "Environment & Auth" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Declare environment variables and configure authentication. Both sections are optional." })] }), _jsx(CollapsibleSection, { title: "Environment Variables", subtitle: "Secrets and configuration the server requires at runtime", count: data.env.length, expanded: envExpanded, onToggle: () => setEnvExpanded((v) => !v), children: _jsx(EnvVarEditor, { entries: data.env, onChange: (env) => updateData({ env }) }) }), _jsx(CollapsibleSection, { title: "OAuth Authentication", subtitle: "Configure OAuth for servers that require user authorization", expanded: data.authEnabled, onToggle: () => updateData({ authEnabled: !data.authEnabled }), children: _jsxs("div", { className: "stg:flex stg:flex-col stg:gap-4", children: [_jsxs("div", { className: "stg:grid stg:gap-4 stg:sm:grid-cols-2", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-app-org`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "OAuth App Organization" }), _jsx("input", { id: `${baseId}-app-org`, type: "text", value: data.authOAuthAppOrg, onChange: (e) => updateData({ authOAuthAppOrg: e.target.value }), placeholder: "e.g. stigmer", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-app-slug`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "OAuth App Slug" }), _jsx("input", { id: `${baseId}-app-slug`, type: "text", value: data.authOAuthAppSlug, onChange: (e) => updateData({ authOAuthAppSlug: e.target.value }), placeholder: "e.g. github-oauth", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-target-var`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Target Environment Variable" }), _jsx("input", { id: `${baseId}-target-var`, type: "text", value: data.authTargetEnvVar, onChange: (e) => updateData({ authTargetEnvVar: e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g, "") }), placeholder: "e.g. GITHUB_TOKEN", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") }), _jsx("p", { className: "stg:text-xs stg:text-muted-foreground", children: "The env var that receives the OAuth access token." })] }), _jsxs("div", { className: "stg:grid stg:gap-4 stg:sm:grid-cols-2", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-lifetime`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Token Lifetime Hint" }), _jsx("input", { id: `${baseId}-lifetime`, type: "text", value: data.authTokenLifetimeHint, onChange: (e) => updateData({ authTokenLifetimeHint: e.target.value }), placeholder: "e.g. 1h, 8h, never", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-scopes`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Scope Hints" }), _jsx("input", { id: `${baseId}-scopes`, type: "text", value: data.authScopeHints, onChange: (e) => updateData({ authScopeHints: e.target.value }), placeholder: "e.g. repo, read:org", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") }), _jsx("p", { className: "stg:text-xs stg:text-muted-foreground", children: "Comma-separated OAuth scopes." })] })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-discovery`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Discovery URL" }), _jsx("input", { id: `${baseId}-discovery`, type: "url", value: data.authDiscoveryUrl, onChange: (e) => updateData({ authDiscoveryUrl: e.target.value }), placeholder: "https://provider.com/.well-known/openid-configuration", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] })] }) })] }));
|
|
19
20
|
}
|
|
20
21
|
// ---------------------------------------------------------------------------
|
|
21
22
|
// CollapsibleSection
|
|
22
23
|
// ---------------------------------------------------------------------------
|
|
23
|
-
function CollapsibleSection({
|
|
24
|
-
|
|
24
|
+
function CollapsibleSection({ title, subtitle, count, expanded, onToggle, children, }) {
|
|
25
|
+
// The disclosure-panel DOM id is minted per mount — deriving it from a
|
|
26
|
+
// static section key would collide when two wizards mount on one page.
|
|
27
|
+
const panelId = useId();
|
|
28
|
+
return (_jsxs("div", { className: "stg:overflow-hidden stg:rounded-lg stg:border stg:border-border", children: [_jsxs("button", { type: "button", onClick: onToggle, "aria-expanded": expanded, "aria-controls": panelId, className: cn("stg:flex stg:w-full stg:items-center stg:justify-between stg:px-4 stg:py-3 stg:text-left stg:transition-colors", "stg:hover:bg-accent-hover", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"), children: [_jsxs("div", { children: [_jsx("span", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: title }), count != null && count > 0 && (_jsx("span", { className: "stg:ml-2 stg:inline-flex stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-primary-foreground", children: count })), _jsx("p", { className: "stg:mt-0.5 stg:text-xs stg:text-muted-foreground", children: subtitle })] }), _jsx(ChevronIcon, { className: cn("stg:size-4 stg:shrink-0 stg:text-muted-foreground stg:transition-transform", expanded && "stg:rotate-180") })] }), expanded && (_jsx("div", { id: panelId, className: "stg:border-t stg:border-border stg:px-4 stg:py-4", children: children }))] }));
|
|
25
29
|
}
|
|
26
30
|
// ---------------------------------------------------------------------------
|
|
27
31
|
// EnvVarEditor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentAuthStep.js","sourceRoot":"","sources":["../../../src/mcp-server/steps/EnvironmentAuthStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EnvironmentAuthStep.js","sourceRoot":"","sources":["../../../src/mcp-server/steps/EnvironmentAuthStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AASpC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,IAAI,EACJ,UAAU,GACe;IACzB,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IACvB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEpE,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,0BACE,aAAI,SAAS,EAAC,mDAAmD,mCAE5D,EACL,YAAG,SAAS,EAAC,gDAAgD,wGAGzD,IACA,EAGN,KAAC,kBAAkB,IACjB,KAAK,EAAC,uBAAuB,EAC7B,QAAQ,EAAC,0DAA0D,EACnE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,MA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CACP,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E,SAAS,WAAW,CAAC,EAAE,SAAS,EAAmC;IACjE,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,YAElB,eAAM,CAAC,EAAC,cAAc,GAAG,GACrB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAmC;IAC9D,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,iBACT,MAAM,YAElB,eAAM,CAAC,EAAC,gBAAgB,GAAG,GACvB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAmC;IAChE,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,YAElB,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityTransportStep.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/steps/IdentityTransportStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,YAAY,CAAC;AAErE,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,UAAU,EACV,eAAe,GAChB,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"IdentityTransportStep.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/steps/IdentityTransportStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,YAAY,CAAC;AAErE,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,UAAU,EACV,eAAe,GAChB,EAAE,0BAA0B,2CAyV5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback } from "react";
|
|
3
|
+
import { useCallback, useId } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
import { generateSlug } from "../../internal/slug.js";
|
|
6
6
|
const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
@@ -21,6 +21,7 @@ const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
|
21
21
|
* `validationError` — deterministically from props.
|
|
22
22
|
*/
|
|
23
23
|
export function IdentityTransportStep({ data, updateData, validationError, }) {
|
|
24
|
+
const baseId = useId();
|
|
24
25
|
const handleNameChange = useCallback((value) => {
|
|
25
26
|
if (!data.slugTouched) {
|
|
26
27
|
updateData({ name: value, slug: generateSlug(value) });
|
|
@@ -35,13 +36,13 @@ export function IdentityTransportStep({ data, updateData, validationError, }) {
|
|
|
35
36
|
const slugError = data.slug.length > 0 && !SLUG_PATTERN.test(data.slug)
|
|
36
37
|
? "Slug must be lowercase letters, numbers, and hyphens only"
|
|
37
38
|
: null;
|
|
38
|
-
return (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "stg:text-lg stg:font-semibold stg:text-foreground", children: "Identity & Transport" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Define the MCP server and how to connect to it." })] }), validationError && (_jsx("p", { className: "stg:text-sm stg:text-destructive", role: "alert", children: validationError })), _jsxs("div", { className: "stg:grid stg:gap-4 stg:sm:grid-cols-2", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsxs("label", { htmlFor:
|
|
39
|
+
return (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "stg:text-lg stg:font-semibold stg:text-foreground", children: "Identity & Transport" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Define the MCP server and how to connect to it." })] }), validationError && (_jsx("p", { className: "stg:text-sm stg:text-destructive", role: "alert", children: validationError })), _jsxs("div", { className: "stg:grid stg:gap-4 stg:sm:grid-cols-2", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsxs("label", { htmlFor: `${baseId}-name`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["Name ", _jsx("span", { className: "stg:text-destructive", children: "*" })] }), _jsx("input", { id: `${baseId}-name`, type: "text", value: data.name, onChange: (e) => handleNameChange(e.target.value), placeholder: "e.g. GitHub", autoFocus: true, className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-slug`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Slug" }), _jsx("input", { id: `${baseId}-slug`, type: "text", value: data.slug, onChange: (e) => handleSlugChange(e.target.value), placeholder: "auto-generated", className: cn("stg:w-full stg:rounded-md stg:border stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", slugError
|
|
39
40
|
? "stg:border-destructive stg:bg-input-bg"
|
|
40
|
-
: "stg:border-input stg:bg-input-bg", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") }), slugError && (_jsx("p", { className: "stg:text-xs stg:text-destructive", children: slugError })), !slugError && data.slug && (_jsxs("p", { className: "stg:text-xs stg:text-muted-foreground", children: ["Referenced as ", _jsx("code", { className: "stg:font-mono", children: data.slug })] }))] })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor:
|
|
41
|
+
: "stg:border-input stg:bg-input-bg", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") }), slugError && (_jsx("p", { className: "stg:text-xs stg:text-destructive", children: slugError })), !slugError && data.slug && (_jsxs("p", { className: "stg:text-xs stg:text-muted-foreground", children: ["Referenced as ", _jsx("code", { className: "stg:font-mono", children: data.slug })] }))] })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-description`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Description" }), _jsx("input", { id: `${baseId}-description`, type: "text", value: data.description, onChange: (e) => updateData({ description: e.target.value }), placeholder: "A brief description of this MCP server", maxLength: 200, className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:grid stg:gap-4 stg:sm:grid-cols-2", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-icon`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Icon URL" }), _jsx("input", { id: `${baseId}-icon`, type: "url", value: data.iconUrl, onChange: (e) => updateData({ iconUrl: e.target.value }), placeholder: "https://example.com/icon.png", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("fieldset", { className: "stg:space-y-1.5", children: [_jsx("legend", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Visibility" }), _jsxs("div", { className: "stg:flex stg:gap-2", children: [_jsx(RadioOption, { name: `${baseId}-visibility`, value: "private", label: "Private", checked: data.visibility === "private", onChange: () => updateData({ visibility: "private" }) }), _jsx(RadioOption, { name: `${baseId}-visibility`, value: "public", label: "Public", checked: data.visibility === "public", onChange: () => updateData({ visibility: "public" }) })] })] })] }), _jsxs("fieldset", { className: "stg:space-y-3", "data-scroll-target": "mcp-transport", children: [_jsxs("legend", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["Transport ", _jsx("span", { className: "stg:text-destructive", children: "*" })] }), _jsxs("div", { className: "stg:flex stg:gap-2", children: [_jsx(RadioOption, { name: `${baseId}-transport`, value: "http", label: "HTTP (Streamable HTTP / SSE)", checked: data.transportType === "http", onChange: () => updateData({ transportType: "http" }) }), _jsx(RadioOption, { name: `${baseId}-transport`, value: "stdio", label: "Stdio (local process)", checked: data.transportType === "stdio", onChange: () => updateData({ transportType: "stdio" }) })] }), data.transportType === "stdio" && (_jsx("p", { className: "stg:text-xs stg:text-muted-foreground", children: "Stdio servers run only on local runners (desktop app or CLI). Sessions on Stigmer-managed cloud compute require a remote (HTTP) server." })), data.transportType === "http" && (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-4 stg:rounded-lg stg:border stg:border-border stg:p-4", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsxs("label", { htmlFor: `${baseId}-http-url`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["URL ", _jsx("span", { className: "stg:text-destructive", children: "*" })] }), _jsx("input", { id: `${baseId}-http-url`, type: "url", value: data.httpUrl, onChange: (e) => updateData({ httpUrl: e.target.value }), placeholder: "https://mcp.example.com/sse", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Headers" }), _jsxs("p", { className: "stg:text-xs stg:text-muted-foreground", children: ["Custom HTTP headers sent with every request. Values may use", " ", _jsx("code", { className: "stg:font-mono stg:text-[11px]", children: "${VAR}" }), " ", "placeholders."] }), _jsx(KeyValueEditor, { entries: data.httpHeaders, onChange: (httpHeaders) => updateData({ httpHeaders }), keyPlaceholder: "Header-Name", valuePlaceholder: "value" })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-http-timeout`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Timeout (seconds)" }), _jsx("input", { id: `${baseId}-http-timeout`, type: "number", min: 0, step: 1, value: data.httpTimeoutSeconds || "", onChange: (e) => updateData({
|
|
41
42
|
httpTimeoutSeconds: e.target.value
|
|
42
43
|
? parseInt(e.target.value, 10)
|
|
43
44
|
: 0,
|
|
44
|
-
}), placeholder: "Default", className: cn("stg:w-32 stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] })] })), data.transportType === "stdio" && (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-4 stg:rounded-lg stg:border stg:border-border stg:p-4", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsxs("label", { htmlFor:
|
|
45
|
+
}), placeholder: "Default", className: cn("stg:w-32 stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] })] })), data.transportType === "stdio" && (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-4 stg:rounded-lg stg:border stg:border-border stg:p-4", children: [_jsxs("div", { className: "stg:space-y-1.5", children: [_jsxs("label", { htmlFor: `${baseId}-stdio-command`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["Command ", _jsx("span", { className: "stg:text-destructive", children: "*" })] }), _jsx("input", { id: `${baseId}-stdio-command`, type: "text", value: data.stdioCommand, onChange: (e) => updateData({ stdioCommand: e.target.value }), placeholder: "e.g. npx, python, node", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-stdio-args`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Arguments" }), _jsx("input", { id: `${baseId}-stdio-args`, type: "text", value: data.stdioArgs, onChange: (e) => updateData({ stdioArgs: e.target.value }), placeholder: "e.g. -y @modelcontextprotocol/server-github", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") }), _jsx("p", { className: "stg:text-xs stg:text-muted-foreground", children: "Space-separated arguments passed to the command." })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-stdio-workdir`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Working Directory" }), _jsx("input", { id: `${baseId}-stdio-workdir`, type: "text", value: data.stdioWorkingDir, onChange: (e) => updateData({ stdioWorkingDir: e.target.value }), placeholder: "/path/to/working/directory", className: cn("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground", "stg:placeholder:text-muted-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring") })] })] }))] })] }));
|
|
45
46
|
}
|
|
46
47
|
// ---------------------------------------------------------------------------
|
|
47
48
|
// Radio option (reusable within this step)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityTransportStep.js","sourceRoot":"","sources":["../../../src/mcp-server/steps/IdentityTransportStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IdentityTransportStep.js","sourceRoot":"","sources":["../../../src/mcp-server/steps/IdentityTransportStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAUtD,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG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EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,gBACrB,iBAAiB,KAAK,CAAC,GAAG,IAAI,KAAK,GAAG,CAAC,EAAE,EACrD,SAAS,EAAE,EAAE,CACX,qEAAqE,EACrE,sDAAsD,EACtD,qFAAqF,CACtF,YAED,KAAC,UAAU,IAAC,SAAS,EAAC,cAAc,GAAG,GAChC,KApCD,KAAK,CAqCT,CACP,CAAC,EAEF,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,EAAE,CACX,qNAAqN,EACrN,6EAA6E,EAC7E,qFAAqF,CACtF,aAED,KAAC,QAAQ,IAAC,SAAS,EAAC,YAAY,GAAG,kBAE5B,IACL,CACP,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAmC;IAC9D,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,iBACT,MAAM,YAElB,eAAM,CAAC,EAAC,gBAAgB,GAAG,GACvB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAmC;IAChE,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,YAElB,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@ export interface UseMcpServerConnectReturn {
|
|
|
7
7
|
* and classify tool approval policies via a lightweight LLM call.
|
|
8
8
|
*
|
|
9
9
|
* Calls the `connect` RPC which starts a Temporal workflow on the
|
|
10
|
-
*
|
|
10
|
+
* runner. The RPC blocks until the workflow completes
|
|
11
11
|
* (typically 5-15 seconds, ~30s timeout).
|
|
12
12
|
*
|
|
13
13
|
* Platform system env vars (`STIGMER_SERVER_ADDRESS`,
|
|
@@ -83,9 +83,15 @@ export interface UseMcpServerCredentialsReturn {
|
|
|
83
83
|
* Servers whose env vars are all optional are always ready.
|
|
84
84
|
*/
|
|
85
85
|
readonly isReady: boolean;
|
|
86
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* `true` while the personal environment, grant status, or org-override
|
|
88
|
+
* lookup is being fetched.
|
|
89
|
+
*/
|
|
87
90
|
readonly isLoading: boolean;
|
|
88
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Error from the personal environment, grant status, or org-override
|
|
93
|
+
* fetch, or `null`.
|
|
94
|
+
*/
|
|
89
95
|
readonly error: Error | null;
|
|
90
96
|
/**
|
|
91
97
|
* Save the provided credentials to the user's personal environment.
|
|
@@ -119,22 +125,35 @@ export interface UseMcpServerCredentialsReturn {
|
|
|
119
125
|
*/
|
|
120
126
|
readonly isVendorApprovalBlocked: boolean;
|
|
121
127
|
/**
|
|
122
|
-
* Where the effective OAuth app
|
|
128
|
+
* Where the effective OAuth app is resolved from for the caller's org
|
|
129
|
+
* — the same source the connect flow will use.
|
|
123
130
|
*
|
|
124
|
-
*
|
|
125
|
-
* `
|
|
126
|
-
*
|
|
131
|
+
* Resolved client-side from the `getOrgOAuthApp` RPC keyed on this
|
|
132
|
+
* hook's `org` parameter. It cannot come from the fetched McpServer:
|
|
133
|
+
* the caller's active org is client-side context the read RPCs never
|
|
134
|
+
* carry, so `status.oauth_status` fields 3-4 are never populated by
|
|
135
|
+
* any backend (see the OAuthStatus proto).
|
|
136
|
+
*
|
|
137
|
+
* `UNSPECIFIED` when `authMode` is `"manual"` or while the override
|
|
138
|
+
* lookup has not yet resolved.
|
|
127
139
|
*/
|
|
128
140
|
readonly effectiveOAuthSource: OAuthAppSource;
|
|
129
141
|
/**
|
|
130
|
-
* `true` when an org-level BYOA override is active for this server
|
|
131
|
-
* Derived from `
|
|
142
|
+
* `true` when an org-level BYOA override is active for this server
|
|
143
|
+
* and org. Derived from the `getOrgOAuthApp` lookup.
|
|
132
144
|
*/
|
|
133
145
|
readonly isOrgOAuthApp: boolean;
|
|
134
146
|
/**
|
|
135
147
|
* `true` when the BYOA option is relevant for this server: the server
|
|
136
|
-
* uses vendor OAuth (`authMode === "oauth"` with an `oauth_app_ref`)
|
|
137
|
-
*
|
|
148
|
+
* uses vendor OAuth (`authMode === "oauth"` with an `oauth_app_ref`),
|
|
149
|
+
* no org override is currently active, AND the backend supports the
|
|
150
|
+
* org-override surface at all.
|
|
151
|
+
*
|
|
152
|
+
* The last condition is an edition capability, confirmed by probing
|
|
153
|
+
* `getOrgOAuthApp` (see {@link useOrgOAuthApp}): the surface is
|
|
154
|
+
* hosted-only, so on OSS deployments — where the submit could only
|
|
155
|
+
* answer UNIMPLEMENTED — this stays `false` and no BYOA affordance
|
|
156
|
+
* renders (stigmer/stigmer#558).
|
|
138
157
|
*
|
|
139
158
|
* When `true`, the UI should offer "Use your own OAuth app" as either
|
|
140
159
|
* a primary action (when vendor approval is blocked) or a secondary
|
|
@@ -188,6 +207,15 @@ export interface UseMcpServerCredentialsReturn {
|
|
|
188
207
|
* form. Additional non-OAuth vars still appear in `missingVariables`
|
|
189
208
|
* (mixed mode).
|
|
190
209
|
*
|
|
210
|
+
* **Org-override-aware**: for vendor-OAuth servers with an
|
|
211
|
+
* `oauth_app_ref`, the hook also composes {@link useOrgOAuthApp} to
|
|
212
|
+
* resolve which OAuth app the connect flow will use for `org`
|
|
213
|
+
* (`effectiveOAuthSource` / `isOrgOAuthApp` / `canBringOwnApp`).
|
|
214
|
+
* The `org` parameter must therefore be the caller's ACTIVE org — the
|
|
215
|
+
* org credentials are stored in and the org whose BYOA override
|
|
216
|
+
* applies — not necessarily the org that owns the MCP server (they
|
|
217
|
+
* differ when browsing another org's public server).
|
|
218
|
+
*
|
|
191
219
|
* Unlike {@link useMcpServerSetup} which manages multi-server setup
|
|
192
220
|
* for session creation, this hook is scoped to a single server and
|
|
193
221
|
* always persists to the personal environment (no one-time option).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMcpServerCredentials.d.ts","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAC;AAK3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"useMcpServerCredentials.d.ts","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAC;AAK3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAIvE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD,uDAAuD;AACvD,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAA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AoB,EAAE,OAAO,CAAC;IACvC;;;;;;;;;OASG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,SAAS,EAAE,SAAS,GAAG,IAAI,GAC1B,6BAA6B,CAuJ/B"}
|
|
@@ -6,6 +6,7 @@ import { usePersonalEnvironment } from "../environment/usePersonalEnvironment.js
|
|
|
6
6
|
import { diffEnv } from "../environment/diffEnv.js";
|
|
7
7
|
import { SYSTEM_ENV_VAR_KEYS } from "../environment/systemEnvVars.js";
|
|
8
8
|
import { useOAuthGrantStatus } from "./useOAuthGrantStatus.js";
|
|
9
|
+
import { useOrgOAuthApp } from "./useOrgOAuthApp.js";
|
|
9
10
|
/**
|
|
10
11
|
* Checks the user's personal environment against an MCP server's
|
|
11
12
|
* `env` declarations and provides a mechanism to save missing credentials.
|
|
@@ -24,6 +25,15 @@ import { useOAuthGrantStatus } from "./useOAuthGrantStatus.js";
|
|
|
24
25
|
* form. Additional non-OAuth vars still appear in `missingVariables`
|
|
25
26
|
* (mixed mode).
|
|
26
27
|
*
|
|
28
|
+
* **Org-override-aware**: for vendor-OAuth servers with an
|
|
29
|
+
* `oauth_app_ref`, the hook also composes {@link useOrgOAuthApp} to
|
|
30
|
+
* resolve which OAuth app the connect flow will use for `org`
|
|
31
|
+
* (`effectiveOAuthSource` / `isOrgOAuthApp` / `canBringOwnApp`).
|
|
32
|
+
* The `org` parameter must therefore be the caller's ACTIVE org — the
|
|
33
|
+
* org credentials are stored in and the org whose BYOA override
|
|
34
|
+
* applies — not necessarily the org that owns the MCP server (they
|
|
35
|
+
* differ when browsing another org's public server).
|
|
36
|
+
*
|
|
27
37
|
* Unlike {@link useMcpServerSetup} which manages multi-server setup
|
|
28
38
|
* for session creation, this hook is scoped to a single server and
|
|
29
39
|
* always persists to the personal environment (no one-time option).
|
|
@@ -95,11 +105,43 @@ export function useMcpServerCredentials(org, mcpServer) {
|
|
|
95
105
|
(oauthStatus?.vendorApprovalStatus === VendorApprovalStatus.PENDING ||
|
|
96
106
|
oauthStatus?.vendorApprovalStatus === VendorApprovalStatus.REJECTED);
|
|
97
107
|
const vendorApprovalDocsUrl = oauthStatus?.vendorApprovalDocsUrl || null;
|
|
98
|
-
const effectiveOAuthSource = oauthStatus?.effectiveOauthSource ??
|
|
99
|
-
OAuthAppSource.OAUTH_APP_SOURCE_UNSPECIFIED;
|
|
100
|
-
const isOrgOAuthApp = effectiveOAuthSource === OAuthAppSource.OAUTH_APP_SOURCE_ORG_OVERRIDE;
|
|
101
108
|
const hasOAuthAppRef = Boolean(auth?.oauthAppRef?.slug);
|
|
102
|
-
|
|
109
|
+
// Org-override lookup, two duties in one fetch (shared cross-mount via
|
|
110
|
+
// the hook's fetch cache):
|
|
111
|
+
// 1. Capability probe (`isSupported`) — the org-override surface is
|
|
112
|
+
// hosted-only, so BYOA affordances must hide on OSS (#558).
|
|
113
|
+
// 2. The override signal (`hasOverride`) — which OAuthApp the connect
|
|
114
|
+
// flow will actually use for this org. Resolved client-side because
|
|
115
|
+
// the caller's active org is client-side context the read RPCs never
|
|
116
|
+
// carry (get has no org; getByReference's org is the server's OWNING
|
|
117
|
+
// org, which differs from the caller's org when browsing another
|
|
118
|
+
// org's public server), so the fetched McpServer cannot answer this
|
|
119
|
+
// (stigmer-cloud#401).
|
|
120
|
+
// Scoped to vendor-OAuth servers with a platform app ref — the only
|
|
121
|
+
// shape an override can exist for — so manual/DCR servers pay no RPC.
|
|
122
|
+
const orgOverride = useOrgOAuthApp(authMode === "oauth" && hasOAuthAppRef
|
|
123
|
+
? (mcpServer?.metadata?.id ?? null)
|
|
124
|
+
: null, org);
|
|
125
|
+
const isOrgOAuthApp = orgOverride.hasOverride;
|
|
126
|
+
// While the lookup is in flight, failed, or unposable (an app ref exists
|
|
127
|
+
// but no org to resolve an override for), the override state is unknown —
|
|
128
|
+
// report UNSPECIFIED rather than guessing PLATFORM, matching the
|
|
129
|
+
// documented "not yet resolved" contract. UNSUPPORTED is not unknown:
|
|
130
|
+
// on OSS the platform-ref app is truthfully the effective source.
|
|
131
|
+
const overrideUnknown = orgOverride.isLoading ||
|
|
132
|
+
orgOverride.error !== null ||
|
|
133
|
+
(hasOAuthAppRef && !org);
|
|
134
|
+
const effectiveOAuthSource = authMode !== "oauth" || overrideUnknown
|
|
135
|
+
? OAuthAppSource.OAUTH_APP_SOURCE_UNSPECIFIED
|
|
136
|
+
: isOrgOAuthApp
|
|
137
|
+
? OAuthAppSource.OAUTH_APP_SOURCE_ORG_OVERRIDE
|
|
138
|
+
: hasOAuthAppRef
|
|
139
|
+
? OAuthAppSource.OAUTH_APP_SOURCE_PLATFORM
|
|
140
|
+
: OAuthAppSource.OAUTH_APP_SOURCE_NONE;
|
|
141
|
+
const canBringOwnApp = authMode === "oauth" &&
|
|
142
|
+
hasOAuthAppRef &&
|
|
143
|
+
!isOrgOAuthApp &&
|
|
144
|
+
orgOverride.isSupported;
|
|
103
145
|
const grantStatus = useOAuthGrantStatus(authMode === "oauth" ? (mcpServer?.metadata?.id ?? null) : null, authMode === "oauth" ? org : null);
|
|
104
146
|
const isOAuthConnected = authMode === "oauth" && grantStatus.connected;
|
|
105
147
|
const existingKeys = useMemo(() => new Set(Object.keys(personalEnv.environment?.spec?.data ?? {})), [personalEnv.environment]);
|
|
@@ -128,7 +170,8 @@ export function useMcpServerCredentials(org, mcpServer) {
|
|
|
128
170
|
const refetch = useCallback(() => {
|
|
129
171
|
personalEnv.refetch();
|
|
130
172
|
grantStatus.refetch();
|
|
131
|
-
|
|
173
|
+
orgOverride.refetch();
|
|
174
|
+
}, [personalEnv, grantStatus, orgOverride]);
|
|
132
175
|
return {
|
|
133
176
|
authMode,
|
|
134
177
|
oauthTargetEnvVar,
|
|
@@ -146,8 +189,8 @@ export function useMcpServerCredentials(org, mcpServer) {
|
|
|
146
189
|
manualEntrySupported,
|
|
147
190
|
missingVariables,
|
|
148
191
|
isReady,
|
|
149
|
-
isLoading: personalEnv.isLoading || grantStatus.isLoading,
|
|
150
|
-
error: personalEnv.error ?? grantStatus.error,
|
|
192
|
+
isLoading: personalEnv.isLoading || grantStatus.isLoading || orgOverride.isLoading,
|
|
193
|
+
error: personalEnv.error ?? grantStatus.error ?? orgOverride.error,
|
|
151
194
|
saveCredentials,
|
|
152
195
|
isSaving: personalEnv.isMutating,
|
|
153
196
|
refetch,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMcpServerCredentials.js","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerCredentials.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useMcpServerCredentials.js","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerCredentials.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAC;AAC3F,OAAO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B;QACrB,oBAAoB;QACpB,aAAa;QACb,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,OAAO;QACP,SAAS,EACP,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,SAAS;QACzE,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK;QAClE,eAAe;QACf,QAAQ,EAAE,WAAW,CAAC,UAAU;QAChC,OAAO;QACP,cAAc,EAAE,uBAAuB;QACvC,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { McpServer } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
|
|
2
|
+
import { type DriftFieldId } from "./internal/definitionDrift.js";
|
|
3
|
+
/** A detected divergence from the marketplace definition. */
|
|
4
|
+
export interface McpServerDefinitionDrift {
|
|
5
|
+
/** The marketplace definition the comparison ran against. */
|
|
6
|
+
readonly template: McpServer;
|
|
7
|
+
/** Connection-defining field groups that differ. Never empty. */
|
|
8
|
+
readonly changedFields: readonly DriftFieldId[];
|
|
9
|
+
}
|
|
10
|
+
/** Return value of {@link useMcpServerDefinitionDrift}. */
|
|
11
|
+
export interface UseMcpServerDefinitionDriftReturn {
|
|
12
|
+
/**
|
|
13
|
+
* The detected drift, or `null` — which covers all of: still checking,
|
|
14
|
+
* no marketplace counterpart, ambiguous counterpart, configurations
|
|
15
|
+
* match, or the check failed. Consumers need no other state: this is an
|
|
16
|
+
* advisory affordance, not page data.
|
|
17
|
+
*/
|
|
18
|
+
readonly drift: McpServerDefinitionDrift | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detects when an org-owned MCP server's connection-defining
|
|
22
|
+
* configuration has drifted from the marketplace definition it mirrors
|
|
23
|
+
* (stigmer/stigmer#228: a template fix — e.g. monday.com's OAuth header —
|
|
24
|
+
* never reached servers copied before the fix, stranding them on a
|
|
25
|
+
* configuration that can never connect).
|
|
26
|
+
*
|
|
27
|
+
* **How the marketplace counterpart is found.** Connected copies carry no
|
|
28
|
+
* reference back to their template, so the hook uses the platform's own
|
|
29
|
+
* client-side definition of "marketplace": the search RPC's
|
|
30
|
+
* `crossOrgPublic` scope (what the library's "All" tab shows). A public
|
|
31
|
+
* row with the exact same slug from a different org is treated as the
|
|
32
|
+
* template. Zero or multiple candidates means there is nothing
|
|
33
|
+
* trustworthy to compare against — the hook stays quiet.
|
|
34
|
+
*
|
|
35
|
+
* **Fail-quiet by design.** Drift detection is advisory. No network
|
|
36
|
+
* error, missing template, or ambiguity may ever degrade the detail page,
|
|
37
|
+
* so every failure path resolves to `null` rather than an error state.
|
|
38
|
+
*
|
|
39
|
+
* Pass `null` to skip (stable no-op) — callers gate on editability, since
|
|
40
|
+
* the paired refresh action writes to the resource and the notice is
|
|
41
|
+
* meaningless to viewers who cannot act on it.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useMcpServerDefinitionDrift(mcpServer: McpServer | null): UseMcpServerDefinitionDriftReturn;
|
|
44
|
+
//# sourceMappingURL=useMcpServerDefinitionDrift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMcpServerDefinitionDrift.d.ts","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerDefinitionDrift.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AAGxF,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AAEvC,6DAA6D;AAC7D,MAAM,WAAW,wBAAwB;IACvC,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAC;CACjD;AAED,2DAA2D;AAC3D,MAAM,WAAW,iCAAiC;IAChD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GAAG,IAAI,GAC1B,iCAAiC,CAwCnC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useStigmer } from "../hooks.js";
|
|
3
|
+
import { useFetch } from "../internal/useFetch.js";
|
|
4
|
+
import { computeDefinitionDrift, } from "./internal/definitionDrift.js";
|
|
5
|
+
/**
|
|
6
|
+
* Detects when an org-owned MCP server's connection-defining
|
|
7
|
+
* configuration has drifted from the marketplace definition it mirrors
|
|
8
|
+
* (stigmer/stigmer#228: a template fix — e.g. monday.com's OAuth header —
|
|
9
|
+
* never reached servers copied before the fix, stranding them on a
|
|
10
|
+
* configuration that can never connect).
|
|
11
|
+
*
|
|
12
|
+
* **How the marketplace counterpart is found.** Connected copies carry no
|
|
13
|
+
* reference back to their template, so the hook uses the platform's own
|
|
14
|
+
* client-side definition of "marketplace": the search RPC's
|
|
15
|
+
* `crossOrgPublic` scope (what the library's "All" tab shows). A public
|
|
16
|
+
* row with the exact same slug from a different org is treated as the
|
|
17
|
+
* template. Zero or multiple candidates means there is nothing
|
|
18
|
+
* trustworthy to compare against — the hook stays quiet.
|
|
19
|
+
*
|
|
20
|
+
* **Fail-quiet by design.** Drift detection is advisory. No network
|
|
21
|
+
* error, missing template, or ambiguity may ever degrade the detail page,
|
|
22
|
+
* so every failure path resolves to `null` rather than an error state.
|
|
23
|
+
*
|
|
24
|
+
* Pass `null` to skip (stable no-op) — callers gate on editability, since
|
|
25
|
+
* the paired refresh action writes to the resource and the notice is
|
|
26
|
+
* meaningless to viewers who cannot act on it.
|
|
27
|
+
*/
|
|
28
|
+
export function useMcpServerDefinitionDrift(mcpServer) {
|
|
29
|
+
const stigmer = useStigmer();
|
|
30
|
+
const org = mcpServer?.metadata?.org ?? null;
|
|
31
|
+
const slug = mcpServer?.metadata?.slug ?? null;
|
|
32
|
+
const { data: drift } = useFetch(mcpServer && org && slug
|
|
33
|
+
? async () => {
|
|
34
|
+
try {
|
|
35
|
+
const result = await stigmer.mcpServer.list({
|
|
36
|
+
org,
|
|
37
|
+
query: slug,
|
|
38
|
+
crossOrgPublic: true,
|
|
39
|
+
});
|
|
40
|
+
const candidateOrgs = [
|
|
41
|
+
...new Set(result.entries
|
|
42
|
+
.filter((e) => e.slug === slug && e.org && e.org !== org)
|
|
43
|
+
.map((e) => e.org)),
|
|
44
|
+
];
|
|
45
|
+
if (candidateOrgs.length !== 1)
|
|
46
|
+
return null;
|
|
47
|
+
const template = await stigmer.mcpServer.getByReference({
|
|
48
|
+
org: candidateOrgs[0],
|
|
49
|
+
slug,
|
|
50
|
+
});
|
|
51
|
+
const changedFields = computeDefinitionDrift(mcpServer, template);
|
|
52
|
+
return changedFields ? { template, changedFields } : null;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
: null, [mcpServer, org, slug, stigmer], null);
|
|
59
|
+
return { drift };
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=useMcpServerDefinitionDrift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMcpServerDefinitionDrift.js","sourceRoot":"","sources":["../../src/mcp-server/useMcpServerDefinitionDrift.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACL,sBAAsB,GAEvB,MAAM,+BAA+B,CAAC;AAqBvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,2BAA2B,CACzC,SAA2B;IAE3B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,GAAG,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,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