@mesantosrai/pipeline-canvas 1.0.0
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 +545 -0
- package/dist/_virtual/dynamic-import-helper.mjs +17 -0
- package/dist/_virtual/dynamic-import-helper.mjs.map +1 -0
- package/dist/components/CustomHandle.d.ts +9 -0
- package/dist/components/CustomHandle.d.ts.map +1 -0
- package/dist/components/CustomHandle.mjs +18 -0
- package/dist/components/CustomHandle.mjs.map +1 -0
- package/dist/components/ExecutionLogsPanel.d.ts +3 -0
- package/dist/components/ExecutionLogsPanel.d.ts.map +1 -0
- package/dist/components/ExecutionLogsPanel.mjs +189 -0
- package/dist/components/ExecutionLogsPanel.mjs.map +1 -0
- package/dist/components/NodeContextMenu.d.ts +15 -0
- package/dist/components/NodeContextMenu.d.ts.map +1 -0
- package/dist/components/NodeContextMenu.mjs +110 -0
- package/dist/components/NodeContextMenu.mjs.map +1 -0
- package/dist/components/PipelineCanvas.d.ts +4 -0
- package/dist/components/PipelineCanvas.d.ts.map +1 -0
- package/dist/components/PipelineCanvas.mjs +1016 -0
- package/dist/components/PipelineCanvas.mjs.map +1 -0
- package/dist/components/PipelineCanvasProvider.d.ts +30 -0
- package/dist/components/PipelineCanvasProvider.d.ts.map +1 -0
- package/dist/components/PipelineCanvasProvider.mjs +7 -0
- package/dist/components/PipelineCanvasProvider.mjs.map +1 -0
- package/dist/components/PipelineExecution.d.ts +16 -0
- package/dist/components/PipelineExecution.d.ts.map +1 -0
- package/dist/components/PipelineExecution.mjs +310 -0
- package/dist/components/PipelineExecution.mjs.map +1 -0
- package/dist/components/PipelineManager.d.ts +8 -0
- package/dist/components/PipelineManager.d.ts.map +1 -0
- package/dist/components/PipelineManager.mjs +143 -0
- package/dist/components/PipelineManager.mjs.map +1 -0
- package/dist/components/PipelineNodeConfig.d.ts +11 -0
- package/dist/components/PipelineNodeConfig.d.ts.map +1 -0
- package/dist/components/PipelineNodeConfig.mjs +1808 -0
- package/dist/components/PipelineNodeConfig.mjs.map +1 -0
- package/dist/components/PipelineNodePalette.d.ts +3 -0
- package/dist/components/PipelineNodePalette.d.ts.map +1 -0
- package/dist/components/PipelineNodePalette.mjs +87 -0
- package/dist/components/PipelineNodePalette.mjs.map +1 -0
- package/dist/components/SavePipelineDialog.d.ts +9 -0
- package/dist/components/SavePipelineDialog.d.ts.map +1 -0
- package/dist/components/SavePipelineDialog.mjs +140 -0
- package/dist/components/SavePipelineDialog.mjs.map +1 -0
- package/dist/components/SavedPipelinesList.d.ts +3 -0
- package/dist/components/SavedPipelinesList.d.ts.map +1 -0
- package/dist/components/SavedPipelinesList.mjs +172 -0
- package/dist/components/SavedPipelinesList.mjs.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.mjs +51 -0
- package/dist/components/ui/alert.mjs.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.mjs +45 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.mjs +99 -0
- package/dist/components/ui/dialog.mjs.map +1 -0
- package/dist/components/ui/index.d.ts +8 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.mjs +22 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.mjs +20 -0
- package/dist/components/ui/label.mjs.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.mjs +121 -0
- package/dist/components/ui/select.mjs.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.mjs +24 -0
- package/dist/components/ui/tooltip.mjs.map +1 -0
- package/dist/context/PipelineContext.d.ts +50 -0
- package/dist/context/PipelineContext.d.ts.map +1 -0
- package/dist/context/PipelineContext.mjs +36 -0
- package/dist/context/PipelineContext.mjs.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +45 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.mjs +9 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.mjs +256 -0
- package/dist/node_modules/zustand/esm/middleware.mjs.map +1 -0
- package/dist/nodes/alphafold_node/node.json.mjs +82 -0
- package/dist/nodes/alphafold_node/node.json.mjs.map +1 -0
- package/dist/nodes/http_request_node/node.json.mjs +383 -0
- package/dist/nodes/http_request_node/node.json.mjs.map +1 -0
- package/dist/nodes/input_node/node.json.mjs +51 -0
- package/dist/nodes/input_node/node.json.mjs.map +1 -0
- package/dist/nodes/message_input_node/node.json.mjs +90 -0
- package/dist/nodes/message_input_node/node.json.mjs.map +1 -0
- package/dist/nodes/proteinmpnn_node/node.json.mjs +83 -0
- package/dist/nodes/proteinmpnn_node/node.json.mjs.map +1 -0
- package/dist/nodes/rfdiffusion_node/node.json.mjs +281 -0
- package/dist/nodes/rfdiffusion_node/node.json.mjs.map +1 -0
- package/dist/store/pipelineStore.d.ts +108 -0
- package/dist/store/pipelineStore.d.ts.map +1 -0
- package/dist/store/pipelineStore.mjs +633 -0
- package/dist/store/pipelineStore.mjs.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/dependencies.d.ts +93 -0
- package/dist/types/dependencies.d.ts.map +1 -0
- package/dist/types/index.d.ts +56 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/logger.d.ts +67 -0
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/logger.mjs +22 -0
- package/dist/types/logger.mjs.map +1 -0
- package/dist/utils/executionEngine.d.ts +27 -0
- package/dist/utils/executionEngine.d.ts.map +1 -0
- package/dist/utils/executionEngine.mjs +461 -0
- package/dist/utils/executionEngine.mjs.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.mjs +29 -0
- package/dist/utils/logger.mjs.map +1 -0
- package/dist/utils/nodeLoader.d.ts +76 -0
- package/dist/utils/nodeLoader.d.ts.map +1 -0
- package/dist/utils/nodeLoader.mjs +48 -0
- package/dist/utils/nodeLoader.mjs.map +1 -0
- package/dist/utils/templateResolver.d.ts +10 -0
- package/dist/utils/templateResolver.d.ts.map +1 -0
- package/dist/utils/templateResolver.mjs +64 -0
- package/dist/utils/templateResolver.mjs.map +1 -0
- package/dist/utils/topologicalSort.d.ts +10 -0
- package/dist/utils/topologicalSort.d.ts.map +1 -0
- package/dist/utils/topologicalSort.mjs +25 -0
- package/dist/utils/topologicalSort.mjs.map +1 -0
- package/nodes/alphafold_node/node.json +77 -0
- package/nodes/http_request_node/node.json +311 -0
- package/nodes/input_node/node.json +47 -0
- package/nodes/message_input_node/node.json +56 -0
- package/nodes/proteinmpnn_node/node.json +78 -0
- package/nodes/rfdiffusion_node/node.json +231 -0
- package/package.json +94 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipelineStore.mjs","sources":["../../store/pipelineStore.ts"],"sourcesContent":["import { create } from 'zustand';\nimport { persist, createJSONStorage } from 'zustand/middleware';\nimport { Pipeline, PipelineNode, PipelineBlueprint, NodeStatus } from '../types/index';\nimport { topologicalSort } from '../utils/topologicalSort';\nimport { ApiClient, AuthState } from '../types/dependencies';\n\n// Execution log entry for tracking node execution history\nexport interface ExecutionLogEntry {\n nodeId: string;\n nodeLabel: string;\n nodeType: string;\n status: NodeStatus;\n startedAt?: Date;\n completedAt?: Date;\n duration?: number; // in ms\n error?: string;\n input?: Record<string, any>;\n output?: Record<string, any>;\n // HTTP request/response details (similar to n8n)\n request?: {\n method?: string;\n url?: string;\n headers?: Record<string, string>;\n queryParams?: Record<string, any>;\n body?: any;\n };\n response?: {\n status?: number;\n statusText?: string;\n headers?: Record<string, string>;\n data?: any;\n };\n}\n\n// Execution session for tracking full pipeline runs\nexport interface ExecutionSession {\n id: string;\n startedAt: Date;\n completedAt?: Date;\n status: 'running' | 'completed' | 'failed' | 'stopped';\n logs: ExecutionLogEntry[];\n}\n\ninterface PipelineState {\n // Current active pipeline\n currentPipeline: Pipeline | null;\n \n // Saved pipelines library\n savedPipelines: Pipeline[];\n \n // Ghost blueprint (from agent)\n ghostBlueprint: PipelineBlueprint | null;\n \n // Execution state\n isExecuting: boolean;\n executionOrder: string[]; // Topologically sorted node IDs\n \n // Execution logs and history\n currentExecution: ExecutionSession | null;\n executionHistory: ExecutionSession[];\n \n // View mode\n viewMode: 'editor' | 'executions';\n selectedLogNodeId: string | null;\n \n // Sidebar state\n isPipelinesSidebarCollapsed: boolean;\n \n // Auto-save state\n lastSavedAt: Date | null;\n isSaving: boolean;\n \n // Actions\n setCurrentPipeline: (pipeline: Pipeline | null) => void;\n setGhostBlueprint: (blueprint: PipelineBlueprint | null) => void;\n approveBlueprint: () => void;\n approveBlueprintWithSelection: (selectedNodeIds: string[], nodeConfigs: Record<string, Record<string, any>>) => Pipeline | null;\n rejectBlueprint: () => void;\n addNode: (node: PipelineNode) => void;\n updateNode: (nodeId: string, updates: Partial<PipelineNode>) => void;\n deleteNode: (nodeId: string) => void;\n addEdge: (source: string, target: string) => void;\n deleteEdge: (source: string, target: string) => void;\n savePipeline: (name: string, messageId?: string, conversationId?: string, deps?: { apiClient?: ApiClient; authState?: AuthState; sessionId?: string }) => Promise<void>;\n loadPipeline: (pipelineId: string, deps?: { apiClient?: ApiClient; authState?: AuthState }) => Promise<void>;\n deletePipeline: (pipelineId: string, deps?: { apiClient?: ApiClient; authState?: AuthState }) => Promise<void>;\n syncPipelines: (deps?: { apiClient?: ApiClient; authState?: AuthState }) => Promise<void>;\n startExecution: () => void;\n executeSingleNode: (nodeId: string) => void;\n stopExecution: () => void;\n updateNodeStatus: (nodeId: string, status: NodeStatus, error?: string) => void;\n clearPipeline: () => void;\n \n // View mode actions\n setViewMode: (mode: 'editor' | 'executions') => void;\n setSelectedLogNodeId: (nodeId: string | null) => void;\n \n // Sidebar actions\n setPipelinesSidebarCollapsed: (collapsed: boolean) => void;\n togglePipelinesSidebar: () => void;\n \n // Execution log actions\n addExecutionLog: (entry: Omit<ExecutionLogEntry, 'startedAt'>) => void;\n updateExecutionLog: (nodeId: string, updates: Partial<ExecutionLogEntry>) => void;\n}\n\n// Module-level dependency store (set by PipelineProvider)\nlet globalDependencies: {\n apiClient?: ApiClient;\n authState?: AuthState;\n sessionId?: string;\n} = {};\n\n/**\n * Set dependencies for the pipeline store\n * Called by PipelineProvider when context is available\n */\nexport const setPipelineDependencies = (deps: {\n apiClient?: ApiClient;\n authState?: AuthState;\n sessionId?: string;\n}) => {\n globalDependencies = deps;\n};\n\n/**\n * Get current dependencies\n */\nconst getDependencies = () => globalDependencies;\n\n// Debounce timer for auto-save (shared across store instances)\nlet autoSaveTimer: NodeJS.Timeout | null = null;\nconst DRAFT_KEY = 'novoprotein-pipeline-draft';\nconst UNNAMED_PIPELINE_NAME = 'Unnamed Pipeline';\n\nconst debouncedAutoSave = (get: () => PipelineState, set: (partial: Partial<PipelineState>) => void) => {\n if (autoSaveTimer) {\n clearTimeout(autoSaveTimer);\n }\n \n autoSaveTimer = setTimeout(async () => {\n const { currentPipeline } = get();\n if (!currentPipeline) return;\n \n set({ isSaving: true });\n \n try {\n // Save draft to localStorage (including unnamed pipelines)\n const draft = {\n ...currentPipeline,\n updatedAt: new Date(),\n };\n localStorage.setItem(DRAFT_KEY, JSON.stringify(draft));\n \n // Also save draft to backend if dependencies are available\n const deps = getDependencies();\n const user = deps.authState?.user;\n const apiClient = deps.apiClient;\n \n if (user && apiClient) {\n try {\n // Save as draft pipeline (status='draft')\n await apiClient.post('/pipelines', {\n ...draft,\n status: 'draft',\n });\n console.log('[debouncedAutoSave] Draft pipeline saved to backend');\n } catch (error: any) {\n console.error('[debouncedAutoSave] Failed to save draft to backend:', error);\n // Don't throw - localStorage save succeeded\n }\n }\n \n set({ \n lastSavedAt: new Date(),\n isSaving: false \n });\n } catch (error) {\n console.error('Auto-save failed:', error);\n set({ isSaving: false });\n }\n }, 1000); // 1 second debounce\n};\n\nexport const usePipelineStore = create<PipelineState>()(\n persist(\n (set, get) => ({\n currentPipeline: null,\n savedPipelines: [],\n ghostBlueprint: null,\n isExecuting: false,\n executionOrder: [],\n currentExecution: null,\n executionHistory: [],\n viewMode: 'editor',\n selectedLogNodeId: null,\n isPipelinesSidebarCollapsed: false,\n lastSavedAt: null,\n isSaving: false,\n \n setCurrentPipeline: (pipeline) => {\n if (pipeline) {\n const { savedPipelines } = get();\n // Update savedPipelines if this pipeline already exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === pipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = pipeline;\n set({ currentPipeline: pipeline, savedPipelines: updated });\n } else {\n set({ currentPipeline: pipeline });\n }\n debouncedAutoSave(get, set);\n } else {\n set({ currentPipeline: null });\n }\n },\n \n setGhostBlueprint: (blueprint) => set({ ghostBlueprint: blueprint }),\n \n approveBlueprint: () => {\n const { ghostBlueprint } = get();\n if (!ghostBlueprint) {\n console.warn('[PipelineStore] approveBlueprint called but ghostBlueprint is null');\n return;\n }\n \n const nodes: PipelineNode[] = ghostBlueprint.nodes.map((node, index) => ({\n ...node,\n status: 'idle' as NodeStatus,\n position: { x: 100 + (index % 3) * 300, y: 100 + Math.floor(index / 3) * 200 },\n }));\n \n const pipeline: Pipeline = {\n id: `pipeline_${Date.now()}`,\n name: UNNAMED_PIPELINE_NAME,\n nodes,\n edges: ghostBlueprint.edges,\n createdAt: new Date(),\n updatedAt: new Date(),\n status: 'draft',\n };\n \n const { savedPipelines } = get();\n // Add to saved pipelines list (will be persisted via persist middleware)\n const updatedSavedPipelines = [...savedPipelines, pipeline];\n console.log('[PipelineStore] approveBlueprint: Adding pipeline to savedPipelines', {\n pipelineId: pipeline.id,\n pipelineName: pipeline.name,\n nodeCount: pipeline.nodes.length,\n currentSavedCount: savedPipelines.length,\n newSavedCount: updatedSavedPipelines.length,\n });\n set({ \n currentPipeline: pipeline,\n ghostBlueprint: null,\n savedPipelines: updatedSavedPipelines,\n });\n debouncedAutoSave(get, set);\n },\n \n approveBlueprintWithSelection: (selectedNodeIds: string[], nodeConfigs: Record<string, Record<string, any>>) => {\n const { ghostBlueprint } = get();\n if (!ghostBlueprint) {\n console.warn('[PipelineStore] approveBlueprintWithSelection called but ghostBlueprint is null');\n return null;\n }\n \n // Filter nodes to only selected ones\n const selectedNodes = ghostBlueprint.nodes.filter(node => selectedNodeIds.includes(node.id));\n \n // Create nodes with updated configs\n const nodes: PipelineNode[] = selectedNodes.map((node, index) => ({\n ...node,\n config: { ...node.config, ...(nodeConfigs[node.id] || {}) },\n status: 'idle' as NodeStatus,\n position: { x: 100 + (index % 3) * 300, y: 100 + Math.floor(index / 3) * 200 },\n }));\n \n // Filter edges to only include edges between selected nodes\n const selectedNodeIdSet = new Set(selectedNodeIds);\n const edges = ghostBlueprint.edges.filter(\n edge => selectedNodeIdSet.has(edge.source) && selectedNodeIdSet.has(edge.target)\n );\n \n const pipeline: Pipeline = {\n id: `pipeline_${Date.now()}`,\n name: UNNAMED_PIPELINE_NAME,\n nodes,\n edges,\n createdAt: new Date(),\n updatedAt: new Date(),\n status: 'draft',\n };\n \n const { savedPipelines } = get();\n const updatedSavedPipelines = [...savedPipelines, pipeline];\n console.log('[PipelineStore] approveBlueprintWithSelection: Adding pipeline', {\n pipelineId: pipeline.id,\n selectedNodeCount: nodes.length,\n totalNodeCount: ghostBlueprint.nodes.length,\n });\n set({ \n currentPipeline: pipeline,\n ghostBlueprint: null,\n savedPipelines: updatedSavedPipelines,\n });\n debouncedAutoSave(get, set);\n return pipeline;\n },\n \n rejectBlueprint: () => set({ ghostBlueprint: null }),\n \n addNode: (node) => {\n const { currentPipeline } = get();\n if (!currentPipeline) {\n const newPipeline: Pipeline = {\n id: `pipeline_${Date.now()}`,\n name: UNNAMED_PIPELINE_NAME,\n nodes: [node],\n edges: [],\n createdAt: new Date(),\n updatedAt: new Date(),\n status: 'draft',\n };\n const { savedPipelines } = get();\n // Add to saved pipelines list (but won't be persisted)\n set({ \n currentPipeline: newPipeline,\n savedPipelines: [...savedPipelines, newPipeline],\n });\n debouncedAutoSave(get, set);\n } else {\n const updatedPipeline = {\n ...currentPipeline,\n nodes: [...currentPipeline.nodes, node],\n updatedAt: new Date(),\n };\n const { savedPipelines } = get();\n // Update savedPipelines if this pipeline exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === currentPipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = updatedPipeline;\n set({ \n currentPipeline: updatedPipeline,\n savedPipelines: updated,\n });\n } else {\n set({ currentPipeline: updatedPipeline });\n }\n debouncedAutoSave(get, set);\n }\n },\n \n updateNode: (nodeId, updates) => {\n const { currentPipeline, savedPipelines } = get();\n if (!currentPipeline) return;\n \n const updatedPipeline = {\n ...currentPipeline,\n nodes: currentPipeline.nodes.map((node) => {\n if (node.id === nodeId) {\n // Deep merge config if it exists in updates\n const mergedNode = { ...node, ...updates };\n if (updates.config && node.config) {\n mergedNode.config = { ...node.config, ...updates.config };\n }\n return mergedNode;\n }\n return node;\n }),\n updatedAt: new Date(),\n };\n \n // Update savedPipelines if this pipeline exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === currentPipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = updatedPipeline;\n set({ \n currentPipeline: updatedPipeline,\n savedPipelines: updated,\n });\n } else {\n set({ currentPipeline: updatedPipeline });\n }\n debouncedAutoSave(get, set);\n },\n \n deleteNode: (nodeId) => {\n const { currentPipeline, savedPipelines } = get();\n if (!currentPipeline) return;\n \n const updatedPipeline = {\n ...currentPipeline,\n nodes: currentPipeline.nodes.filter((node) => node.id !== nodeId),\n edges: currentPipeline.edges.filter(\n (edge) => edge.source !== nodeId && edge.target !== nodeId\n ),\n updatedAt: new Date(),\n };\n \n // Update savedPipelines if this pipeline exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === currentPipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = updatedPipeline;\n set({ \n currentPipeline: updatedPipeline,\n savedPipelines: updated,\n });\n } else {\n set({ currentPipeline: updatedPipeline });\n }\n debouncedAutoSave(get, set);\n },\n \n addEdge: (source, target) => {\n const { currentPipeline, savedPipelines } = get();\n if (!currentPipeline) return;\n \n // Check if edge already exists\n const edgeExists = currentPipeline.edges.some(\n (edge) => edge.source === source && edge.target === target\n );\n \n if (edgeExists) return;\n \n const updatedPipeline = {\n ...currentPipeline,\n edges: [...currentPipeline.edges, { source, target }],\n updatedAt: new Date(),\n };\n \n // Update savedPipelines if this pipeline exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === currentPipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = updatedPipeline;\n set({ \n currentPipeline: updatedPipeline,\n savedPipelines: updated,\n });\n } else {\n set({ currentPipeline: updatedPipeline });\n }\n debouncedAutoSave(get, set);\n },\n \n deleteEdge: (source, target) => {\n const { currentPipeline, savedPipelines } = get();\n if (!currentPipeline) return;\n \n const updatedPipeline = {\n ...currentPipeline,\n edges: currentPipeline.edges.filter(\n (edge) => !(edge.source === source && edge.target === target)\n ),\n updatedAt: new Date(),\n };\n \n // Update savedPipelines if this pipeline exists in the list\n const existingIndex = savedPipelines.findIndex((p) => p.id === currentPipeline.id);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = updatedPipeline;\n set({ \n currentPipeline: updatedPipeline,\n savedPipelines: updated,\n });\n } else {\n set({ currentPipeline: updatedPipeline });\n }\n debouncedAutoSave(get, set);\n },\n \n savePipeline: async (name, messageId?: string, conversationId?: string, deps?: { apiClient?: ApiClient; authState?: AuthState; sessionId?: string }) => {\n const { currentPipeline, savedPipelines } = get();\n if (!currentPipeline) return;\n \n const pipelineToSave: Pipeline = {\n ...currentPipeline,\n name,\n updatedAt: new Date(),\n };\n \n // Get dependencies from parameter or global store\n const effectiveDeps = deps || getDependencies();\n const user = effectiveDeps.authState?.user;\n const apiClient = effectiveDeps.apiClient;\n const sessionId = effectiveDeps.sessionId;\n \n // Check if user is authenticated and save to backend\n if (user && apiClient) {\n try {\n // Include message_id and conversation_id if provided (for message-scoped pipelines)\n const pipelineData: any = { ...pipelineToSave };\n if (messageId) {\n pipelineData.message_id = messageId;\n }\n if (conversationId) {\n pipelineData.conversation_id = conversationId;\n } else if (!conversationId && messageId && sessionId) {\n // Use provided sessionId if available\n pipelineData.conversation_id = sessionId;\n }\n \n await apiClient.post('/pipelines', pipelineData);\n console.log('Pipeline saved to backend', messageId ? `(linked to message ${messageId})` : '');\n } catch (error: any) {\n console.error('Failed to save pipeline to backend:', error);\n // Continue with local save even if backend fails\n }\n }\n \n const existingIndex = savedPipelines.findIndex((p) => p.id === pipelineToSave.id);\n \n if (existingIndex >= 0) {\n // Update existing\n const updated = [...savedPipelines];\n updated[existingIndex] = pipelineToSave;\n set({ \n savedPipelines: updated,\n lastSavedAt: new Date(),\n });\n } else {\n // Add new\n set({ \n savedPipelines: [...savedPipelines, pipelineToSave],\n lastSavedAt: new Date(),\n });\n }\n \n // Also update draft\n try {\n localStorage.setItem(DRAFT_KEY, JSON.stringify(pipelineToSave));\n } catch (error) {\n console.error('Failed to save draft:', error);\n }\n },\n \n loadPipeline: async (pipelineId, deps?: { apiClient?: ApiClient; authState?: AuthState }) => {\n const { savedPipelines } = get();\n \n // Get dependencies from parameter or global store\n const effectiveDeps = deps || getDependencies();\n const user = effectiveDeps.authState?.user;\n const apiClient = effectiveDeps.apiClient;\n \n // Check if user is authenticated and try to load from backend\n if (user && apiClient) {\n try {\n const response = await apiClient.get(`/pipelines/${pipelineId}`);\n const backendPipeline = response.data.pipeline;\n \n // Convert dates\n if (backendPipeline.createdAt) {\n backendPipeline.createdAt = new Date(backendPipeline.createdAt);\n }\n if (backendPipeline.updatedAt) {\n backendPipeline.updatedAt = new Date(backendPipeline.updatedAt);\n }\n \n // Update local storage\n const existingIndex = savedPipelines.findIndex((p) => p.id === pipelineId);\n if (existingIndex >= 0) {\n const updated = [...savedPipelines];\n updated[existingIndex] = backendPipeline;\n set({ savedPipelines: updated });\n } else {\n set({ savedPipelines: [...savedPipelines, backendPipeline] });\n }\n \n set({ \n currentPipeline: { ...backendPipeline },\n lastSavedAt: backendPipeline.updatedAt || new Date(),\n });\n return;\n } catch (error: any) {\n console.warn('Failed to load pipeline from backend, using local:', error);\n // Fall through to local load\n }\n }\n \n // Fallback to local storage\n const pipeline = savedPipelines.find((p) => p.id === pipelineId);\n if (pipeline) {\n // Convert updatedAt to Date if it's a string (from localStorage)\n const updatedAt = pipeline.updatedAt instanceof Date \n ? pipeline.updatedAt \n : new Date(pipeline.updatedAt);\n \n set({ \n currentPipeline: { ...pipeline },\n lastSavedAt: isNaN(updatedAt.getTime()) ? new Date() : updatedAt,\n });\n }\n },\n \n deletePipeline: async (pipelineId, deps?: { apiClient?: ApiClient; authState?: AuthState }) => {\n // Get dependencies from parameter or global store\n const effectiveDeps = deps || getDependencies();\n const user = effectiveDeps.authState?.user;\n const apiClient = effectiveDeps.apiClient;\n \n // Check if user is authenticated and delete from backend\n if (user && apiClient && apiClient.delete) {\n try {\n await apiClient.delete(`/pipelines/${pipelineId}`);\n console.log('Pipeline deleted from backend');\n } catch (error: any) {\n console.warn('Failed to delete pipeline from backend:', error);\n // Continue with local delete even if backend fails\n }\n } else if (user && apiClient) {\n // Fallback: use post with method override if delete is not available\n try {\n await apiClient.post(`/pipelines/${pipelineId}`, {}, { headers: { 'X-HTTP-Method-Override': 'DELETE' } });\n console.log('Pipeline deleted from backend');\n } catch (error: any) {\n console.warn('Failed to delete pipeline from backend:', error);\n }\n }\n \n const { savedPipelines, currentPipeline } = get();\n set({\n savedPipelines: savedPipelines.filter((p) => p.id !== pipelineId),\n currentPipeline: currentPipeline?.id === pipelineId ? null : currentPipeline,\n });\n },\n \n syncPipelines: async (deps?: { apiClient?: ApiClient; authState?: AuthState }) => {\n // Get dependencies from parameter or global store\n const effectiveDeps = deps || getDependencies();\n const user = effectiveDeps.authState?.user;\n const apiClient = effectiveDeps.apiClient;\n \n if (!user || !apiClient) {\n console.log('[syncPipelines] User not authenticated or API client not available, skipping pipeline sync');\n return;\n }\n \n try {\n console.log('[syncPipelines] Fetching pipelines from backend for user:', user.id);\n const response = await apiClient.get('/pipelines');\n console.log('[syncPipelines] API response:', response.data);\n const backendPipelines = response.data.pipelines || [];\n console.log(`[syncPipelines] Found ${backendPipelines.length} pipelines in backend`);\n \n // Convert dates and parse pipeline_json\n const pipelines: Pipeline[] = await Promise.all(\n backendPipelines.map(async (bp: any) => {\n try {\n console.log(`[syncPipelines] Loading full pipeline data for: ${bp.id}`);\n // Fetch full pipeline data\n const fullResponse = await apiClient.get(`/pipelines/${bp.id}`);\n const fullPipeline = fullResponse.data.pipeline;\n \n // Convert dates\n if (fullPipeline.createdAt) {\n fullPipeline.createdAt = new Date(fullPipeline.createdAt);\n }\n if (fullPipeline.updatedAt) {\n fullPipeline.updatedAt = new Date(fullPipeline.updatedAt);\n }\n \n console.log(`[syncPipelines] Successfully loaded pipeline: ${fullPipeline.name || fullPipeline.id}`);\n return fullPipeline;\n } catch (error: any) {\n console.error(`[syncPipelines] Failed to load full pipeline ${bp.id}:`, error);\n if (error.response) {\n console.error(`[syncPipelines] Response status: ${error.response.status}`, error.response.data);\n }\n return null;\n }\n })\n );\n \n // Filter out nulls\n const validPipelines = pipelines.filter((p): p is Pipeline => p !== null);\n \n set({ savedPipelines: validPipelines });\n console.log(`[syncPipelines] Synced ${validPipelines.length} pipelines from backend`);\n \n // Also try to load draft pipeline from backend\n // Look for a pipeline with status='draft' and most recent updated_at\n const draftPipelines = validPipelines.filter(p => p.status === 'draft');\n if (draftPipelines.length > 0) {\n // Get most recent draft\n const latestDraft = draftPipelines.reduce((latest, current) => {\n const latestTime = latest.updatedAt?.getTime() || 0;\n const currentTime = current.updatedAt?.getTime() || 0;\n return currentTime > latestTime ? current : latest;\n });\n \n // Only load if it's newer than localStorage draft\n try {\n const localDraft = localStorage.getItem(DRAFT_KEY);\n if (localDraft) {\n const parsedLocal = JSON.parse(localDraft);\n const localTime = parsedLocal.updatedAt ? new Date(parsedLocal.updatedAt).getTime() : 0;\n const backendTime = latestDraft.updatedAt?.getTime() || 0;\n \n if (backendTime > localTime) {\n console.log('[syncPipelines] Loading draft from backend (newer than local)');\n set({ currentPipeline: latestDraft });\n }\n } else {\n // No local draft, load from backend\n console.log('[syncPipelines] Loading draft from backend (no local draft)');\n set({ currentPipeline: latestDraft });\n }\n } catch (error) {\n console.error('[syncPipelines] Failed to compare drafts:', error);\n // Fallback: load backend draft\n set({ currentPipeline: latestDraft });\n }\n }\n } catch (error: any) {\n console.error('[syncPipelines] Failed to sync pipelines from backend:', error);\n if (error.response) {\n console.error('[syncPipelines] Response status:', error.response.status);\n console.error('[syncPipelines] Response data:', error.response.data);\n }\n }\n },\n \n startExecution: () => {\n const { currentPipeline } = get();\n if (!currentPipeline) return;\n \n // Validate input nodes have required configuration\n const inputNodes = currentPipeline.nodes.filter(n => n.type === 'input_node');\n for (const node of inputNodes) {\n if (!node.config?.filename) {\n // Update node status to show error\n const nodeId = node.id;\n set({\n currentPipeline: {\n ...currentPipeline,\n nodes: currentPipeline.nodes.map((n) =>\n n.id === nodeId\n ? { ...n, status: 'error' as NodeStatus, error: 'No filename specified for input node' }\n : n\n ),\n },\n });\n // Don't start execution if validation fails\n return;\n }\n }\n \n // Topological sort for execution order\n const executionOrder = topologicalSort(currentPipeline.nodes, currentPipeline.edges);\n \n // Create new execution session\n const newExecution: ExecutionSession = {\n id: `exec_${Date.now()}`,\n startedAt: new Date(),\n status: 'running',\n logs: [],\n };\n \n set({\n isExecuting: true,\n executionOrder,\n currentExecution: newExecution,\n // Don't auto-switch to executions view - stay in editor so users can see output\n // viewMode: 'executions', // Removed - keep current view mode\n currentPipeline: {\n ...currentPipeline,\n status: 'running',\n nodes: currentPipeline.nodes.map((node) => ({\n ...node,\n status: (node.status === 'success' || node.status === 'completed') ? node.status : 'pending',\n })),\n },\n });\n \n // Emit pipeline started event so ChatPanel can create initial progress message\n window.dispatchEvent(new CustomEvent('pipeline-started', {\n detail: {\n pipelineId: currentPipeline.id,\n status: 'running',\n nodes: currentPipeline.nodes.map(node => ({\n id: node.id,\n label: node.label,\n status: (node.status === 'success' || node.status === 'completed') ? node.status : 'pending',\n })),\n }\n }));\n },\n \n executeSingleNode: (nodeId: string) => {\n const { currentPipeline, addExecutionLog } = get();\n if (!currentPipeline) return;\n \n const node = currentPipeline.nodes.find((n) => n.id === nodeId);\n if (!node) return;\n \n // For input nodes, validate they have a filename\n if (node.type === 'input_node' && !node.config?.filename) {\n set({\n currentPipeline: {\n ...currentPipeline,\n nodes: currentPipeline.nodes.map((n) =>\n n.id === nodeId\n ? { ...n, status: 'error' as NodeStatus, error: 'No filename specified for input node' }\n : n\n ),\n },\n });\n return;\n }\n \n // Create execution order with just this node (and its dependencies if needed)\n // For input nodes, they have no dependencies, so just execute the node\n const executionOrder = [nodeId];\n \n // Create new execution session\n const newExecution: ExecutionSession = {\n id: `exec_${Date.now()}`,\n startedAt: new Date(),\n status: 'running',\n logs: [],\n };\n \n // Create log entry BEFORE execution starts so it shows up immediately\n addExecutionLog({\n nodeId,\n nodeLabel: node.label,\n nodeType: node.type,\n status: 'running',\n });\n \n set({\n isExecuting: true,\n executionOrder,\n currentExecution: newExecution,\n currentPipeline: {\n ...currentPipeline,\n status: 'running',\n nodes: currentPipeline.nodes.map((n) =>\n n.id === nodeId\n ? { ...n, status: 'pending' }\n : n\n ),\n },\n });\n },\n \n stopExecution: () => {\n const { currentPipeline, currentExecution, executionHistory } = get();\n \n // Complete the current execution session\n if (currentExecution) {\n const completedExecution: ExecutionSession = {\n ...currentExecution,\n completedAt: new Date(),\n status: 'stopped',\n };\n set({\n executionHistory: [completedExecution, ...executionHistory].slice(0, 50), // Keep last 50\n // Keep currentExecution so users can view results after execution completes\n // It will be cleared when a new execution starts\n currentExecution: {\n ...completedExecution,\n status: 'completed',\n },\n });\n }\n \n set({ isExecuting: false });\n if (currentPipeline) {\n set({\n currentPipeline: {\n ...currentPipeline,\n status: 'draft',\n },\n });\n }\n },\n \n updateNodeStatus: (nodeId, status, error) => {\n const { currentPipeline, currentExecution } = get();\n if (!currentPipeline) return;\n \n const node = currentPipeline.nodes.find(n => n.id === nodeId);\n const updates: Partial<PipelineNode> = { status };\n if (error) {\n updates.error = error;\n }\n // Don't overwrite result_metadata if it already exists - it will be updated separately\n // Only initialize it if it doesn't exist and status is completed/success\n if ((status === 'success' || status === 'completed') && !node?.result_metadata) {\n updates.result_metadata = {}; // Will be populated by execution\n }\n \n // Always update execution logs to keep them in sync with node status\n // This ensures the execution panel reflects real-time node execution status\n if (currentExecution && node) {\n const existingLogIndex = currentExecution.logs.findIndex(l => l.nodeId === nodeId);\n const now = new Date();\n \n if (existingLogIndex >= 0) {\n // Update existing log - preserve all existing fields (request, response, input, output, etc.)\n // and only update status-related fields\n const existingLog = currentExecution.logs[existingLogIndex];\n const updatedLog: ExecutionLogEntry = {\n ...existingLog, // Preserve all existing fields (request, response, input, output, etc.)\n status,\n error: error || existingLog.error, // Update error if provided, otherwise keep existing\n completedAt: (status === 'success' || status === 'error') \n ? (existingLog.completedAt || now) // Preserve existing completedAt if already set\n : undefined,\n duration: existingLog.startedAt && (status === 'success' || status === 'error')\n ? (existingLog.duration || now.getTime() - new Date(existingLog.startedAt).getTime())\n : existingLog.duration, // Preserve existing duration if not completed\n };\n const updatedLogs = [...currentExecution.logs];\n updatedLogs[existingLogIndex] = updatedLog;\n set({\n currentExecution: {\n ...currentExecution,\n logs: updatedLogs,\n },\n });\n } else if (status === 'running' || status === 'pending') {\n // Add new log if it doesn't exist and node is starting execution\n const newLog: ExecutionLogEntry = {\n nodeId,\n nodeLabel: node.label,\n nodeType: node.type,\n status,\n startedAt: now,\n };\n set({\n currentExecution: {\n ...currentExecution,\n logs: [...currentExecution.logs, newLog],\n },\n });\n }\n }\n \n set({\n currentPipeline: {\n ...currentPipeline,\n nodes: currentPipeline.nodes.map((n) =>\n n.id === nodeId ? { ...n, ...updates } : n\n ),\n updatedAt: new Date(),\n },\n });\n debouncedAutoSave(get, set);\n },\n \n clearPipeline: () => {\n set({\n currentPipeline: null,\n ghostBlueprint: null,\n isExecuting: false,\n executionOrder: [],\n currentExecution: null,\n lastSavedAt: null,\n });\n // Clear draft\n try {\n localStorage.removeItem(DRAFT_KEY);\n } catch (error) {\n console.error('Failed to clear draft:', error);\n }\n },\n \n setViewMode: (mode) => set({ viewMode: mode }),\n \n setSelectedLogNodeId: (nodeId) => set({ selectedLogNodeId: nodeId }),\n \n setPipelinesSidebarCollapsed: (collapsed) => set({ isPipelinesSidebarCollapsed: collapsed }),\n togglePipelinesSidebar: () => set((state) => ({ isPipelinesSidebarCollapsed: !state.isPipelinesSidebarCollapsed })),\n \n addExecutionLog: (entry) => {\n const { currentExecution } = get();\n if (!currentExecution) return;\n \n const newLog: ExecutionLogEntry = {\n ...entry,\n startedAt: new Date(),\n };\n \n set({\n currentExecution: {\n ...currentExecution,\n logs: [...currentExecution.logs, newLog],\n },\n });\n },\n \n updateExecutionLog: (nodeId, updates) => {\n const { currentExecution } = get();\n if (!currentExecution) return;\n \n const logIndex = currentExecution.logs.findIndex(l => l.nodeId === nodeId);\n if (logIndex === -1) return;\n \n const updatedLogs = [...currentExecution.logs];\n updatedLogs[logIndex] = { ...updatedLogs[logIndex], ...updates };\n \n set({\n currentExecution: {\n ...currentExecution,\n logs: updatedLogs,\n },\n });\n },\n }),\n {\n name: 'novoprotein-pipeline-storage',\n version: 1,\n storage: createJSONStorage(() => localStorage),\n partialize: (state) => ({\n // Persist all pipelines including unnamed ones\n savedPipelines: state.savedPipelines,\n // Don't persist currentPipeline or execution state - it's saved as draft separately\n }),\n // Load draft on initialization\n onRehydrateStorage: () => (state) => {\n if (state) {\n try {\n // Convert date strings to Date objects for all pipelines\n state.savedPipelines = state.savedPipelines.map((pipeline) => {\n if (pipeline.createdAt && typeof pipeline.createdAt === 'string') {\n pipeline.createdAt = new Date(pipeline.createdAt);\n }\n if (pipeline.updatedAt && typeof pipeline.updatedAt === 'string') {\n pipeline.updatedAt = new Date(pipeline.updatedAt);\n }\n return pipeline;\n });\n \n const draft = localStorage.getItem(DRAFT_KEY);\n if (draft) {\n const parsed = JSON.parse(draft);\n // Restore draft (including unnamed pipelines)\n state.setCurrentPipeline(parsed);\n // Convert updatedAt to Date if it's a string (from localStorage)\n if (parsed.updatedAt) {\n const updatedAt = parsed.updatedAt instanceof Date \n ? parsed.updatedAt \n : new Date(parsed.updatedAt);\n state.lastSavedAt = isNaN(updatedAt.getTime()) ? new Date() : updatedAt;\n } else {\n state.lastSavedAt = new Date();\n }\n }\n } catch (error) {\n console.error('Failed to load draft:', error);\n }\n \n // Sync with backend after rehydration (if user is authenticated)\n setTimeout(() => {\n const deps = getDependencies();\n const user = deps.authState?.user;\n const apiClient = deps.apiClient;\n if (user && apiClient && state.syncPipelines) {\n state.syncPipelines({ apiClient, authState: deps.authState }).catch(console.error);\n }\n }, 1000); // Delay to ensure auth is loaded\n }\n },\n }\n )\n);\n\n"],"names":["globalDependencies","setPipelineDependencies","deps","getDependencies","autoSaveTimer","DRAFT_KEY","UNNAMED_PIPELINE_NAME","debouncedAutoSave","get","set","currentPipeline","draft","user","_a","apiClient","error","usePipelineStore","create","persist","pipeline","savedPipelines","existingIndex","p","updated","blueprint","ghostBlueprint","nodes","node","index","updatedSavedPipelines","selectedNodeIds","nodeConfigs","selectedNodeIdSet","edges","edge","updatedPipeline","newPipeline","nodeId","updates","mergedNode","source","target","name","messageId","conversationId","pipelineToSave","effectiveDeps","sessionId","pipelineData","pipelineId","backendPipeline","updatedAt","response","backendPipelines","validPipelines","bp","fullPipeline","draftPipelines","latestDraft","latest","current","latestTime","_b","localDraft","parsedLocal","localTime","inputNodes","n","executionOrder","topologicalSort","newExecution","addExecutionLog","currentExecution","executionHistory","completedExecution","status","existingLogIndex","l","now","existingLog","updatedLog","updatedLogs","newLog","mode","collapsed","state","entry","logIndex","createJSONStorage","parsed"],"mappings":";;;AA2GA,IAAIA,IAIA,CAAA;AAMG,MAAMC,IAA0B,CAACC,MAIlC;AACJ,EAAAF,IAAqBE;AACvB,GAKMC,IAAkB,MAAMH;AAG9B,IAAII,IAAuC;AAC3C,MAAMC,IAAY,8BACZC,IAAwB,oBAExBC,IAAoB,CAACC,GAA0BC,MAAmD;AACtG,EAAIL,KACF,aAAaA,CAAa,GAG5BA,IAAgB,WAAW,YAAY;;AACrC,UAAM,EAAE,iBAAAM,EAAA,IAAoBF,EAAA;AAC5B,QAAKE,GAEL;AAAA,MAAAD,EAAI,EAAE,UAAU,IAAM;AAEtB,UAAI;AAEF,cAAME,IAAQ;AAAA,UACZ,GAAGD;AAAA,UACH,+BAAe,KAAA;AAAA,QAAK;AAEtB,qBAAa,QAAQL,GAAW,KAAK,UAAUM,CAAK,CAAC;AAGrD,cAAMT,IAAOC,EAAA,GACPS,KAAOC,IAAAX,EAAK,cAAL,gBAAAW,EAAgB,MACvBC,IAAYZ,EAAK;AAEvB,YAAIU,KAAQE;AACV,cAAI;AAEF,kBAAMA,EAAU,KAAK,cAAc;AAAA,cACjC,GAAGH;AAAA,cACH,QAAQ;AAAA,YAAA,CACT,GACD,QAAQ,IAAI,qDAA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AS,YAAY,IAAI,KAAKA,EAAS,SAAS,IAE9CA,EAAS,aAAa,OAAOA,EAAS,aAAc,aACtDA,EAAS,YAAY,IAAI,KAAKA,EAAS,SAAS,IAE3CA,EACR;AAED,kBAAMR,IAAQ,aAAa,QAAQN,CAAS;AAC5C,gBAAIM,GAAO;AACT,oBAAM8E,IAAS,KAAK,MAAM9E,CAAK;AAI/B,kBAFA0E,EAAM,mBAAmBI,CAAM,GAE3BA,EAAO,WAAW;AACpB,sBAAMtC,IAAYsC,EAAO,qBAAqB,OAC1CA,EAAO,YACP,IAAI,KAAKA,EAAO,SAAS;AAC7B,gBAAAJ,EAAM,cAAc,MAAMlC,EAAU,QAAA,CAAS,IAAI,oBAAI,SAASA;AAAA,cAChE;AACE,gBAAAkC,EAAM,kCAAkB,KAAA;AAAA,YAE5B;AAAA,UACA,SAAStE,GAAO;AAChB,oBAAQ,MAAM,yBAAyBA,CAAK;AAAA,UAC9C;AAGA,qBAAW,MAAM;;AACf,kBAAMb,IAAOC,EAAA,GACPS,KAAOC,IAAAX,EAAK,cAAL,gBAAAW,EAAgB,MACvBC,IAAYZ,EAAK;AACvB,YAAIU,KAAQE,KAAauE,EAAM,iBAC7BA,EAAM,cAAc,EAAE,WAAAvE,GAAW,WAAWZ,EAAK,WAAW,EAAE,MAAM,QAAQ,KAAK;AAAA,UAErF,GAAG,GAAI;AAAA,QACT;AAAA,MACF;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency injection types for pipeline canvas library
|
|
3
|
+
* These interfaces allow the library to work with any authentication and API system
|
|
4
|
+
*/
|
|
5
|
+
import { Logger, ErrorReporter } from './logger';
|
|
6
|
+
/**
|
|
7
|
+
* User information interface
|
|
8
|
+
* Compatible with most authentication systems
|
|
9
|
+
*/
|
|
10
|
+
export interface User {
|
|
11
|
+
id: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Authentication state interface
|
|
18
|
+
*/
|
|
19
|
+
export interface AuthState {
|
|
20
|
+
user: User | null;
|
|
21
|
+
isAuthenticated: boolean;
|
|
22
|
+
accessToken?: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* API client interface
|
|
27
|
+
* Compatible with axios, fetch, or custom API clients
|
|
28
|
+
*/
|
|
29
|
+
export interface ApiClient {
|
|
30
|
+
get: (url: string, config?: {
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
}) => Promise<{
|
|
33
|
+
data: any;
|
|
34
|
+
}>;
|
|
35
|
+
post: (url: string, data?: any, config?: {
|
|
36
|
+
headers?: Record<string, string>;
|
|
37
|
+
}) => Promise<{
|
|
38
|
+
data: any;
|
|
39
|
+
}>;
|
|
40
|
+
put?: (url: string, data?: any, config?: {
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
}) => Promise<{
|
|
43
|
+
data: any;
|
|
44
|
+
}>;
|
|
45
|
+
patch?: (url: string, data?: any, config?: {
|
|
46
|
+
headers?: Record<string, string>;
|
|
47
|
+
}) => Promise<{
|
|
48
|
+
data: any;
|
|
49
|
+
}>;
|
|
50
|
+
delete?: (url: string, config?: {
|
|
51
|
+
headers?: Record<string, string>;
|
|
52
|
+
}) => Promise<{
|
|
53
|
+
data: any;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Complete dependencies interface for pipeline canvas
|
|
58
|
+
* All dependencies are optional to allow the library to work standalone
|
|
59
|
+
*/
|
|
60
|
+
export interface PipelineDependencies {
|
|
61
|
+
/**
|
|
62
|
+
* API client for backend operations (pipeline sync, save, load)
|
|
63
|
+
* If not provided, these operations will be skipped gracefully
|
|
64
|
+
*/
|
|
65
|
+
apiClient?: ApiClient;
|
|
66
|
+
/**
|
|
67
|
+
* Authentication state
|
|
68
|
+
* If not provided, user-specific features will be disabled
|
|
69
|
+
*/
|
|
70
|
+
authState?: AuthState;
|
|
71
|
+
/**
|
|
72
|
+
* Active session ID for execution context
|
|
73
|
+
* If not provided, execution will proceed without session tracking
|
|
74
|
+
*/
|
|
75
|
+
sessionId?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Function to get authentication headers
|
|
78
|
+
* Used for file uploads and authenticated requests
|
|
79
|
+
* If not provided, requests will be made without auth headers
|
|
80
|
+
*/
|
|
81
|
+
getAuthHeaders?: () => Record<string, string>;
|
|
82
|
+
/**
|
|
83
|
+
* Logger for structured logging
|
|
84
|
+
* If not provided, uses default console logger (development only)
|
|
85
|
+
*/
|
|
86
|
+
logger?: Logger;
|
|
87
|
+
/**
|
|
88
|
+
* Error reporter for error tracking (Sentry, LogRocket, etc.)
|
|
89
|
+
* If not provided, errors are only logged to console
|
|
90
|
+
*/
|
|
91
|
+
errorReporter?: ErrorReporter;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../types/dependencies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CA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AAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;CACjG;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type NodeType = 'input_node' | 'rfdiffusion_node' | 'proteinmpnn_node' | 'alphafold_node' | 'message_input_node' | 'http_request_node';
|
|
2
|
+
export type NodeStatus = 'idle' | 'running' | 'success' | 'completed' | 'error' | 'pending';
|
|
3
|
+
export interface PipelineNodeBlueprint {
|
|
4
|
+
id: string;
|
|
5
|
+
type: NodeType;
|
|
6
|
+
label: string;
|
|
7
|
+
config: Record<string, any>;
|
|
8
|
+
inputs: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
export interface PipelineBlueprint {
|
|
11
|
+
rationale: string;
|
|
12
|
+
nodes: PipelineNodeBlueprint[];
|
|
13
|
+
edges: Array<{
|
|
14
|
+
source: string;
|
|
15
|
+
target: string;
|
|
16
|
+
}>;
|
|
17
|
+
missing_resources: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface PipelineNode extends PipelineNodeBlueprint {
|
|
20
|
+
status: NodeStatus;
|
|
21
|
+
result_metadata?: Record<string, any>;
|
|
22
|
+
error?: string;
|
|
23
|
+
position?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface Pipeline {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
nodes: PipelineNode[];
|
|
32
|
+
edges: Array<{
|
|
33
|
+
source: string;
|
|
34
|
+
target: string;
|
|
35
|
+
}>;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
status: 'draft' | 'running' | 'completed' | 'failed';
|
|
39
|
+
}
|
|
40
|
+
export interface NodeConfig {
|
|
41
|
+
filename?: string;
|
|
42
|
+
file_id?: string;
|
|
43
|
+
file_url?: string;
|
|
44
|
+
atoms?: number;
|
|
45
|
+
chains?: string[];
|
|
46
|
+
chain_residue_counts?: Record<string, number>;
|
|
47
|
+
total_residues?: number;
|
|
48
|
+
suggested_contigs?: string;
|
|
49
|
+
contigs?: string;
|
|
50
|
+
num_designs?: number;
|
|
51
|
+
num_sequences?: number;
|
|
52
|
+
temperature?: number;
|
|
53
|
+
recycle_count?: number;
|
|
54
|
+
num_relax?: number;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAE9I,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5F,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAA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MAAM,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logging and error tracking interfaces for pipeline canvas library
|
|
3
|
+
* Allows consumers to integrate with their own logging/error tracking systems
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Log levels for structured logging
|
|
7
|
+
*/
|
|
8
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
9
|
+
/**
|
|
10
|
+
* Logger interface for structured logging
|
|
11
|
+
* Compatible with most logging libraries (winston, pino, console, etc.)
|
|
12
|
+
*/
|
|
13
|
+
export interface Logger {
|
|
14
|
+
/**
|
|
15
|
+
* Debug-level log (development only, verbose)
|
|
16
|
+
*/
|
|
17
|
+
debug: (message: string, data?: Record<string, any>) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Info-level log (general information)
|
|
20
|
+
*/
|
|
21
|
+
info: (message: string, data?: Record<string, any>) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Warning-level log (non-critical issues)
|
|
24
|
+
*/
|
|
25
|
+
warn: (message: string, data?: Record<string, any>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Error-level log (errors that don't crash the app)
|
|
28
|
+
*/
|
|
29
|
+
error: (message: string, error?: Error, data?: Record<string, any>) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Error reporter interface for error tracking services
|
|
33
|
+
* Compatible with Sentry, LogRocket, Bugsnag, etc.
|
|
34
|
+
*/
|
|
35
|
+
export interface ErrorReporter {
|
|
36
|
+
/**
|
|
37
|
+
* Capture an exception/error
|
|
38
|
+
* @param error - The error to capture
|
|
39
|
+
* @param context - Additional context (user, pipeline, node, etc.)
|
|
40
|
+
*/
|
|
41
|
+
captureException: (error: Error, context?: Record<string, any>) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Capture a message (non-error)
|
|
44
|
+
* @param message - The message to capture
|
|
45
|
+
* @param level - Log level (info, warning, error)
|
|
46
|
+
* @param context - Additional context
|
|
47
|
+
*/
|
|
48
|
+
captureMessage: (message: string, level?: 'info' | 'warning' | 'error', context?: Record<string, any>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Set user context (optional, for user-specific error tracking)
|
|
51
|
+
*/
|
|
52
|
+
setUser?: (user: {
|
|
53
|
+
id: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Set additional context (tags, extra data, etc.)
|
|
59
|
+
*/
|
|
60
|
+
setContext?: (key: string, context: Record<string, any>) => void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Default console logger (used when no logger is provided)
|
|
64
|
+
* Only logs in development mode or when explicitly enabled
|
|
65
|
+
*/
|
|
66
|
+
export declare const createDefaultLogger: (enableInProduction?: boolean) => Logger;
|
|
67
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../types/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,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22 @@
|
|
|
1
|
+
const r = (a = !1) => {
|
|
2
|
+
var i, l;
|
|
3
|
+
const n = typeof window < "u" && (((i = window.location) == null ? void 0 : i.hostname) === "localhost" || ((l = window.location) == null ? void 0 : l.hostname) === "127.0.0.1") || a;
|
|
4
|
+
return {
|
|
5
|
+
debug: (e, o) => {
|
|
6
|
+
n && console.debug(`[PipelineCanvas] ${e}`, o || "");
|
|
7
|
+
},
|
|
8
|
+
info: (e, o) => {
|
|
9
|
+
n && console.info(`[PipelineCanvas] ${e}`, o || "");
|
|
10
|
+
},
|
|
11
|
+
warn: (e, o) => {
|
|
12
|
+
n && console.warn(`[PipelineCanvas] ${e}`, o || "");
|
|
13
|
+
},
|
|
14
|
+
error: (e, o, s) => {
|
|
15
|
+
o ? console.error(`[PipelineCanvas] ${e}`, o, s || "") : console.error(`[PipelineCanvas] ${e}`, s || "");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
r as createDefaultLogger
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=logger.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.mjs","sources":["../../types/logger.ts"],"sourcesContent":["/**\n * Logging and error tracking interfaces for pipeline canvas library\n * Allows consumers to integrate with their own logging/error tracking systems\n */\n\n/**\n * Log levels for structured logging\n */\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error';\n\n/**\n * Logger interface for structured logging\n * Compatible with most logging libraries (winston, pino, console, etc.)\n */\nexport interface Logger {\n /**\n * Debug-level log (development only, verbose)\n */\n debug: (message: string, data?: Record<string, any>) => void;\n \n /**\n * Info-level log (general information)\n */\n info: (message: string, data?: Record<string, any>) => void;\n \n /**\n * Warning-level log (non-critical issues)\n */\n warn: (message: string, data?: Record<string, any>) => void;\n \n /**\n * Error-level log (errors that don't crash the app)\n */\n error: (message: string, error?: Error, data?: Record<string, any>) => void;\n}\n\n/**\n * Error reporter interface for error tracking services\n * Compatible with Sentry, LogRocket, Bugsnag, etc.\n */\nexport interface ErrorReporter {\n /**\n * Capture an exception/error\n * @param error - The error to capture\n * @param context - Additional context (user, pipeline, node, etc.)\n */\n captureException: (error: Error, context?: Record<string, any>) => void;\n \n /**\n * Capture a message (non-error)\n * @param message - The message to capture\n * @param level - Log level (info, warning, error)\n * @param context - Additional context\n */\n captureMessage: (\n message: string,\n level?: 'info' | 'warning' | 'error',\n context?: Record<string, any>\n ) => void;\n \n /**\n * Set user context (optional, for user-specific error tracking)\n */\n setUser?: (user: { id: string; email?: string; [key: string]: any }) => void;\n \n /**\n * Set additional context (tags, extra data, etc.)\n */\n setContext?: (key: string, context: Record<string, any>) => void;\n}\n\n/**\n * Default console logger (used when no logger is provided)\n * Only logs in development mode or when explicitly enabled\n */\nexport const createDefaultLogger = (enableInProduction = false): Logger => {\n const isDevelopment = typeof window !== 'undefined' && \n (window.location?.hostname === 'localhost' || \n window.location?.hostname === '127.0.0.1');\n \n const shouldLog = isDevelopment || enableInProduction;\n \n return {\n debug: (message: string, data?: Record<string, any>) => {\n if (shouldLog) {\n console.debug(`[PipelineCanvas] ${message}`, data || '');\n }\n },\n info: (message: string, data?: Record<string, any>) => {\n if (shouldLog) {\n console.info(`[PipelineCanvas] ${message}`, data || '');\n }\n },\n warn: (message: string, data?: Record<string, any>) => {\n if (shouldLog) {\n console.warn(`[PipelineCanvas] ${message}`, data || '');\n }\n },\n error: (message: string, error?: Error, data?: Record<string, any>) => {\n // Always log errors, but format them nicely\n if (error) {\n console.error(`[PipelineCanvas] ${message}`, error, data || '');\n } else {\n console.error(`[PipelineCanvas] ${message}`, data || '');\n }\n },\n };\n};\n"],"names":["createDefaultLogger","enableInProduction","_a","_b","shouldLog","message","data","error"],"mappings":"AA2EO,MAAMA,IAAsB,CAACC,IAAqB,OAAkB;AAApE,MAAAC,GAAAC;AAKL,QAAMC,IAJgB,OAAO,SAAW,UACrCF,IAAA,OAAO,aAAP,gBAAAA,EAAiB,cAAa,iBAC9BC,IAAA,OAAO,aAAP,gBAAAA,EAAiB,cAAa,gBAEEF;AAEnC,SAAO;AAAA,IACL,OAAO,CAACI,GAAiBC,MAA+B;AACtD,MAAIF,KACF,QAAQ,MAAM,oBAAoBC,CAAO,IAAIC,KAAQ,EAAE;AAAA,IAE3D;AAAA,IACA,MAAM,CAACD,GAAiBC,MAA+B;AACrD,MAAIF,KACF,QAAQ,KAAK,oBAAoBC,CAAO,IAAIC,KAAQ,EAAE;AAAA,IAE1D;AAAA,IACA,MAAM,CAACD,GAAiBC,MAA+B;AACrD,MAAIF,KACF,QAAQ,KAAK,oBAAoBC,CAAO,IAAIC,KAAQ,EAAE;AAAA,IAE1D;AAAA,IACA,OAAO,CAACD,GAAiBE,GAAeD,MAA+B;AAErE,MAAIC,IACF,QAAQ,MAAM,oBAAoBF,CAAO,IAAIE,GAAOD,KAAQ,EAAE,IAE9D,QAAQ,MAAM,oBAAoBD,CAAO,IAAIC,KAAQ,EAAE;AAAA,IAE3D;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PipelineNode, Pipeline } from '../types/index';
|
|
2
|
+
interface ApiClient {
|
|
3
|
+
post: (endpoint: string, data: any, config?: {
|
|
4
|
+
headers?: Record<string, string>;
|
|
5
|
+
}) => Promise<any>;
|
|
6
|
+
get: (endpoint: string, config?: {
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
}) => Promise<any>;
|
|
9
|
+
}
|
|
10
|
+
interface ExecutionContext {
|
|
11
|
+
pipeline: Pipeline;
|
|
12
|
+
apiClient: ApiClient;
|
|
13
|
+
sessionId?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Executes a node based on its execution configuration
|
|
17
|
+
*/
|
|
18
|
+
export declare function executeNode(node: PipelineNode, context: ExecutionContext): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Validates that a node can be executed (has required inputs)
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateNodeExecution(node: PipelineNode, pipeline: Pipeline): Promise<{
|
|
23
|
+
valid: boolean;
|
|
24
|
+
errors: string[];
|
|
25
|
+
}>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=executionEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executionEngine.d.ts","sourceRoot":"","sources":["../../utils/executionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIxD,UAAU,SAAS;IACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnG,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACxF;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAsID;;GAEG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,GAAG,CAAC,CAu2Bd;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA8B/C"}
|