@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,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { create } from "@bufbuild/protobuf";
|
|
5
|
+
import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
|
|
6
|
+
import { ListInvitationsByOrgInputSchema } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
|
|
7
|
+
import { useStigmer } from "../hooks";
|
|
8
|
+
import { toError } from "../internal/toError";
|
|
9
|
+
|
|
10
|
+
/** Return value of {@link useOrgInvitations}. */
|
|
11
|
+
export interface UseOrgInvitationsReturn {
|
|
12
|
+
/** All invitations for the organization. Empty while loading or on error. */
|
|
13
|
+
readonly invitations: readonly Invitation[];
|
|
14
|
+
/** `true` while the initial fetch or a refetch is in flight. */
|
|
15
|
+
readonly isLoading: boolean;
|
|
16
|
+
/** Error from the last failed request, or `null` when healthy. */
|
|
17
|
+
readonly error: Error | null;
|
|
18
|
+
/** Discard cached data and re-fetch the invitation list from the server. */
|
|
19
|
+
readonly refetch: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Data hook that fetches all {@link Invitation} entries for an
|
|
24
|
+
* organization.
|
|
25
|
+
*
|
|
26
|
+
* Pass `null` to skip fetching (stable no-op). When the `org` slug
|
|
27
|
+
* changes, the previous in-flight request is discarded and a fresh
|
|
28
|
+
* fetch begins. Call `refetch()` to re-query after mutations
|
|
29
|
+
* (create / revoke).
|
|
30
|
+
*
|
|
31
|
+
* Requires `can_view_access` permission on the organization —
|
|
32
|
+
* only admins and owners can list invitation links.
|
|
33
|
+
*
|
|
34
|
+
* @param org - Organization slug, or `null` to skip fetching.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const { invitations, isLoading, error, refetch } = useOrgInvitations("acme");
|
|
39
|
+
*
|
|
40
|
+
* if (isLoading) return <Spinner />;
|
|
41
|
+
* invitations.map((inv) => inv.spec?.label);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export function useOrgInvitations(
|
|
45
|
+
org: string | null,
|
|
46
|
+
): UseOrgInvitationsReturn {
|
|
47
|
+
const stigmer = useStigmer();
|
|
48
|
+
const [invitations, setInvitations] = useState<Invitation[]>([]);
|
|
49
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
50
|
+
const [error, setError] = useState<Error | null>(null);
|
|
51
|
+
const [fetchKey, setFetchKey] = useState(0);
|
|
52
|
+
|
|
53
|
+
const refetch = useCallback(() => setFetchKey((k) => k + 1), []);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (!org) {
|
|
57
|
+
setInvitations([]);
|
|
58
|
+
setIsLoading(false);
|
|
59
|
+
setError(null);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const cancelled = { current: false };
|
|
64
|
+
setIsLoading(true);
|
|
65
|
+
setError(null);
|
|
66
|
+
|
|
67
|
+
stigmer.invitation
|
|
68
|
+
.listByOrg(create(ListInvitationsByOrgInputSchema, { org }))
|
|
69
|
+
.then(
|
|
70
|
+
(result) => {
|
|
71
|
+
if (cancelled.current) return;
|
|
72
|
+
setInvitations([...result.entries]);
|
|
73
|
+
setIsLoading(false);
|
|
74
|
+
},
|
|
75
|
+
(err) => {
|
|
76
|
+
if (cancelled.current) return;
|
|
77
|
+
setError(toError(err));
|
|
78
|
+
setIsLoading(false);
|
|
79
|
+
},
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
return () => {
|
|
83
|
+
cancelled.current = true;
|
|
84
|
+
};
|
|
85
|
+
}, [org, stigmer, fetchKey]);
|
|
86
|
+
|
|
87
|
+
return { invitations, isLoading, error, refetch };
|
|
88
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { create } from "@bufbuild/protobuf";
|
|
5
|
+
import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
|
|
6
|
+
import { RedeemInvitationInputSchema } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
|
|
7
|
+
import { useStigmer } from "../hooks";
|
|
8
|
+
import { toError } from "../internal/toError";
|
|
9
|
+
|
|
10
|
+
/** Return value of {@link useRedeemInvitation}. */
|
|
11
|
+
export interface UseRedeemInvitationReturn {
|
|
12
|
+
/**
|
|
13
|
+
* Redeem an invitation by its token.
|
|
14
|
+
*
|
|
15
|
+
* Creates an IAM policy granting the invitation's configured role
|
|
16
|
+
* to the authenticated user on the invitation's organization.
|
|
17
|
+
* Resolves with the updated {@link Invitation} so callers can
|
|
18
|
+
* access the organization and role information for post-redemption
|
|
19
|
+
* UI (e.g. "You've joined Acme as viewer").
|
|
20
|
+
*/
|
|
21
|
+
readonly redeem: (token: string) => Promise<Invitation>;
|
|
22
|
+
/** `true` while the redeem request is in flight. */
|
|
23
|
+
readonly isRedeeming: boolean;
|
|
24
|
+
/** Error from the last failed redeem, or `null` when healthy. */
|
|
25
|
+
readonly error: Error | null;
|
|
26
|
+
/** Reset `error` to `null`. */
|
|
27
|
+
readonly clearError: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Behavior hook that wraps `invitation.redeem()` with loading and
|
|
32
|
+
* error state.
|
|
33
|
+
*
|
|
34
|
+
* Redeems an invitation by its shareable token. The server validates
|
|
35
|
+
* that the invitation is active, not expired, and not at its
|
|
36
|
+
* redemption limit, then creates an IAM policy granting the
|
|
37
|
+
* configured role to the authenticated user.
|
|
38
|
+
*
|
|
39
|
+
* The redeemer's identity is resolved from the authentication header
|
|
40
|
+
* — the token itself is the authorization mechanism (no FGA check
|
|
41
|
+
* on the invitation resource).
|
|
42
|
+
*
|
|
43
|
+
* Returns the updated {@link Invitation} including the incremented
|
|
44
|
+
* `status.redemptionCount` and the new entry in
|
|
45
|
+
* `status.redemptions`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* const { redeem, isRedeeming, error } = useRedeemInvitation();
|
|
50
|
+
*
|
|
51
|
+
* const invitation = await redeem("abc123...");
|
|
52
|
+
* // invitation.metadata?.org contains the org the user just joined
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export function useRedeemInvitation(): UseRedeemInvitationReturn {
|
|
56
|
+
const stigmer = useStigmer();
|
|
57
|
+
const [isRedeeming, setIsRedeeming] = useState(false);
|
|
58
|
+
const [error, setError] = useState<Error | null>(null);
|
|
59
|
+
|
|
60
|
+
const clearError = useCallback(() => setError(null), []);
|
|
61
|
+
|
|
62
|
+
const redeem = useCallback(
|
|
63
|
+
async (token: string): Promise<Invitation> => {
|
|
64
|
+
setIsRedeeming(true);
|
|
65
|
+
setError(null);
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
return await stigmer.invitation.redeem(
|
|
69
|
+
create(RedeemInvitationInputSchema, { token }),
|
|
70
|
+
);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
setError(toError(err));
|
|
73
|
+
throw err;
|
|
74
|
+
} finally {
|
|
75
|
+
setIsRedeeming(false);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
[stigmer],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return { redeem, isRedeeming, error, clearError };
|
|
82
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
|
|
5
|
+
import { useStigmer } from "../hooks";
|
|
6
|
+
import { toError } from "../internal/toError";
|
|
7
|
+
|
|
8
|
+
/** Return value of {@link useRevokeInvitation}. */
|
|
9
|
+
export interface UseRevokeInvitationReturn {
|
|
10
|
+
/** Revoke an invitation by its resource ID. Resolves with the updated resource for confirmation display. */
|
|
11
|
+
readonly revoke: (id: string) => Promise<Invitation>;
|
|
12
|
+
/** `true` while the revoke request is in flight. */
|
|
13
|
+
readonly isRevoking: boolean;
|
|
14
|
+
/** Error from the last failed revoke, or `null` when healthy. */
|
|
15
|
+
readonly error: Error | null;
|
|
16
|
+
/** Reset `error` to `null`. */
|
|
17
|
+
readonly clearError: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Behavior hook that wraps `invitation.revoke()` with loading and
|
|
22
|
+
* error state.
|
|
23
|
+
*
|
|
24
|
+
* Revokes an active invitation by its resource ID, setting its state
|
|
25
|
+
* to `revoked` and preventing further redemptions. The operation is
|
|
26
|
+
* idempotent — revoking an already-revoked invitation is a no-op
|
|
27
|
+
* that returns the unchanged resource.
|
|
28
|
+
*
|
|
29
|
+
* Returns the updated {@link Invitation} so callers can verify the
|
|
30
|
+
* new state. Call `refetch()` on the list hook after revocation to
|
|
31
|
+
* refresh the invitation list.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* const { revoke, isRevoking, error } = useRevokeInvitation();
|
|
36
|
+
*
|
|
37
|
+
* await revoke("inv-abc123");
|
|
38
|
+
* refetch(); // refresh the invitation list
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function useRevokeInvitation(): UseRevokeInvitationReturn {
|
|
42
|
+
const stigmer = useStigmer();
|
|
43
|
+
const [isRevoking, setIsRevoking] = useState(false);
|
|
44
|
+
const [error, setError] = useState<Error | null>(null);
|
|
45
|
+
|
|
46
|
+
const clearError = useCallback(() => setError(null), []);
|
|
47
|
+
|
|
48
|
+
const revoke = useCallback(
|
|
49
|
+
async (id: string): Promise<Invitation> => {
|
|
50
|
+
setIsRevoking(true);
|
|
51
|
+
setError(null);
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
return await stigmer.invitation.revoke(id);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
setError(toError(err));
|
|
57
|
+
throw err;
|
|
58
|
+
} finally {
|
|
59
|
+
setIsRevoking(false);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
[stigmer],
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return { revoke, isRevoking, error, clearError };
|
|
66
|
+
}
|
|
@@ -15,7 +15,10 @@ import { parse as parseYaml } from "yaml";
|
|
|
15
15
|
* - **Package detection** (`detectSkillPackage`): Skill packages (directory with SKILL.md) — pushed via `pushFromExecutionArtifact()`
|
|
16
16
|
*/
|
|
17
17
|
export type SkillPackageDetection =
|
|
18
|
-
| {
|
|
18
|
+
| {
|
|
19
|
+
/** Discriminant — `false` when no skill package was detected. */
|
|
20
|
+
readonly detected: false;
|
|
21
|
+
}
|
|
19
22
|
| {
|
|
20
23
|
/** Discriminant — always `true` when a skill package was detected. */
|
|
21
24
|
readonly detected: true;
|
|
@@ -22,7 +22,10 @@ export type StigmerResourceKind = "Agent" | "McpServer";
|
|
|
22
22
|
* can narrow the type with a simple `if (result.detected)` check.
|
|
23
23
|
*/
|
|
24
24
|
export type StigmerResourceDetection =
|
|
25
|
-
| {
|
|
25
|
+
| {
|
|
26
|
+
/** Discriminant — `false` when no recognized resource was found. */
|
|
27
|
+
readonly detected: false;
|
|
28
|
+
}
|
|
26
29
|
| {
|
|
27
30
|
/** Discriminant — always `true` when a resource was found. */
|
|
28
31
|
readonly detected: true;
|
|
@@ -28,8 +28,18 @@ import type { StigmerResourceKind } from "./detect-stigmer-resource";
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export type ParsedResource =
|
|
31
|
-
| {
|
|
32
|
-
|
|
31
|
+
| {
|
|
32
|
+
/** The parsed resource is an Agent blueprint. */
|
|
33
|
+
readonly kind: "Agent";
|
|
34
|
+
/** SDK input suitable for `stigmer.agent.apply()`. */
|
|
35
|
+
readonly input: AgentInput;
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
/** The parsed resource is an MCP server definition. */
|
|
39
|
+
readonly kind: "McpServer";
|
|
40
|
+
/** SDK input suitable for `stigmer.mcpServer.apply()`. */
|
|
41
|
+
readonly input: McpServerInput;
|
|
42
|
+
};
|
|
33
43
|
|
|
34
44
|
/**
|
|
35
45
|
* Parses a Stigmer resource YAML string into the corresponding SDK input
|
|
@@ -24,7 +24,8 @@ import type { EnvVarFormVariable } from "../environment/EnvVarForm";
|
|
|
24
24
|
import { VisibilityToggle } from "../library/VisibilityToggle";
|
|
25
25
|
import { Tabs, type TabItem } from "../internal/Tabs";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/** Tab identifier for the MCP server capability panel. */
|
|
28
|
+
export type CapabilityTab = "tools" | "policies" | "resources";
|
|
28
29
|
|
|
29
30
|
/** Props for {@link McpServerDetailView}. */
|
|
30
31
|
export interface McpServerDetailViewProps {
|
package/src/mcp-server/index.ts
CHANGED
|
@@ -44,7 +44,10 @@ export type {
|
|
|
44
44
|
} from "./useMcpServerSetup";
|
|
45
45
|
|
|
46
46
|
export { McpServerDetailView } from "./McpServerDetailView";
|
|
47
|
-
export type {
|
|
47
|
+
export type {
|
|
48
|
+
McpServerDetailViewProps,
|
|
49
|
+
CapabilityTab,
|
|
50
|
+
} from "./McpServerDetailView";
|
|
48
51
|
|
|
49
52
|
export { useDiscoverCapabilities } from "./useDiscoverCapabilities";
|
|
50
53
|
export type { UseDiscoverCapabilitiesReturn } from "./useDiscoverCapabilities";
|
|
@@ -46,26 +46,44 @@ export function toServerKey(ref: ResourceRef): string {
|
|
|
46
46
|
* the "no env_spec needed" and "env vars resolved" cases.
|
|
47
47
|
*/
|
|
48
48
|
export type McpServerSetupPhase =
|
|
49
|
-
| { readonly status: "loading" }
|
|
50
49
|
| {
|
|
50
|
+
/** Fetching the full MCP server resource (spec + status). */
|
|
51
|
+
readonly status: "loading";
|
|
52
|
+
}
|
|
53
|
+
| {
|
|
54
|
+
/** The server has env vars missing from the user's personal environment. */
|
|
51
55
|
readonly status: "needsSetup";
|
|
56
|
+
/** The fetched MCP server resource. */
|
|
52
57
|
readonly mcpServer: McpServer;
|
|
58
|
+
/** Environment variables the user must provide before proceeding. */
|
|
53
59
|
readonly missingVariables: EnvVarFormVariable[];
|
|
60
|
+
/** Tools discovered by the MCP server's status probe. */
|
|
54
61
|
readonly discoveredTools: DiscoveredTool[];
|
|
62
|
+
/** Per-tool approval policies from the server spec. */
|
|
55
63
|
readonly toolApprovals: ToolApprovalPolicy[];
|
|
56
64
|
}
|
|
57
65
|
| {
|
|
66
|
+
/** Environment variables are being persisted or the instance is being provisioned. */
|
|
58
67
|
readonly status: "submitting";
|
|
68
|
+
/** The fetched MCP server resource. */
|
|
59
69
|
readonly mcpServer: McpServer;
|
|
70
|
+
/** Environment variables collected from the user. */
|
|
60
71
|
readonly missingVariables: EnvVarFormVariable[];
|
|
72
|
+
/** Tools discovered by the MCP server's status probe. */
|
|
61
73
|
readonly discoveredTools: DiscoveredTool[];
|
|
74
|
+
/** Per-tool approval policies from the server spec. */
|
|
62
75
|
readonly toolApprovals: ToolApprovalPolicy[];
|
|
63
76
|
}
|
|
64
77
|
| {
|
|
78
|
+
/** The server is fully configured and ready for session creation. */
|
|
65
79
|
readonly status: "ready";
|
|
80
|
+
/** The fetched MCP server resource. */
|
|
66
81
|
readonly mcpServer: McpServer;
|
|
82
|
+
/** Tools discovered by the MCP server's status probe. */
|
|
67
83
|
readonly discoveredTools: DiscoveredTool[];
|
|
84
|
+
/** Per-tool approval policies from the server spec. */
|
|
68
85
|
readonly toolApprovals: ToolApprovalPolicy[];
|
|
86
|
+
/** Tool names enabled for this session, after user selection. */
|
|
69
87
|
readonly enabledTools: string[];
|
|
70
88
|
};
|
|
71
89
|
|
|
@@ -80,6 +98,7 @@ export type McpServerSetupPhase =
|
|
|
80
98
|
* Matches the pattern established by `AgentSetupState`.
|
|
81
99
|
*/
|
|
82
100
|
export type McpServerSetupEntry = McpServerSetupPhase & {
|
|
101
|
+
/** Error from the last async transition, or `null` when healthy. */
|
|
83
102
|
readonly error: Error | null;
|
|
84
103
|
};
|
|
85
104
|
|
|
@@ -107,45 +126,104 @@ export type McpServerSetupState = Readonly<
|
|
|
107
126
|
* produced by {@link toServerKey}) identifying the target entry.
|
|
108
127
|
*/
|
|
109
128
|
export type McpServerSetupAction =
|
|
110
|
-
| { readonly type: "ADD_SERVER"; readonly key: string }
|
|
111
129
|
| {
|
|
130
|
+
/** Add a new server entry in `loading` phase. */
|
|
131
|
+
readonly type: "ADD_SERVER";
|
|
132
|
+
/** Server key (`"org/slug"`). */
|
|
133
|
+
readonly key: string;
|
|
134
|
+
}
|
|
135
|
+
| {
|
|
136
|
+
/** Server resolved but needs env var collection. */
|
|
112
137
|
readonly type: "RESOLVE_NEEDS_SETUP";
|
|
138
|
+
/** Server key (`"org/slug"`). */
|
|
113
139
|
readonly key: string;
|
|
140
|
+
/** The fetched MCP server resource. */
|
|
114
141
|
readonly mcpServer: McpServer;
|
|
142
|
+
/** Variables the user must provide. */
|
|
115
143
|
readonly missingVariables: EnvVarFormVariable[];
|
|
144
|
+
/** Tools discovered by the server's status probe. */
|
|
116
145
|
readonly discoveredTools: DiscoveredTool[];
|
|
146
|
+
/** Per-tool approval policies from the server spec. */
|
|
117
147
|
readonly toolApprovals: ToolApprovalPolicy[];
|
|
118
148
|
}
|
|
119
149
|
| {
|
|
150
|
+
/** Server resolved and is ready (no env vars needed). */
|
|
120
151
|
readonly type: "RESOLVE_READY";
|
|
152
|
+
/** Server key (`"org/slug"`). */
|
|
121
153
|
readonly key: string;
|
|
154
|
+
/** The fetched MCP server resource. */
|
|
122
155
|
readonly mcpServer: McpServer;
|
|
156
|
+
/** Tools discovered by the server's status probe. */
|
|
123
157
|
readonly discoveredTools: DiscoveredTool[];
|
|
158
|
+
/** Per-tool approval policies from the server spec. */
|
|
124
159
|
readonly toolApprovals: ToolApprovalPolicy[];
|
|
160
|
+
/** Tool names enabled for this session. */
|
|
125
161
|
readonly enabledTools: string[];
|
|
126
162
|
}
|
|
127
163
|
| {
|
|
164
|
+
/** Re-evaluate missing variables after pool values arrive. */
|
|
128
165
|
readonly type: "POOL_RESOLVE";
|
|
166
|
+
/** Server key (`"org/slug"`). */
|
|
129
167
|
readonly key: string;
|
|
168
|
+
/** Updated missing variables (may be empty if pool covered all). */
|
|
130
169
|
readonly missingVariables: EnvVarFormVariable[];
|
|
170
|
+
/** Tool names enabled for this session. */
|
|
131
171
|
readonly enabledTools: string[];
|
|
132
172
|
}
|
|
133
|
-
| { readonly type: "SUBMIT_START"; readonly key: string }
|
|
134
173
|
| {
|
|
174
|
+
/** Begin persisting env vars for this server. */
|
|
175
|
+
readonly type: "SUBMIT_START";
|
|
176
|
+
/** Server key (`"org/slug"`). */
|
|
177
|
+
readonly key: string;
|
|
178
|
+
}
|
|
179
|
+
| {
|
|
180
|
+
/** Env var submission succeeded — server is ready. */
|
|
135
181
|
readonly type: "SUBMIT_DONE";
|
|
182
|
+
/** Server key (`"org/slug"`). */
|
|
136
183
|
readonly key: string;
|
|
184
|
+
/** Tool names enabled for this session. */
|
|
137
185
|
readonly enabledTools: string[];
|
|
138
186
|
}
|
|
139
187
|
| {
|
|
188
|
+
/** Update the enabled tools list for a ready server. */
|
|
140
189
|
readonly type: "SET_ENABLED_TOOLS";
|
|
190
|
+
/** Server key (`"org/slug"`). */
|
|
141
191
|
readonly key: string;
|
|
192
|
+
/** New set of enabled tool names. */
|
|
142
193
|
readonly enabledTools: string[];
|
|
143
194
|
}
|
|
144
|
-
| {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
195
|
+
| {
|
|
196
|
+
/** Env var submission failed — revert to `needsSetup`. */
|
|
197
|
+
readonly type: "SUBMIT_FAIL";
|
|
198
|
+
/** Server key (`"org/slug"`). */
|
|
199
|
+
readonly key: string;
|
|
200
|
+
/** The error that occurred during submission. */
|
|
201
|
+
readonly error: Error;
|
|
202
|
+
}
|
|
203
|
+
| {
|
|
204
|
+
/** Set an error on a specific server entry. */
|
|
205
|
+
readonly type: "SET_ERROR";
|
|
206
|
+
/** Server key (`"org/slug"`). */
|
|
207
|
+
readonly key: string;
|
|
208
|
+
/** The error to set. */
|
|
209
|
+
readonly error: Error;
|
|
210
|
+
}
|
|
211
|
+
| {
|
|
212
|
+
/** Clear the error on a specific server entry. */
|
|
213
|
+
readonly type: "CLEAR_ERROR";
|
|
214
|
+
/** Server key (`"org/slug"`). */
|
|
215
|
+
readonly key: string;
|
|
216
|
+
}
|
|
217
|
+
| {
|
|
218
|
+
/** Remove a server entry from the state. */
|
|
219
|
+
readonly type: "REMOVE_SERVER";
|
|
220
|
+
/** Server key (`"org/slug"`). */
|
|
221
|
+
readonly key: string;
|
|
222
|
+
}
|
|
223
|
+
| {
|
|
224
|
+
/** Reset all server entries to the initial empty state. */
|
|
225
|
+
readonly type: "RESET";
|
|
226
|
+
};
|
|
149
227
|
|
|
150
228
|
// ---------------------------------------------------------------------------
|
|
151
229
|
// Initial state
|
|
@@ -40,6 +40,15 @@ export interface ModelSelectorProps {
|
|
|
40
40
|
*
|
|
41
41
|
* Platform builders who need different rendering use
|
|
42
42
|
* `useModelRegistry()` directly.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* function ComposerHeader() {
|
|
47
|
+
* const [modelId, setModelId] = useState<string>();
|
|
48
|
+
*
|
|
49
|
+
* return <ModelSelector value={modelId} onValueChange={setModelId} />;
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
43
52
|
*/
|
|
44
53
|
export function ModelSelector({
|
|
45
54
|
value,
|
package/src/models/registry.ts
CHANGED
|
@@ -40,7 +40,17 @@ export const DISABLED_PROVIDERS: ReadonlySet<Provider> = new Set([
|
|
|
40
40
|
"ollama",
|
|
41
41
|
]);
|
|
42
42
|
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* UI-relevant metadata for a single platform-supported LLM model.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* const { getModel, defaultModel } = useModelRegistry();
|
|
49
|
+
* const model = getModel(selectedId) ?? defaultModel;
|
|
50
|
+
*
|
|
51
|
+
* <span>{model.displayName} ({model.costTier})</span>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
44
54
|
export interface ModelInfo {
|
|
45
55
|
/** Unique model identifier sent to the backend (e.g. `"claude-sonnet-4.5"`). */
|
|
46
56
|
readonly modelId: string;
|
|
@@ -30,6 +30,26 @@ export interface UseModelRegistryReturn {
|
|
|
30
30
|
* Pure data layer — no rendering, no side effects. Platform builders
|
|
31
31
|
* who want full control over rendering import this hook and build
|
|
32
32
|
* their own UI.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* function CustomModelPicker({ onSelect }: { onSelect: (id: string) => void }) {
|
|
37
|
+
* const { models, byProvider, defaultModel, getModel } = useModelRegistry();
|
|
38
|
+
*
|
|
39
|
+
* return (
|
|
40
|
+
* <select
|
|
41
|
+
* defaultValue={defaultModel.modelId}
|
|
42
|
+
* onChange={(e) => onSelect(e.target.value)}
|
|
43
|
+
* >
|
|
44
|
+
* {models.map((m) => (
|
|
45
|
+
* <option key={m.modelId} value={m.modelId}>
|
|
46
|
+
* {m.displayName} ({m.costTier})
|
|
47
|
+
* </option>
|
|
48
|
+
* ))}
|
|
49
|
+
* </select>
|
|
50
|
+
* );
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
33
53
|
*/
|
|
34
54
|
export function useModelRegistry(): UseModelRegistryReturn {
|
|
35
55
|
return useMemo(() => {
|