@stigmer/react 0.0.36 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -88
- package/__tests__/hooks.test.d.ts +2 -0
- package/__tests__/hooks.test.d.ts.map +1 -0
- package/__tests__/hooks.test.js +18 -0
- package/__tests__/hooks.test.js.map +1 -0
- package/agent/AgentDetailView.d.ts +80 -0
- package/agent/AgentDetailView.d.ts.map +1 -0
- package/agent/AgentDetailView.js +184 -0
- package/agent/AgentDetailView.js.map +1 -0
- package/agent/AgentEnvForm.d.ts +83 -0
- package/agent/AgentEnvForm.d.ts.map +1 -0
- package/agent/AgentEnvForm.js +31 -0
- package/agent/AgentEnvForm.js.map +1 -0
- package/agent/AgentPicker.d.ts +44 -0
- package/agent/AgentPicker.d.ts.map +1 -0
- package/agent/AgentPicker.js +121 -0
- package/agent/AgentPicker.js.map +1 -0
- package/agent/agentSetupReducer.d.ts +123 -0
- package/agent/agentSetupReducer.d.ts.map +1 -0
- package/agent/agentSetupReducer.js +86 -0
- package/agent/agentSetupReducer.js.map +1 -0
- package/agent/index.d.ts +19 -8
- package/agent/index.d.ts.map +1 -1
- package/agent/index.js +10 -6
- package/agent/index.js.map +1 -1
- package/agent/useAgent.d.ts +48 -0
- package/agent/useAgent.d.ts.map +1 -0
- package/agent/useAgent.js +82 -0
- package/agent/useAgent.js.map +1 -0
- package/agent/useAgentCount.d.ts +49 -0
- package/agent/useAgentCount.d.ts.map +1 -0
- package/agent/useAgentCount.js +32 -0
- package/agent/useAgentCount.js.map +1 -0
- package/agent/useAgentList.d.ts +62 -0
- package/agent/useAgentList.d.ts.map +1 -0
- package/agent/useAgentList.js +38 -0
- package/agent/useAgentList.js.map +1 -0
- package/agent/useAgentSearch.d.ts +23 -0
- package/agent/useAgentSearch.d.ts.map +1 -0
- package/agent/useAgentSearch.js +28 -0
- package/agent/useAgentSearch.js.map +1 -0
- package/agent/useAgentSetup.d.ts +115 -0
- package/agent/useAgentSetup.d.ts.map +1 -0
- package/agent/useAgentSetup.js +279 -0
- package/agent/useAgentSetup.js.map +1 -0
- package/agent/useDefaultAgent.d.ts +29 -0
- package/agent/useDefaultAgent.d.ts.map +1 -0
- package/agent/useDefaultAgent.js +60 -0
- package/agent/useDefaultAgent.js.map +1 -0
- package/agent-instance/buildPersonalInstanceInput.d.ts +20 -0
- package/agent-instance/buildPersonalInstanceInput.d.ts.map +1 -0
- package/agent-instance/buildPersonalInstanceInput.js +29 -0
- package/agent-instance/buildPersonalInstanceInput.js.map +1 -0
- package/agent-instance/index.d.ts +9 -0
- package/agent-instance/index.d.ts.map +1 -0
- package/agent-instance/index.js +5 -0
- package/agent-instance/index.js.map +1 -0
- package/agent-instance/useAgentInstance.d.ts +35 -0
- package/agent-instance/useAgentInstance.d.ts.map +1 -0
- package/agent-instance/useAgentInstance.js +67 -0
- package/agent-instance/useAgentInstance.js.map +1 -0
- package/agent-instance/useAgentInstanceList.d.ts +29 -0
- package/agent-instance/useAgentInstanceList.d.ts.map +1 -0
- package/agent-instance/useAgentInstanceList.js +74 -0
- package/agent-instance/useAgentInstanceList.js.map +1 -0
- package/agent-instance/useCreateAgentInstance.d.ts +44 -0
- package/agent-instance/useCreateAgentInstance.d.ts.map +1 -0
- package/agent-instance/useCreateAgentInstance.js +60 -0
- package/agent-instance/useCreateAgentInstance.js.map +1 -0
- package/agent-instance/usePersonalAgentInstance.d.ts +93 -0
- package/agent-instance/usePersonalAgentInstance.d.ts.map +1 -0
- package/agent-instance/usePersonalAgentInstance.js +103 -0
- package/agent-instance/usePersonalAgentInstance.js.map +1 -0
- package/api-key/ApiKeyCreatedAlert.d.ts +33 -0
- package/api-key/ApiKeyCreatedAlert.d.ts.map +1 -0
- package/api-key/ApiKeyCreatedAlert.js +61 -0
- package/api-key/ApiKeyCreatedAlert.js.map +1 -0
- package/api-key/ApiKeyListPanel.d.ts +30 -0
- package/api-key/ApiKeyListPanel.d.ts.map +1 -0
- package/api-key/ApiKeyListPanel.js +126 -0
- package/api-key/ApiKeyListPanel.js.map +1 -0
- package/api-key/CreateApiKeyForm.d.ts +35 -0
- package/api-key/CreateApiKeyForm.d.ts.map +1 -0
- package/api-key/CreateApiKeyForm.js +81 -0
- package/api-key/CreateApiKeyForm.js.map +1 -0
- package/api-key/index.d.ts +13 -0
- package/api-key/index.d.ts.map +1 -0
- package/api-key/index.js +7 -0
- package/api-key/index.js.map +1 -0
- package/api-key/useApiKeyList.d.ts +28 -0
- package/api-key/useApiKeyList.d.ts.map +1 -0
- package/api-key/useApiKeyList.js +52 -0
- package/api-key/useApiKeyList.js.map +1 -0
- package/api-key/useCreateApiKey.d.ts +40 -0
- package/api-key/useCreateApiKey.d.ts.map +1 -0
- package/api-key/useCreateApiKey.js +56 -0
- package/api-key/useCreateApiKey.js.map +1 -0
- package/api-key/useDeleteApiKey.d.ts +26 -0
- package/api-key/useDeleteApiKey.d.ts.map +1 -0
- package/api-key/useDeleteApiKey.js +43 -0
- package/api-key/useDeleteApiKey.js.map +1 -0
- package/attachment/AttachmentChipList.d.ts +24 -0
- package/attachment/AttachmentChipList.d.ts.map +1 -0
- package/attachment/AttachmentChipList.js +45 -0
- package/attachment/AttachmentChipList.js.map +1 -0
- package/attachment/attachment-utils.d.ts +32 -0
- package/attachment/attachment-utils.d.ts.map +1 -0
- package/attachment/attachment-utils.js +104 -0
- package/attachment/attachment-utils.js.map +1 -0
- package/attachment/index.d.ts +6 -0
- package/attachment/index.d.ts.map +1 -0
- package/attachment/index.js +4 -0
- package/attachment/index.js.map +1 -0
- package/attachment/useAttachments.d.ts +113 -0
- package/attachment/useAttachments.d.ts.map +1 -0
- package/attachment/useAttachments.js +175 -0
- package/attachment/useAttachments.js.map +1 -0
- package/composer/ComposerToolbar.d.ts +37 -0
- package/composer/ComposerToolbar.d.ts.map +1 -0
- package/composer/ComposerToolbar.js +24 -0
- package/composer/ComposerToolbar.js.map +1 -0
- package/composer/ConfigureMenu.d.ts +37 -0
- package/composer/ConfigureMenu.d.ts.map +1 -0
- package/composer/ConfigureMenu.js +53 -0
- package/composer/ConfigureMenu.js.map +1 -0
- package/composer/ContextChip.d.ts +22 -0
- package/composer/ContextChip.d.ts.map +1 -0
- package/composer/ContextChip.js +19 -0
- package/composer/ContextChip.js.map +1 -0
- package/composer/ContextPopover.d.ts +10 -0
- package/composer/ContextPopover.d.ts.map +1 -0
- package/composer/ContextPopover.js +11 -0
- package/composer/ContextPopover.js.map +1 -0
- package/composer/SessionComposer.d.ts +269 -0
- package/composer/SessionComposer.d.ts.map +1 -0
- package/composer/SessionComposer.js +580 -0
- package/composer/SessionComposer.js.map +1 -0
- package/composer/icons.d.ts +15 -0
- package/composer/icons.d.ts.map +1 -0
- package/composer/icons.js +42 -0
- package/composer/icons.js.map +1 -0
- package/composer/index.d.ts +5 -0
- package/composer/index.d.ts.map +1 -0
- package/composer/index.js +3 -0
- package/composer/index.js.map +1 -0
- package/composer/useComposer.d.ts +74 -0
- package/composer/useComposer.d.ts.map +1 -0
- package/composer/useComposer.js +94 -0
- package/composer/useComposer.js.map +1 -0
- package/environment/CreateEnvironmentForm.d.ts +31 -0
- package/environment/CreateEnvironmentForm.d.ts.map +1 -0
- package/environment/CreateEnvironmentForm.js +57 -0
- package/environment/CreateEnvironmentForm.js.map +1 -0
- package/environment/EnvVarForm.d.ts +134 -0
- package/environment/EnvVarForm.d.ts.map +1 -0
- package/environment/EnvVarForm.js +122 -0
- package/environment/EnvVarForm.js.map +1 -0
- package/environment/EnvironmentListPanel.d.ts +51 -0
- package/environment/EnvironmentListPanel.d.ts.map +1 -0
- package/environment/EnvironmentListPanel.js +96 -0
- package/environment/EnvironmentListPanel.js.map +1 -0
- package/environment/EnvironmentVariableEditor.d.ts +43 -0
- package/environment/EnvironmentVariableEditor.d.ts.map +1 -0
- package/environment/EnvironmentVariableEditor.js +269 -0
- package/environment/EnvironmentVariableEditor.js.map +1 -0
- package/environment/diffEnvSpec.d.ts +34 -0
- package/environment/diffEnvSpec.d.ts.map +1 -0
- package/environment/diffEnvSpec.js +44 -0
- package/environment/diffEnvSpec.js.map +1 -0
- package/environment/index.d.ts +28 -0
- package/environment/index.d.ts.map +1 -0
- package/environment/index.js +15 -0
- package/environment/index.js.map +1 -0
- package/environment/useCreateEnvironment.d.ts +43 -0
- package/environment/useCreateEnvironment.d.ts.map +1 -0
- package/environment/useCreateEnvironment.js +59 -0
- package/environment/useCreateEnvironment.js.map +1 -0
- package/environment/useEnvironment.d.ts +37 -0
- package/environment/useEnvironment.d.ts.map +1 -0
- package/environment/useEnvironment.js +69 -0
- package/environment/useEnvironment.js.map +1 -0
- package/environment/useEnvironmentList.d.ts +31 -0
- package/environment/useEnvironmentList.d.ts.map +1 -0
- package/environment/useEnvironmentList.js +88 -0
- package/environment/useEnvironmentList.js.map +1 -0
- package/environment/usePersonalEnvironment.d.ts +100 -0
- package/environment/usePersonalEnvironment.d.ts.map +1 -0
- package/environment/usePersonalEnvironment.js +168 -0
- package/environment/usePersonalEnvironment.js.map +1 -0
- package/environment/useRemoveEnvironmentVariables.d.ts +45 -0
- package/environment/useRemoveEnvironmentVariables.d.ts.map +1 -0
- package/environment/useRemoveEnvironmentVariables.js +57 -0
- package/environment/useRemoveEnvironmentVariables.js.map +1 -0
- package/environment/useRevealSecretValue.d.ts +66 -0
- package/environment/useRevealSecretValue.d.ts.map +1 -0
- package/environment/useRevealSecretValue.js +92 -0
- package/environment/useRevealSecretValue.js.map +1 -0
- package/environment/useSessionEnvPool.d.ts +80 -0
- package/environment/useSessionEnvPool.d.ts.map +1 -0
- package/environment/useSessionEnvPool.js +72 -0
- package/environment/useSessionEnvPool.js.map +1 -0
- package/environment/useUpdateEnvironment.d.ts +43 -0
- package/environment/useUpdateEnvironment.d.ts.map +1 -0
- package/environment/useUpdateEnvironment.js +59 -0
- package/environment/useUpdateEnvironment.js.map +1 -0
- package/environment/useUpdateEnvironmentVariables.d.ts +53 -0
- package/environment/useUpdateEnvironmentVariables.d.ts.map +1 -0
- package/environment/useUpdateEnvironmentVariables.js +71 -0
- package/environment/useUpdateEnvironmentVariables.js.map +1 -0
- package/error/ErrorMessage.d.ts +33 -0
- package/error/ErrorMessage.d.ts.map +1 -0
- package/error/ErrorMessage.js +60 -0
- package/error/ErrorMessage.js.map +1 -0
- package/error/SecretFlowErrorGuide.d.ts +41 -0
- package/error/SecretFlowErrorGuide.d.ts.map +1 -0
- package/error/SecretFlowErrorGuide.js +87 -0
- package/error/SecretFlowErrorGuide.js.map +1 -0
- package/error/index.d.ts +5 -0
- package/error/index.d.ts.map +1 -0
- package/error/index.js +3 -0
- package/error/index.js.map +1 -0
- package/execution/ApprovalCard.d.ts +35 -0
- package/execution/ApprovalCard.d.ts.map +1 -0
- package/execution/ApprovalCard.js +192 -0
- package/execution/ApprovalCard.js.map +1 -0
- package/execution/ArtifactCard.d.ts +70 -0
- package/execution/ArtifactCard.d.ts.map +1 -0
- package/execution/ArtifactCard.js +109 -0
- package/execution/ArtifactCard.js.map +1 -0
- package/execution/ArtifactPreviewModal.d.ts +77 -0
- package/execution/ArtifactPreviewModal.d.ts.map +1 -0
- package/execution/ArtifactPreviewModal.js +310 -0
- package/execution/ArtifactPreviewModal.js.map +1 -0
- package/execution/ArtifactsWidget.d.ts +63 -0
- package/execution/ArtifactsWidget.d.ts.map +1 -0
- package/execution/ArtifactsWidget.js +61 -0
- package/execution/ArtifactsWidget.js.map +1 -0
- package/execution/ExecutionCostSummary.d.ts +47 -0
- package/execution/ExecutionCostSummary.d.ts.map +1 -0
- package/execution/ExecutionCostSummary.js +77 -0
- package/execution/ExecutionCostSummary.js.map +1 -0
- package/execution/ExecutionPhaseBadge.d.ts +20 -0
- package/execution/ExecutionPhaseBadge.d.ts.map +1 -0
- package/execution/ExecutionPhaseBadge.js +112 -0
- package/execution/ExecutionPhaseBadge.js.map +1 -0
- package/execution/ExecutionProgress.d.ts +32 -0
- package/execution/ExecutionProgress.d.ts.map +1 -0
- package/execution/ExecutionProgress.js +96 -0
- package/execution/ExecutionProgress.js.map +1 -0
- package/execution/FilePathContext.d.ts +22 -0
- package/execution/FilePathContext.d.ts.map +1 -0
- package/execution/FilePathContext.js +6 -0
- package/execution/FilePathContext.js.map +1 -0
- package/execution/FilePathLink.d.ts +26 -0
- package/execution/FilePathLink.d.ts.map +1 -0
- package/execution/FilePathLink.js +64 -0
- package/execution/FilePathLink.js.map +1 -0
- package/execution/FollowUpInput.d.ts +55 -0
- package/execution/FollowUpInput.d.ts.map +1 -0
- package/execution/FollowUpInput.js +95 -0
- package/execution/FollowUpInput.js.map +1 -0
- package/execution/MessageEntry.d.ts +25 -0
- package/execution/MessageEntry.d.ts.map +1 -0
- package/execution/MessageEntry.js +46 -0
- package/execution/MessageEntry.js.map +1 -0
- package/execution/MessageThread.d.ts +88 -0
- package/execution/MessageThread.d.ts.map +1 -0
- package/execution/MessageThread.js +157 -0
- package/execution/MessageThread.js.map +1 -0
- package/execution/SessionVariablesInput.d.ts +47 -0
- package/execution/SessionVariablesInput.d.ts.map +1 -0
- package/execution/SessionVariablesInput.js +80 -0
- package/execution/SessionVariablesInput.js.map +1 -0
- package/execution/SubAgentSection.d.ts +23 -0
- package/execution/SubAgentSection.d.ts.map +1 -0
- package/execution/SubAgentSection.js +103 -0
- package/execution/SubAgentSection.js.map +1 -0
- package/execution/ToolCallDetail.d.ts +32 -0
- package/execution/ToolCallDetail.d.ts.map +1 -0
- package/execution/ToolCallDetail.js +204 -0
- package/execution/ToolCallDetail.js.map +1 -0
- package/execution/ToolCallGroup.d.ts +45 -0
- package/execution/ToolCallGroup.d.ts.map +1 -0
- package/execution/ToolCallGroup.js +160 -0
- package/execution/ToolCallGroup.js.map +1 -0
- package/execution/ToolCallItem.d.ts +39 -0
- package/execution/ToolCallItem.d.ts.map +1 -0
- package/execution/ToolCallItem.js +164 -0
- package/execution/ToolCallItem.js.map +1 -0
- package/execution/__tests__/ExecutionCostSummary.test.d.ts +2 -0
- package/execution/__tests__/ExecutionCostSummary.test.d.ts.map +1 -0
- package/execution/__tests__/ExecutionCostSummary.test.js +255 -0
- package/execution/__tests__/ExecutionCostSummary.test.js.map +1 -0
- package/execution/__tests__/execution-phases.test.d.ts +2 -0
- package/execution/__tests__/execution-phases.test.d.ts.map +1 -0
- package/execution/__tests__/execution-phases.test.js +25 -0
- package/execution/__tests__/execution-phases.test.js.map +1 -0
- package/execution/__tests__/useExecutionStream.test.d.ts +2 -0
- package/execution/__tests__/useExecutionStream.test.d.ts.map +1 -0
- package/execution/__tests__/useExecutionStream.test.js +190 -0
- package/execution/__tests__/useExecutionStream.test.js.map +1 -0
- package/execution/__tests__/useExecutionUsage.test.d.ts +2 -0
- package/execution/__tests__/useExecutionUsage.test.d.ts.map +1 -0
- package/execution/__tests__/useExecutionUsage.test.js +303 -0
- package/execution/__tests__/useExecutionUsage.test.js.map +1 -0
- package/execution/artifact-utils.d.ts +58 -0
- package/execution/artifact-utils.d.ts.map +1 -0
- package/execution/artifact-utils.js +123 -0
- package/execution/artifact-utils.js.map +1 -0
- package/execution/execution-phases.d.ts +7 -0
- package/execution/execution-phases.d.ts.map +1 -0
- package/execution/execution-phases.js +15 -0
- package/execution/execution-phases.js.map +1 -0
- package/execution/file-path-resolver.d.ts +63 -0
- package/execution/file-path-resolver.d.ts.map +1 -0
- package/execution/file-path-resolver.js +121 -0
- package/execution/file-path-resolver.js.map +1 -0
- package/execution/index.d.ts +55 -0
- package/execution/index.d.ts.map +1 -0
- package/execution/index.js +29 -0
- package/execution/index.js.map +1 -0
- package/execution/tool-categories.d.ts +36 -0
- package/execution/tool-categories.d.ts.map +1 -0
- package/execution/tool-categories.js +110 -0
- package/execution/tool-categories.js.map +1 -0
- package/execution/useArtifactContent.d.ts +75 -0
- package/execution/useArtifactContent.d.ts.map +1 -0
- package/execution/useArtifactContent.js +102 -0
- package/execution/useArtifactContent.js.map +1 -0
- package/execution/useCreateAgentExecution.d.ts +84 -0
- package/execution/useCreateAgentExecution.d.ts.map +1 -0
- package/execution/useCreateAgentExecution.js +79 -0
- package/execution/useCreateAgentExecution.js.map +1 -0
- package/execution/useExecutionArtifacts.d.ts +42 -0
- package/execution/useExecutionArtifacts.d.ts.map +1 -0
- package/execution/useExecutionArtifacts.js +43 -0
- package/execution/useExecutionArtifacts.js.map +1 -0
- package/execution/useExecutionStream.d.ts +62 -0
- package/execution/useExecutionStream.d.ts.map +1 -0
- package/execution/useExecutionStream.js +99 -0
- package/execution/useExecutionStream.js.map +1 -0
- package/execution/useExecutionUsage.d.ts +45 -0
- package/execution/useExecutionUsage.d.ts.map +1 -0
- package/execution/useExecutionUsage.js +157 -0
- package/execution/useExecutionUsage.js.map +1 -0
- package/execution/useSessionVariables.d.ts +102 -0
- package/execution/useSessionVariables.d.ts.map +1 -0
- package/execution/useSessionVariables.js +102 -0
- package/execution/useSessionVariables.js.map +1 -0
- package/execution/useSubmitApproval.d.ts +39 -0
- package/execution/useSubmitApproval.d.ts.map +1 -0
- package/execution/useSubmitApproval.js +62 -0
- package/execution/useSubmitApproval.js.map +1 -0
- package/github/GitHubRepoPicker.d.ts +24 -0
- package/github/GitHubRepoPicker.d.ts.map +1 -0
- package/github/GitHubRepoPicker.js +248 -0
- package/github/GitHubRepoPicker.js.map +1 -0
- package/github/index.d.ts +4 -0
- package/github/index.d.ts.map +1 -0
- package/github/index.js +4 -0
- package/github/index.js.map +1 -0
- package/github/useGitHubConnection.d.ts +72 -0
- package/github/useGitHubConnection.d.ts.map +1 -0
- package/github/useGitHubConnection.js +268 -0
- package/github/useGitHubConnection.js.map +1 -0
- package/github/useGitHubRepos.d.ts +39 -0
- package/github/useGitHubRepos.d.ts.map +1 -0
- package/github/useGitHubRepos.js +135 -0
- package/github/useGitHubRepos.js.map +1 -0
- package/index.d.ts +34 -0
- package/index.d.ts.map +1 -1
- package/index.js +33 -0
- package/index.js.map +1 -1
- package/internal/ScrollFade.d.ts +15 -0
- package/internal/ScrollFade.d.ts.map +1 -0
- package/internal/ScrollFade.js +24 -0
- package/internal/ScrollFade.js.map +1 -0
- package/internal/markdown-components.d.ts +18 -0
- package/internal/markdown-components.d.ts.map +1 -0
- package/internal/markdown-components.js +78 -0
- package/internal/markdown-components.js.map +1 -0
- package/internal/slug.d.ts +32 -0
- package/internal/slug.d.ts.map +1 -0
- package/internal/slug.js +41 -0
- package/internal/slug.js.map +1 -0
- package/internal/toError.d.ts +16 -0
- package/internal/toError.d.ts.map +1 -0
- package/internal/toError.js +22 -0
- package/internal/toError.js.map +1 -0
- package/internal/useScrollShadows.d.ts +22 -0
- package/internal/useScrollShadows.d.ts.map +1 -0
- package/internal/useScrollShadows.js +40 -0
- package/internal/useScrollShadows.js.map +1 -0
- package/library/ResourceCountCard.d.ts +104 -0
- package/library/ResourceCountCard.d.ts.map +1 -0
- package/library/ResourceCountCard.js +80 -0
- package/library/ResourceCountCard.js.map +1 -0
- package/library/ResourceListView.d.ts +123 -0
- package/library/ResourceListView.d.ts.map +1 -0
- package/library/ResourceListView.js +208 -0
- package/library/ResourceListView.js.map +1 -0
- package/library/ScopeToggle.d.ts +38 -0
- package/library/ScopeToggle.d.ts.map +1 -0
- package/library/ScopeToggle.js +61 -0
- package/library/ScopeToggle.js.map +1 -0
- package/library/VisibilityToggle.d.ts +41 -0
- package/library/VisibilityToggle.d.ts.map +1 -0
- package/library/VisibilityToggle.js +80 -0
- package/library/VisibilityToggle.js.map +1 -0
- package/library/detect-skill-package.d.ts +79 -0
- package/library/detect-skill-package.d.ts.map +1 -0
- package/library/detect-skill-package.js +113 -0
- package/library/detect-skill-package.js.map +1 -0
- package/library/detect-stigmer-resource.d.ts +66 -0
- package/library/detect-stigmer-resource.d.ts.map +1 -0
- package/library/detect-stigmer-resource.js +77 -0
- package/library/detect-stigmer-resource.js.map +1 -0
- package/library/index.d.ts +24 -0
- package/library/index.d.ts.map +1 -0
- package/library/index.js +13 -0
- package/library/index.js.map +1 -0
- package/library/parse-resource-yaml.d.ts +59 -0
- package/library/parse-resource-yaml.d.ts.map +1 -0
- package/library/parse-resource-yaml.js +397 -0
- package/library/parse-resource-yaml.js.map +1 -0
- package/library/serialize-resource-yaml.d.ts +50 -0
- package/library/serialize-resource-yaml.d.ts.map +1 -0
- package/library/serialize-resource-yaml.js +294 -0
- package/library/serialize-resource-yaml.js.map +1 -0
- package/library/useApplyResource.d.ts +115 -0
- package/library/useApplyResource.d.ts.map +1 -0
- package/library/useApplyResource.js +124 -0
- package/library/useApplyResource.js.map +1 -0
- package/library/useDetectSkillPackage.d.ts +54 -0
- package/library/useDetectSkillPackage.d.ts.map +1 -0
- package/library/useDetectSkillPackage.js +59 -0
- package/library/useDetectSkillPackage.js.map +1 -0
- package/library/useDetectStigmerResource.d.ts +30 -0
- package/library/useDetectStigmerResource.d.ts.map +1 -0
- package/library/useDetectStigmerResource.js +35 -0
- package/library/useDetectStigmerResource.js.map +1 -0
- package/library/useUpdateVisibility.d.ts +40 -0
- package/library/useUpdateVisibility.d.ts.map +1 -0
- package/library/useUpdateVisibility.js +67 -0
- package/library/useUpdateVisibility.js.map +1 -0
- package/mcp-server/McpServerConfigPanel.d.ts +116 -0
- package/mcp-server/McpServerConfigPanel.d.ts.map +1 -0
- package/mcp-server/McpServerConfigPanel.js +72 -0
- package/mcp-server/McpServerConfigPanel.js.map +1 -0
- package/mcp-server/McpServerDetailView.d.ts +54 -0
- package/mcp-server/McpServerDetailView.d.ts.map +1 -0
- package/mcp-server/McpServerDetailView.js +138 -0
- package/mcp-server/McpServerDetailView.js.map +1 -0
- package/mcp-server/McpServerPicker.d.ts +158 -0
- package/mcp-server/McpServerPicker.d.ts.map +1 -0
- package/mcp-server/McpServerPicker.js +265 -0
- package/mcp-server/McpServerPicker.js.map +1 -0
- package/mcp-server/McpToolSelector.d.ts +44 -0
- package/mcp-server/McpToolSelector.d.ts.map +1 -0
- package/mcp-server/McpToolSelector.js +75 -0
- package/mcp-server/McpToolSelector.js.map +1 -0
- package/mcp-server/index.d.ts +18 -2
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js +9 -2
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/mcpServerSetupReducer.d.ts +138 -0
- package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -0
- package/mcp-server/mcpServerSetupReducer.js +163 -0
- package/mcp-server/mcpServerSetupReducer.js.map +1 -0
- package/mcp-server/useMcpServer.d.ts +48 -0
- package/mcp-server/useMcpServer.d.ts.map +1 -0
- package/mcp-server/useMcpServer.js +82 -0
- package/mcp-server/useMcpServer.js.map +1 -0
- package/mcp-server/useMcpServerCount.d.ts +49 -0
- package/mcp-server/useMcpServerCount.d.ts.map +1 -0
- package/mcp-server/useMcpServerCount.js +32 -0
- package/mcp-server/useMcpServerCount.js.map +1 -0
- package/mcp-server/useMcpServerList.d.ts +62 -0
- package/mcp-server/useMcpServerList.d.ts.map +1 -0
- package/mcp-server/useMcpServerList.js +38 -0
- package/mcp-server/useMcpServerList.js.map +1 -0
- package/mcp-server/useMcpServerSearch.d.ts +18 -0
- package/mcp-server/useMcpServerSearch.d.ts.map +1 -0
- package/mcp-server/useMcpServerSearch.js +23 -0
- package/mcp-server/useMcpServerSearch.js.map +1 -0
- package/mcp-server/useMcpServerSetup.d.ts +162 -0
- package/mcp-server/useMcpServerSetup.d.ts.map +1 -0
- package/mcp-server/useMcpServerSetup.js +269 -0
- package/mcp-server/useMcpServerSetup.js.map +1 -0
- package/models/ModelSelector.d.ts +22 -0
- package/models/ModelSelector.d.ts.map +1 -0
- package/models/ModelSelector.js +59 -0
- package/models/ModelSelector.js.map +1 -0
- package/models/index.d.ts +7 -0
- package/models/index.d.ts.map +1 -0
- package/models/index.js +4 -0
- package/models/index.js.map +1 -0
- package/models/registry.d.ts +22 -0
- package/models/registry.d.ts.map +1 -0
- package/models/registry.js +43 -0
- package/models/registry.js.map +1 -0
- package/models/useModelRegistry.d.ts +18 -0
- package/models/useModelRegistry.d.ts.map +1 -0
- package/models/useModelRegistry.js +40 -0
- package/models/useModelRegistry.js.map +1 -0
- package/organization/CreateOrganizationForm.d.ts +28 -0
- package/organization/CreateOrganizationForm.d.ts.map +1 -0
- package/organization/CreateOrganizationForm.js +91 -0
- package/organization/CreateOrganizationForm.js.map +1 -0
- package/organization/index.d.ts +5 -0
- package/organization/index.d.ts.map +1 -0
- package/organization/index.js +3 -0
- package/organization/index.js.map +1 -0
- package/organization/useCreateOrganization.d.ts +34 -0
- package/organization/useCreateOrganization.d.ts.map +1 -0
- package/organization/useCreateOrganization.js +50 -0
- package/organization/useCreateOrganization.js.map +1 -0
- package/package.json +12 -40
- package/search/index.d.ts +7 -0
- package/search/index.d.ts.map +1 -0
- package/search/index.js +4 -0
- package/search/index.js.map +1 -0
- package/search/useResourceCount.d.ts +42 -0
- package/search/useResourceCount.d.ts.map +1 -0
- package/search/useResourceCount.js +58 -0
- package/search/useResourceCount.js.map +1 -0
- package/search/useResourceList.d.ts +48 -0
- package/search/useResourceList.d.ts.map +1 -0
- package/search/useResourceList.js +73 -0
- package/search/useResourceList.js.map +1 -0
- package/search/useResourceSearch.d.ts +27 -0
- package/search/useResourceSearch.d.ts.map +1 -0
- package/search/useResourceSearch.js +55 -0
- package/search/useResourceSearch.js.map +1 -0
- package/session/__tests__/group-sessions.test.d.ts +2 -0
- package/session/__tests__/group-sessions.test.d.ts.map +1 -0
- package/session/__tests__/group-sessions.test.js +91 -0
- package/session/__tests__/group-sessions.test.js.map +1 -0
- package/session/__tests__/useSessionConversation.test.d.ts +2 -0
- package/session/__tests__/useSessionConversation.test.d.ts.map +1 -0
- package/session/__tests__/useSessionConversation.test.js +209 -0
- package/session/__tests__/useSessionConversation.test.js.map +1 -0
- package/session/group-sessions.d.ts +20 -0
- package/session/group-sessions.d.ts.map +1 -0
- package/session/group-sessions.js +61 -0
- package/session/group-sessions.js.map +1 -0
- package/session/index.d.ts +17 -6
- package/session/index.d.ts.map +1 -1
- package/session/index.js +10 -5
- package/session/index.js.map +1 -1
- package/session/useAgentRefFromSession.d.ts +28 -0
- package/session/useAgentRefFromSession.d.ts.map +1 -0
- package/session/useAgentRefFromSession.js +73 -0
- package/session/useAgentRefFromSession.js.map +1 -0
- package/session/useCreateSession.d.ts +73 -0
- package/session/useCreateSession.d.ts.map +1 -0
- package/session/useCreateSession.js +87 -0
- package/session/useCreateSession.js.map +1 -0
- package/session/useSession.d.ts +17 -0
- package/session/useSession.d.ts.map +1 -0
- package/session/useSession.js +46 -0
- package/session/useSession.js.map +1 -0
- package/session/useSessionConversation.d.ts +151 -0
- package/session/useSessionConversation.d.ts.map +1 -0
- package/session/useSessionConversation.js +282 -0
- package/session/useSessionConversation.js.map +1 -0
- package/session/useSessionExecutions.d.ts +20 -0
- package/session/useSessionExecutions.d.ts.map +1 -0
- package/session/useSessionExecutions.js +57 -0
- package/session/useSessionExecutions.js.map +1 -0
- package/session/useSessionList.d.ts +25 -0
- package/session/useSessionList.d.ts.map +1 -0
- package/session/useSessionList.js +57 -0
- package/session/useSessionList.js.map +1 -0
- package/session/useUpdateSession.d.ts +22 -0
- package/session/useUpdateSession.d.ts.map +1 -0
- package/session/useUpdateSession.js +38 -0
- package/session/useUpdateSession.js.map +1 -0
- package/skill/SkillDetailView.d.ts +62 -0
- package/skill/SkillDetailView.d.ts.map +1 -0
- package/skill/SkillDetailView.js +157 -0
- package/skill/SkillDetailView.js.map +1 -0
- package/skill/SkillPicker.d.ts +26 -0
- package/skill/SkillPicker.d.ts.map +1 -0
- package/skill/SkillPicker.js +102 -0
- package/skill/SkillPicker.js.map +1 -0
- package/skill/index.d.ts +12 -2
- package/skill/index.d.ts.map +1 -1
- package/skill/index.js +6 -2
- package/skill/index.js.map +1 -1
- package/skill/useSkill.d.ts +49 -0
- package/skill/useSkill.d.ts.map +1 -0
- package/skill/useSkill.js +83 -0
- package/skill/useSkill.js.map +1 -0
- package/skill/useSkillCount.d.ts +49 -0
- package/skill/useSkillCount.d.ts.map +1 -0
- package/skill/useSkillCount.js +32 -0
- package/skill/useSkillCount.js.map +1 -0
- package/skill/useSkillList.d.ts +62 -0
- package/skill/useSkillList.d.ts.map +1 -0
- package/skill/useSkillList.js +38 -0
- package/skill/useSkillList.js.map +1 -0
- package/skill/useSkillSearch.d.ts +18 -0
- package/skill/useSkillSearch.d.ts.map +1 -0
- package/skill/useSkillSearch.js +23 -0
- package/skill/useSkillSearch.js.map +1 -0
- package/src/__tests__/hooks.test.tsx +28 -0
- package/src/agent/AgentDetailView.tsx +738 -0
- package/src/agent/AgentEnvForm.tsx +113 -0
- package/src/agent/AgentPicker.tsx +342 -0
- package/src/agent/agentSetupReducer.ts +234 -0
- package/src/agent/index.ts +43 -11
- package/src/agent/useAgent.ts +103 -0
- package/src/agent/useAgentCount.ts +68 -0
- package/src/agent/useAgentList.ts +84 -0
- package/src/agent/useAgentSearch.ts +43 -0
- package/src/agent/useAgentSetup.ts +434 -0
- package/src/agent/useDefaultAgent.ts +77 -0
- package/src/agent-instance/buildPersonalInstanceInput.ts +40 -0
- package/src/agent-instance/index.ts +11 -0
- package/src/agent-instance/useAgentInstance.ts +87 -0
- package/src/agent-instance/useAgentInstanceList.ts +99 -0
- package/src/agent-instance/useCreateAgentInstance.ts +75 -0
- package/src/agent-instance/usePersonalAgentInstance.ts +185 -0
- package/src/api-key/ApiKeyCreatedAlert.tsx +184 -0
- package/src/api-key/ApiKeyListPanel.tsx +359 -0
- package/src/api-key/CreateApiKeyForm.tsx +250 -0
- package/src/api-key/index.ts +12 -0
- package/src/api-key/useApiKeyList.ts +68 -0
- package/src/api-key/useCreateApiKey.ts +71 -0
- package/src/api-key/useDeleteApiKey.ts +57 -0
- package/src/attachment/AttachmentChipList.tsx +189 -0
- package/src/attachment/attachment-utils.ts +114 -0
- package/src/attachment/index.ts +17 -0
- package/src/attachment/useAttachments.ts +293 -0
- package/src/composer/ComposerToolbar.tsx +169 -0
- package/src/composer/ConfigureMenu.tsx +237 -0
- package/src/composer/ContextChip.tsx +104 -0
- package/src/composer/ContextPopover.tsx +54 -0
- package/src/composer/SessionComposer.tsx +1188 -0
- package/src/composer/icons.tsx +253 -0
- package/src/composer/index.ts +8 -0
- package/src/composer/useComposer.ts +163 -0
- package/src/environment/CreateEnvironmentForm.tsx +188 -0
- package/src/environment/EnvVarForm.tsx +475 -0
- package/src/environment/EnvironmentListPanel.tsx +258 -0
- package/src/environment/EnvironmentVariableEditor.tsx +811 -0
- package/src/environment/diffEnvSpec.ts +50 -0
- package/src/environment/index.ts +43 -0
- package/src/environment/useCreateEnvironment.ts +74 -0
- package/src/environment/useEnvironment.ts +89 -0
- package/src/environment/useEnvironmentList.ts +112 -0
- package/src/environment/usePersonalEnvironment.ts +285 -0
- package/src/environment/useRemoveEnvironmentVariables.ts +86 -0
- package/src/environment/useRevealSecretValue.ts +141 -0
- package/src/environment/useSessionEnvPool.ts +151 -0
- package/src/environment/useUpdateEnvironment.ts +74 -0
- package/src/environment/useUpdateEnvironmentVariables.ts +106 -0
- package/src/error/ErrorMessage.tsx +225 -0
- package/src/error/SecretFlowErrorGuide.tsx +189 -0
- package/src/error/index.ts +5 -0
- package/src/execution/ApprovalCard.tsx +499 -0
- package/src/execution/ArtifactCard.tsx +275 -0
- package/src/execution/ArtifactPreviewModal.tsx +942 -0
- package/src/execution/ArtifactsWidget.tsx +128 -0
- package/src/execution/ExecutionCostSummary.tsx +172 -0
- package/src/execution/ExecutionPhaseBadge.tsx +223 -0
- package/src/execution/ExecutionProgress.tsx +191 -0
- package/src/execution/FilePathContext.tsx +32 -0
- package/src/execution/FilePathLink.tsx +147 -0
- package/src/execution/FollowUpInput.tsx +220 -0
- package/src/execution/MessageEntry.tsx +120 -0
- package/src/execution/MessageThread.tsx +343 -0
- package/src/execution/SessionVariablesInput.tsx +374 -0
- package/src/execution/SubAgentSection.tsx +243 -0
- package/src/execution/ToolCallDetail.tsx +452 -0
- package/src/execution/ToolCallGroup.tsx +342 -0
- package/src/execution/ToolCallItem.tsx +426 -0
- package/src/execution/__tests__/ExecutionCostSummary.test.tsx +416 -0
- package/src/execution/__tests__/execution-phases.test.ts +31 -0
- package/src/execution/__tests__/useExecutionStream.test.tsx +242 -0
- package/src/execution/__tests__/useExecutionUsage.test.tsx +408 -0
- package/src/execution/artifact-utils.ts +136 -0
- package/src/execution/execution-phases.ts +16 -0
- package/src/execution/file-path-resolver.ts +171 -0
- package/src/execution/index.ts +97 -0
- package/src/execution/tool-categories.ts +171 -0
- package/src/execution/useArtifactContent.ts +156 -0
- package/src/execution/useCreateAgentExecution.ts +137 -0
- package/src/execution/useExecutionArtifacts.ts +58 -0
- package/src/execution/useExecutionStream.ts +149 -0
- package/src/execution/useExecutionUsage.ts +213 -0
- package/src/execution/useSessionVariables.ts +189 -0
- package/src/execution/useSubmitApproval.ts +98 -0
- package/src/github/GitHubRepoPicker.tsx +568 -0
- package/src/github/index.ts +19 -0
- package/src/github/useGitHubConnection.ts +368 -0
- package/src/github/useGitHubRepos.ts +197 -0
- package/src/index.ts +392 -0
- package/src/internal/ScrollFade.tsx +29 -0
- package/src/internal/markdown-components.tsx +197 -0
- package/src/internal/slug.ts +41 -0
- package/src/internal/toError.ts +19 -0
- package/src/internal/useScrollShadows.ts +54 -0
- package/src/library/ResourceCountCard.tsx +187 -0
- package/src/library/ResourceListView.tsx +698 -0
- package/src/library/ScopeToggle.tsx +121 -0
- package/src/library/VisibilityToggle.tsx +205 -0
- package/src/library/detect-skill-package.ts +162 -0
- package/src/library/detect-stigmer-resource.ts +130 -0
- package/src/library/index.ts +51 -0
- package/src/library/parse-resource-yaml.ts +611 -0
- package/src/library/serialize-resource-yaml.ts +407 -0
- package/src/library/useApplyResource.ts +211 -0
- package/src/library/useDetectSkillPackage.ts +91 -0
- package/src/library/useDetectStigmerResource.ts +45 -0
- package/src/library/useUpdateVisibility.ts +94 -0
- package/src/mcp-server/McpServerConfigPanel.tsx +265 -0
- package/src/mcp-server/McpServerDetailView.tsx +606 -0
- package/src/mcp-server/McpServerPicker.tsx +857 -0
- package/src/mcp-server/McpToolSelector.tsx +243 -0
- package/src/mcp-server/index.ts +44 -3
- package/src/mcp-server/mcpServerSetupReducer.ts +308 -0
- package/src/mcp-server/useMcpServer.ts +103 -0
- package/src/mcp-server/useMcpServerCount.ts +68 -0
- package/src/mcp-server/useMcpServerList.ts +84 -0
- package/src/mcp-server/useMcpServerSearch.ts +38 -0
- package/src/mcp-server/useMcpServerSetup.ts +487 -0
- package/src/models/ModelSelector.tsx +132 -0
- package/src/models/index.ts +6 -0
- package/src/models/registry.ts +60 -0
- package/src/models/useModelRegistry.ts +58 -0
- package/src/organization/CreateOrganizationForm.tsx +269 -0
- package/src/organization/index.ts +4 -0
- package/src/organization/useCreateOrganization.ts +65 -0
- package/src/search/index.ts +18 -0
- package/src/search/useResourceCount.ts +102 -0
- package/src/search/useResourceList.ts +128 -0
- package/src/search/useResourceSearch.ts +90 -0
- package/src/session/__tests__/group-sessions.test.ts +113 -0
- package/src/session/__tests__/useSessionConversation.test.tsx +305 -0
- package/src/session/group-sessions.ts +80 -0
- package/src/session/index.ts +33 -10
- package/src/session/useAgentRefFromSession.ts +94 -0
- package/src/session/useCreateSession.ts +142 -0
- package/src/session/useSession.ts +60 -0
- package/src/session/useSessionConversation.ts +515 -0
- package/src/session/useSessionExecutions.ts +77 -0
- package/src/session/useSessionList.ts +90 -0
- package/src/session/useUpdateSession.ts +54 -0
- package/src/skill/SkillDetailView.tsx +503 -0
- package/src/skill/SkillPicker.tsx +331 -0
- package/src/skill/index.ts +23 -3
- package/src/skill/useSkill.ts +105 -0
- package/src/skill/useSkillCount.ts +68 -0
- package/src/skill/useSkillList.ts +84 -0
- package/src/skill/useSkillSearch.ts +38 -0
- package/src/styles.css +2 -0
- package/src/workspace/FolderBrowser.tsx +568 -0
- package/src/workspace/WorkspaceEditor.tsx +480 -0
- package/src/workspace/WorkspaceSummary.tsx +109 -0
- package/src/workspace/index.ts +17 -0
- package/src/workspace/useFolderListing.ts +126 -0
- package/src/workspace/useWorkspaceEntries.ts +98 -0
- package/styles.css +1 -1
- package/workspace/FolderBrowser.d.ts +26 -0
- package/workspace/FolderBrowser.d.ts.map +1 -0
- package/workspace/FolderBrowser.js +179 -0
- package/workspace/FolderBrowser.js.map +1 -0
- package/workspace/WorkspaceEditor.d.ts +30 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -0
- package/workspace/WorkspaceEditor.js +116 -0
- package/workspace/WorkspaceEditor.js.map +1 -0
- package/workspace/WorkspaceSummary.d.ts +30 -0
- package/workspace/WorkspaceSummary.d.ts.map +1 -0
- package/workspace/WorkspaceSummary.js +53 -0
- package/workspace/WorkspaceSummary.js.map +1 -0
- package/workspace/index.d.ts +11 -0
- package/workspace/index.d.ts.map +1 -0
- package/workspace/index.js +6 -0
- package/workspace/index.js.map +1 -0
- package/workspace/useFolderListing.d.ts +35 -0
- package/workspace/useFolderListing.d.ts.map +1 -0
- package/workspace/useFolderListing.js +86 -0
- package/workspace/useFolderListing.js.map +1 -0
- package/workspace/useWorkspaceEntries.d.ts +28 -0
- package/workspace/useWorkspaceEntries.d.ts.map +1 -0
- package/workspace/useWorkspaceEntries.js +66 -0
- package/workspace/useWorkspaceEntries.js.map +1 -0
- package/agent/components/AgentCard.d.ts +0 -9
- package/agent/components/AgentCard.d.ts.map +0 -1
- package/agent/components/AgentCard.js +0 -26
- package/agent/components/AgentCard.js.map +0 -1
- package/agent/components/AgentOverview.d.ts +0 -7
- package/agent/components/AgentOverview.d.ts.map +0 -1
- package/agent/components/AgentOverview.js +0 -36
- package/agent/components/AgentOverview.js.map +0 -1
- package/agent/components/AgentPicker.d.ts +0 -17
- package/agent/components/AgentPicker.d.ts.map +0 -1
- package/agent/components/AgentPicker.js +0 -86
- package/agent/components/AgentPicker.js.map +0 -1
- package/agent/hooks/useAgentSearch.d.ts +0 -28
- package/agent/hooks/useAgentSearch.d.ts.map +0 -1
- package/agent/hooks/useAgentSearch.js +0 -63
- package/agent/hooks/useAgentSearch.js.map +0 -1
- package/agent-execution/components/ApprovalControls.d.ts +0 -10
- package/agent-execution/components/ApprovalControls.d.ts.map +0 -1
- package/agent-execution/components/ApprovalControls.js +0 -19
- package/agent-execution/components/ApprovalControls.js.map +0 -1
- package/agent-execution/components/ExecutionStatus.d.ts +0 -8
- package/agent-execution/components/ExecutionStatus.d.ts.map +0 -1
- package/agent-execution/components/ExecutionStatus.js +0 -14
- package/agent-execution/components/ExecutionStatus.js.map +0 -1
- package/agent-execution/components/ExecutionStream.d.ts +0 -16
- package/agent-execution/components/ExecutionStream.d.ts.map +0 -1
- package/agent-execution/components/ExecutionStream.js +0 -39
- package/agent-execution/components/ExecutionStream.js.map +0 -1
- package/agent-execution/components/MessageEntry.d.ts +0 -17
- package/agent-execution/components/MessageEntry.d.ts.map +0 -1
- package/agent-execution/components/MessageEntry.js +0 -36
- package/agent-execution/components/MessageEntry.js.map +0 -1
- package/agent-execution/components/MessageInput.d.ts +0 -10
- package/agent-execution/components/MessageInput.d.ts.map +0 -1
- package/agent-execution/components/MessageInput.js +0 -27
- package/agent-execution/components/MessageInput.js.map +0 -1
- package/agent-execution/components/OutputBlock.d.ts +0 -9
- package/agent-execution/components/OutputBlock.d.ts.map +0 -1
- package/agent-execution/components/OutputBlock.js +0 -15
- package/agent-execution/components/OutputBlock.js.map +0 -1
- package/agent-execution/components/SubAgentCard.d.ts +0 -11
- package/agent-execution/components/SubAgentCard.d.ts.map +0 -1
- package/agent-execution/components/SubAgentCard.js +0 -19
- package/agent-execution/components/SubAgentCard.js.map +0 -1
- package/agent-execution/components/ToolCallCard.d.ts +0 -11
- package/agent-execution/components/ToolCallCard.d.ts.map +0 -1
- package/agent-execution/components/ToolCallCard.js +0 -25
- package/agent-execution/components/ToolCallCard.js.map +0 -1
- package/agent-execution/helpers.d.ts +0 -35
- package/agent-execution/helpers.d.ts.map +0 -1
- package/agent-execution/helpers.js +0 -157
- package/agent-execution/helpers.js.map +0 -1
- package/agent-execution/hooks/useAgentExecution.d.ts +0 -21
- package/agent-execution/hooks/useAgentExecution.d.ts.map +0 -1
- package/agent-execution/hooks/useAgentExecution.js +0 -99
- package/agent-execution/hooks/useAgentExecution.js.map +0 -1
- package/agent-execution/hooks/useApproval.d.ts +0 -12
- package/agent-execution/hooks/useApproval.d.ts.map +0 -1
- package/agent-execution/hooks/useApproval.js +0 -32
- package/agent-execution/hooks/useApproval.js.map +0 -1
- package/agent-execution/index.d.ts +0 -14
- package/agent-execution/index.d.ts.map +0 -1
- package/agent-execution/index.js +0 -15
- package/agent-execution/index.js.map +0 -1
- package/catalog/components/ResourceSearchCard.d.ts +0 -23
- package/catalog/components/ResourceSearchCard.d.ts.map +0 -1
- package/catalog/components/ResourceSearchCard.js +0 -36
- package/catalog/components/ResourceSearchCard.js.map +0 -1
- package/catalog/index.d.ts +0 -4
- package/catalog/index.d.ts.map +0 -1
- package/catalog/index.js +0 -5
- package/catalog/index.js.map +0 -1
- package/catalog/internal/time.d.ts +0 -13
- package/catalog/internal/time.d.ts.map +0 -1
- package/catalog/internal/time.js +0 -41
- package/catalog/internal/time.js.map +0 -1
- package/internal/badge.d.ts +0 -8
- package/internal/badge.d.ts.map +0 -1
- package/internal/badge.js +0 -34
- package/internal/badge.js.map +0 -1
- package/internal/button.d.ts +0 -9
- package/internal/button.d.ts.map +0 -1
- package/internal/button.js +0 -36
- package/internal/button.js.map +0 -1
- package/internal/collapsible.d.ts +0 -6
- package/internal/collapsible.d.ts.map +0 -1
- package/internal/collapsible.js +0 -14
- package/internal/collapsible.js.map +0 -1
- package/internal/section.d.ts +0 -8
- package/internal/section.d.ts.map +0 -1
- package/internal/section.js +0 -6
- package/internal/section.js.map +0 -1
- package/internal/textarea.d.ts +0 -4
- package/internal/textarea.d.ts.map +0 -1
- package/internal/textarea.js +0 -9
- package/internal/textarea.js.map +0 -1
- package/mcp-server/hooks/useMcpServerSearch.d.ts +0 -25
- package/mcp-server/hooks/useMcpServerSearch.d.ts.map +0 -1
- package/mcp-server/hooks/useMcpServerSearch.js +0 -57
- package/mcp-server/hooks/useMcpServerSearch.js.map +0 -1
- package/session/components/AgentSessionHistory.d.ts +0 -8
- package/session/components/AgentSessionHistory.d.ts.map +0 -1
- package/session/components/AgentSessionHistory.js +0 -11
- package/session/components/AgentSessionHistory.js.map +0 -1
- package/session/components/SessionCard.d.ts +0 -8
- package/session/components/SessionCard.d.ts.map +0 -1
- package/session/components/SessionCard.js +0 -57
- package/session/components/SessionCard.js.map +0 -1
- package/session/hooks/useAgentSessionList.d.ts +0 -21
- package/session/hooks/useAgentSessionList.d.ts.map +0 -1
- package/session/hooks/useAgentSessionList.js +0 -90
- package/session/hooks/useAgentSessionList.js.map +0 -1
- package/skill/hooks/useSkillSearch.d.ts +0 -25
- package/skill/hooks/useSkillSearch.d.ts.map +0 -1
- package/skill/hooks/useSkillSearch.js +0 -57
- package/skill/hooks/useSkillSearch.js.map +0 -1
- package/src/agent/components/AgentCard.tsx +0 -125
- package/src/agent/components/AgentOverview.tsx +0 -209
- package/src/agent/components/AgentPicker.tsx +0 -255
- package/src/agent/hooks/useAgentSearch.ts +0 -94
- package/src/agent-execution/components/ApprovalControls.tsx +0 -99
- package/src/agent-execution/components/ExecutionStatus.tsx +0 -33
- package/src/agent-execution/components/ExecutionStream.tsx +0 -148
- package/src/agent-execution/components/MessageEntry.tsx +0 -125
- package/src/agent-execution/components/MessageInput.tsx +0 -70
- package/src/agent-execution/components/OutputBlock.tsx +0 -43
- package/src/agent-execution/components/SubAgentCard.tsx +0 -138
- package/src/agent-execution/components/ToolCallCard.tsx +0 -153
- package/src/agent-execution/helpers.ts +0 -193
- package/src/agent-execution/hooks/useAgentExecution.ts +0 -147
- package/src/agent-execution/hooks/useApproval.ts +0 -56
- package/src/agent-execution/index.ts +0 -46
- package/src/catalog/components/ResourceSearchCard.tsx +0 -137
- package/src/catalog/index.ts +0 -6
- package/src/catalog/internal/time.ts +0 -40
- package/src/internal/badge.tsx +0 -52
- package/src/internal/button.tsx +0 -60
- package/src/internal/collapsible.tsx +0 -21
- package/src/internal/section.tsx +0 -18
- package/src/internal/textarea.tsx +0 -23
- package/src/mcp-server/hooks/useMcpServerSearch.ts +0 -79
- package/src/session/components/AgentSessionHistory.tsx +0 -109
- package/src/session/components/SessionCard.tsx +0 -113
- package/src/session/hooks/useAgentSessionList.ts +0 -117
- package/src/skill/hooks/useSkillSearch.ts +0 -79
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { EnvVarInput } from "@stigmer/sdk";
|
|
4
|
+
import {
|
|
5
|
+
EnvVarForm,
|
|
6
|
+
type EnvVarFormVariable,
|
|
7
|
+
type EnvVarFormSubmitOptions,
|
|
8
|
+
type EnvVarFormProps,
|
|
9
|
+
} from "../environment/EnvVarForm";
|
|
10
|
+
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Backward-compatible type aliases
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Describes a single environment variable that the form should collect.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use {@link EnvVarFormVariable} from `@stigmer/react` instead.
|
|
19
|
+
* This alias is kept for backward compatibility and will be removed in
|
|
20
|
+
* a future major version.
|
|
21
|
+
*/
|
|
22
|
+
export type AgentEnvFormVariable = EnvVarFormVariable;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Options reported by the form alongside the collected values.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated Use {@link EnvVarFormSubmitOptions} from `@stigmer/react` instead.
|
|
28
|
+
* This alias is kept for backward compatibility and will be removed in
|
|
29
|
+
* a future major version.
|
|
30
|
+
*/
|
|
31
|
+
export type AgentEnvFormSubmitOptions = EnvVarFormSubmitOptions;
|
|
32
|
+
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// Props (unchanged public shape)
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
export interface AgentEnvFormProps {
|
|
38
|
+
/** Agent display name shown in the form header. */
|
|
39
|
+
readonly agentName: string;
|
|
40
|
+
/**
|
|
41
|
+
* Variables to collect. Each entry renders one input field, in order.
|
|
42
|
+
* Must contain at least one variable.
|
|
43
|
+
*/
|
|
44
|
+
readonly variables: AgentEnvFormVariable[];
|
|
45
|
+
/**
|
|
46
|
+
* Called with the collected values and the save toggle state when
|
|
47
|
+
* the user submits the form.
|
|
48
|
+
*/
|
|
49
|
+
readonly onSubmit: (
|
|
50
|
+
values: Record<string, EnvVarInput>,
|
|
51
|
+
options: AgentEnvFormSubmitOptions,
|
|
52
|
+
) => void;
|
|
53
|
+
/** Called when the user clicks the back/cancel button. */
|
|
54
|
+
readonly onCancel?: () => void;
|
|
55
|
+
/** When true, the submit button shows a spinner and inputs are disabled. */
|
|
56
|
+
readonly isSubmitting?: boolean;
|
|
57
|
+
readonly disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Initial state of the "Save for future runs" toggle.
|
|
60
|
+
* Platform builders can override this to match their default
|
|
61
|
+
* secret-persistence policy.
|
|
62
|
+
* @default true
|
|
63
|
+
*/
|
|
64
|
+
readonly defaultSaveForFuture?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* When `true`, the save toggle is hidden and the form always uses
|
|
67
|
+
* `defaultSaveForFuture` as the submit value. Useful for platform
|
|
68
|
+
* builders who want to enforce a single persistence policy.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
readonly hideSaveToggle?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Lookup function for pre-filling fields from the session env pool.
|
|
74
|
+
* Passed through to {@link EnvVarForm}.
|
|
75
|
+
*/
|
|
76
|
+
readonly poolValues?: EnvVarFormProps["poolValues"];
|
|
77
|
+
readonly className?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Compact form that collects environment variable values for an agent.
|
|
82
|
+
*
|
|
83
|
+
* This is a thin wrapper around {@link EnvVarForm} that provides
|
|
84
|
+
* agent-specific defaults: the agent name as the form title, and a
|
|
85
|
+
* contextual description. All rendering, validation, and toggle
|
|
86
|
+
* behavior is delegated to `EnvVarForm`.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <AgentEnvForm
|
|
91
|
+
* agentName="GitHub Reviewer"
|
|
92
|
+
* variables={[
|
|
93
|
+
* { key: "GITHUB_TOKEN", isSecret: true, description: "Personal access token" },
|
|
94
|
+
* { key: "REPO_OWNER", isSecret: false },
|
|
95
|
+
* ]}
|
|
96
|
+
* onSubmit={(values, { saveForFuture }) => {
|
|
97
|
+
* if (saveForFuture) saveToEnvironment(values);
|
|
98
|
+
* else useAsRuntimeEnv(values);
|
|
99
|
+
* }}
|
|
100
|
+
* onCancel={() => console.log("cancelled")}
|
|
101
|
+
* />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export function AgentEnvForm({ agentName, ...rest }: AgentEnvFormProps) {
|
|
105
|
+
return (
|
|
106
|
+
<EnvVarForm
|
|
107
|
+
title={agentName}
|
|
108
|
+
description="Enter required credentials to use this agent."
|
|
109
|
+
ariaLabel={`Configure ${agentName}`}
|
|
110
|
+
{...rest}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useState,
|
|
5
|
+
useCallback,
|
|
6
|
+
useEffect,
|
|
7
|
+
useRef,
|
|
8
|
+
useMemo,
|
|
9
|
+
type KeyboardEvent,
|
|
10
|
+
} from "react";
|
|
11
|
+
import type { ResourceRef } from "@stigmer/sdk";
|
|
12
|
+
import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
|
|
13
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
14
|
+
import { cn } from "@stigmer/theme";
|
|
15
|
+
import { useAgentSearch } from "./useAgentSearch";
|
|
16
|
+
import { useScrollShadows } from "../internal/useScrollShadows";
|
|
17
|
+
import { ScrollFade } from "../internal/ScrollFade";
|
|
18
|
+
|
|
19
|
+
export interface AgentPickerProps {
|
|
20
|
+
/** Organization slug to scope the search. */
|
|
21
|
+
readonly org: string;
|
|
22
|
+
/** Currently selected agent reference, or null if none selected. */
|
|
23
|
+
readonly value: ResourceRef | null;
|
|
24
|
+
/** Called when the selection changes. Pass null to deselect. */
|
|
25
|
+
readonly onChange: (ref: ResourceRef | null) => void;
|
|
26
|
+
/** Called with the display name when an agent is selected (for chip rendering). */
|
|
27
|
+
readonly onDisplayNameResolved?: (key: string, name: string) => void;
|
|
28
|
+
readonly disabled?: boolean;
|
|
29
|
+
readonly className?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function refKey(ref: ResourceRef): string {
|
|
33
|
+
return `${ref.org}/${ref.slug}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const LIST_ID = "stgm-agent-list";
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Single-select searchable picker for choosing an agent from the platform.
|
|
40
|
+
*
|
|
41
|
+
* Renders a search input and scrollable list of available agents.
|
|
42
|
+
* Designed to be placed inside a popover container — this component
|
|
43
|
+
* renders the picker content, not the popover shell.
|
|
44
|
+
*
|
|
45
|
+
* Unlike the multi-select {@link SkillPicker} and McpServerPicker,
|
|
46
|
+
* this picker enforces single selection: clicking a result replaces
|
|
47
|
+
* the current selection. A session runs against exactly one agent.
|
|
48
|
+
*
|
|
49
|
+
* This is a Layer 1 building-block component used by both platform
|
|
50
|
+
* builders (Profile A) and direct Stigmer users (Profile B). Platform
|
|
51
|
+
* builders can use it standalone with their own popover or inline layout.
|
|
52
|
+
* The Stigmer Console places it inside a `ContextPopover` within the
|
|
53
|
+
* {@link SessionComposer}.
|
|
54
|
+
*
|
|
55
|
+
* All visual properties flow through `--stgm-*` tokens.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* // Platform builder: standalone agent picker
|
|
60
|
+
* const [agent, setAgent] = useState<ResourceRef | null>(null);
|
|
61
|
+
* <AgentPicker org="acme" value={agent} onChange={setAgent} />
|
|
62
|
+
*
|
|
63
|
+
* // Access the selected agent
|
|
64
|
+
* if (agent) console.log(`Selected: ${agent.org}/${agent.slug}`);
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export function AgentPicker({
|
|
68
|
+
org,
|
|
69
|
+
value,
|
|
70
|
+
onChange,
|
|
71
|
+
onDisplayNameResolved,
|
|
72
|
+
disabled,
|
|
73
|
+
className,
|
|
74
|
+
}: AgentPickerProps) {
|
|
75
|
+
const { results, isLoading, error, query, setQuery } = useAgentSearch(org);
|
|
76
|
+
|
|
77
|
+
const [focusIndex, setFocusIndex] = useState(-1);
|
|
78
|
+
const searchRef = useRef<HTMLInputElement>(null);
|
|
79
|
+
const { scrollRef: listRef, canScrollUp, canScrollDown } = useScrollShadows();
|
|
80
|
+
|
|
81
|
+
const selectedKey = useMemo(
|
|
82
|
+
() => (value ? refKey(value) : null),
|
|
83
|
+
[value],
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
const availableResults = useMemo(
|
|
87
|
+
() =>
|
|
88
|
+
selectedKey
|
|
89
|
+
? results.filter((r) => `${r.org}/${r.slug}` !== selectedKey)
|
|
90
|
+
: results,
|
|
91
|
+
[results, selectedKey],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
setFocusIndex(-1);
|
|
96
|
+
}, [query]);
|
|
97
|
+
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (focusIndex >= 0) {
|
|
100
|
+
listRef.current
|
|
101
|
+
?.querySelector(`[data-idx="${focusIndex}"]`)
|
|
102
|
+
?.scrollIntoView({ block: "nearest" });
|
|
103
|
+
}
|
|
104
|
+
}, [focusIndex, listRef]);
|
|
105
|
+
|
|
106
|
+
const handleSelect = useCallback(
|
|
107
|
+
(result: SearchResult) => {
|
|
108
|
+
const ref: ResourceRef = {
|
|
109
|
+
org: result.org,
|
|
110
|
+
slug: result.slug,
|
|
111
|
+
kind: ApiResourceKind.agent,
|
|
112
|
+
};
|
|
113
|
+
onChange(ref);
|
|
114
|
+
onDisplayNameResolved?.(`${result.org}/${result.slug}`, result.name);
|
|
115
|
+
},
|
|
116
|
+
[onChange, onDisplayNameResolved],
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const handleDeselect = useCallback(() => {
|
|
120
|
+
onChange(null);
|
|
121
|
+
}, [onChange]);
|
|
122
|
+
|
|
123
|
+
const handleSearchKeyDown = useCallback(
|
|
124
|
+
(e: KeyboardEvent<HTMLInputElement>) => {
|
|
125
|
+
if (e.key === "ArrowDown") {
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
setFocusIndex((prev) =>
|
|
128
|
+
prev < availableResults.length - 1 ? prev + 1 : prev,
|
|
129
|
+
);
|
|
130
|
+
} else if (e.key === "ArrowUp") {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
setFocusIndex((prev) => (prev > 0 ? prev - 1 : -1));
|
|
133
|
+
} else if (
|
|
134
|
+
e.key === "Enter" &&
|
|
135
|
+
focusIndex >= 0 &&
|
|
136
|
+
focusIndex < availableResults.length
|
|
137
|
+
) {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
handleSelect(availableResults[focusIndex]);
|
|
140
|
+
} else if (e.key === "Enter") {
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
[availableResults, focusIndex, handleSelect],
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<div className={["space-y-2 w-72", className].filter(Boolean).join(" ")}>
|
|
149
|
+
{/* Selected agent */}
|
|
150
|
+
{value && (
|
|
151
|
+
<div className="space-y-1">
|
|
152
|
+
<div className="text-[0.65rem] font-medium text-muted-foreground">
|
|
153
|
+
Selected
|
|
154
|
+
</div>
|
|
155
|
+
<div className="flex items-center gap-2 rounded-md bg-muted/30 px-2 py-1 text-xs">
|
|
156
|
+
<AgentIcon />
|
|
157
|
+
<span className="min-w-0 flex-1 truncate text-foreground">
|
|
158
|
+
{value.slug}
|
|
159
|
+
</span>
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
onClick={handleDeselect}
|
|
163
|
+
disabled={disabled}
|
|
164
|
+
className="shrink-0 text-muted-foreground hover:text-destructive disabled:pointer-events-none"
|
|
165
|
+
aria-label={`Remove ${value.slug}`}
|
|
166
|
+
>
|
|
167
|
+
<XIcon />
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
)}
|
|
172
|
+
|
|
173
|
+
{/* Search input */}
|
|
174
|
+
<input
|
|
175
|
+
ref={searchRef}
|
|
176
|
+
type="text"
|
|
177
|
+
role="combobox"
|
|
178
|
+
aria-expanded={true}
|
|
179
|
+
aria-controls={LIST_ID}
|
|
180
|
+
aria-activedescendant={
|
|
181
|
+
focusIndex >= 0 ? `stgm-agent-${focusIndex}` : undefined
|
|
182
|
+
}
|
|
183
|
+
placeholder="Search agents..."
|
|
184
|
+
value={query}
|
|
185
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
186
|
+
onKeyDown={handleSearchKeyDown}
|
|
187
|
+
disabled={disabled}
|
|
188
|
+
className="w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-xs text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
|
189
|
+
autoFocus
|
|
190
|
+
/>
|
|
191
|
+
|
|
192
|
+
{error && <p className="text-xs text-destructive">{error}</p>}
|
|
193
|
+
|
|
194
|
+
{/* Scrollable results list */}
|
|
195
|
+
<div className="relative">
|
|
196
|
+
{canScrollUp && <ScrollFade position="top" />}
|
|
197
|
+
|
|
198
|
+
<div
|
|
199
|
+
ref={listRef}
|
|
200
|
+
id={LIST_ID}
|
|
201
|
+
role="listbox"
|
|
202
|
+
aria-label="Agents"
|
|
203
|
+
className="max-h-52 overflow-y-auto"
|
|
204
|
+
>
|
|
205
|
+
{isLoading ? (
|
|
206
|
+
<LoadingSkeleton />
|
|
207
|
+
) : availableResults.length === 0 ? (
|
|
208
|
+
<div className="py-4 text-center text-xs text-muted-foreground">
|
|
209
|
+
{query
|
|
210
|
+
? "No agents match your search"
|
|
211
|
+
: value
|
|
212
|
+
? "No other agents available"
|
|
213
|
+
: "No agents found"}
|
|
214
|
+
</div>
|
|
215
|
+
) : (
|
|
216
|
+
availableResults.map((result, idx) => (
|
|
217
|
+
<button
|
|
218
|
+
key={result.id}
|
|
219
|
+
id={`stgm-agent-${idx}`}
|
|
220
|
+
type="button"
|
|
221
|
+
data-idx={idx}
|
|
222
|
+
onClick={() => handleSelect(result)}
|
|
223
|
+
disabled={disabled}
|
|
224
|
+
className={cn(
|
|
225
|
+
"group flex w-full flex-col gap-0.5 rounded-md px-2 py-1.5 text-left text-xs transition-colors",
|
|
226
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
227
|
+
idx === focusIndex
|
|
228
|
+
? "bg-accent text-foreground"
|
|
229
|
+
: "text-foreground hover:bg-accent/50",
|
|
230
|
+
)}
|
|
231
|
+
role="option"
|
|
232
|
+
aria-selected={idx === focusIndex}
|
|
233
|
+
>
|
|
234
|
+
<span className="flex items-center gap-1.5">
|
|
235
|
+
<AgentIcon />
|
|
236
|
+
<span className="truncate font-medium">
|
|
237
|
+
<HighlightMatch text={result.name} query={query} />
|
|
238
|
+
</span>
|
|
239
|
+
<span className="ml-auto shrink-0 text-[0.6rem] text-muted-foreground">
|
|
240
|
+
{result.org}
|
|
241
|
+
</span>
|
|
242
|
+
</span>
|
|
243
|
+
{result.description && (
|
|
244
|
+
<span
|
|
245
|
+
className={cn(
|
|
246
|
+
"pl-5 text-[0.65rem] text-muted-foreground",
|
|
247
|
+
idx !== focusIndex &&
|
|
248
|
+
"line-clamp-2 group-hover:line-clamp-none",
|
|
249
|
+
)}
|
|
250
|
+
>
|
|
251
|
+
{result.description}
|
|
252
|
+
</span>
|
|
253
|
+
)}
|
|
254
|
+
</button>
|
|
255
|
+
))
|
|
256
|
+
)}
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
{canScrollDown && <ScrollFade position="bottom" />}
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// ---------------------------------------------------------------------------
|
|
266
|
+
// Private helpers
|
|
267
|
+
// ---------------------------------------------------------------------------
|
|
268
|
+
|
|
269
|
+
function HighlightMatch({ text, query }: { text: string; query: string }) {
|
|
270
|
+
if (!query) return <>{text}</>;
|
|
271
|
+
const idx = text.toLowerCase().indexOf(query.toLowerCase());
|
|
272
|
+
if (idx === -1) return <>{text}</>;
|
|
273
|
+
return (
|
|
274
|
+
<>
|
|
275
|
+
{text.slice(0, idx)}
|
|
276
|
+
<span className="font-semibold">
|
|
277
|
+
{text.slice(idx, idx + query.length)}
|
|
278
|
+
</span>
|
|
279
|
+
{text.slice(idx + query.length)}
|
|
280
|
+
</>
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function LoadingSkeleton() {
|
|
285
|
+
return (
|
|
286
|
+
<div className="space-y-1 py-1">
|
|
287
|
+
{[50, 65, 40, 58].map((w, i) => (
|
|
288
|
+
<div key={i} className="flex flex-col gap-1 px-2 py-1.5">
|
|
289
|
+
<div
|
|
290
|
+
className="h-3 rounded bg-muted animate-pulse"
|
|
291
|
+
style={{ width: `${w}%` }}
|
|
292
|
+
/>
|
|
293
|
+
<div
|
|
294
|
+
className="h-2 rounded bg-muted/60 animate-pulse"
|
|
295
|
+
style={{ width: `${Math.min(w + 15, 90)}%` }}
|
|
296
|
+
/>
|
|
297
|
+
</div>
|
|
298
|
+
))}
|
|
299
|
+
</div>
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function AgentIcon() {
|
|
304
|
+
return (
|
|
305
|
+
<svg
|
|
306
|
+
width="12"
|
|
307
|
+
height="12"
|
|
308
|
+
viewBox="0 0 16 16"
|
|
309
|
+
fill="none"
|
|
310
|
+
stroke="currentColor"
|
|
311
|
+
strokeWidth="1.5"
|
|
312
|
+
strokeLinecap="round"
|
|
313
|
+
strokeLinejoin="round"
|
|
314
|
+
className="shrink-0 text-muted-foreground"
|
|
315
|
+
aria-hidden="true"
|
|
316
|
+
>
|
|
317
|
+
<rect x="3" y="5" width="10" height="8" rx="2" />
|
|
318
|
+
<circle cx="6" cy="9" r="1" fill="currentColor" stroke="none" />
|
|
319
|
+
<circle cx="10" cy="9" r="1" fill="currentColor" stroke="none" />
|
|
320
|
+
<path d="M8 1v4" />
|
|
321
|
+
<circle cx="8" cy="1" r="1" />
|
|
322
|
+
</svg>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function XIcon() {
|
|
327
|
+
return (
|
|
328
|
+
<svg
|
|
329
|
+
width="12"
|
|
330
|
+
height="12"
|
|
331
|
+
viewBox="0 0 14 14"
|
|
332
|
+
fill="none"
|
|
333
|
+
stroke="currentColor"
|
|
334
|
+
strokeWidth="1.5"
|
|
335
|
+
strokeLinecap="round"
|
|
336
|
+
strokeLinejoin="round"
|
|
337
|
+
aria-hidden="true"
|
|
338
|
+
>
|
|
339
|
+
<path d="M4 4L10 10M10 4L4 10" />
|
|
340
|
+
</svg>
|
|
341
|
+
);
|
|
342
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import type { EnvVarInput, ResourceRef } from "@stigmer/sdk";
|
|
2
|
+
import type { AgentEnvFormVariable } from "./AgentEnvForm";
|
|
3
|
+
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Resolution — the outcome of agent setup, consumed by session creation
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Describes how the agent was resolved, determining how the caller
|
|
10
|
+
* should create the session and its first execution.
|
|
11
|
+
*
|
|
12
|
+
* - `"saved"` — Secrets were persisted to the user's personal
|
|
13
|
+
* environment and a personal agent instance was created (or already
|
|
14
|
+
* existed). Use `instanceId` with `createSession`.
|
|
15
|
+
* - `"oneTime"` — Secrets were collected but **not** persisted. Pass
|
|
16
|
+
* `runtimeEnv` to `createExecution` for this run only.
|
|
17
|
+
* - `"direct"` — The agent has no `env_spec` and needs no secrets.
|
|
18
|
+
* Create the session with `agentRef` directly.
|
|
19
|
+
*/
|
|
20
|
+
export type AgentResolution =
|
|
21
|
+
| { readonly mode: "saved"; readonly instanceId: string }
|
|
22
|
+
| { readonly mode: "oneTime"; readonly runtimeEnv: Record<string, EnvVarInput> }
|
|
23
|
+
| { readonly mode: "direct" };
|
|
24
|
+
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
// State machine — phases of the agent setup flow
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Discriminated union representing the current phase of the agent
|
|
31
|
+
* setup flow managed by {@link useAgentSetup}.
|
|
32
|
+
*
|
|
33
|
+
* The `status` field serves as the discriminant. Phase-specific data
|
|
34
|
+
* (agent reference, missing variables, resolution) is only present
|
|
35
|
+
* on the variants where it is meaningful, enabling TypeScript
|
|
36
|
+
* narrowing in consumer code.
|
|
37
|
+
*/
|
|
38
|
+
export type AgentSetupPhase =
|
|
39
|
+
| { readonly status: "idle" }
|
|
40
|
+
| { readonly status: "resolving"; readonly agentRef: ResourceRef }
|
|
41
|
+
| {
|
|
42
|
+
readonly status: "needsEnvVars";
|
|
43
|
+
readonly agentRef: ResourceRef;
|
|
44
|
+
readonly agentId: string;
|
|
45
|
+
readonly agentName: string;
|
|
46
|
+
readonly missingVariables: AgentEnvFormVariable[];
|
|
47
|
+
}
|
|
48
|
+
| {
|
|
49
|
+
readonly status: "submitting";
|
|
50
|
+
readonly agentRef: ResourceRef;
|
|
51
|
+
readonly agentId: string;
|
|
52
|
+
readonly agentName: string;
|
|
53
|
+
readonly missingVariables: AgentEnvFormVariable[];
|
|
54
|
+
}
|
|
55
|
+
| {
|
|
56
|
+
readonly status: "ready";
|
|
57
|
+
readonly agentRef: ResourceRef;
|
|
58
|
+
readonly agentName: string;
|
|
59
|
+
readonly resolution: AgentResolution;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Full state of the agent setup reducer: the current phase plus an
|
|
64
|
+
* orthogonal error slot.
|
|
65
|
+
*
|
|
66
|
+
* Errors can occur in any async transition (`resolving`, `submitting`)
|
|
67
|
+
* and are surfaced alongside the phase so the UI can show inline
|
|
68
|
+
* error messages without losing the current phase context.
|
|
69
|
+
*/
|
|
70
|
+
export type AgentSetupState = AgentSetupPhase & {
|
|
71
|
+
readonly error: Error | null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Result types — imperative return values from hook actions
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Result returned by {@link useAgentSetup.resolveAgent}.
|
|
80
|
+
*
|
|
81
|
+
* - `"ready"` — the agent can be used immediately.
|
|
82
|
+
* - `"needsEnvVars"` — the agent requires environment variables
|
|
83
|
+
* the user has not yet provided.
|
|
84
|
+
*/
|
|
85
|
+
export type AgentSetupResult =
|
|
86
|
+
| {
|
|
87
|
+
readonly status: "ready";
|
|
88
|
+
readonly agentRef: ResourceRef;
|
|
89
|
+
readonly agentName: string;
|
|
90
|
+
readonly resolution: AgentResolution;
|
|
91
|
+
}
|
|
92
|
+
| {
|
|
93
|
+
readonly status: "needsEnvVars";
|
|
94
|
+
readonly agentRef: ResourceRef;
|
|
95
|
+
readonly agentName: string;
|
|
96
|
+
readonly missingVariables: AgentEnvFormVariable[];
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Result returned by {@link useAgentSetup.submitEnvVars} — always `"ready"`. */
|
|
100
|
+
export type AgentSetupReadyResult = AgentSetupResult & { readonly status: "ready" };
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Actions
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
export type AgentSetupAction =
|
|
107
|
+
| { readonly type: "RESOLVE_START"; readonly agentRef: ResourceRef }
|
|
108
|
+
| {
|
|
109
|
+
readonly type: "RESOLVE_NEEDS_ENV";
|
|
110
|
+
readonly agentRef: ResourceRef;
|
|
111
|
+
readonly agentId: string;
|
|
112
|
+
readonly agentName: string;
|
|
113
|
+
readonly missingVariables: AgentEnvFormVariable[];
|
|
114
|
+
}
|
|
115
|
+
| {
|
|
116
|
+
readonly type: "RESOLVE_READY";
|
|
117
|
+
readonly agentRef: ResourceRef;
|
|
118
|
+
readonly agentName: string;
|
|
119
|
+
readonly resolution: AgentResolution;
|
|
120
|
+
}
|
|
121
|
+
| {
|
|
122
|
+
readonly type: "POOL_RESOLVE";
|
|
123
|
+
readonly missingVariables: AgentEnvFormVariable[];
|
|
124
|
+
}
|
|
125
|
+
| { readonly type: "SUBMIT_START" }
|
|
126
|
+
| {
|
|
127
|
+
readonly type: "SUBMIT_READY";
|
|
128
|
+
readonly agentRef: ResourceRef;
|
|
129
|
+
readonly agentName: string;
|
|
130
|
+
readonly resolution: AgentResolution;
|
|
131
|
+
}
|
|
132
|
+
| { readonly type: "ERROR"; readonly error: Error }
|
|
133
|
+
| { readonly type: "CLEAR_ERROR" }
|
|
134
|
+
| { readonly type: "RESET" };
|
|
135
|
+
|
|
136
|
+
// ---------------------------------------------------------------------------
|
|
137
|
+
// Reducer
|
|
138
|
+
// ---------------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
export const INITIAL_STATE: AgentSetupState = {
|
|
141
|
+
status: "idle",
|
|
142
|
+
error: null,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export function agentSetupReducer(
|
|
146
|
+
state: AgentSetupState,
|
|
147
|
+
action: AgentSetupAction,
|
|
148
|
+
): AgentSetupState {
|
|
149
|
+
switch (action.type) {
|
|
150
|
+
case "RESOLVE_START":
|
|
151
|
+
return { status: "resolving", agentRef: action.agentRef, error: null };
|
|
152
|
+
|
|
153
|
+
case "RESOLVE_NEEDS_ENV":
|
|
154
|
+
return {
|
|
155
|
+
status: "needsEnvVars",
|
|
156
|
+
agentRef: action.agentRef,
|
|
157
|
+
agentId: action.agentId,
|
|
158
|
+
agentName: action.agentName,
|
|
159
|
+
missingVariables: action.missingVariables,
|
|
160
|
+
error: null,
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
case "RESOLVE_READY":
|
|
164
|
+
return {
|
|
165
|
+
status: "ready",
|
|
166
|
+
agentRef: action.agentRef,
|
|
167
|
+
agentName: action.agentName,
|
|
168
|
+
resolution: action.resolution,
|
|
169
|
+
error: null,
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
case "POOL_RESOLVE": {
|
|
173
|
+
if (state.status !== "needsEnvVars") return state;
|
|
174
|
+
|
|
175
|
+
if (action.missingVariables.length === 0) {
|
|
176
|
+
return {
|
|
177
|
+
status: "ready",
|
|
178
|
+
agentRef: state.agentRef,
|
|
179
|
+
agentName: state.agentName,
|
|
180
|
+
resolution: { mode: "direct" },
|
|
181
|
+
error: null,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
...state,
|
|
187
|
+
missingVariables: action.missingVariables,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
case "SUBMIT_START": {
|
|
192
|
+
if (state.status !== "needsEnvVars") return state;
|
|
193
|
+
return {
|
|
194
|
+
status: "submitting",
|
|
195
|
+
agentRef: state.agentRef,
|
|
196
|
+
agentId: state.agentId,
|
|
197
|
+
agentName: state.agentName,
|
|
198
|
+
missingVariables: state.missingVariables,
|
|
199
|
+
error: null,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
case "SUBMIT_READY":
|
|
204
|
+
return {
|
|
205
|
+
status: "ready",
|
|
206
|
+
agentRef: action.agentRef,
|
|
207
|
+
agentName: action.agentName,
|
|
208
|
+
resolution: action.resolution,
|
|
209
|
+
error: null,
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
case "ERROR":
|
|
213
|
+
if (state.status === "submitting") {
|
|
214
|
+
return {
|
|
215
|
+
status: "needsEnvVars",
|
|
216
|
+
agentRef: state.agentRef,
|
|
217
|
+
agentId: state.agentId,
|
|
218
|
+
agentName: state.agentName,
|
|
219
|
+
missingVariables: state.missingVariables,
|
|
220
|
+
error: action.error,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
return { ...state, error: action.error };
|
|
224
|
+
|
|
225
|
+
case "CLEAR_ERROR":
|
|
226
|
+
return { ...state, error: null };
|
|
227
|
+
|
|
228
|
+
case "RESET":
|
|
229
|
+
return INITIAL_STATE;
|
|
230
|
+
|
|
231
|
+
default:
|
|
232
|
+
return state;
|
|
233
|
+
}
|
|
234
|
+
}
|