@stigmer/react 0.4.8 → 0.5.0
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/action-menu/ActionMenu.d.ts +64 -0
- package/action-menu/ActionMenu.d.ts.map +1 -0
- package/action-menu/ActionMenu.js +78 -0
- package/action-menu/ActionMenu.js.map +1 -0
- package/action-menu/index.d.ts +3 -0
- package/action-menu/index.d.ts.map +1 -0
- package/action-menu/index.js +2 -0
- package/action-menu/index.js.map +1 -0
- package/action-menu/types.d.ts +65 -0
- package/action-menu/types.d.ts.map +1 -0
- package/action-menu/types.js +2 -0
- package/action-menu/types.js.map +1 -0
- package/agent/AgentCreationWizard.d.ts +55 -0
- package/agent/AgentCreationWizard.d.ts.map +1 -0
- package/agent/AgentCreationWizard.js +115 -0
- package/agent/AgentCreationWizard.js.map +1 -0
- package/agent/AgentDetailView.d.ts +77 -9
- package/agent/AgentDetailView.d.ts.map +1 -1
- package/agent/AgentDetailView.js +265 -87
- package/agent/AgentDetailView.js.map +1 -1
- package/agent/index.d.ts +8 -0
- package/agent/index.d.ts.map +1 -1
- package/agent/index.js +4 -0
- package/agent/index.js.map +1 -1
- package/agent/internal/agentToInput.d.ts +12 -0
- package/agent/internal/agentToInput.d.ts.map +1 -0
- package/agent/internal/agentToInput.js +72 -0
- package/agent/internal/agentToInput.js.map +1 -0
- package/agent/steps/CapabilitiesStep.d.ts +16 -0
- package/agent/steps/CapabilitiesStep.d.ts.map +1 -0
- package/agent/steps/CapabilitiesStep.js +80 -0
- package/agent/steps/CapabilitiesStep.js.map +1 -0
- package/agent/steps/IdentityStep.d.ts +18 -0
- package/agent/steps/IdentityStep.d.ts.map +1 -0
- package/agent/steps/IdentityStep.js +43 -0
- package/agent/steps/IdentityStep.js.map +1 -0
- package/agent/steps/ReviewStep.d.ts +23 -0
- package/agent/steps/ReviewStep.d.ts.map +1 -0
- package/agent/steps/ReviewStep.js +73 -0
- package/agent/steps/ReviewStep.js.map +1 -0
- package/agent/steps/types.d.ts +35 -0
- package/agent/steps/types.d.ts.map +1 -0
- package/agent/steps/types.js +16 -0
- package/agent/steps/types.js.map +1 -0
- package/agent/useCreateAgent.d.ts +45 -0
- package/agent/useCreateAgent.d.ts.map +1 -0
- package/agent/useCreateAgent.js +50 -0
- package/agent/useCreateAgent.js.map +1 -0
- package/agent/useUpdateAgent.d.ts +24 -0
- package/agent/useUpdateAgent.d.ts.map +1 -0
- package/agent/useUpdateAgent.js +35 -0
- package/agent/useUpdateAgent.js.map +1 -0
- package/dependency-graph/DependencyGraph.d.ts +37 -0
- package/dependency-graph/DependencyGraph.d.ts.map +1 -0
- package/dependency-graph/DependencyGraph.js +88 -0
- package/dependency-graph/DependencyGraph.js.map +1 -0
- package/dependency-graph/DependencyTreeNode.d.ts +23 -0
- package/dependency-graph/DependencyTreeNode.d.ts.map +1 -0
- package/dependency-graph/DependencyTreeNode.js +99 -0
- package/dependency-graph/DependencyTreeNode.js.map +1 -0
- package/dependency-graph/index.d.ts +4 -0
- package/dependency-graph/index.d.ts.map +1 -0
- package/dependency-graph/index.js +5 -0
- package/dependency-graph/index.js.map +1 -0
- package/dependency-graph/types.d.ts +130 -0
- package/dependency-graph/types.d.ts.map +1 -0
- package/dependency-graph/types.js +2 -0
- package/dependency-graph/types.js.map +1 -0
- package/dependency-graph/useDependencyGraph.d.ts +27 -0
- package/dependency-graph/useDependencyGraph.d.ts.map +1 -0
- package/dependency-graph/useDependencyGraph.js +129 -0
- package/dependency-graph/useDependencyGraph.js.map +1 -0
- package/empty-state/EmptyState.d.ts +29 -0
- package/empty-state/EmptyState.d.ts.map +1 -0
- package/empty-state/EmptyState.js +45 -0
- package/empty-state/EmptyState.js.map +1 -0
- package/empty-state/index.d.ts +4 -0
- package/empty-state/index.d.ts.map +1 -0
- package/empty-state/index.js +3 -0
- package/empty-state/index.js.map +1 -0
- package/empty-state/types.d.ts +73 -0
- package/empty-state/types.d.ts.map +1 -0
- package/empty-state/types.js +2 -0
- package/empty-state/types.js.map +1 -0
- package/empty-state/useEmptyState.d.ts +18 -0
- package/empty-state/useEmptyState.d.ts.map +1 -0
- package/empty-state/useEmptyState.js +72 -0
- package/empty-state/useEmptyState.js.map +1 -0
- package/feedback/StigmerToaster.d.ts +18 -0
- package/feedback/StigmerToaster.d.ts.map +1 -0
- package/feedback/StigmerToaster.js +31 -0
- package/feedback/StigmerToaster.js.map +1 -0
- package/feedback/index.d.ts +4 -0
- package/feedback/index.d.ts.map +1 -0
- package/feedback/index.js +3 -0
- package/feedback/index.js.map +1 -0
- package/feedback/toast.d.ts +14 -0
- package/feedback/toast.d.ts.map +1 -0
- package/feedback/toast.js +14 -0
- package/feedback/toast.js.map +1 -0
- package/feedback/types.d.ts +4 -0
- package/feedback/types.d.ts.map +1 -0
- package/feedback/types.js +2 -0
- package/feedback/types.js.map +1 -0
- package/index.d.ts +30 -10
- package/index.d.ts.map +1 -1
- package/index.js +29 -9
- package/index.js.map +1 -1
- package/inline-edit/InlineEditImage.d.ts +20 -0
- package/inline-edit/InlineEditImage.d.ts.map +1 -0
- package/inline-edit/InlineEditImage.js +85 -0
- package/inline-edit/InlineEditImage.js.map +1 -0
- package/inline-edit/InlineEditKeyValue.d.ts +29 -0
- package/inline-edit/InlineEditKeyValue.d.ts.map +1 -0
- package/inline-edit/InlineEditKeyValue.js +67 -0
- package/inline-edit/InlineEditKeyValue.js.map +1 -0
- package/inline-edit/InlineEditResourceList.d.ts +34 -0
- package/inline-edit/InlineEditResourceList.d.ts.map +1 -0
- package/inline-edit/InlineEditResourceList.js +99 -0
- package/inline-edit/InlineEditResourceList.js.map +1 -0
- package/inline-edit/InlineEditSelect.d.ts +18 -0
- package/inline-edit/InlineEditSelect.d.ts.map +1 -0
- package/inline-edit/InlineEditSelect.js +54 -0
- package/inline-edit/InlineEditSelect.js.map +1 -0
- package/inline-edit/InlineEditText.d.ts +23 -0
- package/inline-edit/InlineEditText.d.ts.map +1 -0
- package/inline-edit/InlineEditText.js +79 -0
- package/inline-edit/InlineEditText.js.map +1 -0
- package/inline-edit/InlineEditTextarea.d.ts +22 -0
- package/inline-edit/InlineEditTextarea.d.ts.map +1 -0
- package/inline-edit/InlineEditTextarea.js +83 -0
- package/inline-edit/InlineEditTextarea.js.map +1 -0
- package/inline-edit/index.d.ts +16 -0
- package/inline-edit/index.d.ts.map +1 -0
- package/inline-edit/index.js +8 -0
- package/inline-edit/index.js.map +1 -0
- package/inline-edit/types.d.ts +42 -0
- package/inline-edit/types.d.ts.map +1 -0
- package/inline-edit/types.js +2 -0
- package/inline-edit/types.js.map +1 -0
- package/inline-edit/useInlineFieldSave.d.ts +23 -0
- package/inline-edit/useInlineFieldSave.d.ts.map +1 -0
- package/inline-edit/useInlineFieldSave.js +44 -0
- package/inline-edit/useInlineFieldSave.js.map +1 -0
- package/internal/Tabs.d.ts +4 -38
- package/internal/Tabs.d.ts.map +1 -1
- package/internal/Tabs.js +3 -62
- package/internal/Tabs.js.map +1 -1
- package/library/ImportResourceDialog.d.ts +43 -0
- package/library/ImportResourceDialog.d.ts.map +1 -0
- package/library/ImportResourceDialog.js +90 -0
- package/library/ImportResourceDialog.js.map +1 -0
- package/library/index.d.ts +7 -4
- package/library/index.d.ts.map +1 -1
- package/library/index.js +4 -2
- package/library/index.js.map +1 -1
- package/library/serialize-resource-yaml.d.ts +53 -0
- package/library/serialize-resource-yaml.d.ts.map +1 -1
- package/library/serialize-resource-yaml.js +275 -0
- package/library/serialize-resource-yaml.js.map +1 -1
- package/library/useExportResource.d.ts +56 -0
- package/library/useExportResource.d.ts.map +1 -0
- package/library/useExportResource.js +137 -0
- package/library/useExportResource.js.map +1 -0
- package/library/useImportResource.d.ts +84 -0
- package/library/useImportResource.d.ts.map +1 -0
- package/library/useImportResource.js +188 -0
- package/library/useImportResource.js.map +1 -0
- package/mcp-server/McpServerCreationWizard.d.ts +55 -0
- package/mcp-server/McpServerCreationWizard.d.ts.map +1 -0
- package/mcp-server/McpServerCreationWizard.js +121 -0
- package/mcp-server/McpServerCreationWizard.js.map +1 -0
- package/mcp-server/McpServerDetailView.d.ts +21 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +113 -20
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/index.d.ts +8 -0
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js +4 -0
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/internal/mcpServerToInput.d.ts +12 -0
- package/mcp-server/internal/mcpServerToInput.d.ts.map +1 -0
- package/mcp-server/internal/mcpServerToInput.js +81 -0
- package/mcp-server/internal/mcpServerToInput.js.map +1 -0
- package/mcp-server/steps/EnvironmentAuthStep.d.ts +15 -0
- package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -0
- package/mcp-server/steps/EnvironmentAuthStep.js +55 -0
- package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -0
- package/mcp-server/steps/IdentityTransportStep.d.ts +19 -0
- package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -0
- package/mcp-server/steps/IdentityTransportStep.js +73 -0
- package/mcp-server/steps/IdentityTransportStep.js.map +1 -0
- package/mcp-server/steps/ReviewStep.d.ts +23 -0
- package/mcp-server/steps/ReviewStep.d.ts.map +1 -0
- package/mcp-server/steps/ReviewStep.js +137 -0
- package/mcp-server/steps/ReviewStep.js.map +1 -0
- package/mcp-server/steps/types.d.ts +56 -0
- package/mcp-server/steps/types.d.ts.map +1 -0
- package/mcp-server/steps/types.js +27 -0
- package/mcp-server/steps/types.js.map +1 -0
- package/mcp-server/useCreateMcpServer.d.ts +45 -0
- package/mcp-server/useCreateMcpServer.d.ts.map +1 -0
- package/mcp-server/useCreateMcpServer.js +50 -0
- package/mcp-server/useCreateMcpServer.js.map +1 -0
- package/mcp-server/useUpdateMcpServer.d.ts +24 -0
- package/mcp-server/useUpdateMcpServer.d.ts.map +1 -0
- package/mcp-server/useUpdateMcpServer.js +35 -0
- package/mcp-server/useUpdateMcpServer.js.map +1 -0
- package/package.json +8 -4
- package/resource-creation/CreationPicker.d.ts +60 -0
- package/resource-creation/CreationPicker.d.ts.map +1 -0
- package/resource-creation/CreationPicker.js +74 -0
- package/resource-creation/CreationPicker.js.map +1 -0
- package/resource-creation/StepIndicator.d.ts +28 -0
- package/resource-creation/StepIndicator.d.ts.map +1 -0
- package/resource-creation/StepIndicator.js +40 -0
- package/resource-creation/StepIndicator.js.map +1 -0
- package/resource-creation/TemplateCard.d.ts +24 -0
- package/resource-creation/TemplateCard.d.ts.map +1 -0
- package/resource-creation/TemplateCard.js +68 -0
- package/resource-creation/TemplateCard.js.map +1 -0
- package/resource-creation/TemplateGallery.d.ts +43 -0
- package/resource-creation/TemplateGallery.d.ts.map +1 -0
- package/resource-creation/TemplateGallery.js +78 -0
- package/resource-creation/TemplateGallery.js.map +1 -0
- package/resource-creation/WizardNav.d.ts +31 -0
- package/resource-creation/WizardNav.d.ts.map +1 -0
- package/resource-creation/WizardNav.js +29 -0
- package/resource-creation/WizardNav.js.map +1 -0
- package/resource-creation/WizardShell.d.ts +41 -0
- package/resource-creation/WizardShell.d.ts.map +1 -0
- package/resource-creation/WizardShell.js +55 -0
- package/resource-creation/WizardShell.js.map +1 -0
- package/resource-creation/index.d.ts +21 -0
- package/resource-creation/index.d.ts.map +1 -0
- package/resource-creation/index.js +14 -0
- package/resource-creation/index.js.map +1 -0
- package/resource-creation/templates/agent-templates.d.ts +15 -0
- package/resource-creation/templates/agent-templates.d.ts.map +1 -0
- package/resource-creation/templates/agent-templates.js +148 -0
- package/resource-creation/templates/agent-templates.js.map +1 -0
- package/resource-creation/templates/index.d.ts +5 -0
- package/resource-creation/templates/index.d.ts.map +1 -0
- package/resource-creation/templates/index.js +5 -0
- package/resource-creation/templates/index.js.map +1 -0
- package/resource-creation/templates/mcp-server-templates.d.ts +15 -0
- package/resource-creation/templates/mcp-server-templates.d.ts.map +1 -0
- package/resource-creation/templates/mcp-server-templates.js +92 -0
- package/resource-creation/templates/mcp-server-templates.js.map +1 -0
- package/resource-creation/templates/types.d.ts +48 -0
- package/resource-creation/templates/types.d.ts.map +1 -0
- package/resource-creation/templates/types.js +16 -0
- package/resource-creation/templates/types.js.map +1 -0
- package/resource-creation/types.d.ts +88 -0
- package/resource-creation/types.d.ts.map +1 -0
- package/resource-creation/types.js +2 -0
- package/resource-creation/types.js.map +1 -0
- package/resource-creation/useTemplateFilter.d.ts +43 -0
- package/resource-creation/useTemplateFilter.d.ts.map +1 -0
- package/resource-creation/useTemplateFilter.js +73 -0
- package/resource-creation/useTemplateFilter.js.map +1 -0
- package/resource-creation/useWizardState.d.ts +67 -0
- package/resource-creation/useWizardState.d.ts.map +1 -0
- package/resource-creation/useWizardState.js +143 -0
- package/resource-creation/useWizardState.js.map +1 -0
- package/resource-detail/ConfirmDialog.d.ts +44 -0
- package/resource-detail/ConfirmDialog.d.ts.map +1 -0
- package/resource-detail/ConfirmDialog.js +62 -0
- package/resource-detail/ConfirmDialog.js.map +1 -0
- package/resource-detail/ResourceActionBar.d.ts +42 -0
- package/resource-detail/ResourceActionBar.d.ts.map +1 -0
- package/resource-detail/ResourceActionBar.js +64 -0
- package/resource-detail/ResourceActionBar.js.map +1 -0
- package/resource-detail/ResourceDetailShell.d.ts +36 -0
- package/resource-detail/ResourceDetailShell.d.ts.map +1 -0
- package/resource-detail/ResourceDetailShell.js +65 -0
- package/resource-detail/ResourceDetailShell.js.map +1 -0
- package/resource-detail/Section.d.ts +18 -0
- package/resource-detail/Section.d.ts.map +1 -0
- package/resource-detail/Section.js +18 -0
- package/resource-detail/Section.js.map +1 -0
- package/resource-detail/index.d.ts +15 -0
- package/resource-detail/index.d.ts.map +1 -0
- package/resource-detail/index.js +10 -0
- package/resource-detail/index.js.map +1 -0
- package/resource-detail/types.d.ts +146 -0
- package/resource-detail/types.d.ts.map +1 -0
- package/resource-detail/types.js +2 -0
- package/resource-detail/types.js.map +1 -0
- package/resource-detail/useConfirmAction.d.ts +41 -0
- package/resource-detail/useConfirmAction.d.ts.map +1 -0
- package/resource-detail/useConfirmAction.js +30 -0
- package/resource-detail/useConfirmAction.js.map +1 -0
- package/resource-detail/useCopyResource.d.ts +28 -0
- package/resource-detail/useCopyResource.d.ts.map +1 -0
- package/resource-detail/useCopyResource.js +46 -0
- package/resource-detail/useCopyResource.js.map +1 -0
- package/resource-detail/useDeleteResource.d.ts +40 -0
- package/resource-detail/useDeleteResource.d.ts.map +1 -0
- package/resource-detail/useDeleteResource.js +83 -0
- package/resource-detail/useDeleteResource.js.map +1 -0
- package/resource-detail/useDetailTabs.d.ts +46 -0
- package/resource-detail/useDetailTabs.d.ts.map +1 -0
- package/resource-detail/useDetailTabs.js +47 -0
- package/resource-detail/useDetailTabs.js.map +1 -0
- package/resource-workbench/components/BulkActionBar.d.ts +36 -0
- package/resource-workbench/components/BulkActionBar.d.ts.map +1 -0
- package/resource-workbench/components/BulkActionBar.js +35 -0
- package/resource-workbench/components/BulkActionBar.js.map +1 -0
- package/resource-workbench/components/ColumnHeader.d.ts +23 -0
- package/resource-workbench/components/ColumnHeader.d.ts.map +1 -0
- package/resource-workbench/components/ColumnHeader.js +25 -0
- package/resource-workbench/components/ColumnHeader.js.map +1 -0
- package/resource-workbench/components/FilterBar.d.ts +33 -0
- package/resource-workbench/components/FilterBar.d.ts.map +1 -0
- package/resource-workbench/components/FilterBar.js +72 -0
- package/resource-workbench/components/FilterBar.js.map +1 -0
- package/resource-workbench/components/ResourceAvatar.d.ts +29 -0
- package/resource-workbench/components/ResourceAvatar.d.ts.map +1 -0
- package/resource-workbench/components/ResourceAvatar.js +51 -0
- package/resource-workbench/components/ResourceAvatar.js.map +1 -0
- package/resource-workbench/components/ResourceCards.d.ts +39 -0
- package/resource-workbench/components/ResourceCards.d.ts.map +1 -0
- package/resource-workbench/components/ResourceCards.js +41 -0
- package/resource-workbench/components/ResourceCards.js.map +1 -0
- package/resource-workbench/components/ResourceInspector.d.ts +26 -0
- package/resource-workbench/components/ResourceInspector.d.ts.map +1 -0
- package/resource-workbench/components/ResourceInspector.js +22 -0
- package/resource-workbench/components/ResourceInspector.js.map +1 -0
- package/resource-workbench/components/ResourceList.d.ts +39 -0
- package/resource-workbench/components/ResourceList.d.ts.map +1 -0
- package/resource-workbench/components/ResourceList.js +41 -0
- package/resource-workbench/components/ResourceList.js.map +1 -0
- package/resource-workbench/components/ResourceTable.d.ts +47 -0
- package/resource-workbench/components/ResourceTable.d.ts.map +1 -0
- package/resource-workbench/components/ResourceTable.js +78 -0
- package/resource-workbench/components/ResourceTable.js.map +1 -0
- package/resource-workbench/components/ResourceWorkbench.d.ts +131 -0
- package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -0
- package/resource-workbench/components/ResourceWorkbench.js +170 -0
- package/resource-workbench/components/ResourceWorkbench.js.map +1 -0
- package/resource-workbench/components/SelectionCheckbox.d.ts +24 -0
- package/resource-workbench/components/SelectionCheckbox.d.ts.map +1 -0
- package/resource-workbench/components/SelectionCheckbox.js +16 -0
- package/resource-workbench/components/SelectionCheckbox.js.map +1 -0
- package/resource-workbench/components/StatusBadge.d.ts +31 -0
- package/resource-workbench/components/StatusBadge.d.ts.map +1 -0
- package/resource-workbench/components/StatusBadge.js +75 -0
- package/resource-workbench/components/StatusBadge.js.map +1 -0
- package/resource-workbench/components/ViewSwitcher.d.ts +21 -0
- package/resource-workbench/components/ViewSwitcher.d.ts.map +1 -0
- package/resource-workbench/components/ViewSwitcher.js +37 -0
- package/resource-workbench/components/ViewSwitcher.js.map +1 -0
- package/resource-workbench/hooks/useResourceCollection.d.ts +93 -0
- package/resource-workbench/hooks/useResourceCollection.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceCollection.js +133 -0
- package/resource-workbench/hooks/useResourceCollection.js.map +1 -0
- package/resource-workbench/hooks/useResourceFilters.d.ts +73 -0
- package/resource-workbench/hooks/useResourceFilters.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceFilters.js +105 -0
- package/resource-workbench/hooks/useResourceFilters.js.map +1 -0
- package/resource-workbench/hooks/useResourceSelection.d.ts +44 -0
- package/resource-workbench/hooks/useResourceSelection.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceSelection.js +123 -0
- package/resource-workbench/hooks/useResourceSelection.js.map +1 -0
- package/resource-workbench/hooks/useViewPreference.d.ts +32 -0
- package/resource-workbench/hooks/useViewPreference.d.ts.map +1 -0
- package/resource-workbench/hooks/useViewPreference.js +60 -0
- package/resource-workbench/hooks/useViewPreference.js.map +1 -0
- package/resource-workbench/index.d.ts +34 -0
- package/resource-workbench/index.d.ts.map +1 -0
- package/resource-workbench/index.js +19 -0
- package/resource-workbench/index.js.map +1 -0
- package/resource-workbench/types.d.ts +165 -0
- package/resource-workbench/types.d.ts.map +1 -0
- package/resource-workbench/types.js +2 -0
- package/resource-workbench/types.js.map +1 -0
- package/runner/RunnerDetailView.d.ts +44 -0
- package/runner/RunnerDetailView.d.ts.map +1 -0
- package/runner/RunnerDetailView.js +154 -0
- package/runner/RunnerDetailView.js.map +1 -0
- package/runner/RunnerListPanel.d.ts +26 -1
- package/runner/RunnerListPanel.d.ts.map +1 -1
- package/runner/RunnerListPanel.js +68 -46
- package/runner/RunnerListPanel.js.map +1 -1
- package/runner/index.d.ts +7 -1
- package/runner/index.d.ts.map +1 -1
- package/runner/index.js +3 -0
- package/runner/index.js.map +1 -1
- package/runner/shared.d.ts +31 -0
- package/runner/shared.d.ts.map +1 -0
- package/runner/shared.js +55 -0
- package/runner/shared.js.map +1 -0
- package/runner/useRunner.d.ts +37 -0
- package/runner/useRunner.d.ts.map +1 -0
- package/runner/useRunner.js +24 -0
- package/runner/useRunner.js.map +1 -0
- package/session/__tests__/group-sessions.test.js +3 -3
- package/session/__tests__/group-sessions.test.js.map +1 -1
- package/skill/SkillDetailView.d.ts +70 -7
- package/skill/SkillDetailView.d.ts.map +1 -1
- package/skill/SkillDetailView.js +107 -39
- package/skill/SkillDetailView.js.map +1 -1
- package/skill/SkillDiffDialog.d.ts +42 -0
- package/skill/SkillDiffDialog.d.ts.map +1 -0
- package/skill/SkillDiffDialog.js +72 -0
- package/skill/SkillDiffDialog.js.map +1 -0
- package/skill/SkillFileBrowser.d.ts +31 -0
- package/skill/SkillFileBrowser.d.ts.map +1 -0
- package/skill/SkillFileBrowser.js +105 -0
- package/skill/SkillFileBrowser.js.map +1 -0
- package/skill/SkillUploader.d.ts +39 -0
- package/skill/SkillUploader.d.ts.map +1 -0
- package/skill/SkillUploader.js +141 -0
- package/skill/SkillUploader.js.map +1 -0
- package/skill/index.d.ts +18 -0
- package/skill/index.d.ts.map +1 -1
- package/skill/index.js +9 -0
- package/skill/index.js.map +1 -1
- package/skill/internal/computeArtifactHash.d.ts +9 -0
- package/skill/internal/computeArtifactHash.d.ts.map +1 -0
- package/skill/internal/computeArtifactHash.js +14 -0
- package/skill/internal/computeArtifactHash.js.map +1 -0
- package/skill/internal/fetchAndUnpackArtifact.d.ts +16 -0
- package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -0
- package/skill/internal/fetchAndUnpackArtifact.js +34 -0
- package/skill/internal/fetchAndUnpackArtifact.js.map +1 -0
- package/skill/usePushSkill.d.ts +53 -0
- package/skill/usePushSkill.d.ts.map +1 -0
- package/skill/usePushSkill.js +57 -0
- package/skill/usePushSkill.js.map +1 -0
- package/skill/useSkillArtifact.d.ts +37 -0
- package/skill/useSkillArtifact.d.ts.map +1 -0
- package/skill/useSkillArtifact.js +76 -0
- package/skill/useSkillArtifact.js.map +1 -0
- package/skill/useSkillDiff.d.ts +31 -0
- package/skill/useSkillDiff.d.ts.map +1 -0
- package/skill/useSkillDiff.js +97 -0
- package/skill/useSkillDiff.js.map +1 -0
- package/skill/useSkillDuplicateCheck.d.ts +34 -0
- package/skill/useSkillDuplicateCheck.d.ts.map +1 -0
- package/skill/useSkillDuplicateCheck.js +58 -0
- package/skill/useSkillDuplicateCheck.js.map +1 -0
- package/skill/useSkillUpload.d.ts +69 -0
- package/skill/useSkillUpload.d.ts.map +1 -0
- package/skill/useSkillUpload.js +157 -0
- package/skill/useSkillUpload.js.map +1 -0
- package/skill/useSkillVersions.d.ts +46 -0
- package/skill/useSkillVersions.d.ts.map +1 -0
- package/skill/useSkillVersions.js +104 -0
- package/skill/useSkillVersions.js.map +1 -0
- package/src/action-menu/ActionMenu.tsx +151 -0
- package/src/action-menu/index.ts +9 -0
- package/src/action-menu/types.ts +70 -0
- package/src/agent/AgentCreationWizard.tsx +201 -0
- package/src/agent/AgentDetailView.tsx +817 -321
- package/src/agent/index.ts +16 -0
- package/src/agent/internal/agentToInput.ts +95 -0
- package/src/agent/steps/CapabilitiesStep.tsx +363 -0
- package/src/agent/steps/IdentityStep.tsx +259 -0
- package/src/agent/steps/ReviewStep.tsx +211 -0
- package/src/agent/steps/types.ts +53 -0
- package/src/agent/useCreateAgent.ts +76 -0
- package/src/agent/useUpdateAgent.ts +55 -0
- package/src/dependency-graph/DependencyGraph.tsx +153 -0
- package/src/dependency-graph/DependencyTreeNode.tsx +282 -0
- package/src/dependency-graph/index.ts +15 -0
- package/src/dependency-graph/types.ts +131 -0
- package/src/dependency-graph/useDependencyGraph.ts +158 -0
- package/src/empty-state/EmptyState.tsx +90 -0
- package/src/empty-state/index.ts +9 -0
- package/src/empty-state/types.ts +81 -0
- package/src/empty-state/useEmptyState.ts +85 -0
- package/src/feedback/StigmerToaster.tsx +45 -0
- package/src/feedback/index.ts +3 -0
- package/src/feedback/toast.ts +13 -0
- package/src/feedback/types.ts +7 -0
- package/src/index.ts +270 -8
- package/src/inline-edit/InlineEditImage.tsx +208 -0
- package/src/inline-edit/InlineEditKeyValue.tsx +278 -0
- package/src/inline-edit/InlineEditResourceList.tsx +325 -0
- package/src/inline-edit/InlineEditSelect.tsx +150 -0
- package/src/inline-edit/InlineEditText.tsx +211 -0
- package/src/inline-edit/InlineEditTextarea.tsx +209 -0
- package/src/inline-edit/index.ts +28 -0
- package/src/inline-edit/types.ts +47 -0
- package/src/inline-edit/useInlineFieldSave.ts +62 -0
- package/src/internal/Tabs.tsx +4 -164
- package/src/library/ImportResourceDialog.tsx +227 -0
- package/src/library/index.ts +18 -8
- package/src/library/serialize-resource-yaml.ts +356 -0
- package/src/library/useExportResource.ts +183 -0
- package/src/library/useImportResource.ts +253 -0
- package/src/mcp-server/McpServerCreationWizard.tsx +206 -0
- package/src/mcp-server/McpServerDetailView.tsx +392 -105
- package/src/mcp-server/index.ts +16 -0
- package/src/mcp-server/internal/mcpServerToInput.ts +95 -0
- package/src/mcp-server/steps/EnvironmentAuthStep.tsx +462 -0
- package/src/mcp-server/steps/IdentityTransportStep.tsx +531 -0
- package/src/mcp-server/steps/ReviewStep.tsx +297 -0
- package/src/mcp-server/steps/types.ts +85 -0
- package/src/mcp-server/useCreateMcpServer.ts +76 -0
- package/src/mcp-server/useUpdateMcpServer.ts +55 -0
- package/src/resource-creation/CreationPicker.tsx +292 -0
- package/src/resource-creation/StepIndicator.tsx +156 -0
- package/src/resource-creation/TemplateCard.tsx +143 -0
- package/src/resource-creation/TemplateGallery.tsx +222 -0
- package/src/resource-creation/WizardNav.tsx +163 -0
- package/src/resource-creation/WizardShell.tsx +124 -0
- package/src/resource-creation/index.ts +45 -0
- package/src/resource-creation/templates/agent-templates.ts +160 -0
- package/src/resource-creation/templates/index.ts +7 -0
- package/src/resource-creation/templates/mcp-server-templates.ts +106 -0
- package/src/resource-creation/templates/types.ts +64 -0
- package/src/resource-creation/types.ts +105 -0
- package/src/resource-creation/useTemplateFilter.ts +117 -0
- package/src/resource-creation/useWizardState.ts +223 -0
- package/src/resource-detail/ConfirmDialog.tsx +127 -0
- package/src/resource-detail/ResourceActionBar.tsx +157 -0
- package/src/resource-detail/ResourceDetailShell.tsx +184 -0
- package/src/resource-detail/Section.tsx +78 -0
- package/src/resource-detail/index.ts +34 -0
- package/src/resource-detail/types.ts +177 -0
- package/src/resource-detail/useConfirmAction.ts +70 -0
- package/src/resource-detail/useCopyResource.ts +74 -0
- package/src/resource-detail/useDeleteResource.ts +110 -0
- package/src/resource-detail/useDetailTabs.ts +93 -0
- package/src/resource-workbench/components/BulkActionBar.tsx +122 -0
- package/src/resource-workbench/components/ColumnHeader.tsx +105 -0
- package/src/resource-workbench/components/FilterBar.tsx +173 -0
- package/src/resource-workbench/components/ResourceAvatar.tsx +109 -0
- package/src/resource-workbench/components/ResourceCards.tsx +126 -0
- package/src/resource-workbench/components/ResourceInspector.tsx +88 -0
- package/src/resource-workbench/components/ResourceList.tsx +121 -0
- package/src/resource-workbench/components/ResourceTable.tsx +222 -0
- package/src/resource-workbench/components/ResourceWorkbench.tsx +695 -0
- package/src/resource-workbench/components/SelectionCheckbox.tsx +52 -0
- package/src/resource-workbench/components/StatusBadge.tsx +119 -0
- package/src/resource-workbench/components/ViewSwitcher.tsx +135 -0
- package/src/resource-workbench/hooks/useResourceCollection.ts +261 -0
- package/src/resource-workbench/hooks/useResourceFilters.ts +216 -0
- package/src/resource-workbench/hooks/useResourceSelection.ts +178 -0
- package/src/resource-workbench/hooks/useViewPreference.ts +75 -0
- package/src/resource-workbench/index.ts +73 -0
- package/src/resource-workbench/types.ts +220 -0
- package/src/runner/RunnerDetailView.tsx +410 -0
- package/src/runner/RunnerListPanel.tsx +126 -111
- package/src/runner/index.ts +13 -1
- package/src/runner/shared.tsx +124 -0
- package/src/runner/useRunner.ts +59 -0
- package/src/session/__tests__/group-sessions.test.ts +5 -3
- package/src/skill/SkillDetailView.tsx +371 -165
- package/src/skill/SkillDiffDialog.tsx +213 -0
- package/src/skill/SkillFileBrowser.tsx +289 -0
- package/src/skill/SkillUploader.tsx +481 -0
- package/src/skill/index.ts +34 -0
- package/src/skill/internal/computeArtifactHash.ts +13 -0
- package/src/skill/internal/fetchAndUnpackArtifact.ts +48 -0
- package/src/skill/usePushSkill.ts +101 -0
- package/src/skill/useSkillArtifact.ts +107 -0
- package/src/skill/useSkillDiff.ts +128 -0
- package/src/skill/useSkillDuplicateCheck.ts +92 -0
- package/src/skill/useSkillUpload.ts +231 -0
- package/src/skill/useSkillVersions.ts +165 -0
- package/src/styles.css +28 -0
- package/src/tabs/Tabs.tsx +184 -0
- package/src/tabs/index.ts +2 -0
- package/src/version-history/DiffFileList.tsx +111 -0
- package/src/version-history/DiffSummary.tsx +61 -0
- package/src/version-history/DiffViewer.tsx +163 -0
- package/src/version-history/MultiFileDiffView.tsx +114 -0
- package/src/version-history/VersionTimeline.tsx +232 -0
- package/src/version-history/VersionTimelineEntry.tsx +254 -0
- package/src/version-history/computeDiff.ts +61 -0
- package/src/version-history/computeMultiFileDiff.ts +97 -0
- package/src/version-history/index.ts +22 -0
- package/src/version-history/types.ts +129 -0
- package/styles.css +1 -1
- package/tabs/Tabs.d.ts +58 -0
- package/tabs/Tabs.d.ts.map +1 -0
- package/tabs/Tabs.js +80 -0
- package/tabs/Tabs.js.map +1 -0
- package/tabs/index.d.ts +3 -0
- package/tabs/index.d.ts.map +1 -0
- package/tabs/index.js +2 -0
- package/tabs/index.js.map +1 -0
- package/version-history/DiffFileList.d.ts +22 -0
- package/version-history/DiffFileList.d.ts.map +1 -0
- package/version-history/DiffFileList.js +37 -0
- package/version-history/DiffFileList.js.map +1 -0
- package/version-history/DiffSummary.d.ts +21 -0
- package/version-history/DiffSummary.d.ts.map +1 -0
- package/version-history/DiffSummary.js +16 -0
- package/version-history/DiffSummary.js.map +1 -0
- package/version-history/DiffViewer.d.ts +31 -0
- package/version-history/DiffViewer.d.ts.map +1 -0
- package/version-history/DiffViewer.js +60 -0
- package/version-history/DiffViewer.js.map +1 -0
- package/version-history/MultiFileDiffView.d.ts +30 -0
- package/version-history/MultiFileDiffView.d.ts.map +1 -0
- package/version-history/MultiFileDiffView.js +40 -0
- package/version-history/MultiFileDiffView.js.map +1 -0
- package/version-history/VersionTimeline.d.ts +29 -0
- package/version-history/VersionTimeline.d.ts.map +1 -0
- package/version-history/VersionTimeline.js +87 -0
- package/version-history/VersionTimeline.js.map +1 -0
- package/version-history/VersionTimelineEntry.d.ts +22 -0
- package/version-history/VersionTimelineEntry.d.ts.map +1 -0
- package/version-history/VersionTimelineEntry.js +98 -0
- package/version-history/VersionTimelineEntry.js.map +1 -0
- package/version-history/computeDiff.d.ts +16 -0
- package/version-history/computeDiff.d.ts.map +1 -0
- package/version-history/computeDiff.js +54 -0
- package/version-history/computeDiff.js.map +1 -0
- package/version-history/computeMultiFileDiff.d.ts +15 -0
- package/version-history/computeMultiFileDiff.d.ts.map +1 -0
- package/version-history/computeMultiFileDiff.js +83 -0
- package/version-history/computeMultiFileDiff.js.map +1 -0
- package/version-history/index.d.ts +14 -0
- package/version-history/index.d.ts.map +1 -0
- package/version-history/index.js +9 -0
- package/version-history/index.js.map +1 -0
- package/version-history/types.d.ts +106 -0
- package/version-history/types.d.ts.map +1 -0
- package/version-history/types.js +2 -0
- package/version-history/types.js.map +1 -0
- package/library/ResourceListView.d.ts +0 -174
- package/library/ResourceListView.d.ts.map +0 -1
- package/library/ResourceListView.js +0 -318
- package/library/ResourceListView.js.map +0 -1
- package/src/library/ResourceListView.tsx +0 -956
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
export interface SectionProps {
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly count?: number;
|
|
9
|
+
readonly onEdit?: () => void;
|
|
10
|
+
readonly children: ReactNode;
|
|
11
|
+
readonly className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Shared section layout for resource detail views.
|
|
16
|
+
*
|
|
17
|
+
* Renders a labeled section with an optional count badge and edit affordance
|
|
18
|
+
* in the header row. The content is wrapped in a bordered card.
|
|
19
|
+
*
|
|
20
|
+
* Used uniformly by AgentDetailView, McpServerDetailView, and SkillDetailView.
|
|
21
|
+
*/
|
|
22
|
+
export function Section({
|
|
23
|
+
title,
|
|
24
|
+
count,
|
|
25
|
+
onEdit,
|
|
26
|
+
children,
|
|
27
|
+
className,
|
|
28
|
+
}: SectionProps) {
|
|
29
|
+
return (
|
|
30
|
+
<section className={className}>
|
|
31
|
+
<div className="mb-2 flex items-center gap-2">
|
|
32
|
+
<h3 className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
|
|
33
|
+
{title}
|
|
34
|
+
</h3>
|
|
35
|
+
{count != null && count > 0 && (
|
|
36
|
+
<span className="inline-flex size-5 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground">
|
|
37
|
+
{count}
|
|
38
|
+
</span>
|
|
39
|
+
)}
|
|
40
|
+
{onEdit && (
|
|
41
|
+
<button
|
|
42
|
+
type="button"
|
|
43
|
+
onClick={onEdit}
|
|
44
|
+
aria-label={`Edit ${title.toLowerCase()}`}
|
|
45
|
+
className={cn(
|
|
46
|
+
"ml-auto inline-flex size-6 items-center justify-center rounded-md text-muted-foreground",
|
|
47
|
+
"hover:bg-accent-hover hover:text-foreground",
|
|
48
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
49
|
+
"transition-colors",
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
<PencilIcon className="size-3.5" />
|
|
53
|
+
</button>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
<div className="overflow-hidden rounded-lg border border-border">
|
|
57
|
+
{children}
|
|
58
|
+
</div>
|
|
59
|
+
</section>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function PencilIcon({ className }: { readonly className?: string }) {
|
|
64
|
+
return (
|
|
65
|
+
<svg
|
|
66
|
+
className={className}
|
|
67
|
+
viewBox="0 0 16 16"
|
|
68
|
+
fill="none"
|
|
69
|
+
stroke="currentColor"
|
|
70
|
+
strokeWidth="1.5"
|
|
71
|
+
strokeLinecap="round"
|
|
72
|
+
strokeLinejoin="round"
|
|
73
|
+
aria-hidden="true"
|
|
74
|
+
>
|
|
75
|
+
<path d="M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z" />
|
|
76
|
+
</svg>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Types
|
|
2
|
+
export type {
|
|
3
|
+
AdditionalTab,
|
|
4
|
+
DetailAction,
|
|
5
|
+
ResourceHeaderMeta,
|
|
6
|
+
ConfirmOptions,
|
|
7
|
+
ConfirmState,
|
|
8
|
+
ResourceDetailShellProps,
|
|
9
|
+
} from "./types";
|
|
10
|
+
|
|
11
|
+
// Hooks
|
|
12
|
+
export { useCopyResource } from "./useCopyResource";
|
|
13
|
+
export type { UseCopyResourceReturn } from "./useCopyResource";
|
|
14
|
+
|
|
15
|
+
export { useConfirmAction } from "./useConfirmAction";
|
|
16
|
+
export type { UseConfirmActionReturn } from "./useConfirmAction";
|
|
17
|
+
|
|
18
|
+
export { useDeleteResource } from "./useDeleteResource";
|
|
19
|
+
export type {
|
|
20
|
+
DeletableResourceKind,
|
|
21
|
+
UseDeleteResourceReturn,
|
|
22
|
+
} from "./useDeleteResource";
|
|
23
|
+
|
|
24
|
+
// Components
|
|
25
|
+
export { ResourceActionBar } from "./ResourceActionBar";
|
|
26
|
+
export type { ResourceActionBarProps } from "./ResourceActionBar";
|
|
27
|
+
|
|
28
|
+
export { ResourceDetailShell } from "./ResourceDetailShell";
|
|
29
|
+
|
|
30
|
+
export { ConfirmDialog } from "./ConfirmDialog";
|
|
31
|
+
export type { ConfirmDialogProps } from "./ConfirmDialog";
|
|
32
|
+
|
|
33
|
+
export { Section } from "./Section";
|
|
34
|
+
export type { SectionProps } from "./Section";
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StatusPhase } from "../resource-workbench/types";
|
|
3
|
+
import type { TabItem } from "../tabs/Tabs";
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Additional tab — consumer-provided extension tabs for detail views
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Describes a consumer-provided tab that extends a detail view's built-in
|
|
11
|
+
* tabs. Used by {@link AgentDetailView} and {@link SkillDetailView} to let
|
|
12
|
+
* platform builders (or the Console) add custom tabs without forking the
|
|
13
|
+
* component.
|
|
14
|
+
*
|
|
15
|
+
* The SDK component defines its own built-in tabs (e.g., "Overview" for
|
|
16
|
+
* agents, "Content" for skills). Consumers extend via `additionalTabs` —
|
|
17
|
+
* providing both the tab metadata and the content to render.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <AgentDetailView
|
|
22
|
+
* org="acme"
|
|
23
|
+
* slug="my-agent"
|
|
24
|
+
* additionalTabs={[
|
|
25
|
+
* { id: "dependencies", label: "Dependencies", content: <DependencyGraph /> },
|
|
26
|
+
* ]}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export interface AdditionalTab extends TabItem {
|
|
31
|
+
/** Content rendered in the tab panel when this tab is active. */
|
|
32
|
+
readonly content: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Detail action — a single operation available on the detail page
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Describes an action that can be performed on the currently viewed
|
|
41
|
+
* resource. Used by {@link ResourceActionBar} and the kebab overflow menu.
|
|
42
|
+
*
|
|
43
|
+
* Unlike the workbench's `ResourceAction<TData>`, this is not generic —
|
|
44
|
+
* the detail page already knows what resource it is showing.
|
|
45
|
+
*/
|
|
46
|
+
export interface DetailAction {
|
|
47
|
+
/** Stable action identifier. */
|
|
48
|
+
readonly id: string;
|
|
49
|
+
/** Display label (e.g. "Edit", "Copy ID", "Delete"). */
|
|
50
|
+
readonly label: string;
|
|
51
|
+
/** Optional icon rendered before the label. */
|
|
52
|
+
readonly icon?: ReactNode;
|
|
53
|
+
/** Optional keyboard shortcut hint. */
|
|
54
|
+
readonly shortcut?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Visual variant.
|
|
57
|
+
* - `"default"` — standard item
|
|
58
|
+
* - `"destructive"` — danger styling for delete, revoke, etc.
|
|
59
|
+
* @default "default"
|
|
60
|
+
*/
|
|
61
|
+
readonly variant?: "default" | "destructive";
|
|
62
|
+
/** Fires when the action is selected. */
|
|
63
|
+
readonly onAction: () => void;
|
|
64
|
+
/** When `true`, the action is shown but non-interactive. */
|
|
65
|
+
readonly disabled?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Group identifier for organizing actions in the overflow menu.
|
|
68
|
+
* Actions with the same group are visually grouped with separators.
|
|
69
|
+
*/
|
|
70
|
+
readonly group?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// Resource header metadata — what the shell renders in the header area
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Metadata rendered in the {@link ResourceDetailShell} header.
|
|
79
|
+
*
|
|
80
|
+
* This is the shared shape for all resource types — agent, skill,
|
|
81
|
+
* MCP server, runner. Each detail page maps its resource-specific
|
|
82
|
+
* protobuf to this shape before passing it to the shell.
|
|
83
|
+
*/
|
|
84
|
+
export interface ResourceHeaderMeta {
|
|
85
|
+
/** Display name of the resource. */
|
|
86
|
+
readonly name: string;
|
|
87
|
+
/** Resource ID (opaque string). */
|
|
88
|
+
readonly id: string;
|
|
89
|
+
/** Organization slug that owns the resource. */
|
|
90
|
+
readonly org?: string;
|
|
91
|
+
/** URL-friendly slug. */
|
|
92
|
+
readonly slug?: string;
|
|
93
|
+
/** Resource description. */
|
|
94
|
+
readonly description?: string;
|
|
95
|
+
/** Optional icon URL (e.g. agent icon). */
|
|
96
|
+
readonly iconUrl?: string;
|
|
97
|
+
/** Optional custom icon element to render instead of `iconUrl`. */
|
|
98
|
+
readonly icon?: ReactNode;
|
|
99
|
+
/** Resource creation timestamp. */
|
|
100
|
+
readonly createdAt?: Date | null;
|
|
101
|
+
/** Last update timestamp. */
|
|
102
|
+
readonly updatedAt?: Date | null;
|
|
103
|
+
/** Resource status phase for the status badge. */
|
|
104
|
+
readonly status?: StatusPhase;
|
|
105
|
+
/** Custom status label (overrides the default phase label). */
|
|
106
|
+
readonly statusLabel?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
110
|
+
// Confirm action state — managed by useConfirmAction
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
/** Options passed to `confirm()` to show a confirmation prompt. */
|
|
114
|
+
export interface ConfirmOptions {
|
|
115
|
+
/** Dialog title (e.g. "Delete agent?"). */
|
|
116
|
+
readonly title: string;
|
|
117
|
+
/** Descriptive body text explaining the consequences. */
|
|
118
|
+
readonly description: string;
|
|
119
|
+
/** Label for the confirm button. @default "Confirm" */
|
|
120
|
+
readonly confirmLabel?: string;
|
|
121
|
+
/** Label for the cancel button. @default "Cancel" */
|
|
122
|
+
readonly cancelLabel?: string;
|
|
123
|
+
/** Visual variant for the confirm button. @default "destructive" */
|
|
124
|
+
readonly variant?: "default" | "destructive";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Internal state of a pending confirmation. */
|
|
128
|
+
export interface ConfirmState extends ConfirmOptions {
|
|
129
|
+
/** Resolves the promise returned by `confirm()`. */
|
|
130
|
+
readonly resolve: (confirmed: boolean) => void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
// ResourceDetailShell props
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
export interface ResourceDetailShellProps {
|
|
138
|
+
/** Header metadata extracted from the resource. */
|
|
139
|
+
readonly header: ResourceHeaderMeta;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Visibility control rendered in the header.
|
|
143
|
+
* Typically a `<VisibilityToggle />` from the library module.
|
|
144
|
+
* Rendered inline after the resource name.
|
|
145
|
+
*/
|
|
146
|
+
readonly visibilityControl?: ReactNode;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Primary action rendered as a visible button in the header area.
|
|
150
|
+
* Use for the most common action (e.g. "Edit" for agents).
|
|
151
|
+
*/
|
|
152
|
+
readonly primaryAction?: DetailAction;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Secondary actions rendered in the kebab overflow menu.
|
|
156
|
+
* Grouped by the `group` field — groups are separated visually.
|
|
157
|
+
*/
|
|
158
|
+
readonly actions?: readonly DetailAction[];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Optional tabs to render below the header.
|
|
162
|
+
* When omitted, children are rendered directly without a tab strip.
|
|
163
|
+
*/
|
|
164
|
+
readonly tabs?: readonly TabItem[];
|
|
165
|
+
/** Active tab ID (required when `tabs` is provided). */
|
|
166
|
+
readonly activeTab?: string;
|
|
167
|
+
/** Tab change handler (required when `tabs` is provided). */
|
|
168
|
+
readonly onTabChange?: (tabId: string) => void;
|
|
169
|
+
/** Accessible label for the tab strip. */
|
|
170
|
+
readonly tabsAriaLabel?: string;
|
|
171
|
+
|
|
172
|
+
/** Content area — tab panel content or direct children. */
|
|
173
|
+
readonly children: ReactNode;
|
|
174
|
+
|
|
175
|
+
/** Additional CSS classes for the root container. */
|
|
176
|
+
readonly className?: string;
|
|
177
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo, useState } from "react";
|
|
4
|
+
import type { ConfirmOptions, ConfirmState } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface UseConfirmActionReturn {
|
|
7
|
+
/**
|
|
8
|
+
* The pending confirmation state, or `null` when no confirmation
|
|
9
|
+
* is active. Pass this to a `ConfirmDialog` component to render
|
|
10
|
+
* the dialog UI.
|
|
11
|
+
*/
|
|
12
|
+
readonly confirmState: ConfirmState | null;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Trigger a confirmation prompt. Returns a promise that resolves
|
|
16
|
+
* to `true` when confirmed, `false` when cancelled.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const confirmed = await confirm({
|
|
21
|
+
* title: "Delete agent?",
|
|
22
|
+
* description: "This action cannot be undone.",
|
|
23
|
+
* confirmLabel: "Delete",
|
|
24
|
+
* variant: "destructive",
|
|
25
|
+
* });
|
|
26
|
+
* if (confirmed) await deleteAgent();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
readonly confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
30
|
+
|
|
31
|
+
/** Accept the pending confirmation. */
|
|
32
|
+
readonly handleConfirm: () => void;
|
|
33
|
+
/** Dismiss the pending confirmation. */
|
|
34
|
+
readonly handleCancel: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* State management hook for confirmation dialogs.
|
|
39
|
+
*
|
|
40
|
+
* Provides an imperative `confirm()` function that returns a promise,
|
|
41
|
+
* paired with `confirmState` for rendering a `ConfirmDialog`.
|
|
42
|
+
*
|
|
43
|
+
* Separates the state logic (this hook) from the visual presentation
|
|
44
|
+
* (ConfirmDialog component) following the headless-first architecture
|
|
45
|
+
* (DD-003).
|
|
46
|
+
*/
|
|
47
|
+
export function useConfirmAction(): UseConfirmActionReturn {
|
|
48
|
+
const [confirmState, setConfirmState] = useState<ConfirmState | null>(null);
|
|
49
|
+
|
|
50
|
+
const confirm = useCallback((options: ConfirmOptions): Promise<boolean> => {
|
|
51
|
+
return new Promise<boolean>((resolve) => {
|
|
52
|
+
setConfirmState({ ...options, resolve });
|
|
53
|
+
});
|
|
54
|
+
}, []);
|
|
55
|
+
|
|
56
|
+
const handleConfirm = useCallback(() => {
|
|
57
|
+
confirmState?.resolve(true);
|
|
58
|
+
setConfirmState(null);
|
|
59
|
+
}, [confirmState]);
|
|
60
|
+
|
|
61
|
+
const handleCancel = useCallback(() => {
|
|
62
|
+
confirmState?.resolve(false);
|
|
63
|
+
setConfirmState(null);
|
|
64
|
+
}, [confirmState]);
|
|
65
|
+
|
|
66
|
+
return useMemo(
|
|
67
|
+
() => ({ confirmState, confirm, handleConfirm, handleCancel }),
|
|
68
|
+
[confirmState, confirm, handleConfirm, handleCancel],
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
import { toast } from "../feedback/toast";
|
|
5
|
+
|
|
6
|
+
export interface UseCopyResourceReturn {
|
|
7
|
+
/** Copy arbitrary text to the clipboard with toast feedback. */
|
|
8
|
+
readonly copy: (text: string, label: string) => Promise<void>;
|
|
9
|
+
/** Shortcut: copies `id` and toasts "ID copied". */
|
|
10
|
+
readonly copyId: (id: string) => Promise<void>;
|
|
11
|
+
/** Shortcut: copies `slug` and toasts "Slug copied". */
|
|
12
|
+
readonly copySlug: (slug: string) => Promise<void>;
|
|
13
|
+
/** Shortcut: copies the qualified slug (`org/slug`) and toasts. */
|
|
14
|
+
readonly copyQualifiedSlug: (org: string, slug: string) => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Clipboard helper for resource detail pages.
|
|
19
|
+
*
|
|
20
|
+
* Wraps `navigator.clipboard.writeText` with toast feedback so every
|
|
21
|
+
* copy action is confirmed visually (Nielsen heuristic #1 — visibility
|
|
22
|
+
* of system status). Falls back to a hidden textarea for older browsers.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* const { copyId, copySlug, copy } = useCopyResource();
|
|
27
|
+
*
|
|
28
|
+
* <ActionMenu.Item onSelect={() => copyId(resource.id)}>
|
|
29
|
+
* Copy ID
|
|
30
|
+
* </ActionMenu.Item>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function useCopyResource(): UseCopyResourceReturn {
|
|
34
|
+
const copy = useCallback(async (text: string, label: string) => {
|
|
35
|
+
try {
|
|
36
|
+
await navigator.clipboard.writeText(text);
|
|
37
|
+
toast.success(`${label} copied`);
|
|
38
|
+
} catch {
|
|
39
|
+
fallbackCopy(text);
|
|
40
|
+
toast.success(`${label} copied`);
|
|
41
|
+
}
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
const copyId = useCallback(
|
|
45
|
+
(id: string) => copy(id, "ID"),
|
|
46
|
+
[copy],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const copySlug = useCallback(
|
|
50
|
+
(slug: string) => copy(slug, "Slug"),
|
|
51
|
+
[copy],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const copyQualifiedSlug = useCallback(
|
|
55
|
+
(org: string, slug: string) => copy(`${org}/${slug}`, "Qualified slug"),
|
|
56
|
+
[copy],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
return useMemo(
|
|
60
|
+
() => ({ copy, copyId, copySlug, copyQualifiedSlug }),
|
|
61
|
+
[copy, copyId, copySlug, copyQualifiedSlug],
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function fallbackCopy(text: string): void {
|
|
66
|
+
const textarea = document.createElement("textarea");
|
|
67
|
+
textarea.value = text;
|
|
68
|
+
textarea.style.position = "fixed";
|
|
69
|
+
textarea.style.opacity = "0";
|
|
70
|
+
document.body.appendChild(textarea);
|
|
71
|
+
textarea.select();
|
|
72
|
+
document.execCommand("copy");
|
|
73
|
+
document.body.removeChild(textarea);
|
|
74
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo, useState } from "react";
|
|
4
|
+
import { useStigmer } from "../hooks";
|
|
5
|
+
import { toError } from "../internal/toError";
|
|
6
|
+
import { toast } from "../feedback/toast";
|
|
7
|
+
|
|
8
|
+
/** Resource types that support deletion from detail pages. */
|
|
9
|
+
export type DeletableResourceKind = "agent" | "skill" | "mcpServer" | "runner";
|
|
10
|
+
|
|
11
|
+
export interface UseDeleteResourceReturn {
|
|
12
|
+
/**
|
|
13
|
+
* Delete the resource. Resolves on success, rejects on failure.
|
|
14
|
+
* Shows a success toast on completion and an error toast on failure.
|
|
15
|
+
*/
|
|
16
|
+
readonly deleteResource: () => Promise<void>;
|
|
17
|
+
/** `true` while the delete request is in flight. */
|
|
18
|
+
readonly isDeleting: boolean;
|
|
19
|
+
/** Error from the last failed delete, or `null` when healthy. */
|
|
20
|
+
readonly error: Error | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Mutation hook for deleting a resource from its detail page.
|
|
25
|
+
*
|
|
26
|
+
* Wraps the type-specific delete RPC with loading state, toast
|
|
27
|
+
* feedback, and error handling. The `resourceId` may be `null`
|
|
28
|
+
* when the resource hasn't loaded yet — `deleteResource` becomes
|
|
29
|
+
* a no-op in that case.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const { deleteResource, isDeleting } = useDeleteResource(
|
|
34
|
+
* "agent",
|
|
35
|
+
* resourceId,
|
|
36
|
+
* "PR Review Agent",
|
|
37
|
+
* );
|
|
38
|
+
*
|
|
39
|
+
* const handleDelete = async () => {
|
|
40
|
+
* const confirmed = await confirm({ ... });
|
|
41
|
+
* if (confirmed) {
|
|
42
|
+
* await deleteResource();
|
|
43
|
+
* router.push("/library/agents");
|
|
44
|
+
* }
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export function useDeleteResource(
|
|
49
|
+
kind: DeletableResourceKind,
|
|
50
|
+
resourceId: string | null,
|
|
51
|
+
resourceName?: string,
|
|
52
|
+
): UseDeleteResourceReturn {
|
|
53
|
+
const stigmer = useStigmer();
|
|
54
|
+
const [isDeleting, setIsDeleting] = useState(false);
|
|
55
|
+
const [error, setError] = useState<Error | null>(null);
|
|
56
|
+
|
|
57
|
+
const deleteResource = useCallback(async () => {
|
|
58
|
+
if (!resourceId) return;
|
|
59
|
+
|
|
60
|
+
setIsDeleting(true);
|
|
61
|
+
setError(null);
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
switch (kind) {
|
|
65
|
+
case "agent":
|
|
66
|
+
await stigmer.agent.delete(resourceId);
|
|
67
|
+
break;
|
|
68
|
+
case "skill":
|
|
69
|
+
await stigmer.skill.delete(resourceId);
|
|
70
|
+
break;
|
|
71
|
+
case "mcpServer":
|
|
72
|
+
await stigmer.mcpServer.delete({ resourceId });
|
|
73
|
+
break;
|
|
74
|
+
case "runner":
|
|
75
|
+
await stigmer.runner.delete(resourceId);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
toast.success(
|
|
79
|
+
resourceName
|
|
80
|
+
? `${resourceName} deleted`
|
|
81
|
+
: `${kindLabel(kind)} deleted`,
|
|
82
|
+
);
|
|
83
|
+
} catch (err) {
|
|
84
|
+
const wrapped = toError(err);
|
|
85
|
+
setError(wrapped);
|
|
86
|
+
toast.error(`Failed to delete ${kindLabel(kind)}`);
|
|
87
|
+
throw wrapped;
|
|
88
|
+
} finally {
|
|
89
|
+
setIsDeleting(false);
|
|
90
|
+
}
|
|
91
|
+
}, [stigmer, kind, resourceId, resourceName]);
|
|
92
|
+
|
|
93
|
+
return useMemo(
|
|
94
|
+
() => ({ deleteResource, isDeleting, error }),
|
|
95
|
+
[deleteResource, isDeleting, error],
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function kindLabel(kind: DeletableResourceKind): string {
|
|
100
|
+
switch (kind) {
|
|
101
|
+
case "agent":
|
|
102
|
+
return "agent";
|
|
103
|
+
case "skill":
|
|
104
|
+
return "skill";
|
|
105
|
+
case "mcpServer":
|
|
106
|
+
return "MCP server";
|
|
107
|
+
case "runner":
|
|
108
|
+
return "runner";
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo, useState } from "react";
|
|
4
|
+
import type { TabItem } from "../tabs/Tabs";
|
|
5
|
+
import type { AdditionalTab } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Return type for the internal detail tabs hook.
|
|
9
|
+
*
|
|
10
|
+
* When `effectiveTabs` is `undefined`, the consumer should NOT render
|
|
11
|
+
* a tab bar (single-tab suppression per DD-T05A-002).
|
|
12
|
+
*/
|
|
13
|
+
export interface UseDetailTabsReturn {
|
|
14
|
+
/** Tab items to pass to ResourceDetailShell. `undefined` = suppress tab bar. */
|
|
15
|
+
readonly effectiveTabs: readonly TabItem[] | undefined;
|
|
16
|
+
/** The currently active tab ID. */
|
|
17
|
+
readonly effectiveActiveTab: string;
|
|
18
|
+
/** Handler to pass to ResourceDetailShell's `onTabChange`. */
|
|
19
|
+
readonly effectiveOnTabChange: (tabId: string) => void;
|
|
20
|
+
/** The additional tab whose content should be rendered, or `undefined` if a built-in tab is active. */
|
|
21
|
+
readonly activeAdditionalTab: AdditionalTab | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface UseDetailTabsOptions {
|
|
25
|
+
/** Built-in tabs defined by the SDK component (e.g., [{ id: "overview", label: "Overview" }]). */
|
|
26
|
+
readonly builtInTabs: readonly TabItem[];
|
|
27
|
+
/** Consumer-provided extension tabs. */
|
|
28
|
+
readonly additionalTabs?: readonly AdditionalTab[];
|
|
29
|
+
/** Controlled active tab (enables controlled mode when paired with `onTabChange`). */
|
|
30
|
+
readonly activeTab?: string;
|
|
31
|
+
/** Controlled tab change handler (enables controlled mode when paired with `activeTab`). */
|
|
32
|
+
readonly onTabChange?: (tabId: string) => void;
|
|
33
|
+
/** Default tab to show when in uncontrolled mode. Defaults to the first built-in tab's ID. */
|
|
34
|
+
readonly defaultTab?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Internal hook that manages tab state for detail view components.
|
|
39
|
+
*
|
|
40
|
+
* Implements the uncontrolled-by-default / controlled-when-specified
|
|
41
|
+
* pattern (DD-T05A-001):
|
|
42
|
+
* - When both `activeTab` and `onTabChange` are provided, the component
|
|
43
|
+
* operates in controlled mode (consumer owns the state).
|
|
44
|
+
* - Otherwise, the component manages its own internal tab state.
|
|
45
|
+
*
|
|
46
|
+
* Single-tab suppression (DD-T05A-002):
|
|
47
|
+
* - When only one tab exists (no additionalTabs), `effectiveTabs` is
|
|
48
|
+
* `undefined` so the consumer skips rendering the tab bar entirely.
|
|
49
|
+
*/
|
|
50
|
+
export function useDetailTabs({
|
|
51
|
+
builtInTabs,
|
|
52
|
+
additionalTabs,
|
|
53
|
+
activeTab,
|
|
54
|
+
onTabChange,
|
|
55
|
+
defaultTab,
|
|
56
|
+
}: UseDetailTabsOptions): UseDetailTabsReturn {
|
|
57
|
+
const isControlled = activeTab !== undefined && onTabChange !== undefined;
|
|
58
|
+
|
|
59
|
+
const allTabs = useMemo<readonly TabItem[]>(() => {
|
|
60
|
+
if (!additionalTabs || additionalTabs.length === 0) return builtInTabs;
|
|
61
|
+
return [...builtInTabs, ...additionalTabs];
|
|
62
|
+
}, [builtInTabs, additionalTabs]);
|
|
63
|
+
|
|
64
|
+
const initialTab = defaultTab ?? builtInTabs[0]?.id ?? "";
|
|
65
|
+
const [internalTab, setInternalTab] = useState(initialTab);
|
|
66
|
+
|
|
67
|
+
const effectiveActiveTab = isControlled ? activeTab : internalTab;
|
|
68
|
+
|
|
69
|
+
const effectiveOnTabChange = useCallback(
|
|
70
|
+
(tabId: string) => {
|
|
71
|
+
if (isControlled) {
|
|
72
|
+
onTabChange(tabId);
|
|
73
|
+
} else {
|
|
74
|
+
setInternalTab(tabId);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
[isControlled, onTabChange],
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const effectiveTabs = allTabs.length > 1 ? allTabs : undefined;
|
|
81
|
+
|
|
82
|
+
const activeAdditionalTab = useMemo(() => {
|
|
83
|
+
if (!additionalTabs) return undefined;
|
|
84
|
+
return additionalTabs.find((t) => t.id === effectiveActiveTab);
|
|
85
|
+
}, [additionalTabs, effectiveActiveTab]);
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
effectiveTabs,
|
|
89
|
+
effectiveActiveTab,
|
|
90
|
+
effectiveOnTabChange,
|
|
91
|
+
activeAdditionalTab,
|
|
92
|
+
};
|
|
93
|
+
}
|