@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,49 @@
|
|
|
1
|
+
import { AgentToolsPanelProps } from './AgentToolsPanel';
|
|
2
|
+
import { Credential } from '../../../../api/types';
|
|
3
|
+
import { NodeParamField } from '../../../../types/node-definition.types';
|
|
4
|
+
interface NodeDefinition {
|
|
5
|
+
paramFields?: NodeParamField[];
|
|
6
|
+
}
|
|
7
|
+
interface ConfigurationPanelProps {
|
|
8
|
+
definition: NodeDefinition | undefined;
|
|
9
|
+
formValues: Record<string, unknown>;
|
|
10
|
+
onFieldChange: (fieldName: string, value: unknown) => void;
|
|
11
|
+
credentials: Credential[];
|
|
12
|
+
credentialsLoading: boolean;
|
|
13
|
+
credentialsError: boolean;
|
|
14
|
+
onRefreshCredentials: () => void;
|
|
15
|
+
onAddNewCredential: (fieldName: string) => void;
|
|
16
|
+
onEditCredential?: (credential: Credential) => void;
|
|
17
|
+
onRefreshOAuthCredential?: (credential: Credential) => void;
|
|
18
|
+
refreshingCredentialId?: string | null;
|
|
19
|
+
configWarnings: string[];
|
|
20
|
+
configErrors: string[];
|
|
21
|
+
runError: string | null;
|
|
22
|
+
/** Per-field validation errors keyed by field name (from execution errors). */
|
|
23
|
+
fieldErrors?: Record<string, string>;
|
|
24
|
+
nodeType: string;
|
|
25
|
+
modelStatusMessage: string;
|
|
26
|
+
portalContainer?: HTMLElement | null;
|
|
27
|
+
/**
|
|
28
|
+
* Available upstream node reference IDs for loop variable suggestions
|
|
29
|
+
*/
|
|
30
|
+
upstreamVariables?: string[];
|
|
31
|
+
/** Input data from upstream nodes — for autocomplete in code fields. */
|
|
32
|
+
inputData?: Record<string, unknown>;
|
|
33
|
+
/** Node header props — rendered as the panel header */
|
|
34
|
+
headerLabel?: string;
|
|
35
|
+
onHeaderLabelChange?: (value: string) => void;
|
|
36
|
+
headerNodeTypeLabel?: string;
|
|
37
|
+
HeaderIcon?: React.ComponentType<{
|
|
38
|
+
className?: string;
|
|
39
|
+
}>;
|
|
40
|
+
headerCategoryColor?: string;
|
|
41
|
+
onRunNode?: () => void;
|
|
42
|
+
runButtonLabel?: string;
|
|
43
|
+
runDisabled?: boolean;
|
|
44
|
+
isRunning?: boolean;
|
|
45
|
+
/** Agent tools props — only provided when nodeType is AGENT */
|
|
46
|
+
agentTools?: Omit<AgentToolsPanelProps, 'portalContainer'>;
|
|
47
|
+
}
|
|
48
|
+
export declare function ConfigurationPanel({ definition, formValues, onFieldChange, credentials, credentialsLoading, credentialsError, onRefreshCredentials, onAddNewCredential, onEditCredential, onRefreshOAuthCredential, refreshingCredentialId, configWarnings, configErrors, runError, fieldErrors, nodeType, modelStatusMessage, portalContainer, upstreamVariables: _upstreamVariables, inputData, headerLabel, onHeaderLabelChange, headerNodeTypeLabel, HeaderIcon, headerCategoryColor, onRunNode, runButtonLabel, runDisabled, isRunning, agentTools, }: ConfigurationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface MapperConfig {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
expression: string;
|
|
4
|
+
mode: 'auto' | 'iterate' | 'reshape';
|
|
5
|
+
outputMode: 'array' | 'object' | 'first' | 'last' | 'concat';
|
|
6
|
+
keyField?: string;
|
|
7
|
+
concurrency: number;
|
|
8
|
+
onEmpty: 'skip' | 'error';
|
|
9
|
+
}
|
|
10
|
+
interface MapperPreviewResult {
|
|
11
|
+
success: boolean;
|
|
12
|
+
result?: unknown;
|
|
13
|
+
resultType?: 'array' | 'object' | 'primitive';
|
|
14
|
+
itemCount?: number;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
interface DataMapperPaneProps {
|
|
18
|
+
/** Current mapper config from form state */
|
|
19
|
+
value: MapperConfig | undefined;
|
|
20
|
+
/** Called when any mapper field changes */
|
|
21
|
+
onChange: (config: MapperConfig | undefined) => void;
|
|
22
|
+
/** Available upstream variable names (for hints) */
|
|
23
|
+
availableVariables?: string[];
|
|
24
|
+
/** Callback to test the mapper expression against live data */
|
|
25
|
+
onTestMapper?: (request: {
|
|
26
|
+
expression: string;
|
|
27
|
+
incomingData: Record<string, unknown>;
|
|
28
|
+
mode?: 'auto' | 'iterate' | 'reshape';
|
|
29
|
+
}) => void;
|
|
30
|
+
/** Result from the last test */
|
|
31
|
+
previewResult?: MapperPreviewResult | null;
|
|
32
|
+
/** Whether test is in progress */
|
|
33
|
+
isTestingMapper?: boolean;
|
|
34
|
+
/** Current input data JSON for passing to the test API */
|
|
35
|
+
inputData?: Record<string, unknown>;
|
|
36
|
+
/** Portal container for dropdowns */
|
|
37
|
+
portalContainer?: HTMLElement | null;
|
|
38
|
+
}
|
|
39
|
+
export declare function DataMapperPane({ value, onChange, availableVariables, onTestMapper, previewResult, isTestingMapper, inputData, portalContainer: _portalContainer, }: DataMapperPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UpstreamSlot } from '../types';
|
|
2
|
+
interface MapperConfig {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
expression: string;
|
|
5
|
+
mode: 'auto' | 'iterate' | 'reshape';
|
|
6
|
+
outputMode: 'array' | 'object' | 'first' | 'last' | 'concat';
|
|
7
|
+
keyField?: string;
|
|
8
|
+
concurrency: number;
|
|
9
|
+
onEmpty: 'skip' | 'error';
|
|
10
|
+
}
|
|
11
|
+
interface MapperPreviewResult {
|
|
12
|
+
success: boolean;
|
|
13
|
+
result?: unknown;
|
|
14
|
+
resultType?: 'array' | 'object' | 'primitive';
|
|
15
|
+
itemCount?: number;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
interface InputPanelProps {
|
|
19
|
+
value: string;
|
|
20
|
+
onChange: (value: string) => void;
|
|
21
|
+
error: string | null;
|
|
22
|
+
isTestMode: boolean;
|
|
23
|
+
onReset: () => void;
|
|
24
|
+
/** Upstream slot metadata for inline run controls */
|
|
25
|
+
upstreamSlots?: UpstreamSlot[];
|
|
26
|
+
/** Called when user clicks the run/retry button for a slot */
|
|
27
|
+
onRunSlot?: (slot: UpstreamSlot) => void;
|
|
28
|
+
/** Run all unresolved slots */
|
|
29
|
+
onRunAll?: () => void;
|
|
30
|
+
/** Number of unresolved slots */
|
|
31
|
+
unresolvedCount?: number;
|
|
32
|
+
/** Whether any slot is currently loading */
|
|
33
|
+
isAnyLoading?: boolean;
|
|
34
|
+
/** Data mapper props */
|
|
35
|
+
mapperValue?: MapperConfig;
|
|
36
|
+
onMapperChange?: (config: MapperConfig | undefined) => void;
|
|
37
|
+
mapperAvailableVariables?: string[];
|
|
38
|
+
onTestMapper?: (request: {
|
|
39
|
+
expression: string;
|
|
40
|
+
incomingData: Record<string, unknown>;
|
|
41
|
+
mode?: 'auto' | 'iterate' | 'reshape';
|
|
42
|
+
}) => void;
|
|
43
|
+
mapperPreviewResult?: MapperPreviewResult | null;
|
|
44
|
+
isTestingMapper?: boolean;
|
|
45
|
+
mapperInputData?: Record<string, unknown>;
|
|
46
|
+
portalContainer?: HTMLElement | null;
|
|
47
|
+
}
|
|
48
|
+
export declare function InputPanel({ value, onChange, error, isTestMode, onReset, upstreamSlots, onRunSlot, onRunAll, unresolvedCount, isAnyLoading, mapperValue, onMapperChange, mapperAvailableVariables, onTestMapper, mapperPreviewResult, isTestingMapper, mapperInputData, portalContainer, }: InputPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type UpstreamSlotStatus = 'idle' | 'loading' | 'resolved' | 'error';
|
|
2
|
+
export interface UpstreamSlot {
|
|
3
|
+
/** The JSON key used in the input preview (reference_id or generated slug) */
|
|
4
|
+
key: string;
|
|
5
|
+
/** The real React Flow node ID — used for the API call */
|
|
6
|
+
sourceNodeId: string;
|
|
7
|
+
/** Human-readable label shown on hover / in tooltips */
|
|
8
|
+
sourceLabel: string;
|
|
9
|
+
/** The action type string (e.g. "core.model", "gmail.send_message") */
|
|
10
|
+
sourceType: string;
|
|
11
|
+
/** Lucide icon name for the node type (e.g. "Brain", "Mail") */
|
|
12
|
+
sourceIcon?: string;
|
|
13
|
+
/** Current state of this slot */
|
|
14
|
+
status: UpstreamSlotStatus;
|
|
15
|
+
/** The resolved output value, or null if not yet produced */
|
|
16
|
+
output: unknown;
|
|
17
|
+
/** Error message if execution failed */
|
|
18
|
+
error: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FlowRunResult } from '@invect/core/types';
|
|
2
|
+
/**
|
|
3
|
+
* State for the node config panel
|
|
4
|
+
*/
|
|
5
|
+
interface NodeConfigPanelState {
|
|
6
|
+
nodeId: string | null;
|
|
7
|
+
flowId: string | null;
|
|
8
|
+
inputPreview: string;
|
|
9
|
+
outputPreview: string;
|
|
10
|
+
inputError: string | null;
|
|
11
|
+
outputError: string | null;
|
|
12
|
+
isTestMode: boolean;
|
|
13
|
+
originalInputPreview: string | null;
|
|
14
|
+
isRunningNode: boolean;
|
|
15
|
+
runError: string | null;
|
|
16
|
+
isCreateCredentialOpen: boolean;
|
|
17
|
+
activeCredentialField: string | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Actions for the node config panel
|
|
21
|
+
*/
|
|
22
|
+
interface NodeConfigPanelActions {
|
|
23
|
+
initializeForNode: (nodeId: string, flowId: string, initialInput: string, initialOutput: string) => void;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
setInputPreview: (value: string) => void;
|
|
26
|
+
setInputError: (error: string | null) => void;
|
|
27
|
+
setOutputPreview: (value: string) => void;
|
|
28
|
+
setOutputError: (error: string | null) => void;
|
|
29
|
+
enterTestMode: () => void;
|
|
30
|
+
exitTestMode: () => void;
|
|
31
|
+
resetTestMode: () => void;
|
|
32
|
+
setIsRunningNode: (isRunning: boolean) => void;
|
|
33
|
+
setRunError: (error: string | null) => void;
|
|
34
|
+
openCreateCredentialModal: (fieldName: string) => void;
|
|
35
|
+
closeCreateCredentialModal: () => void;
|
|
36
|
+
handleTestModeSuccess: (output: unknown) => void;
|
|
37
|
+
handleNormalModeSuccess: (result: FlowRunResult, nodeId: string, updateNodeData: (nodeId: string, data: Record<string, unknown>) => void) => void;
|
|
38
|
+
handleExecutionError: (error: string) => void;
|
|
39
|
+
}
|
|
40
|
+
type NodeConfigPanelStore = NodeConfigPanelState & NodeConfigPanelActions;
|
|
41
|
+
/**
|
|
42
|
+
* Zustand store for node config panel state management
|
|
43
|
+
*/
|
|
44
|
+
export declare const useNodeConfigPanelStore: import('zustand').UseBoundStore<import('zustand').StoreApi<NodeConfigPanelStore>>;
|
|
45
|
+
/**
|
|
46
|
+
* Hook to get parsed input data for test mode execution
|
|
47
|
+
*/
|
|
48
|
+
export declare function useParsedInputPreview(): Record<string, unknown>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Node } from '@xyflow/react';
|
|
2
|
+
import { NodeDefinition } from '../../../types/node-definition.types';
|
|
3
|
+
interface UseNodeConfigStateOptions {
|
|
4
|
+
node: Node<Record<string, unknown>> | null;
|
|
5
|
+
nodeType: string;
|
|
6
|
+
definition?: NodeDefinition;
|
|
7
|
+
/** Callback to persist params back to Zustand. Required for backend resolution writes. */
|
|
8
|
+
onParamsChange?: (nodeId: string, params: Record<string, unknown>) => void;
|
|
9
|
+
}
|
|
10
|
+
interface UseNodeConfigStateResult {
|
|
11
|
+
definition?: NodeDefinition;
|
|
12
|
+
values: Record<string, unknown>;
|
|
13
|
+
warnings: string[];
|
|
14
|
+
errors: string[];
|
|
15
|
+
updateField: (fieldName: string, value: unknown) => void;
|
|
16
|
+
isUpdating: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hook for node configuration state — reads params from the node (Zustand)
|
|
20
|
+
* and provides validation, backend config resolution, and field update.
|
|
21
|
+
*
|
|
22
|
+
* After Phase 1.3 refactor: `values` is derived from node.data.params (Zustand),
|
|
23
|
+
* NOT stored locally. This eliminates the dual-source-of-truth problem.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useNodeConfigState({ node, nodeType, definition, onParamsChange, }: UseNodeConfigStateOptions): UseNodeConfigStateResult;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GraphNodeType } from '@invect/core/types';
|
|
2
|
+
interface UseRunNodeOptions {
|
|
3
|
+
nodeId: string | null;
|
|
4
|
+
flowId: string;
|
|
5
|
+
nodeType: GraphNodeType;
|
|
6
|
+
nodeParams: Record<string, unknown>;
|
|
7
|
+
updateNodeData: (nodeId: string, data: Record<string, unknown>) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hook that handles all node execution logic (both test mode and normal mode)
|
|
11
|
+
*/
|
|
12
|
+
export declare function useRunNode({ nodeId, flowId, nodeType, nodeParams, updateNodeData, }: UseRunNodeOptions): {
|
|
13
|
+
runNode: () => Promise<void>;
|
|
14
|
+
isRunningNode: boolean;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const getIconComponent: (iconName?: string) => any;
|
|
2
|
+
export declare const formatNodeTypeLabel: (value: string) => string;
|
|
3
|
+
export declare const stringifyJson: (value: unknown) => string;
|
|
4
|
+
export declare const parseJson: (raw: string, setError: (value: string | null) => void) => Record<string, unknown> | null;
|
|
5
|
+
/**
|
|
6
|
+
* Extract the primary output value from the structured node output format.
|
|
7
|
+
* Handles the `{ data: { variables: { output: { value } } } }` wrapper.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractOutputValue(nodeOutput: unknown): unknown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClipboardNode, ClipboardEdge } from './use-copy-paste.types';
|
|
2
|
+
/**
|
|
3
|
+
* Convert clipboard nodes and edges into SDK source code text.
|
|
4
|
+
*
|
|
5
|
+
* Returns a string like:
|
|
6
|
+
* ```
|
|
7
|
+
* // Nodes
|
|
8
|
+
* input('query', { variableName: 'query' }),
|
|
9
|
+
*
|
|
10
|
+
* model('answer', {
|
|
11
|
+
* credentialId: 'cred-abc',
|
|
12
|
+
* model: 'gpt-4o-mini',
|
|
13
|
+
* prompt: '{{ query }}',
|
|
14
|
+
* }),
|
|
15
|
+
*
|
|
16
|
+
* // Edges
|
|
17
|
+
* ['query', 'answer'],
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function serializeToSDK(nodes: ClipboardNode[], edges: ClipboardEdge[]): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the copy-paste system.
|
|
3
|
+
*
|
|
4
|
+
* Extracted so both `use-copy-paste.ts` and `serialize-to-sdk.ts` can
|
|
5
|
+
* reference the same clipboard payload shapes without circular imports.
|
|
6
|
+
*/
|
|
7
|
+
export interface ClipboardData {
|
|
8
|
+
sourceFlowId: string;
|
|
9
|
+
nodes: ClipboardNode[];
|
|
10
|
+
edges: ClipboardEdge[];
|
|
11
|
+
copyTime: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ClipboardNode {
|
|
14
|
+
originalId: string;
|
|
15
|
+
type: string;
|
|
16
|
+
relativePosition: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
absolutePosition?: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
data: {
|
|
25
|
+
display_name: string;
|
|
26
|
+
reference_id: string;
|
|
27
|
+
params: Record<string, unknown>;
|
|
28
|
+
mapper?: unknown;
|
|
29
|
+
_loop?: unknown;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface ClipboardEdge {
|
|
33
|
+
originalId: string;
|
|
34
|
+
source: string;
|
|
35
|
+
target: string;
|
|
36
|
+
sourceHandle?: string | null;
|
|
37
|
+
targetHandle?: string | null;
|
|
38
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Node, Edge } from '@xyflow/react';
|
|
2
|
+
import { LayoutDirection } from './flow-editor.store';
|
|
3
|
+
import { LayoutAlgorithm } from '../../utils/layoutUtils';
|
|
4
|
+
interface UseFlowEditorOptions {
|
|
5
|
+
flowId: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
basePath?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Main hook that wires React Query with Zustand for the flow editor.
|
|
11
|
+
*
|
|
12
|
+
* React Query handles:
|
|
13
|
+
* - Fetching flow data from the server
|
|
14
|
+
* - Caching and background refetching
|
|
15
|
+
* - Mutation (save) operations
|
|
16
|
+
*
|
|
17
|
+
* Zustand handles:
|
|
18
|
+
* - Local node/edge state (working copy)
|
|
19
|
+
* - Dirty tracking
|
|
20
|
+
* - Selection state
|
|
21
|
+
* - UI state (panels, layout)
|
|
22
|
+
*/
|
|
23
|
+
export declare function useFlowEditor({ flowId, version, basePath }: UseFlowEditorOptions): {
|
|
24
|
+
flowId: string;
|
|
25
|
+
flowName: string;
|
|
26
|
+
nodes: Node[];
|
|
27
|
+
edges: Edge[];
|
|
28
|
+
isActive: boolean | undefined;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
error: string | null;
|
|
31
|
+
isDirty: boolean;
|
|
32
|
+
save: (options?: {
|
|
33
|
+
skipSuccessToast?: boolean;
|
|
34
|
+
}) => Promise<boolean>;
|
|
35
|
+
execute: () => Promise<void>;
|
|
36
|
+
isSaving: boolean;
|
|
37
|
+
isExecuting: boolean;
|
|
38
|
+
currentLayout: LayoutAlgorithm;
|
|
39
|
+
layoutDirection: LayoutDirection;
|
|
40
|
+
applyLayout: (algorithm?: LayoutAlgorithm, direction?: LayoutDirection) => Promise<void>;
|
|
41
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('@invect/core/types').ReactFlowData, Error>>;
|
|
42
|
+
store: import('./flow-editor.store').FlowEditorStore;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FlowRunsTable } from './FlowRunsTable';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface FlowRunsViewProps {
|
|
2
|
+
flowId: string;
|
|
3
|
+
flowVersion?: string;
|
|
4
|
+
basePath?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function FlowRunsView({ flowId, flowVersion, basePath }: FlowRunsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default FlowRunsView;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FlowRun } from '@invect/core/types';
|
|
2
|
+
interface FlowStatusViewProps {
|
|
3
|
+
flowId: string;
|
|
4
|
+
flowVersion?: string;
|
|
5
|
+
basePath?: string;
|
|
6
|
+
selectedRunId: string | null;
|
|
7
|
+
selectedRun: FlowRun | null | undefined;
|
|
8
|
+
logsExpanded: boolean;
|
|
9
|
+
onNodeClick?: (nodeId: string) => void;
|
|
10
|
+
onEditNode?: (nodeId: string) => void;
|
|
11
|
+
/** Node ID to focus/center on (only set on user-initiated selection) */
|
|
12
|
+
focusNodeId?: string | null;
|
|
13
|
+
/** Callback when focus animation completes */
|
|
14
|
+
onFocusComplete?: () => void;
|
|
15
|
+
/** Incrementing counter that triggers a recenter (e.g. after panel resize) */
|
|
16
|
+
recenterTrigger?: number;
|
|
17
|
+
/** Currently selected node ID in the execution logs (for resize recenter) */
|
|
18
|
+
selectedNodeId?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export declare function FlowStatusView({ flowId, flowVersion, basePath: _basePath, selectedRunId, selectedRun, logsExpanded, onNodeClick, onEditNode, focusNodeId, onFocusComplete, recenterTrigger, selectedNodeId, }: FlowStatusViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface RunSelectorItem {
|
|
2
|
+
id: string;
|
|
3
|
+
status: string;
|
|
4
|
+
startedAt?: string | Date;
|
|
5
|
+
completedAt?: string | Date;
|
|
6
|
+
}
|
|
7
|
+
interface RunSelectorProps {
|
|
8
|
+
runs: RunSelectorItem[];
|
|
9
|
+
selectedRunId: string | null;
|
|
10
|
+
onSelectRun: (runId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function RunSelector({ runs, selectedRunId, onSelectRun }: RunSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RunListItem {
|
|
3
|
+
id: string;
|
|
4
|
+
status: string;
|
|
5
|
+
startedAt?: string | Date;
|
|
6
|
+
completedAt?: string | Date;
|
|
7
|
+
}
|
|
8
|
+
interface RunsSidebarProps {
|
|
9
|
+
runs: RunListItem[];
|
|
10
|
+
selectedRunId: string | null;
|
|
11
|
+
onSelectRun: (runId: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const RunsSidebar: React.FC<RunsSidebarProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutionLogToolCall, AgentExecutionMetadata } from './use-execution-log-data';
|
|
2
|
+
interface AgentToolExecutionsListProps {
|
|
3
|
+
toolCalls: ExecutionLogToolCall[];
|
|
4
|
+
agentMetadata?: AgentExecutionMetadata;
|
|
5
|
+
}
|
|
6
|
+
export declare function AgentToolExecutionsList({ toolCalls, agentMetadata, }: AgentToolExecutionsListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FlowStatusView } from './FlowStatusView';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ExecutionLogNode, SelectedExecutionAttempt } from './use-execution-log-data';
|
|
2
|
+
import { RunSelectorItem } from './RunSelector';
|
|
3
|
+
interface LogsPanelProps {
|
|
4
|
+
nodes: ExecutionLogNode[];
|
|
5
|
+
selectedAttempt: SelectedExecutionAttempt | null;
|
|
6
|
+
onSelectAttempt: (next: SelectedExecutionAttempt) => void;
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** Runs list for the run selector dropdown */
|
|
11
|
+
runs?: RunSelectorItem[];
|
|
12
|
+
/** Currently selected run ID */
|
|
13
|
+
selectedRunId?: string | null;
|
|
14
|
+
/** Callback when a run is selected from the dropdown */
|
|
15
|
+
onSelectRun?: (runId: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function LogsPanel({ nodes, selectedAttempt, onSelectAttempt, isExpanded, onToggle, loading, runs, selectedRunId, onSelectRun, }: LogsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { NodeExecution, NodeExecutionStatus, ReactFlowNode, GraphNodeType, AgentFinishReason } from '@invect/core/types';
|
|
2
|
+
/**
|
|
3
|
+
* Individual tool call executed by an AI Agent
|
|
4
|
+
*/
|
|
5
|
+
export interface ExecutionLogToolCall {
|
|
6
|
+
id: string;
|
|
7
|
+
toolId: string;
|
|
8
|
+
toolName: string;
|
|
9
|
+
input: Record<string, unknown>;
|
|
10
|
+
output?: unknown;
|
|
11
|
+
error?: string;
|
|
12
|
+
success: boolean;
|
|
13
|
+
iteration: number;
|
|
14
|
+
executionTimeMs: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Agent-specific metadata for execution attempts
|
|
18
|
+
*/
|
|
19
|
+
export interface AgentExecutionMetadata {
|
|
20
|
+
iterations: number;
|
|
21
|
+
finishReason: AgentFinishReason;
|
|
22
|
+
finalResponse: string;
|
|
23
|
+
model?: string;
|
|
24
|
+
provider?: string;
|
|
25
|
+
tokenUsage?: {
|
|
26
|
+
conversationTokensEstimate: number;
|
|
27
|
+
truncationOccurred: boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface ExecutionLogAttempt {
|
|
31
|
+
id: string;
|
|
32
|
+
attemptNumber: number;
|
|
33
|
+
label: string;
|
|
34
|
+
status: NodeExecutionStatus;
|
|
35
|
+
startedAt?: string;
|
|
36
|
+
completedAt?: string;
|
|
37
|
+
durationMs?: number;
|
|
38
|
+
inputs?: Record<string, unknown>;
|
|
39
|
+
outputs?: NodeExecution['outputs'];
|
|
40
|
+
error?: string;
|
|
41
|
+
nodeExecutionId?: string;
|
|
42
|
+
/** Tool calls for agent nodes */
|
|
43
|
+
toolCalls?: ExecutionLogToolCall[];
|
|
44
|
+
/** Agent-specific metadata for agent nodes */
|
|
45
|
+
agentMetadata?: AgentExecutionMetadata;
|
|
46
|
+
/** True when this attempt is a loop/mapper iteration (detected via _item in inputs) */
|
|
47
|
+
isLoopIteration?: boolean;
|
|
48
|
+
/** The _item metadata for loop iterations */
|
|
49
|
+
iterationItem?: {
|
|
50
|
+
value: unknown;
|
|
51
|
+
index: number;
|
|
52
|
+
iteration: number;
|
|
53
|
+
first: boolean;
|
|
54
|
+
last: boolean;
|
|
55
|
+
total: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface ExecutionLogNode {
|
|
59
|
+
nodeId: string;
|
|
60
|
+
nodeName: string;
|
|
61
|
+
nodeType?: GraphNodeType | string;
|
|
62
|
+
latestStatus: NodeExecutionStatus;
|
|
63
|
+
attempts: ExecutionLogAttempt[];
|
|
64
|
+
definitionIndex: number;
|
|
65
|
+
}
|
|
66
|
+
export interface SelectedExecutionAttempt {
|
|
67
|
+
nodeId: string;
|
|
68
|
+
attemptId: string;
|
|
69
|
+
/** Optional: selected tool call ID within an agent node */
|
|
70
|
+
toolCallId?: string;
|
|
71
|
+
}
|
|
72
|
+
type UseExecutionLogDataParams = {
|
|
73
|
+
nodes?: ReactFlowNode[];
|
|
74
|
+
nodeExecutions?: NodeExecution[];
|
|
75
|
+
};
|
|
76
|
+
export declare function useExecutionLogData({ nodes, nodeExecutions }: UseExecutionLogDataParams): {
|
|
77
|
+
nodes: {
|
|
78
|
+
nodeId: string;
|
|
79
|
+
nodeName: string;
|
|
80
|
+
nodeType: string | undefined;
|
|
81
|
+
attempts: {
|
|
82
|
+
attemptNumber: number;
|
|
83
|
+
label: string;
|
|
84
|
+
id: string;
|
|
85
|
+
status: NodeExecutionStatus;
|
|
86
|
+
startedAt?: string;
|
|
87
|
+
completedAt?: string;
|
|
88
|
+
durationMs?: number;
|
|
89
|
+
inputs?: Record<string, unknown>;
|
|
90
|
+
outputs?: NodeExecution["outputs"];
|
|
91
|
+
error?: string;
|
|
92
|
+
nodeExecutionId?: string;
|
|
93
|
+
/** Tool calls for agent nodes */
|
|
94
|
+
toolCalls?: ExecutionLogToolCall[];
|
|
95
|
+
/** Agent-specific metadata for agent nodes */
|
|
96
|
+
agentMetadata?: AgentExecutionMetadata;
|
|
97
|
+
/** True when this attempt is a loop/mapper iteration (detected via _item in inputs) */
|
|
98
|
+
isLoopIteration?: boolean;
|
|
99
|
+
/** The _item metadata for loop iterations */
|
|
100
|
+
iterationItem?: {
|
|
101
|
+
value: unknown;
|
|
102
|
+
index: number;
|
|
103
|
+
iteration: number;
|
|
104
|
+
first: boolean;
|
|
105
|
+
last: boolean;
|
|
106
|
+
total: number;
|
|
107
|
+
};
|
|
108
|
+
}[];
|
|
109
|
+
latestStatus: NodeExecutionStatus;
|
|
110
|
+
definitionIndex: number;
|
|
111
|
+
}[];
|
|
112
|
+
};
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { EdgeProps, MarkerType } from '@xyflow/react';
|
|
3
|
+
export interface BatchFlowEdgeData extends Record<string, unknown> {
|
|
4
|
+
label?: string;
|
|
5
|
+
type?: 'default' | 'data' | 'conditional' | 'error' | 'skipped';
|
|
6
|
+
animated?: boolean;
|
|
7
|
+
highlighted?: boolean;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
sourceHandle?: string;
|
|
10
|
+
targetHandle?: string;
|
|
11
|
+
sourceNodeStatus?: string;
|
|
12
|
+
targetNodeStatus?: string;
|
|
13
|
+
validation?: {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
message?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const BatchFlowEdge: React.NamedExoticComponent<EdgeProps>;
|
|
19
|
+
export declare const defaultEdgeOptions: {
|
|
20
|
+
type: string;
|
|
21
|
+
animated: boolean;
|
|
22
|
+
style: {
|
|
23
|
+
strokeWidth: number;
|
|
24
|
+
stroke: string;
|
|
25
|
+
fill: string;
|
|
26
|
+
};
|
|
27
|
+
markerEnd: {
|
|
28
|
+
type: MarkerType;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
color: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LayoutAlgorithm } from '../../utils/layoutUtils';
|
|
3
|
+
interface LayoutSelectorProps {
|
|
4
|
+
currentLayout: LayoutAlgorithm;
|
|
5
|
+
onLayoutChange: (layout: LayoutAlgorithm, direction?: 'TB' | 'BT' | 'LR' | 'RL') => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const LayoutSelector: React.FC<LayoutSelectorProps>;
|
|
9
|
+
export {};
|