@stigmer/react 0.0.71 → 0.0.73
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/agent/AgentEnvForm.d.ts +2 -0
- package/agent/AgentEnvForm.d.ts.map +1 -1
- package/agent/AgentEnvForm.js.map +1 -1
- package/agent/AgentPicker.d.ts +2 -0
- package/agent/AgentPicker.d.ts.map +1 -1
- package/agent/AgentPicker.js.map +1 -1
- package/agent/agentSetupReducer.d.ts +69 -7
- package/agent/agentSetupReducer.d.ts.map +1 -1
- package/agent/agentSetupReducer.js.map +1 -1
- package/agent/useAgentCount.d.ts +2 -0
- package/agent/useAgentCount.d.ts.map +1 -1
- package/agent/useAgentCount.js.map +1 -1
- package/attachment/AttachmentChipList.d.ts +15 -0
- package/attachment/AttachmentChipList.d.ts.map +1 -1
- package/attachment/AttachmentChipList.js +15 -0
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/useAttachments.d.ts +14 -0
- package/attachment/useAttachments.d.ts.map +1 -1
- package/attachment/useAttachments.js.map +1 -1
- package/composer/useComposer.d.ts +5 -0
- package/composer/useComposer.d.ts.map +1 -1
- package/composer/useComposer.js.map +1 -1
- package/execution/ExecutionPhaseBadge.d.ts +1 -1
- package/execution/ExecutionPhaseBadge.js +1 -1
- package/execution/McpToolDetail.d.ts +16 -8
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +0 -6
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/TodoList.d.ts +8 -0
- package/execution/TodoList.d.ts.map +1 -1
- package/execution/TodoList.js +8 -0
- package/execution/TodoList.js.map +1 -1
- package/execution/ToolArgsView.d.ts +1 -0
- package/execution/ToolArgsView.d.ts.map +1 -1
- package/execution/ToolArgsView.js.map +1 -1
- package/execution/UsageWidget.d.ts +1 -1
- package/execution/UsageWidget.js +1 -1
- package/execution/file-path-resolver.d.ts +10 -0
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/index.d.ts +1 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js.map +1 -1
- package/execution/useArtifactContent.d.ts +33 -0
- package/execution/useArtifactContent.d.ts.map +1 -1
- package/execution/useArtifactContent.js +33 -0
- package/execution/useArtifactContent.js.map +1 -1
- package/execution/useSubmitApproval.d.ts +2 -0
- package/execution/useSubmitApproval.d.ts.map +1 -1
- package/execution/useSubmitApproval.js.map +1 -1
- package/github/GitHubRepoPicker.d.ts +13 -0
- package/github/GitHubRepoPicker.d.ts.map +1 -1
- package/github/GitHubRepoPicker.js +13 -0
- package/github/GitHubRepoPicker.js.map +1 -1
- package/github/useGitHubConnection.d.ts +29 -1
- package/github/useGitHubConnection.d.ts.map +1 -1
- package/github/useGitHubConnection.js +29 -1
- package/github/useGitHubConnection.js.map +1 -1
- package/github/useGitHubRepos.d.ts +31 -0
- package/github/useGitHubRepos.d.ts.map +1 -1
- package/github/useGitHubRepos.js +31 -0
- package/github/useGitHubRepos.js.map +1 -1
- package/github/useGitHubSearch.d.ts +25 -0
- package/github/useGitHubSearch.d.ts.map +1 -1
- package/github/useGitHubSearch.js +25 -0
- package/github/useGitHubSearch.js.map +1 -1
- package/iam-policy/GrantAccessForm.d.ts +39 -0
- package/iam-policy/GrantAccessForm.d.ts.map +1 -0
- package/iam-policy/GrantAccessForm.js +75 -0
- package/iam-policy/GrantAccessForm.js.map +1 -0
- package/iam-policy/OrgMembersPanel.d.ts +28 -0
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -0
- package/iam-policy/OrgMembersPanel.js +192 -0
- package/iam-policy/OrgMembersPanel.js.map +1 -0
- package/iam-policy/RoleSelector.d.ts +37 -0
- package/iam-policy/RoleSelector.d.ts.map +1 -0
- package/iam-policy/RoleSelector.js +42 -0
- package/iam-policy/RoleSelector.js.map +1 -0
- package/iam-policy/index.d.ts +12 -0
- package/iam-policy/index.d.ts.map +1 -0
- package/iam-policy/index.js +12 -0
- package/iam-policy/index.js.map +1 -0
- package/iam-policy/useCreateIamPolicy.d.ts +35 -0
- package/iam-policy/useCreateIamPolicy.d.ts.map +1 -0
- package/iam-policy/useCreateIamPolicy.js +46 -0
- package/iam-policy/useCreateIamPolicy.js.map +1 -0
- package/iam-policy/useDeleteIamPolicy.d.ts +34 -0
- package/iam-policy/useDeleteIamPolicy.d.ts.map +1 -0
- package/iam-policy/useDeleteIamPolicy.js +45 -0
- package/iam-policy/useDeleteIamPolicy.js.map +1 -0
- package/iam-policy/useGrantableRoles.d.ts +28 -0
- package/iam-policy/useGrantableRoles.d.ts.map +1 -0
- package/iam-policy/useGrantableRoles.js +32 -0
- package/iam-policy/useGrantableRoles.js.map +1 -0
- package/iam-policy/usePrincipalsCount.d.ts +31 -0
- package/iam-policy/usePrincipalsCount.d.ts.map +1 -0
- package/iam-policy/usePrincipalsCount.js +72 -0
- package/iam-policy/usePrincipalsCount.js.map +1 -0
- package/iam-policy/useResourceAccess.d.ts +51 -0
- package/iam-policy/useResourceAccess.d.ts.map +1 -0
- package/iam-policy/useResourceAccess.js +85 -0
- package/iam-policy/useResourceAccess.js.map +1 -0
- package/iam-policy/useRevokeOrgAccess.d.ts +36 -0
- package/iam-policy/useRevokeOrgAccess.d.ts.map +1 -0
- package/iam-policy/useRevokeOrgAccess.js +48 -0
- package/iam-policy/useRevokeOrgAccess.js.map +1 -0
- package/iam-policy/useRoleSelector.d.ts +52 -0
- package/iam-policy/useRoleSelector.d.ts.map +1 -0
- package/iam-policy/useRoleSelector.js +50 -0
- package/iam-policy/useRoleSelector.js.map +1 -0
- package/iam-policy/useWhoAmI.d.ts +30 -0
- package/iam-policy/useWhoAmI.d.ts.map +1 -0
- package/iam-policy/useWhoAmI.js +56 -0
- package/iam-policy/useWhoAmI.js.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts +39 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.js +102 -0
- package/identity-provider/CreateIdentityProviderForm.js.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts +42 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.js +156 -0
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -0
- package/identity-provider/IdentityProviderListPanel.d.ts +41 -0
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderListPanel.js +110 -0
- package/identity-provider/IdentityProviderListPanel.js.map +1 -0
- package/identity-provider/IdentityProviderWizard.d.ts +40 -0
- package/identity-provider/IdentityProviderWizard.d.ts.map +1 -0
- package/identity-provider/IdentityProviderWizard.js +180 -0
- package/identity-provider/IdentityProviderWizard.js.map +1 -0
- package/identity-provider/ProviderPicker.d.ts +28 -0
- package/identity-provider/ProviderPicker.d.ts.map +1 -0
- package/identity-provider/ProviderPicker.js +64 -0
- package/identity-provider/ProviderPicker.js.map +1 -0
- package/identity-provider/SsoLoginPrompt.d.ts +51 -0
- package/identity-provider/SsoLoginPrompt.d.ts.map +1 -0
- package/identity-provider/SsoLoginPrompt.js +119 -0
- package/identity-provider/SsoLoginPrompt.js.map +1 -0
- package/identity-provider/index.d.ts +14 -0
- package/identity-provider/index.d.ts.map +1 -0
- package/identity-provider/index.js +14 -0
- package/identity-provider/index.js.map +1 -0
- package/identity-provider/presets.d.ts +65 -0
- package/identity-provider/presets.d.ts.map +1 -0
- package/identity-provider/presets.js +200 -0
- package/identity-provider/presets.js.map +1 -0
- package/identity-provider/useCreateIdentityProvider.d.ts +37 -0
- package/identity-provider/useCreateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useCreateIdentityProvider.js +48 -0
- package/identity-provider/useCreateIdentityProvider.js.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts +34 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.js +45 -0
- package/identity-provider/useDeleteIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProvider.d.ts +37 -0
- package/identity-provider/useIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useIdentityProvider.js +62 -0
- package/identity-provider/useIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProviderList.d.ts +48 -0
- package/identity-provider/useIdentityProviderList.d.ts.map +1 -0
- package/identity-provider/useIdentityProviderList.js +75 -0
- package/identity-provider/useIdentityProviderList.js.map +1 -0
- package/identity-provider/useOidcDiscovery.d.ts +39 -0
- package/identity-provider/useOidcDiscovery.d.ts.map +1 -0
- package/identity-provider/useOidcDiscovery.js +76 -0
- package/identity-provider/useOidcDiscovery.js.map +1 -0
- package/identity-provider/useSsoProvider.d.ts +50 -0
- package/identity-provider/useSsoProvider.d.ts.map +1 -0
- package/identity-provider/useSsoProvider.js +83 -0
- package/identity-provider/useSsoProvider.js.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts +38 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.js +49 -0
- package/identity-provider/useUpdateIdentityProvider.js.map +1 -0
- package/index.d.ts +14 -5
- package/index.d.ts.map +1 -1
- package/index.js +10 -2
- package/index.js.map +1 -1
- package/internal/CloudFeatureNotice.d.ts +12 -0
- package/internal/CloudFeatureNotice.d.ts.map +1 -1
- package/internal/CloudFeatureNotice.js +12 -0
- package/internal/CloudFeatureNotice.js.map +1 -1
- package/invitation/InvitationCreatedAlert.d.ts +35 -0
- package/invitation/InvitationCreatedAlert.d.ts.map +1 -0
- package/invitation/InvitationCreatedAlert.js +60 -0
- package/invitation/InvitationCreatedAlert.js.map +1 -0
- package/invitation/InvitationManager.d.ts +44 -0
- package/invitation/InvitationManager.d.ts.map +1 -0
- package/invitation/InvitationManager.js +248 -0
- package/invitation/InvitationManager.js.map +1 -0
- package/invitation/InvitationRedemption.d.ts +69 -0
- package/invitation/InvitationRedemption.d.ts.map +1 -0
- package/invitation/InvitationRedemption.js +140 -0
- package/invitation/InvitationRedemption.js.map +1 -0
- package/invitation/index.d.ts +17 -0
- package/invitation/index.d.ts.map +1 -0
- package/invitation/index.js +9 -0
- package/invitation/index.js.map +1 -0
- package/invitation/useCreateInvitation.d.ts +52 -0
- package/invitation/useCreateInvitation.d.ts.map +1 -0
- package/invitation/useCreateInvitation.js +55 -0
- package/invitation/useCreateInvitation.js.map +1 -0
- package/invitation/useInvitationPreview.d.ts +51 -0
- package/invitation/useInvitationPreview.d.ts.map +1 -0
- package/invitation/useInvitationPreview.js +80 -0
- package/invitation/useInvitationPreview.js.map +1 -0
- package/invitation/useOrgInvitations.d.ts +36 -0
- package/invitation/useOrgInvitations.d.ts.map +1 -0
- package/invitation/useOrgInvitations.js +65 -0
- package/invitation/useOrgInvitations.js.map +1 -0
- package/invitation/useRedeemInvitation.d.ts +47 -0
- package/invitation/useRedeemInvitation.d.ts.map +1 -0
- package/invitation/useRedeemInvitation.js +53 -0
- package/invitation/useRedeemInvitation.js.map +1 -0
- package/invitation/useRevokeInvitation.d.ts +35 -0
- package/invitation/useRevokeInvitation.d.ts.map +1 -0
- package/invitation/useRevokeInvitation.js +47 -0
- package/invitation/useRevokeInvitation.js.map +1 -0
- package/library/detect-skill-package.d.ts +1 -0
- package/library/detect-skill-package.d.ts.map +1 -1
- package/library/detect-skill-package.js.map +1 -1
- package/library/detect-stigmer-resource.d.ts +1 -0
- package/library/detect-stigmer-resource.d.ts.map +1 -1
- package/library/detect-stigmer-resource.js.map +1 -1
- package/library/parse-resource-yaml.d.ts +4 -0
- package/library/parse-resource-yaml.d.ts.map +1 -1
- package/library/parse-resource-yaml.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts +2 -2
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/index.d.ts +1 -1
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/mcpServerSetupReducer.d.ts +54 -0
- package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -1
- package/mcp-server/mcpServerSetupReducer.js.map +1 -1
- package/models/ModelSelector.d.ts +9 -0
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +9 -0
- package/models/ModelSelector.js.map +1 -1
- package/models/registry.d.ts +11 -1
- package/models/registry.d.ts.map +1 -1
- package/models/registry.js.map +1 -1
- package/models/useModelRegistry.d.ts +20 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +20 -0
- package/models/useModelRegistry.js.map +1 -1
- package/organization/OrgProfilePanel.d.ts +31 -0
- package/organization/OrgProfilePanel.d.ts.map +1 -0
- package/organization/OrgProfilePanel.js +147 -0
- package/organization/OrgProfilePanel.js.map +1 -0
- package/organization/index.d.ts +6 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +3 -0
- package/organization/index.js.map +1 -1
- package/organization/useOrganization.d.ts +31 -0
- package/organization/useOrganization.d.ts.map +1 -0
- package/organization/useOrganization.js +56 -0
- package/organization/useOrganization.js.map +1 -0
- package/organization/useUpdateOrganization.d.ts +40 -0
- package/organization/useUpdateOrganization.d.ts.map +1 -0
- package/organization/useUpdateOrganization.js +51 -0
- package/organization/useUpdateOrganization.js.map +1 -0
- package/package.json +4 -4
- package/provider.d.ts +1 -0
- package/provider.d.ts.map +1 -1
- package/provider.js.map +1 -1
- package/search/useResourceList.d.ts +4 -2
- package/search/useResourceList.d.ts.map +1 -1
- package/search/useResourceList.js +2 -1
- package/search/useResourceList.js.map +1 -1
- package/search/useResourceSearch.d.ts +10 -2
- package/search/useResourceSearch.d.ts.map +1 -1
- package/search/useResourceSearch.js +2 -1
- package/search/useResourceSearch.js.map +1 -1
- package/session/group-sessions.d.ts +23 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +23 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +1 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js.map +1 -1
- package/session/useCreateSession.d.ts +11 -2
- package/session/useCreateSession.d.ts.map +1 -1
- package/session/useCreateSession.js.map +1 -1
- package/session/useSession.d.ts +24 -0
- package/session/useSession.d.ts.map +1 -1
- package/session/useSession.js +24 -0
- package/session/useSession.js.map +1 -1
- package/session/useSessionArtifacts.d.ts +1 -0
- package/session/useSessionArtifacts.d.ts.map +1 -1
- package/session/useSessionArtifacts.js.map +1 -1
- package/session/useSessionConversation.d.ts +7 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionExecutions.d.ts +23 -0
- package/session/useSessionExecutions.d.ts.map +1 -1
- package/session/useSessionExecutions.js +23 -0
- package/session/useSessionExecutions.js.map +1 -1
- package/session/useSessionList.d.ts +19 -0
- package/session/useSessionList.d.ts.map +1 -1
- package/session/useSessionList.js +19 -0
- package/session/useSessionList.js.map +1 -1
- package/session/useSessionWriteBacks.d.ts +1 -0
- package/session/useSessionWriteBacks.d.ts.map +1 -1
- package/session/useSessionWriteBacks.js.map +1 -1
- package/session/useUpdateSession.d.ts +22 -0
- package/session/useUpdateSession.d.ts.map +1 -1
- package/session/useUpdateSession.js +22 -0
- package/session/useUpdateSession.js.map +1 -1
- package/skill/SkillPicker.d.ts +15 -0
- package/skill/SkillPicker.d.ts.map +1 -1
- package/skill/SkillPicker.js +15 -0
- package/skill/SkillPicker.js.map +1 -1
- package/src/agent/AgentEnvForm.tsx +2 -0
- package/src/agent/AgentPicker.tsx +2 -0
- package/src/agent/agentSetupReducer.ts +109 -20
- package/src/agent/useAgentCount.ts +2 -0
- package/src/attachment/AttachmentChipList.tsx +15 -0
- package/src/attachment/useAttachments.ts +14 -0
- package/src/composer/useComposer.ts +5 -0
- package/src/execution/ExecutionPhaseBadge.tsx +1 -1
- package/src/execution/McpToolDetail.tsx +18 -6
- package/src/execution/TodoList.tsx +8 -0
- package/src/execution/ToolArgsView.tsx +1 -0
- package/src/execution/UsageWidget.tsx +1 -1
- package/src/execution/file-path-resolver.ts +28 -4
- package/src/execution/index.ts +5 -1
- package/src/execution/useArtifactContent.ts +33 -0
- package/src/execution/useSubmitApproval.ts +2 -0
- package/src/github/GitHubRepoPicker.tsx +13 -0
- package/src/github/useGitHubConnection.ts +29 -1
- package/src/github/useGitHubRepos.ts +31 -0
- package/src/github/useGitHubSearch.ts +25 -0
- package/src/iam-policy/GrantAccessForm.tsx +198 -0
- package/src/iam-policy/OrgMembersPanel.tsx +572 -0
- package/src/iam-policy/RoleSelector.tsx +105 -0
- package/src/iam-policy/index.ts +51 -0
- package/src/iam-policy/useCreateIamPolicy.ts +66 -0
- package/src/iam-policy/useDeleteIamPolicy.ts +65 -0
- package/src/iam-policy/useGrantableRoles.ts +45 -0
- package/src/iam-policy/usePrincipalsCount.ts +96 -0
- package/src/iam-policy/useResourceAccess.ts +128 -0
- package/src/iam-policy/useRevokeOrgAccess.ts +74 -0
- package/src/iam-policy/useRoleSelector.ts +97 -0
- package/src/iam-policy/useWhoAmI.ts +78 -0
- package/src/identity-provider/CreateIdentityProviderForm.tsx +308 -0
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +583 -0
- package/src/identity-provider/IdentityProviderListPanel.tsx +370 -0
- package/src/identity-provider/IdentityProviderWizard.tsx +684 -0
- package/src/identity-provider/ProviderPicker.tsx +152 -0
- package/src/identity-provider/SsoLoginPrompt.tsx +404 -0
- package/src/identity-provider/index.ts +67 -0
- package/src/identity-provider/presets.ts +262 -0
- package/src/identity-provider/useCreateIdentityProvider.ts +68 -0
- package/src/identity-provider/useDeleteIdentityProvider.ts +65 -0
- package/src/identity-provider/useIdentityProvider.ts +86 -0
- package/src/identity-provider/useIdentityProviderList.ts +100 -0
- package/src/identity-provider/useOidcDiscovery.ts +124 -0
- package/src/identity-provider/useSsoProvider.ts +99 -0
- package/src/identity-provider/useUpdateIdentityProvider.ts +69 -0
- package/src/index.ts +121 -1
- package/src/internal/CloudFeatureNotice.tsx +12 -0
- package/src/invitation/InvitationCreatedAlert.tsx +185 -0
- package/src/invitation/InvitationManager.tsx +842 -0
- package/src/invitation/InvitationRedemption.tsx +434 -0
- package/src/invitation/index.ts +16 -0
- package/src/invitation/useCreateInvitation.ts +83 -0
- package/src/invitation/useInvitationPreview.ts +103 -0
- package/src/invitation/useOrgInvitations.ts +88 -0
- package/src/invitation/useRedeemInvitation.ts +82 -0
- package/src/invitation/useRevokeInvitation.ts +66 -0
- package/src/library/detect-skill-package.ts +4 -1
- package/src/library/detect-stigmer-resource.ts +4 -1
- package/src/library/parse-resource-yaml.ts +12 -2
- package/src/mcp-server/McpServerDetailView.tsx +2 -1
- package/src/mcp-server/index.ts +4 -1
- package/src/mcp-server/mcpServerSetupReducer.ts +86 -8
- package/src/models/ModelSelector.tsx +9 -0
- package/src/models/registry.ts +11 -1
- package/src/models/useModelRegistry.ts +20 -0
- package/src/organization/OrgProfilePanel.tsx +451 -0
- package/src/organization/index.ts +6 -0
- package/src/organization/useOrganization.ts +79 -0
- package/src/organization/useUpdateOrganization.ts +71 -0
- package/src/provider.tsx +1 -0
- package/src/search/useResourceList.ts +6 -3
- package/src/search/useResourceSearch.ts +12 -3
- package/src/session/group-sessions.ts +23 -0
- package/src/session/index.ts +1 -0
- package/src/session/useCreateSession.ts +19 -3
- package/src/session/useSession.ts +24 -0
- package/src/session/useSessionArtifacts.ts +1 -0
- package/src/session/useSessionConversation.ts +7 -0
- package/src/session/useSessionExecutions.ts +23 -0
- package/src/session/useSessionList.ts +19 -0
- package/src/session/useSessionWriteBacks.ts +1 -0
- package/src/session/useUpdateSession.ts +22 -0
- package/src/skill/SkillPicker.tsx +15 -0
- package/src/usage/OrgUsagePanel.tsx +465 -0
- package/src/usage/date-range.ts +86 -0
- package/src/usage/index.ts +13 -0
- package/src/usage/useOrgUsageReport.ts +110 -0
- package/src/workspace/FolderBrowser.tsx +9 -0
- package/src/workspace/WorkspaceEditor.tsx +17 -0
- package/src/workspace/useFolderListing.ts +24 -0
- package/src/workspace/useWorkspaceEntries.ts +38 -0
- package/styles.css +1 -1
- package/usage/OrgUsagePanel.d.ts +24 -0
- package/usage/OrgUsagePanel.d.ts.map +1 -0
- package/usage/OrgUsagePanel.js +134 -0
- package/usage/OrgUsagePanel.js.map +1 -0
- package/usage/date-range.d.ts +36 -0
- package/usage/date-range.d.ts.map +1 -0
- package/usage/date-range.js +69 -0
- package/usage/date-range.js.map +1 -0
- package/usage/index.d.ts +7 -0
- package/usage/index.d.ts.map +1 -0
- package/usage/index.js +4 -0
- package/usage/index.js.map +1 -0
- package/usage/useOrgUsageReport.d.ts +48 -0
- package/usage/useOrgUsageReport.d.ts.map +1 -0
- package/usage/useOrgUsageReport.js +72 -0
- package/usage/useOrgUsageReport.js.map +1 -0
- package/workspace/FolderBrowser.d.ts +9 -0
- package/workspace/FolderBrowser.d.ts.map +1 -1
- package/workspace/FolderBrowser.js +9 -0
- package/workspace/FolderBrowser.js.map +1 -1
- package/workspace/WorkspaceEditor.d.ts +17 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +17 -0
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/useFolderListing.d.ts +24 -0
- package/workspace/useFolderListing.d.ts.map +1 -1
- package/workspace/useFolderListing.js +24 -0
- package/workspace/useFolderListing.js.map +1 -1
- package/workspace/useWorkspaceEntries.d.ts +38 -0
- package/workspace/useWorkspaceEntries.d.ts.map +1 -1
- package/workspace/useWorkspaceEntries.js +25 -0
- package/workspace/useWorkspaceEntries.js.map +1 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Subset of an OIDC Discovery document relevant for identity provider
|
|
7
|
+
* creation.
|
|
8
|
+
*/
|
|
9
|
+
export interface OidcDiscoveryResult {
|
|
10
|
+
readonly issuer: string;
|
|
11
|
+
readonly jwksUri: string;
|
|
12
|
+
readonly userinfoEndpoint?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Return value of {@link useOidcDiscovery}. */
|
|
16
|
+
export interface UseOidcDiscoveryReturn {
|
|
17
|
+
/**
|
|
18
|
+
* Fetch the OIDC Discovery document for the given issuer URL.
|
|
19
|
+
*
|
|
20
|
+
* Resolves with the parsed result on success, or `null` when the
|
|
21
|
+
* fetch fails (CORS, network, invalid document). Error details are
|
|
22
|
+
* available via the `error` property.
|
|
23
|
+
*/
|
|
24
|
+
readonly discover: (issuerUrl: string) => Promise<OidcDiscoveryResult | null>;
|
|
25
|
+
/** `true` while a discovery fetch is in flight. */
|
|
26
|
+
readonly isDiscovering: boolean;
|
|
27
|
+
/** Error from the last failed discovery, or `null` when healthy. */
|
|
28
|
+
readonly error: Error | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Behavior hook that fetches an OIDC Discovery document from the
|
|
33
|
+
* browser.
|
|
34
|
+
*
|
|
35
|
+
* Used by the "Custom OIDC" path in the identity provider creation
|
|
36
|
+
* wizard. The hook exposes an imperative `discover()` function
|
|
37
|
+
* (rather than an effect-based pattern) because discovery is
|
|
38
|
+
* triggered by user action ("Continue"), not by render.
|
|
39
|
+
*
|
|
40
|
+
* CORS may block the fetch for some providers. When this happens
|
|
41
|
+
* the hook returns `null` from `discover()` and populates `error`
|
|
42
|
+
* so the wizard can fall back to manual configuration.
|
|
43
|
+
*/
|
|
44
|
+
export function useOidcDiscovery(): UseOidcDiscoveryReturn {
|
|
45
|
+
const [isDiscovering, setIsDiscovering] = useState(false);
|
|
46
|
+
const [error, setError] = useState<Error | null>(null);
|
|
47
|
+
|
|
48
|
+
const discover = useCallback(
|
|
49
|
+
async (issuerUrl: string): Promise<OidcDiscoveryResult | null> => {
|
|
50
|
+
setIsDiscovering(true);
|
|
51
|
+
setError(null);
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
const result = await fetchOidcDiscovery(issuerUrl);
|
|
55
|
+
return result;
|
|
56
|
+
} catch (err) {
|
|
57
|
+
const wrapped =
|
|
58
|
+
err instanceof Error ? err : new Error(String(err));
|
|
59
|
+
setError(wrapped);
|
|
60
|
+
return null;
|
|
61
|
+
} finally {
|
|
62
|
+
setIsDiscovering(false);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
[],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
return { discover, isDiscovering, error };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// Internal fetch
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
async function fetchOidcDiscovery(
|
|
76
|
+
issuerUrl: string,
|
|
77
|
+
): Promise<OidcDiscoveryResult> {
|
|
78
|
+
const normalized = issuerUrl.replace(/\/+$/, "");
|
|
79
|
+
const url = `${normalized}/.well-known/openid-configuration`;
|
|
80
|
+
|
|
81
|
+
let response: Response;
|
|
82
|
+
try {
|
|
83
|
+
response = await fetch(url, { mode: "cors" });
|
|
84
|
+
} catch {
|
|
85
|
+
throw new Error(
|
|
86
|
+
"Could not reach the issuer's discovery endpoint. " +
|
|
87
|
+
"The provider may not allow browser requests (CORS). " +
|
|
88
|
+
"You can enter the configuration manually instead.",
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (!response.ok) {
|
|
93
|
+
throw new Error(
|
|
94
|
+
`Discovery endpoint returned HTTP ${response.status}. ` +
|
|
95
|
+
"Verify the issuer URL is correct.",
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let data: Record<string, unknown>;
|
|
100
|
+
try {
|
|
101
|
+
data = (await response.json()) as Record<string, unknown>;
|
|
102
|
+
} catch {
|
|
103
|
+
throw new Error(
|
|
104
|
+
"Discovery endpoint returned invalid JSON. " +
|
|
105
|
+
"Verify the issuer URL points to a valid OIDC provider.",
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (typeof data.issuer !== "string" || typeof data.jwks_uri !== "string") {
|
|
110
|
+
throw new Error(
|
|
111
|
+
"Discovery document is missing required fields (issuer, jwks_uri). " +
|
|
112
|
+
"This may not be a compliant OpenID Connect provider.",
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
issuer: data.issuer,
|
|
118
|
+
jwksUri: data.jwks_uri,
|
|
119
|
+
userinfoEndpoint:
|
|
120
|
+
typeof data.userinfo_endpoint === "string"
|
|
121
|
+
? data.userinfo_endpoint
|
|
122
|
+
: undefined,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { create } from "@bufbuild/protobuf";
|
|
5
|
+
import { OrganizationSsoLookupSchema, type SsoProviderInfo } from "@stigmer/protos/ai/stigmer/iam/identityprovider/v1/io_pb";
|
|
6
|
+
import { isNotFound } from "@stigmer/sdk";
|
|
7
|
+
import { useStigmer } from "../hooks";
|
|
8
|
+
import { toError } from "../internal/toError";
|
|
9
|
+
|
|
10
|
+
/** Return value of {@link useSsoProvider}. */
|
|
11
|
+
export interface UseSsoProviderReturn {
|
|
12
|
+
/** SSO provider info for the organization, or `null` if not configured, loading, or on error. */
|
|
13
|
+
readonly ssoProvider: SsoProviderInfo | null;
|
|
14
|
+
/** `true` while the lookup is in flight. */
|
|
15
|
+
readonly isLoading: boolean;
|
|
16
|
+
/** Error from the last failed request, or `null` when healthy. `null` when the org simply has no SSO configured (NOT_FOUND is treated as absent, not an error). */
|
|
17
|
+
readonly error: Error | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Data hook that looks up the SSO identity provider for an organization.
|
|
22
|
+
*
|
|
23
|
+
* Returns the minimal OIDC configuration needed to render an SSO login
|
|
24
|
+
* button and initiate the Authorization Code flow: display name, OIDC
|
|
25
|
+
* client ID, and issuer URL.
|
|
26
|
+
*
|
|
27
|
+
* This is the only identity-provider hook that works **unauthenticated**
|
|
28
|
+
* — the backend skips authorization because it is called by the login
|
|
29
|
+
* page before the user has signed in.
|
|
30
|
+
*
|
|
31
|
+
* When the organization has no SSO provider configured, `ssoProvider`
|
|
32
|
+
* is `null` and `error` remains `null` — absence is not an error.
|
|
33
|
+
*
|
|
34
|
+
* Pass `null` to skip the lookup (stable no-op).
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* function LoginPage({ org }: { org: string }) {
|
|
39
|
+
* const { ssoProvider, isLoading } = useSsoProvider(org);
|
|
40
|
+
*
|
|
41
|
+
* if (isLoading) return <Skeleton />;
|
|
42
|
+
*
|
|
43
|
+
* return (
|
|
44
|
+
* <div>
|
|
45
|
+
* <EmailPasswordForm />
|
|
46
|
+
* {ssoProvider && (
|
|
47
|
+
* <SsoLoginButton
|
|
48
|
+
* label={`Sign in with ${ssoProvider.displayName}`}
|
|
49
|
+
* clientId={ssoProvider.oidcClientId}
|
|
50
|
+
* issuer={ssoProvider.issuer}
|
|
51
|
+
* />
|
|
52
|
+
* )}
|
|
53
|
+
* </div>
|
|
54
|
+
* );
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export function useSsoProvider(org: string | null): UseSsoProviderReturn {
|
|
59
|
+
const stigmer = useStigmer();
|
|
60
|
+
const [ssoProvider, setSsoProvider] = useState<SsoProviderInfo | null>(null);
|
|
61
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
62
|
+
const [error, setError] = useState<Error | null>(null);
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!org) {
|
|
66
|
+
setSsoProvider(null);
|
|
67
|
+
setIsLoading(false);
|
|
68
|
+
setError(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const cancelled = { current: false };
|
|
73
|
+
setIsLoading(true);
|
|
74
|
+
setError(null);
|
|
75
|
+
|
|
76
|
+
stigmer.identityProvider.getSsoProvider(create(OrganizationSsoLookupSchema, { org })).then(
|
|
77
|
+
(result) => {
|
|
78
|
+
if (cancelled.current) return;
|
|
79
|
+
setSsoProvider(result);
|
|
80
|
+
setIsLoading(false);
|
|
81
|
+
},
|
|
82
|
+
(err) => {
|
|
83
|
+
if (cancelled.current) return;
|
|
84
|
+
if (isNotFound(err)) {
|
|
85
|
+
setSsoProvider(null);
|
|
86
|
+
} else {
|
|
87
|
+
setError(toError(err));
|
|
88
|
+
}
|
|
89
|
+
setIsLoading(false);
|
|
90
|
+
},
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
return () => {
|
|
94
|
+
cancelled.current = true;
|
|
95
|
+
};
|
|
96
|
+
}, [org, stigmer]);
|
|
97
|
+
|
|
98
|
+
return { ssoProvider, isLoading, error };
|
|
99
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import type { IdentityProviderInput } from "@stigmer/sdk";
|
|
5
|
+
import type { IdentityProvider } from "@stigmer/protos/ai/stigmer/iam/identityprovider/v1/api_pb";
|
|
6
|
+
import { useStigmer } from "../hooks";
|
|
7
|
+
import { toError } from "../internal/toError";
|
|
8
|
+
|
|
9
|
+
/** Return value of {@link useUpdateIdentityProvider}. */
|
|
10
|
+
export interface UseUpdateIdentityProviderReturn {
|
|
11
|
+
/** Submit an {@link IdentityProviderInput} to update an existing identity provider. Resolves with the updated resource. */
|
|
12
|
+
readonly update: (input: IdentityProviderInput) => Promise<IdentityProvider>;
|
|
13
|
+
/** `true` while the update request is in flight. */
|
|
14
|
+
readonly isUpdating: boolean;
|
|
15
|
+
/** Error from the last failed update, or `null` when healthy. */
|
|
16
|
+
readonly error: Error | null;
|
|
17
|
+
/** Reset `error` to `null`. */
|
|
18
|
+
readonly clearError: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Mutation hook that wraps `identityProvider.update()` with loading
|
|
23
|
+
* and error state.
|
|
24
|
+
*
|
|
25
|
+
* Updates an existing identity provider. The input must include the
|
|
26
|
+
* `slug` field to identify the target resource, along with the updated
|
|
27
|
+
* spec fields.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const { update, isUpdating, error } = useUpdateIdentityProvider();
|
|
32
|
+
*
|
|
33
|
+
* await update({
|
|
34
|
+
* name: "Acme Corp SSO",
|
|
35
|
+
* slug: "acme-sso",
|
|
36
|
+
* org: "acme",
|
|
37
|
+
* displayName: "Acme Corp SSO",
|
|
38
|
+
* isSsoProvider: true,
|
|
39
|
+
* oidcClientId: "abc123",
|
|
40
|
+
* });
|
|
41
|
+
* refetch(); // refresh detail view
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export function useUpdateIdentityProvider(): UseUpdateIdentityProviderReturn {
|
|
45
|
+
const stigmer = useStigmer();
|
|
46
|
+
const [isUpdating, setIsUpdating] = useState(false);
|
|
47
|
+
const [error, setError] = useState<Error | null>(null);
|
|
48
|
+
|
|
49
|
+
const clearError = useCallback(() => setError(null), []);
|
|
50
|
+
|
|
51
|
+
const update = useCallback(
|
|
52
|
+
async (input: IdentityProviderInput): Promise<IdentityProvider> => {
|
|
53
|
+
setIsUpdating(true);
|
|
54
|
+
setError(null);
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
return await stigmer.identityProvider.update(input);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
setError(toError(err));
|
|
60
|
+
throw err;
|
|
61
|
+
} finally {
|
|
62
|
+
setIsUpdating(false);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
[stigmer],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
return { update, isUpdating, error, clearError };
|
|
69
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export {
|
|
|
61
61
|
resolvedSubject,
|
|
62
62
|
} from "./session";
|
|
63
63
|
export type {
|
|
64
|
+
SharedSessionFields,
|
|
64
65
|
CreateSessionInput,
|
|
65
66
|
CreateSessionResult,
|
|
66
67
|
UseCreateSessionReturn,
|
|
@@ -149,6 +150,8 @@ export type {
|
|
|
149
150
|
ToolCallGroupProps,
|
|
150
151
|
ToolCallDetailProps,
|
|
151
152
|
McpToolDetailProps,
|
|
153
|
+
McpArgsViewProps,
|
|
154
|
+
McpMetadataRowProps,
|
|
152
155
|
ToolArgsViewProps,
|
|
153
156
|
ToolCallItemProps,
|
|
154
157
|
SubAgentSectionProps,
|
|
@@ -243,6 +246,7 @@ export type {
|
|
|
243
246
|
McpServerConfigPanelProps,
|
|
244
247
|
McpServerCredentialsProps,
|
|
245
248
|
McpServerDetailViewProps,
|
|
249
|
+
CapabilityTab,
|
|
246
250
|
McpToolSelectorProps,
|
|
247
251
|
UseDiscoverCapabilitiesReturn,
|
|
248
252
|
UseMcpServerCredentialsReturn,
|
|
@@ -369,14 +373,51 @@ export type {
|
|
|
369
373
|
UseSessionEnvPoolReturn,
|
|
370
374
|
} from "./environment";
|
|
371
375
|
|
|
372
|
-
//
|
|
376
|
+
// IAM Policy — data hooks, behavior hooks, headless hook, and styled components for access management
|
|
373
377
|
export {
|
|
378
|
+
useGrantableRoles,
|
|
379
|
+
useRoleSelector,
|
|
380
|
+
useResourceAccess,
|
|
381
|
+
usePrincipalsCount,
|
|
382
|
+
useWhoAmI,
|
|
383
|
+
useCreateIamPolicy,
|
|
384
|
+
useDeleteIamPolicy,
|
|
385
|
+
useRevokeOrgAccess,
|
|
386
|
+
RoleSelector,
|
|
387
|
+
GrantAccessForm,
|
|
388
|
+
OrgMembersPanel,
|
|
389
|
+
} from "./iam-policy";
|
|
390
|
+
export type {
|
|
391
|
+
UseGrantableRolesReturn,
|
|
392
|
+
RoleOption,
|
|
393
|
+
UseRoleSelectorReturn,
|
|
394
|
+
ResourceAccessRef,
|
|
395
|
+
UseResourceAccessOptions,
|
|
396
|
+
UseResourceAccessReturn,
|
|
397
|
+
UsePrincipalsCountReturn,
|
|
398
|
+
UseWhoAmIReturn,
|
|
399
|
+
UseCreateIamPolicyReturn,
|
|
400
|
+
UseDeleteIamPolicyReturn,
|
|
401
|
+
UseRevokeOrgAccessReturn,
|
|
402
|
+
RoleSelectorProps,
|
|
403
|
+
GrantAccessFormProps,
|
|
404
|
+
OrgMembersPanelProps,
|
|
405
|
+
} from "./iam-policy";
|
|
406
|
+
|
|
407
|
+
// Organization — data hook, behavior hooks, styled form for creation, and profile panel
|
|
408
|
+
export {
|
|
409
|
+
useOrganization,
|
|
374
410
|
useCreateOrganization,
|
|
411
|
+
useUpdateOrganization,
|
|
375
412
|
CreateOrganizationForm,
|
|
413
|
+
OrgProfilePanel,
|
|
376
414
|
} from "./organization";
|
|
377
415
|
export type {
|
|
416
|
+
UseOrganizationReturn,
|
|
378
417
|
UseCreateOrganizationReturn,
|
|
418
|
+
UseUpdateOrganizationReturn,
|
|
379
419
|
CreateOrganizationFormProps,
|
|
420
|
+
OrgProfilePanelProps,
|
|
380
421
|
} from "./organization";
|
|
381
422
|
|
|
382
423
|
// API Key — data hooks, behavior hooks, and styled components for API key lifecycle
|
|
@@ -397,6 +438,63 @@ export type {
|
|
|
397
438
|
ApiKeyCreatedAlertProps,
|
|
398
439
|
} from "./api-key";
|
|
399
440
|
|
|
441
|
+
// Identity Provider — data hooks, mutation hooks, styled components, presets, and guided wizard for IdP management and SSO discovery
|
|
442
|
+
export {
|
|
443
|
+
useIdentityProviderList,
|
|
444
|
+
useIdentityProvider,
|
|
445
|
+
useSsoProvider,
|
|
446
|
+
useCreateIdentityProvider,
|
|
447
|
+
useUpdateIdentityProvider,
|
|
448
|
+
useDeleteIdentityProvider,
|
|
449
|
+
IdentityProviderListPanel,
|
|
450
|
+
CreateIdentityProviderForm,
|
|
451
|
+
PROVIDER_PRESETS,
|
|
452
|
+
getPreset,
|
|
453
|
+
ProviderPicker,
|
|
454
|
+
IdentityProviderWizard,
|
|
455
|
+
IdentityProviderDetailPanel,
|
|
456
|
+
SsoLoginPrompt,
|
|
457
|
+
} from "./identity-provider";
|
|
458
|
+
export type {
|
|
459
|
+
UseIdentityProviderListReturn,
|
|
460
|
+
UseIdentityProviderReturn,
|
|
461
|
+
UseSsoProviderReturn,
|
|
462
|
+
UseCreateIdentityProviderReturn,
|
|
463
|
+
UseUpdateIdentityProviderReturn,
|
|
464
|
+
UseDeleteIdentityProviderReturn,
|
|
465
|
+
IdentityProviderListPanelProps,
|
|
466
|
+
CreateIdentityProviderFormProps,
|
|
467
|
+
ProviderPreset,
|
|
468
|
+
ProviderVariable,
|
|
469
|
+
ProviderConfig,
|
|
470
|
+
ProviderPickerProps,
|
|
471
|
+
IdentityProviderWizardProps,
|
|
472
|
+
IdentityProviderDetailPanelProps,
|
|
473
|
+
SsoLoginPromptProps,
|
|
474
|
+
} from "./identity-provider";
|
|
475
|
+
|
|
476
|
+
// Invitation — data hooks, behavior hooks, and feature components for org invite links
|
|
477
|
+
export {
|
|
478
|
+
useOrgInvitations,
|
|
479
|
+
useCreateInvitation,
|
|
480
|
+
useRevokeInvitation,
|
|
481
|
+
useInvitationPreview,
|
|
482
|
+
useRedeemInvitation,
|
|
483
|
+
InvitationCreatedAlert,
|
|
484
|
+
InvitationManager,
|
|
485
|
+
InvitationRedemption,
|
|
486
|
+
} from "./invitation";
|
|
487
|
+
export type {
|
|
488
|
+
UseOrgInvitationsReturn,
|
|
489
|
+
UseCreateInvitationReturn,
|
|
490
|
+
UseRevokeInvitationReturn,
|
|
491
|
+
UseInvitationPreviewReturn,
|
|
492
|
+
UseRedeemInvitationReturn,
|
|
493
|
+
InvitationCreatedAlertProps,
|
|
494
|
+
InvitationManagerProps,
|
|
495
|
+
InvitationRedemptionProps,
|
|
496
|
+
} from "./invitation";
|
|
497
|
+
|
|
400
498
|
// Error — structured error display with classification, retry, and contextual guidance
|
|
401
499
|
export { ErrorMessage, SecretFlowErrorGuide, isSecretFlowError } from "./error";
|
|
402
500
|
export type { ErrorMessageProps, SecretFlowErrorGuideProps } from "./error";
|
|
@@ -436,6 +534,28 @@ export type {
|
|
|
436
534
|
UseUpdateVisibilityReturn,
|
|
437
535
|
} from "./library";
|
|
438
536
|
|
|
537
|
+
// Search — shared search/list/count infrastructure re-exported for public API surface
|
|
538
|
+
export type {
|
|
539
|
+
UseResourceSearchOptions,
|
|
540
|
+
UseResourceSearchReturn,
|
|
541
|
+
} from "./search";
|
|
542
|
+
|
|
543
|
+
// Usage — org-level usage report hook, dashboard panel, and date-range utilities
|
|
544
|
+
export {
|
|
545
|
+
useOrgUsageReport,
|
|
546
|
+
OrgUsagePanel,
|
|
547
|
+
DATE_RANGE_PRESETS,
|
|
548
|
+
dateRangeFromPreset,
|
|
549
|
+
formatDateRange,
|
|
550
|
+
presetLabel,
|
|
551
|
+
} from "./usage";
|
|
552
|
+
export type {
|
|
553
|
+
UseOrgUsageReportReturn,
|
|
554
|
+
OrgUsagePanelProps,
|
|
555
|
+
DateRange,
|
|
556
|
+
DateRangePreset,
|
|
557
|
+
} from "./usage";
|
|
558
|
+
|
|
439
559
|
// Agent Instance — data hooks, list hook, personal convenience hook, and behavior hook
|
|
440
560
|
export {
|
|
441
561
|
useAgentInstance,
|
|
@@ -21,6 +21,18 @@ export interface CloudFeatureNoticeProps {
|
|
|
21
21
|
*
|
|
22
22
|
* All visual properties flow through `--stgm-*` design tokens.
|
|
23
23
|
* No Console-specific dependencies — safe for platform builder embedding.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const available = useResourceAvailable(ApiResourceKind.api_key);
|
|
28
|
+
* if (!available) {
|
|
29
|
+
* return (
|
|
30
|
+
* <CloudFeatureNotice>
|
|
31
|
+
* API keys require Stigmer Cloud. Run with <code>--cloud</code> to enable.
|
|
32
|
+
* </CloudFeatureNotice>
|
|
33
|
+
* );
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
24
36
|
*/
|
|
25
37
|
export function CloudFeatureNotice({
|
|
26
38
|
children,
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Public API
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
/** Props for {@link InvitationCreatedAlert}. */
|
|
11
|
+
export interface InvitationCreatedAlertProps {
|
|
12
|
+
/** The full invite URL to display and copy. */
|
|
13
|
+
readonly inviteUrl: string;
|
|
14
|
+
/** Human-readable label describing the invitation's purpose. */
|
|
15
|
+
readonly label: string;
|
|
16
|
+
/** Fired when the user dismisses the alert. */
|
|
17
|
+
readonly onDismiss: () => void;
|
|
18
|
+
/** Additional CSS class names for the root container. */
|
|
19
|
+
readonly className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* One-time banner displayed after a new invitation link is created.
|
|
24
|
+
*
|
|
25
|
+
* Shows the invite URL in a monospace read-only field with a **Copy**
|
|
26
|
+
* button. While invite URLs are always retrievable from the invitation
|
|
27
|
+
* list, surfacing the URL immediately after creation provides the
|
|
28
|
+
* critical "copy and share" moment that admins expect.
|
|
29
|
+
*
|
|
30
|
+
* This is a standalone alert component, not a modal — the parent
|
|
31
|
+
* decides how to present and position it.
|
|
32
|
+
*
|
|
33
|
+
* All visual properties flow through `--stgm-*` design tokens.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <InvitationCreatedAlert
|
|
38
|
+
* inviteUrl="https://app.stigmer.ai/invite/abc123..."
|
|
39
|
+
* label="Engineering team invite"
|
|
40
|
+
* onDismiss={() => setCreatedUrl(null)}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export function InvitationCreatedAlert({
|
|
45
|
+
inviteUrl,
|
|
46
|
+
label,
|
|
47
|
+
onDismiss,
|
|
48
|
+
className,
|
|
49
|
+
}: InvitationCreatedAlertProps) {
|
|
50
|
+
const [copied, setCopied] = useState(false);
|
|
51
|
+
|
|
52
|
+
const handleCopy = useCallback(async () => {
|
|
53
|
+
try {
|
|
54
|
+
await navigator.clipboard.writeText(inviteUrl);
|
|
55
|
+
setCopied(true);
|
|
56
|
+
setTimeout(() => setCopied(false), 2000);
|
|
57
|
+
} catch {
|
|
58
|
+
const el = document.getElementById("stgm-invite-url-reveal");
|
|
59
|
+
if (el) {
|
|
60
|
+
const selection = window.getSelection();
|
|
61
|
+
const range = document.createRange();
|
|
62
|
+
range.selectNodeContents(el);
|
|
63
|
+
selection?.removeAllRanges();
|
|
64
|
+
selection?.addRange(range);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, [inviteUrl]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<div
|
|
71
|
+
role="alert"
|
|
72
|
+
className={cn(
|
|
73
|
+
"rounded-lg border border-primary/30 bg-primary-subtle p-4",
|
|
74
|
+
className,
|
|
75
|
+
)}
|
|
76
|
+
>
|
|
77
|
+
<div className="mb-2 flex items-start justify-between gap-3">
|
|
78
|
+
<div className="min-w-0">
|
|
79
|
+
<p className="text-sm font-medium text-foreground">
|
|
80
|
+
Invite link created: {label}
|
|
81
|
+
</p>
|
|
82
|
+
<p className="mt-0.5 text-xs text-muted-foreground">
|
|
83
|
+
Share this link to invite people to your organization.
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
<button
|
|
87
|
+
type="button"
|
|
88
|
+
onClick={onDismiss}
|
|
89
|
+
aria-label="Dismiss"
|
|
90
|
+
className={cn(
|
|
91
|
+
"shrink-0 rounded p-1",
|
|
92
|
+
"text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
93
|
+
"transition-colors",
|
|
94
|
+
)}
|
|
95
|
+
>
|
|
96
|
+
<CloseIcon />
|
|
97
|
+
</button>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div className="flex items-center gap-2">
|
|
101
|
+
<code
|
|
102
|
+
id="stgm-invite-url-reveal"
|
|
103
|
+
className={cn(
|
|
104
|
+
"min-w-0 flex-1 select-all truncate rounded-md",
|
|
105
|
+
"border border-input bg-background px-2.5 py-1.5",
|
|
106
|
+
"font-mono text-xs text-foreground",
|
|
107
|
+
)}
|
|
108
|
+
>
|
|
109
|
+
{inviteUrl}
|
|
110
|
+
</code>
|
|
111
|
+
|
|
112
|
+
<button
|
|
113
|
+
type="button"
|
|
114
|
+
onClick={handleCopy}
|
|
115
|
+
className={cn(
|
|
116
|
+
"inline-flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium",
|
|
117
|
+
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
118
|
+
"transition-colors",
|
|
119
|
+
)}
|
|
120
|
+
>
|
|
121
|
+
{copied ? <CheckIcon /> : <CopyIcon />}
|
|
122
|
+
{copied ? "Copied" : "Copy"}
|
|
123
|
+
</button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
// Icons
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
function CopyIcon() {
|
|
134
|
+
return (
|
|
135
|
+
<svg
|
|
136
|
+
width="12"
|
|
137
|
+
height="12"
|
|
138
|
+
viewBox="0 0 16 16"
|
|
139
|
+
fill="none"
|
|
140
|
+
stroke="currentColor"
|
|
141
|
+
strokeWidth="1.5"
|
|
142
|
+
strokeLinecap="round"
|
|
143
|
+
strokeLinejoin="round"
|
|
144
|
+
aria-hidden="true"
|
|
145
|
+
>
|
|
146
|
+
<rect x="5" y="5" width="9" height="9" rx="1.5" />
|
|
147
|
+
<path d="M5 11H3.5A1.5 1.5 0 0 1 2 9.5V3.5A1.5 1.5 0 0 1 3.5 2h6A1.5 1.5 0 0 1 11 3.5V5" />
|
|
148
|
+
</svg>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function CheckIcon() {
|
|
153
|
+
return (
|
|
154
|
+
<svg
|
|
155
|
+
width="12"
|
|
156
|
+
height="12"
|
|
157
|
+
viewBox="0 0 16 16"
|
|
158
|
+
fill="none"
|
|
159
|
+
stroke="currentColor"
|
|
160
|
+
strokeWidth="2"
|
|
161
|
+
strokeLinecap="round"
|
|
162
|
+
strokeLinejoin="round"
|
|
163
|
+
aria-hidden="true"
|
|
164
|
+
>
|
|
165
|
+
<path d="M3 8.5l3.5 3.5L13 5" />
|
|
166
|
+
</svg>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function CloseIcon() {
|
|
171
|
+
return (
|
|
172
|
+
<svg
|
|
173
|
+
width="14"
|
|
174
|
+
height="14"
|
|
175
|
+
viewBox="0 0 16 16"
|
|
176
|
+
fill="none"
|
|
177
|
+
stroke="currentColor"
|
|
178
|
+
strokeWidth="1.5"
|
|
179
|
+
strokeLinecap="round"
|
|
180
|
+
aria-hidden="true"
|
|
181
|
+
>
|
|
182
|
+
<path d="M4 4l8 8M12 4l-8 8" />
|
|
183
|
+
</svg>
|
|
184
|
+
);
|
|
185
|
+
}
|