@goplasmatic/dataflow-ui 2.1.1 → 2.1.3

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/dist/index.d.ts CHANGED
@@ -1,805 +1 @@
1
- import { Component } from 'react';
2
- import { defaultEngineFactory } from './engines';
3
- import { ErrorInfo as ErrorInfo_2 } from 'react';
4
- import { JSX as JSX_2 } from 'react/jsx-runtime';
5
- import { LucideIcon } from 'lucide-react';
6
- import { ReactNode } from 'react';
7
- import { ReactPortal } from 'react';
8
- import { WasmEngineAdapter } from './engines';
9
-
10
- /**
11
- * Audit trail entry for tracking changes (matches Rust AuditTrail)
12
- */
13
- export declare interface AuditTrail {
14
- /** Workflow ID where change occurred */
15
- workflow_id: string;
16
- /** Task ID where change occurred */
17
- task_id: string;
18
- /** Timestamp of the change */
19
- timestamp: string;
20
- /** Changes made by the task */
21
- changes: Change[];
22
- /** Status code (e.g., 200 for success) */
23
- status: number;
24
- }
25
-
26
- /**
27
- * Built-in function types
28
- */
29
- export declare type BuiltinFunctionType = 'map' | 'validation' | 'validate';
30
-
31
- /**
32
- * A single change in the audit trail
33
- */
34
- export declare interface Change {
35
- /** Path to the changed field (e.g., "data.user.name") */
36
- path: string;
37
- /** Previous value */
38
- old_value: unknown;
39
- /** New value */
40
- new_value: unknown;
41
- }
42
-
43
- /**
44
- * Deep clone a message
45
- */
46
- export declare function cloneMessage(message: Message): Message;
47
-
48
- export declare function ConditionBadge({ condition, className, onClick }: ConditionBadgeProps): JSX_2.Element;
49
-
50
- declare interface ConditionBadgeProps {
51
- condition: JsonLogicValue | undefined;
52
- className?: string;
53
- onClick?: () => void;
54
- }
55
-
56
- /**
57
- * Result of evaluating a condition
58
- */
59
- export declare interface ConditionResult {
60
- /** The condition that was evaluated */
61
- condition: JsonLogicValue;
62
- /** The result of evaluation */
63
- result: boolean;
64
- /** Data context used for evaluation */
65
- context: Record<string, unknown>;
66
- }
67
-
68
- /**
69
- * Create an empty message
70
- */
71
- export declare function createEmptyMessage(): Message;
72
-
73
- /**
74
- * Interface for custom dataflow engines
75
- *
76
- * Implement this interface to provide a custom WASM engine for executing
77
- * workflows with custom functions or plugins.
78
- */
79
- export declare interface DataflowEngine {
80
- /**
81
- * Process a payload through the engine and return an execution trace
82
- * for step-by-step debugging.
83
- */
84
- processWithTrace(payload: Record<string, unknown>): Promise<ExecutionTrace>;
85
- /**
86
- * Optional cleanup method called when the engine is no longer needed.
87
- * Use this to free WASM memory.
88
- */
89
- dispose?(): void;
90
- }
91
-
92
- /**
93
- * Configuration for integrated debug mode in WorkflowVisualizer.
94
- *
95
- * When enabled, the visualizer wraps itself with a DebuggerProvider and
96
- * shows integrated debug controls in the header.
97
- */
98
- export declare interface DebugConfig {
99
- /**
100
- * Enable integrated debug mode.
101
- * When true, the visualizer will include a DebuggerProvider and show debug controls.
102
- */
103
- enabled: boolean;
104
- /**
105
- * Factory function to create engine instances.
106
- * Required for execution. If not provided, the run button will be disabled.
107
- */
108
- engineFactory?: EngineFactory;
109
- /**
110
- * Initial payload to use for debugging.
111
- * Can also be provided via the debugPayload prop on WorkflowVisualizer.
112
- */
113
- initialPayload?: Record<string, unknown>;
114
- /**
115
- * Automatically execute when workflows or payload change.
116
- * @default false
117
- */
118
- autoExecute?: boolean;
119
- /**
120
- * Callback fired when execution completes successfully.
121
- */
122
- onExecutionComplete?: (trace: ExecutionTrace) => void;
123
- /**
124
- * Callback fired when execution encounters an error.
125
- */
126
- onExecutionError?: (error: string) => void;
127
- }
128
-
129
- /**
130
- * Actions for the debugger reducer
131
- */
132
- export declare type DebuggerAction = {
133
- type: 'ACTIVATE';
134
- } | {
135
- type: 'DEACTIVATE';
136
- } | {
137
- type: 'SET_INPUT_PAYLOAD';
138
- payload: Record<string, unknown>;
139
- } | {
140
- type: 'START_EXECUTION';
141
- } | {
142
- type: 'EXECUTE_TRACE';
143
- trace: ExecutionTrace;
144
- } | {
145
- type: 'EXECUTION_ERROR';
146
- error: string;
147
- } | {
148
- type: 'PLAY';
149
- } | {
150
- type: 'PAUSE';
151
- } | {
152
- type: 'STOP';
153
- } | {
154
- type: 'RESET';
155
- } | {
156
- type: 'STEP_FORWARD';
157
- } | {
158
- type: 'STEP_BACKWARD';
159
- } | {
160
- type: 'GO_TO_STEP';
161
- index: number;
162
- } | {
163
- type: 'SET_SPEED';
164
- speed: number;
165
- } | {
166
- type: 'SET_SKIP_FAILED_CONDITIONS';
167
- skip: boolean;
168
- };
169
-
170
- /**
171
- * Context value interface
172
- */
173
- declare interface DebuggerContextValue {
174
- state: DebuggerState;
175
- dispatch: React.Dispatch<DebuggerAction>;
176
- activate: () => void;
177
- deactivate: () => void;
178
- setInputPayload: (payload: Record<string, unknown>) => void;
179
- executeTrace: (trace: ExecutionTrace) => void;
180
- startExecution: () => void;
181
- setExecutionError: (error: string) => void;
182
- play: () => void;
183
- pause: () => void;
184
- stop: () => void;
185
- reset: () => void;
186
- stepForward: () => void;
187
- stepBackward: () => void;
188
- goToStep: (index: number) => void;
189
- setSpeed: (speed: number) => void;
190
- setSkipFailedConditions: (skip: boolean) => void;
191
- runExecution: (workflows: Workflow[], payload: Record<string, unknown>) => Promise<ExecutionTrace | null>;
192
- currentStep: ExecutionStep | null;
193
- currentMessage: Message | null;
194
- currentChanges: Change[];
195
- isAtStart: boolean;
196
- isAtEnd: boolean;
197
- hasTrace: boolean;
198
- progress: number;
199
- totalSteps: number;
200
- /** Current position within filtered steps (0-indexed), -1 if at ready state */
201
- currentFilteredPosition: number;
202
- /** Array of actual step indices that are shown (for navigation) */
203
- filteredStepIndices: number[];
204
- isEngineReady: boolean;
205
- skipFailedConditions: boolean;
206
- }
207
-
208
- /**
209
- * Playback controls for the debugger
210
- */
211
- export declare function DebuggerControls({ compact, className }: DebuggerControlsProps): JSX_2.Element;
212
-
213
- declare interface DebuggerControlsProps {
214
- /** Show compact version */
215
- compact?: boolean;
216
- /** Additional CSS class */
217
- className?: string;
218
- }
219
-
220
- /**
221
- * Provider component for debugger state
222
- */
223
- export declare function DebuggerProvider({ children, initialPayload, autoActivate, engineFactory, }: DebuggerProviderProps): JSX_2.Element;
224
-
225
- declare interface DebuggerProviderProps {
226
- children: ReactNode;
227
- /** Initial payload to use for debugging */
228
- initialPayload?: Record<string, unknown>;
229
- /** Auto-start in debug mode */
230
- autoActivate?: boolean;
231
- /**
232
- * Factory function to create engine instances when workflows change.
233
- * Called whenever workflows are updated to create a fresh engine.
234
- * Use this for custom WASM engines with plugins.
235
- */
236
- engineFactory?: EngineFactory;
237
- }
238
-
239
- /**
240
- * Complete debugger state
241
- */
242
- export declare interface DebuggerState {
243
- /** Whether debug mode is active */
244
- isActive: boolean;
245
- /** Current execution trace */
246
- trace: ExecutionTrace | null;
247
- /** Current step index being viewed */
248
- currentStepIndex: number;
249
- /** Playback state */
250
- playbackState: PlaybackState;
251
- /** Playback speed (ms between steps) */
252
- playbackSpeed: number;
253
- /** Input payload for debugging */
254
- inputPayload: Record<string, unknown> | null;
255
- /** Whether the debugger is currently executing */
256
- isExecuting: boolean;
257
- /** Error during execution */
258
- executionError: string | null;
259
- /** Whether to skip steps with failed conditions (result: 'skipped') */
260
- skipFailedConditions: boolean;
261
- }
262
-
263
- /**
264
- * Tooltip/bubble showing debug step details
265
- */
266
- export declare function DebugInfoBubble({ step, targetRef, visible, onClose, }: DebugInfoBubbleProps): ReactPortal | null;
267
-
268
- declare interface DebugInfoBubbleProps {
269
- /** The execution step to display */
270
- step: ExecutionStep;
271
- /** Target element to position near */
272
- targetRef: React.RefObject<HTMLElement>;
273
- /** Whether the bubble is visible */
274
- visible: boolean;
275
- /** Callback when bubble is closed */
276
- onClose?: () => void;
277
- }
278
-
279
- /**
280
- * Debug state for a node in the execution tree
281
- */
282
- export declare type DebugNodeState = 'pending' | 'current' | 'executed' | 'skipped' | 'error';
283
-
284
- export declare function DebugStateBadge({ state, conditionResult, size, }: DebugStateBadgeProps): JSX_2.Element;
285
-
286
- /**
287
- * Small badge showing debug state on tree nodes
288
- */
289
- declare interface DebugStateBadgeProps {
290
- state: DebugNodeState;
291
- conditionResult?: boolean;
292
- size?: 'sm' | 'md';
293
- }
294
-
295
- export { defaultEngineFactory }
296
-
297
- /**
298
- * Factory function type for creating engine instances.
299
- *
300
- * Called when workflows change to create a new engine instance
301
- * configured with the current workflows.
302
- */
303
- export declare type EngineFactory = (workflows: Workflow[]) => DataflowEngine;
304
-
305
- /**
306
- * Error boundary component to catch and display errors in child components
307
- */
308
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
309
- constructor(props: ErrorBoundaryProps);
310
- static getDerivedStateFromError(error: Error): ErrorBoundaryState;
311
- componentDidCatch(error: Error, errorInfo: ErrorInfo_2): void;
312
- render(): ReactNode;
313
- }
314
-
315
- declare interface ErrorBoundaryProps {
316
- children: ReactNode;
317
- fallback?: ReactNode;
318
- }
319
-
320
- declare interface ErrorBoundaryState {
321
- hasError: boolean;
322
- error: Error | null;
323
- }
324
-
325
- /**
326
- * Error information captured during execution
327
- */
328
- export declare interface ErrorInfo {
329
- /** Error code or identifier */
330
- code: string;
331
- /** Human-readable error message */
332
- message: string;
333
- /** Task ID where error occurred */
334
- task_id?: string;
335
- /** Workflow ID where error occurred */
336
- workflow_id?: string;
337
- }
338
-
339
- /**
340
- * A single step in the execution trace (matches Rust ExecutionStep)
341
- */
342
- export declare interface ExecutionStep {
343
- /** ID of the workflow this step belongs to */
344
- workflow_id: string;
345
- /** ID of the task (undefined for workflow-level skips) */
346
- task_id?: string;
347
- /** Result of the step execution */
348
- result: StepResult;
349
- /** Message snapshot after this step (only for executed steps) */
350
- message?: Message;
351
- /** Context snapshots before each mapping (map tasks only, trace mode) */
352
- mapping_contexts?: Record<string, unknown>[];
353
- }
354
-
355
- /**
356
- * Complete execution trace (matches Rust ExecutionTrace)
357
- */
358
- export declare interface ExecutionTrace {
359
- /** All execution steps in order */
360
- steps: ExecutionStep[];
361
- }
362
-
363
- /**
364
- * Function configuration for a task
365
- */
366
- export declare interface FunctionConfig {
367
- /** Function name (e.g., "map", "validation", or custom) */
368
- name: string;
369
- /** Function-specific input configuration */
370
- input?: Record<string, unknown>;
371
- }
372
-
373
- export declare function FunctionTypeBadge({ functionName, className }: FunctionTypeBadgeProps): JSX_2.Element;
374
-
375
- declare interface FunctionTypeBadgeProps {
376
- functionName: string;
377
- className?: string;
378
- }
379
-
380
- /**
381
- * Get the changes made at a specific step
382
- * Returns the changes from the last audit_trail entry if step was executed
383
- */
384
- export declare function getChangesAtStep(trace: ExecutionTrace, stepIndex: number): Change[];
385
-
386
- /**
387
- * Get display info for a function type including the Lucide icon component
388
- */
389
- export declare function getFunctionDisplayInfo(name: string): {
390
- label: string;
391
- colorClass: string;
392
- Icon: LucideIcon;
393
- };
394
-
395
- /**
396
- * Get the message at a specific step in the trace
397
- * Returns the message snapshot from the last executed step at or before the given index
398
- */
399
- export declare function getMessageAtStep(trace: ExecutionTrace, stepIndex: number): Message | null;
400
-
401
- /**
402
- * Get the state of a task based on the trace and current step
403
- * Returns:
404
- * - 'pending' for future steps (after current)
405
- * - 'executed'/'skipped'/'error' for steps at or before current position
406
- * Note: Tasks show as 'executed' when on their step (completed state)
407
- */
408
- export declare function getTaskState(trace: ExecutionTrace, currentStepIndex: number, workflowId: string, taskId: string): DebugNodeState;
409
-
410
- /**
411
- * Get the state of a workflow based on the trace and current step
412
- * Returns:
413
- * - 'pending' if all workflow steps are after the current step
414
- * - 'executed'/'skipped'/'error' for workflows with steps at or before current
415
- * Note: Workflows don't show as 'current' - only individual tasks do
416
- */
417
- export declare function getWorkflowState(trace: ExecutionTrace, currentStepIndex: number, workflowId: string): DebugNodeState;
418
-
419
- /**
420
- * Compact debug toolbar for integration into the visualizer header.
421
- * Includes execution status, step counter, and playback controls.
422
- */
423
- export declare function IntegratedDebugToolbar({ workflows, payload, autoExecute, onExecutionComplete, onExecutionError, className, }: IntegratedDebugToolbarProps): JSX_2.Element;
424
-
425
- declare interface IntegratedDebugToolbarProps {
426
- /** Workflows to execute */
427
- workflows: Workflow[];
428
- /** Payload for execution */
429
- payload?: Record<string, unknown>;
430
- /** Auto-execute on change */
431
- autoExecute?: boolean;
432
- /** Callback when execution completes */
433
- onExecutionComplete?: (trace: ExecutionTrace) => void;
434
- /** Callback when execution errors */
435
- onExecutionError?: (error: string) => void;
436
- /** Additional CSS class */
437
- className?: string;
438
- }
439
-
440
- /**
441
- * Check if a function is a built-in type
442
- */
443
- export declare function isBuiltinFunction(name: string): name is BuiltinFunctionType;
444
-
445
- /**
446
- * JSONLogic value type - can be any valid JSON value or JSONLogic expression
447
- */
448
- export declare type JsonLogicValue = string | number | boolean | null | JsonLogicValue[] | {
449
- [key: string]: JsonLogicValue;
450
- };
451
-
452
- export declare function JsonViewer({ data, initialExpanded, maxStringLength, className, }: JsonViewerProps): JSX_2.Element;
453
-
454
- declare interface JsonViewerProps {
455
- data: unknown;
456
- initialExpanded?: boolean;
457
- maxStringLength?: number;
458
- className?: string;
459
- }
460
-
461
- /**
462
- * Map function input configuration
463
- */
464
- export declare interface MapFunctionInput {
465
- mappings: MapMapping[];
466
- }
467
-
468
- /**
469
- * Map function mapping configuration
470
- */
471
- export declare interface MapMapping {
472
- /** Target path for the mapped value */
473
- path: string;
474
- /** JSONLogic expression to compute the value */
475
- logic: JsonLogicValue;
476
- }
477
-
478
- /**
479
- * Alias for MapMapping - used in tree and details views
480
- */
481
- export declare type MappingItem = MapMapping;
482
-
483
- /**
484
- * Message structure for workflow execution
485
- * Mirrors the Rust Message struct from WASM output
486
- */
487
- export declare interface Message {
488
- /** Unique message ID */
489
- id: string;
490
- /** Original payload */
491
- payload: Record<string, unknown>;
492
- /** Context containing data, metadata, temp_data */
493
- context: {
494
- data: Record<string, unknown>;
495
- metadata: Record<string, unknown>;
496
- temp_data: Record<string, unknown>;
497
- };
498
- /** List of errors that occurred during processing */
499
- errors: ErrorInfo[];
500
- /** Audit trail of changes made during processing */
501
- audit_trail: AuditTrail[];
502
- }
503
-
504
- /**
505
- * Panel for inputting test payload data
506
- *
507
- * Note: This is a simplified version that works with the new ExecutionTrace-based
508
- * debugging system. The input is a JSON payload that gets processed through workflows.
509
- */
510
- export declare function MessageInputPanel({ onExecute, isExecuting, className, }: MessageInputPanelProps): JSX_2.Element;
511
-
512
- declare interface MessageInputPanelProps {
513
- /** Callback to trigger debug execution */
514
- onExecute: () => void;
515
- /** Whether execution is in progress */
516
- isExecuting?: boolean;
517
- /** Additional CSS class */
518
- className?: string;
519
- }
520
-
521
- /**
522
- * Panel showing message state at current execution step
523
- */
524
- export declare function MessageStatePanel({ className }: MessageStatePanelProps): JSX_2.Element;
525
-
526
- declare interface MessageStatePanelProps {
527
- /** Additional CSS class */
528
- className?: string;
529
- }
530
-
531
- /**
532
- * Playback state for the debugger
533
- */
534
- export declare type PlaybackState = 'stopped' | 'playing' | 'paused';
535
-
536
- export declare function RulesListView({ workflows, highlightedTaskIds, onTaskSelect, defaultExpandedIds, }: RulesListViewProps): JSX_2.Element;
537
-
538
- declare interface RulesListViewProps {
539
- workflows: Workflow[];
540
- highlightedTaskIds?: Set<string>;
541
- onTaskSelect?: (task: Task, workflow: Workflow) => void;
542
- defaultExpandedIds?: string[];
543
- }
544
-
545
- export declare function SearchInput({ value, onChange, onClear, placeholder, className, }: SearchInputProps): JSX_2.Element;
546
-
547
- declare interface SearchInputProps {
548
- value: string;
549
- onChange: (value: string) => void;
550
- onClear?: () => void;
551
- placeholder?: string;
552
- className?: string;
553
- }
554
-
555
- /**
556
- * Result of a step (executed or skipped)
557
- */
558
- export declare type StepResult = 'executed' | 'skipped';
559
-
560
- /**
561
- * Task definition within a workflow
562
- */
563
- export declare interface Task {
564
- /** Unique identifier for the task */
565
- id: string;
566
- /** Human-readable name */
567
- name: string;
568
- /** Optional description */
569
- description?: string;
570
- /** JSONLogic condition (evaluated against full context: data, metadata, temp_data) */
571
- condition?: JsonLogicValue;
572
- /** Function to execute */
573
- function: FunctionConfig;
574
- /** Whether to continue workflow if this task fails */
575
- continue_on_error?: boolean;
576
- }
577
-
578
- export declare function TaskRow({ task, workflow, index, isHighlighted, onSelect, }: TaskRowProps): JSX_2.Element;
579
-
580
- declare interface TaskRowProps {
581
- task: Task;
582
- workflow: Workflow;
583
- index: number;
584
- isHighlighted?: boolean;
585
- onSelect?: (task: Task, workflow: Workflow) => void;
586
- }
587
-
588
- export declare type Theme = 'light' | 'dark' | 'system';
589
-
590
- declare interface ThemeContextValue {
591
- theme: Theme;
592
- resolvedTheme: 'light' | 'dark';
593
- setTheme: (theme: Theme) => void;
594
- }
595
-
596
- export declare function ThemeProvider({ children, defaultTheme }: ThemeProviderProps): JSX_2.Element;
597
-
598
- declare interface ThemeProviderProps {
599
- children: ReactNode;
600
- defaultTheme?: Theme;
601
- }
602
-
603
- /**
604
- * Result of the debug state hook for a tree node
605
- */
606
- export declare interface TreeNodeDebugState {
607
- /** Current debug state of this node */
608
- state: DebugNodeState | null;
609
- /** Whether this node is the current step being viewed */
610
- isCurrent: boolean;
611
- /** Whether this node has been executed (or is being executed) */
612
- isExecuted: boolean;
613
- /** Whether this node was skipped due to condition */
614
- isSkipped: boolean;
615
- /** Whether this node had an error */
616
- hasError: boolean;
617
- /** Condition result if this is a condition node */
618
- conditionResult?: boolean;
619
- }
620
-
621
- export declare type TreeSelectionType = {
622
- type: 'none';
623
- } | {
624
- type: 'folder';
625
- workflows: Workflow[];
626
- name: string;
627
- } | {
628
- type: 'workflow';
629
- workflow: Workflow;
630
- } | {
631
- type: 'workflow-condition';
632
- workflow: Workflow;
633
- condition: JsonLogicValue;
634
- } | {
635
- type: 'task';
636
- task: Task;
637
- workflow: Workflow;
638
- } | {
639
- type: 'task-condition';
640
- task: Task;
641
- workflow: Workflow;
642
- condition: JsonLogicValue;
643
- } | {
644
- type: 'mapping';
645
- task: Task;
646
- workflow: Workflow;
647
- mapping: MappingItem;
648
- mappingIndex: number;
649
- } | {
650
- type: 'validation-rule';
651
- task: Task;
652
- workflow: Workflow;
653
- rule: ValidationRule;
654
- ruleIndex: number;
655
- };
656
-
657
- export declare function TreeView({ workflows, selection, onSelect, debugMode }: TreeViewProps): JSX_2.Element;
658
-
659
- declare interface TreeViewProps {
660
- workflows: Workflow[];
661
- selection: TreeSelectionType;
662
- onSelect: (selection: TreeSelectionType) => void;
663
- /** Enable debug mode with state indicators */
664
- debugMode?: boolean;
665
- }
666
-
667
- /**
668
- * Hook to access debugger context
669
- */
670
- export declare function useDebugger(): DebuggerContextValue;
671
-
672
- /**
673
- * Hook to check if debugger is available (doesn't throw if not in provider)
674
- */
675
- export declare function useDebuggerOptional(): DebuggerContextValue | null;
676
-
677
- /**
678
- * Hook to get debug state for a task condition node
679
- * Note: In the simplified trace format, task conditions are implicit
680
- * A task skip step indicates the condition was false
681
- */
682
- export declare function useTaskConditionDebugState(task: Task, workflow: Workflow): TreeNodeDebugState;
683
-
684
- /**
685
- * Hook to get debug state for a task node
686
- */
687
- export declare function useTaskDebugState(task: Task, workflow: Workflow): TreeNodeDebugState;
688
-
689
- export declare function useTheme(): ThemeContextValue;
690
-
691
- /**
692
- * Generic hook to get debug state for any node type
693
- */
694
- export declare function useTreeNodeDebugState(options: {
695
- type: 'workflow' | 'workflow-condition' | 'task' | 'task-condition' | 'mapping' | 'validation-rule';
696
- workflow: Workflow;
697
- task?: Task;
698
- }): TreeNodeDebugState;
699
-
700
- /**
701
- * Hook to get debug state for a workflow condition node
702
- * Note: In the simplified trace format, workflow conditions are implicit
703
- * A workflow skip step indicates the condition was false
704
- */
705
- export declare function useWorkflowConditionDebugState(workflow: Workflow): TreeNodeDebugState;
706
-
707
- /**
708
- * Hook to get debug state for a workflow node
709
- * Note: Workflows never show as 'current' - only tasks do
710
- */
711
- export declare function useWorkflowDebugState(workflow: Workflow): TreeNodeDebugState;
712
-
713
- /**
714
- * Validation function input configuration
715
- */
716
- export declare interface ValidationFunctionInput {
717
- rules: ValidationRule[];
718
- }
719
-
720
- /**
721
- * Validation rule configuration
722
- */
723
- export declare interface ValidationRule {
724
- /** JSONLogic expression that should return true for valid data */
725
- logic: JsonLogicValue;
726
- /** Error message if validation fails */
727
- message: string;
728
- /** Optional path for the validation target */
729
- path?: string;
730
- }
731
-
732
- export { WasmEngineAdapter }
733
-
734
- /**
735
- * Workflow definition
736
- */
737
- export declare interface Workflow {
738
- /** Unique identifier for the workflow */
739
- id: string;
740
- /** Human-readable name */
741
- name: string;
742
- /** Execution priority (lower = higher priority, 0 is highest) */
743
- priority?: number;
744
- /** Optional description */
745
- description?: string;
746
- /** Optional folder path for grouping (e.g., "orders/processing") */
747
- path?: string;
748
- /** JSONLogic condition (evaluated against full context: data, metadata, temp_data) */
749
- condition?: JsonLogicValue;
750
- /** Tasks in this workflow */
751
- tasks: Task[];
752
- /** Whether to continue processing other workflows if this one fails */
753
- continue_on_error?: boolean;
754
- }
755
-
756
- export declare function WorkflowCard({ workflow, isExpanded, onToggle, onTaskSelect, highlightedTaskIds, }: WorkflowCardProps): JSX_2.Element;
757
-
758
- declare interface WorkflowCardProps {
759
- workflow: Workflow;
760
- isExpanded: boolean;
761
- onToggle: () => void;
762
- onTaskSelect?: (task: Workflow['tasks'][0], workflow: Workflow) => void;
763
- highlightedTaskIds?: Set<string>;
764
- }
765
-
766
- export declare function WorkflowFlowView({ workflows, onTaskSelect, onWorkflowSelect, onWorkflowConditionClick, onTaskConditionClick, selection, highlightedTaskIds, }: WorkflowFlowViewProps): JSX_2.Element;
767
-
768
- declare interface WorkflowFlowViewProps {
769
- workflows: Workflow[];
770
- onTaskSelect?: (task: Task, workflow: Workflow) => void;
771
- onWorkflowSelect?: (workflow: Workflow) => void;
772
- onWorkflowConditionClick?: (workflow: Workflow) => void;
773
- onTaskConditionClick?: (task: Task, workflow: Workflow) => void;
774
- selection?: TreeSelectionType;
775
- highlightedTaskIds?: Set<string>;
776
- }
777
-
778
- export declare function WorkflowVisualizer({ workflows, onWorkflowSelect, onTaskSelect, theme, className, executionResult, debugConfig, debugPayload, }: WorkflowVisualizerProps): JSX_2.Element;
779
-
780
- export declare interface WorkflowVisualizerProps {
781
- /** Array of workflow definitions to display */
782
- workflows: Workflow[];
783
- /** Callback when a workflow is selected */
784
- onWorkflowSelect?: (workflow: Workflow) => void;
785
- /** Callback when a task is selected */
786
- onTaskSelect?: (task: Task, workflow: Workflow) => void;
787
- /** Initial theme setting */
788
- theme?: Theme;
789
- /** Class name for the root element */
790
- className?: string;
791
- /** Execution result to display in the result panel */
792
- executionResult?: Message | null;
793
- /**
794
- * Debug configuration for integrated debug mode.
795
- * When enabled, automatically wraps with DebuggerProvider and shows controls.
796
- */
797
- debugConfig?: DebugConfig;
798
- /**
799
- * Payload for debugging. Used with debugConfig.
800
- * Takes precedence over debugConfig.initialPayload.
801
- */
802
- debugPayload?: Record<string, unknown>;
803
- }
804
-
805
1
  export { }