@invect/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/Invect-CWpIwZ5F.js +92738 -0
- package/dist/Invect.d.ts +25 -0
- package/dist/InvectShell.d.ts +14 -0
- package/dist/api/agent-tools.api.d.ts +1 -0
- package/dist/api/client.d.ts +207 -0
- package/dist/api/credentials.api.d.ts +47 -0
- package/dist/api/executions.api.d.ts +43 -0
- package/dist/api/flows.api.d.ts +100 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/node-data.api.d.ts +66 -0
- package/dist/api/query-keys.d.ts +22 -0
- package/dist/api/triggers.api.d.ts +44 -0
- package/dist/api/types.d.ts +147 -0
- package/dist/api/use-flow-run-stream.d.ts +12 -0
- package/dist/assets/invect-branding.d.ts +4 -0
- package/dist/assets/provider-icons/index.d.ts +8 -0
- package/dist/babel-C9OtljFZ.js +9721 -0
- package/dist/components/PageLayout.d.ts +17 -0
- package/dist/components/chat/ChatInput.d.ts +17 -0
- package/dist/components/chat/ChatMessageList.d.ts +14 -0
- package/dist/components/chat/ChatModelSelector.d.ts +11 -0
- package/dist/components/chat/ChatPanel.d.ts +19 -0
- package/dist/components/chat/ChatPromptOverlay.d.ts +13 -0
- package/dist/components/chat/ChatProviderSelector.d.ts +9 -0
- package/dist/components/chat/ChatSettingsPanel.d.ts +11 -0
- package/dist/components/chat/InlineCredentialSetup.d.ts +9 -0
- package/dist/components/chat/MarkdownRenderer.d.ts +7 -0
- package/dist/components/chat/chat-memory.d.ts +21 -0
- package/dist/components/chat/chat.store.d.ts +416 -0
- package/dist/components/chat/index.d.ts +5 -0
- package/dist/components/chat/use-chat.d.ts +28 -0
- package/dist/components/credentials/CreateCredentialModal.d.ts +13 -0
- package/dist/components/credentials/CredentialDetailDialog.d.ts +17 -0
- package/dist/components/credentials/EditCredentialModal.d.ts +11 -0
- package/dist/components/credentials/OAuth2ConnectButton.d.ts +38 -0
- package/dist/components/credentials/OAuth2ProviderSelector.d.ts +15 -0
- package/dist/components/credentials/credential-utils.d.ts +12 -0
- package/dist/components/credentials/index.d.ts +9 -0
- package/dist/components/dashboard/FailedRunsAlert.d.ts +3 -0
- package/dist/components/dashboard/FlowCard.d.ts +7 -0
- package/dist/components/dashboard/RecentActivityTable.d.ts +9 -0
- package/dist/components/dashboard/StatCard.d.ts +10 -0
- package/dist/components/dashboard/index.d.ts +5 -0
- package/dist/components/dashboard/status-helpers.d.ts +5 -0
- package/dist/components/flow-editor/ActionsSidebar.d.ts +2 -0
- package/dist/components/flow-editor/FlowEditor.d.ts +21 -0
- package/dist/components/flow-editor/FlowHeader.d.ts +9 -0
- package/dist/components/flow-editor/FlowLayout.d.ts +24 -0
- package/dist/components/flow-editor/ModeSwitcher.d.ts +7 -0
- package/dist/components/flow-editor/NodeSidebar.d.ts +24 -0
- package/dist/components/flow-editor/RunControls.d.ts +12 -0
- package/dist/components/flow-editor/ToolConfigPanel.d.ts +16 -0
- package/dist/components/flow-editor/ValidationPanel.d.ts +5 -0
- package/dist/components/flow-editor/flow-editor.store.d.ts +1 -0
- package/dist/components/flow-editor/index.d.ts +6 -0
- package/dist/components/flow-editor/inline-edit.d.ts +10 -0
- package/dist/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/CredentialCombobox.d.ts +21 -0
- package/dist/components/flow-editor/node-config-panel/CredentialsSection.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/DroppableInput.d.ts +20 -0
- package/dist/components/flow-editor/node-config-panel/DynamicSelectField.d.ts +22 -0
- package/dist/components/flow-editor/node-config-panel/JsonPreviewPanel.d.ts +25 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanel.d.ts +14 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanelHeader.d.ts +15 -0
- package/dist/components/flow-editor/node-config-panel/ParametersSection.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/SearchableSelectField.d.ts +17 -0
- package/dist/components/flow-editor/node-config-panel/SwitchCasesField.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/hooks/index.d.ts +2 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.d.ts +24 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-execution.d.ts +46 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-upstream-slots.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/panels/AgentToolsPanel.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/panels/ConfigurationPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/DataMapperPane.d.ts +40 -0
- package/dist/components/flow-editor/node-config-panel/panels/InputPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/OutputPanel.d.ts +7 -0
- package/dist/components/flow-editor/node-config-panel/panels/index.d.ts +4 -0
- package/dist/components/flow-editor/node-config-panel/types.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-panel-store.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-state.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/use-run-node.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/utils.d.ts +9 -0
- package/dist/components/flow-editor/serialize-to-sdk.d.ts +20 -0
- package/dist/components/flow-editor/toolbar-context.d.ts +2 -0
- package/dist/components/flow-editor/use-copy-paste.d.ts +7 -0
- package/dist/components/flow-editor/use-copy-paste.types.d.ts +38 -0
- package/dist/components/flow-editor/use-flow-editor.d.ts +44 -0
- package/dist/components/flow-runs-table/FlowRunsTable.d.ts +6 -0
- package/dist/components/flow-runs-table/index.d.ts +1 -0
- package/dist/components/flow-viewer/FlowRunsView.d.ts +7 -0
- package/dist/components/flow-viewer/FlowStatusView.d.ts +21 -0
- package/dist/components/flow-viewer/RunSelector.d.ts +13 -0
- package/dist/components/flow-viewer/RunsSidebar.d.ts +14 -0
- package/dist/components/flow-viewer/agent-tool-executions-list.d.ts +7 -0
- package/dist/components/flow-viewer/index.d.ts +1 -0
- package/dist/components/flow-viewer/logs-panel.d.ts +18 -0
- package/dist/components/flow-viewer/use-execution-log-data.d.ts +113 -0
- package/dist/components/graph/BatchFlowEdge.d.ts +33 -0
- package/dist/components/graph/LayoutSelector.d.ts +9 -0
- package/dist/components/graph/index.d.ts +47 -0
- package/dist/components/graph/styleUtils.d.ts +124 -0
- package/dist/components/nodes/AgentConfigPanel.d.ts +24 -0
- package/dist/components/nodes/AgentNode.d.ts +8 -0
- package/dist/components/nodes/AgentToolsBox.d.ts +41 -0
- package/dist/components/nodes/NodeAppendix.d.ts +19 -0
- package/dist/components/nodes/NodeStatusIndicator.d.ts +30 -0
- package/dist/components/nodes/NodeViewContext.d.ts +18 -0
- package/dist/components/nodes/ToolParamField.d.ts +28 -0
- package/dist/components/nodes/ToolSelectorModal.d.ts +80 -0
- package/dist/components/nodes/ToolSelectorParts.d.ts +30 -0
- package/dist/components/nodes/UniversalNode.d.ts +2 -0
- package/dist/components/nodes/createContextAwareNodes.d.ts +6 -0
- package/dist/components/nodes/index.d.ts +22 -0
- package/dist/components/nodes/nodeRegistry.d.ts +13 -0
- package/dist/components/nodes/withNodeContext.d.ts +7 -0
- package/dist/components/shared/InvectLoader.d.ts +8 -0
- package/dist/components/shared/InvectLogo.d.ts +9 -0
- package/dist/components/shared/ProviderIcon.d.ts +23 -0
- package/dist/components/side-menu/side-menu.d.ts +4 -0
- package/dist/components/sidebar/BaseSidebar.d.ts +17 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/triggers/CronPreview.d.ts +12 -0
- package/dist/components/triggers/index.d.ts +1 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/codemirror-js-editor.d.ts +25 -0
- package/dist/components/ui/codemirror-json-editor.d.ts +18 -0
- package/dist/components/ui/codemirror-nunjucks-editor.d.ts +13 -0
- package/dist/components/ui/codemirror-vscode-theme.d.ts +24 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/empty-state.d.ts +21 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tree-view.d.ts +107 -0
- package/dist/contexts/AgentToolCallbacksContext.d.ts +23 -0
- package/dist/contexts/ApiContext.d.ts +11 -0
- package/dist/contexts/FlowDataContext.d.ts +9 -0
- package/dist/contexts/NodeRegistryContext.d.ts +14 -0
- package/dist/contexts/PluginRegistryContext.d.ts +39 -0
- package/dist/contexts/ThemeProvider.d.ts +18 -0
- package/dist/contexts/ValidationContext.d.ts +22 -0
- package/dist/demo/DemoInvect.d.ts +11 -0
- package/dist/demo/FlowViewer.d.ts +31 -0
- package/dist/demo/demo-api-client.d.ts +33 -0
- package/dist/demo/index.d.ts +6 -0
- package/dist/demo/sample-data.d.ts +1538 -0
- package/dist/demo.d.ts +2 -0
- package/dist/demo.js +2774 -0
- package/dist/estree-ClbRfS-1.js +7076 -0
- package/dist/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-document-title.d.ts +1 -0
- package/dist/hooks/use-flow-data.d.ts +22 -0
- package/dist/hooks/use-invect-portal-class.d.ts +21 -0
- package/dist/hooks/useFlowEditorStore.d.ts +1 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +717 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/prettier.d.ts +13 -0
- package/dist/routes/all-flow-runs.d.ts +5 -0
- package/dist/routes/credentials.d.ts +5 -0
- package/dist/routes/flow-route-layout.d.ts +19 -0
- package/dist/routes/flow-runs.d.ts +5 -0
- package/dist/routes/flow.d.ts +5 -0
- package/dist/routes/home.d.ts +5 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/standalone-C3Df7W52.js +3463 -0
- package/dist/stores/executionViewStore.d.ts +64 -0
- package/dist/stores/flow-editor.store.d.ts +137 -0
- package/dist/stores/flowEditorStore.d.ts +1 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/uiStore.d.ts +45 -0
- package/dist/types/agent-tools.types.d.ts +53 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/node-definition.types.d.ts +85 -0
- package/dist/types/plugin.types.d.ts +100 -0
- package/dist/utils/credentialBranding.d.ts +8 -0
- package/dist/utils/credentialFiltering.d.ts +20 -0
- package/dist/utils/flowTransformations.d.ts +16 -0
- package/dist/utils/layoutUtils.d.ts +23 -0
- package/dist/utils/nodeReferenceUtils.d.ts +37 -0
- package/dist/vendor.d.ts +5 -0
- package/package.json +130 -0
- package/src/.DS_Store +0 -0
- package/src/Invect.tsx +229 -0
- package/src/InvectShell.tsx +55 -0
- package/src/api/agent-tools.api.ts +23 -0
- package/src/api/client.ts +899 -0
- package/src/api/credentials.api.ts +197 -0
- package/src/api/executions.api.ts +228 -0
- package/src/api/flows.api.ts +195 -0
- package/src/api/index.ts +17 -0
- package/src/api/node-data.api.ts +167 -0
- package/src/api/query-keys.ts +44 -0
- package/src/api/triggers.api.ts +120 -0
- package/src/api/types.ts +212 -0
- package/src/api/use-flow-run-stream.ts +206 -0
- package/src/app.css +560 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/src/assets/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/src/assets/invect-branding.ts +51 -0
- package/src/assets/provider-icons/anthropic.svg +1 -0
- package/src/assets/provider-icons/anthropic_light.svg +1 -0
- package/src/assets/provider-icons/github.svg +1 -0
- package/src/assets/provider-icons/github_light.svg +1 -0
- package/src/assets/provider-icons/gmail.svg +1 -0
- package/src/assets/provider-icons/google_calendar.svg +1 -0
- package/src/assets/provider-icons/google_docs.svg +1 -0
- package/src/assets/provider-icons/google_drive.svg +1 -0
- package/src/assets/provider-icons/google_sheets.svg +1 -0
- package/src/assets/provider-icons/index.ts +55 -0
- package/src/assets/provider-icons/linear.svg +1 -0
- package/src/assets/provider-icons/openai.svg +1 -0
- package/src/assets/provider-icons/postgres.svg +1 -0
- package/src/assets/provider-icons/slack.svg +1 -0
- package/src/assets/small-loader-dark.svg +22 -0
- package/src/assets/small-loader-light.svg +22 -0
- package/src/assets/small.svg +7 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/PageLayout.tsx +55 -0
- package/src/components/chat/ChatInput.tsx +115 -0
- package/src/components/chat/ChatMessageList.tsx +788 -0
- package/src/components/chat/ChatModelSelector.tsx +208 -0
- package/src/components/chat/ChatPanel.tsx +243 -0
- package/src/components/chat/ChatPromptOverlay.tsx +150 -0
- package/src/components/chat/ChatProviderSelector.tsx +135 -0
- package/src/components/chat/ChatSettingsPanel.tsx +277 -0
- package/src/components/chat/InlineCredentialSetup.tsx +343 -0
- package/src/components/chat/MarkdownRenderer.tsx +140 -0
- package/src/components/chat/chat-memory.ts +88 -0
- package/src/components/chat/chat.store.ts +479 -0
- package/src/components/chat/index.ts +5 -0
- package/src/components/chat/use-chat.ts +473 -0
- package/src/components/credentials/CreateCredentialModal.tsx +609 -0
- package/src/components/credentials/CredentialDetailDialog.tsx +882 -0
- package/src/components/credentials/EditCredentialModal.tsx +399 -0
- package/src/components/credentials/OAuth2ConnectButton.tsx +288 -0
- package/src/components/credentials/OAuth2ProviderSelector.tsx +360 -0
- package/src/components/credentials/credential-utils.ts +99 -0
- package/src/components/credentials/index.ts +10 -0
- package/src/components/dashboard/FailedRunsAlert.tsx +67 -0
- package/src/components/dashboard/FlowCard.tsx +64 -0
- package/src/components/dashboard/RecentActivityTable.tsx +92 -0
- package/src/components/dashboard/StatCard.tsx +32 -0
- package/src/components/dashboard/index.ts +5 -0
- package/src/components/dashboard/status-helpers.tsx +102 -0
- package/src/components/flow-editor/ActionsSidebar.tsx +503 -0
- package/src/components/flow-editor/FlowEditor.tsx +1002 -0
- package/src/components/flow-editor/FlowHeader.tsx +87 -0
- package/src/components/flow-editor/FlowLayout.tsx +117 -0
- package/src/components/flow-editor/ModeSwitcher.tsx +49 -0
- package/src/components/flow-editor/NodeSidebar.tsx +343 -0
- package/src/components/flow-editor/RunControls.tsx +109 -0
- package/src/components/flow-editor/ToolConfigPanel.tsx +434 -0
- package/src/components/flow-editor/ValidationPanel.tsx +167 -0
- package/src/components/flow-editor/flow-editor.store.ts +2 -0
- package/src/components/flow-editor/index.ts +6 -0
- package/src/components/flow-editor/inline-edit.tsx +111 -0
- package/src/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.tsx +334 -0
- package/src/components/flow-editor/node-config-panel/CredentialCombobox.tsx +217 -0
- package/src/components/flow-editor/node-config-panel/CredentialsSection.tsx +154 -0
- package/src/components/flow-editor/node-config-panel/DroppableInput.tsx +45 -0
- package/src/components/flow-editor/node-config-panel/DynamicSelectField.tsx +223 -0
- package/src/components/flow-editor/node-config-panel/JsonPreviewPanel.tsx +134 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanel.tsx +650 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanelHeader.tsx +91 -0
- package/src/components/flow-editor/node-config-panel/ParametersSection.tsx +144 -0
- package/src/components/flow-editor/node-config-panel/SearchableSelectField.tsx +126 -0
- package/src/components/flow-editor/node-config-panel/SwitchCasesField.tsx +212 -0
- package/src/components/flow-editor/node-config-panel/hooks/index.ts +2 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.ts +284 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-execution.ts +287 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-upstream-slots.ts +310 -0
- package/src/components/flow-editor/node-config-panel/panels/AgentToolsPanel.tsx +837 -0
- package/src/components/flow-editor/node-config-panel/panels/ConfigurationPanel.tsx +383 -0
- package/src/components/flow-editor/node-config-panel/panels/DataMapperPane.tsx +456 -0
- package/src/components/flow-editor/node-config-panel/panels/InputPanel.tsx +338 -0
- package/src/components/flow-editor/node-config-panel/panels/OutputPanel.tsx +109 -0
- package/src/components/flow-editor/node-config-panel/panels/index.ts +4 -0
- package/src/components/flow-editor/node-config-panel/types.ts +20 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-panel-store.ts +283 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-state.ts +172 -0
- package/src/components/flow-editor/node-config-panel/use-run-node.ts +147 -0
- package/src/components/flow-editor/node-config-panel/utils.ts +73 -0
- package/src/components/flow-editor/serialize-to-sdk.ts +204 -0
- package/src/components/flow-editor/toolbar-context.ts +9 -0
- package/src/components/flow-editor/use-copy-paste.ts +575 -0
- package/src/components/flow-editor/use-copy-paste.types.ts +35 -0
- package/src/components/flow-editor/use-flow-editor.ts +241 -0
- package/src/components/flow-runs-table/FlowRunsTable.tsx +631 -0
- package/src/components/flow-runs-table/index.ts +1 -0
- package/src/components/flow-viewer/FlowRunsView.tsx +268 -0
- package/src/components/flow-viewer/FlowStatusView.tsx +351 -0
- package/src/components/flow-viewer/RunSelector.tsx +422 -0
- package/src/components/flow-viewer/RunsSidebar.tsx +125 -0
- package/src/components/flow-viewer/agent-tool-executions-list.tsx +298 -0
- package/src/components/flow-viewer/index.ts +1 -0
- package/src/components/flow-viewer/logs-panel.tsx +567 -0
- package/src/components/flow-viewer/use-execution-log-data.ts +374 -0
- package/src/components/graph/BatchFlowEdge.tsx +229 -0
- package/src/components/graph/LayoutSelector.tsx +42 -0
- package/src/components/graph/index.ts +61 -0
- package/src/components/graph/styleUtils.ts +375 -0
- package/src/components/nodes/.DS_Store +0 -0
- package/src/components/nodes/AgentConfigPanel.tsx +1033 -0
- package/src/components/nodes/AgentNode.tsx +298 -0
- package/src/components/nodes/AgentToolsBox.tsx +193 -0
- package/src/components/nodes/NodeAppendix.tsx +98 -0
- package/src/components/nodes/NodeStatusIndicator.tsx +74 -0
- package/src/components/nodes/NodeViewContext.tsx +45 -0
- package/src/components/nodes/ToolParamField.tsx +282 -0
- package/src/components/nodes/ToolSelectorModal.tsx +648 -0
- package/src/components/nodes/ToolSelectorParts.tsx +505 -0
- package/src/components/nodes/UniversalNode.tsx +356 -0
- package/src/components/nodes/createContextAwareNodes.ts +19 -0
- package/src/components/nodes/index.ts +45 -0
- package/src/components/nodes/nodeRegistry.ts +50 -0
- package/src/components/nodes/withNodeContext.tsx +55 -0
- package/src/components/shared/InvectLoader.tsx +59 -0
- package/src/components/shared/InvectLogo.tsx +59 -0
- package/src/components/shared/ProviderIcon.tsx +115 -0
- package/src/components/side-menu/side-menu.tsx +267 -0
- package/src/components/sidebar/BaseSidebar.tsx +148 -0
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/triggers/CronPreview.tsx +243 -0
- package/src/components/triggers/index.ts +1 -0
- package/src/components/ui/alert-dialog.tsx +152 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +75 -0
- package/src/components/ui/codemirror-js-editor.tsx +432 -0
- package/src/components/ui/codemirror-json-editor.tsx +816 -0
- package/src/components/ui/codemirror-nunjucks-editor.tsx +451 -0
- package/src/components/ui/codemirror-vscode-theme.ts +243 -0
- package/src/components/ui/collapsible.tsx +12 -0
- package/src/components/ui/command.tsx +162 -0
- package/src/components/ui/dialog.tsx +140 -0
- package/src/components/ui/dropdown-menu.tsx +232 -0
- package/src/components/ui/empty-state.tsx +93 -0
- package/src/components/ui/input.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/popover.tsx +53 -0
- package/src/components/ui/resizable.tsx +61 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +179 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/slider.tsx +58 -0
- package/src/components/ui/switch.tsx +22 -0
- package/src/components/ui/table.tsx +90 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/tooltip.tsx +54 -0
- package/src/components/ui/tree-view.tsx +574 -0
- package/src/contexts/AgentToolCallbacksContext.tsx +31 -0
- package/src/contexts/ApiContext.tsx +51 -0
- package/src/contexts/FlowDataContext.tsx +21 -0
- package/src/contexts/NodeRegistryContext.tsx +54 -0
- package/src/contexts/PluginRegistryContext.tsx +182 -0
- package/src/contexts/ThemeProvider.tsx +106 -0
- package/src/contexts/ValidationContext.tsx +122 -0
- package/src/demo/DemoInvect.tsx +42 -0
- package/src/demo/FlowViewer.tsx +294 -0
- package/src/demo/demo-api-client.ts +246 -0
- package/src/demo/index.ts +28 -0
- package/src/demo/sample-data.ts +1980 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-document-title.ts +8 -0
- package/src/hooks/use-flow-data.ts +144 -0
- package/src/hooks/use-invect-portal-class.ts +27 -0
- package/src/hooks/useFlowEditorStore.ts +2 -0
- package/src/index.ts +70 -0
- package/src/lib/utils.ts +6 -0
- package/src/prettier.d.ts +13 -0
- package/src/routes/all-flow-runs.tsx +27 -0
- package/src/routes/credentials.tsx +362 -0
- package/src/routes/flow-route-layout.tsx +113 -0
- package/src/routes/flow-runs.tsx +22 -0
- package/src/routes/flow.tsx +22 -0
- package/src/routes/home.tsx +282 -0
- package/src/services/index.ts +6 -0
- package/src/stores/executionViewStore.ts +211 -0
- package/src/stores/flow-editor.store.ts +738 -0
- package/src/stores/flowEditorStore.ts +2 -0
- package/src/stores/index.ts +10 -0
- package/src/stores/uiStore.ts +189 -0
- package/src/types/agent-tools.types.ts +64 -0
- package/src/types/index.ts +5 -0
- package/src/types/node-definition.types.ts +104 -0
- package/src/types/plugin.types.ts +123 -0
- package/src/utils/credentialBranding.ts +116 -0
- package/src/utils/credentialFiltering.ts +68 -0
- package/src/utils/flowTransformations.ts +137 -0
- package/src/utils/layoutUtils.ts +127 -0
- package/src/utils/nodeReferenceUtils.ts +135 -0
- package/src/vendor.d.ts +7 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OAuth2ProviderDefinition, Credential } from '../../api/types';
|
|
3
|
+
export interface OAuth2ConnectButtonProps {
|
|
4
|
+
/** The OAuth2 provider to connect to */
|
|
5
|
+
provider: OAuth2ProviderDefinition;
|
|
6
|
+
/** OAuth2 client ID (from your app's OAuth configuration) */
|
|
7
|
+
clientId: string;
|
|
8
|
+
/** OAuth2 client secret (from your app's OAuth configuration) */
|
|
9
|
+
clientSecret: string;
|
|
10
|
+
/** Redirect URI registered with the OAuth provider */
|
|
11
|
+
redirectUri: string;
|
|
12
|
+
/** Optional: Custom scopes to request (defaults to provider's default scopes) */
|
|
13
|
+
scopes?: string[];
|
|
14
|
+
/** Optional: Custom name for the created credential */
|
|
15
|
+
credentialName?: string;
|
|
16
|
+
/** Called when credential is successfully created */
|
|
17
|
+
onSuccess?: (credential: Credential) => void;
|
|
18
|
+
/** Called when an error occurs */
|
|
19
|
+
onError?: (error: Error) => void;
|
|
20
|
+
/** Button variant */
|
|
21
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost';
|
|
22
|
+
/** Button size */
|
|
23
|
+
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
24
|
+
/** Additional CSS classes */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Disabled state */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Children to render inside button (defaults to "Connect with {provider.name}") */
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare function OAuth2ConnectButton({ provider, clientId, clientSecret, redirectUri, scopes, credentialName, onSuccess, onError, variant, size, className, disabled, children, }: OAuth2ConnectButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* OAuth2 Callback Handler Component
|
|
34
|
+
*
|
|
35
|
+
* Place this component on your OAuth callback page.
|
|
36
|
+
* It extracts the code/state from URL and sends it to the parent window.
|
|
37
|
+
*/
|
|
38
|
+
export declare function OAuth2CallbackHandler(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Credential } from '../../api/types';
|
|
2
|
+
interface OAuth2ProviderSelectorProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** Called when a credential is successfully created */
|
|
6
|
+
onCredentialCreated?: (credential: Credential) => void;
|
|
7
|
+
/** Portal container for modals */
|
|
8
|
+
portalContainer?: HTMLElement | null;
|
|
9
|
+
/** Filter to only show specific providers by ID (e.g., ["google"]) */
|
|
10
|
+
filterProviders?: string[];
|
|
11
|
+
/** Override scopes for the OAuth flow (uses provider defaults if not set) */
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare function OAuth2ProviderSelector({ open, onOpenChange, onCredentialCreated, portalContainer, filterProviders, scopes, }: OAuth2ProviderSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Credential, CredentialAuthType, CredentialType } from '../../api/types';
|
|
2
|
+
export declare const AUTH_TYPE_CONFIG: Record<string, {
|
|
3
|
+
label: string;
|
|
4
|
+
color: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const formatDate: (dateString?: string) => string;
|
|
7
|
+
export declare const formatFullDate: (dateString?: string) => string;
|
|
8
|
+
export declare function isTokenExpired(credential: Credential): boolean;
|
|
9
|
+
export declare function getAuthTypesForType(type: CredentialType): {
|
|
10
|
+
value: CredentialAuthType;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credentials Components
|
|
3
|
+
*
|
|
4
|
+
* Export all credential-related components.
|
|
5
|
+
*/
|
|
6
|
+
export { CreateCredentialModal } from './CreateCredentialModal';
|
|
7
|
+
export { EditCredentialModal } from './EditCredentialModal';
|
|
8
|
+
export { OAuth2ConnectButton, OAuth2CallbackHandler } from './OAuth2ConnectButton';
|
|
9
|
+
export { OAuth2ProviderSelector } from './OAuth2ProviderSelector';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Flow, FlowRun } from '@invect/core/types';
|
|
2
|
+
interface RecentActivityTableProps {
|
|
3
|
+
runs: FlowRun[];
|
|
4
|
+
flows: Flow[];
|
|
5
|
+
basePath: string;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function RecentActivityTable({ runs, flows, basePath, isLoading, }: RecentActivityTableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface StatCardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
icon: React.ElementType;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function StatCard({ title, value, subtitle, icon: Icon, className }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FailedRunsAlert } from './FailedRunsAlert';
|
|
2
|
+
export { FlowCard } from './FlowCard';
|
|
3
|
+
export { RecentActivityTable } from './RecentActivityTable';
|
|
4
|
+
export { StatCard } from './StatCard';
|
|
5
|
+
export { formatRelativeTime, formatDuration, StatusBadge } from './status-helpers';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FlowEditorProps {
|
|
3
|
+
flowId: string;
|
|
4
|
+
flowVersion?: string;
|
|
5
|
+
basePath?: string;
|
|
6
|
+
initialName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function FlowEditor({ flowId, flowVersion, basePath }: FlowEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface FlowWorkbenchViewProps {
|
|
10
|
+
flowId: string;
|
|
11
|
+
onRegisterAddNode?: (fn: (type: string) => void) => void;
|
|
12
|
+
onLayoutSelectorRender?: (layoutSelector: React.ReactNode) => void;
|
|
13
|
+
/** Callback to add a node (passed from shell, used for sidebar) */
|
|
14
|
+
onAddNode: (type: string) => void;
|
|
15
|
+
/** Renders the sidebar element (NodeSidebar with current mode + props) */
|
|
16
|
+
onSidebarRender: (sidebar: React.ReactNode) => void;
|
|
17
|
+
/** Renders the right panel element (ToolConfigPanel when active) */
|
|
18
|
+
onRightPanelRender: (rightPanel: React.ReactNode | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function FlowWorkbenchView({ flowId, onRegisterAddNode, onLayoutSelectorRender, onAddNode, onSidebarRender, onRightPanelRender, }: FlowWorkbenchViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface FlowHeaderProps {
|
|
2
|
+
flowName: string;
|
|
3
|
+
onFlowNameChange: (name: string) => void;
|
|
4
|
+
isDirty?: boolean;
|
|
5
|
+
onSave?: () => Promise<boolean | void>;
|
|
6
|
+
isSaving?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function FlowHeader({ flowName, onFlowNameChange, isDirty, onSave, isSaving, }: FlowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface FlowLayoutProps {
|
|
3
|
+
sidebar: React.ReactNode;
|
|
4
|
+
viewport: React.ReactNode;
|
|
5
|
+
modeSwitcher: React.ReactNode;
|
|
6
|
+
layoutSelector?: React.ReactNode;
|
|
7
|
+
viewportRef?: React.RefObject<HTMLDivElement | null>;
|
|
8
|
+
/** Panel that appears on the right side (e.g. tool config, node config) */
|
|
9
|
+
rightPanel?: React.ReactNode;
|
|
10
|
+
/** Chat toggle button rendered in the top-right toolbar */
|
|
11
|
+
chatToggle?: React.ReactNode;
|
|
12
|
+
/** Chat panel rendered as a right sidebar */
|
|
13
|
+
chatPanel?: React.ReactNode;
|
|
14
|
+
/** Floating chat overlay rendered above the viewport (for empty flows) */
|
|
15
|
+
chatOverlay?: React.ReactNode;
|
|
16
|
+
/** Extra controls rendered in the bottom toolbar (e.g. Run button, Active/Inactive) */
|
|
17
|
+
toolbarExtra?: React.ReactNode;
|
|
18
|
+
/** Whether the sidebar is open */
|
|
19
|
+
sidebarOpen?: boolean;
|
|
20
|
+
/** Called to toggle sidebar visibility */
|
|
21
|
+
onToggleSidebar?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function FlowLayout({ sidebar, viewport, modeSwitcher, layoutSelector, viewportRef, rightPanel, chatToggle, chatPanel, chatOverlay, toolbarExtra, sidebarOpen, onToggleSidebar, }: FlowLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default FlowLayout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ViewMode = 'edit' | 'runs';
|
|
2
|
+
interface ModeSwitcherProps {
|
|
3
|
+
mode: ViewMode;
|
|
4
|
+
onModeChange: (mode: ViewMode) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function ModeSwitcher({ mode, onModeChange }: ModeSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ModeSwitcher;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ToolDefinition, AddedToolInstance } from '../nodes/ToolSelectorModal';
|
|
2
|
+
export type SidebarMode = 'nodes' | 'actions';
|
|
3
|
+
export interface NodeSidebarProps {
|
|
4
|
+
/** Current display mode */
|
|
5
|
+
mode: SidebarMode;
|
|
6
|
+
onAddNode: (type: string) => void;
|
|
7
|
+
/** Called to collapse/hide the sidebar */
|
|
8
|
+
onCollapse?: () => void;
|
|
9
|
+
/** Close the actions panel (returns to nodes mode) */
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/** All available tools from API */
|
|
12
|
+
availableTools?: ToolDefinition[];
|
|
13
|
+
/** Currently added tool instances on the agent node */
|
|
14
|
+
addedTools?: AddedToolInstance[];
|
|
15
|
+
/** Called when a tool is added. Returns the new instance ID. */
|
|
16
|
+
onAddTool?: (toolId: string) => string;
|
|
17
|
+
/** Called when a tool instance is removed */
|
|
18
|
+
onRemoveTool?: (instanceId: string) => void;
|
|
19
|
+
/** Called when an added tool instance is clicked (to open config panel) */
|
|
20
|
+
onSelectTool?: (instance: AddedToolInstance) => void;
|
|
21
|
+
/** Currently selected instance (to highlight) */
|
|
22
|
+
selectedInstanceId?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare function NodeSidebar(props: NodeSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RunControlsProps {
|
|
2
|
+
onExecute?: () => Promise<void>;
|
|
3
|
+
isExecuting?: boolean;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isTogglingActive?: boolean;
|
|
6
|
+
onToggleActive?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Run button + Active/Inactive toggle, rendered inside the bottom canvas toolbar.
|
|
10
|
+
*/
|
|
11
|
+
export declare function RunControls({ onExecute, isExecuting, isActive, isTogglingActive, onToggleActive, }: RunControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToolDefinition, AddedToolInstance } from '../nodes/ToolSelectorModal';
|
|
2
|
+
export interface ToolConfigPanelProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
/** The base tool definition */
|
|
6
|
+
tool: ToolDefinition | null;
|
|
7
|
+
/** The tool instance being configured */
|
|
8
|
+
instance: AddedToolInstance | null;
|
|
9
|
+
/** Called when the tool instance is updated */
|
|
10
|
+
onUpdate: (instanceId: string, updates: Partial<Omit<AddedToolInstance, 'instanceId' | 'toolId'>>) => void;
|
|
11
|
+
/** Called when the tool instance is removed */
|
|
12
|
+
onRemove: (instanceId: string) => void;
|
|
13
|
+
/** Portal container for sub-modals (credential creation) */
|
|
14
|
+
portalContainer?: HTMLElement | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const ToolConfigPanel: import('react').NamedExoticComponent<ToolConfigPanelProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../stores/flow-editor.store';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { FlowEditor } from './FlowEditor';
|
|
2
|
+
export type { FlowEditorProps } from './FlowEditor';
|
|
3
|
+
export { FlowWorkbenchView } from './FlowEditor';
|
|
4
|
+
export { NodeSidebar, type SidebarMode, type NodeSidebarProps } from './NodeSidebar';
|
|
5
|
+
export { ActionsSidebar } from './ActionsSidebar';
|
|
6
|
+
export { useFlowEditorStore, useIsLoading } from './flow-editor.store';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface InlineEditProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
displayClassName?: string;
|
|
7
|
+
inputClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function InlineEdit({ value, onChange, placeholder, className, displayClassName, inputClassName, }: InlineEditProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NodeParamField } from '../../../types/node-definition.types';
|
|
2
|
+
interface ConfigFieldWithTemplateProps {
|
|
3
|
+
field: NodeParamField;
|
|
4
|
+
value: unknown;
|
|
5
|
+
onChange: (value: unknown) => void;
|
|
6
|
+
templateMode: boolean;
|
|
7
|
+
onTemplateModeChange: (enabled: boolean) => void;
|
|
8
|
+
portalContainer?: HTMLElement | null;
|
|
9
|
+
/** Action / node type id — needed for dynamic option loading. */
|
|
10
|
+
nodeType?: string;
|
|
11
|
+
/** All current form values — needed for dynamic option loading. */
|
|
12
|
+
formValues?: Record<string, unknown>;
|
|
13
|
+
/** Input data from upstream nodes — used for autocomplete in code fields. */
|
|
14
|
+
inputData?: Record<string, unknown>;
|
|
15
|
+
/** Validation error message for this field (from execution errors). */
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A config field that supports toggling between static mode (normal form element)
|
|
20
|
+
* and template mode (Nunjucks template textarea).
|
|
21
|
+
*
|
|
22
|
+
* Text-based fields (text, textarea, json, code) are always in template mode.
|
|
23
|
+
* Other fields (select, number, boolean) show a toggle to switch between modes.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ConfigFieldWithTemplate: ({ field, value, onChange, templateMode, onTemplateModeChange, portalContainer, nodeType, formValues, inputData, error, }: ConfigFieldWithTemplateProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Credential } from '../../../api/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
credentials: Credential[];
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
onRetry: () => void;
|
|
10
|
+
onAddNew: () => void;
|
|
11
|
+
onEditCredential?: (credential: Credential) => void;
|
|
12
|
+
onRefreshOAuthCredential?: (credential: Credential) => void;
|
|
13
|
+
/** ID of the credential currently being refreshed */
|
|
14
|
+
refreshingCredentialId?: string | null;
|
|
15
|
+
container?: HTMLElement | null;
|
|
16
|
+
disablePortal?: boolean;
|
|
17
|
+
/** Custom label for the add button (default: "Add new credential") */
|
|
18
|
+
addButtonLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function CredentialCombobox({ credentials, value, onChange, placeholder, isLoading, isError, onRetry, onAddNew, onEditCredential, onRefreshOAuthCredential, refreshingCredentialId, container, disablePortal, addButtonLabel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeParamField } from '../../../types/node-definition.types';
|
|
2
|
+
import { Credential } from '../../../api/types';
|
|
3
|
+
interface CredentialsSectionProps {
|
|
4
|
+
fields: NodeParamField[];
|
|
5
|
+
formValues: Record<string, unknown>;
|
|
6
|
+
onFieldChange: (fieldName: string, value: string) => void;
|
|
7
|
+
credentials: Credential[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isError: boolean;
|
|
10
|
+
onRefresh: () => void;
|
|
11
|
+
onAddNewCredential: (fieldName: string) => void;
|
|
12
|
+
onEditCredential?: (credential: Credential) => void;
|
|
13
|
+
onRefreshOAuthCredential?: (credential: Credential) => void;
|
|
14
|
+
refreshingCredentialId?: string | null;
|
|
15
|
+
portalContainer?: HTMLElement | null;
|
|
16
|
+
disablePortal?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const CredentialsSection: ({ fields, formValues, onFieldChange, credentials, isLoading, isError, onRefresh, onAddNewCredential, onEditCredential, onRefreshOAuthCredential, refreshingCredentialId, portalContainer, disablePortal, }: CredentialsSectionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface DroppableInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
multiline?: boolean;
|
|
9
|
+
rows?: number;
|
|
10
|
+
fillAvailableHeight?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A text input that accepts drops from the DraggableJsonTree.
|
|
14
|
+
* When a nunjucks path is dropped, it's inserted at the cursor position.
|
|
15
|
+
*
|
|
16
|
+
* For multiline inputs, uses CodeMirror with Nunjucks syntax highlighting.
|
|
17
|
+
* For single-line inputs, uses a standard Input with drag-drop support.
|
|
18
|
+
*/
|
|
19
|
+
export declare function DroppableInput({ value, onChange, placeholder, disabled, className, id: _id, multiline, rows, fillAvailableHeight, }: DroppableInputProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NodeParamField } from '../../../types/node-definition.types';
|
|
2
|
+
interface DynamicSelectFieldProps {
|
|
3
|
+
/** The action / node type id (e.g. "core.model"). */
|
|
4
|
+
actionId: string;
|
|
5
|
+
/** The field definition — must have `loadOptions`. */
|
|
6
|
+
field: NodeParamField;
|
|
7
|
+
/** Current field value. */
|
|
8
|
+
value: unknown;
|
|
9
|
+
/** Called when the user picks a new value. */
|
|
10
|
+
onChange: (value: unknown) => void;
|
|
11
|
+
/** Current form values — used to extract dependency values. */
|
|
12
|
+
formValues: Record<string, unknown>;
|
|
13
|
+
/** Portal container for the dropdown. */
|
|
14
|
+
portalContainer?: HTMLElement | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A select field whose options are loaded from the server via the
|
|
18
|
+
* `loadOptions` system. Re-fetches whenever any of the declared
|
|
19
|
+
* dependency fields change.
|
|
20
|
+
*/
|
|
21
|
+
export declare function DynamicSelectField({ actionId, field, value, onChange, formValues, portalContainer: _portalContainer, }: DynamicSelectFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UpstreamSlot } from './types';
|
|
2
|
+
interface JsonPreviewPanelProps {
|
|
3
|
+
title: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
error?: string | null;
|
|
7
|
+
/** Disable JSON syntax error highlighting (useful for output panels showing plain text) */
|
|
8
|
+
disableLinting?: boolean;
|
|
9
|
+
/** Show test mode indicator and reset button */
|
|
10
|
+
isTestMode?: boolean;
|
|
11
|
+
/** Callback when reset button is clicked */
|
|
12
|
+
onReset?: () => void;
|
|
13
|
+
/** Upstream slot metadata for inline run controls */
|
|
14
|
+
upstreamSlots?: UpstreamSlot[];
|
|
15
|
+
/** Called when user clicks the run/retry button for a slot */
|
|
16
|
+
onRunSlot?: (slot: UpstreamSlot) => void;
|
|
17
|
+
/** Icon to display in the toolbar */
|
|
18
|
+
icon?: React.ReactElement;
|
|
19
|
+
/** Extra toolbar content (e.g. "Run All" button) */
|
|
20
|
+
toolbarExtra?: React.ReactNode;
|
|
21
|
+
/** JSON keys to auto-fold when content is set (e.g. ['previous_nodes']) */
|
|
22
|
+
defaultFoldKeys?: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare const JsonPreviewPanel: ({ title, value, onChange, error, disableLinting, isTestMode, onReset, upstreamSlots, onRunSlot, icon, toolbarExtra, defaultFoldKeys, }: JsonPreviewPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ToolDefinition } from '../../nodes/ToolSelectorModal';
|
|
2
|
+
interface NodeConfigPanelProps {
|
|
3
|
+
nodeId: string | null;
|
|
4
|
+
flowId: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
portalContainer?: HTMLElement | null;
|
|
8
|
+
/** Available agent tools — only needed for AGENT node type */
|
|
9
|
+
availableTools?: ToolDefinition[];
|
|
10
|
+
/** If set, open the Tools tab with this instance pre-selected */
|
|
11
|
+
initialToolInstanceId?: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function NodeConfigPanel({ nodeId, flowId, open, onOpenChange, portalContainer, availableTools, initialToolInstanceId, }: NodeConfigPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface NodeConfigPanelHeaderProps {
|
|
2
|
+
label: string;
|
|
3
|
+
onLabelChange: (value: string) => void;
|
|
4
|
+
nodeTypeLabel: string;
|
|
5
|
+
Icon: React.ComponentType<{
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
categoryColor: string;
|
|
9
|
+
onRunNode?: () => void;
|
|
10
|
+
runButtonLabel?: string;
|
|
11
|
+
runDisabled?: boolean;
|
|
12
|
+
isRunning?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function NodeConfigPanelHeader({ label, onLabelChange, nodeTypeLabel, Icon, categoryColor, onRunNode, runButtonLabel, runDisabled, isRunning, }: NodeConfigPanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NodeParamField } from '../../../types/node-definition.types';
|
|
2
|
+
interface ParametersSectionProps {
|
|
3
|
+
fields: NodeParamField[];
|
|
4
|
+
formValues: Record<string, unknown>;
|
|
5
|
+
onFieldChange: (fieldName: string, value: unknown) => void;
|
|
6
|
+
emptyMessage?: string;
|
|
7
|
+
portalContainer?: HTMLElement | null;
|
|
8
|
+
/** Action / node type id — passed through to ConfigFieldWithTemplate for dynamic option loading. */
|
|
9
|
+
nodeType?: string;
|
|
10
|
+
/** Input data from upstream nodes — passed through for autocomplete in code fields. */
|
|
11
|
+
inputData?: Record<string, unknown>;
|
|
12
|
+
/** Per-field validation errors keyed by field name. */
|
|
13
|
+
fieldErrors?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export declare const ParametersSection: ({ fields, formValues, onFieldChange, emptyMessage, portalContainer, nodeType, inputData, fieldErrors, }: ParametersSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface SearchableSelectFieldProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
value: string;
|
|
4
|
+
options: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A searchable select field using a combobox pattern (Popover + Command).
|
|
14
|
+
* Used for select fields with many options (e.g. model lists).
|
|
15
|
+
*/
|
|
16
|
+
export declare function SearchableSelectField({ id, value, options, placeholder, disabled, onChange, }: SearchableSelectFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface SwitchCase {
|
|
2
|
+
slug: string;
|
|
3
|
+
label: string;
|
|
4
|
+
expression: string;
|
|
5
|
+
}
|
|
6
|
+
interface SwitchCasesFieldProps {
|
|
7
|
+
value: unknown;
|
|
8
|
+
onChange: (value: SwitchCase[]) => void;
|
|
9
|
+
nodeId: string | null;
|
|
10
|
+
inputData?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom field renderer for the switch node's `cases` parameter.
|
|
14
|
+
* Renders an ordered list of cases, each with a label, slug, and JS expression.
|
|
15
|
+
* The default branch is always shown at the bottom and cannot be removed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SwitchCasesField({ value, onChange, nodeId, inputData }: SwitchCasesFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactFlowNodeData } from '@invect/core/types';
|
|
2
|
+
interface UsePreviewStateOptions {
|
|
3
|
+
nodeId: string | null;
|
|
4
|
+
updateNodeData: (nodeId: string, data: Partial<ReactFlowNodeData>) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function usePreviewState({ nodeId, updateNodeData }: UsePreviewStateOptions): {
|
|
7
|
+
inputPreview: string;
|
|
8
|
+
outputPreview: string;
|
|
9
|
+
inputError: string | null;
|
|
10
|
+
outputError: string | null;
|
|
11
|
+
isTestMode: boolean;
|
|
12
|
+
originalInputPreview: string | null;
|
|
13
|
+
upstreamVariables: string[];
|
|
14
|
+
setInputPreview: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
15
|
+
setOutputPreview: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
16
|
+
setInputError: import('react').Dispatch<import('react').SetStateAction<string | null>>;
|
|
17
|
+
setOutputError: import('react').Dispatch<import('react').SetStateAction<string | null>>;
|
|
18
|
+
handleInputPreviewChange: (value: string) => void;
|
|
19
|
+
handleOutputPreviewChange: (value: string) => void;
|
|
20
|
+
handleResetTestMode: () => void;
|
|
21
|
+
updateFromExecution: (newInput: string, newOutput: string) => void;
|
|
22
|
+
refreshInputFromEdges: () => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
+
interface SaveOptions {
|
|
3
|
+
skipSuccessToast?: boolean;
|
|
4
|
+
}
|
|
5
|
+
interface FlowActions {
|
|
6
|
+
onExecute: () => Promise<void>;
|
|
7
|
+
isExecuting: boolean;
|
|
8
|
+
isDirty?: boolean;
|
|
9
|
+
onSave?: (options?: SaveOptions) => Promise<boolean>;
|
|
10
|
+
isSaving?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type ExecuteFlowToNodeMutation = UseMutationResult<unknown, Error, {
|
|
13
|
+
flowId: string;
|
|
14
|
+
nodeId: string;
|
|
15
|
+
inputs?: Record<string, unknown>;
|
|
16
|
+
options?: {
|
|
17
|
+
useBatchProcessing?: boolean;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
type TestNodeMutation = UseMutationResult<unknown, Error, {
|
|
21
|
+
nodeType: string;
|
|
22
|
+
params: Record<string, unknown>;
|
|
23
|
+
inputs: Record<string, unknown>;
|
|
24
|
+
}>;
|
|
25
|
+
interface UseNodeExecutionOptions {
|
|
26
|
+
nodeId: string | null;
|
|
27
|
+
flowId: string;
|
|
28
|
+
nodeType: string;
|
|
29
|
+
nodeParams: Record<string, unknown>;
|
|
30
|
+
executeFlowToNodeMutation: ExecuteFlowToNodeMutation;
|
|
31
|
+
testNodeMutation?: TestNodeMutation;
|
|
32
|
+
flowActions: FlowActions | null;
|
|
33
|
+
updateNodeData: (nodeId: string, data: Record<string, unknown>) => void;
|
|
34
|
+
isTestMode: boolean;
|
|
35
|
+
inputPreview: string;
|
|
36
|
+
onExecutionComplete: (input: string, output: string) => void;
|
|
37
|
+
}
|
|
38
|
+
export declare function useNodeExecution({ nodeId, flowId, nodeType, nodeParams, executeFlowToNodeMutation, testNodeMutation, flowActions, updateNodeData, isTestMode, inputPreview, onExecutionComplete, }: UseNodeExecutionOptions): {
|
|
39
|
+
isRunning: boolean;
|
|
40
|
+
runError: string | null;
|
|
41
|
+
outputError: string | null;
|
|
42
|
+
fieldErrors: Record<string, string> | null;
|
|
43
|
+
runNode: () => Promise<void>;
|
|
44
|
+
setOutputError: import('react').Dispatch<import('react').SetStateAction<string | null>>;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UpstreamSlot } from '../types';
|
|
2
|
+
interface UseUpstreamSlotsOptions {
|
|
3
|
+
nodeId: string | null;
|
|
4
|
+
flowId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function useUpstreamSlots({ nodeId, flowId }: UseUpstreamSlotsOptions): {
|
|
7
|
+
slots: UpstreamSlot[];
|
|
8
|
+
slotMap: Map<string, UpstreamSlot>;
|
|
9
|
+
inputPreviewJson: string;
|
|
10
|
+
runSlot: (slot: UpstreamSlot) => Promise<void>;
|
|
11
|
+
runAllUnresolved: () => Promise<void>;
|
|
12
|
+
isAnyLoading: boolean;
|
|
13
|
+
unresolvedCount: number;
|
|
14
|
+
upstreamVariables: string[];
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ToolDefinition, AddedToolInstance } from '../../../nodes/ToolSelectorModal';
|
|
2
|
+
export interface AgentToolsPanelProps {
|
|
3
|
+
/** Available tools fetched from the API */
|
|
4
|
+
availableTools: ToolDefinition[];
|
|
5
|
+
/** Currently added tool instances on this agent */
|
|
6
|
+
addedTools: AddedToolInstance[];
|
|
7
|
+
/** Called to add a tool instance */
|
|
8
|
+
onAddTool: (toolId: string) => string;
|
|
9
|
+
/** Called to remove a tool instance */
|
|
10
|
+
onRemoveTool: (instanceId: string) => void;
|
|
11
|
+
/** Called to update a tool instance */
|
|
12
|
+
onUpdateTool: (instanceId: string, updates: Partial<Omit<AddedToolInstance, 'instanceId' | 'toolId'>>) => void;
|
|
13
|
+
/** Portal container for sub-modals */
|
|
14
|
+
portalContainer?: HTMLElement | null;
|
|
15
|
+
/** Pre-select a specific tool instance (e.g. opened from AgentToolsBox click) */
|
|
16
|
+
initialToolInstanceId?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare const AgentToolsPanel: import('react').NamedExoticComponent<AgentToolsPanelProps>;
|