@stigmer/react 3.12.3 → 3.12.5
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/steps/IdentityStep.d.ts.map +1 -1
- package/agent/steps/IdentityStep.js +2 -1
- package/agent/steps/IdentityStep.js.map +1 -1
- package/agent-instance/AgentInstanceDetailPanel.d.ts.map +1 -1
- package/agent-instance/AgentInstanceDetailPanel.js +2 -1
- package/agent-instance/AgentInstanceDetailPanel.js.map +1 -1
- package/api-key/CreateApiKeyForm.d.ts.map +1 -1
- package/api-key/CreateApiKeyForm.js +2 -1
- package/api-key/CreateApiKeyForm.js.map +1 -1
- package/attachment/AttachmentChipList.js +16 -6
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/index.d.ts +1 -1
- package/attachment/index.d.ts.map +1 -1
- package/attachment/index.js.map +1 -1
- package/attachment/useAttachments.d.ts +51 -8
- package/attachment/useAttachments.d.ts.map +1 -1
- package/attachment/useAttachments.js +74 -3
- package/attachment/useAttachments.js.map +1 -1
- package/channel/ChannelConversationsDialog.d.ts.map +1 -1
- package/channel/ChannelConversationsDialog.js +2 -1
- package/channel/ChannelConversationsDialog.js.map +1 -1
- package/channel/ChannelTemplatesDialog.d.ts.map +1 -1
- package/channel/ChannelTemplatesDialog.js +2 -1
- package/channel/ChannelTemplatesDialog.js.map +1 -1
- package/channel/ConnectSlackDialog.d.ts.map +1 -1
- package/channel/ConnectSlackDialog.js +2 -1
- package/channel/ConnectSlackDialog.js.map +1 -1
- package/channel/connect/ServingAppSection.d.ts.map +1 -1
- package/channel/connect/ServingAppSection.js +2 -1
- package/channel/connect/ServingAppSection.js.map +1 -1
- package/channel-app/CreateChannelAppForm.d.ts.map +1 -1
- package/channel-app/CreateChannelAppForm.js +2 -1
- package/channel-app/CreateChannelAppForm.js.map +1 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +17 -10
- package/composer/SessionComposer.js.map +1 -1
- package/conversation/ConversationComposer.d.ts +19 -3
- package/conversation/ConversationComposer.d.ts.map +1 -1
- package/conversation/ConversationComposer.js +4 -4
- package/conversation/ConversationComposer.js.map +1 -1
- package/conversation/ConversationListPane.d.ts.map +1 -1
- package/conversation/ConversationListPane.js +2 -1
- package/conversation/ConversationListPane.js.map +1 -1
- package/conversation/ConversationTemplatePickerDialog.d.ts +63 -0
- package/conversation/ConversationTemplatePickerDialog.d.ts.map +1 -0
- package/conversation/ConversationTemplatePickerDialog.js +151 -0
- package/conversation/ConversationTemplatePickerDialog.js.map +1 -0
- package/conversation/ConversationTimelineView.d.ts.map +1 -1
- package/conversation/ConversationTimelineView.js +2 -1
- package/conversation/ConversationTimelineView.js.map +1 -1
- package/conversation/ConversationsWorkbench.d.ts.map +1 -1
- package/conversation/ConversationsWorkbench.js +16 -5
- package/conversation/ConversationsWorkbench.js.map +1 -1
- package/conversation/index.d.ts +3 -1
- package/conversation/index.d.ts.map +1 -1
- package/conversation/index.js +1 -0
- package/conversation/index.js.map +1 -1
- package/conversation/useConversationParticipation.d.ts +41 -4
- package/conversation/useConversationParticipation.d.ts.map +1 -1
- package/conversation/useConversationParticipation.js +13 -2
- package/conversation/useConversationParticipation.js.map +1 -1
- package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -1
- package/cursor-accounts/CursorAccountsConsole.js +2 -1
- package/cursor-accounts/CursorAccountsConsole.js.map +1 -1
- package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -1
- package/cursor-accounts/MemberKeysPanel.js +2 -1
- package/cursor-accounts/MemberKeysPanel.js.map +1 -1
- package/dashboard/DashboardFailedRuns.d.ts.map +1 -1
- package/dashboard/DashboardFailedRuns.js +2 -1
- package/dashboard/DashboardFailedRuns.js.map +1 -1
- package/dependency-graph/DependencyGraph.d.ts.map +1 -1
- package/dependency-graph/DependencyGraph.js +2 -1
- package/dependency-graph/DependencyGraph.js.map +1 -1
- package/dependency-graph/DependencyTreeNode.d.ts.map +1 -1
- package/dependency-graph/DependencyTreeNode.js +2 -1
- package/dependency-graph/DependencyTreeNode.js.map +1 -1
- package/environment/EnvironmentPicker.d.ts.map +1 -1
- package/environment/EnvironmentPicker.js +2 -1
- package/environment/EnvironmentPicker.js.map +1 -1
- package/error/SecretFlowErrorGuide.d.ts.map +1 -1
- package/error/SecretFlowErrorGuide.js +2 -1
- package/error/SecretFlowErrorGuide.js.map +1 -1
- package/execution/ArtifactContentBody.d.ts.map +1 -1
- package/execution/ArtifactContentBody.js +2 -1
- package/execution/ArtifactContentBody.js.map +1 -1
- package/execution/ArtifactsWidget.d.ts.map +1 -1
- package/execution/ArtifactsWidget.js +2 -1
- package/execution/ArtifactsWidget.js.map +1 -1
- package/execution/FileChangeProgressBar.d.ts.map +1 -1
- package/execution/FileChangeProgressBar.js +2 -1
- package/execution/FileChangeProgressBar.js.map +1 -1
- package/execution/TodoList.d.ts.map +1 -1
- package/execution/TodoList.js +2 -1
- package/execution/TodoList.js.map +1 -1
- package/execution/WriteBacksWidget.d.ts.map +1 -1
- package/execution/WriteBacksWidget.js +2 -1
- package/execution/WriteBacksWidget.js.map +1 -1
- package/execution/tool-categories.d.ts +5 -22
- package/execution/tool-categories.d.ts.map +1 -1
- package/execution/tool-categories.js +8 -38
- package/execution/tool-categories.js.map +1 -1
- package/iam-policy/PeopleWithAccess.d.ts.map +1 -1
- package/iam-policy/PeopleWithAccess.js +2 -1
- package/iam-policy/PeopleWithAccess.js.map +1 -1
- package/iam-policy/PrincipalPicker.d.ts.map +1 -1
- package/iam-policy/PrincipalPicker.js +2 -1
- package/iam-policy/PrincipalPicker.js.map +1 -1
- package/iam-policy/RoleSelector.d.ts.map +1 -1
- package/iam-policy/RoleSelector.js +2 -1
- package/iam-policy/RoleSelector.js.map +1 -1
- package/identity-account/AccountPreferencesPanel.d.ts +35 -0
- package/identity-account/AccountPreferencesPanel.d.ts.map +1 -0
- package/identity-account/AccountPreferencesPanel.js +187 -0
- package/identity-account/AccountPreferencesPanel.js.map +1 -0
- package/identity-account/index.d.ts +8 -0
- package/identity-account/index.d.ts.map +1 -1
- package/identity-account/index.js +4 -0
- package/identity-account/index.js.map +1 -1
- package/identity-account/useAccountExecutionDefaults.d.ts +36 -0
- package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -0
- package/identity-account/useAccountExecutionDefaults.js +46 -0
- package/identity-account/useAccountExecutionDefaults.js.map +1 -0
- package/identity-account/useMyIdentityAccount.d.ts +55 -0
- package/identity-account/useMyIdentityAccount.d.ts.map +1 -0
- package/identity-account/useMyIdentityAccount.js +37 -0
- package/identity-account/useMyIdentityAccount.js.map +1 -0
- package/identity-account/useUpdateIdentityAccount.d.ts +42 -0
- package/identity-account/useUpdateIdentityAccount.d.ts.map +1 -0
- package/identity-account/useUpdateIdentityAccount.js +53 -0
- package/identity-account/useUpdateIdentityAccount.js.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -1
- package/identity-provider/CreateIdentityProviderForm.js +2 -1
- package/identity-provider/CreateIdentityProviderForm.js.map +1 -1
- package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -1
- package/identity-provider/IdentityProviderDetailPanel.js +2 -1
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -1
- package/identity-provider/IdentityProviderWizard.d.ts.map +1 -1
- package/identity-provider/IdentityProviderWizard.js +2 -1
- package/identity-provider/IdentityProviderWizard.js.map +1 -1
- package/index.d.ts +14 -10
- package/index.d.ts.map +1 -1
- package/index.js +11 -5
- package/index.js.map +1 -1
- package/internal/StandingContextField.d.ts +37 -0
- package/internal/StandingContextField.d.ts.map +1 -0
- package/internal/StandingContextField.js +24 -0
- package/internal/StandingContextField.js.map +1 -0
- package/internal/element-resets.d.ts +17 -0
- package/internal/element-resets.d.ts.map +1 -0
- package/internal/element-resets.js +32 -0
- package/internal/element-resets.js.map +1 -0
- package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
- package/internal/file-tree/FileTreeNode.js +2 -1
- package/internal/file-tree/FileTreeNode.js.map +1 -1
- package/internal/markdown-components.d.ts +7 -0
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +15 -5
- package/internal/markdown-components.js.map +1 -1
- package/invitation/InvitationManager.d.ts.map +1 -1
- package/invitation/InvitationManager.js +2 -1
- package/invitation/InvitationManager.js.map +1 -1
- package/library/InstanceVisibilitySelector.d.ts.map +1 -1
- package/library/InstanceVisibilitySelector.js +9 -2
- package/library/InstanceVisibilitySelector.js.map +1 -1
- package/library/ResourceVisibilityControl.d.ts +13 -3
- package/library/ResourceVisibilityControl.d.ts.map +1 -1
- package/library/ResourceVisibilityControl.js +33 -5
- package/library/ResourceVisibilityControl.js.map +1 -1
- package/library/VisibilityOptionRow.d.ts +6 -0
- package/library/VisibilityOptionRow.d.ts.map +1 -1
- package/library/VisibilityOptionRow.js +11 -1
- package/library/VisibilityOptionRow.js.map +1 -1
- package/library/VisibilitySelector.d.ts.map +1 -1
- package/library/VisibilitySelector.js +14 -2
- package/library/VisibilitySelector.js.map +1 -1
- package/library/index.d.ts +4 -2
- package/library/index.d.ts.map +1 -1
- package/library/index.js +2 -1
- package/library/index.js.map +1 -1
- package/library/useCanSetPublicVisibility.d.ts +30 -0
- package/library/useCanSetPublicVisibility.d.ts.map +1 -0
- package/library/useCanSetPublicVisibility.js +41 -0
- package/library/useCanSetPublicVisibility.js.map +1 -0
- package/library/visibilityLevels.d.ts +32 -1
- package/library/visibilityLevels.d.ts.map +1 -1
- package/library/visibilityLevels.js +34 -14
- package/library/visibilityLevels.js.map +1 -1
- package/manifest/ApplyManifestDialog.d.ts.map +1 -1
- package/manifest/ApplyManifestDialog.js +2 -1
- package/manifest/ApplyManifestDialog.js.map +1 -1
- package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -1
- package/mcp-server/steps/IdentityTransportStep.js +2 -1
- package/mcp-server/steps/IdentityTransportStep.js.map +1 -1
- package/mcp-server/useMcpServerConnect.d.ts +8 -5
- package/mcp-server/useMcpServerConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerConnect.js +2 -1
- package/mcp-server/useMcpServerConnect.js.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.js +7 -2
- package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
- package/oauth-app/CreateOAuthAppForm.d.ts +2 -2
- package/oauth-app/CreateOAuthAppForm.d.ts.map +1 -1
- package/oauth-app/CreateOAuthAppForm.js +13 -4
- package/oauth-app/CreateOAuthAppForm.js.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.d.ts.map +1 -1
- package/oauth-app/OAuthAppDetailPanel.js +32 -5
- package/oauth-app/OAuthAppDetailPanel.js.map +1 -1
- package/organization/OrgPreferencesPanel.d.ts +32 -0
- package/organization/OrgPreferencesPanel.d.ts.map +1 -0
- package/organization/OrgPreferencesPanel.js +90 -0
- package/organization/OrgPreferencesPanel.js.map +1 -0
- package/organization/OrgProfilePanel.d.ts.map +1 -1
- package/organization/OrgProfilePanel.js +5 -4
- package/organization/OrgProfilePanel.js.map +1 -1
- package/organization/index.d.ts +2 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +1 -0
- package/organization/index.js.map +1 -1
- package/package.json +4 -4
- package/platform-client/CreatePlatformClientForm.d.ts.map +1 -1
- package/platform-client/CreatePlatformClientForm.js +2 -1
- package/platform-client/CreatePlatformClientForm.js.map +1 -1
- package/platform-client/PlatformClientDetailPanel.d.ts.map +1 -1
- package/platform-client/PlatformClientDetailPanel.js +2 -1
- package/platform-client/PlatformClientDetailPanel.js.map +1 -1
- package/pricing-governance/BaselineEditor.d.ts.map +1 -1
- package/pricing-governance/BaselineEditor.js +2 -1
- package/pricing-governance/BaselineEditor.js.map +1 -1
- package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -1
- package/pricing-governance/PricingGovernanceConsole.js +2 -1
- package/pricing-governance/PricingGovernanceConsole.js.map +1 -1
- package/provider-standing/ProviderStandingAccessNotice.d.ts +11 -0
- package/provider-standing/ProviderStandingAccessNotice.d.ts.map +1 -0
- package/provider-standing/ProviderStandingAccessNotice.js +14 -0
- package/provider-standing/ProviderStandingAccessNotice.js.map +1 -0
- package/provider-standing/ProviderStandingConsole.d.ts +24 -0
- package/provider-standing/ProviderStandingConsole.d.ts.map +1 -0
- package/provider-standing/ProviderStandingConsole.js +98 -0
- package/provider-standing/ProviderStandingConsole.js.map +1 -0
- package/provider-standing/index.d.ts +6 -0
- package/provider-standing/index.d.ts.map +1 -0
- package/provider-standing/index.js +6 -0
- package/provider-standing/index.js.map +1 -0
- package/provider-standing/useProviderStanding.d.ts +34 -0
- package/provider-standing/useProviderStanding.d.ts.map +1 -0
- package/provider-standing/useProviderStanding.js +26 -0
- package/provider-standing/useProviderStanding.js.map +1 -0
- package/provider.d.ts +12 -0
- package/provider.d.ts.map +1 -1
- package/provider.js +12 -0
- package/provider.js.map +1 -1
- package/resource-creation/StepIndicator.d.ts.map +1 -1
- package/resource-creation/StepIndicator.js +2 -1
- package/resource-creation/StepIndicator.js.map +1 -1
- package/schedule/ScheduleDetailView.d.ts.map +1 -1
- package/schedule/ScheduleDetailView.js +3 -2
- package/schedule/ScheduleDetailView.js.map +1 -1
- package/schedule/ScheduleRunsTable.d.ts.map +1 -1
- package/schedule/ScheduleRunsTable.js +2 -1
- package/schedule/ScheduleRunsTable.js.map +1 -1
- package/session/NewSessionViewer.d.ts +10 -1
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +2 -1
- package/session/NewSessionViewer.js.map +1 -1
- package/session/facets/ArtifactsTab.d.ts.map +1 -1
- package/session/facets/ArtifactsTab.js +2 -1
- package/session/facets/ArtifactsTab.js.map +1 -1
- package/session/facets/ChangesTab.d.ts.map +1 -1
- package/session/facets/ChangesTab.js +2 -1
- package/session/facets/ChangesTab.js.map +1 -1
- package/session/facets/UsageTab.d.ts +10 -3
- package/session/facets/UsageTab.d.ts.map +1 -1
- package/session/facets/UsageTab.js +42 -6
- package/session/facets/UsageTab.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/useNewSessionFlow.d.ts +27 -1
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +45 -8
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/useSessionUsage.d.ts +25 -0
- package/session/useSessionUsage.d.ts.map +1 -1
- package/session/useSessionUsage.js +11 -0
- package/session/useSessionUsage.js.map +1 -1
- package/settings/AccountPreferencesSection.d.ts +3 -0
- package/settings/AccountPreferencesSection.d.ts.map +1 -0
- package/settings/AccountPreferencesSection.js +10 -0
- package/settings/AccountPreferencesSection.js.map +1 -0
- package/settings/OrgPreferencesSection.d.ts +3 -0
- package/settings/OrgPreferencesSection.d.ts.map +1 -0
- package/settings/OrgPreferencesSection.js +13 -0
- package/settings/OrgPreferencesSection.js.map +1 -0
- package/settings/index.d.ts +2 -0
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +2 -0
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +23 -1
- package/settings/settings-nav.js.map +1 -1
- package/settings/useSettingsNavGroups.d.ts.map +1 -1
- package/settings/useSettingsNavGroups.js +4 -1
- package/settings/useSettingsNavGroups.js.map +1 -1
- package/sharing/ShareAgentDialog.d.ts.map +1 -1
- package/sharing/ShareAgentDialog.js +2 -1
- package/sharing/ShareAgentDialog.js.map +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/SkillFileBrowser.d.ts.map +1 -1
- package/skill/SkillFileBrowser.js +2 -1
- package/skill/SkillFileBrowser.js.map +1 -1
- package/skill/internal/fetchAndUnpackArtifact.d.ts +1 -1
- package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -1
- package/skill/internal/fetchAndUnpackArtifact.js +47 -3
- package/skill/internal/fetchAndUnpackArtifact.js.map +1 -1
- package/skill/useSkillDiff.d.ts.map +1 -1
- package/skill/useSkillDiff.js +7 -1
- package/skill/useSkillDiff.js.map +1 -1
- package/skill/useSkillUpload.d.ts.map +1 -1
- package/skill/useSkillUpload.js +22 -4
- package/skill/useSkillUpload.js.map +1 -1
- package/src/__tests__/bare-host-resets.layout.test.tsx +184 -0
- package/src/agent/steps/IdentityStep.tsx +2 -1
- package/src/agent-instance/AgentInstanceDetailPanel.tsx +2 -1
- package/src/api-key/CreateApiKeyForm.tsx +2 -1
- package/src/attachment/AttachmentChipList.tsx +19 -8
- package/src/attachment/__tests__/AttachmentChipList.test.tsx +12 -0
- package/src/attachment/__tests__/useAttachments.test.ts +293 -0
- package/src/attachment/index.ts +1 -0
- package/src/attachment/useAttachments.ts +143 -11
- package/src/channel/ChannelConversationsDialog.tsx +2 -1
- package/src/channel/ChannelTemplatesDialog.tsx +2 -1
- package/src/channel/ConnectSlackDialog.tsx +2 -1
- package/src/channel/connect/ServingAppSection.tsx +2 -1
- package/src/channel-app/CreateChannelAppForm.tsx +2 -1
- package/src/composer/SessionComposer.tsx +23 -14
- package/src/conversation/ConversationComposer.tsx +38 -4
- package/src/conversation/ConversationListPane.tsx +2 -5
- package/src/conversation/ConversationTemplatePickerDialog.tsx +441 -0
- package/src/conversation/ConversationTimelineView.tsx +2 -1
- package/src/conversation/ConversationsWorkbench.tsx +40 -4
- package/src/conversation/__tests__/ConversationComposer.test.tsx +56 -1
- package/src/conversation/__tests__/ConversationTemplatePickerDialog.test.tsx +224 -0
- package/src/conversation/__tests__/useConversationParticipation.test.tsx +45 -4
- package/src/conversation/index.ts +4 -0
- package/src/conversation/useConversationParticipation.ts +58 -6
- package/src/cursor-accounts/CursorAccountsConsole.tsx +2 -1
- package/src/cursor-accounts/MemberKeysPanel.tsx +2 -1
- package/src/dashboard/DashboardFailedRuns.tsx +2 -1
- package/src/dependency-graph/DependencyGraph.tsx +2 -1
- package/src/dependency-graph/DependencyTreeNode.tsx +2 -1
- package/src/environment/EnvironmentPicker.tsx +2 -1
- package/src/error/SecretFlowErrorGuide.tsx +3 -2
- package/src/execution/ArtifactContentBody.tsx +2 -1
- package/src/execution/ArtifactsWidget.tsx +2 -1
- package/src/execution/FileChangeProgressBar.tsx +2 -1
- package/src/execution/TodoList.tsx +2 -1
- package/src/execution/WriteBacksWidget.tsx +2 -1
- package/src/execution/tool-categories.ts +17 -41
- package/src/iam-policy/PeopleWithAccess.tsx +2 -1
- package/src/iam-policy/PrincipalPicker.tsx +2 -0
- package/src/iam-policy/RoleSelector.tsx +2 -1
- package/src/identity-account/AccountPreferencesPanel.tsx +446 -0
- package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +233 -0
- package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +116 -0
- package/src/identity-account/__tests__/useMyIdentityAccount.test.tsx +121 -0
- package/src/identity-account/index.ts +11 -0
- package/src/identity-account/useAccountExecutionDefaults.ts +63 -0
- package/src/identity-account/useMyIdentityAccount.ts +75 -0
- package/src/identity-account/useUpdateIdentityAccount.ts +73 -0
- package/src/identity-provider/CreateIdentityProviderForm.tsx +2 -1
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +2 -1
- package/src/identity-provider/IdentityProviderWizard.tsx +2 -1
- package/src/index.ts +37 -2
- package/src/internal/StandingContextField.tsx +92 -0
- package/src/internal/element-resets.ts +33 -0
- package/src/internal/file-tree/FileTreeNode.tsx +2 -1
- package/src/internal/markdown-components.tsx +15 -5
- package/src/invitation/InvitationManager.tsx +3 -2
- package/src/library/InstanceVisibilitySelector.tsx +9 -2
- package/src/library/ResourceVisibilityControl.tsx +46 -13
- package/src/library/VisibilityOptionRow.tsx +28 -6
- package/src/library/VisibilitySelector.tsx +14 -2
- package/src/library/__tests__/VisibilitySelector.test.tsx +48 -1
- package/src/library/__tests__/visibilityLevels.test.ts +67 -1
- package/src/library/index.ts +6 -1
- package/src/library/useCanSetPublicVisibility.ts +56 -0
- package/src/library/visibilityLevels.ts +65 -14
- package/src/manifest/ApplyManifestDialog.tsx +2 -1
- package/src/mcp-server/__tests__/useMcpServerConnect.asyncLane.test.tsx +117 -0
- package/src/mcp-server/steps/IdentityTransportStep.tsx +3 -2
- package/src/mcp-server/useMcpServerConnect.ts +9 -6
- package/src/mcp-server/useMcpServerOAuthConnect.ts +7 -2
- package/src/oauth-app/CreateOAuthAppForm.tsx +58 -3
- package/src/oauth-app/OAuthAppDetailPanel.tsx +84 -3
- package/src/organization/OrgPreferencesPanel.tsx +221 -0
- package/src/organization/OrgProfilePanel.tsx +5 -4
- package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +145 -0
- package/src/organization/__tests__/OrgProfilePanel.test.tsx +108 -0
- package/src/organization/index.ts +2 -0
- package/src/platform-client/CreatePlatformClientForm.tsx +4 -3
- package/src/platform-client/PlatformClientDetailPanel.tsx +4 -3
- package/src/pricing-governance/BaselineEditor.tsx +3 -2
- package/src/pricing-governance/PricingGovernanceConsole.tsx +2 -1
- package/src/provider-standing/ProviderStandingAccessNotice.tsx +36 -0
- package/src/provider-standing/ProviderStandingConsole.tsx +216 -0
- package/src/provider-standing/__tests__/ProviderStandingConsole.test.tsx +143 -0
- package/src/provider-standing/index.ts +8 -0
- package/src/provider-standing/useProviderStanding.ts +50 -0
- package/src/provider.tsx +12 -0
- package/src/resource-creation/StepIndicator.tsx +2 -1
- package/src/schedule/ScheduleDetailView.tsx +3 -2
- package/src/schedule/ScheduleRunsTable.tsx +2 -1
- package/src/session/NewSessionViewer.tsx +12 -0
- package/src/session/__tests__/UsageTab.test.tsx +136 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +151 -0
- package/src/session/__tests__/useSessionUsage.test.ts +19 -0
- package/src/session/facets/ArtifactsTab.tsx +2 -1
- package/src/session/facets/ChangesTab.tsx +2 -1
- package/src/session/facets/UsageTab.tsx +98 -6
- package/src/session/index.ts +1 -0
- package/src/session/useNewSessionFlow.ts +76 -9
- package/src/session/useSessionUsage.ts +37 -0
- package/src/settings/AccountPreferencesSection.tsx +25 -0
- package/src/settings/OrgPreferencesSection.tsx +35 -0
- package/src/settings/__tests__/settings-nav.test.ts +27 -0
- package/src/settings/__tests__/useSettingsNavGroups.test.tsx +11 -1
- package/src/settings/index.ts +2 -0
- package/src/settings/settings-nav.ts +25 -0
- package/src/settings/useSettingsNavGroups.ts +8 -1
- package/src/sharing/ShareAgentDialog.tsx +2 -1
- package/src/sidebar/WorkspaceSidebar.tsx +2 -1
- package/src/skill/SkillFileBrowser.tsx +2 -1
- package/src/skill/__tests__/SkillFileBrowser.test.tsx +10 -2
- package/src/skill/__tests__/fetchAndUnpackArtifact.test.ts +90 -0
- package/src/skill/__tests__/useSkillUpload.test.ts +69 -0
- package/src/skill/internal/fetchAndUnpackArtifact.ts +54 -4
- package/src/skill/useSkillDiff.ts +7 -1
- package/src/skill/useSkillUpload.ts +25 -6
- package/src/workflow/ApprovalFormBuilder.tsx +5 -27
- package/src/workflow/FailedRunsWidget.tsx +2 -1
- package/src/workflow/PendingApprovalsWidget.tsx +2 -1
- package/src/workflow/facets/WorkflowArtifactsTab.tsx +2 -1
- package/src/workflow/facets/WorkflowUsageTab.tsx +2 -1
- package/src/workflow/inspector/WorkflowSummaryPanel.tsx +2 -1
- package/src/workflow/inspector/tabs/BranchesTab.tsx +2 -1
- package/src/workflow/inspector/tabs/IterationTab.tsx +2 -1
- package/src/workflow/instance/WorkflowInstanceDetailPanel.tsx +2 -1
- package/src/workspace/ExplorerTree.tsx +2 -1
- package/src/workspace/WorkspaceContentSearch.tsx +2 -1
- package/src/workspace/WorkspaceFileSearch.tsx +2 -1
- package/src/workspace/WorkspaceSummary.tsx +2 -1
- package/styles.css +1 -1
- package/workflow/ApprovalFormBuilder.d.ts.map +1 -1
- package/workflow/ApprovalFormBuilder.js +8 -5
- package/workflow/ApprovalFormBuilder.js.map +1 -1
- package/workflow/FailedRunsWidget.d.ts.map +1 -1
- package/workflow/FailedRunsWidget.js +2 -1
- package/workflow/FailedRunsWidget.js.map +1 -1
- package/workflow/PendingApprovalsWidget.d.ts.map +1 -1
- package/workflow/PendingApprovalsWidget.js +2 -1
- package/workflow/PendingApprovalsWidget.js.map +1 -1
- package/workflow/facets/WorkflowArtifactsTab.d.ts.map +1 -1
- package/workflow/facets/WorkflowArtifactsTab.js +2 -1
- package/workflow/facets/WorkflowArtifactsTab.js.map +1 -1
- package/workflow/facets/WorkflowUsageTab.d.ts.map +1 -1
- package/workflow/facets/WorkflowUsageTab.js +2 -1
- package/workflow/facets/WorkflowUsageTab.js.map +1 -1
- package/workflow/inspector/WorkflowSummaryPanel.d.ts.map +1 -1
- package/workflow/inspector/WorkflowSummaryPanel.js +2 -1
- package/workflow/inspector/WorkflowSummaryPanel.js.map +1 -1
- package/workflow/inspector/tabs/BranchesTab.d.ts.map +1 -1
- package/workflow/inspector/tabs/BranchesTab.js +2 -1
- package/workflow/inspector/tabs/BranchesTab.js.map +1 -1
- package/workflow/inspector/tabs/IterationTab.d.ts.map +1 -1
- package/workflow/inspector/tabs/IterationTab.js +2 -1
- package/workflow/inspector/tabs/IterationTab.js.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.d.ts.map +1 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.js +2 -1
- package/workflow/instance/WorkflowInstanceDetailPanel.js.map +1 -1
- package/workspace/ExplorerTree.d.ts.map +1 -1
- package/workspace/ExplorerTree.js +2 -1
- package/workspace/ExplorerTree.js.map +1 -1
- package/workspace/WorkspaceContentSearch.d.ts.map +1 -1
- package/workspace/WorkspaceContentSearch.js +2 -1
- package/workspace/WorkspaceContentSearch.js.map +1 -1
- package/workspace/WorkspaceFileSearch.d.ts.map +1 -1
- package/workspace/WorkspaceFileSearch.js +2 -1
- package/workspace/WorkspaceFileSearch.js.map +1 -1
- package/workspace/WorkspaceSummary.d.ts.map +1 -1
- package/workspace/WorkspaceSummary.js +2 -1
- package/workspace/WorkspaceSummary.js.map +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { ProviderStandingView } from "@stigmer/protos/ai/stigmer/platform/providerstanding/v1/io_pb";
|
|
4
|
+
import { useStigmer } from "../hooks.js";
|
|
5
|
+
import { useFetch } from "../internal/useFetch.js";
|
|
6
|
+
|
|
7
|
+
/** Return value of {@link useProviderStanding}. */
|
|
8
|
+
export interface UseProviderStandingReturn {
|
|
9
|
+
/** The standing view, or `null` before the first successful fetch. */
|
|
10
|
+
readonly standing: ProviderStandingView | null;
|
|
11
|
+
/** `true` while the initial fetch is in flight. */
|
|
12
|
+
readonly isLoading: boolean;
|
|
13
|
+
/** `true` while a background refetch is in flight and stale data is shown. */
|
|
14
|
+
readonly isRefetching: boolean;
|
|
15
|
+
/** Error from the last failed request, or `null` when healthy. */
|
|
16
|
+
readonly error: Error | null;
|
|
17
|
+
/** Discard cached data and re-fetch from the server. */
|
|
18
|
+
readonly refetch: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Data hook for platform provider standing: the latest canary-probe
|
|
23
|
+
* verdict per platform LLM provider account (status, latency, bounded
|
|
24
|
+
* error summary, probe time), recorded hourly by the standing probe.
|
|
25
|
+
*
|
|
26
|
+
* Platform-operator surface: the caller needs
|
|
27
|
+
* `can_view_provider_standing` on `platform:stigmer`. Cloud-only — the
|
|
28
|
+
* OSS Go server does not implement the controller.
|
|
29
|
+
*
|
|
30
|
+
* Pass `enabled: false` to skip fetching (stable no-op).
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const { standing, isLoading, refetch } = useProviderStanding();
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function useProviderStanding(
|
|
38
|
+
options?: { readonly enabled?: boolean },
|
|
39
|
+
): UseProviderStandingReturn {
|
|
40
|
+
const stigmer = useStigmer();
|
|
41
|
+
const enabled = options?.enabled ?? true;
|
|
42
|
+
|
|
43
|
+
const { data: standing, isLoading, isRefetching, error, refetch } = useFetch(
|
|
44
|
+
enabled ? () => stigmer.providerStanding.getStandingView() : null,
|
|
45
|
+
[enabled, stigmer],
|
|
46
|
+
null as ProviderStandingView | null,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return { standing, isLoading, isRefetching, error, refetch };
|
|
50
|
+
}
|
package/src/provider.tsx
CHANGED
|
@@ -240,6 +240,18 @@ const EMPTY_REVIEW_RENDERERS: ReviewRenderers = {};
|
|
|
240
240
|
* column makes it balloon even in a content-sized page), so only
|
|
241
241
|
* the host — which knows its layout — can apply it safely.
|
|
242
242
|
*
|
|
243
|
+
* **Hosts without a global CSS reset.** SDK components carry their
|
|
244
|
+
* own per-element resets (lists, fieldsets, form controls) and the
|
|
245
|
+
* markdown surfaces declare their margins explicitly, so they render
|
|
246
|
+
* correctly with no Tailwind-preflight-style reset in the host page
|
|
247
|
+
* (#695). Two deliberate boundaries remain the host's: font-family
|
|
248
|
+
* inherits from the host (an embedded widget adopting host typography
|
|
249
|
+
* is correct — set `--stgm-font-sans` to override), and the host's
|
|
250
|
+
* OWN content inside the provider keeps its user-agent styling — the
|
|
251
|
+
* SDK never resets elements it did not render. If your reset-less
|
|
252
|
+
* page composes its own `<p>`/`<h*>` content between SDK components,
|
|
253
|
+
* their user-agent margins are yours to manage.
|
|
254
|
+
*
|
|
243
255
|
* Two stable selector hooks are part of the public contract:
|
|
244
256
|
* `data-stgm-root` marks the in-tree container (and only it);
|
|
245
257
|
* `data-stgm-portal` marks the portal container appended to
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { cn } from "@stigmer/theme";
|
|
4
|
+
import { UNSTYLED_LIST } from "../internal/element-resets.js";
|
|
4
5
|
|
|
5
6
|
/** Props for {@link StepIndicator}. */
|
|
6
7
|
export interface StepIndicatorProps {
|
|
@@ -37,7 +38,7 @@ export function StepIndicator({
|
|
|
37
38
|
aria-label="Wizard progress"
|
|
38
39
|
className={cn("stg:flex stg:flex-col stg:gap-1", className)}
|
|
39
40
|
>
|
|
40
|
-
<ol className="stg:flex stg:flex-col stg:gap-1" role="list">
|
|
41
|
+
<ol className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-1")} role="list">
|
|
41
42
|
{steps.map((step, index) => {
|
|
42
43
|
const state = getStepState(index, currentStepIndex);
|
|
43
44
|
const isClickable = state === "completed" && onStepClick != null;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { UNSTYLED_LIST } from "../internal/element-resets.js";
|
|
5
6
|
import { create } from "@bufbuild/protobuf";
|
|
6
7
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
7
8
|
import type { Schedule } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
@@ -1356,7 +1357,7 @@ function EnvironmentRefList({
|
|
|
1356
1357
|
return <span className="stg:text-sm stg:text-muted-foreground">—</span>;
|
|
1357
1358
|
}
|
|
1358
1359
|
return (
|
|
1359
|
-
<ul className="stg:flex stg:flex-col stg:gap-0.5">
|
|
1360
|
+
<ul className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-0.5")}>
|
|
1360
1361
|
{refs.map((ref, i) => (
|
|
1361
1362
|
<li
|
|
1362
1363
|
key={`${ref.org}/${ref.slug}-${i}`}
|
|
@@ -1470,7 +1471,7 @@ function WorkspaceSummary({
|
|
|
1470
1471
|
return <span className="stg:text-sm stg:text-muted-foreground">—</span>;
|
|
1471
1472
|
}
|
|
1472
1473
|
return (
|
|
1473
|
-
<ul className="stg:flex stg:flex-col stg:gap-0.5">
|
|
1474
|
+
<ul className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-0.5")}>
|
|
1474
1475
|
{entries.map((entry, i) => {
|
|
1475
1476
|
const git =
|
|
1476
1477
|
entry.source?.source?.case === "gitRepo"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { UNSTYLED_LIST } from "../internal/element-resets.js";
|
|
5
6
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
6
7
|
import {
|
|
7
8
|
ScheduleRunOrigin,
|
|
@@ -277,7 +278,7 @@ export function ScheduleRunsCompactList({
|
|
|
277
278
|
return <EmptyRuns />;
|
|
278
279
|
}
|
|
279
280
|
return (
|
|
280
|
-
<ul className="stg:divide-y stg:divide-border">
|
|
281
|
+
<ul className={cn(UNSTYLED_LIST, "stg:divide-y stg:divide-border")}>
|
|
281
282
|
{runs.map((run, i) => (
|
|
282
283
|
<CompactRunRow
|
|
283
284
|
key={runKey(run, i)}
|
|
@@ -9,6 +9,7 @@ import type { WorkspaceContentSearcher } from "../workspace/WorkspaceContentSear
|
|
|
9
9
|
import type { InteractionModeOption } from "../composer/index.js";
|
|
10
10
|
import { SessionComposer } from "../composer/index.js";
|
|
11
11
|
import type { HarnessOption } from "../models/harness.js";
|
|
12
|
+
import type { AccountExecutionDefaults } from "../identity-account/useAccountExecutionDefaults.js";
|
|
12
13
|
import { SessionViewerLayout } from "./SessionViewerLayout.js";
|
|
13
14
|
import { useWorkspaceEditors } from "../internal/store/index.js";
|
|
14
15
|
import { WorkspaceSurface } from "../workspace/WorkspaceSurface.js";
|
|
@@ -163,6 +164,15 @@ export interface NewSessionViewerProps {
|
|
|
163
164
|
*/
|
|
164
165
|
readonly defaultHarness?: HarnessOption;
|
|
165
166
|
|
|
167
|
+
/**
|
|
168
|
+
* The user's account-level execution defaults, typically from
|
|
169
|
+
* `useAccountExecutionDefaults()`. Seeds the harness and model pickers
|
|
170
|
+
* under the layered precedence documented on
|
|
171
|
+
* {@link UseNewSessionFlowOptions.accountDefaults}; explicit device
|
|
172
|
+
* picks always win. Ignored for the `"guest"` audience.
|
|
173
|
+
*/
|
|
174
|
+
readonly accountDefaults?: AccountExecutionDefaults;
|
|
175
|
+
|
|
166
176
|
/** Agent to auto-select on mount (used for draft flows). */
|
|
167
177
|
readonly initialAgentRef?: ResourceRef;
|
|
168
178
|
/**
|
|
@@ -253,6 +263,7 @@ export function NewSessionViewer({
|
|
|
253
263
|
panelOpen,
|
|
254
264
|
onPanelOpenChange,
|
|
255
265
|
defaultHarness,
|
|
266
|
+
accountDefaults,
|
|
256
267
|
initialAgentRef,
|
|
257
268
|
initialInstanceId,
|
|
258
269
|
initialAttachments,
|
|
@@ -269,6 +280,7 @@ export function NewSessionViewer({
|
|
|
269
280
|
onError,
|
|
270
281
|
getRuntimeEnv,
|
|
271
282
|
defaultHarness,
|
|
283
|
+
accountDefaults,
|
|
272
284
|
audience,
|
|
273
285
|
runConfig,
|
|
274
286
|
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// The #362 console surface: the Usage tab pairs billing's RESOLVED
|
|
2
|
+
// per-execution model (the after-the-fact truth for Cursor Auto runs)
|
|
3
|
+
// with the tier the runner REQUESTED (the streaming summary's audit
|
|
4
|
+
// record that the account default was never left in control).
|
|
5
|
+
|
|
6
|
+
import { describe, it, expect, afterEach, vi } from "vitest";
|
|
7
|
+
import { render, screen, cleanup } from "@testing-library/react";
|
|
8
|
+
import { create } from "@bufbuild/protobuf";
|
|
9
|
+
import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
10
|
+
import { ServiceTier } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
11
|
+
import type { UseSessionUsageReturn } from "../useSessionUsage.js";
|
|
12
|
+
|
|
13
|
+
// UsageTab's render contract is what this suite pins; the aggregation
|
|
14
|
+
// itself (billing-report-wins, streaming fallback, breakdown mapping) is
|
|
15
|
+
// useSessionUsage's own suite. Mocking the hook also spares the RPC
|
|
16
|
+
// provider plumbing.
|
|
17
|
+
const usageMock = vi.hoisted(() => vi.fn<() => UseSessionUsageReturn>());
|
|
18
|
+
vi.mock("../useSessionUsage.js", async (importOriginal) => ({
|
|
19
|
+
...(await importOriginal<object>()),
|
|
20
|
+
useSessionUsage: () => usageMock(),
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
import { UsageTab } from "../facets/UsageTab.js";
|
|
24
|
+
|
|
25
|
+
// UsageWidget re-aggregates via the real hook internally — with the module
|
|
26
|
+
// mocked above it sees the same mocked value, which is exactly the intent.
|
|
27
|
+
|
|
28
|
+
const EMPTY_USAGE: UseSessionUsageReturn = {
|
|
29
|
+
totalCostUsd: 0,
|
|
30
|
+
totalTokens: 0,
|
|
31
|
+
inputTokens: 0,
|
|
32
|
+
outputTokens: 0,
|
|
33
|
+
cacheReadTokens: 0,
|
|
34
|
+
cacheCreationTokens: 0,
|
|
35
|
+
llmCallCount: 0,
|
|
36
|
+
modelBreakdown: [],
|
|
37
|
+
executionBreakdown: [],
|
|
38
|
+
primaryModel: "",
|
|
39
|
+
primaryProvider: "",
|
|
40
|
+
hasUsage: false,
|
|
41
|
+
isEstimated: false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
function usageWith(overrides: Partial<UseSessionUsageReturn>): UseSessionUsageReturn {
|
|
45
|
+
return {
|
|
46
|
+
...EMPTY_USAGE,
|
|
47
|
+
hasUsage: true,
|
|
48
|
+
totalCostUsd: 0.0123,
|
|
49
|
+
totalTokens: 100,
|
|
50
|
+
llmCallCount: 1,
|
|
51
|
+
primaryModel: "composer-2.5",
|
|
52
|
+
primaryProvider: "cursor",
|
|
53
|
+
...overrides,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function executionWithTier(id: string, tier?: ServiceTier) {
|
|
58
|
+
return create(AgentExecutionSchema, {
|
|
59
|
+
metadata: { id },
|
|
60
|
+
spec: { sessionId: "ses_1" },
|
|
61
|
+
status: {
|
|
62
|
+
streamingUsage: {
|
|
63
|
+
totalTokens: 100n,
|
|
64
|
+
turnCount: 1,
|
|
65
|
+
estimatedCostUsd: 0.01,
|
|
66
|
+
model: "default",
|
|
67
|
+
...(tier !== undefined ? { requestedServiceTier: tier } : {}),
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
afterEach(cleanup);
|
|
74
|
+
|
|
75
|
+
describe("UsageTab (#362 model provenance)", () => {
|
|
76
|
+
it("shows the empty state when no usage exists", () => {
|
|
77
|
+
usageMock.mockReturnValue(EMPTY_USAGE);
|
|
78
|
+
render(<UsageTab executions={[]} />);
|
|
79
|
+
expect(screen.getByText(/No usage data yet/)).toBeTruthy();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("renders the billing-resolved model per run with its cost — the Auto forensics view", () => {
|
|
83
|
+
usageMock.mockReturnValue(usageWith({
|
|
84
|
+
executionBreakdown: [{
|
|
85
|
+
executionId: "exe_1",
|
|
86
|
+
resolvedModel: "cursor-grok-4.5-high-fast",
|
|
87
|
+
billableCostUsd: 0.0123,
|
|
88
|
+
isEstimated: false,
|
|
89
|
+
}],
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.STANDARD)]} />);
|
|
93
|
+
|
|
94
|
+
expect(screen.getByText(/cursor-grok-4\.5-high-fast/)).toBeTruthy();
|
|
95
|
+
expect(screen.getByRole("list", { name: "Per-execution model and tier" })).toBeTruthy();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("pairs the run with the tier the runner requested", () => {
|
|
99
|
+
usageMock.mockReturnValue(usageWith({
|
|
100
|
+
executionBreakdown: [{
|
|
101
|
+
executionId: "exe_1",
|
|
102
|
+
resolvedModel: "composer-2.5",
|
|
103
|
+
billableCostUsd: 0.0123,
|
|
104
|
+
isEstimated: false,
|
|
105
|
+
}],
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.FAST)]} />);
|
|
109
|
+
|
|
110
|
+
expect(screen.getByText("fast requested")).toBeTruthy();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("omits the tier chip for executions that predate the tier attribute", () => {
|
|
114
|
+
usageMock.mockReturnValue(usageWith({
|
|
115
|
+
executionBreakdown: [{
|
|
116
|
+
executionId: "exe_0",
|
|
117
|
+
resolvedModel: "claude-haiku-4.5",
|
|
118
|
+
billableCostUsd: 0.0042,
|
|
119
|
+
isEstimated: false,
|
|
120
|
+
}],
|
|
121
|
+
}));
|
|
122
|
+
|
|
123
|
+
render(<UsageTab executions={[executionWithTier("exe_0")]} />);
|
|
124
|
+
|
|
125
|
+
expect(screen.getByText(/claude-haiku-4\.5/)).toBeTruthy();
|
|
126
|
+
expect(screen.queryByText(/requested/)).toBeNull();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("renders no provenance list before any billing record lands", () => {
|
|
130
|
+
usageMock.mockReturnValue(usageWith({ executionBreakdown: [] }));
|
|
131
|
+
|
|
132
|
+
render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.STANDARD)]} />);
|
|
133
|
+
|
|
134
|
+
expect(screen.queryByRole("list", { name: "Per-execution model and tier" })).toBeNull();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
@@ -805,6 +805,157 @@ describe("useNewSessionFlow", () => {
|
|
|
805
805
|
});
|
|
806
806
|
});
|
|
807
807
|
|
|
808
|
+
describe("accountDefaults (oss#293 Phase 1.5 layered seed)", () => {
|
|
809
|
+
// Two native models so "stored pick outranks account default" is
|
|
810
|
+
// distinguishable; the shared TEST_MODELS carries one per harness.
|
|
811
|
+
const SEED_MODELS = parseRegistryJson({
|
|
812
|
+
models: [
|
|
813
|
+
{ id: "claude-sonnet-4.6", displayName: "Claude Sonnet 4.6", shortDescription: "", speedTier: "fast", provider: "anthropic", harness: "native", costTier: "standard", featured: true, pricing: { inputPricePerMillion: 3, outputPricePerMillion: 15, cacheWritePricePerMillion: 3.75, cacheReadPricePerMillion: 0.3 } },
|
|
814
|
+
{ id: "gpt-5.3", displayName: "GPT 5.3", shortDescription: "", speedTier: "fast", provider: "openai", harness: "native", costTier: "standard", featured: false, pricing: { inputPricePerMillion: 2, outputPricePerMillion: 8, cacheWritePricePerMillion: 2, cacheReadPricePerMillion: 0.2 } },
|
|
815
|
+
{ id: "default", displayName: "Cursor Auto", shortDescription: "", speedTier: "fast", provider: "cursor", harness: "cursor", costTier: "standard", featured: true, pricing: { inputPricePerMillion: 1.25, outputPricePerMillion: 6, cacheWritePricePerMillion: 1.25, cacheReadPricePerMillion: 0.25 } },
|
|
816
|
+
{ id: "composer-2.5", displayName: "Composer 2.5", shortDescription: "", speedTier: "fast", provider: "cursor", harness: "cursor", costTier: "standard", featured: false, pricing: { inputPricePerMillion: 1, outputPricePerMillion: 5, cacheWritePricePerMillion: 1, cacheReadPricePerMillion: 0.1 } },
|
|
817
|
+
],
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
function seedWrapper() {
|
|
821
|
+
const state: ModelRegistryState = { models: SEED_MODELS, isLoading: false, error: null, refetch: () => {} };
|
|
822
|
+
return function Wrapper({ children }: { children: ReactNode }) {
|
|
823
|
+
return (
|
|
824
|
+
<ModelRegistryContext.Provider value={state}>
|
|
825
|
+
{children}
|
|
826
|
+
</ModelRegistryContext.Provider>
|
|
827
|
+
);
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
it("seeds the harness when nothing is stored", () => {
|
|
832
|
+
const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
|
|
833
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
834
|
+
|
|
835
|
+
expect(result.current.harness).toBe("cursor");
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
it("a stored harness choice outranks the account default", () => {
|
|
839
|
+
localStorage.setItem(STORAGE_KEY_HARNESS, "native");
|
|
840
|
+
const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
|
|
841
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
842
|
+
|
|
843
|
+
expect(result.current.harness).toBe("native");
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
it("the account harness outranks the embedder defaultHarness", () => {
|
|
847
|
+
const opts = {
|
|
848
|
+
...defaultOptions(),
|
|
849
|
+
defaultHarness: "native" as const,
|
|
850
|
+
accountDefaults: { harness: "cursor" as const },
|
|
851
|
+
};
|
|
852
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
853
|
+
|
|
854
|
+
expect(result.current.harness).toBe("cursor");
|
|
855
|
+
});
|
|
856
|
+
|
|
857
|
+
it("never persists the seeded harness — only explicit choices", () => {
|
|
858
|
+
const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
|
|
859
|
+
renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
860
|
+
|
|
861
|
+
expect(localStorage.getItem(STORAGE_KEY_HARNESS)).toBeNull();
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
it("a late-arriving harness seed applies when the user has not picked (whoAmI resolves after mount)", () => {
|
|
865
|
+
const base: Parameters<typeof useNewSessionFlow>[0] = defaultOptions();
|
|
866
|
+
const { result, rerender } = renderHook(
|
|
867
|
+
(opts: Parameters<typeof useNewSessionFlow>[0]) => useNewSessionFlow(opts),
|
|
868
|
+
{ wrapper: seedWrapper(), initialProps: base },
|
|
869
|
+
);
|
|
870
|
+
expect(result.current.harness).toBe("native");
|
|
871
|
+
|
|
872
|
+
rerender({ ...base, accountDefaults: { harness: "cursor" as const } });
|
|
873
|
+
|
|
874
|
+
expect(result.current.harness).toBe("cursor");
|
|
875
|
+
expect(localStorage.getItem(STORAGE_KEY_HARNESS)).toBeNull();
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
it("a late-arriving harness seed never overrides an explicit pick this mount", () => {
|
|
879
|
+
const base: Parameters<typeof useNewSessionFlow>[0] = defaultOptions();
|
|
880
|
+
const { result, rerender } = renderHook(
|
|
881
|
+
(opts: Parameters<typeof useNewSessionFlow>[0]) => useNewSessionFlow(opts),
|
|
882
|
+
{ wrapper: seedWrapper(), initialProps: base },
|
|
883
|
+
);
|
|
884
|
+
act(() => result.current.setHarness("native"));
|
|
885
|
+
|
|
886
|
+
rerender({ ...base, accountDefaults: { harness: "cursor" as const } });
|
|
887
|
+
|
|
888
|
+
expect(result.current.harness).toBe("native");
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
it("seeds the model for the active harness when nothing is stored", () => {
|
|
892
|
+
const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
|
|
893
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
894
|
+
|
|
895
|
+
expect(result.current.modelId).toBe("gpt-5.3");
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
it("a stored model pick outranks the account default", async () => {
|
|
899
|
+
localStorage.setItem(STORAGE_KEY_MODEL_NATIVE, "claude-sonnet-4.6");
|
|
900
|
+
const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
|
|
901
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
902
|
+
|
|
903
|
+
// The stored restore lands in a passive effect once the registry is
|
|
904
|
+
// ready; the account seed must not win the race before it.
|
|
905
|
+
await act(async () => {});
|
|
906
|
+
expect(result.current.modelId).toBe("claude-sonnet-4.6");
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
it("self-heals a stale account model to the platform default (undefined)", () => {
|
|
910
|
+
const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "retired-model" } };
|
|
911
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
912
|
+
|
|
913
|
+
expect(result.current.modelId).toBeUndefined();
|
|
914
|
+
});
|
|
915
|
+
|
|
916
|
+
it("never persists the seeded model — only explicit choices", () => {
|
|
917
|
+
const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
|
|
918
|
+
renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
919
|
+
|
|
920
|
+
expect(localStorage.getItem(STORAGE_KEY_MODEL_NATIVE)).toBeNull();
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
it("follows the active harness: cursorModel seeds cursor sessions", () => {
|
|
924
|
+
const opts = {
|
|
925
|
+
...defaultOptions(),
|
|
926
|
+
accountDefaults: { harness: "cursor" as const, nativeModel: "gpt-5.3", cursorModel: "composer-2.5" },
|
|
927
|
+
};
|
|
928
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
929
|
+
|
|
930
|
+
expect(result.current.harness).toBe("cursor");
|
|
931
|
+
expect(result.current.modelId).toBe("composer-2.5");
|
|
932
|
+
});
|
|
933
|
+
|
|
934
|
+
it("submits the seeded model explicitly — the pill promise (#663) and the DD-003 seed rule", async () => {
|
|
935
|
+
const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
|
|
936
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
937
|
+
|
|
938
|
+
await act(async () => {
|
|
939
|
+
await result.current.submit("Hello");
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
expect(mockCreateExecution.mock.calls[0][0].modelName).toBe("gpt-5.3");
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
it("guest audience ignores accountDefaults entirely", () => {
|
|
946
|
+
const opts = {
|
|
947
|
+
...defaultOptions(),
|
|
948
|
+
audience: "guest" as const,
|
|
949
|
+
accountDefaults: { harness: "native" as const, nativeModel: "gpt-5.3", cursorModel: "composer-2.5" },
|
|
950
|
+
};
|
|
951
|
+
const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
|
|
952
|
+
|
|
953
|
+
// Platform share policy: cursor harness, no client model.
|
|
954
|
+
expect(result.current.harness).toBe("cursor");
|
|
955
|
+
expect(result.current.modelId).toBeUndefined();
|
|
956
|
+
});
|
|
957
|
+
});
|
|
958
|
+
|
|
808
959
|
describe("submit while default agent is loading", () => {
|
|
809
960
|
it("awaits default agent and creates session when fetch resolves", async () => {
|
|
810
961
|
const resolvedAgent = { status: { defaultInstanceId: "awaited-inst" } };
|
|
@@ -53,6 +53,14 @@ function authoritativeReport(billableMicros: bigint): GetSessionUsageReportOutpu
|
|
|
53
53
|
primaryProvider: "cursor",
|
|
54
54
|
},
|
|
55
55
|
modelBreakdown: [],
|
|
56
|
+
executions: [
|
|
57
|
+
{
|
|
58
|
+
executionId: "exe_1",
|
|
59
|
+
primaryModel: "claude-sonnet-4-6",
|
|
60
|
+
billableCostMicros: billableMicros,
|
|
61
|
+
isEstimated: false,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
56
64
|
isEstimated: false,
|
|
57
65
|
} as unknown as GetSessionUsageReportOutput;
|
|
58
66
|
}
|
|
@@ -71,6 +79,7 @@ function emptyReport(): GetSessionUsageReportOutput {
|
|
|
71
79
|
primaryProvider: "",
|
|
72
80
|
},
|
|
73
81
|
modelBreakdown: [],
|
|
82
|
+
executions: [],
|
|
74
83
|
isEstimated: true,
|
|
75
84
|
} as unknown as GetSessionUsageReportOutput;
|
|
76
85
|
}
|
|
@@ -122,6 +131,16 @@ describe("useSessionUsage", () => {
|
|
|
122
131
|
// 60_000 micros = $0.06 billable, replacing the $0.05 estimate.
|
|
123
132
|
expect(result.current.totalCostUsd).toBeCloseTo(0.06);
|
|
124
133
|
expect(result.current.llmCallCount).toBe(2);
|
|
134
|
+
// The #362 provenance rows ride the same report: billing-RESOLVED
|
|
135
|
+
// model per execution, never the runner's requested echo.
|
|
136
|
+
expect(result.current.executionBreakdown).toEqual([
|
|
137
|
+
{
|
|
138
|
+
executionId: "exe_1",
|
|
139
|
+
resolvedModel: "claude-sonnet-4-6",
|
|
140
|
+
billableCostUsd: 0.06,
|
|
141
|
+
isEstimated: false,
|
|
142
|
+
},
|
|
143
|
+
]);
|
|
125
144
|
});
|
|
126
145
|
|
|
127
146
|
it("polls the usage report while an execution is in progress", async () => {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
artifactKey,
|
|
8
8
|
type SessionArtifactEntry,
|
|
9
9
|
} from "../useSessionArtifacts.js";
|
|
10
|
+
import { UNSTYLED_LIST } from "../../internal/element-resets.js";
|
|
10
11
|
import { ArtifactPreviewModal } from "../../execution/ArtifactPreviewModal.js";
|
|
11
12
|
import { ArtifactRow } from "../../execution/ArtifactRow.js";
|
|
12
13
|
import { isPlanArtifact } from "../../library/detect-plan-artifact.js";
|
|
@@ -123,7 +124,7 @@ export function ArtifactsTab({
|
|
|
123
124
|
|
|
124
125
|
return (
|
|
125
126
|
<>
|
|
126
|
-
<ul role="list" className=
|
|
127
|
+
<ul role="list" className={`${UNSTYLED_LIST} stg:flex stg:flex-col`}>
|
|
127
128
|
{artifacts.map((entry) => (
|
|
128
129
|
<ArtifactRow
|
|
129
130
|
key={artifactKey(entry.artifact)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
4
|
+
import { UNSTYLED_LIST } from "../../internal/element-resets.js";
|
|
4
5
|
import { useSessionWriteBacks } from "../useSessionWriteBacks.js";
|
|
5
6
|
import { WriteBackCard } from "../../execution/WriteBackCard.js";
|
|
6
7
|
|
|
@@ -48,7 +49,7 @@ export function ChangesTab({
|
|
|
48
49
|
// Dense row groups matching the Artifacts facet's list — gap separates
|
|
49
50
|
// entries only in multi-repo sessions (single-entry lists stay seamless).
|
|
50
51
|
return (
|
|
51
|
-
<ul role="list" className=
|
|
52
|
+
<ul role="list" className={`${UNSTYLED_LIST} stg:flex stg:flex-col stg:gap-3`}>
|
|
52
53
|
{writeBacks.map((entry) => (
|
|
53
54
|
<li key={entry.writeBack.workspaceEntryName}>
|
|
54
55
|
<WriteBackCard writeBack={entry.writeBack} />
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ServiceTier } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
5
|
+
import { useSessionUsage, type ExecutionUsageEntry } from "../useSessionUsage.js";
|
|
6
|
+
import { UsageWidget, formatCost } from "../../execution/UsageWidget.js";
|
|
6
7
|
|
|
7
8
|
export interface UsageTabProps {
|
|
8
9
|
readonly executions: readonly AgentExecution[];
|
|
@@ -11,9 +12,16 @@ export interface UsageTabProps {
|
|
|
11
12
|
/**
|
|
12
13
|
* Usage facet for the session panel (a `useSessionRailViews` rail view).
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Renders the session totals ({@link UsageWidget}) plus the #362 model
|
|
16
|
+
* provenance list: per execution, the billing-RESOLVED model with its
|
|
17
|
+
* cost — for a Cursor Auto run, the only honest answer to "which model
|
|
18
|
+
* actually ran and what did it cost", since the requested model is empty
|
|
19
|
+
* by definition there — paired with the tier the runner REQUESTED (the
|
|
20
|
+
* streaming summary's audit record that the account default was never
|
|
21
|
+
* left in control). Requested-vs-billed divergence is a platform alarm
|
|
22
|
+
* (`stigmer.billing.service_tier.mismatch`), not a per-row UI concern.
|
|
23
|
+
*
|
|
24
|
+
* Shows an empty state when no usage data is available.
|
|
17
25
|
*/
|
|
18
26
|
export function UsageTab({ executions }: UsageTabProps) {
|
|
19
27
|
const usage = useSessionUsage(executions);
|
|
@@ -28,5 +36,89 @@ export function UsageTab({ executions }: UsageTabProps) {
|
|
|
28
36
|
);
|
|
29
37
|
}
|
|
30
38
|
|
|
31
|
-
return
|
|
39
|
+
return (
|
|
40
|
+
<div className="stg:flex stg:flex-col stg:gap-4">
|
|
41
|
+
<UsageWidget executions={executions} />
|
|
42
|
+
{usage.executionBreakdown.length > 0 && (
|
|
43
|
+
<ExecutionModelList
|
|
44
|
+
entries={usage.executionBreakdown}
|
|
45
|
+
executions={executions}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Per-execution model provenance rows, in the report's chronological
|
|
54
|
+
* order: `#N resolved-model [tier requested] [Estimated] $cost`.
|
|
55
|
+
*/
|
|
56
|
+
function ExecutionModelList({
|
|
57
|
+
entries,
|
|
58
|
+
executions,
|
|
59
|
+
}: {
|
|
60
|
+
readonly entries: readonly ExecutionUsageEntry[];
|
|
61
|
+
readonly executions: readonly AgentExecution[];
|
|
62
|
+
}) {
|
|
63
|
+
return (
|
|
64
|
+
<div
|
|
65
|
+
className="stg:flex stg:flex-col stg:gap-1"
|
|
66
|
+
role="list"
|
|
67
|
+
aria-label="Per-execution model and tier"
|
|
68
|
+
>
|
|
69
|
+
<div className="stg:text-xs stg:font-medium stg:text-foreground">
|
|
70
|
+
Models per run
|
|
71
|
+
</div>
|
|
72
|
+
{entries.map((entry, index) => {
|
|
73
|
+
const requestedTier = requestedTierLabel(executions, entry.executionId);
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
key={entry.executionId}
|
|
77
|
+
className="stg:flex stg:items-baseline stg:justify-between stg:gap-2 stg:text-xs stg:text-muted-foreground"
|
|
78
|
+
role="listitem"
|
|
79
|
+
>
|
|
80
|
+
<span className="stg:truncate">
|
|
81
|
+
<span className="stg:tabular-nums">#{index + 1}</span>{" "}
|
|
82
|
+
{entry.resolvedModel || "—"}
|
|
83
|
+
{requestedTier && (
|
|
84
|
+
<span className="stg:ml-1 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none">
|
|
85
|
+
{requestedTier} requested
|
|
86
|
+
</span>
|
|
87
|
+
)}
|
|
88
|
+
{entry.isEstimated && (
|
|
89
|
+
<span className="stg:ml-1 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none">
|
|
90
|
+
Estimated
|
|
91
|
+
</span>
|
|
92
|
+
)}
|
|
93
|
+
</span>
|
|
94
|
+
<span className="stg:shrink-0 stg:tabular-nums">
|
|
95
|
+
{formatCost(entry.billableCostUsd)}
|
|
96
|
+
</span>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
})}
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The tier the runner requested for one execution, from its streaming
|
|
106
|
+
* usage summary — present once the runner has translated the execution
|
|
107
|
+
* config, absent for executions that predate the tier attribute. Never
|
|
108
|
+
* "unspecified": the runner records the RESOLVED tier (#357's audit
|
|
109
|
+
* contract).
|
|
110
|
+
*/
|
|
111
|
+
function requestedTierLabel(
|
|
112
|
+
executions: readonly AgentExecution[],
|
|
113
|
+
executionId: string,
|
|
114
|
+
): string | null {
|
|
115
|
+
const match = executions.find((e) => e.metadata?.id === executionId);
|
|
116
|
+
switch (match?.status?.streamingUsage?.requestedServiceTier) {
|
|
117
|
+
case ServiceTier.FAST:
|
|
118
|
+
return "fast";
|
|
119
|
+
case ServiceTier.STANDARD:
|
|
120
|
+
return "standard";
|
|
121
|
+
default:
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
32
124
|
}
|
package/src/session/index.ts
CHANGED