@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,75 @@
|
|
|
1
|
+
export interface UseArtifactContentReturn {
|
|
2
|
+
/**
|
|
3
|
+
* Decoded text content of the artifact, or `null` when:
|
|
4
|
+
* - Fetching is skipped (`executionId` or `storageKey` is `null`)
|
|
5
|
+
* - The request is in-flight
|
|
6
|
+
* - The request failed
|
|
7
|
+
*/
|
|
8
|
+
readonly content: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Detected content type (e.g., `"text/yaml"`, `"text/plain"`).
|
|
11
|
+
* `null` before the first successful fetch.
|
|
12
|
+
*/
|
|
13
|
+
readonly contentType: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the returned content was truncated by the server's
|
|
16
|
+
* `max_bytes` limit. When `true`, the full artifact should be
|
|
17
|
+
* downloaded via `getArtifactDownloadUrl` instead.
|
|
18
|
+
*/
|
|
19
|
+
readonly isTruncated: boolean;
|
|
20
|
+
/** `true` while the content request is in-flight. */
|
|
21
|
+
readonly isLoading: boolean;
|
|
22
|
+
/** Error message from the last failed attempt, or `null` when healthy. */
|
|
23
|
+
readonly error: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Re-fetch the artifact content. Uses the `fetchKey` counter pattern
|
|
26
|
+
* consistent with `refetch()` in other SDK hooks.
|
|
27
|
+
*/
|
|
28
|
+
readonly refetch: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Data hook that fetches the text content of a single execution artifact
|
|
32
|
+
* via `stigmer.agentExecution.getArtifactContent()`.
|
|
33
|
+
*
|
|
34
|
+
* The server reads the artifact from R2 and returns the bytes through the
|
|
35
|
+
* Stigmer API, eliminating CORS concerns for SDK consumers who need to
|
|
36
|
+
* read artifact content programmatically (YAML detection, preview
|
|
37
|
+
* rendering, resource type identification).
|
|
38
|
+
*
|
|
39
|
+
* Pass `null` for either parameter to skip fetching — consistent with
|
|
40
|
+
* the `useExecutionStream(null)` convention. The caller controls when
|
|
41
|
+
* to fetch based on artifact metadata (e.g., only for text artifacts
|
|
42
|
+
* below a size threshold):
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* const shouldFetch = isTextArtifact(artifact) && Number(artifact.sizeBytes) < MAX_SIZE;
|
|
46
|
+
* const { content } = useArtifactContent(
|
|
47
|
+
* shouldFetch ? executionId : null,
|
|
48
|
+
* shouldFetch ? artifact.storageKey : null,
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* For directory artifacts (ZIPs), pass `entryPath` to extract a specific
|
|
53
|
+
* file from the archive instead of returning the raw ZIP bytes:
|
|
54
|
+
*
|
|
55
|
+
* ```tsx
|
|
56
|
+
* const { content } = useArtifactContent(executionId, storageKey, "SKILL.md");
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* The server enforces a content size limit (default 512 KB). Content
|
|
60
|
+
* exceeding this limit is truncated — check `isTruncated` and offer
|
|
61
|
+
* a full download via the pre-signed URL for large artifacts.
|
|
62
|
+
*
|
|
63
|
+
* The returned `content` is decoded from UTF-8 bytes. For binary
|
|
64
|
+
* artifacts, use `getArtifactDownloadUrl` instead of this hook.
|
|
65
|
+
*
|
|
66
|
+
* @param executionId - Execution that produced the artifact, or `null` to skip.
|
|
67
|
+
* @param storageKey - Storage key from `ExecutionArtifact.storageKey`, or `null` to skip.
|
|
68
|
+
* @param entryPath - For directory artifacts: relative path of a file within
|
|
69
|
+
* the archive to extract. `null` returns the full artifact (existing behavior).
|
|
70
|
+
*
|
|
71
|
+
* @see useExecutionArtifacts — extracts artifact metadata from an execution
|
|
72
|
+
* @see isTextArtifact — heuristic for whether content is fetchable as text
|
|
73
|
+
*/
|
|
74
|
+
export declare function useArtifactContent(executionId: string | null, storageKey: string | null, entryPath?: string | null): UseArtifactContentReturn;
|
|
75
|
+
//# sourceMappingURL=useArtifactContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArtifactContent.d.ts","sourceRoot":"","sources":["../../src/execution/useArtifactContent.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,wBAAwB,CAiE1B"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { create } from "@bufbuild/protobuf";
|
|
4
|
+
import { GetArtifactContentRequestSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/io_pb";
|
|
5
|
+
import { useStigmer } from "../hooks";
|
|
6
|
+
/**
|
|
7
|
+
* Data hook that fetches the text content of a single execution artifact
|
|
8
|
+
* via `stigmer.agentExecution.getArtifactContent()`.
|
|
9
|
+
*
|
|
10
|
+
* The server reads the artifact from R2 and returns the bytes through the
|
|
11
|
+
* Stigmer API, eliminating CORS concerns for SDK consumers who need to
|
|
12
|
+
* read artifact content programmatically (YAML detection, preview
|
|
13
|
+
* rendering, resource type identification).
|
|
14
|
+
*
|
|
15
|
+
* Pass `null` for either parameter to skip fetching — consistent with
|
|
16
|
+
* the `useExecutionStream(null)` convention. The caller controls when
|
|
17
|
+
* to fetch based on artifact metadata (e.g., only for text artifacts
|
|
18
|
+
* below a size threshold):
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* const shouldFetch = isTextArtifact(artifact) && Number(artifact.sizeBytes) < MAX_SIZE;
|
|
22
|
+
* const { content } = useArtifactContent(
|
|
23
|
+
* shouldFetch ? executionId : null,
|
|
24
|
+
* shouldFetch ? artifact.storageKey : null,
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* For directory artifacts (ZIPs), pass `entryPath` to extract a specific
|
|
29
|
+
* file from the archive instead of returning the raw ZIP bytes:
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const { content } = useArtifactContent(executionId, storageKey, "SKILL.md");
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* The server enforces a content size limit (default 512 KB). Content
|
|
36
|
+
* exceeding this limit is truncated — check `isTruncated` and offer
|
|
37
|
+
* a full download via the pre-signed URL for large artifacts.
|
|
38
|
+
*
|
|
39
|
+
* The returned `content` is decoded from UTF-8 bytes. For binary
|
|
40
|
+
* artifacts, use `getArtifactDownloadUrl` instead of this hook.
|
|
41
|
+
*
|
|
42
|
+
* @param executionId - Execution that produced the artifact, or `null` to skip.
|
|
43
|
+
* @param storageKey - Storage key from `ExecutionArtifact.storageKey`, or `null` to skip.
|
|
44
|
+
* @param entryPath - For directory artifacts: relative path of a file within
|
|
45
|
+
* the archive to extract. `null` returns the full artifact (existing behavior).
|
|
46
|
+
*
|
|
47
|
+
* @see useExecutionArtifacts — extracts artifact metadata from an execution
|
|
48
|
+
* @see isTextArtifact — heuristic for whether content is fetchable as text
|
|
49
|
+
*/
|
|
50
|
+
export function useArtifactContent(executionId, storageKey, entryPath) {
|
|
51
|
+
const stigmer = useStigmer();
|
|
52
|
+
const [content, setContent] = useState(null);
|
|
53
|
+
const [contentType, setContentType] = useState(null);
|
|
54
|
+
const [isTruncated, setIsTruncated] = useState(false);
|
|
55
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
56
|
+
const [error, setError] = useState(null);
|
|
57
|
+
const [fetchKey, setFetchKey] = useState(0);
|
|
58
|
+
const refetch = useCallback(() => setFetchKey((k) => k + 1), []);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!executionId || !storageKey) {
|
|
61
|
+
setContent(null);
|
|
62
|
+
setContentType(null);
|
|
63
|
+
setIsTruncated(false);
|
|
64
|
+
setIsLoading(false);
|
|
65
|
+
setError(null);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const cancelled = { current: false };
|
|
69
|
+
setIsLoading(true);
|
|
70
|
+
setError(null);
|
|
71
|
+
stigmer.agentExecution
|
|
72
|
+
.getArtifactContent(create(GetArtifactContentRequestSchema, {
|
|
73
|
+
executionId,
|
|
74
|
+
storageKey,
|
|
75
|
+
...(entryPath ? { entryPath } : {}),
|
|
76
|
+
}))
|
|
77
|
+
.then((result) => {
|
|
78
|
+
if (cancelled.current)
|
|
79
|
+
return;
|
|
80
|
+
const decoded = new TextDecoder().decode(result.content);
|
|
81
|
+
setContent(decoded);
|
|
82
|
+
setContentType(result.contentType || null);
|
|
83
|
+
setIsTruncated(result.truncated);
|
|
84
|
+
setIsLoading(false);
|
|
85
|
+
}, (err) => {
|
|
86
|
+
if (cancelled.current)
|
|
87
|
+
return;
|
|
88
|
+
setError(err instanceof Error
|
|
89
|
+
? err.message
|
|
90
|
+
: "Failed to load artifact content");
|
|
91
|
+
setContent(null);
|
|
92
|
+
setContentType(null);
|
|
93
|
+
setIsTruncated(false);
|
|
94
|
+
setIsLoading(false);
|
|
95
|
+
});
|
|
96
|
+
return () => {
|
|
97
|
+
cancelled.current = true;
|
|
98
|
+
};
|
|
99
|
+
}, [executionId, storageKey, entryPath, stigmer, fetchKey]);
|
|
100
|
+
return { content, contentType, isTruncated, isLoading, error, refetch };
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=useArtifactContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArtifactContent.js","sourceRoot":"","sources":["../../src/execution/useArtifactContent.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AttachmentInput, EnvVarInput } from "@stigmer/sdk";
|
|
2
|
+
export interface CreateAgentExecutionInput {
|
|
3
|
+
readonly org: string;
|
|
4
|
+
readonly sessionId: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly modelName?: string;
|
|
7
|
+
readonly agentId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Execution-scoped secrets and configuration (Execution Flow).
|
|
10
|
+
*
|
|
11
|
+
* Values are injected into the agent sandbox for this execution only
|
|
12
|
+
* and deleted when the execution completes. They take the highest
|
|
13
|
+
* merge priority, overriding both Environment values and agent
|
|
14
|
+
* defaults.
|
|
15
|
+
*
|
|
16
|
+
* Use this for B2B integrations where per-call credentials are
|
|
17
|
+
* injected at runtime, or for one-off secrets that should not persist.
|
|
18
|
+
*
|
|
19
|
+
* For persistent credentials that are reused across executions, use
|
|
20
|
+
* the Environment Flow instead (store secrets in an Environment
|
|
21
|
+
* resource and bind them via an AgentInstance).
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://docs.stigmer.ai/product/how-to-provide-secrets | How to Provide Secrets}
|
|
24
|
+
*/
|
|
25
|
+
readonly runtimeEnv?: Record<string, EnvVarInput>;
|
|
26
|
+
/**
|
|
27
|
+
* Pre-uploaded file attachments injected into the agent sandbox.
|
|
28
|
+
*
|
|
29
|
+
* Each entry must include a `storageKey` obtained from
|
|
30
|
+
* `agentExecution.uploadAttachment()`. The agent can read attached
|
|
31
|
+
* files from their mount paths (default `/inputs/{filename}`).
|
|
32
|
+
*/
|
|
33
|
+
readonly attachments?: AttachmentInput[];
|
|
34
|
+
}
|
|
35
|
+
export interface CreateAgentExecutionResult {
|
|
36
|
+
readonly executionId: string;
|
|
37
|
+
readonly sessionId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface UseCreateAgentExecutionReturn {
|
|
40
|
+
readonly create: (input: CreateAgentExecutionInput) => Promise<CreateAgentExecutionResult>;
|
|
41
|
+
readonly isCreating: boolean;
|
|
42
|
+
readonly error: Error | null;
|
|
43
|
+
readonly clearError: () => void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Behavior hook that wraps `agentExecution.create()` with loading/error
|
|
47
|
+
* state.
|
|
48
|
+
*
|
|
49
|
+
* Maps 1:1 to the AgentExecution aggregate — a single run of an agent
|
|
50
|
+
* within an existing session. Requires a `sessionId`; use
|
|
51
|
+
* {@link useCreateSession} to create the session first.
|
|
52
|
+
*
|
|
53
|
+
* Supports both secret delivery flows:
|
|
54
|
+
*
|
|
55
|
+
* - **Environment Flow** — Secrets are stored in Environment resources
|
|
56
|
+
* and bound via AgentInstance. No `runtimeEnv` needed; the backend
|
|
57
|
+
* resolves credentials from the session's agent instance.
|
|
58
|
+
* - **Execution Flow** — Pass `runtimeEnv` to inject per-execution
|
|
59
|
+
* secrets. Values are merged with the highest priority and deleted
|
|
60
|
+
* when the execution completes.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* // Environment Flow: secrets come from the agent instance's environments
|
|
65
|
+
* const { create } = useCreateAgentExecution();
|
|
66
|
+
* await create({ org: "acme", sessionId: "ses_abc", message: "Review the PR" });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* // Execution Flow: inject per-call secrets
|
|
72
|
+
* const { create } = useCreateAgentExecution();
|
|
73
|
+
* await create({
|
|
74
|
+
* org: "acme",
|
|
75
|
+
* sessionId: "ses_abc",
|
|
76
|
+
* message: "Deploy to production",
|
|
77
|
+
* runtimeEnv: {
|
|
78
|
+
* CUSTOMER_API_KEY: { value: "cust_xyz...", isSecret: true },
|
|
79
|
+
* },
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export declare function useCreateAgentExecution(): UseCreateAgentExecutionReturn;
|
|
84
|
+
//# sourceMappingURL=useCreateAgentExecution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateAgentExecution.d.ts","sourceRoot":"","sources":["../../src/execution/useCreateAgentExecution.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIjE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,CACf,KAAK,EAAE,yBAAyB,KAC7B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,uBAAuB,IAAI,6BAA6B,CA2CvE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
import { useStigmer } from "../hooks";
|
|
4
|
+
import { toError } from "../internal/toError";
|
|
5
|
+
/**
|
|
6
|
+
* Behavior hook that wraps `agentExecution.create()` with loading/error
|
|
7
|
+
* state.
|
|
8
|
+
*
|
|
9
|
+
* Maps 1:1 to the AgentExecution aggregate — a single run of an agent
|
|
10
|
+
* within an existing session. Requires a `sessionId`; use
|
|
11
|
+
* {@link useCreateSession} to create the session first.
|
|
12
|
+
*
|
|
13
|
+
* Supports both secret delivery flows:
|
|
14
|
+
*
|
|
15
|
+
* - **Environment Flow** — Secrets are stored in Environment resources
|
|
16
|
+
* and bound via AgentInstance. No `runtimeEnv` needed; the backend
|
|
17
|
+
* resolves credentials from the session's agent instance.
|
|
18
|
+
* - **Execution Flow** — Pass `runtimeEnv` to inject per-execution
|
|
19
|
+
* secrets. Values are merged with the highest priority and deleted
|
|
20
|
+
* when the execution completes.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* // Environment Flow: secrets come from the agent instance's environments
|
|
25
|
+
* const { create } = useCreateAgentExecution();
|
|
26
|
+
* await create({ org: "acme", sessionId: "ses_abc", message: "Review the PR" });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* // Execution Flow: inject per-call secrets
|
|
32
|
+
* const { create } = useCreateAgentExecution();
|
|
33
|
+
* await create({
|
|
34
|
+
* org: "acme",
|
|
35
|
+
* sessionId: "ses_abc",
|
|
36
|
+
* message: "Deploy to production",
|
|
37
|
+
* runtimeEnv: {
|
|
38
|
+
* CUSTOMER_API_KEY: { value: "cust_xyz...", isSecret: true },
|
|
39
|
+
* },
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export function useCreateAgentExecution() {
|
|
44
|
+
const stigmer = useStigmer();
|
|
45
|
+
const [isCreating, setIsCreating] = useState(false);
|
|
46
|
+
const [error, setError] = useState(null);
|
|
47
|
+
const clearError = useCallback(() => setError(null), []);
|
|
48
|
+
const create = useCallback(async (input) => {
|
|
49
|
+
setIsCreating(true);
|
|
50
|
+
setError(null);
|
|
51
|
+
try {
|
|
52
|
+
const execution = await stigmer.agentExecution.create({
|
|
53
|
+
name: `execution-${Date.now()}`,
|
|
54
|
+
org: input.org,
|
|
55
|
+
sessionId: input.sessionId,
|
|
56
|
+
agentId: input.agentId,
|
|
57
|
+
message: input.message,
|
|
58
|
+
executionConfig: input.modelName
|
|
59
|
+
? { modelName: input.modelName }
|
|
60
|
+
: undefined,
|
|
61
|
+
runtimeEnv: input.runtimeEnv,
|
|
62
|
+
attachments: input.attachments,
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
executionId: execution.metadata.id,
|
|
66
|
+
sessionId: input.sessionId,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
setError(toError(err));
|
|
71
|
+
throw err;
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
setIsCreating(false);
|
|
75
|
+
}
|
|
76
|
+
}, [stigmer]);
|
|
77
|
+
return { create, isCreating, error, clearError };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=useCreateAgentExecution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateAgentExecution.js","sourceRoot":"","sources":["../../src/execution/useCreateAgentExecution.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAkD9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EACH,KAAgC,EACK,EAAE;QACvC,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;gBACpD,IAAI,EAAE,aAAa,IAAI,CAAC,GAAG,EAAE,EAAE;gBAC/B,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,eAAe,EAAE,KAAK,CAAC,SAAS;oBAC9B,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE;oBAChC,CAAC,CAAC,SAAS;gBACb,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;aAC/B,CAAC,CAAC;YAEH,OAAO;gBACL,WAAW,EAAE,SAAS,CAAC,QAAS,CAAC,EAAE;gBACnC,SAAS,EAAE,KAAK,CAAC,SAAS;aAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
2
|
+
import type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/artifact_pb";
|
|
3
|
+
export interface UseExecutionArtifactsReturn {
|
|
4
|
+
/** Artifacts published by the agent during execution. Ordered by creation time (oldest first). */
|
|
5
|
+
readonly artifacts: readonly ExecutionArtifact[];
|
|
6
|
+
/** `true` when the execution has at least one artifact. */
|
|
7
|
+
readonly hasArtifacts: boolean;
|
|
8
|
+
/** Total number of artifacts. */
|
|
9
|
+
readonly artifactCount: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Pure derivation hook that extracts artifact metadata from an
|
|
13
|
+
* {@link AgentExecution} snapshot.
|
|
14
|
+
*
|
|
15
|
+
* Follows the same pattern as {@link useExecutionUsage}: a `useMemo`-based
|
|
16
|
+
* derivation with no side effects and no data fetching. The execution
|
|
17
|
+
* object (typically from {@link useExecutionStream}) is the single input.
|
|
18
|
+
*
|
|
19
|
+
* Returns an empty array when the execution is `null` or has no artifacts,
|
|
20
|
+
* eliminating null-checking at every consumer call site.
|
|
21
|
+
*
|
|
22
|
+
* For reading artifact *content* (e.g., for YAML detection or preview
|
|
23
|
+
* rendering), compose with {@link useArtifactContent} on a per-artifact
|
|
24
|
+
* basis. For determining whether an artifact is text-based, use
|
|
25
|
+
* {@link isTextArtifact}.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const { execution } = useExecutionStream(executionId);
|
|
30
|
+
* const { artifacts, hasArtifacts } = useExecutionArtifacts(execution);
|
|
31
|
+
*
|
|
32
|
+
* if (hasArtifacts) {
|
|
33
|
+
* artifacts.forEach((a) => console.log(a.name, a.sizeBytes));
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see useArtifactContent — content-fetching hook for a single artifact
|
|
38
|
+
* @see isTextArtifact — heuristic for fetchable text content
|
|
39
|
+
* @see formatArtifactSize — human-readable file size formatting
|
|
40
|
+
*/
|
|
41
|
+
export declare function useExecutionArtifacts(execution: AgentExecution | null): UseExecutionArtifactsReturn;
|
|
42
|
+
//# sourceMappingURL=useExecutionArtifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutionArtifacts.d.ts","sourceRoot":"","sources":["../../src/execution/useExecutionArtifacts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAE1G,MAAM,WAAW,2BAA2B;IAC1C,kGAAkG;IAClG,QAAQ,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACjD,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,cAAc,GAAG,IAAI,GAC/B,2BAA2B,CAU7B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Pure derivation hook that extracts artifact metadata from an
|
|
5
|
+
* {@link AgentExecution} snapshot.
|
|
6
|
+
*
|
|
7
|
+
* Follows the same pattern as {@link useExecutionUsage}: a `useMemo`-based
|
|
8
|
+
* derivation with no side effects and no data fetching. The execution
|
|
9
|
+
* object (typically from {@link useExecutionStream}) is the single input.
|
|
10
|
+
*
|
|
11
|
+
* Returns an empty array when the execution is `null` or has no artifacts,
|
|
12
|
+
* eliminating null-checking at every consumer call site.
|
|
13
|
+
*
|
|
14
|
+
* For reading artifact *content* (e.g., for YAML detection or preview
|
|
15
|
+
* rendering), compose with {@link useArtifactContent} on a per-artifact
|
|
16
|
+
* basis. For determining whether an artifact is text-based, use
|
|
17
|
+
* {@link isTextArtifact}.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* const { execution } = useExecutionStream(executionId);
|
|
22
|
+
* const { artifacts, hasArtifacts } = useExecutionArtifacts(execution);
|
|
23
|
+
*
|
|
24
|
+
* if (hasArtifacts) {
|
|
25
|
+
* artifacts.forEach((a) => console.log(a.name, a.sizeBytes));
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @see useArtifactContent — content-fetching hook for a single artifact
|
|
30
|
+
* @see isTextArtifact — heuristic for fetchable text content
|
|
31
|
+
* @see formatArtifactSize — human-readable file size formatting
|
|
32
|
+
*/
|
|
33
|
+
export function useExecutionArtifacts(execution) {
|
|
34
|
+
return useMemo(() => {
|
|
35
|
+
const artifacts = execution?.status?.artifacts ?? [];
|
|
36
|
+
return {
|
|
37
|
+
artifacts,
|
|
38
|
+
hasArtifacts: artifacts.length > 0,
|
|
39
|
+
artifactCount: artifacts.length,
|
|
40
|
+
};
|
|
41
|
+
}, [execution]);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=useExecutionArtifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutionArtifacts.js","sourceRoot":"","sources":["../../src/execution/useExecutionArtifacts.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAahC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAAgC;IAEhC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;QAErD,OAAO;YACL,SAAS;YACT,YAAY,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;YAClC,aAAa,EAAE,SAAS,CAAC,MAAM;SAChC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
2
|
+
import { ExecutionPhase } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
3
|
+
export interface UseExecutionStreamReturn {
|
|
4
|
+
/** Latest full execution snapshot from the stream, or `null` before the first update arrives. */
|
|
5
|
+
readonly execution: AgentExecution | null;
|
|
6
|
+
/**
|
|
7
|
+
* Convenience extraction of `execution.status.phase`.
|
|
8
|
+
*
|
|
9
|
+
* Derived from `execution` via `useMemo` — always consistent with the
|
|
10
|
+
* current snapshot. Returns `EXECUTION_PHASE_UNSPECIFIED` when
|
|
11
|
+
* `execution` is `null`.
|
|
12
|
+
*/
|
|
13
|
+
readonly phase: ExecutionPhase;
|
|
14
|
+
/** `true` while receiving non-terminal updates from the server stream. */
|
|
15
|
+
readonly isStreaming: boolean;
|
|
16
|
+
/** `true` after subscription starts but before the first snapshot arrives. */
|
|
17
|
+
readonly isConnecting: boolean;
|
|
18
|
+
/** Error from the last failed stream attempt, or `null` when healthy. */
|
|
19
|
+
readonly error: Error | null;
|
|
20
|
+
/**
|
|
21
|
+
* Reset error state and re-establish the stream subscription.
|
|
22
|
+
*
|
|
23
|
+
* Works in any lifecycle state — error, complete, or mid-stream.
|
|
24
|
+
* Uses the `connectKey` counter pattern consistent with `refetch()`
|
|
25
|
+
* in other SDK hooks.
|
|
26
|
+
*/
|
|
27
|
+
readonly reconnect: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Behavior hook that subscribes to real-time {@link AgentExecution}
|
|
31
|
+
* updates via `stigmer.agentExecution.subscribe()`.
|
|
32
|
+
*
|
|
33
|
+
* Manages the full subscription lifecycle: connection establishment,
|
|
34
|
+
* snapshot streaming, terminal-phase detection, error handling, and
|
|
35
|
+
* manual reconnection. Each server message replaces the previous
|
|
36
|
+
* snapshot atomically — no delta merging.
|
|
37
|
+
*
|
|
38
|
+
* Pass `null` to skip subscribing (stable no-op). When `executionId`
|
|
39
|
+
* changes, the previous subscription is aborted and a fresh one begins.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* function LiveExecution({ id }: { id: string }) {
|
|
44
|
+
* const { execution, isStreaming, error, reconnect } =
|
|
45
|
+
* useExecutionStream(id);
|
|
46
|
+
*
|
|
47
|
+
* if (error) return <p>{error.message} <button onClick={reconnect}>Retry</button></p>;
|
|
48
|
+
* if (!execution) return <p>Connecting…</p>;
|
|
49
|
+
*
|
|
50
|
+
* return (
|
|
51
|
+
* <div>
|
|
52
|
+
* {execution.status?.messages.map((m, i) => (
|
|
53
|
+
* <p key={i}>{m.content}</p>
|
|
54
|
+
* ))}
|
|
55
|
+
* {isStreaming && <span>Streaming…</span>}
|
|
56
|
+
* </div>
|
|
57
|
+
* );
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function useExecutionStream(executionId: string | null): UseExecutionStreamReturn;
|
|
62
|
+
//# sourceMappingURL=useExecutionStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutionStream.d.ts","sourceRoot":"","sources":["../../src/execution/useExecutionStream.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAK9F,MAAM,WAAW,wBAAwB;IACvC,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,GAAG,IAAI,GACzB,wBAAwB,CA8E1B"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { ExecutionPhase } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
4
|
+
import { useStigmer } from "../hooks";
|
|
5
|
+
import { toError } from "../internal/toError";
|
|
6
|
+
import { isTerminalPhase } from "./execution-phases";
|
|
7
|
+
/**
|
|
8
|
+
* Behavior hook that subscribes to real-time {@link AgentExecution}
|
|
9
|
+
* updates via `stigmer.agentExecution.subscribe()`.
|
|
10
|
+
*
|
|
11
|
+
* Manages the full subscription lifecycle: connection establishment,
|
|
12
|
+
* snapshot streaming, terminal-phase detection, error handling, and
|
|
13
|
+
* manual reconnection. Each server message replaces the previous
|
|
14
|
+
* snapshot atomically — no delta merging.
|
|
15
|
+
*
|
|
16
|
+
* Pass `null` to skip subscribing (stable no-op). When `executionId`
|
|
17
|
+
* changes, the previous subscription is aborted and a fresh one begins.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* function LiveExecution({ id }: { id: string }) {
|
|
22
|
+
* const { execution, isStreaming, error, reconnect } =
|
|
23
|
+
* useExecutionStream(id);
|
|
24
|
+
*
|
|
25
|
+
* if (error) return <p>{error.message} <button onClick={reconnect}>Retry</button></p>;
|
|
26
|
+
* if (!execution) return <p>Connecting…</p>;
|
|
27
|
+
*
|
|
28
|
+
* return (
|
|
29
|
+
* <div>
|
|
30
|
+
* {execution.status?.messages.map((m, i) => (
|
|
31
|
+
* <p key={i}>{m.content}</p>
|
|
32
|
+
* ))}
|
|
33
|
+
* {isStreaming && <span>Streaming…</span>}
|
|
34
|
+
* </div>
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export function useExecutionStream(executionId) {
|
|
40
|
+
const stigmer = useStigmer();
|
|
41
|
+
const [execution, setExecution] = useState(null);
|
|
42
|
+
const [isConnecting, setIsConnecting] = useState(false);
|
|
43
|
+
const [isStreaming, setIsStreaming] = useState(false);
|
|
44
|
+
const [error, setError] = useState(null);
|
|
45
|
+
const [connectKey, setConnectKey] = useState(0);
|
|
46
|
+
const abortRef = useRef(null);
|
|
47
|
+
const reconnect = useCallback(() => {
|
|
48
|
+
setError(null);
|
|
49
|
+
setConnectKey((k) => k + 1);
|
|
50
|
+
}, []);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (!executionId) {
|
|
53
|
+
setExecution(null);
|
|
54
|
+
setIsConnecting(false);
|
|
55
|
+
setIsStreaming(false);
|
|
56
|
+
setError(null);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
abortRef.current?.abort();
|
|
60
|
+
const controller = new AbortController();
|
|
61
|
+
abortRef.current = controller;
|
|
62
|
+
setExecution(null);
|
|
63
|
+
setIsConnecting(true);
|
|
64
|
+
setIsStreaming(false);
|
|
65
|
+
setError(null);
|
|
66
|
+
(async () => {
|
|
67
|
+
try {
|
|
68
|
+
for await (const snapshot of stigmer.agentExecution.subscribe(executionId, controller.signal)) {
|
|
69
|
+
if (controller.signal.aborted)
|
|
70
|
+
return;
|
|
71
|
+
const currentPhase = snapshot.status?.phase ??
|
|
72
|
+
ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED;
|
|
73
|
+
const isTerminal = isTerminalPhase(currentPhase);
|
|
74
|
+
setExecution(snapshot);
|
|
75
|
+
setIsConnecting(false);
|
|
76
|
+
setIsStreaming(!isTerminal);
|
|
77
|
+
if (isTerminal)
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
if (!controller.signal.aborted) {
|
|
81
|
+
setIsStreaming(false);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
if (controller.signal.aborted)
|
|
86
|
+
return;
|
|
87
|
+
setError(toError(err));
|
|
88
|
+
setIsConnecting(false);
|
|
89
|
+
setIsStreaming(false);
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
return () => {
|
|
93
|
+
controller.abort();
|
|
94
|
+
};
|
|
95
|
+
}, [executionId, stigmer, connectKey]);
|
|
96
|
+
const phase = useMemo(() => execution?.status?.phase ?? ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED, [execution]);
|
|
97
|
+
return { execution, phase, isStreaming, isConnecting, error, reconnect };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=useExecutionStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutionStream.js","sourceRoot":"","sources":["../../src/execution/useExecutionStream.ts"],"names":[],"mappings":"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"}
|