@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageAccessDialog.d.ts","sourceRoot":"","sources":["../../src/access/ManageAccessDialog.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ManageAccessDialog.d.ts","sourceRoot":"","sources":["../../src/access/ManageAccessDialog.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE,uBAAuB,2CAqIzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useRef } from "react";
|
|
3
|
+
import { useCallback, useId, useRef } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
import { hasGrantableRoles } from "@stigmer/sdk";
|
|
6
6
|
import { PeopleWithAccess } from "../iam-policy/PeopleWithAccess.js";
|
|
@@ -45,6 +45,11 @@ import { ResourceVisibilityControl } from "../library/ResourceVisibilityControl.
|
|
|
45
45
|
*/
|
|
46
46
|
export function ManageAccessDialog({ open, onOpenChange, resource, visibility, extraSection, }) {
|
|
47
47
|
const dialogRef = useRef(null);
|
|
48
|
+
// Instance-scoped title id (oss#593): a reusable component must not
|
|
49
|
+
// hardcode DOM ids — hosts legitimately mount this dialog more than once
|
|
50
|
+
// per page (e.g. zone-cached detail pages), and duplicate ids break the
|
|
51
|
+
// aria-labelledby association for every copy after the first.
|
|
52
|
+
const titleId = useId();
|
|
48
53
|
const handleClose = useCallback(() => {
|
|
49
54
|
dialogRef.current?.close();
|
|
50
55
|
onOpenChange(false);
|
|
@@ -65,7 +70,7 @@ export function ManageAccessDialog({ open, onOpenChange, resource, visibility, e
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
const showPeople = hasGrantableRoles(resource.kind);
|
|
68
|
-
return (_jsx("dialog", { ref: dialogRef, onClose: handleClose, className: cn("stg:fixed stg:inset-0 stg:m-auto stg:w-full stg:max-w-md stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl", "stg:backdrop:bg-
|
|
73
|
+
return (_jsx("dialog", { ref: dialogRef, onClose: handleClose, className: cn("stg:fixed stg:inset-0 stg:m-auto stg:w-full stg:max-w-md stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl", "stg:backdrop:bg-backdrop"), "aria-labelledby": titleId, children: open && (_jsxs("div", { className: "stg:flex stg:flex-col", children: [_jsxs("div", { className: "stg:flex stg:items-start stg:justify-between stg:border-b stg:border-border stg:px-6 stg:py-4", children: [_jsxs("div", { className: "stg:min-w-0", children: [_jsx("h2", { id: titleId, className: "stg:text-base stg:font-semibold stg:text-foreground", children: "Manage access" }), resource.name && (_jsx("p", { className: "stg:mt-0.5 stg:truncate stg:text-xs stg:text-muted-foreground", children: resource.name }))] }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: cn("stg:rounded-md stg:p-1 stg:text-muted-foreground", "stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"), children: _jsx(CloseIcon, {}) })] }), _jsxs("div", { className: "stg:flex stg:flex-col stg:divide-y stg:divide-border", children: [visibility && (_jsx(AccessSection, { title: "General access", description: "Who can find and open this resource.", children: _jsx(ResourceVisibilityControl, { kind: visibility.kind, resourceId: resource.id, visibility: visibility.current, org: visibility.org, onChanged: visibility.onChanged }) })), showPeople && (_jsx(AccessSection, { title: "People with access", children: _jsx(PeopleWithAccess, { resource: {
|
|
69
74
|
kind: resource.kindString,
|
|
70
75
|
id: resource.id,
|
|
71
76
|
resourceKind: resource.kind,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageAccessDialog.js","sourceRoot":"","sources":["../../src/access/ManageAccessDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ManageAccessDialog.js","sourceRoot":"","sources":["../../src/access/ManageAccessDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AA2BpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,GACY;IACxB,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAElD,oEAAoE;IACpE,yEAAyE;IACzE,wEAAwE;IACxE,8DAA8D;IAC9D,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IAExB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAC3B,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,qEAAqE;IACrE,MAAM,WAAW,GAAG,MAAM,CAAC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GACV,CACL,EACD,cAAK,SAAS,EAAC,YAAY,YAAE,QAAQ,GAAO,IACpC,CACX,CAAC;AACJ,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CACL,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAC5E,eAAM,CAAC,EAAC,oBAAoB,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,GAAG,GACzF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The SDK's compact relative-time vocabulary: one deterministic "how long
|
|
3
|
+
* ago" formatter so timestamps read identically everywhere (consolidated
|
|
4
|
+
* from eight per-component drifting copies — stigmer-cloud#269). Pass
|
|
5
|
+
* `now` to freeze the clock in tests.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
* execution names embed their CREATION time — so an old run legitimately
|
|
6
|
-
* re-bumped by a status change (a cancel, a late failure) sorts above
|
|
7
|
-
* newer-named items and reads as "wrong order" unless the row says why it
|
|
8
|
-
* is there. This stamp is that explanation: it renders the sort key the
|
|
9
|
-
* user cannot otherwise see.
|
|
10
|
-
*
|
|
11
|
-
* Compact single-unit output — a sidebar row suffix, not prose:
|
|
7
|
+
* Compact single-unit output — a row suffix, not prose:
|
|
12
8
|
* `now`, `5m`, `3h`, `6d`, then a short date (`Jul 12`, `Jul 12, 2025`)
|
|
13
9
|
* once "days ago" stops being how people think about it.
|
|
10
|
+
*
|
|
11
|
+
* Born on the recents list, where it renders the otherwise-invisible sort
|
|
12
|
+
* key: the list sorts by LAST ACTIVITY (`statusAudit.updatedAt`) while
|
|
13
|
+
* execution names embed their CREATION time, so an old run re-bumped by a
|
|
14
|
+
* late status change sorts above newer-named items and reads as "wrong
|
|
15
|
+
* order" unless the row says why it is there.
|
|
14
16
|
*/
|
|
15
17
|
export declare function formatRelativeTime(date: Date, now?: Date): string;
|
|
16
18
|
//# sourceMappingURL=format-relative-time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-relative-time.d.ts","sourceRoot":"","sources":["../../src/activity/format-relative-time.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format-relative-time.d.ts","sourceRoot":"","sources":["../../src/activity/format-relative-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAuBjE"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The SDK's compact relative-time vocabulary: one deterministic "how long
|
|
3
|
+
* ago" formatter so timestamps read identically everywhere (consolidated
|
|
4
|
+
* from eight per-component drifting copies — stigmer-cloud#269). Pass
|
|
5
|
+
* `now` to freeze the clock in tests.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
* execution names embed their CREATION time — so an old run legitimately
|
|
6
|
-
* re-bumped by a status change (a cancel, a late failure) sorts above
|
|
7
|
-
* newer-named items and reads as "wrong order" unless the row says why it
|
|
8
|
-
* is there. This stamp is that explanation: it renders the sort key the
|
|
9
|
-
* user cannot otherwise see.
|
|
10
|
-
*
|
|
11
|
-
* Compact single-unit output — a sidebar row suffix, not prose:
|
|
7
|
+
* Compact single-unit output — a row suffix, not prose:
|
|
12
8
|
* `now`, `5m`, `3h`, `6d`, then a short date (`Jul 12`, `Jul 12, 2025`)
|
|
13
9
|
* once "days ago" stops being how people think about it.
|
|
10
|
+
*
|
|
11
|
+
* Born on the recents list, where it renders the otherwise-invisible sort
|
|
12
|
+
* key: the list sorts by LAST ACTIVITY (`statusAudit.updatedAt`) while
|
|
13
|
+
* execution names embed their CREATION time, so an old run re-bumped by a
|
|
14
|
+
* late status change sorts above newer-named items and reads as "wrong
|
|
15
|
+
* order" unless the row says why it is there.
|
|
14
16
|
*/
|
|
15
17
|
export function formatRelativeTime(date, now) {
|
|
16
18
|
const ref = now ?? new Date();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-relative-time.js","sourceRoot":"","sources":["../../src/activity/format-relative-time.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format-relative-time.js","sourceRoot":"","sources":["../../src/activity/format-relative-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAU,EAAE,GAAU;IACvD,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAE/C,qEAAqE;IACrE,0DAA0D;IAC1D,IAAI,OAAO,GAAG,MAAM;QAAE,OAAO,KAAK,CAAC;IAEnC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IAC7C,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,GAAG,CAAC;IAEvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACvC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,GAAG,KAAK,GAAG,CAAC;IAEnC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IACpC,IAAI,IAAI,GAAG,CAAC;QAAE,OAAO,GAAG,IAAI,GAAG,CAAC;IAEhC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;IAC1D,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE;QACxC,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACzC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -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
|
import { McpServerPicker } from "../../mcp-server/McpServerPicker.js";
|
|
6
6
|
import { SkillPicker } from "../../skill/SkillPicker.js";
|
|
@@ -44,7 +44,10 @@ export function CapabilitiesStep({ org, data, updateData, }) {
|
|
|
44
44
|
// CollapsibleSection
|
|
45
45
|
// ---------------------------------------------------------------------------
|
|
46
46
|
function CollapsibleSection({ id, title, subtitle, count, expanded, onToggle, children, }) {
|
|
47
|
-
|
|
47
|
+
// The disclosure-panel DOM id is minted per mount — deriving it from the
|
|
48
|
+
// semantic section key would collide when two wizards mount on one page.
|
|
49
|
+
const panelId = useId();
|
|
50
|
+
return (_jsxs("div", { className: "stg:overflow-hidden stg:rounded-lg stg:border stg:border-border", children: [_jsxs("button", { type: "button", onClick: () => onToggle(id), "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 > 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 }))] }));
|
|
48
51
|
}
|
|
49
52
|
// ---------------------------------------------------------------------------
|
|
50
53
|
// EnvVarEditor — key-value editor for env var declarations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapabilitiesStep.js","sourceRoot":"","sources":["../../../src/agent/steps/CapabilitiesStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CapabilitiesStep.js","sourceRoot":"","sources":["../../../src/agent/steps/CapabilitiesStep.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;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAUzD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,GAAG,EACH,IAAI,EACJ,UAAU,GACY;IACtB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAc,GAAG,EAAE;QACzE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,GAA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,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":"IdentityStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAID;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,eAAe,GAChB,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"IdentityStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAID;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,eAAe,GAChB,EAAE,iBAAiB,2CAqMnB"}
|
|
@@ -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]+)*$/;
|
|
@@ -14,6 +14,7 @@ const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
|
14
14
|
* Follows the same pattern as `CreateOrganizationForm`.
|
|
15
15
|
*/
|
|
16
16
|
export function IdentityStep({ data, updateData, validationError, }) {
|
|
17
|
+
const baseId = useId();
|
|
17
18
|
const handleNameChange = useCallback((value) => {
|
|
18
19
|
if (!data.slugTouched) {
|
|
19
20
|
updateData({ name: value, slug: generateSlug(value) });
|
|
@@ -28,16 +29,16 @@ export function IdentityStep({ data, updateData, validationError, }) {
|
|
|
28
29
|
const slugError = data.slug.length > 0 && !SLUG_PATTERN.test(data.slug)
|
|
29
30
|
? "Slug must be lowercase letters, numbers, and hyphens only"
|
|
30
31
|
: null;
|
|
31
|
-
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 & Instructions" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Define what this agent is and what it does." })] }), 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:
|
|
32
|
+
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 & Instructions" }), _jsx("p", { className: "stg:mt-1 stg:text-sm stg:text-muted-foreground", children: "Define what this agent is and what it does." })] }), 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. PR Review Bot", 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
|
|
32
33
|
? "stg:border-destructive stg:bg-input-bg"
|
|
33
|
-
: "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:
|
|
34
|
+
: "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 what this agent does", 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(VisibilityOption, { name: `${baseId}-visibility`, value: "private", label: "Private", checked: data.visibility === "private", onChange: () => updateData({ visibility: "private" }) }), _jsx(VisibilityOption, { name: `${baseId}-visibility`, value: "public", label: "Public", checked: data.visibility === "public", onChange: () => updateData({ visibility: "public" }) })] })] })] }), _jsxs("div", { className: "stg:space-y-1.5", children: [_jsx("label", { htmlFor: `${baseId}-instructions`, className: "stg:text-sm stg:font-medium stg:text-foreground", children: "Instructions" }), _jsx("p", { className: "stg:text-xs stg:text-muted-foreground", children: "The system prompt that defines this agent's behavior." }), _jsx("textarea", { id: `${baseId}-instructions`, value: data.instructions, onChange: (e) => updateData({ instructions: e.target.value }), placeholder: "You are a helpful assistant that...", rows: 12, className: cn("stg:w-full stg:resize-y 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") })] })] }));
|
|
34
35
|
}
|
|
35
36
|
// ---------------------------------------------------------------------------
|
|
36
37
|
// Visibility radio option
|
|
37
38
|
// ---------------------------------------------------------------------------
|
|
38
|
-
function VisibilityOption({ value, label, checked, onChange, }) {
|
|
39
|
+
function VisibilityOption({ name, value, label, checked, onChange, }) {
|
|
39
40
|
return (_jsxs("label", { className: cn("stg:inline-flex stg:cursor-pointer stg:items-center stg:rounded-md stg:border stg:px-3 stg:py-1.5 stg:text-sm stg:transition-colors", checked
|
|
40
41
|
? "stg:border-primary stg:bg-primary-subtle stg:text-primary stg:font-medium"
|
|
41
|
-
: "stg:border-input stg:bg-input-bg stg:text-muted-foreground stg:hover:border-border stg:hover:text-foreground"), children: [_jsx("input", { type: "radio", name:
|
|
42
|
+
: "stg:border-input stg:bg-input-bg stg:text-muted-foreground stg:hover:border-border stg:hover:text-foreground"), children: [_jsx("input", { type: "radio", name: name, value: value, checked: checked, onChange: onChange, className: "stg:sr-only" }), label] }));
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=IdentityStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityStep.js","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IdentityStep.js","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.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;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,eA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K,QAAQ,EACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,GACpD,IACE,IACG,IACP,EAGN,eAAK,SAAS,EAAC,iBAAiB,aAC9B,gBACE,OAAO,EAAE,GAAG,MAAM,eAAe,EACjC,SAAS,EAAC,iDAAiD,6BAGrD,EACR,YAAG,SAAS,EAAC,uCAAuC,sEAEhD,EACJ,mBACE,EAAE,EAAE,GAAG,MAAM,eAAe,EAC5B,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAC7D,WAAW,EAAC,qCAAqC,EACjD,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,EAAE,CACX,oJAAoJ,EACpJ,uCAAuC,EACvC,qFAAqF,CACtF,GACD,IACE,IACF,CACP,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,0BAA0B;AAC1B,8EAA8E;AAE9E,SAAS,gBAAgB,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,GAOT;IACC,OAAO,CACL,iBACE,SAAS,EAAE,EAAE,CACX,qIAAqI,EACrI,OAAO;YACL,CAAC,CAAC,2EAA2E;YAC7E,CAAC,CAAC,8GAA8G,CACnH,aAED,gBACE,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,aAAa,GACvB,EACD,KAAK,IACA,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAgentInstanceDialog.d.ts","sourceRoot":"","sources":["../../src/agent-instance/CreateAgentInstanceDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,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,EACH,OAAO,EACP,SAAS,GACV,EAAE,8BAA8B,2CA2NhC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useRef, useState } from "react";
|
|
3
|
+
import { useCallback, useId, useRef, useState } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
|
|
6
6
|
import { getUserMessage } from "@stigmer/sdk";
|
|
@@ -18,6 +18,14 @@ import { InstanceVisibilitySelector } from "../library/InstanceVisibilitySelecto
|
|
|
18
18
|
export function CreateAgentInstanceDialog({ open, onOpenChange, org, agentId, onCreated, }) {
|
|
19
19
|
const dialogRef = useRef(null);
|
|
20
20
|
const { create, isCreating, error, clearError } = useCreateAgentInstance();
|
|
21
|
+
// Instance-scoped element ids (oss#593): a reusable component must not
|
|
22
|
+
// hardcode DOM ids — hosts legitimately mount this dialog more than once
|
|
23
|
+
// per page (e.g. zone-cached detail pages), and duplicate ids silently
|
|
24
|
+
// break the label→input association for every copy after the first.
|
|
25
|
+
const baseId = useId();
|
|
26
|
+
const titleId = `${baseId}-title`;
|
|
27
|
+
const nameId = `${baseId}-name`;
|
|
28
|
+
const descriptionId = `${baseId}-description`;
|
|
21
29
|
const [name, setName] = useState("");
|
|
22
30
|
const [description, setDescription] = useState("");
|
|
23
31
|
const [environmentRefs, setEnvironmentRefs] = useState([]);
|
|
@@ -70,7 +78,7 @@ export function CreateAgentInstanceDialog({ open, onOpenChange, org, agentId, on
|
|
|
70
78
|
dialogRef.current.close();
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
|
-
return (_jsx("dialog", { ref: dialogRef, onClose: handleClose, className: cn("stg:fixed stg:inset-0 stg:m-auto stg:w-full stg:max-w-lg stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl", "stg:backdrop:bg-
|
|
81
|
+
return (_jsx("dialog", { ref: dialogRef, onClose: handleClose, className: cn("stg:fixed stg:inset-0 stg:m-auto stg:w-full stg:max-w-lg stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl", "stg:backdrop:bg-backdrop"), "aria-labelledby": titleId, children: _jsxs("form", { onSubmit: handleSubmit, className: "stg:flex stg:flex-col", children: [_jsxs("div", { className: "stg:flex stg:items-center stg:justify-between stg:border-b stg:border-border stg:px-6 stg:py-4", children: [_jsx("h2", { id: titleId, className: "stg:text-base stg:font-semibold stg:text-foreground", children: "Create Agent Instance" }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: cn("stg:rounded-md stg:p-1 stg:text-muted-foreground", "stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"), children: _jsx(CloseIcon, {}) })] }), _jsxs("div", { className: "stg:space-y-5 stg:px-6 stg:py-5", children: [_jsxs("div", { children: [_jsxs("label", { htmlFor: nameId, className: "stg:block stg:text-sm stg:font-medium stg:text-foreground stg:mb-1.5", children: ["Name ", _jsx("span", { className: "stg:text-destructive", children: "*" })] }), _jsx("input", { id: nameId, type: "text", required: true, value: name, onChange: (e) => setName(e.target.value), placeholder: "e.g. prod, staging, qa-team", disabled: isCreating, className: cn("stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:px-3 stg:py-2 stg:text-sm", "stg:text-foreground stg:placeholder:text-muted-foreground", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring", "stg:disabled:cursor-not-allowed stg:disabled:opacity-50"), autoFocus: true }), _jsx("p", { className: "stg:mt-1 stg:text-[0.65rem] stg:text-muted-foreground", children: "A URL-friendly slug will be generated from this name." })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: descriptionId, className: "stg:block stg:text-sm stg:font-medium stg:text-foreground stg:mb-1.5", children: "Description" }), _jsx("textarea", { id: descriptionId, value: description, onChange: (e) => setDescription(e.target.value), placeholder: "What is this instance used for?", disabled: isCreating, rows: 2, className: cn("stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:px-3 stg:py-2 stg:text-sm stg:resize-none", "stg:text-foreground stg:placeholder:text-muted-foreground", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring", "stg:disabled:cursor-not-allowed stg:disabled:opacity-50") })] }), _jsxs("div", { children: [_jsx("label", { className: "stg:block stg:text-sm stg:font-medium stg:text-foreground stg:mb-1.5", children: "Environments" }), _jsx("p", { className: "stg:text-[0.65rem] stg:text-muted-foreground stg:mb-2", children: "Bind credentials and configuration to this instance." }), _jsx(EnvironmentPicker, { org: org, value: environmentRefs, onChange: setEnvironmentRefs, disabled: isCreating })] }), _jsxs("div", { children: [_jsx("label", { className: "stg:block stg:text-sm stg:font-medium stg:text-foreground stg:mb-1.5", children: "Visibility" }), _jsx(InstanceVisibilitySelector, { visibility: visibility, onVisibilityChange: setVisibility, mode: "create", disabled: isCreating })] }), error && (_jsx("div", { className: "stg:rounded-md stg:bg-destructive/10 stg:px-3 stg:py-2 stg:text-sm stg:text-destructive", role: "alert", children: getUserMessage(error) }))] }), _jsxs("div", { className: "stg:flex stg:items-center stg:justify-end stg:gap-2 stg:border-t stg:border-border stg:px-6 stg:py-4", children: [_jsx("button", { type: "button", onClick: handleClose, disabled: isCreating, className: cn("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium", "stg:text-foreground stg:hover:bg-accent-hover", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring", "stg:disabled:cursor-not-allowed stg:disabled:opacity-50"), children: "Cancel" }), _jsx("button", { type: "submit", disabled: isCreating || !name.trim(), className: cn("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium", "stg:bg-primary stg:text-primary-foreground", "stg:hover:bg-primary/90", "stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring stg:focus:ring-offset-2", "stg:disabled:cursor-not-allowed stg:disabled:opacity-50"), children: isCreating ? "Creating..." : "Create Instance" })] })] }) }));
|
|
74
82
|
}
|
|
75
83
|
function CloseIcon() {
|
|
76
84
|
return (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAgentInstanceDialog.js","sourceRoot":"","sources":["../../src/agent-instance/CreateAgentInstanceDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateAgentInstanceDialog.js","sourceRoot":"","sources":["../../src/agent-instance/CreateAgentInstanceDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAG/F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAgBtF;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,OAAO,EACP,SAAS,GACsB;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,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AAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAC5E,eAAM,CAAC,EAAC,oBAAoB,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,GAAG,GACzF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyCreatedAlert.d.ts","sourceRoot":"","sources":["../../src/api-key/ApiKeyCreatedAlert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiKeyCreatedAlert.d.ts","sourceRoot":"","sources":["../../src/api-key/ApiKeyCreatedAlert.tsx"],"names":[],"mappings":"AAWA,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,SAAS,EACT,SAAS,GACV,EAAE,uBAAuB,2CAoEzB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback,
|
|
3
|
+
import { useCallback, useRef } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { selectElementText } from "../internal/select-element-text.js";
|
|
6
|
+
import { useCopyFeedback } from "../internal/useCopyFeedback.js";
|
|
5
7
|
/**
|
|
6
8
|
* One-time reveal component displayed after a new API key is created.
|
|
7
9
|
*
|
|
@@ -25,26 +27,16 @@ import { cn } from "@stigmer/theme";
|
|
|
25
27
|
* ```
|
|
26
28
|
*/
|
|
27
29
|
export function ApiKeyCreatedAlert({ rawKey, keyName, onDismiss, className, }) {
|
|
28
|
-
const
|
|
30
|
+
const { copy, copied } = useCopyFeedback();
|
|
31
|
+
const revealRef = useRef(null);
|
|
29
32
|
const handleCopy = useCallback(async () => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const el = document.getElementById("stgm-api-key-reveal");
|
|
38
|
-
if (el) {
|
|
39
|
-
const selection = window.getSelection();
|
|
40
|
-
const range = document.createRange();
|
|
41
|
-
range.selectNodeContents(el);
|
|
42
|
-
selection?.removeAllRanges();
|
|
43
|
-
selection?.addRange(range);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}, [rawKey]);
|
|
47
|
-
return (_jsxs("div", { role: "alert", className: cn("stg:rounded-lg stg:border stg:border-primary/30 stg:bg-primary-subtle stg:p-4", className), children: [_jsxs("div", { className: "stg:mb-2 stg:flex stg:items-start stg:justify-between stg:gap-3", children: [_jsxs("div", { className: "stg:min-w-0", children: [_jsxs("p", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["API key created: ", keyName] }), _jsx("p", { className: "stg:mt-0.5 stg:text-xs stg:text-muted-foreground", children: "Copy this key now. It will not be shown again." })] }), _jsx("button", { type: "button", onClick: onDismiss, "aria-label": "Dismiss", className: cn("stg:shrink-0 stg:rounded stg:p-1", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:transition-colors"), children: _jsx(CloseIcon, {}) })] }), _jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsx("code", { id: "stgm-api-key-reveal", className: cn("stg:min-w-0 stg:flex-1 stg:select-all stg:truncate stg:rounded-md", "stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5", "stg:font-mono stg:text-xs stg:text-foreground"), children: rawKey }), _jsxs("button", { type: "button", onClick: handleCopy, className: cn("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium", "stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover", "stg:transition-colors"), children: [copied ? _jsx(CheckIcon, {}) : _jsx(CopyIcon, {}), copied ? "Copied" : "Copy"] })] })] }));
|
|
33
|
+
if (await copy(rawKey))
|
|
34
|
+
return;
|
|
35
|
+
// Rejected write: select the revealed key so the user can copy manually.
|
|
36
|
+
if (revealRef.current)
|
|
37
|
+
selectElementText(revealRef.current);
|
|
38
|
+
}, [copy, rawKey]);
|
|
39
|
+
return (_jsxs("div", { role: "alert", className: cn("stg:rounded-lg stg:border stg:border-primary/30 stg:bg-primary-subtle stg:p-4", className), children: [_jsxs("div", { className: "stg:mb-2 stg:flex stg:items-start stg:justify-between stg:gap-3", children: [_jsxs("div", { className: "stg:min-w-0", children: [_jsxs("p", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: ["API key created: ", keyName] }), _jsx("p", { className: "stg:mt-0.5 stg:text-xs stg:text-muted-foreground", children: "Copy this key now. It will not be shown again." })] }), _jsx("button", { type: "button", onClick: onDismiss, "aria-label": "Dismiss", className: cn("stg:shrink-0 stg:rounded stg:p-1", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:transition-colors"), children: _jsx(CloseIcon, {}) })] }), _jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsx("code", { ref: revealRef, className: cn("stg:min-w-0 stg:flex-1 stg:select-all stg:truncate stg:rounded-md", "stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5", "stg:font-mono stg:text-xs stg:text-foreground"), children: rawKey }), _jsxs("button", { type: "button", onClick: handleCopy, className: cn("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium", "stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover", "stg:transition-colors"), children: [copied ? _jsx(CheckIcon, {}) : _jsx(CopyIcon, {}), copied ? "Copied" : "Copy"] })] })] }));
|
|
48
40
|
}
|
|
49
41
|
// ---------------------------------------------------------------------------
|
|
50
42
|
// Icons
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyCreatedAlert.js","sourceRoot":"","sources":["../../src/api-key/ApiKeyCreatedAlert.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ApiKeyCreatedAlert.js","sourceRoot":"","sources":["../../src/api-key/ApiKeyCreatedAlert.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAkBjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,SAAS,EACT,SAAS,GACe;IACxB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC;YAAE,OAAO;QAC/B,yEAAyE;QACzE,IAAI,SAAS,CAAC,OAAO;YAAE,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,eACE,IAAI,EAAC,OAAO,EACZ,SAAS,EA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,KAAK,GAAG,EAClD,eAAM,CAAC,EAAC,gFAAgF,GAAG,IACvF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CACL,cACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,YAElB,eAAM,CAAC,EAAC,qBAAqB,GAAG,GAC5B,CACP,CAAC;AACJ,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CACL,cACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,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,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyListPanel.d.ts","sourceRoot":"","sources":["../../src/api-key/ApiKeyListPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiKeyListPanel.d.ts","sourceRoot":"","sources":["../../src/api-key/ApiKeyListPanel.tsx"],"names":[],"mappings":"AAiBA,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IACtD,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,SAAS,EACT,GAAG,GACJ,EAAE,oBAAoB,2CAuEtB"}
|
|
@@ -7,6 +7,8 @@ import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
|
7
7
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../internal/tooltip.js";
|
|
8
8
|
import { useApiKeyList } from "./useApiKeyList.js";
|
|
9
9
|
import { useDeleteApiKey } from "./useDeleteApiKey.js";
|
|
10
|
+
import { SpinnerIcon } from "../internal/SpinnerIcon.js";
|
|
11
|
+
import { formatRelativeTime } from "../activity/format-relative-time.js";
|
|
10
12
|
/**
|
|
11
13
|
* Displays a list of {@link ApiKey} resources for the authenticated
|
|
12
14
|
* identity with inline delete confirmation.
|
|
@@ -75,7 +77,7 @@ function ApiKeyRow({ apiKey, now, isConfirming, onConfirmDelete, onCancelDelete,
|
|
|
75
77
|
}
|
|
76
78
|
}, [id, deleteKey, onDeleted]);
|
|
77
79
|
if (isConfirming) {
|
|
78
|
-
return (_jsxs("div", { role: "listitem", className: "stg:flex stg:items-center stg:justify-between stg:rounded-lg stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-3 stg:py-2.5", children: [_jsxs("div", { className: "stg:min-w-0 stg:flex-1", children: [_jsxs("p", { className: "stg:text-xs stg:text-foreground", children: ["Delete ", _jsx("span", { className: "stg:font-medium", children: name }), "?", fingerprint && (_jsxs("span", { className: "stg:text-muted-foreground", children: [" ", "(\u2026", fingerprint, ")"] }))] }), error && (_jsx("p", { className: "stg:mt-0.5 stg:text-[0.65rem] stg:text-destructive", children: getUserMessage(error) }))] }), _jsxs("div", { className: "stg:flex stg:shrink-0 stg:items-center stg:gap-1.5", children: [_jsxs("button", { type: "button", onClick: handleDelete, disabled: isDeleting, className: cn("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium", "stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-50"), children: [isDeleting && _jsx(SpinnerIcon, {}), "Delete"] }), _jsx("button", { type: "button", onClick: onCancelDelete, disabled: isDeleting, className: cn("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-50"), children: "Cancel" })] })] }));
|
|
80
|
+
return (_jsxs("div", { role: "listitem", className: "stg:flex stg:items-center stg:justify-between stg:rounded-lg stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-3 stg:py-2.5", children: [_jsxs("div", { className: "stg:min-w-0 stg:flex-1", children: [_jsxs("p", { className: "stg:text-xs stg:text-foreground", children: ["Delete ", _jsx("span", { className: "stg:font-medium", children: name }), "?", fingerprint && (_jsxs("span", { className: "stg:text-muted-foreground", children: [" ", "(\u2026", fingerprint, ")"] }))] }), error && (_jsx("p", { className: "stg:mt-0.5 stg:text-[0.65rem] stg:text-destructive", children: getUserMessage(error) }))] }), _jsxs("div", { className: "stg:flex stg:shrink-0 stg:items-center stg:gap-1.5", children: [_jsxs("button", { type: "button", onClick: handleDelete, disabled: isDeleting, className: cn("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium", "stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-50"), children: [isDeleting && _jsx(SpinnerIcon, { size: 12 }), "Delete"] }), _jsx("button", { type: "button", onClick: onCancelDelete, disabled: isDeleting, className: cn("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-50"), children: "Cancel" })] })] }));
|
|
79
81
|
}
|
|
80
82
|
return (_jsxs("div", { role: "listitem", className: "stg:flex stg:items-center stg:gap-3 stg:rounded-lg stg:border stg:border-border-muted stg:px-3 stg:py-2.5 stg:hover:border-border stg:transition-colors", children: [_jsx(KeyIcon, {}), _jsxs("div", { className: "stg:min-w-0 stg:flex-1", children: [_jsx("span", { className: "stg:block stg:truncate stg:text-sm stg:font-medium stg:text-foreground", children: name }), fingerprint && (_jsxs("span", { className: "stg:block stg:text-xs stg:text-muted-foreground stg:font-mono", children: ["\u2026", fingerprint] }))] }), _jsxs("div", { className: "stg:hidden stg:sm:flex stg:shrink-0 stg:items-center stg:gap-4 stg:text-xs stg:text-muted-foreground", children: [createdAt && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx("time", { dateTime: timestampDate(createdAt).toISOString() }), children: formatShortDate(timestampDate(createdAt)) }), _jsx(TooltipContent, { side: "top", children: `Created ${timestampDate(createdAt).toISOString()}` })] })), _jsx("span", { children: neverExpires
|
|
81
83
|
? "No expiry"
|
|
@@ -95,25 +97,6 @@ function formatShortDate(date) {
|
|
|
95
97
|
year: "numeric",
|
|
96
98
|
});
|
|
97
99
|
}
|
|
98
|
-
function formatRelativeTime(date, now) {
|
|
99
|
-
const ref = now?.getTime() ?? Date.now();
|
|
100
|
-
const diffMs = ref - date.getTime();
|
|
101
|
-
if (diffMs < 0)
|
|
102
|
-
return "Just now";
|
|
103
|
-
const seconds = Math.floor(diffMs / 1000);
|
|
104
|
-
if (seconds < 60)
|
|
105
|
-
return "Just now";
|
|
106
|
-
const minutes = Math.floor(seconds / 60);
|
|
107
|
-
if (minutes < 60)
|
|
108
|
-
return `${minutes}m ago`;
|
|
109
|
-
const hours = Math.floor(minutes / 60);
|
|
110
|
-
if (hours < 24)
|
|
111
|
-
return `${hours}h ago`;
|
|
112
|
-
const days = Math.floor(hours / 24);
|
|
113
|
-
if (days < 30)
|
|
114
|
-
return `${days}d ago`;
|
|
115
|
-
return formatShortDate(date);
|
|
116
|
-
}
|
|
117
100
|
// ---------------------------------------------------------------------------
|
|
118
101
|
// Icons
|
|
119
102
|
// ---------------------------------------------------------------------------
|
|
@@ -123,7 +106,4 @@ function KeyIcon() {
|
|
|
123
106
|
function TrashIcon() {
|
|
124
107
|
return (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("path", { d: "M2.5 4h11M5.5 4V2.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1V4" }), _jsx("path", { d: "M12.5 4v9a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V4" }), _jsx("line", { x1: "6.5", y1: "7", x2: "6.5", y2: "11" }), _jsx("line", { x1: "9.5", y1: "7", x2: "9.5", y2: "11" })] }));
|
|
125
108
|
}
|
|
126
|
-
function SpinnerIcon() {
|
|
127
|
-
return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "stg:animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
|
|
128
|
-
}
|
|
129
109
|
//# sourceMappingURL=ApiKeyListPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyListPanel.js","sourceRoot":"","sources":["../../src/api-key/ApiKeyListPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiKeyList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AAC,4CAA4C,GAAG,EACvD,eAAM,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,GAAG,EACzC,eAAM,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,GAAG,IACrC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateApiKeyForm.d.ts","sourceRoot":"","sources":["../../src/api-key/CreateApiKeyForm.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateApiKeyForm.d.ts","sourceRoot":"","sources":["../../src/api-key/CreateApiKeyForm.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iDAAiD,CAAC;AAQ9E,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,EACT,QAAQ,EACR,WAAgB,EAChB,SAAS,GACV,EAAE,qBAAqB,2CAyHvB"}
|