@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,47 @@
|
|
|
1
|
+
import { NodeExecutionStatus } from '@invect/core/types';
|
|
2
|
+
export { BatchFlowEdge, defaultEdgeOptions } from './BatchFlowEdge';
|
|
3
|
+
export { LayoutSelector } from './LayoutSelector';
|
|
4
|
+
export { langflowColors, type NodeStatus } from './styleUtils';
|
|
5
|
+
export type { BatchFlowEdgeData } from './BatchFlowEdge';
|
|
6
|
+
export interface BatchFlowNodeData extends Record<string, unknown> {
|
|
7
|
+
id: string;
|
|
8
|
+
type: string;
|
|
9
|
+
display_name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
frozen?: boolean;
|
|
13
|
+
beta?: boolean;
|
|
14
|
+
deprecated?: boolean;
|
|
15
|
+
outputs?: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
display_name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
inputs?: Array<{
|
|
22
|
+
name: string;
|
|
23
|
+
display_name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
value?: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
template?: Record<string, {
|
|
29
|
+
display_name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
show?: boolean;
|
|
33
|
+
value?: unknown;
|
|
34
|
+
options?: unknown[];
|
|
35
|
+
list?: boolean;
|
|
36
|
+
multiline?: boolean;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
password?: boolean;
|
|
39
|
+
advanced?: boolean;
|
|
40
|
+
_input_type?: string;
|
|
41
|
+
}>;
|
|
42
|
+
connectedTemplateFields?: Set<string>;
|
|
43
|
+
executionStatus?: NodeExecutionStatus;
|
|
44
|
+
executionError?: string;
|
|
45
|
+
executionOutput?: unknown;
|
|
46
|
+
flow?: unknown;
|
|
47
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { NodeExecutionStatus } from '@invect/core/types';
|
|
2
|
+
export type NodeType = 'ChatInput' | 'TextInput' | 'Input' | 'ChatOutput' | 'TextOutput' | 'Output' | 'OpenAIModel' | 'AnthropicModel' | 'LLM' | 'Prompt' | 'PromptTemplate' | 'Agent' | 'Memory' | 'Tool' | 'Chain' | 'Retriever' | 'Embedding' | 'VectorStore' | 'DocumentLoader' | 'TextSplitter' | 'Note' | 'Unknown';
|
|
3
|
+
export type NodeStatus = 'idle' | 'running' | 'success' | 'error' | 'inactive';
|
|
4
|
+
export declare const mapExecutionStatusToNodeStatus: (status: NodeExecutionStatus | string) => NodeStatus;
|
|
5
|
+
export declare const langflowColors: {
|
|
6
|
+
emerald: {
|
|
7
|
+
light: string;
|
|
8
|
+
DEFAULT: string;
|
|
9
|
+
dark: string;
|
|
10
|
+
};
|
|
11
|
+
sky: {
|
|
12
|
+
light: string;
|
|
13
|
+
DEFAULT: string;
|
|
14
|
+
dark: string;
|
|
15
|
+
};
|
|
16
|
+
fuchsia: {
|
|
17
|
+
light: string;
|
|
18
|
+
DEFAULT: string;
|
|
19
|
+
dark: string;
|
|
20
|
+
};
|
|
21
|
+
amber: {
|
|
22
|
+
light: string;
|
|
23
|
+
DEFAULT: string;
|
|
24
|
+
dark: string;
|
|
25
|
+
};
|
|
26
|
+
orange: {
|
|
27
|
+
light: string;
|
|
28
|
+
DEFAULT: string;
|
|
29
|
+
dark: string;
|
|
30
|
+
};
|
|
31
|
+
red: {
|
|
32
|
+
light: string;
|
|
33
|
+
DEFAULT: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
};
|
|
36
|
+
cyan: {
|
|
37
|
+
light: string;
|
|
38
|
+
DEFAULT: string;
|
|
39
|
+
dark: string;
|
|
40
|
+
};
|
|
41
|
+
lime: {
|
|
42
|
+
light: string;
|
|
43
|
+
DEFAULT: string;
|
|
44
|
+
dark: string;
|
|
45
|
+
};
|
|
46
|
+
teal: {
|
|
47
|
+
light: string;
|
|
48
|
+
DEFAULT: string;
|
|
49
|
+
dark: string;
|
|
50
|
+
};
|
|
51
|
+
indigo: {
|
|
52
|
+
light: string;
|
|
53
|
+
DEFAULT: string;
|
|
54
|
+
dark: string;
|
|
55
|
+
};
|
|
56
|
+
pink: {
|
|
57
|
+
light: string;
|
|
58
|
+
DEFAULT: string;
|
|
59
|
+
dark: string;
|
|
60
|
+
};
|
|
61
|
+
purple: {
|
|
62
|
+
light: string;
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
dark: string;
|
|
65
|
+
};
|
|
66
|
+
rose: {
|
|
67
|
+
light: string;
|
|
68
|
+
DEFAULT: string;
|
|
69
|
+
dark: string;
|
|
70
|
+
};
|
|
71
|
+
slate: {
|
|
72
|
+
light: string;
|
|
73
|
+
DEFAULT: string;
|
|
74
|
+
dark: string;
|
|
75
|
+
};
|
|
76
|
+
success: {
|
|
77
|
+
DEFAULT: string;
|
|
78
|
+
light: string;
|
|
79
|
+
dark: string;
|
|
80
|
+
};
|
|
81
|
+
error: {
|
|
82
|
+
DEFAULT: string;
|
|
83
|
+
light: string;
|
|
84
|
+
dark: string;
|
|
85
|
+
};
|
|
86
|
+
running: {
|
|
87
|
+
DEFAULT: string;
|
|
88
|
+
light: string;
|
|
89
|
+
dark: string;
|
|
90
|
+
};
|
|
91
|
+
border: string;
|
|
92
|
+
background: string;
|
|
93
|
+
foreground: string;
|
|
94
|
+
muted: string;
|
|
95
|
+
mutedForeground: string;
|
|
96
|
+
primary: string;
|
|
97
|
+
secondary: string;
|
|
98
|
+
};
|
|
99
|
+
export declare const nodeTypeToColorName: Record<NodeType, keyof typeof langflowColors>;
|
|
100
|
+
export declare const getNodeIconName: (type: NodeType, icon?: string) => string;
|
|
101
|
+
export declare const getNodeTailwindStyles: (type: NodeType, selected?: boolean) => {
|
|
102
|
+
card: string;
|
|
103
|
+
header: string;
|
|
104
|
+
iconContainer: string;
|
|
105
|
+
icon: string;
|
|
106
|
+
title: string;
|
|
107
|
+
typeBadge: string;
|
|
108
|
+
description: string;
|
|
109
|
+
parametersSection: string;
|
|
110
|
+
parameterTitle: string;
|
|
111
|
+
parameterValue: string;
|
|
112
|
+
handleBase: string;
|
|
113
|
+
categoryColorName: "error" | "success" | "secondary" | "border" | "muted" | "background" | "cyan" | "fuchsia" | "indigo" | "lime" | "orange" | "pink" | "purple" | "red" | "teal" | "running" | "emerald" | "sky" | "amber" | "rose" | "slate" | "foreground" | "mutedForeground" | "primary";
|
|
114
|
+
categoryDefaultColor: string;
|
|
115
|
+
};
|
|
116
|
+
export declare const getNodeMinimapColor: (nodeType: NodeType) => string;
|
|
117
|
+
export declare const getNodeStatusStyles: (status: NodeStatus | undefined, _baseBorderColor: string) => string;
|
|
118
|
+
export declare const truncateText: (text: string, maxLength: number) => string;
|
|
119
|
+
export declare const parseNodeType: (type: string) => NodeType;
|
|
120
|
+
export declare const getRawNodeColors: (type: NodeType) => {
|
|
121
|
+
light: string;
|
|
122
|
+
DEFAULT: string;
|
|
123
|
+
dark: string;
|
|
124
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ToolDefinition, AddedToolInstance } from './ToolSelectorModal';
|
|
2
|
+
export interface AgentConfigDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** Display name of the agent node */
|
|
6
|
+
agentName: string;
|
|
7
|
+
/** Available tools fetched from the API */
|
|
8
|
+
availableTools: ToolDefinition[];
|
|
9
|
+
/** Currently added tool instances on this agent */
|
|
10
|
+
addedTools: AddedToolInstance[];
|
|
11
|
+
/** Current agent node params */
|
|
12
|
+
agentParams: Record<string, unknown>;
|
|
13
|
+
/** Called to add a tool instance, returns the new instanceId */
|
|
14
|
+
onAddTool: (toolId: string) => string;
|
|
15
|
+
/** Called to remove a tool instance */
|
|
16
|
+
onRemoveTool: (instanceId: string) => void;
|
|
17
|
+
/** Called to update a tool instance */
|
|
18
|
+
onUpdateTool: (instanceId: string, updates: Partial<Omit<AddedToolInstance, 'instanceId' | 'toolId'>>) => void;
|
|
19
|
+
/** Called to update agent-level params */
|
|
20
|
+
onUpdateParams: (params: Record<string, unknown>) => void;
|
|
21
|
+
/** Portal container for sub-modals */
|
|
22
|
+
portalContainer?: HTMLElement | null;
|
|
23
|
+
}
|
|
24
|
+
export declare const AgentConfigDialog: import('react').NamedExoticComponent<AgentConfigDialogProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
/**
|
|
3
|
+
* AgentNode - A specialized node for AI Agents with an attached tools box
|
|
4
|
+
*
|
|
5
|
+
* This node renders like the UniversalNode but with an additional "appendix"
|
|
6
|
+
* panel that displays and manages the tools available to the agent.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AgentNode: import('react').MemoExoticComponent<({ id, data, selected }: NodeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AddedToolInstance, ToolDefinition } from './ToolSelectorModal';
|
|
2
|
+
/**
|
|
3
|
+
* Tool category for organization in UI
|
|
4
|
+
* Matches AgentToolCategory from @invect/core
|
|
5
|
+
*/
|
|
6
|
+
export type ToolCategory = 'data' | 'web' | 'code' | 'utility' | 'custom';
|
|
7
|
+
/**
|
|
8
|
+
* Simplified tool definition for display in the UI
|
|
9
|
+
* @deprecated Use AddedToolInstance instead
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentToolDisplay {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
category: ToolCategory;
|
|
15
|
+
}
|
|
16
|
+
interface AgentToolsBoxProps {
|
|
17
|
+
/** Tool instances currently attached to the agent */
|
|
18
|
+
tools: AddedToolInstance[];
|
|
19
|
+
/** Available tool definitions for resolving category info */
|
|
20
|
+
availableTools: ToolDefinition[];
|
|
21
|
+
/** Currently selected tool instance ID (being configured) */
|
|
22
|
+
selectedInstanceId?: string | null;
|
|
23
|
+
/** Called when user clicks "Add Tool" button */
|
|
24
|
+
onAddTool?: () => void;
|
|
25
|
+
/** Called when user wants to see all selected tools (opens modal with filter) */
|
|
26
|
+
onShowMore?: () => void;
|
|
27
|
+
/** Called when user clicks on a tool (to configure it) */
|
|
28
|
+
onToolClick?: (tool: AddedToolInstance) => void;
|
|
29
|
+
/** Called when user clicks remove button on a tool */
|
|
30
|
+
onRemoveTool?: (instanceId: string) => void;
|
|
31
|
+
/** Additional CSS classes */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* AgentToolsBox - Displays and manages tools attached to an AI Agent node
|
|
36
|
+
*
|
|
37
|
+
* Renders as a compact grid showing tool tiles with category-based styling.
|
|
38
|
+
* Shows max 2x3 grid with "show more" button if there are more tools.
|
|
39
|
+
*/
|
|
40
|
+
export declare const AgentToolsBox: import('react').NamedExoticComponent<AgentToolsBoxProps>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type AppendixPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
interface NodeAppendixProps {
|
|
3
|
+
position?: AppendixPosition;
|
|
4
|
+
onPositionChange?: (position: AppendixPosition) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Override the default border class (e.g. for selected/hover/state colours) */
|
|
8
|
+
borderClassName?: string;
|
|
9
|
+
/** Whether to show the position toggle button */
|
|
10
|
+
showPositionToggle?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* NodeAppendix - A reusable component that renders an attached panel to a node
|
|
14
|
+
*
|
|
15
|
+
* Used to display additional content like tools, configurations, or previews
|
|
16
|
+
* that are visually connected to a node but rendered outside its bounds.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NodeAppendix: import('react').NamedExoticComponent<NodeAppendixProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type NodeStatusIndicatorStatus = 'initial' | 'loading' | 'success' | 'error';
|
|
3
|
+
export type NodeStatusIndicatorLoadingVariant = 'border' | 'overlay';
|
|
4
|
+
interface NodeStatusIndicatorProps {
|
|
5
|
+
status: NodeStatusIndicatorStatus;
|
|
6
|
+
loadingVariant?: NodeStatusIndicatorLoadingVariant;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A node wrapper that indicates the status of a node via a border effect.
|
|
12
|
+
*
|
|
13
|
+
* Status can be:
|
|
14
|
+
* - "initial" - no status indicator (default state)
|
|
15
|
+
* - "loading" - animated conic gradient border that rotates
|
|
16
|
+
* - "success" - green border
|
|
17
|
+
* - "error" - red border
|
|
18
|
+
*
|
|
19
|
+
* Loading variants:
|
|
20
|
+
* - "border" - animated gradient border around the node (default)
|
|
21
|
+
* - "overlay" - full overlay with spinner
|
|
22
|
+
*
|
|
23
|
+
* The animated border uses CSS @property for the conic gradient angle animation.
|
|
24
|
+
* This is supported in Chrome/Chromium browsers. Firefox will show a static gradient.
|
|
25
|
+
*/
|
|
26
|
+
export declare function NodeStatusIndicator({ status, loadingVariant, children, className, }: NodeStatusIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare namespace NodeStatusIndicator {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Node } from '@xyflow/react';
|
|
3
|
+
export type NodeViewMode = 'edit' | 'view' | 'readonly';
|
|
4
|
+
interface NodeViewContextValue {
|
|
5
|
+
mode: NodeViewMode;
|
|
6
|
+
onEdit?: (node: Node) => void;
|
|
7
|
+
onEditNode?: (nodeId: string) => void;
|
|
8
|
+
stripExecutionData: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const useNodeViewContext: () => NodeViewContextValue;
|
|
11
|
+
export interface NodeViewProviderProps {
|
|
12
|
+
mode: NodeViewMode;
|
|
13
|
+
onEdit?: (node: Node) => void;
|
|
14
|
+
onEditNode?: (nodeId: string) => void;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const NodeViewProvider: React.FC<NodeViewProviderProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NodeParamField } from '../../types/node-definition.types';
|
|
2
|
+
export interface AddCredentialRequest {
|
|
3
|
+
fieldName: string;
|
|
4
|
+
/** If specified, the credential requires OAuth2 with this specific provider */
|
|
5
|
+
oauth2Providers?: string[];
|
|
6
|
+
}
|
|
7
|
+
interface ToolParamFieldProps {
|
|
8
|
+
field: NodeParamField;
|
|
9
|
+
value: unknown;
|
|
10
|
+
onChange: (value: unknown) => void;
|
|
11
|
+
/** If true, the AI will choose this value at runtime (param included in tool's input schema) */
|
|
12
|
+
aiChosen: boolean;
|
|
13
|
+
onAiChosenChange: (enabled: boolean) => void;
|
|
14
|
+
/** Callback to open the create credential modal (passes the field name and OAuth2 provider info) */
|
|
15
|
+
onAddCredential?: (request: AddCredentialRequest) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A config field for tool parameters with "AI Chosen" vs "Static" toggle.
|
|
19
|
+
*
|
|
20
|
+
* - AI Chosen (default): The parameter IS included in the tool's input schema, and the AI
|
|
21
|
+
* decides what value to provide when calling the tool.
|
|
22
|
+
* - Static: User provides a fixed value, which is passed directly during tool execution.
|
|
23
|
+
* The parameter is NOT included in the tool's input schema shown to the model.
|
|
24
|
+
*
|
|
25
|
+
* Note: Credential fields are ALWAYS static (never AI chosen) for security reasons.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ToolParamField: import('react').NamedExoticComponent<ToolParamFieldProps>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool category for organization in UI
|
|
3
|
+
*/
|
|
4
|
+
export type ToolCategory = 'data' | 'web' | 'code' | 'utility' | 'custom';
|
|
5
|
+
/**
|
|
6
|
+
* Full tool definition with schema information
|
|
7
|
+
*/
|
|
8
|
+
export interface ToolDefinition {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
category: ToolCategory;
|
|
13
|
+
/** Tags for filtering */
|
|
14
|
+
tags?: string[];
|
|
15
|
+
/** JSON Schema for tool inputs */
|
|
16
|
+
inputSchema?: Record<string, unknown>;
|
|
17
|
+
/** Documentation URL */
|
|
18
|
+
docsUrl?: string;
|
|
19
|
+
/** Whether this tool is enabled by default */
|
|
20
|
+
enabledByDefault?: boolean;
|
|
21
|
+
/** If this tool is backed by a node, this is the node type */
|
|
22
|
+
nodeType?: string;
|
|
23
|
+
/** Provider information for grouping and branding */
|
|
24
|
+
provider?: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
/** Raw SVG markup for custom provider branding */
|
|
29
|
+
svgIcon?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* An instance of a tool that has been added to the agent.
|
|
34
|
+
* Multiple instances of the same tool can exist with different configurations.
|
|
35
|
+
*/
|
|
36
|
+
export interface AddedToolInstance {
|
|
37
|
+
/** Unique instance ID */
|
|
38
|
+
instanceId: string;
|
|
39
|
+
/** Reference to the base tool definition */
|
|
40
|
+
toolId: string;
|
|
41
|
+
/** Custom name for this instance (defaults to tool name) */
|
|
42
|
+
name: string;
|
|
43
|
+
/** Custom description for this instance (defaults to tool description) */
|
|
44
|
+
description: string;
|
|
45
|
+
/** Tool-specific configuration parameters */
|
|
46
|
+
params: Record<string, unknown>;
|
|
47
|
+
}
|
|
48
|
+
interface ToolSelectorModalProps {
|
|
49
|
+
open: boolean;
|
|
50
|
+
onOpenChange: (open: boolean) => void;
|
|
51
|
+
/** All available tools */
|
|
52
|
+
availableTools: ToolDefinition[];
|
|
53
|
+
/** Currently added tool instances */
|
|
54
|
+
addedTools: AddedToolInstance[];
|
|
55
|
+
/** Called when a tool is added. Returns the new instance ID. */
|
|
56
|
+
onAddTool: (toolId: string) => string;
|
|
57
|
+
/** Called when a tool instance is removed */
|
|
58
|
+
onRemoveTool: (instanceId: string) => void;
|
|
59
|
+
/** Called when a tool instance is updated */
|
|
60
|
+
onUpdateTool: (instanceId: string, updates: Partial<Omit<AddedToolInstance, 'instanceId' | 'toolId'>>) => void;
|
|
61
|
+
/** Portal container for rendering the modal (needed when inside ReactFlow) */
|
|
62
|
+
portalContainer?: HTMLElement | null;
|
|
63
|
+
/** If true, start with focus on added tools section */
|
|
64
|
+
initialShowSelected?: boolean;
|
|
65
|
+
/** If provided, auto-select this tool instance when modal opens */
|
|
66
|
+
initialSelectedInstanceId?: string | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* ToolSelectorModal - Modal for managing agent tools
|
|
70
|
+
*
|
|
71
|
+
* Layout:
|
|
72
|
+
* - Left side (60%):
|
|
73
|
+
* - Top: Search bar + category tabs + tag filters
|
|
74
|
+
* - Middle: Browse available tools grid
|
|
75
|
+
* - Horizontal divider (when tools added)
|
|
76
|
+
* - Bottom: Added tools (horizontally scrollable)
|
|
77
|
+
* - Right side (40%): Tool details/configuration panel
|
|
78
|
+
*/
|
|
79
|
+
export declare const ToolSelectorModal: import('react').NamedExoticComponent<ToolSelectorModalProps>;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AddCredentialRequest } from './ToolParamField';
|
|
2
|
+
import { ToolDefinition, ToolCategory, AddedToolInstance } from './ToolSelectorModal';
|
|
3
|
+
export declare const categoryConfig: Record<ToolCategory, {
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ElementType;
|
|
6
|
+
color: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const categoryOrder: ToolCategory[];
|
|
9
|
+
export declare const BrowseToolCard: import('react').NamedExoticComponent<{
|
|
10
|
+
tool: ToolDefinition;
|
|
11
|
+
onAdd: () => void;
|
|
12
|
+
onPreview: () => void;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const AddedToolTile: import('react').NamedExoticComponent<{
|
|
16
|
+
instance: AddedToolInstance;
|
|
17
|
+
toolDef: ToolDefinition | undefined;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
onSelect: () => void;
|
|
20
|
+
onRemove: () => void;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const ToolDetailsPanel: import('react').NamedExoticComponent<{
|
|
23
|
+
tool: ToolDefinition | null;
|
|
24
|
+
instance: AddedToolInstance | null;
|
|
25
|
+
onAdd?: () => void;
|
|
26
|
+
onUpdate?: (updates: Partial<Omit<AddedToolInstance, "instanceId" | "toolId">>) => void;
|
|
27
|
+
onRemove?: () => void;
|
|
28
|
+
onAddCredential?: (request: AddCredentialRequest) => void;
|
|
29
|
+
portalContainer?: HTMLElement | null;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create context-wrapped node components for all known node types.
|
|
3
|
+
* Returns the base mapping; for dynamic action-based types that aren't
|
|
4
|
+
* in NODE_COMPONENTS, use `getContextAwareComponent()` at lookup time.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createContextAwareNodes(): Record<string, React.ComponentType<any>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
|
+
import { NodeExecutionStatus } from '@invect/core/types';
|
|
3
|
+
export { UniversalNode } from './UniversalNode';
|
|
4
|
+
export { AgentNode } from './AgentNode';
|
|
5
|
+
export { NodeAppendix, type AppendixPosition } from './NodeAppendix';
|
|
6
|
+
export { AgentToolsBox, type AgentToolDisplay, type ToolCategory } from './AgentToolsBox';
|
|
7
|
+
export { type ToolDefinition, type AddedToolInstance } from './ToolSelectorModal';
|
|
8
|
+
export { ToolParamField, type AddCredentialRequest } from './ToolParamField';
|
|
9
|
+
export { NodeStatusIndicator, type NodeStatusIndicatorStatus, type NodeStatusIndicatorLoadingVariant, } from './NodeStatusIndicator';
|
|
10
|
+
export { NodeViewProvider, useNodeViewContext, type NodeViewMode, type NodeViewProviderProps, } from './NodeViewContext';
|
|
11
|
+
export { withNodeContext } from './withNodeContext';
|
|
12
|
+
export { createContextAwareNodes } from './createContextAwareNodes';
|
|
13
|
+
export { NODE_COMPONENTS, getNodeComponent, type NodeComponentType } from './nodeRegistry';
|
|
14
|
+
export interface BaseNodeData {
|
|
15
|
+
description?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
executionStatus?: NodeExecutionStatus;
|
|
19
|
+
executionOutput?: unknown;
|
|
20
|
+
executionError?: string;
|
|
21
|
+
}
|
|
22
|
+
export type FBNodeProps<T> = NodeProps<Node<T & BaseNodeData & Record<string, unknown>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy export — static mapping of known enum node types.
|
|
3
|
+
* For dynamic node type resolution (including action-based types),
|
|
4
|
+
* use `getNodeComponent()` instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NODE_COMPONENTS: Record<string, import('react').ComponentType<any>>;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the React component for a given node type string.
|
|
9
|
+
* Returns the custom component for known special types (e.g. AGENT),
|
|
10
|
+
* or UniversalNode as the default for everything else.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getNodeComponent(nodeType: string): React.ComponentType<any>;
|
|
13
|
+
export type NodeComponentType = string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare function withNodeContext<P extends {
|
|
3
|
+
data?: Record<string, unknown>;
|
|
4
|
+
onEdit?: (...args: unknown[]) => void;
|
|
5
|
+
isStatusView?: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
}>(Component: React.ComponentType<P>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface InvectLoaderProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
iconClassName?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
labelClassName?: string;
|
|
6
|
+
variant?: 'theme' | 'dark' | 'light';
|
|
7
|
+
}
|
|
8
|
+
export declare const InvectLoader: import('react').NamedExoticComponent<InvectLoaderProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface InvectLogoProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
iconClassName?: string;
|
|
4
|
+
labelClassName?: string;
|
|
5
|
+
showLabel?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
variant?: 'theme' | 'dark' | 'light';
|
|
8
|
+
}
|
|
9
|
+
export declare const InvectLogo: import('react').NamedExoticComponent<InvectLogoProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a Lucide icon component from its name string.
|
|
3
|
+
* Falls back to Zap if the name is not found.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getLucideIcon: (iconName?: string) => React.ElementType;
|
|
6
|
+
export interface ProviderIconProps {
|
|
7
|
+
/** Provider id — when it matches a known provider, a bundled inline SVG is rendered */
|
|
8
|
+
providerId?: string;
|
|
9
|
+
/** Lucide icon name (e.g. "Mail", "Github") */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** Raw SVG markup string — takes precedence over `icon` (legacy, prefer providerId) */
|
|
12
|
+
svgIcon?: string;
|
|
13
|
+
/** CSS class applied to the wrapper / Lucide icon component */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Renders a provider icon with the following priority:
|
|
18
|
+
*
|
|
19
|
+
* 1. **Bundled inline SVG** — if `providerId` matches a known provider
|
|
20
|
+
* 2. **Inline SVG string** — if `svgIcon` is provided (legacy fallback)
|
|
21
|
+
* 3. **Lucide icon** — resolved from the `icon` name string
|
|
22
|
+
*/
|
|
23
|
+
export declare const ProviderIcon: import('react').NamedExoticComponent<ProviderIconProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlowVersion } from '@invect/core/types';
|
|
3
|
+
interface BaseSidebarProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
lastModified?: Date;
|
|
6
|
+
author?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
width?: 'narrow' | 'normal' | 'wide';
|
|
10
|
+
backUrl?: string;
|
|
11
|
+
backTitle?: string;
|
|
12
|
+
versions?: FlowVersion[];
|
|
13
|
+
currentVersion?: FlowVersion;
|
|
14
|
+
onVersionChange?: (versionId: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const BaseSidebar: React.FC<BaseSidebarProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseSidebar } from './BaseSidebar';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface CronPreviewProps {
|
|
2
|
+
/** Cron expression (e.g. "0 * * * *") */
|
|
3
|
+
expression: string;
|
|
4
|
+
/** IANA timezone (e.g. "America/New_York") */
|
|
5
|
+
timezone?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shows a human-readable preview of a cron expression + next fire time.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CronPreview({ expression, timezone, className }: CronPreviewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default CronPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CronPreview } from './CronPreview';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ container, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal> & {
|
|
6
|
+
container?: HTMLElement | null;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare function AlertDialogContent({ className, container, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
10
|
+
container?: HTMLElement | null;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "icon" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
|
|
8
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "icon" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export { Button, buttonVariants };
|