@stigmer/react 0.4.8 → 0.5.1
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/composer/ContextChip.d.ts +7 -2
- package/composer/ContextChip.d.ts.map +1 -1
- package/composer/ContextChip.js +2 -1
- package/composer/ContextChip.js.map +1 -1
- package/composer/SessionComposer.d.ts +11 -0
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +33 -4
- package/composer/SessionComposer.js.map +1 -1
- 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/environment/usePersonalEnvironment.d.ts.map +1 -1
- package/environment/usePersonalEnvironment.js +1 -0
- package/environment/usePersonalEnvironment.js.map +1 -1
- 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 +32 -12
- package/index.d.ts.map +1 -1
- package/index.js +30 -10
- 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 +33 -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/internal/useFetch.js +2 -2
- package/internal/useFetch.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 +235 -43
- 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/models/ModelRegistryContext.d.ts +2 -0
- package/models/ModelRegistryContext.d.ts.map +1 -1
- package/models/ModelRegistryContext.js +1 -0
- package/models/ModelRegistryContext.js.map +1 -1
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +2 -2
- package/models/ModelSelector.js.map +1 -1
- package/models/__tests__/useModelRegistry.test.js +4 -3
- package/models/__tests__/useModelRegistry.test.js.map +1 -1
- package/models/useModelRegistry.d.ts +2 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +3 -2
- package/models/useModelRegistry.js.map +1 -1
- package/package.json +8 -4
- package/provider.d.ts.map +1 -1
- package/provider.js +69 -22
- package/provider.js.map +1 -1
- 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/session/__tests__/session-spec-converters.test.d.ts +2 -0
- package/session/__tests__/session-spec-converters.test.d.ts.map +1 -0
- package/session/__tests__/session-spec-converters.test.js +162 -0
- package/session/__tests__/session-spec-converters.test.js.map +1 -0
- package/session/__tests__/useNewSessionFlow.test.js +2 -2
- package/session/__tests__/useNewSessionFlow.test.js.map +1 -1
- package/session/__tests__/usePersistedModel.test.js +1 -1
- package/session/__tests__/usePersistedModel.test.js.map +1 -1
- package/session/group-sessions.d.ts +17 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +46 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +4 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +2 -1
- package/session/index.js.map +1 -1
- package/session/session-spec-converters.d.ts +24 -0
- package/session/session-spec-converters.d.ts.map +1 -0
- package/session/session-spec-converters.js +72 -0
- package/session/session-spec-converters.js.map +1 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +1 -56
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts +5 -0
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +20 -6
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionSearch.d.ts +57 -0
- package/session/useSessionSearch.d.ts.map +1 -0
- package/session/useSessionSearch.js +94 -0
- package/session/useSessionSearch.js.map +1 -0
- 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/composer/ContextChip.tsx +20 -11
- package/src/composer/SessionComposer.tsx +52 -3
- 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/environment/usePersonalEnvironment.ts +1 -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 +275 -8
- package/src/inline-edit/InlineEditImage.tsx +208 -0
- package/src/inline-edit/InlineEditKeyValue.tsx +301 -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/internal/useFetch.ts +2 -2
- 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 +816 -155
- 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/models/ModelRegistryContext.ts +3 -0
- package/src/models/ModelSelector.tsx +25 -2
- package/src/models/__tests__/useModelRegistry.test.tsx +5 -3
- package/src/models/useModelRegistry.ts +5 -2
- package/src/provider.tsx +69 -18
- 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/session/__tests__/session-spec-converters.test.ts +185 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +2 -2
- package/src/session/__tests__/usePersistedModel.test.tsx +1 -1
- package/src/session/group-sessions.ts +65 -0
- package/src/session/index.ts +8 -2
- package/src/session/session-spec-converters.ts +86 -0
- package/src/session/useSessionConversation.ts +5 -64
- package/src/session/useSessionPageFlow.ts +28 -7
- package/src/session/useSessionSearch.ts +149 -0
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resource-creation/templates/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resource-creation/templates/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,uBAAuB;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { McpServerWizardData } from "../../mcp-server/steps/types";
|
|
2
|
+
import type { ResourceTemplate } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Built-in MCP server templates shipped with the SDK.
|
|
5
|
+
*
|
|
6
|
+
* Each template pre-fills the MCP server creation wizard with a
|
|
7
|
+
* curated transport configuration, environment variable declarations,
|
|
8
|
+
* and descriptive metadata. Users can customize every field after
|
|
9
|
+
* selection.
|
|
10
|
+
*
|
|
11
|
+
* Platform builders can pass their own template arrays to the
|
|
12
|
+
* gallery; these built-in templates are a convenience default.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MCP_SERVER_TEMPLATES: readonly ResourceTemplate<McpServerWizardData>[];
|
|
15
|
+
//# sourceMappingURL=mcp-server-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server-templates.d.ts","sourceRoot":"","sources":["../../../src/resource-creation/templates/mcp-server-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,CAAC,mBAAmB,CAAC,EA2F9E,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in MCP server templates shipped with the SDK.
|
|
3
|
+
*
|
|
4
|
+
* Each template pre-fills the MCP server creation wizard with a
|
|
5
|
+
* curated transport configuration, environment variable declarations,
|
|
6
|
+
* and descriptive metadata. Users can customize every field after
|
|
7
|
+
* selection.
|
|
8
|
+
*
|
|
9
|
+
* Platform builders can pass their own template arrays to the
|
|
10
|
+
* gallery; these built-in templates are a convenience default.
|
|
11
|
+
*/
|
|
12
|
+
export const MCP_SERVER_TEMPLATES = [
|
|
13
|
+
{
|
|
14
|
+
id: "github",
|
|
15
|
+
name: "GitHub",
|
|
16
|
+
description: "Connect to the GitHub API for repository management, issue tracking, pull requests, and code search.",
|
|
17
|
+
category: "integration",
|
|
18
|
+
tags: ["github", "git", "repository", "api", "code"],
|
|
19
|
+
data: {
|
|
20
|
+
name: "GitHub",
|
|
21
|
+
description: "GitHub API integration for repository management, issues, pull requests, and code search.",
|
|
22
|
+
transportType: "http",
|
|
23
|
+
httpUrl: "https://api.githubcopilot.com",
|
|
24
|
+
env: [
|
|
25
|
+
{
|
|
26
|
+
key: "GITHUB_TOKEN",
|
|
27
|
+
description: "GitHub personal access token with appropriate scopes.",
|
|
28
|
+
isSecret: true,
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "slack",
|
|
36
|
+
name: "Slack",
|
|
37
|
+
description: "Connect to the Slack API for sending messages, managing channels, and reading conversation history.",
|
|
38
|
+
category: "integration",
|
|
39
|
+
tags: ["slack", "messaging", "chat", "communication"],
|
|
40
|
+
data: {
|
|
41
|
+
name: "Slack",
|
|
42
|
+
description: "Slack API integration for messaging, channel management, and conversation history.",
|
|
43
|
+
transportType: "http",
|
|
44
|
+
httpUrl: "https://slack.com/api/mcp",
|
|
45
|
+
env: [
|
|
46
|
+
{
|
|
47
|
+
key: "SLACK_BOT_TOKEN",
|
|
48
|
+
description: "Slack Bot User OAuth token (xoxb-...).",
|
|
49
|
+
isSecret: true,
|
|
50
|
+
optional: false,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "postgresql",
|
|
57
|
+
name: "PostgreSQL",
|
|
58
|
+
description: "Connect to a PostgreSQL database for querying, schema inspection, and data management.",
|
|
59
|
+
category: "integration",
|
|
60
|
+
tags: ["postgres", "postgresql", "database", "sql", "data"],
|
|
61
|
+
data: {
|
|
62
|
+
name: "PostgreSQL",
|
|
63
|
+
description: "PostgreSQL database connection for querying, schema inspection, and data management.",
|
|
64
|
+
transportType: "stdio",
|
|
65
|
+
stdioCommand: "npx",
|
|
66
|
+
stdioArgs: "-y @modelcontextprotocol/server-postgres",
|
|
67
|
+
env: [
|
|
68
|
+
{
|
|
69
|
+
key: "DATABASE_URL",
|
|
70
|
+
description: "PostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db).",
|
|
71
|
+
isSecret: true,
|
|
72
|
+
optional: false,
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "filesystem",
|
|
79
|
+
name: "Filesystem",
|
|
80
|
+
description: "Provide read and write access to a local directory for file management and content operations.",
|
|
81
|
+
category: "general",
|
|
82
|
+
tags: ["filesystem", "files", "local", "directory"],
|
|
83
|
+
data: {
|
|
84
|
+
name: "Filesystem",
|
|
85
|
+
description: "Local filesystem access for reading, writing, and managing files within a directory.",
|
|
86
|
+
transportType: "stdio",
|
|
87
|
+
stdioCommand: "npx",
|
|
88
|
+
stdioArgs: "-y @modelcontextprotocol/server-filesystem /path/to/directory",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
//# sourceMappingURL=mcp-server-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server-templates.js","sourceRoot":"","sources":["../../../src/resource-creation/templates/mcp-server-templates.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B;IACE;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,sGAAsG;QACxG,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC;QACpD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;YAC7F,aAAa,EAAE,MAAM;YACrB,OAAO,EAAE,+BAA+B;YACxC,GAAG,EAAE;gBACH;oBACE,GAAG,EAAE,cAAc;oBACnB,WAAW,EACT,uDAAuD;oBACzD,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,KAAK;iBAChB;aACF;SACF;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EACT,qGAAqG;QACvG,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,CAAC;QACrD,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,WAAW,EACT,oFAAoF;YACtF,aAAa,EAAE,MAAM;YACrB,OAAO,EAAE,2BAA2B;YACpC,GAAG,EAAE;gBACH;oBACE,GAAG,EAAE,iBAAiB;oBACtB,WAAW,EAAE,wCAAwC;oBACrD,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,KAAK;iBAChB;aACF;SACF;KACF;IACD;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,wFAAwF;QAC1F,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC;QAC3D,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EACT,sFAAsF;YACxF,aAAa,EAAE,OAAO;YACtB,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,0CAA0C;YACrD,GAAG,EAAE;gBACH;oBACE,GAAG,EAAE,cAAc;oBACnB,WAAW,EACT,0EAA0E;oBAC5E,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,KAAK;iBAChB;aACF;SACF;KACF;IACD;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,gGAAgG;QAClG,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC;QACnD,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EACT,sFAAsF;YACxF,aAAa,EAAE,OAAO;YACtB,YAAY,EAAE,KAAK;YACnB,SAAS,EACP,+DAA+D;SAClE;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template categories for grouping resource templates in the gallery.
|
|
3
|
+
*
|
|
4
|
+
* Each category maps to a common use-case domain. The gallery renders
|
|
5
|
+
* these as filterable tabs. Platform builders can use the same
|
|
6
|
+
* categories or extend with custom values if they define their own
|
|
7
|
+
* template arrays.
|
|
8
|
+
*/
|
|
9
|
+
export type TemplateCategory = "customer-support" | "code-review" | "data-analysis" | "devops" | "content" | "integration" | "general";
|
|
10
|
+
/**
|
|
11
|
+
* Human-readable labels for template categories.
|
|
12
|
+
*
|
|
13
|
+
* Used by the gallery UI for tab labels and screen readers.
|
|
14
|
+
* Exported so platform builders can reuse or extend them.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TEMPLATE_CATEGORY_LABELS: Record<TemplateCategory, string>;
|
|
17
|
+
/**
|
|
18
|
+
* A pre-built resource configuration that seeds a creation wizard.
|
|
19
|
+
*
|
|
20
|
+
* Generic over `TData` — the wizard's accumulated form state type.
|
|
21
|
+
* For agents, `TData` is `AgentWizardData`; for MCP servers,
|
|
22
|
+
* `TData` is `McpServerWizardData`.
|
|
23
|
+
*
|
|
24
|
+
* `data` is `Partial<TData>`: only the fields the template wants to
|
|
25
|
+
* pre-fill. The wizard merges this with its default empty state via
|
|
26
|
+
* `{ ...createInitialWizardData(), ...template.data }`.
|
|
27
|
+
*
|
|
28
|
+
* @typeParam TData - The wizard's accumulated form data shape.
|
|
29
|
+
*/
|
|
30
|
+
export interface ResourceTemplate<TData> {
|
|
31
|
+
/** Stable template identifier (unique within a resource kind). */
|
|
32
|
+
readonly id: string;
|
|
33
|
+
/** Human-readable template name displayed in the gallery card. */
|
|
34
|
+
readonly name: string;
|
|
35
|
+
/** Short description of what this template sets up. */
|
|
36
|
+
readonly description: string;
|
|
37
|
+
/** Category for gallery filtering. */
|
|
38
|
+
readonly category: TemplateCategory;
|
|
39
|
+
/** Searchable tags for the gallery's text search. */
|
|
40
|
+
readonly tags?: readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* Partial wizard data to merge with defaults when the user
|
|
43
|
+
* selects this template. Only fields that the template wants
|
|
44
|
+
* to pre-fill are included.
|
|
45
|
+
*/
|
|
46
|
+
readonly data: Partial<TData>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/resource-creation/templates/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,QAAQ,GACR,SAAS,GACT,aAAa,GACb,SAAS,CAAC;AAEd;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAQrE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK;IACrC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,qDAAqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-readable labels for template categories.
|
|
3
|
+
*
|
|
4
|
+
* Used by the gallery UI for tab labels and screen readers.
|
|
5
|
+
* Exported so platform builders can reuse or extend them.
|
|
6
|
+
*/
|
|
7
|
+
export const TEMPLATE_CATEGORY_LABELS = {
|
|
8
|
+
"customer-support": "Customer Support",
|
|
9
|
+
"code-review": "Code Review",
|
|
10
|
+
"data-analysis": "Data Analysis",
|
|
11
|
+
devops: "DevOps",
|
|
12
|
+
content: "Content",
|
|
13
|
+
integration: "Integration",
|
|
14
|
+
general: "General",
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/resource-creation/templates/types.ts"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAqC;IACxE,kBAAkB,EAAE,kBAAkB;IACtC,aAAa,EAAE,aAAa;IAC5B,eAAe,EAAE,eAAe;IAChC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** A single env var declaration entry in a wizard form. */
|
|
3
|
+
export interface EnvVarEntry {
|
|
4
|
+
/** Environment variable name (e.g. GITHUB_TOKEN). */
|
|
5
|
+
readonly key: string;
|
|
6
|
+
/** Human-readable description. */
|
|
7
|
+
readonly description: string;
|
|
8
|
+
/** Whether this variable holds a secret value. */
|
|
9
|
+
readonly isSecret: boolean;
|
|
10
|
+
/** Whether the variable is optional. */
|
|
11
|
+
readonly optional: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** A generic key-value pair entry for wizard forms (e.g. HTTP headers). */
|
|
14
|
+
export interface KeyValueEntry {
|
|
15
|
+
/** The key (e.g. header name). */
|
|
16
|
+
readonly key: string;
|
|
17
|
+
/** The value (e.g. header value). */
|
|
18
|
+
readonly value: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Defines a wizard step's metadata and validation logic.
|
|
22
|
+
*
|
|
23
|
+
* Generic over `TData` — the accumulated form state type that flows
|
|
24
|
+
* through all steps. Each step's `validate` function receives the full
|
|
25
|
+
* accumulated state and returns an error message or `null` if valid.
|
|
26
|
+
*
|
|
27
|
+
* @typeParam TData - Shape of the wizard's accumulated form data.
|
|
28
|
+
*/
|
|
29
|
+
export interface WizardStepDef<TData> {
|
|
30
|
+
/** Stable step identifier (used as key and for navigation). */
|
|
31
|
+
readonly id: string;
|
|
32
|
+
/** Human-readable step label displayed in the step indicator. */
|
|
33
|
+
readonly label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Validates the current data before allowing navigation to the next step.
|
|
36
|
+
* Returns a descriptive error string if invalid, or `null` if the step
|
|
37
|
+
* passes validation.
|
|
38
|
+
*
|
|
39
|
+
* When omitted, the step is always considered valid.
|
|
40
|
+
*/
|
|
41
|
+
readonly validate?: (data: TData) => string | null;
|
|
42
|
+
}
|
|
43
|
+
/** Internal state shape for the wizard reducer. */
|
|
44
|
+
export interface WizardState<TData> {
|
|
45
|
+
/** Zero-based index of the currently active step. */
|
|
46
|
+
readonly currentStepIndex: number;
|
|
47
|
+
/** Accumulated form data across all steps. */
|
|
48
|
+
readonly data: TData;
|
|
49
|
+
/** Validation error for the current step, or `null` when valid. */
|
|
50
|
+
readonly validationError: string | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props for {@link WizardShell} — the resource-agnostic wizard layout.
|
|
54
|
+
*
|
|
55
|
+
* Renders a step indicator, content area, and navigation footer.
|
|
56
|
+
* The content for each step is provided via `children` — the wizard
|
|
57
|
+
* shell does not know about step-specific rendering.
|
|
58
|
+
*/
|
|
59
|
+
export interface WizardShellProps {
|
|
60
|
+
/** Step definitions for the progress indicator (only `id` and `label` are used for rendering). */
|
|
61
|
+
readonly steps: readonly {
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly label: string;
|
|
64
|
+
}[];
|
|
65
|
+
/** Zero-based index of the currently active step. */
|
|
66
|
+
readonly currentStepIndex: number;
|
|
67
|
+
/** Content to render in the main area (the active step's UI). */
|
|
68
|
+
readonly children: ReactNode;
|
|
69
|
+
/** Label for the final step's action button (e.g. "Create agent"). */
|
|
70
|
+
readonly submitLabel: string;
|
|
71
|
+
/** Whether the submit action is currently in progress. */
|
|
72
|
+
readonly isSubmitting?: boolean;
|
|
73
|
+
/** Whether the "Next" / submit button should be disabled. */
|
|
74
|
+
readonly canGoNext?: boolean;
|
|
75
|
+
/** Whether the "Back" button should be shown. */
|
|
76
|
+
readonly canGoBack?: boolean;
|
|
77
|
+
/** Called when the user clicks "Next" or the submit button. */
|
|
78
|
+
readonly onNext: () => void;
|
|
79
|
+
/** Called when the user clicks "Back". */
|
|
80
|
+
readonly onBack: () => void;
|
|
81
|
+
/** Called when a completed step is clicked in the indicator (backward jump). */
|
|
82
|
+
readonly onGoToStep?: (index: number) => void;
|
|
83
|
+
/** Called when the user cancels the wizard entirely. */
|
|
84
|
+
readonly onCancel?: () => void;
|
|
85
|
+
/** Additional CSS classes for the root container. */
|
|
86
|
+
readonly className?: string;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/resource-creation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC;CACpD;AAMD,mDAAmD;AACnD,MAAM,WAAW,WAAW,CAAC,KAAK;IAChC,qDAAqD;IACrD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAMD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3E,qDAAqD;IACrD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/resource-creation/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ResourceTemplate, TemplateCategory } from "./templates/types";
|
|
2
|
+
/** Options for {@link useTemplateFilter}. */
|
|
3
|
+
export interface UseTemplateFilterOptions<TData> {
|
|
4
|
+
/** The full set of templates to filter. */
|
|
5
|
+
readonly templates: readonly ResourceTemplate<TData>[];
|
|
6
|
+
}
|
|
7
|
+
/** Return value of {@link useTemplateFilter}. */
|
|
8
|
+
export interface UseTemplateFilterReturn<TData> {
|
|
9
|
+
/** Templates matching the current search query and active category. */
|
|
10
|
+
readonly filtered: readonly ResourceTemplate<TData>[];
|
|
11
|
+
/** Current search query string. */
|
|
12
|
+
readonly query: string;
|
|
13
|
+
/** Update the search query. */
|
|
14
|
+
readonly setQuery: (query: string) => void;
|
|
15
|
+
/** Currently active category filter, or `null` for "All". */
|
|
16
|
+
readonly activeCategory: TemplateCategory | null;
|
|
17
|
+
/** Set the active category filter. Pass `null` to show all. */
|
|
18
|
+
readonly setActiveCategory: (category: TemplateCategory | null) => void;
|
|
19
|
+
/** Deduplicated, sorted list of categories present in the template set. */
|
|
20
|
+
readonly availableCategories: readonly TemplateCategory[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Headless hook for filtering and searching a set of resource templates.
|
|
24
|
+
*
|
|
25
|
+
* Provides category tab state, text search across name/description/tags,
|
|
26
|
+
* and the filtered result set. Fully memoized — only recalculates when
|
|
27
|
+
* inputs change.
|
|
28
|
+
*
|
|
29
|
+
* Platform builders can use this hook with their own rendering; the
|
|
30
|
+
* styled `TemplateGallery` component uses it internally.
|
|
31
|
+
*
|
|
32
|
+
* @typeParam TData - The wizard data shape (e.g. `AgentWizardData`).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const { filtered, query, setQuery, activeCategory, setActiveCategory, availableCategories } =
|
|
37
|
+
* useTemplateFilter({ templates: AGENT_TEMPLATES });
|
|
38
|
+
*
|
|
39
|
+
* // Render your own gallery UI using `filtered`
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function useTemplateFilter<TData>(options: UseTemplateFilterOptions<TData>): UseTemplateFilterReturn<TData>;
|
|
43
|
+
//# sourceMappingURL=useTemplateFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTemplateFilter.d.ts","sourceRoot":"","sources":["../../src/resource-creation/useTemplateFilter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAM5E,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB,CAAC,KAAK;IAC7C,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;CACxD;AAED,iDAAiD;AACjD,MAAM,WAAW,uBAAuB,CAAC,KAAK;IAC5C,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;IACtD,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,QAAQ,CAAC,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IACxE,2EAA2E;IAC3E,QAAQ,CAAC,mBAAmB,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC3D;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,OAAO,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvC,uBAAuB,CAAC,KAAK,CAAC,CA2DhC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Hook
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* Headless hook for filtering and searching a set of resource templates.
|
|
8
|
+
*
|
|
9
|
+
* Provides category tab state, text search across name/description/tags,
|
|
10
|
+
* and the filtered result set. Fully memoized — only recalculates when
|
|
11
|
+
* inputs change.
|
|
12
|
+
*
|
|
13
|
+
* Platform builders can use this hook with their own rendering; the
|
|
14
|
+
* styled `TemplateGallery` component uses it internally.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam TData - The wizard data shape (e.g. `AgentWizardData`).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const { filtered, query, setQuery, activeCategory, setActiveCategory, availableCategories } =
|
|
21
|
+
* useTemplateFilter({ templates: AGENT_TEMPLATES });
|
|
22
|
+
*
|
|
23
|
+
* // Render your own gallery UI using `filtered`
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export function useTemplateFilter(options) {
|
|
27
|
+
const { templates } = options;
|
|
28
|
+
const [query, setQueryRaw] = useState("");
|
|
29
|
+
const [activeCategory, setActiveCategory] = useState(null);
|
|
30
|
+
const setQuery = useCallback((q) => {
|
|
31
|
+
setQueryRaw(q);
|
|
32
|
+
}, []);
|
|
33
|
+
const availableCategories = useMemo(() => {
|
|
34
|
+
const seen = new Set();
|
|
35
|
+
for (const t of templates) {
|
|
36
|
+
seen.add(t.category);
|
|
37
|
+
}
|
|
38
|
+
const sorted = [...seen].sort();
|
|
39
|
+
return sorted;
|
|
40
|
+
}, [templates]);
|
|
41
|
+
const filtered = useMemo(() => {
|
|
42
|
+
let result = templates;
|
|
43
|
+
if (activeCategory) {
|
|
44
|
+
result = result.filter((t) => t.category === activeCategory);
|
|
45
|
+
}
|
|
46
|
+
const trimmed = query.trim().toLowerCase();
|
|
47
|
+
if (trimmed) {
|
|
48
|
+
result = result.filter((t) => {
|
|
49
|
+
const haystack = [t.name, t.description, ...(t.tags ?? [])]
|
|
50
|
+
.join(" ")
|
|
51
|
+
.toLowerCase();
|
|
52
|
+
return haystack.includes(trimmed);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}, [templates, activeCategory, query]);
|
|
57
|
+
return useMemo(() => ({
|
|
58
|
+
filtered,
|
|
59
|
+
query,
|
|
60
|
+
setQuery,
|
|
61
|
+
activeCategory,
|
|
62
|
+
setActiveCategory,
|
|
63
|
+
availableCategories,
|
|
64
|
+
}), [
|
|
65
|
+
filtered,
|
|
66
|
+
query,
|
|
67
|
+
setQuery,
|
|
68
|
+
activeCategory,
|
|
69
|
+
setActiveCategory,
|
|
70
|
+
availableCategories,
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=useTemplateFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTemplateFilter.js","sourceRoot":"","sources":["../../src/resource-creation/useTemplateFilter.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA6BvD,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAAwC;IAExC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAE9B,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,IAAI,CACL,CAAC;IAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE;QACzC,WAAW,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;QACzC,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,IAAI,MAAM,GAAuC,SAAS,CAAC;QAE3D,IAAI,cAAc,EAAE,CAAC;YACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,cAAc,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;qBACxD,IAAI,CAAC,GAAG,CAAC;qBACT,WAAW,EAAE,CAAC;gBACjB,OAAO,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvC,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,cAAc;QACd,iBAAiB;QACjB,mBAAmB;KACpB,CAAC,EACF;QACE,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,cAAc;QACd,iBAAiB;QACjB,mBAAmB;KACpB,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { WizardStepDef } from "./types";
|
|
2
|
+
/** Options for {@link useWizardState}. */
|
|
3
|
+
export interface UseWizardStateOptions<TData> {
|
|
4
|
+
/** Ordered step definitions — determines wizard length and validation. */
|
|
5
|
+
readonly steps: readonly WizardStepDef<TData>[];
|
|
6
|
+
/** Initial form data (empty/default values for all fields). */
|
|
7
|
+
readonly initialData: TData;
|
|
8
|
+
}
|
|
9
|
+
/** Return value of {@link useWizardState}. */
|
|
10
|
+
export interface UseWizardStateReturn<TData> {
|
|
11
|
+
/** Zero-based index of the current step. */
|
|
12
|
+
readonly currentStepIndex: number;
|
|
13
|
+
/** Definition of the current step. */
|
|
14
|
+
readonly currentStep: WizardStepDef<TData>;
|
|
15
|
+
/** Accumulated form data across all steps. */
|
|
16
|
+
readonly data: TData;
|
|
17
|
+
/** Merges a partial update into the accumulated data. */
|
|
18
|
+
readonly updateData: (partial: Partial<TData>) => void;
|
|
19
|
+
/** Whether navigation forward is allowed (current step is valid). */
|
|
20
|
+
readonly canGoNext: boolean;
|
|
21
|
+
/** Whether navigation backward is possible (not on first step). */
|
|
22
|
+
readonly canGoBack: boolean;
|
|
23
|
+
/** Advance to the next step (validates current step first). */
|
|
24
|
+
readonly goNext: () => void;
|
|
25
|
+
/** Return to the previous step. */
|
|
26
|
+
readonly goBack: () => void;
|
|
27
|
+
/** Jump directly to a specific step (only allows going backward). */
|
|
28
|
+
readonly goToStep: (index: number) => void;
|
|
29
|
+
/** Validation error for the current step, or `null`. */
|
|
30
|
+
readonly validationError: string | null;
|
|
31
|
+
/** `true` when on the first step. */
|
|
32
|
+
readonly isFirstStep: boolean;
|
|
33
|
+
/** `true` when on the last step. */
|
|
34
|
+
readonly isLastStep: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Headless state machine for multi-step wizard flows.
|
|
38
|
+
*
|
|
39
|
+
* Manages step navigation, per-step validation gating, and accumulated
|
|
40
|
+
* form data. Generic over the data shape — each wizard defines its own
|
|
41
|
+
* `TData` type with fields for all steps.
|
|
42
|
+
*
|
|
43
|
+
* Navigation forward is gated by the current step's `validate` function.
|
|
44
|
+
* Navigation backward is always allowed. Direct step jumps only go backward
|
|
45
|
+
* (prevents skipping required steps).
|
|
46
|
+
*
|
|
47
|
+
* Follows the `useReducer` + discriminated union pattern established
|
|
48
|
+
* by `agentSetupReducer` — pure state transitions, imperative API on top.
|
|
49
|
+
*
|
|
50
|
+
* @typeParam TData - Accumulated form data shape.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* const wizard = useWizardState({
|
|
55
|
+
* steps: [
|
|
56
|
+
* { id: "basics", label: "Basics", validate: (d) => d.name ? null : "Name is required" },
|
|
57
|
+
* { id: "review", label: "Review" },
|
|
58
|
+
* ],
|
|
59
|
+
* initialData: { name: "", description: "" },
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* // wizard.data.name, wizard.updateData({ name: "My Agent" })
|
|
63
|
+
* // wizard.goNext(), wizard.goBack()
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function useWizardState<TData>(options: UseWizardStateOptions<TData>): UseWizardStateReturn<TData>;
|
|
67
|
+
//# sourceMappingURL=useWizardState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWizardState.d.ts","sourceRoot":"","sources":["../../src/resource-creation/useWizardState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AAM1D,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB,CAAC,KAAK;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC;CAC7B;AAED,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,4CAA4C;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,sCAAsC;IACtC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACvD,qEAAqE;IACrE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,wDAAwD;IACxD,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,oCAAoC;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AA+ED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAClC,OAAO,EAAE,qBAAqB,CAAC,KAAK,CAAC,GACpC,oBAAoB,CAAC,KAAK,CAAC,CAoE7B"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useReducer } from "react";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Reducer
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
function createReducer(steps) {
|
|
7
|
+
return function wizardReducer(state, action) {
|
|
8
|
+
switch (action.type) {
|
|
9
|
+
case "GO_NEXT": {
|
|
10
|
+
const step = steps[state.currentStepIndex];
|
|
11
|
+
const error = step?.validate?.(state.data) ?? null;
|
|
12
|
+
if (error) {
|
|
13
|
+
return { ...state, validationError: error };
|
|
14
|
+
}
|
|
15
|
+
const nextIndex = Math.min(state.currentStepIndex + 1, steps.length - 1);
|
|
16
|
+
return {
|
|
17
|
+
...state,
|
|
18
|
+
currentStepIndex: nextIndex,
|
|
19
|
+
validationError: null,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
case "GO_BACK": {
|
|
23
|
+
const prevIndex = Math.max(state.currentStepIndex - 1, 0);
|
|
24
|
+
return {
|
|
25
|
+
...state,
|
|
26
|
+
currentStepIndex: prevIndex,
|
|
27
|
+
validationError: null,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
case "GO_TO_STEP": {
|
|
31
|
+
if (action.index < 0 || action.index >= steps.length)
|
|
32
|
+
return state;
|
|
33
|
+
if (action.index >= state.currentStepIndex)
|
|
34
|
+
return state;
|
|
35
|
+
return {
|
|
36
|
+
...state,
|
|
37
|
+
currentStepIndex: action.index,
|
|
38
|
+
validationError: null,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
case "UPDATE_DATA":
|
|
42
|
+
return {
|
|
43
|
+
...state,
|
|
44
|
+
data: { ...state.data, ...action.partial },
|
|
45
|
+
validationError: null,
|
|
46
|
+
};
|
|
47
|
+
case "SET_VALIDATION_ERROR":
|
|
48
|
+
return { ...state, validationError: action.error };
|
|
49
|
+
default:
|
|
50
|
+
return state;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
// Hook
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
/**
|
|
58
|
+
* Headless state machine for multi-step wizard flows.
|
|
59
|
+
*
|
|
60
|
+
* Manages step navigation, per-step validation gating, and accumulated
|
|
61
|
+
* form data. Generic over the data shape — each wizard defines its own
|
|
62
|
+
* `TData` type with fields for all steps.
|
|
63
|
+
*
|
|
64
|
+
* Navigation forward is gated by the current step's `validate` function.
|
|
65
|
+
* Navigation backward is always allowed. Direct step jumps only go backward
|
|
66
|
+
* (prevents skipping required steps).
|
|
67
|
+
*
|
|
68
|
+
* Follows the `useReducer` + discriminated union pattern established
|
|
69
|
+
* by `agentSetupReducer` — pure state transitions, imperative API on top.
|
|
70
|
+
*
|
|
71
|
+
* @typeParam TData - Accumulated form data shape.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* const wizard = useWizardState({
|
|
76
|
+
* steps: [
|
|
77
|
+
* { id: "basics", label: "Basics", validate: (d) => d.name ? null : "Name is required" },
|
|
78
|
+
* { id: "review", label: "Review" },
|
|
79
|
+
* ],
|
|
80
|
+
* initialData: { name: "", description: "" },
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* // wizard.data.name, wizard.updateData({ name: "My Agent" })
|
|
84
|
+
* // wizard.goNext(), wizard.goBack()
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export function useWizardState(options) {
|
|
88
|
+
const { steps, initialData } = options;
|
|
89
|
+
const reducer = useMemo(() => createReducer(steps), [steps]);
|
|
90
|
+
const [state, dispatch] = useReducer(reducer, {
|
|
91
|
+
currentStepIndex: 0,
|
|
92
|
+
data: initialData,
|
|
93
|
+
validationError: null,
|
|
94
|
+
});
|
|
95
|
+
const currentStep = steps[state.currentStepIndex];
|
|
96
|
+
const isFirstStep = state.currentStepIndex === 0;
|
|
97
|
+
const isLastStep = state.currentStepIndex === steps.length - 1;
|
|
98
|
+
const canGoNext = useMemo(() => {
|
|
99
|
+
const error = currentStep.validate?.(state.data) ?? null;
|
|
100
|
+
return error === null;
|
|
101
|
+
}, [currentStep, state.data]);
|
|
102
|
+
const canGoBack = !isFirstStep;
|
|
103
|
+
const goNext = useCallback(() => {
|
|
104
|
+
dispatch({ type: "GO_NEXT" });
|
|
105
|
+
}, []);
|
|
106
|
+
const goBack = useCallback(() => {
|
|
107
|
+
dispatch({ type: "GO_BACK" });
|
|
108
|
+
}, []);
|
|
109
|
+
const goToStep = useCallback((index) => {
|
|
110
|
+
dispatch({ type: "GO_TO_STEP", index });
|
|
111
|
+
}, []);
|
|
112
|
+
const updateData = useCallback((partial) => {
|
|
113
|
+
dispatch({ type: "UPDATE_DATA", partial });
|
|
114
|
+
}, []);
|
|
115
|
+
return useMemo(() => ({
|
|
116
|
+
currentStepIndex: state.currentStepIndex,
|
|
117
|
+
currentStep,
|
|
118
|
+
data: state.data,
|
|
119
|
+
updateData,
|
|
120
|
+
canGoNext,
|
|
121
|
+
canGoBack,
|
|
122
|
+
goNext,
|
|
123
|
+
goBack,
|
|
124
|
+
goToStep,
|
|
125
|
+
validationError: state.validationError,
|
|
126
|
+
isFirstStep,
|
|
127
|
+
isLastStep,
|
|
128
|
+
}), [
|
|
129
|
+
state.currentStepIndex,
|
|
130
|
+
state.data,
|
|
131
|
+
state.validationError,
|
|
132
|
+
currentStep,
|
|
133
|
+
canGoNext,
|
|
134
|
+
canGoBack,
|
|
135
|
+
isFirstStep,
|
|
136
|
+
isLastStep,
|
|
137
|
+
updateData,
|
|
138
|
+
goNext,
|
|
139
|
+
goBack,
|
|
140
|
+
goToStep,
|
|
141
|
+
]);
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=useWizardState.js.map
|