@stigmer/react 3.40.1 → 3.41.1-dev.20261003094357.g39d6aa748646
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/README.md +2 -1
- package/access/ManageAccessButton.d.ts +1 -1
- package/access/ManageAccessButton.js +1 -1
- package/access/ManageAccessDialog.d.ts +1 -1
- package/access/ManageAccessDialog.js +2 -2
- package/access/ManageAccessDialog.js.map +1 -1
- package/access/types.d.ts +1 -1
- package/agent/AgentDetailView.d.ts.map +1 -1
- package/agent/AgentDetailView.js +2 -1
- package/agent/AgentDetailView.js.map +1 -1
- package/api-key/ApiKeyListPanel.d.ts.map +1 -1
- package/api-key/ApiKeyListPanel.js +2 -1
- package/api-key/ApiKeyListPanel.js.map +1 -1
- package/attachment/AttachmentImageLightbox.d.ts.map +1 -1
- package/attachment/AttachmentImageLightbox.js.map +1 -1
- package/billing/AutoRechargeCard.d.ts +3 -3
- package/billing/AutoRechargeCard.d.ts.map +1 -1
- package/billing/AutoRechargeCard.js +4 -4
- package/billing/AutoRechargeCard.js.map +1 -1
- package/billing/BillingSection.d.ts.map +1 -1
- package/billing/BillingSection.js +7 -6
- package/billing/BillingSection.js.map +1 -1
- package/billing/ChangePlanDialog.d.ts.map +1 -1
- package/billing/ChangePlanDialog.js +13 -1
- package/billing/ChangePlanDialog.js.map +1 -1
- package/billing/CreditLedgerTable.d.ts +3 -3
- package/billing/CreditLedgerTable.d.ts.map +1 -1
- package/billing/CreditLedgerTable.js +3 -3
- package/billing/CreditLedgerTable.js.map +1 -1
- package/billing/CreditPackGrid.d.ts +1 -1
- package/billing/CreditPackGrid.js +1 -1
- package/billing/PaymentMethodCard.d.ts +1 -1
- package/billing/PaymentMethodCard.js +1 -1
- package/billing/PlanSection.d.ts +3 -3
- package/billing/PlanSection.d.ts.map +1 -1
- package/billing/PlanSection.js +4 -3
- package/billing/PlanSection.js.map +1 -1
- package/billing/ProviderKeysSection.d.ts +33 -0
- package/billing/ProviderKeysSection.d.ts.map +1 -0
- package/billing/ProviderKeysSection.js +143 -0
- package/billing/ProviderKeysSection.js.map +1 -0
- package/billing/UpgradeNotice.d.ts.map +1 -1
- package/billing/UpgradeNotice.js +1 -0
- package/billing/UpgradeNotice.js.map +1 -1
- package/billing/index.d.ts +4 -0
- package/billing/index.d.ts.map +1 -1
- package/billing/index.js +2 -0
- package/billing/index.js.map +1 -1
- package/billing/plan-features.d.ts +3 -2
- package/billing/plan-features.d.ts.map +1 -1
- package/billing/plan-features.js +5 -4
- package/billing/plan-features.js.map +1 -1
- package/billing/useBillingAccount.d.ts +4 -4
- package/billing/useBillingAccount.d.ts.map +1 -1
- package/billing/useBillingAccount.js +7 -7
- package/billing/useBillingAccount.js.map +1 -1
- package/billing/useBillingUsageReport.d.ts +4 -4
- package/billing/useBillingUsageReport.d.ts.map +1 -1
- package/billing/useBillingUsageReport.js +7 -7
- package/billing/useBillingUsageReport.js.map +1 -1
- package/billing/useChangePlan.d.ts +2 -2
- package/billing/useChangePlan.d.ts.map +1 -1
- package/billing/useChangePlan.js +4 -4
- package/billing/useChangePlan.js.map +1 -1
- package/billing/useCreateBillingPortalSession.d.ts +2 -2
- package/billing/useCreateBillingPortalSession.d.ts.map +1 -1
- package/billing/useCreateBillingPortalSession.js +3 -3
- package/billing/useCreateBillingPortalSession.js.map +1 -1
- package/billing/useCreateCheckoutSession.d.ts +2 -2
- package/billing/useCreateCheckoutSession.d.ts.map +1 -1
- package/billing/useCreateCheckoutSession.js +2 -2
- package/billing/useCreateCheckoutSession.js.map +1 -1
- package/billing/useCreatePaymentMethodSetupSession.d.ts +1 -1
- package/billing/useCreatePaymentMethodSetupSession.d.ts.map +1 -1
- package/billing/useCreatePaymentMethodSetupSession.js +2 -2
- package/billing/useCreatePaymentMethodSetupSession.js.map +1 -1
- package/billing/useCreditLedger.d.ts +4 -4
- package/billing/useCreditLedger.d.ts.map +1 -1
- package/billing/useCreditLedger.js +7 -7
- package/billing/useCreditLedger.js.map +1 -1
- package/billing/useCustomerModelPricing.d.ts +4 -4
- package/billing/useCustomerModelPricing.d.ts.map +1 -1
- package/billing/useCustomerModelPricing.js +6 -6
- package/billing/useCustomerModelPricing.js.map +1 -1
- package/billing/useEntitlements.d.ts +2 -2
- package/billing/useEntitlements.d.ts.map +1 -1
- package/billing/useEntitlements.js +4 -4
- package/billing/useEntitlements.js.map +1 -1
- package/billing/usePeriodEstimate.d.ts +1 -1
- package/billing/usePeriodEstimate.d.ts.map +1 -1
- package/billing/usePeriodEstimate.js +3 -3
- package/billing/usePeriodEstimate.js.map +1 -1
- package/billing/useProviderKeys.d.ts +67 -0
- package/billing/useProviderKeys.d.ts.map +1 -0
- package/billing/useProviderKeys.js +61 -0
- package/billing/useProviderKeys.js.map +1 -0
- package/billing/useSetAutoRechargeConfig.d.ts +2 -2
- package/billing/useSetAutoRechargeConfig.d.ts.map +1 -1
- package/billing/useSetAutoRechargeConfig.js +2 -2
- package/billing/useSetAutoRechargeConfig.js.map +1 -1
- package/billing/useSubscription.d.ts +3 -3
- package/billing/useSubscription.d.ts.map +1 -1
- package/billing/useSubscription.js +7 -7
- package/billing/useSubscription.js.map +1 -1
- package/channel/AgentChannelsPanel.d.ts.map +1 -1
- package/channel/AgentChannelsPanel.js +11 -9
- package/channel/AgentChannelsPanel.js.map +1 -1
- package/channel/connect/ServingAppSection.js +1 -1
- package/channel/connect/ServingAppSection.js.map +1 -1
- package/channel-app/ChannelAppDetailPanel.d.ts +2 -2
- package/channel-app/ChannelAppDetailPanel.js +17 -10
- package/channel-app/ChannelAppDetailPanel.js.map +1 -1
- package/channel-app/ChannelAppListPanel.d.ts +2 -2
- package/channel-app/ChannelAppListPanel.d.ts.map +1 -1
- package/channel-app/ChannelAppListPanel.js +2 -1
- package/channel-app/ChannelAppListPanel.js.map +1 -1
- package/channel-app/CreateChannelAppForm.js +1 -1
- package/channel-app/CreateChannelAppForm.js.map +1 -1
- package/channel-app/copy.d.ts +3 -3
- package/channel-app/copy.js +3 -3
- package/channel-app/internal.d.ts +9 -0
- package/channel-app/internal.d.ts.map +1 -1
- package/channel-app/internal.js +9 -0
- package/channel-app/internal.js.map +1 -1
- package/channel-app/slackAppSetup.d.ts +3 -24
- package/channel-app/slackAppSetup.d.ts.map +1 -1
- package/channel-app/slackAppSetup.js +6 -3
- package/channel-app/slackAppSetup.js.map +1 -1
- package/channel-app/whatsappAppSetup.d.ts +3 -27
- package/channel-app/whatsappAppSetup.d.ts.map +1 -1
- package/channel-app/whatsappAppSetup.js +5 -2
- package/channel-app/whatsappAppSetup.js.map +1 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +5 -9
- package/composer/SessionComposer.js.map +1 -1
- package/cursor-accounts/CursorAccountEditor.js +3 -3
- package/cursor-accounts/CursorAccountEditor.js.map +1 -1
- package/cursor-accounts/CursorAccountsConsole.js +3 -3
- package/cursor-accounts/CursorAccountsConsole.js.map +1 -1
- package/dashboard/OperationalDashboard.d.ts +1 -4
- package/dashboard/OperationalDashboard.d.ts.map +1 -1
- package/dashboard/OperationalDashboard.js +1 -3
- package/dashboard/OperationalDashboard.js.map +1 -1
- package/dashboard/useDashboardSummary.d.ts +1 -3
- package/dashboard/useDashboardSummary.d.ts.map +1 -1
- package/dashboard/useDashboardSummary.js +1 -1
- package/dashboard/useDashboardSummary.js.map +1 -1
- package/environment/EnvironmentListPanel.d.ts.map +1 -1
- package/environment/EnvironmentListPanel.js +2 -1
- package/environment/EnvironmentListPanel.js.map +1 -1
- package/environment/EnvironmentVariableEditor.d.ts.map +1 -1
- package/environment/EnvironmentVariableEditor.js +3 -2
- package/environment/EnvironmentVariableEditor.js.map +1 -1
- package/environment/index.d.ts +1 -1
- package/environment/index.d.ts.map +1 -1
- package/environment/index.js +1 -1
- package/environment/index.js.map +1 -1
- package/environment/systemEnvVars.d.ts +4 -63
- package/environment/systemEnvVars.d.ts.map +1 -1
- package/environment/systemEnvVars.js +21 -113
- package/environment/systemEnvVars.js.map +1 -1
- package/execution/ArtifactFileContent.d.ts.map +1 -1
- package/execution/ArtifactFileContent.js +2 -1
- package/execution/ArtifactFileContent.js.map +1 -1
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +2 -1
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/RecalledMemoriesCard.js +1 -1
- package/execution/ResultView.d.ts.map +1 -1
- package/execution/ResultView.js +2 -1
- package/execution/ResultView.js.map +1 -1
- package/execution/TerminalSession.js +1 -1
- package/execution/TerminalSession.js.map +1 -1
- package/execution/ThreadSkeleton.d.ts.map +1 -1
- package/execution/ThreadSkeleton.js +2 -1
- package/execution/ThreadSkeleton.js.map +1 -1
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js +3 -2
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/sandbox-path-normalizer.d.ts +0 -11
- package/execution/sandbox-path-normalizer.d.ts.map +1 -1
- package/execution/sandbox-path-normalizer.js +2 -1
- package/execution/sandbox-path-normalizer.js.map +1 -1
- package/github/parseGitUrl.d.ts.map +1 -1
- package/github/parseGitUrl.js +16 -4
- package/github/parseGitUrl.js.map +1 -1
- package/iam-policy/GrantAccessForm.d.ts +3 -3
- package/iam-policy/GrantAccessForm.d.ts.map +1 -1
- package/iam-policy/GrantAccessForm.js +3 -3
- package/iam-policy/GrantAccessForm.js.map +1 -1
- package/iam-policy/OrgMembersPanel.d.ts +3 -3
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -1
- package/iam-policy/OrgMembersPanel.js +5 -4
- package/iam-policy/OrgMembersPanel.js.map +1 -1
- package/iam-policy/PeopleWithAccess.d.ts +2 -2
- package/iam-policy/PeopleWithAccess.d.ts.map +1 -1
- package/iam-policy/PeopleWithAccess.js +2 -2
- package/iam-policy/PeopleWithAccess.js.map +1 -1
- package/iam-policy/PrincipalPicker.d.ts +2 -2
- package/iam-policy/PrincipalPicker.d.ts.map +1 -1
- package/iam-policy/PrincipalPicker.js +2 -2
- package/iam-policy/PrincipalPicker.js.map +1 -1
- package/iam-policy/SharePanel.d.ts +3 -3
- package/iam-policy/SharePanel.d.ts.map +1 -1
- package/iam-policy/SharePanel.js +3 -3
- package/iam-policy/SharePanel.js.map +1 -1
- package/iam-policy/useCheckPermission.d.ts +4 -1
- package/iam-policy/useCheckPermission.d.ts.map +1 -1
- package/iam-policy/useCheckPermission.js +4 -1
- package/iam-policy/useCheckPermission.js.map +1 -1
- package/iam-policy/useCreateIamPolicy.d.ts +1 -1
- package/iam-policy/useCreateIamPolicy.js +1 -1
- package/iam-policy/useDeleteIamPolicy.d.ts +1 -1
- package/iam-policy/useDeleteIamPolicy.js +1 -1
- package/iam-policy/useGrantableRoles.d.ts +1 -1
- package/iam-policy/useGrantableRoles.js +1 -1
- package/iam-policy/useGranteeCandidates.d.ts +3 -3
- package/iam-policy/useGranteeCandidates.d.ts.map +1 -1
- package/iam-policy/useGranteeCandidates.js +2 -2
- package/iam-policy/useGranteeCandidates.js.map +1 -1
- package/iam-policy/useOwnerAssignment.d.ts +2 -2
- package/iam-policy/useOwnerAssignment.d.ts.map +1 -1
- package/iam-policy/useOwnerAssignment.js +3 -3
- package/iam-policy/useOwnerAssignment.js.map +1 -1
- package/iam-policy/usePrincipalsCount.d.ts +4 -4
- package/iam-policy/usePrincipalsCount.d.ts.map +1 -1
- package/iam-policy/usePrincipalsCount.js +7 -7
- package/iam-policy/usePrincipalsCount.js.map +1 -1
- package/iam-policy/useResourceAccess.d.ts +1 -1
- package/iam-policy/useResourceAccess.js +1 -1
- package/iam-policy/useRevokeOrgAccess.d.ts +11 -9
- package/iam-policy/useRevokeOrgAccess.d.ts.map +1 -1
- package/iam-policy/useRevokeOrgAccess.js +6 -6
- package/iam-policy/useRevokeOrgAccess.js.map +1 -1
- package/identity-account/AccountPreferencesPanel.d.ts +6 -0
- package/identity-account/AccountPreferencesPanel.d.ts.map +1 -1
- package/identity-account/AccountPreferencesPanel.js +35 -3
- package/identity-account/AccountPreferencesPanel.js.map +1 -1
- package/identity-account/useAccountExecutionDefaults.d.ts +1 -1
- package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -1
- package/identity-account/useAccountExecutionDefaults.js +2 -3
- package/identity-account/useAccountExecutionDefaults.js.map +1 -1
- package/identity-provider/IdentityProviderDetailPanel.js +4 -4
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -1
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -1
- package/identity-provider/IdentityProviderListPanel.js +2 -1
- package/identity-provider/IdentityProviderListPanel.js.map +1 -1
- package/identity-provider/IdentityProviderWizard.js +1 -1
- package/identity-provider/IdentityProviderWizard.js.map +1 -1
- package/identity-provider/SsoLoginPrompt.js +2 -1
- package/identity-provider/SsoLoginPrompt.js.map +1 -1
- package/identity-provider/useIdentityProviderList.d.ts +2 -2
- package/identity-provider/useIdentityProviderList.js +2 -2
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/inline-edit/InlineEditImage.d.ts +4 -0
- package/inline-edit/InlineEditImage.d.ts.map +1 -1
- package/inline-edit/InlineEditImage.js +12 -11
- package/inline-edit/InlineEditImage.js.map +1 -1
- package/inline-edit/InlineEditText.d.ts +4 -0
- package/inline-edit/InlineEditText.d.ts.map +1 -1
- package/inline-edit/InlineEditText.js +12 -11
- package/inline-edit/InlineEditText.js.map +1 -1
- package/inline-edit/InlineEditTextarea.d.ts +4 -0
- package/inline-edit/InlineEditTextarea.d.ts.map +1 -1
- package/inline-edit/InlineEditTextarea.js +11 -16
- package/inline-edit/InlineEditTextarea.js.map +1 -1
- package/inline-edit/useInlineDraft.d.ts +26 -0
- package/inline-edit/useInlineDraft.d.ts.map +1 -0
- package/inline-edit/useInlineDraft.js +61 -0
- package/inline-edit/useInlineDraft.js.map +1 -0
- package/internal/DialogShell.d.ts +21 -0
- package/internal/DialogShell.d.ts.map +1 -1
- package/internal/DialogShell.js +51 -4
- package/internal/DialogShell.js.map +1 -1
- package/internal/LoadingRegion.d.ts +35 -0
- package/internal/LoadingRegion.d.ts.map +1 -0
- package/internal/LoadingRegion.js +33 -0
- package/internal/LoadingRegion.js.map +1 -0
- package/internal/UnknownPublicAddressNotice.d.ts +20 -0
- package/internal/UnknownPublicAddressNotice.d.ts.map +1 -0
- package/internal/UnknownPublicAddressNotice.js +19 -0
- package/internal/UnknownPublicAddressNotice.js.map +1 -0
- package/internal/features.js +2 -2
- package/internal/features.js.map +1 -1
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +18 -4
- package/internal/markdown-components.js.map +1 -1
- package/internal/trim.d.ts +7 -0
- package/internal/trim.d.ts.map +1 -0
- package/internal/trim.js +12 -0
- package/internal/trim.js.map +1 -0
- package/invitation/InvitationManager.d.ts.map +1 -1
- package/invitation/InvitationManager.js +2 -1
- package/invitation/InvitationManager.js.map +1 -1
- package/invitation/InvitationRedemption.d.ts.map +1 -1
- package/invitation/InvitationRedemption.js +5 -4
- package/invitation/InvitationRedemption.js.map +1 -1
- package/invitation/useInvitationPreview.d.ts +1 -1
- package/invitation/useInvitationPreview.js +1 -1
- package/library/InstanceVisibilitySelector.d.ts +1 -1
- package/library/InstanceVisibilitySelector.d.ts.map +1 -1
- package/library/ResourceVisibilityControl.d.ts +6 -3
- package/library/ResourceVisibilityControl.d.ts.map +1 -1
- package/library/ResourceVisibilityControl.js +7 -4
- package/library/ResourceVisibilityControl.js.map +1 -1
- package/library/VisibilitySelector.d.ts +2 -2
- package/library/VisibilitySelector.d.ts.map +1 -1
- package/library/VisibilitySelector.js +1 -1
- package/licenses/LicenseDetail.d.ts.map +1 -1
- package/licenses/LicenseDetail.js +3 -3
- package/licenses/LicenseDetail.js.map +1 -1
- package/licenses/LicenseIssueForm.js +7 -7
- package/licenses/LicenseIssueForm.js.map +1 -1
- package/licenses/license-draft.d.ts +1 -1
- package/licenses/license-draft.d.ts.map +1 -1
- package/licenses/license-draft.js +3 -3
- package/licenses/license-draft.js.map +1 -1
- package/licenses/license-format.d.ts +7 -5
- package/licenses/license-format.d.ts.map +1 -1
- package/licenses/license-format.js +2 -4
- package/licenses/license-format.js.map +1 -1
- package/mcp-server/McpServerConnectDialog.js +4 -5
- package/mcp-server/McpServerConnectDialog.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +5 -7
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/McpServerPicker.d.ts.map +1 -1
- package/mcp-server/McpServerPicker.js +2 -6
- package/mcp-server/McpServerPicker.js.map +1 -1
- package/mcp-server/McpToolSelector.js +1 -1
- package/mcp-server/McpToolSelector.js.map +1 -1
- package/mcp-server/useMcpServerConnect.d.ts +14 -25
- package/mcp-server/useMcpServerConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerConnect.js +7 -19
- package/mcp-server/useMcpServerConnect.js.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.d.ts +1 -3
- package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.js +6 -19
- package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
- package/memory/MemoryListPanel.d.ts.map +1 -1
- package/memory/MemoryListPanel.js +2 -1
- package/memory/MemoryListPanel.js.map +1 -1
- package/models/HarnessSelector.d.ts.map +1 -1
- package/models/HarnessSelector.js +1 -2
- package/models/HarnessSelector.js.map +1 -1
- package/models/ModelSelector.d.ts +1 -1
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +1 -7
- package/models/ModelSelector.js.map +1 -1
- package/models/harness.d.ts +10 -6
- package/models/harness.d.ts.map +1 -1
- package/models/harness.js +35 -28
- package/models/harness.js.map +1 -1
- package/models/index.d.ts +1 -1
- package/models/index.d.ts.map +1 -1
- package/models/index.js +1 -1
- package/models/index.js.map +1 -1
- package/oauth-app/OAuthAppListPanel.d.ts.map +1 -1
- package/oauth-app/OAuthAppListPanel.js +2 -1
- package/oauth-app/OAuthAppListPanel.js.map +1 -1
- package/organization/OrgPreferencesPanel.d.ts +3 -3
- package/organization/OrgPreferencesPanel.d.ts.map +1 -1
- package/organization/OrgPreferencesPanel.js +19 -6
- package/organization/OrgPreferencesPanel.js.map +1 -1
- package/organization/OrgProfilePanel.d.ts +3 -3
- package/organization/OrgProfilePanel.d.ts.map +1 -1
- package/organization/OrgProfilePanel.js +8 -7
- package/organization/OrgProfilePanel.js.map +1 -1
- package/organization/index.d.ts +1 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +1 -0
- package/organization/index.js.map +1 -1
- package/organization/useFollowSessionOrganization.d.ts +9 -0
- package/organization/useFollowSessionOrganization.d.ts.map +1 -0
- package/organization/useFollowSessionOrganization.js +52 -0
- package/organization/useFollowSessionOrganization.js.map +1 -0
- package/package.json +5 -5
- package/plan-catalog/plan-draft.js +3 -3
- package/plan-catalog/plan-draft.js.map +1 -1
- package/platform-client/PlatformClientListPanel.d.ts.map +1 -1
- package/platform-client/PlatformClientListPanel.js +2 -1
- package/platform-client/PlatformClientListPanel.js.map +1 -1
- package/plugin/PluginDetailView.d.ts.map +1 -1
- package/plugin/PluginDetailView.js +2 -1
- package/plugin/PluginDetailView.js.map +1 -1
- package/plugin/useMcpServerReadiness.js +2 -2
- package/plugin/useMcpServerReadiness.js.map +1 -1
- package/portal-container.d.ts +8 -0
- package/portal-container.d.ts.map +1 -1
- package/portal-container.js +8 -0
- package/portal-container.js.map +1 -1
- package/provider-standing/ProviderStandingConsole.js +1 -1
- package/provider.d.ts +31 -2
- package/provider.d.ts.map +1 -1
- package/provider.js +7 -3
- package/provider.js.map +1 -1
- package/public-base-url-context.d.ts +35 -0
- package/public-base-url-context.d.ts.map +1 -0
- package/public-base-url-context.js +63 -0
- package/public-base-url-context.js.map +1 -0
- package/resource-workbench/components/SelectionCheckbox.js +1 -1
- package/resource-workbench/components/SelectionCheckbox.js.map +1 -1
- package/schedule/ScheduleDetailView.d.ts.map +1 -1
- package/schedule/ScheduleDetailView.js +2 -1
- package/schedule/ScheduleDetailView.js.map +1 -1
- package/session/SessionViewer.d.ts +7 -2
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +7 -2
- package/session/SessionViewer.js.map +1 -1
- package/session/useLocalSessionWorker.d.ts +19 -3
- package/session/useLocalSessionWorker.d.ts.map +1 -1
- package/session/useLocalSessionWorker.js +37 -4
- package/session/useLocalSessionWorker.js.map +1 -1
- package/session/useSessionConversation.d.ts +10 -1
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +5 -3
- package/session/useSessionConversation.js.map +1 -1
- package/settings/ChannelAppsSection.d.ts +4 -4
- package/settings/ChannelAppsSection.js +4 -4
- package/settings/EnvironmentsSection.d.ts.map +1 -1
- package/settings/EnvironmentsSection.js +2 -1
- package/settings/EnvironmentsSection.js.map +1 -1
- package/settings/MembersSection.js +2 -2
- package/settings/MembersSection.js.map +1 -1
- package/settings/OrgPreferencesSection.js +1 -1
- package/settings/OrgPreferencesSection.js.map +1 -1
- package/settings/OrgProfileSection.js +1 -1
- package/settings/OrgProfileSection.js.map +1 -1
- package/settings/ProviderKeysSection.d.ts +3 -0
- package/settings/ProviderKeysSection.d.ts.map +1 -0
- package/settings/ProviderKeysSection.js +3 -0
- package/settings/ProviderKeysSection.js.map +1 -0
- package/settings/TeamsSection.js +1 -1
- package/settings/TeamsSection.js.map +1 -1
- package/settings/UsageSection.js +1 -1
- package/settings/UsageSection.js.map +1 -1
- package/settings/index.d.ts +2 -0
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +1 -0
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +2 -1
- package/settings/settings-nav.js.map +1 -1
- package/sharing/ShareAgentDialog.d.ts.map +1 -1
- package/sharing/ShareAgentDialog.js +14 -9
- package/sharing/ShareAgentDialog.js.map +1 -1
- package/sharing/SharedAgentChat.d.ts.map +1 -1
- package/sharing/SharedAgentChat.js +2 -1
- package/sharing/SharedAgentChat.js.map +1 -1
- package/sharing/useCanCreateAgentShare.d.ts +3 -1
- package/sharing/useCanCreateAgentShare.d.ts.map +1 -1
- package/sharing/useCanCreateAgentShare.js +5 -3
- package/sharing/useCanCreateAgentShare.js.map +1 -1
- package/sharing/useSaveAgentShare.d.ts +1 -1
- package/sharing/useSaveAgentShare.js +1 -1
- package/sidebar/WorkspaceSidebar.d.ts.map +1 -1
- package/sidebar/WorkspaceSidebar.js +2 -1
- package/sidebar/WorkspaceSidebar.js.map +1 -1
- package/skill/SkillDetailView.d.ts.map +1 -1
- package/skill/SkillDetailView.js +2 -1
- package/skill/SkillDetailView.js.map +1 -1
- package/skill/SkillDiffDialog.d.ts.map +1 -1
- package/skill/SkillDiffDialog.js +2 -1
- package/skill/SkillDiffDialog.js.map +1 -1
- package/skill/SkillFileBrowser.d.ts.map +1 -1
- package/skill/SkillFileBrowser.js +2 -1
- package/skill/SkillFileBrowser.js.map +1 -1
- package/src/access/ManageAccessButton.tsx +1 -1
- package/src/access/ManageAccessDialog.tsx +2 -2
- package/src/access/types.ts +1 -1
- package/src/agent/AgentDetailView.tsx +4 -4
- package/src/api-key/ApiKeyListPanel.tsx +4 -4
- package/src/attachment/AttachmentImageLightbox.tsx +3 -4
- package/src/billing/AutoRechargeCard.tsx +5 -5
- package/src/billing/BillingSection.tsx +10 -9
- package/src/billing/ChangePlanDialog.tsx +14 -2
- package/src/billing/CreditLedgerTable.tsx +4 -4
- package/src/billing/CreditPackGrid.tsx +1 -1
- package/src/billing/PaymentMethodCard.tsx +1 -1
- package/src/billing/PlanSection.tsx +6 -5
- package/src/billing/ProviderKeysSection.tsx +324 -0
- package/src/billing/UpgradeNotice.tsx +1 -0
- package/src/billing/index.ts +9 -0
- package/src/billing/plan-features.ts +5 -4
- package/src/billing/useBillingAccount.ts +7 -7
- package/src/billing/useBillingUsageReport.ts +7 -7
- package/src/billing/useChangePlan.ts +6 -6
- package/src/billing/useCreateBillingPortalSession.ts +4 -4
- package/src/billing/useCreateCheckoutSession.ts +3 -3
- package/src/billing/useCreatePaymentMethodSetupSession.ts +3 -3
- package/src/billing/useCreditLedger.ts +7 -7
- package/src/billing/useCustomerModelPricing.ts +7 -7
- package/src/billing/useEntitlements.ts +5 -5
- package/src/billing/usePeriodEstimate.ts +4 -4
- package/src/billing/useProviderKeys.ts +129 -0
- package/src/billing/useSetAutoRechargeConfig.ts +3 -3
- package/src/billing/useSubscription.ts +7 -7
- package/src/channel/AgentChannelsPanel.tsx +11 -9
- package/src/channel/connect/ServingAppSection.tsx +1 -1
- package/src/channel-app/ChannelAppDetailPanel.tsx +37 -20
- package/src/channel-app/ChannelAppListPanel.tsx +6 -6
- package/src/channel-app/CreateChannelAppForm.tsx +0 -1
- package/src/channel-app/copy.ts +3 -3
- package/src/channel-app/internal.tsx +21 -0
- package/src/channel-app/slackAppSetup.ts +6 -3
- package/src/channel-app/whatsappAppSetup.ts +5 -2
- package/src/composer/SessionComposer.tsx +5 -14
- package/src/cursor-accounts/CursorAccountEditor.tsx +3 -3
- package/src/cursor-accounts/CursorAccountsConsole.tsx +5 -5
- package/src/dashboard/OperationalDashboard.tsx +1 -6
- package/src/dashboard/useDashboardSummary.ts +2 -4
- package/src/environment/EnvironmentListPanel.tsx +4 -4
- package/src/environment/EnvironmentVariableEditor.tsx +5 -5
- package/src/environment/index.ts +1 -7
- package/src/environment/systemEnvVars.ts +21 -133
- package/src/execution/ArtifactFileContent.tsx +3 -2
- package/src/execution/McpToolDetail.tsx +3 -3
- package/src/execution/RecalledMemoriesCard.tsx +1 -1
- package/src/execution/ResultView.tsx +3 -3
- package/src/execution/TerminalSession.tsx +1 -1
- package/src/execution/ThreadSkeleton.tsx +4 -4
- package/src/execution/file-path-resolver.ts +3 -2
- package/src/execution/sandbox-path-normalizer.ts +2 -1
- package/src/github/parseGitUrl.ts +13 -4
- package/src/iam-policy/GrantAccessForm.tsx +4 -4
- package/src/iam-policy/OrgMembersPanel.tsx +10 -8
- package/src/iam-policy/PeopleWithAccess.tsx +3 -3
- package/src/iam-policy/PrincipalPicker.tsx +3 -3
- package/src/iam-policy/SharePanel.tsx +4 -4
- package/src/iam-policy/useCheckPermission.ts +4 -1
- package/src/iam-policy/useCreateIamPolicy.ts +1 -1
- package/src/iam-policy/useDeleteIamPolicy.ts +1 -1
- package/src/iam-policy/useGrantableRoles.ts +1 -1
- package/src/iam-policy/useGranteeCandidates.ts +3 -3
- package/src/iam-policy/useOwnerAssignment.ts +3 -3
- package/src/iam-policy/usePrincipalsCount.ts +7 -7
- package/src/iam-policy/useResourceAccess.ts +1 -1
- package/src/iam-policy/useRevokeOrgAccess.ts +13 -11
- package/src/identity-account/AccountPreferencesPanel.tsx +60 -13
- package/src/identity-account/useAccountExecutionDefaults.ts +2 -5
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +3 -9
- package/src/identity-provider/IdentityProviderListPanel.tsx +4 -4
- package/src/identity-provider/IdentityProviderWizard.tsx +1 -1
- package/src/identity-provider/SsoLoginPrompt.tsx +6 -5
- package/src/identity-provider/useIdentityProviderList.ts +2 -2
- package/src/index.ts +10 -5
- package/src/inline-edit/InlineEditImage.tsx +13 -11
- package/src/inline-edit/InlineEditText.tsx +13 -11
- package/src/inline-edit/InlineEditTextarea.tsx +12 -16
- package/src/inline-edit/useInlineDraft.ts +85 -0
- package/src/internal/DialogShell.tsx +80 -3
- package/src/internal/LoadingRegion.tsx +46 -0
- package/src/internal/UnknownPublicAddressNotice.tsx +31 -0
- package/src/internal/features.ts +2 -2
- package/src/internal/loading-region-markup.json +71 -0
- package/src/internal/markdown-components.tsx +15 -4
- package/src/internal/trim.ts +10 -0
- package/src/invitation/InvitationManager.tsx +4 -4
- package/src/invitation/InvitationRedemption.tsx +7 -7
- package/src/invitation/useInvitationPreview.ts +1 -1
- package/src/library/InstanceVisibilitySelector.tsx +1 -1
- package/src/library/ResourceVisibilityControl.tsx +7 -4
- package/src/library/VisibilitySelector.tsx +2 -2
- package/src/licenses/LicenseDetail.tsx +8 -6
- package/src/licenses/LicenseIssueForm.tsx +7 -7
- package/src/licenses/license-draft.ts +4 -4
- package/src/licenses/license-format.ts +12 -8
- package/src/mcp-server/McpServerConnectDialog.tsx +4 -6
- package/src/mcp-server/McpServerDetailView.tsx +7 -10
- package/src/mcp-server/McpServerPicker.tsx +2 -12
- package/src/mcp-server/McpToolSelector.tsx +1 -1
- package/src/mcp-server/useMcpServerConnect.ts +14 -33
- package/src/mcp-server/useMcpServerOAuthConnect.ts +7 -23
- package/src/memory/MemoryListPanel.tsx +4 -4
- package/src/models/HarnessSelector.tsx +1 -3
- package/src/models/ModelSelector.tsx +2 -7
- package/src/models/harness.ts +41 -39
- package/src/models/index.ts +1 -1
- package/src/oauth-app/OAuthAppListPanel.tsx +4 -4
- package/src/organization/OrgPreferencesPanel.tsx +28 -10
- package/src/organization/OrgProfilePanel.tsx +12 -12
- package/src/organization/index.ts +1 -0
- package/src/organization/useFollowSessionOrganization.ts +54 -0
- package/src/plan-catalog/plan-draft.ts +3 -3
- package/src/platform-client/PlatformClientListPanel.tsx +4 -4
- package/src/plugin/PluginDetailView.tsx +3 -2
- package/src/plugin/useMcpServerReadiness.ts +2 -2
- package/src/portal-container.ts +8 -0
- package/src/provider-standing/ProviderStandingConsole.tsx +1 -1
- package/src/provider.tsx +60 -27
- package/src/public-base-url-context.ts +71 -0
- package/src/resource-workbench/components/SelectionCheckbox.tsx +1 -1
- package/src/schedule/ScheduleDetailView.tsx +4 -4
- package/src/session/SessionViewer.tsx +13 -3
- package/src/session/useLocalSessionWorker.ts +35 -4
- package/src/session/useSessionConversation.ts +14 -3
- package/src/settings/ChannelAppsSection.tsx +4 -4
- package/src/settings/EnvironmentsSection.tsx +3 -2
- package/src/settings/MembersSection.tsx +3 -3
- package/src/settings/OrgPreferencesSection.tsx +1 -1
- package/src/settings/OrgProfileSection.tsx +1 -1
- package/src/settings/ProviderKeysSection.tsx +4 -0
- package/src/settings/TeamsSection.tsx +1 -1
- package/src/settings/UsageSection.tsx +1 -1
- package/src/settings/index.ts +2 -0
- package/src/settings/settings-nav.ts +2 -0
- package/src/sharing/ShareAgentDialog.tsx +32 -15
- package/src/sharing/SharedAgentChat.tsx +4 -4
- package/src/sharing/useCanCreateAgentShare.ts +6 -4
- package/src/sharing/useSaveAgentShare.ts +1 -1
- package/src/sidebar/WorkspaceSidebar.tsx +3 -2
- package/src/skill/SkillDetailView.tsx +4 -4
- package/src/skill/SkillDiffDialog.tsx +4 -4
- package/src/skill/SkillFileBrowser.tsx +4 -4
- package/src/styles.css +14 -4
- package/src/team/TeamDetailPanel.tsx +3 -3
- package/src/team/TeamListPanel.tsx +3 -2
- package/src/team/TeamMembersPanel.tsx +3 -3
- package/src/usage/OrgUsagePanel.tsx +9 -9
- package/src/usage/useExportCSV.ts +9 -9
- package/src/usage/useOrgUsageReport.ts +7 -7
- package/src/version-history/VersionTimeline.tsx +4 -4
- package/src/workflow/WorkflowTaskApprovalSummary.tsx +14 -7
- package/src/workflow/WorkflowVersionDiffViewer.tsx +4 -4
- package/src/workflow/WorkflowVersionTimeline.tsx +4 -4
- package/src/workflow/inspector/tabs/BranchesTab.tsx +2 -2
- package/src/workflow/inspector/tabs/CatchTab.tsx +1 -1
- package/src/workflow/inspector/tabs/IterationTab.tsx +1 -1
- package/src/workflow/instance/WorkflowInstanceDetailPanel.tsx +7 -6
- package/src/workflow/task-detail/task-approval.ts +20 -13
- package/src/workflow/useDiagnoseExecutionFlow.ts +23 -18
- package/src/workflow/useExplainWorkflowFlow.ts +7 -3
- package/src/workflow/useRefineWorkflowFlow.ts +17 -10
- package/src/workflow/useWorkflowArchitectFlow.ts +7 -3
- package/src/workspace/ExplorerTree.tsx +4 -8
- package/src/workspace/FileViewer.tsx +4 -5
- package/styles.css +1 -1
- package/team/TeamDetailPanel.d.ts +2 -2
- package/team/TeamDetailPanel.d.ts.map +1 -1
- package/team/TeamDetailPanel.js +2 -2
- package/team/TeamDetailPanel.js.map +1 -1
- package/team/TeamListPanel.d.ts.map +1 -1
- package/team/TeamListPanel.js +2 -1
- package/team/TeamListPanel.js.map +1 -1
- package/team/TeamMembersPanel.d.ts +2 -2
- package/team/TeamMembersPanel.d.ts.map +1 -1
- package/team/TeamMembersPanel.js +2 -2
- package/team/TeamMembersPanel.js.map +1 -1
- package/usage/OrgUsagePanel.d.ts +3 -3
- package/usage/OrgUsagePanel.d.ts.map +1 -1
- package/usage/OrgUsagePanel.js +6 -5
- package/usage/OrgUsagePanel.js.map +1 -1
- package/usage/useExportCSV.d.ts +2 -2
- package/usage/useExportCSV.d.ts.map +1 -1
- package/usage/useExportCSV.js +9 -9
- package/usage/useExportCSV.js.map +1 -1
- package/usage/useOrgUsageReport.d.ts +4 -4
- package/usage/useOrgUsageReport.d.ts.map +1 -1
- package/usage/useOrgUsageReport.js +7 -7
- package/usage/useOrgUsageReport.js.map +1 -1
- package/version-history/VersionTimeline.d.ts.map +1 -1
- package/version-history/VersionTimeline.js +2 -1
- package/version-history/VersionTimeline.js.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts +7 -4
- package/workflow/WorkflowTaskApprovalSummary.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.js +8 -3
- package/workflow/WorkflowTaskApprovalSummary.js.map +1 -1
- package/workflow/WorkflowVersionDiffViewer.d.ts.map +1 -1
- package/workflow/WorkflowVersionDiffViewer.js +2 -1
- package/workflow/WorkflowVersionDiffViewer.js.map +1 -1
- package/workflow/WorkflowVersionTimeline.d.ts.map +1 -1
- package/workflow/WorkflowVersionTimeline.js +2 -1
- package/workflow/WorkflowVersionTimeline.js.map +1 -1
- package/workflow/inspector/tabs/BranchesTab.js +1 -1
- package/workflow/inspector/tabs/BranchesTab.js.map +1 -1
- package/workflow/inspector/tabs/CatchTab.js +1 -1
- package/workflow/inspector/tabs/CatchTab.js.map +1 -1
- package/workflow/inspector/tabs/IterationTab.js +1 -1
- package/workflow/inspector/tabs/IterationTab.js.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.d.ts.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.js +6 -5
- package/workflow/instance/WorkflowInstanceDetailPanel.js.map +1 -1
- package/workflow/task-detail/task-approval.d.ts +13 -11
- package/workflow/task-detail/task-approval.d.ts.map +1 -1
- package/workflow/task-detail/task-approval.js +8 -4
- package/workflow/task-detail/task-approval.js.map +1 -1
- package/workflow/useDiagnoseExecutionFlow.d.ts.map +1 -1
- package/workflow/useDiagnoseExecutionFlow.js +23 -18
- package/workflow/useDiagnoseExecutionFlow.js.map +1 -1
- package/workflow/useExplainWorkflowFlow.d.ts.map +1 -1
- package/workflow/useExplainWorkflowFlow.js +7 -3
- package/workflow/useExplainWorkflowFlow.js.map +1 -1
- package/workflow/useRefineWorkflowFlow.d.ts.map +1 -1
- package/workflow/useRefineWorkflowFlow.js +14 -10
- package/workflow/useRefineWorkflowFlow.js.map +1 -1
- package/workflow/useWorkflowArchitectFlow.d.ts.map +1 -1
- package/workflow/useWorkflowArchitectFlow.js +7 -3
- package/workflow/useWorkflowArchitectFlow.js.map +1 -1
- package/workspace/ExplorerTree.d.ts.map +1 -1
- package/workspace/ExplorerTree.js +2 -5
- package/workspace/ExplorerTree.js.map +1 -1
- package/workspace/FileViewer.d.ts.map +1 -1
- package/workspace/FileViewer.js +2 -1
- package/workspace/FileViewer.js.map +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useId } from "react";
|
|
4
4
|
import { getErrorReason, getUserMessage } from "@stigmer/sdk";
|
|
5
5
|
import type { PlanTerms } from "@stigmer/protos/ai/stigmer/billing/plan/v1/spec_pb";
|
|
6
|
+
import { Feature } from "@stigmer/protos/ai/stigmer/platform/v1/entitlement_pb";
|
|
6
7
|
import { Button } from "../button/index.js";
|
|
7
8
|
import { DialogShell } from "../internal/DialogShell.js";
|
|
8
9
|
import { formatDay, formatMonthlyMinimum, sharePercent, type OfferedFeature } from "./plan-features.js";
|
|
@@ -163,8 +164,7 @@ function body(move: PlanMove, planName: (planId: string) => string, losing: read
|
|
|
163
164
|
</p>
|
|
164
165
|
{losing.length > 0 && (
|
|
165
166
|
<p>
|
|
166
|
-
{move.to.metadata?.name} does not include {listFeatures(losing)}.
|
|
167
|
-
creating more is refused.
|
|
167
|
+
{move.to.metadata?.name} does not include {listFeatures(losing)}. {keepsWorking(losing)}
|
|
168
168
|
</p>
|
|
169
169
|
)}
|
|
170
170
|
</>
|
|
@@ -206,6 +206,18 @@ function confirmLabel(move: PlanMove): string {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/** "Teams", "Teams and Managed organizations", "A, B and C". */
|
|
209
|
+
/**
|
|
210
|
+
* What still works after a switch that gives features up. Everything built
|
|
211
|
+
* keeps working, except an organization's own provider keys: they are kept
|
|
212
|
+
* but no longer used, so its agents run on Stigmer's keys, billed as usage.
|
|
213
|
+
*/
|
|
214
|
+
function keepsWorking(losing: readonly OfferedFeature[]): string {
|
|
215
|
+
return losing.some((lost) => lost.feature === Feature.byo_provider_keys)
|
|
216
|
+
? "Your own provider keys are kept but stop being used: your agents run on Stigmer's keys, billed as usage. " +
|
|
217
|
+
"Everything else you built keeps working; only creating more is refused."
|
|
218
|
+
: "Everything you built keeps working; only creating more is refused.";
|
|
219
|
+
}
|
|
220
|
+
|
|
209
221
|
function listFeatures(features: readonly OfferedFeature[]): string {
|
|
210
222
|
const labels = features.map((feature) => feature.label);
|
|
211
223
|
return labels.length <= 1 ? (labels[0] ?? "") : `${labels.slice(0, -1).join(", ")} and ${labels[labels.length - 1]}`;
|
|
@@ -18,7 +18,7 @@ import { useCreditLedger, type UseCreditLedgerOptions } from "./useCreditLedger.
|
|
|
18
18
|
/** Props for {@link CreditLedgerTable}. */
|
|
19
19
|
export interface CreditLedgerTableProps {
|
|
20
20
|
/** Organization ID to fetch ledger entries for. */
|
|
21
|
-
readonly
|
|
21
|
+
readonly org: string;
|
|
22
22
|
/** Additional CSS class names. */
|
|
23
23
|
readonly className?: string;
|
|
24
24
|
}
|
|
@@ -33,11 +33,11 @@ export interface CreditLedgerTableProps {
|
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* ```tsx
|
|
36
|
-
* <CreditLedgerTable
|
|
36
|
+
* <CreditLedgerTable org={activeOrg.metadata.id} />
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
39
|
export function CreditLedgerTable({
|
|
40
|
-
|
|
40
|
+
org,
|
|
41
41
|
className,
|
|
42
42
|
}: CreditLedgerTableProps) {
|
|
43
43
|
const [pageNum, setPageNum] = useState(1);
|
|
@@ -50,7 +50,7 @@ export function CreditLedgerTable({
|
|
|
50
50
|
pageSize: 10,
|
|
51
51
|
view: LedgerView.statement,
|
|
52
52
|
};
|
|
53
|
-
const { ledger, isLoading, error } = useCreditLedger(
|
|
53
|
+
const { ledger, isLoading, error } = useCreditLedger(org, options);
|
|
54
54
|
|
|
55
55
|
if (isLoading) {
|
|
56
56
|
return (
|
|
@@ -34,7 +34,7 @@ export interface CreditPackGridProps {
|
|
|
34
34
|
* <CreditPackGrid
|
|
35
35
|
* accountStatus={account.status}
|
|
36
36
|
* purchasingPackId={isSubmitting ? activePackId : null}
|
|
37
|
-
* onPurchase={(packId) => createSession({
|
|
37
|
+
* onPurchase={(packId) => createSession({ org, packId, ... })}
|
|
38
38
|
* />
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
@@ -60,7 +60,7 @@ function formatExpiry(month: number, year: number): string {
|
|
|
60
60
|
* <PaymentMethodCard
|
|
61
61
|
* paymentMethod={account.defaultPaymentMethod}
|
|
62
62
|
* accountStatus={account.status}
|
|
63
|
-
* onManage={() => openPortal(
|
|
63
|
+
* onManage={() => openPortal(org)}
|
|
64
64
|
* />
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
@@ -17,6 +17,7 @@ import { useCreatePaymentMethodSetupSession } from "./useCreatePaymentMethodSetu
|
|
|
17
17
|
import { usePeriodEstimate } from "./usePeriodEstimate.js";
|
|
18
18
|
import { usePlans } from "./usePlans.js";
|
|
19
19
|
import { useSubscription } from "./useSubscription.js";
|
|
20
|
+
import { LoadingRegion } from "../internal/LoadingRegion.js";
|
|
20
21
|
|
|
21
22
|
/** How often, and how long, the section waits for a just-saved card to reach the account. */
|
|
22
23
|
const CARD_POLL_MS = 2_000;
|
|
@@ -25,7 +26,7 @@ const CARD_WAIT_MS = 30_000;
|
|
|
25
26
|
/** Props for {@link PlanSection}. */
|
|
26
27
|
export interface PlanSectionProps {
|
|
27
28
|
/** The organization whose plan is shown. */
|
|
28
|
-
readonly
|
|
29
|
+
readonly org: string;
|
|
29
30
|
/**
|
|
30
31
|
* The organization is platform-managed: it runs on its integrator's
|
|
31
32
|
* plan, and the section says so instead of offering plans.
|
|
@@ -62,11 +63,11 @@ export interface PlanSectionProps {
|
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
64
65
|
* ```tsx
|
|
65
|
-
* <PlanSection
|
|
66
|
+
* <PlanSection org={org} hasPaymentMethod={hasCard} />
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
export function PlanSection({
|
|
69
|
-
orgId,
|
|
70
|
+
org: orgId,
|
|
70
71
|
managed = false,
|
|
71
72
|
hasPaymentMethod,
|
|
72
73
|
onRefreshAccount,
|
|
@@ -179,9 +180,9 @@ export function PlanSection({
|
|
|
179
180
|
|
|
180
181
|
if (current.isLoading || catalog.isLoading) {
|
|
181
182
|
return (
|
|
182
|
-
<
|
|
183
|
+
<LoadingRegion className={cn("stg:space-y-3", className)} label="Loading plan">
|
|
183
184
|
<div className="stg:h-24 stg:animate-pulse stg:rounded-lg stg:bg-muted-subtle" />
|
|
184
|
-
</
|
|
185
|
+
</LoadingRegion>
|
|
185
186
|
);
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useId, useState } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { getUserMessage } from "@stigmer/sdk";
|
|
6
|
+
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
7
|
+
import type { ProviderKey } from "@stigmer/protos/ai/stigmer/billing/providerkey/v1/api_pb";
|
|
8
|
+
import { Feature } from "@stigmer/protos/ai/stigmer/platform/v1/entitlement_pb";
|
|
9
|
+
import { Button } from "../button/index.js";
|
|
10
|
+
import { ApiResourceKind, useDeploymentMode, useResourceAvailable } from "../deployment-mode.js";
|
|
11
|
+
import { useCheckPermission } from "../iam-policy/useCheckPermission.js";
|
|
12
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice.js";
|
|
13
|
+
import { UNSTYLED_LIST } from "../internal/element-resets.js";
|
|
14
|
+
import { useOrg } from "../organization/OrgProvider.js";
|
|
15
|
+
import { lowestPlanWith } from "./plan-features.js";
|
|
16
|
+
import { planUpgradeFeature, UpgradeNotice } from "./UpgradeNotice.js";
|
|
17
|
+
import { useEntitlements } from "./useEntitlements.js";
|
|
18
|
+
import { usePlans } from "./usePlans.js";
|
|
19
|
+
import { useProviderKeyActions, useProviderKeys, type ProviderKeyProvider } from "./useProviderKeys.js";
|
|
20
|
+
|
|
21
|
+
/** The providers, in the order the section lists them. */
|
|
22
|
+
const PROVIDERS: ReadonlyArray<{ readonly id: ProviderKeyProvider; readonly name: string; readonly placeholder: string }> = [
|
|
23
|
+
{ id: "anthropic", name: "Anthropic", placeholder: "sk-ant-…" },
|
|
24
|
+
{ id: "openai", name: "OpenAI", placeholder: "sk-…" },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
/** Props for {@link ProviderKeysSection}. */
|
|
28
|
+
export interface ProviderKeysSectionProps {
|
|
29
|
+
/** Where the plans are, in the host's routing. Defaults to the billing settings route. */
|
|
30
|
+
readonly billingHref?: string;
|
|
31
|
+
/** Additional CSS class names. */
|
|
32
|
+
readonly className?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Settings section for an organization's own LLM provider keys.
|
|
37
|
+
*
|
|
38
|
+
* On a plan that includes bring-your-own provider keys (Business and
|
|
39
|
+
* above), an admin saves an Anthropic or OpenAI key, and the organization's
|
|
40
|
+
* agents and workflows then run on it: the provider bills the organization
|
|
41
|
+
* directly, and those tokens carry no Stigmer commission and do not count
|
|
42
|
+
* toward the plan's usage share. A saved key is never shown again, only its
|
|
43
|
+
* last four characters. A managed organization is served by its
|
|
44
|
+
* integrator's key for a provider it holds none of, shown read-only.
|
|
45
|
+
*
|
|
46
|
+
* A key the plan no longer allows is kept and listed as not in use, and
|
|
47
|
+
* can be removed; the organization's calls run on Stigmer's keys again,
|
|
48
|
+
* billed as usage. Every member sees the list; admins
|
|
49
|
+
* (`can_manage_billing`) save, replace and remove.
|
|
50
|
+
*
|
|
51
|
+
* Cloud-only: in local mode the runner already uses the developer's own
|
|
52
|
+
* keys directly.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <ProviderKeysSection />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export function ProviderKeysSection({ billingHref, className }: ProviderKeysSectionProps) {
|
|
60
|
+
const headingId = useId();
|
|
61
|
+
const { activeOrg } = useOrg();
|
|
62
|
+
const mode = useDeploymentMode();
|
|
63
|
+
const available = useResourceAvailable(ApiResourceKind.subscription);
|
|
64
|
+
const org = activeOrg?.metadata?.id ?? "";
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<section aria-labelledby={headingId} className={className}>
|
|
68
|
+
<h2 id={headingId} className="stg:text-foreground stg:mb-1 stg:text-sm stg:font-semibold">
|
|
69
|
+
Provider keys
|
|
70
|
+
</h2>
|
|
71
|
+
<p className="stg:text-muted-foreground stg:mb-4 stg:text-xs">
|
|
72
|
+
Run your agents on your organization's own Anthropic and OpenAI keys. The provider bills you directly;
|
|
73
|
+
those tokens carry no Stigmer commission and do not count toward your plan's usage share.
|
|
74
|
+
</p>
|
|
75
|
+
{mode === "local" || !available ? (
|
|
76
|
+
<CloudFeatureNotice>
|
|
77
|
+
Your own provider keys are a Stigmer Cloud plan feature. Local mode already calls the providers with your
|
|
78
|
+
own keys directly.
|
|
79
|
+
</CloudFeatureNotice>
|
|
80
|
+
) : !org ? (
|
|
81
|
+
<p className="stg:text-muted-foreground stg:py-4 stg:text-center stg:text-xs">
|
|
82
|
+
Select an organization to manage its provider keys.
|
|
83
|
+
</p>
|
|
84
|
+
) : (
|
|
85
|
+
<ProviderKeysContent org={org} billingHref={billingHref} />
|
|
86
|
+
)}
|
|
87
|
+
</section>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function ProviderKeysContent({ org, billingHref }: { readonly org: string; readonly billingHref?: string }) {
|
|
92
|
+
const listed = useProviderKeys(org);
|
|
93
|
+
const entitlements = useEntitlements(org);
|
|
94
|
+
const plans = usePlans();
|
|
95
|
+
const manage = useCheckPermission({ kind: "organization", id: org }, "can_manage_billing");
|
|
96
|
+
const canManage = !manage.isLoading && manage.allowed;
|
|
97
|
+
const actions = useProviderKeyActions();
|
|
98
|
+
const [editing, setEditing] = useState<ProviderKeyProvider | null>(null);
|
|
99
|
+
|
|
100
|
+
const allowed = entitlements.allows(Feature.byo_provider_keys);
|
|
101
|
+
const unlockingPlanName = lowestPlanWith(plans.plans ?? [], Feature.byo_provider_keys)?.metadata?.name;
|
|
102
|
+
const keys = listed.keys ?? [];
|
|
103
|
+
const refused = planUpgradeFeature(actions.error);
|
|
104
|
+
|
|
105
|
+
const refresh = useCallback(() => {
|
|
106
|
+
listed.refetch();
|
|
107
|
+
entitlements.refetch();
|
|
108
|
+
}, [listed, entitlements]);
|
|
109
|
+
|
|
110
|
+
if (listed.error) {
|
|
111
|
+
return <p className="stg:text-destructive stg:text-xs">{getUserMessage(listed.error)}</p>;
|
|
112
|
+
}
|
|
113
|
+
if (listed.keys === null || allowed === null) {
|
|
114
|
+
return <p className="stg:text-muted-foreground stg:text-xs">Loading provider keys…</p>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div className="stg:space-y-3">
|
|
119
|
+
{!allowed && (
|
|
120
|
+
<UpgradeNotice feature={Feature.byo_provider_keys} unlockingPlanName={unlockingPlanName} billingHref={billingHref} />
|
|
121
|
+
)}
|
|
122
|
+
{!allowed && keys.length > 0 && (
|
|
123
|
+
<p className="stg:text-muted-foreground stg:text-xs">
|
|
124
|
+
Your saved keys are kept but not used on this plan: your agents run on Stigmer's keys, billed as usage.
|
|
125
|
+
You can remove them at any time.
|
|
126
|
+
</p>
|
|
127
|
+
)}
|
|
128
|
+
<ul
|
|
129
|
+
aria-label="Provider keys"
|
|
130
|
+
className={cn(UNSTYLED_LIST, "stg:divide-y stg:divide-border stg:rounded-md stg:border stg:border-border")}
|
|
131
|
+
>
|
|
132
|
+
{PROVIDERS.map((provider) => (
|
|
133
|
+
<ProviderRow
|
|
134
|
+
key={provider.id}
|
|
135
|
+
org={org}
|
|
136
|
+
provider={provider}
|
|
137
|
+
stored={keys.find((key) => key.provider === provider.id)}
|
|
138
|
+
canSave={canManage && allowed}
|
|
139
|
+
canRemove={canManage}
|
|
140
|
+
editing={editing === provider.id}
|
|
141
|
+
onEdit={() => {
|
|
142
|
+
actions.clearError();
|
|
143
|
+
setEditing(provider.id);
|
|
144
|
+
}}
|
|
145
|
+
onDone={() => {
|
|
146
|
+
setEditing(null);
|
|
147
|
+
refresh();
|
|
148
|
+
}}
|
|
149
|
+
onCancel={() => setEditing(null)}
|
|
150
|
+
actions={actions}
|
|
151
|
+
/>
|
|
152
|
+
))}
|
|
153
|
+
</ul>
|
|
154
|
+
{refused !== null ? (
|
|
155
|
+
<UpgradeNotice feature={refused} error={actions.error} billingHref={billingHref} />
|
|
156
|
+
) : actions.error ? (
|
|
157
|
+
<p role="alert" className="stg:text-destructive stg:text-xs">
|
|
158
|
+
{getUserMessage(actions.error)}
|
|
159
|
+
</p>
|
|
160
|
+
) : null}
|
|
161
|
+
<p className="stg:text-muted-foreground stg:text-[0.65rem]">
|
|
162
|
+
A failure on your own key, such as a rejected key or an exhausted provider balance, is reported as your key's;
|
|
163
|
+
calls are never retried on Stigmer's keys.
|
|
164
|
+
</p>
|
|
165
|
+
</div>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function ProviderRow({
|
|
170
|
+
org,
|
|
171
|
+
provider,
|
|
172
|
+
stored,
|
|
173
|
+
canSave,
|
|
174
|
+
canRemove,
|
|
175
|
+
editing,
|
|
176
|
+
onEdit,
|
|
177
|
+
onDone,
|
|
178
|
+
onCancel,
|
|
179
|
+
actions,
|
|
180
|
+
}: {
|
|
181
|
+
readonly org: string;
|
|
182
|
+
readonly provider: (typeof PROVIDERS)[number];
|
|
183
|
+
readonly stored: ProviderKey | undefined;
|
|
184
|
+
readonly canSave: boolean;
|
|
185
|
+
readonly canRemove: boolean;
|
|
186
|
+
readonly editing: boolean;
|
|
187
|
+
readonly onEdit: () => void;
|
|
188
|
+
readonly onDone: () => void;
|
|
189
|
+
readonly onCancel: () => void;
|
|
190
|
+
readonly actions: ReturnType<typeof useProviderKeyActions>;
|
|
191
|
+
}) {
|
|
192
|
+
const inputId = useId();
|
|
193
|
+
const [value, setValue] = useState("");
|
|
194
|
+
const [confirming, setConfirming] = useState(false);
|
|
195
|
+
const inherited = stored !== undefined && stored.inheritedFromOrg !== "";
|
|
196
|
+
const own = stored !== undefined && !inherited;
|
|
197
|
+
|
|
198
|
+
const save = async () => {
|
|
199
|
+
try {
|
|
200
|
+
await actions.setKey(org, provider.id, value.trim());
|
|
201
|
+
setValue("");
|
|
202
|
+
onDone();
|
|
203
|
+
} catch {
|
|
204
|
+
// The hook holds the error; the section renders it.
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const remove = async () => {
|
|
208
|
+
try {
|
|
209
|
+
await actions.removeKey(org, provider.id);
|
|
210
|
+
setConfirming(false);
|
|
211
|
+
onDone();
|
|
212
|
+
} catch {
|
|
213
|
+
// The hook holds the error; the section renders it.
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
return (
|
|
218
|
+
<li className="stg:space-y-2 stg:px-3 stg:py-2.5">
|
|
219
|
+
<div className="stg:flex stg:items-start stg:justify-between stg:gap-3">
|
|
220
|
+
<div className="stg:min-w-0">
|
|
221
|
+
<p className="stg:text-foreground stg:text-xs stg:font-medium">{provider.name}</p>
|
|
222
|
+
<p className="stg:text-muted-foreground stg:text-[0.7rem]">{describe(stored)}</p>
|
|
223
|
+
</div>
|
|
224
|
+
{!editing && !confirming && (
|
|
225
|
+
<div className="stg:flex stg:shrink-0 stg:gap-2">
|
|
226
|
+
{canSave && !inherited && (
|
|
227
|
+
<Button size="sm" variant="outline" onClick={onEdit} disabled={actions.isSubmitting}>
|
|
228
|
+
{own ? "Replace" : "Add key"}
|
|
229
|
+
</Button>
|
|
230
|
+
)}
|
|
231
|
+
{canRemove && own && (
|
|
232
|
+
<Button
|
|
233
|
+
size="sm"
|
|
234
|
+
variant="ghost"
|
|
235
|
+
onClick={() => {
|
|
236
|
+
actions.clearError();
|
|
237
|
+
setConfirming(true);
|
|
238
|
+
}}
|
|
239
|
+
disabled={actions.isSubmitting}
|
|
240
|
+
>
|
|
241
|
+
Remove
|
|
242
|
+
</Button>
|
|
243
|
+
)}
|
|
244
|
+
</div>
|
|
245
|
+
)}
|
|
246
|
+
</div>
|
|
247
|
+
{confirming && (
|
|
248
|
+
<div className="stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-2.5 stg:py-2">
|
|
249
|
+
<p className="stg:text-foreground stg:min-w-0 stg:flex-1 stg:text-xs">
|
|
250
|
+
{stored?.inUse
|
|
251
|
+
? `Remove your ${provider.name} key? Your agents' ${provider.name} calls go back to Stigmer's keys, billed as usage.`
|
|
252
|
+
: `Remove your ${provider.name} key? It is not in use on this plan.`}
|
|
253
|
+
</p>
|
|
254
|
+
<div className="stg:flex stg:shrink-0 stg:gap-2">
|
|
255
|
+
<Button size="sm" variant="destructive" onClick={() => void remove()} disabled={actions.isSubmitting}>
|
|
256
|
+
{actions.isSubmitting ? "Removing…" : "Remove key"}
|
|
257
|
+
</Button>
|
|
258
|
+
<Button size="sm" variant="ghost" onClick={() => setConfirming(false)} disabled={actions.isSubmitting}>
|
|
259
|
+
Cancel
|
|
260
|
+
</Button>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
)}
|
|
264
|
+
{editing && (
|
|
265
|
+
<form
|
|
266
|
+
className="stg:flex stg:flex-wrap stg:items-end stg:gap-2"
|
|
267
|
+
onSubmit={(event) => {
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
void save();
|
|
270
|
+
}}
|
|
271
|
+
>
|
|
272
|
+
<div className="stg:min-w-48 stg:flex-1 stg:space-y-1">
|
|
273
|
+
<label htmlFor={inputId} className="stg:text-foreground stg:text-xs stg:font-medium">
|
|
274
|
+
{provider.name} API key
|
|
275
|
+
</label>
|
|
276
|
+
<input
|
|
277
|
+
id={inputId}
|
|
278
|
+
type="password"
|
|
279
|
+
autoComplete="off"
|
|
280
|
+
value={value}
|
|
281
|
+
onChange={(event) => setValue(event.target.value)}
|
|
282
|
+
placeholder={provider.placeholder}
|
|
283
|
+
disabled={actions.isSubmitting}
|
|
284
|
+
className={cn(
|
|
285
|
+
"stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground",
|
|
286
|
+
"stg:placeholder:text-muted-foreground",
|
|
287
|
+
"stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring",
|
|
288
|
+
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
289
|
+
)}
|
|
290
|
+
/>
|
|
291
|
+
</div>
|
|
292
|
+
<Button size="sm" type="submit" disabled={actions.isSubmitting || value.trim() === ""}>
|
|
293
|
+
{actions.isSubmitting ? "Saving…" : "Save key"}
|
|
294
|
+
</Button>
|
|
295
|
+
<Button size="sm" variant="ghost" type="button" onClick={onCancel} disabled={actions.isSubmitting}>
|
|
296
|
+
Cancel
|
|
297
|
+
</Button>
|
|
298
|
+
</form>
|
|
299
|
+
)}
|
|
300
|
+
</li>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** One line about a provider's key: none, own, or inherited, with its use. */
|
|
305
|
+
function describe(key: ProviderKey | undefined): string {
|
|
306
|
+
if (key === undefined) {
|
|
307
|
+
return "Not set: calls run on Stigmer's keys, billed as usage.";
|
|
308
|
+
}
|
|
309
|
+
const parts = [`Key ending in ${key.keyHint}`];
|
|
310
|
+
if (key.inheritedFromOrg !== "") {
|
|
311
|
+
parts.push(`provided by ${key.inheritedFromOrg}`);
|
|
312
|
+
} else if (key.updatedAt !== undefined) {
|
|
313
|
+
parts.push(`saved ${formatDay(timestampDate(key.updatedAt))}`);
|
|
314
|
+
}
|
|
315
|
+
parts.push(key.lastUsedAt === undefined ? "not used yet" : `last used ${formatDay(timestampDate(key.lastUsedAt))}`);
|
|
316
|
+
if (!key.inUse) {
|
|
317
|
+
parts.push("not in use on this plan");
|
|
318
|
+
}
|
|
319
|
+
return parts.join(" · ");
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function formatDay(date: Date): string {
|
|
323
|
+
return date.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", timeZone: "UTC" });
|
|
324
|
+
}
|
|
@@ -18,6 +18,7 @@ export const DEFAULT_BILLING_HREF = "/settings/billing";
|
|
|
18
18
|
const FEATURE_BY_WIRE_NAME: Readonly<Record<string, Feature>> = {
|
|
19
19
|
teams: Feature.teams,
|
|
20
20
|
managed_organizations: Feature.managed_organizations,
|
|
21
|
+
byo_provider_keys: Feature.byo_provider_keys,
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
/**
|
package/src/billing/index.ts
CHANGED
|
@@ -20,6 +20,13 @@ export { useEntitlements } from "./useEntitlements.js";
|
|
|
20
20
|
export type { UseEntitlementsOptions, UseEntitlementsReturn } from "./useEntitlements.js";
|
|
21
21
|
export { usePeriodEstimate } from "./usePeriodEstimate.js";
|
|
22
22
|
export type { UsePeriodEstimateOptions, UsePeriodEstimateReturn } from "./usePeriodEstimate.js";
|
|
23
|
+
export { useProviderKeys, useProviderKeyActions } from "./useProviderKeys.js";
|
|
24
|
+
export type {
|
|
25
|
+
ProviderKeyProvider,
|
|
26
|
+
UseProviderKeysOptions,
|
|
27
|
+
UseProviderKeysReturn,
|
|
28
|
+
UseProviderKeyActionsReturn,
|
|
29
|
+
} from "./useProviderKeys.js";
|
|
23
30
|
|
|
24
31
|
// Behavior hooks
|
|
25
32
|
export { useCreateCheckoutSession } from "./useCreateCheckoutSession.js";
|
|
@@ -43,6 +50,8 @@ export type {
|
|
|
43
50
|
} from "./useSetAutoRechargeConfig.js";
|
|
44
51
|
|
|
45
52
|
// Styled components
|
|
53
|
+
export { ProviderKeysSection } from "./ProviderKeysSection.js";
|
|
54
|
+
export type { ProviderKeysSectionProps } from "./ProviderKeysSection.js";
|
|
46
55
|
export { BillingSection } from "./BillingSection.js";
|
|
47
56
|
export type { BillingSectionProps } from "./BillingSection.js";
|
|
48
57
|
export { CreditBalanceCard } from "./CreditBalanceCard.js";
|
|
@@ -24,10 +24,11 @@ const ZERO = BigInt(0);
|
|
|
24
24
|
/**
|
|
25
25
|
* Features a plan may list ahead of the gate that serves them, which
|
|
26
26
|
* Stigmer Cloud does not offer yet. The console leaves them out of every
|
|
27
|
-
* comparison.
|
|
28
|
-
*
|
|
27
|
+
* comparison. Empty while every listed feature is served; bring-your-own
|
|
28
|
+
* provider keys left it when the proxy began serving an organization's own
|
|
29
|
+
* key (stigmer/stigmer#1425).
|
|
29
30
|
*/
|
|
30
|
-
export const NOT_YET_OFFERED: ReadonlySet<Feature> = new Set(
|
|
31
|
+
export const NOT_YET_OFFERED: ReadonlySet<Feature> = new Set<Feature>();
|
|
31
32
|
|
|
32
33
|
/** One feature a plan offers today, with its words. */
|
|
33
34
|
export interface OfferedFeature {
|
|
@@ -138,7 +139,7 @@ export function formatManagedOrganizations(
|
|
|
138
139
|
return "";
|
|
139
140
|
}
|
|
140
141
|
const included = entitlements?.limits?.includedManagedOrganizations;
|
|
141
|
-
const fee = terms?.
|
|
142
|
+
const fee = terms?.perExtraOrgMicros ?? ZERO;
|
|
142
143
|
if (included === undefined) {
|
|
143
144
|
return "Unlimited managed organizations";
|
|
144
145
|
}
|
|
@@ -41,13 +41,13 @@ export interface UseBillingAccountReturn {
|
|
|
41
41
|
* the embedded `CreditBalance` with available, reserved,
|
|
42
42
|
* promotional, and purchased breakdowns.
|
|
43
43
|
*
|
|
44
|
-
* Pass `null` as `
|
|
44
|
+
* Pass `null` as `org` to skip fetching (stable no-op).
|
|
45
45
|
*
|
|
46
|
-
* @param
|
|
46
|
+
* @param org - Organization ID, or `null` to skip.
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* ```tsx
|
|
50
|
-
* const { account, isLoading, error } = useBillingAccount(
|
|
50
|
+
* const { account, isLoading, error } = useBillingAccount(org);
|
|
51
51
|
*
|
|
52
52
|
* if (isLoading) return <Skeleton />;
|
|
53
53
|
* if (error) return <ErrorMessage error={error} />;
|
|
@@ -57,17 +57,17 @@ export interface UseBillingAccountReturn {
|
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
export function useBillingAccount(
|
|
60
|
-
|
|
60
|
+
org: string | null,
|
|
61
61
|
options?: UseBillingAccountOptions,
|
|
62
62
|
): UseBillingAccountReturn {
|
|
63
63
|
const stigmer = useStigmer();
|
|
64
64
|
|
|
65
65
|
const { data: account, isLoading, isRefetching, error, refetch } = useFetch(
|
|
66
|
-
|
|
66
|
+
org
|
|
67
67
|
? () =>
|
|
68
|
-
stigmer.billing.getOrCreateBillingAccount(
|
|
68
|
+
stigmer.billing.getOrCreateBillingAccount(org)
|
|
69
69
|
: null,
|
|
70
|
-
[
|
|
70
|
+
[org, stigmer],
|
|
71
71
|
null as BillingAccount | null,
|
|
72
72
|
{ refetchOnWindowFocus: options?.refetchOnWindowFocus ?? false },
|
|
73
73
|
);
|
|
@@ -26,16 +26,16 @@ export interface UseBillingUsageReportReturn {
|
|
|
26
26
|
* Returns total provider cost, total billable amount, execution and LLM
|
|
27
27
|
* call counts, and a per-model breakdown with cost tier attribution.
|
|
28
28
|
*
|
|
29
|
-
* Pass `null` as `
|
|
29
|
+
* Pass `null` as `org` to skip fetching (stable no-op).
|
|
30
30
|
*
|
|
31
|
-
* @param
|
|
31
|
+
* @param org - Organization ID, or `null` to skip.
|
|
32
32
|
* @param startTime - Start of the reporting period.
|
|
33
33
|
* @param endTime - End of the reporting period.
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* ```tsx
|
|
37
37
|
* const { report, isLoading } = useBillingUsageReport(
|
|
38
|
-
*
|
|
38
|
+
* org,
|
|
39
39
|
* new Date("2026-05-01"),
|
|
40
40
|
* new Date("2026-05-31"),
|
|
41
41
|
* );
|
|
@@ -47,7 +47,7 @@ export interface UseBillingUsageReportReturn {
|
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
49
|
export function useBillingUsageReport(
|
|
50
|
-
|
|
50
|
+
org: string | null,
|
|
51
51
|
startTime: Date,
|
|
52
52
|
endTime: Date,
|
|
53
53
|
): UseBillingUsageReportReturn {
|
|
@@ -57,15 +57,15 @@ export function useBillingUsageReport(
|
|
|
57
57
|
const endKey = endTime.toISOString();
|
|
58
58
|
|
|
59
59
|
const { data: report, isLoading, isRefetching, error, refetch } = useFetch(
|
|
60
|
-
|
|
60
|
+
org
|
|
61
61
|
? () =>
|
|
62
62
|
stigmer.billing.getBillingUsageReport({
|
|
63
|
-
|
|
63
|
+
org,
|
|
64
64
|
startTime,
|
|
65
65
|
endTime,
|
|
66
66
|
})
|
|
67
67
|
: null,
|
|
68
|
-
[
|
|
68
|
+
[org, startKey, endKey, stigmer],
|
|
69
69
|
null as BillingUsageReportResponse | null,
|
|
70
70
|
);
|
|
71
71
|
|
|
@@ -24,7 +24,7 @@ export interface UseChangePlanReturn {
|
|
|
24
24
|
* {@link useCreatePaymentMethodSetupSession}). Resolves with the
|
|
25
25
|
* subscription as it stands after the change.
|
|
26
26
|
*/
|
|
27
|
-
readonly changePlan: (
|
|
27
|
+
readonly changePlan: (org: string, planId: string) => Promise<Subscription>;
|
|
28
28
|
/** `true` while a change is in flight. */
|
|
29
29
|
readonly isSubmitting: boolean;
|
|
30
30
|
/** Error from the last failed attempt, or `null` when healthy. */
|
|
@@ -45,11 +45,11 @@ export function useChangePlan(): UseChangePlanReturn {
|
|
|
45
45
|
const [error, setError] = useState<Error | null>(null);
|
|
46
46
|
|
|
47
47
|
const changePlan = useCallback(
|
|
48
|
-
async (
|
|
48
|
+
async (org: string, planId: string): Promise<Subscription> => {
|
|
49
49
|
setIsSubmitting(true);
|
|
50
50
|
setError(null);
|
|
51
51
|
try {
|
|
52
|
-
return await stigmer.subscription.changePlan(create(ChangePlanInputSchema, {
|
|
52
|
+
return await stigmer.subscription.changePlan(create(ChangePlanInputSchema, { org, planId }));
|
|
53
53
|
} catch (e) {
|
|
54
54
|
const err = toError(e);
|
|
55
55
|
setError(err);
|
|
@@ -75,7 +75,7 @@ export interface UseCancelSubscriptionReturn {
|
|
|
75
75
|
* of the current period and is on Free after it; nothing it built is
|
|
76
76
|
* deleted. Choosing the same plan again before then resumes it.
|
|
77
77
|
*/
|
|
78
|
-
readonly cancel: (
|
|
78
|
+
readonly cancel: (org: string) => Promise<Subscription>;
|
|
79
79
|
/** `true` while a cancel is in flight. */
|
|
80
80
|
readonly isSubmitting: boolean;
|
|
81
81
|
/** Error from the last failed attempt, or `null` when healthy. */
|
|
@@ -94,11 +94,11 @@ export function useCancelSubscription(): UseCancelSubscriptionReturn {
|
|
|
94
94
|
const [error, setError] = useState<Error | null>(null);
|
|
95
95
|
|
|
96
96
|
const cancel = useCallback(
|
|
97
|
-
async (
|
|
97
|
+
async (org: string): Promise<Subscription> => {
|
|
98
98
|
setIsSubmitting(true);
|
|
99
99
|
setError(null);
|
|
100
100
|
try {
|
|
101
|
-
return await stigmer.subscription.cancel(create(CancelSubscriptionInputSchema, {
|
|
101
|
+
return await stigmer.subscription.cancel(create(CancelSubscriptionInputSchema, { org }));
|
|
102
102
|
} catch (e) {
|
|
103
103
|
const err = toError(e);
|
|
104
104
|
setError(err);
|