@elevasis/ui 1.3.7 → 1.5.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.
Files changed (56) hide show
  1. package/dist/{CoreAuthKitInner-3J4RVQO6.js → CoreAuthKitInner-Y6LQYIPX.js} +1 -0
  2. package/dist/api/index.js +1 -0
  3. package/dist/auth/context.js +1 -0
  4. package/dist/auth/index.js +1 -0
  5. package/dist/charts/index.d.ts +96 -0
  6. package/dist/charts/index.js +384 -0
  7. package/dist/chunk-54S7KNJV.js +112 -0
  8. package/dist/{chunk-6IX5JZEH.js → chunk-G4TAF3T6.js} +166 -1
  9. package/dist/{chunk-Y2I5JJ3N.js → chunk-K3YVC5RW.js} +2 -2
  10. package/dist/chunk-KB5NKPTN.js +1455 -0
  11. package/dist/chunk-MLKGABMK.js +7 -0
  12. package/dist/{chunk-GIFAF5ZS.js → chunk-MS45MNFM.js} +6 -1
  13. package/dist/chunk-R56VC63S.js +129 -0
  14. package/dist/chunk-TYV5NJV2.js +1 -0
  15. package/dist/{chunk-JQLT6HBI.js → chunk-YJFTZUJJ.js} +22 -2
  16. package/dist/components/index.css +486 -0
  17. package/dist/components/index.d.ts +2047 -1
  18. package/dist/components/index.js +3350 -0
  19. package/dist/components/navigation/index.js +1 -0
  20. package/dist/execution/index.d.ts +15 -3
  21. package/dist/execution/index.js +2 -1
  22. package/dist/graph/index.js +2 -1
  23. package/dist/hooks/index.d.ts +270 -0
  24. package/dist/hooks/index.js +3 -2
  25. package/dist/hooks/published.d.ts +546 -2
  26. package/dist/hooks/published.js +3 -2
  27. package/dist/index.css +62 -0
  28. package/dist/index.d.ts +351 -4
  29. package/dist/index.js +12 -1038
  30. package/dist/initialization/index.d.ts +270 -0
  31. package/dist/initialization/index.js +1 -0
  32. package/dist/layout/index.css +44 -0
  33. package/dist/layout/index.d.ts +330 -0
  34. package/dist/layout/index.js +1440 -0
  35. package/dist/organization/index.js +1 -0
  36. package/dist/profile/index.d.ts +270 -0
  37. package/dist/profile/index.js +1 -0
  38. package/dist/provider/index.css +61 -0
  39. package/dist/provider/index.d.ts +54 -2
  40. package/dist/provider/index.js +5 -3
  41. package/dist/provider/published.d.ts +6 -0
  42. package/dist/provider/published.js +3 -2
  43. package/dist/router/context.js +1 -0
  44. package/dist/router/index.js +1 -0
  45. package/dist/sse/index.js +1 -1
  46. package/dist/supabase/index.d.ts +525 -0
  47. package/dist/supabase/index.js +1 -0
  48. package/dist/theme/index.d.ts +107 -0
  49. package/dist/theme/index.js +3 -0
  50. package/dist/typeform/index.js +1 -0
  51. package/dist/typeform/schemas.js +1 -0
  52. package/dist/types/index.d.ts +3664 -354
  53. package/dist/utils/index.js +1 -0
  54. package/package.json +64 -3
  55. package/dist/chunk-XXDDMASA.js +0 -170
  56. /package/dist/{chunk-BUZONXAW.js → chunk-ARQRKA6J.js} +0 -0
@@ -1,2 +1,2048 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { MantineSpacing, MantineColor, MantineLoaderComponent, BadgeProps } from '@mantine/core';
3
+ import * as react from 'react';
4
+ import react__default, { ComponentType, ReactNode, CSSProperties, ReactElement } from 'react';
5
+ import { Icon, IconCheck } from '@tabler/icons-react';
6
+ import { Components } from 'react-markdown';
7
+ import { UseFormReturnType } from '@mantine/form';
8
+ import { NodeProps, Node, EdgeProps, Edge } from '@xyflow/react';
9
+ import * as Graph_module_css from '../graph/Graph.module.css';
10
+ export { Graph_module_css as graphStyles };
1
11
 
2
- export { };
12
+ interface EmptyStateProps {
13
+ /** Icon component to display (e.g., IconKey from @tabler/icons-react) */
14
+ icon: ComponentType<{
15
+ size: number;
16
+ style?: React.CSSProperties;
17
+ }>;
18
+ /** Main title text */
19
+ title: string;
20
+ /** Description text shown below title */
21
+ description?: string;
22
+ /** Optional action button */
23
+ action?: {
24
+ label: string;
25
+ onClick: () => void;
26
+ icon?: ReactNode;
27
+ };
28
+ /** Vertical padding - defaults to 'xl' */
29
+ py?: MantineSpacing;
30
+ }
31
+ /**
32
+ * EmptyState - Reusable empty state component for lists and tables
33
+ *
34
+ * Consolidates the Center + Stack + Icon + Text pattern used across:
35
+ * - ApiKeyList.tsx
36
+ * - CredentialList.tsx
37
+ * - Various other list components
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <EmptyState
42
+ * icon={IconKey}
43
+ * title="No API keys yet"
44
+ * description="Create your first API key to enable external integrations"
45
+ * action={{ label: "Create API Key", onClick: handleCreate }}
46
+ * />
47
+ * ```
48
+ */
49
+ declare function EmptyState({ icon: Icon, title, description, action, py }: EmptyStateProps): react_jsx_runtime.JSX.Element;
50
+
51
+ interface TabCountBadgeProps {
52
+ count: number;
53
+ isLoading?: boolean;
54
+ }
55
+ /**
56
+ * A badge that displays a count in tabs with consistent sizing.
57
+ * Uses a fixed-width container to prevent layout shift when switching
58
+ * between the loading spinner and the count badge.
59
+ */
60
+ declare function TabCountBadge({ count, isLoading }: TabCountBadgeProps): react_jsx_runtime.JSX.Element;
61
+
62
+ /**
63
+ * TrendIndicator - Reusable component for showing percentage change trends
64
+ * Displays up/down/flat arrow with colored badge
65
+ */
66
+ interface TrendIndicatorProps {
67
+ /** Current value */
68
+ current: number;
69
+ /** Previous value to compare against */
70
+ previous: number;
71
+ /** Optional formatter for the value (not used in display but kept for API compatibility) */
72
+ formatter?: (value: number) => string;
73
+ /** If true, negative change is considered positive (e.g., for costs) */
74
+ inverse?: boolean;
75
+ }
76
+ /**
77
+ * Shows a trend indicator with arrow icon and percentage change badge
78
+ *
79
+ * @example
80
+ * // Positive trend (green when going up)
81
+ * <TrendIndicator current={100} previous={80} />
82
+ *
83
+ * @example
84
+ * // Inverse trend (green when going down, useful for costs)
85
+ * <TrendIndicator current={100} previous={120} inverse />
86
+ */
87
+ declare function TrendIndicator({ current, previous, inverse }: TrendIndicatorProps): react_jsx_runtime.JSX.Element;
88
+
89
+ interface CollapsibleSectionProps {
90
+ title: string | ReactNode;
91
+ count?: number;
92
+ countLabel?: string;
93
+ children: ReactNode;
94
+ emptyMessage?: string;
95
+ defaultExpanded?: boolean;
96
+ maxHeight?: number;
97
+ }
98
+ /**
99
+ * Reusable collapsible section with header, badge, and scroll area
100
+ * Used for expandable content like memory sections, logs, etc.
101
+ */
102
+ declare function CollapsibleSection({ title, count, countLabel, children, emptyMessage, defaultExpanded, maxHeight }: CollapsibleSectionProps): react_jsx_runtime.JSX.Element;
103
+
104
+ interface PageTitleCaptionProps {
105
+ title: string;
106
+ caption?: string;
107
+ rightSection?: ReactNode;
108
+ }
109
+ declare const PageTitleCaption: ({ title, caption, rightSection }: PageTitleCaptionProps) => react_jsx_runtime.JSX.Element;
110
+
111
+ interface StatsCardSkeletonProps {
112
+ /** Height of the chart skeleton - defaults to 120 */
113
+ chartHeight?: number;
114
+ /** Whether to show a chart skeleton - defaults to true */
115
+ withChart?: boolean;
116
+ /** Number of stat columns - defaults to 3 */
117
+ statCount?: 2 | 3;
118
+ }
119
+ /**
120
+ * StatsCardSkeleton - Loading skeleton for dashboard metric cards
121
+ *
122
+ * Consolidates the identical card skeleton pattern used across:
123
+ * - ExecutionHealthCard.tsx
124
+ * - CostMetricsCard.tsx
125
+ * - ThroughputCard.tsx
126
+ * - BusinessImpactCard.tsx
127
+ *
128
+ * @example
129
+ * ```tsx
130
+ * if (isLoading) {
131
+ * return <StatsCardSkeleton />
132
+ * }
133
+ * ```
134
+ */
135
+ declare function StatsCardSkeleton({ chartHeight, withChart, statCount }: StatsCardSkeletonProps): react_jsx_runtime.JSX.Element;
136
+ interface ListSkeletonProps {
137
+ /** Number of skeleton rows to show - defaults to 3 */
138
+ rows?: number;
139
+ /** Height of each row - defaults to 50 */
140
+ rowHeight?: number;
141
+ }
142
+ /**
143
+ * ListSkeleton - Loading skeleton for table/list content
144
+ *
145
+ * Consolidates the Stack + Skeleton pattern used across:
146
+ * - ApiKeyList.tsx
147
+ * - CredentialList.tsx
148
+ * - Various other list components
149
+ *
150
+ * @example
151
+ * ```tsx
152
+ * if (isLoading) {
153
+ * return <ListSkeleton rows={5} />
154
+ * }
155
+ * ```
156
+ */
157
+ declare function ListSkeleton({ rows, rowHeight }: ListSkeletonProps): react_jsx_runtime.JSX.Element;
158
+ interface DetailCardSkeletonProps {
159
+ /** Number of detail rows - defaults to 3 */
160
+ rows?: number;
161
+ }
162
+ /**
163
+ * DetailCardSkeleton - Loading skeleton for cards with list of detail items
164
+ *
165
+ * Used for cards like CostBreakdownCard that show a list of items
166
+ *
167
+ * @example
168
+ * ```tsx
169
+ * if (isLoading) {
170
+ * return <DetailCardSkeleton rows={4} />
171
+ * }
172
+ * ```
173
+ */
174
+ declare function DetailCardSkeleton({ rows }: DetailCardSkeletonProps): react_jsx_runtime.JSX.Element;
175
+
176
+ interface NavigationButtonProps {
177
+ /** Icon component to display */
178
+ icon: react__default.ComponentType<{
179
+ size?: number;
180
+ stroke?: number;
181
+ }>;
182
+ /** Button label text */
183
+ label: string;
184
+ /** Whether the button is in collapsed state (hides text) */
185
+ isCollapsed?: boolean;
186
+ /** Whether this button has sub-items/links */
187
+ hasSubItems?: boolean;
188
+ /** Whether sub-items are expanded (controls chevron rotation) */
189
+ isExpanded?: boolean;
190
+ /** Whether the icon and text should be styled as active */
191
+ isActive?: boolean;
192
+ /** Whether the background should be styled as active */
193
+ hasActiveBackground?: boolean;
194
+ /** Click handler */
195
+ onClick?: () => void;
196
+ /** Additional styles for the button container */
197
+ style?: react__default.CSSProperties;
198
+ /** Custom transition duration in ms */
199
+ transitionDuration?: number;
200
+ }
201
+ declare const NavigationButton: react__default.FC<NavigationButtonProps>;
202
+
203
+ interface CustomSelectorProps {
204
+ value: string | null;
205
+ onChange: (value: string | null) => void;
206
+ data: {
207
+ value: string;
208
+ label: string;
209
+ }[] | readonly {
210
+ value: string;
211
+ label: string;
212
+ }[];
213
+ leftSection?: ReactNode;
214
+ placeholder?: string;
215
+ w?: number | string;
216
+ withCheckIcon?: boolean;
217
+ disabled?: boolean;
218
+ }
219
+ declare function CustomSelector({ value, onChange, data, leftSection, placeholder, w, withCheckIcon, disabled }: CustomSelectorProps): react_jsx_runtime.JSX.Element;
220
+
221
+ interface APIErrorAlertProps {
222
+ /**
223
+ * The error to display. Can be an APIClientError, generic Error, or any unknown value.
224
+ */
225
+ error: unknown;
226
+ /**
227
+ * Optional title override. If not provided, uses getErrorTitle() based on error code.
228
+ */
229
+ title?: string;
230
+ /**
231
+ * Whether to show the request ID (if available). Defaults to true.
232
+ */
233
+ showRequestId?: boolean;
234
+ /**
235
+ * Optional custom icon. Defaults to IconAlertCircle.
236
+ */
237
+ icon?: React.ReactNode;
238
+ /**
239
+ * Alert color. Defaults to 'red'.
240
+ */
241
+ color?: string;
242
+ }
243
+ /**
244
+ * Alert component for displaying API errors with type-safe error handling.
245
+ *
246
+ * Automatically extracts error message, code, and request ID from APIClientError
247
+ * or falls back to generic Error handling.
248
+ *
249
+ * @example
250
+ * ```tsx
251
+ * const { data, error } = useQuery(...)
252
+ *
253
+ * if (error) {
254
+ * return <APIErrorAlert error={error} />
255
+ * }
256
+ * ```
257
+ *
258
+ * @example With custom title
259
+ * ```tsx
260
+ * <APIErrorAlert
261
+ * error={error}
262
+ * title="Failed to load resources"
263
+ * />
264
+ * ```
265
+ *
266
+ * @example Without request ID
267
+ * ```tsx
268
+ * <APIErrorAlert
269
+ * error={error}
270
+ * showRequestId={false}
271
+ * />
272
+ * ```
273
+ */
274
+ declare function APIErrorAlert({ error, title, showRequestId, icon, color }: APIErrorAlertProps): react_jsx_runtime.JSX.Element;
275
+
276
+ interface StatCardBaseProps {
277
+ /** The label/description text */
278
+ label: string;
279
+ /** The value to display (number or formatted string) */
280
+ value: string | number;
281
+ /** Tabler icon component */
282
+ icon: Icon;
283
+ /** Optional extra content rendered below the label */
284
+ children?: ReactNode;
285
+ }
286
+ interface StatCardDefaultProps extends StatCardBaseProps {
287
+ variant?: 'default';
288
+ /** Theme color for the icon (defaults to theme primary) */
289
+ color?: MantineColor;
290
+ isLoading?: never;
291
+ valueColor?: never;
292
+ }
293
+ interface StatCardHeroProps extends StatCardBaseProps {
294
+ variant: 'hero';
295
+ /** Whether data is loading */
296
+ isLoading?: boolean;
297
+ /** Custom color for the value text */
298
+ valueColor?: string;
299
+ /** Card sizing — 'sm' (default) for compact layouts, 'md' for spacious layouts */
300
+ size?: 'sm' | 'md';
301
+ color?: never;
302
+ }
303
+ type StatCardProps = StatCardDefaultProps | StatCardHeroProps;
304
+ /**
305
+ * StatCard - Stat display card with icon, label, and value.
306
+ *
307
+ * Supports two variants:
308
+ * - `default`: Compact card with ThemeIcon (used in admin overviews)
309
+ * - `hero`: Glass card with glowing icon ring (used on dashboards)
310
+ *
311
+ * @example
312
+ * ```tsx
313
+ * // Default variant
314
+ * <StatCard label="Total Executions" value={150} icon={IconPlayerPlay} color="blue" />
315
+ *
316
+ * // Hero variant
317
+ * <StatCard variant="hero" label="Executions" value={43} icon={IconPlayerPlay} isLoading={false} />
318
+ * ```
319
+ */
320
+ declare function StatCard(props: StatCardProps): react_jsx_runtime.JSX.Element;
321
+ /**
322
+ * StatCardSkeleton - Loading skeleton for StatCard (default variant)
323
+ */
324
+ declare function StatCardSkeleton(): react_jsx_runtime.JSX.Element;
325
+
326
+ interface StyledMarkdownProps {
327
+ /** Markdown content to render */
328
+ children: string;
329
+ /** Custom component overrides */
330
+ components?: Partial<Components>;
331
+ /** Additional class name */
332
+ className?: string;
333
+ /** Inline styles for the wrapper div */
334
+ style?: React.CSSProperties;
335
+ }
336
+ /**
337
+ * Styled markdown renderer with Mantine components and syntax highlighting
338
+ *
339
+ * Features:
340
+ * - Colored headings using theme primary color
341
+ * - Syntax-highlighted code blocks (oneDark theme, no token backgrounds)
342
+ * - Styled inline code with Mantine Code component
343
+ * - Styled blockquotes with left border
344
+ * - Proper list styling
345
+ *
346
+ * @example
347
+ * ```tsx
348
+ * import { StyledMarkdown } from '@repo/ui'
349
+ *
350
+ * <StyledMarkdown>{markdownContent}</StyledMarkdown>
351
+ * ```
352
+ */
353
+ declare function StyledMarkdown({ children, components, className, style }: StyledMarkdownProps): react_jsx_runtime.JSX.Element;
354
+
355
+ interface JsonViewerProps {
356
+ /** JSON data to display (will be stringified) or pre-formatted JSON string */
357
+ data: unknown;
358
+ /** Maximum height with scroll (e.g., '300px'). If not set, expands to content */
359
+ maxHeight?: string | number;
360
+ /** Font size override */
361
+ fontSize?: string | number;
362
+ }
363
+ /**
364
+ * Syntax-highlighted JSON viewer component
365
+ *
366
+ * @example
367
+ * ```tsx
368
+ * import { JsonViewer } from '@repo/ui'
369
+ *
370
+ * <JsonViewer data={{ foo: 'bar', count: 42 }} />
371
+ * <JsonViewer data={apiResponse} maxHeight={300} />
372
+ * ```
373
+ */
374
+ declare function JsonViewer({ data, maxHeight, fontSize }: JsonViewerProps): react_jsx_runtime.JSX.Element;
375
+
376
+ interface ContextViewerProps {
377
+ /** Any JSON-serializable data to display in a human-readable format */
378
+ data: unknown;
379
+ }
380
+ /**
381
+ * Auto-formats any JSON context into a human-readable layout.
382
+ *
383
+ * - Strings → rendered as markdown (supports formatting, lists, tables)
384
+ * - Flat key-value objects → labeled field list
385
+ * - Nested objects → indented subsections with left border
386
+ * - Arrays → bulleted lists or bordered cards
387
+ * - null/undefined/boolean/number → inline text
388
+ *
389
+ * No display configuration needed — the component infers layout from data shape.
390
+ */
391
+ declare function ContextViewer({ data }: ContextViewerProps): react_jsx_runtime.JSX.Element;
392
+
393
+ /**
394
+ * Workflow-specific logging types and utilities
395
+ */
396
+
397
+ interface WorkflowExecutionContext {
398
+ type: 'workflow';
399
+ contextType: 'workflow-execution';
400
+ executionId: string;
401
+ workflowId: string;
402
+ workflowName?: string;
403
+ organizationId: string;
404
+ executionPath?: string[];
405
+ }
406
+ interface WorkflowFailureContext {
407
+ type: 'workflow';
408
+ contextType: 'workflow-failure';
409
+ executionId: string;
410
+ workflowId: string;
411
+ error: string;
412
+ }
413
+ interface StepStartedContext {
414
+ type: 'workflow';
415
+ contextType: 'step-started';
416
+ stepId: string;
417
+ stepStatus: 'started';
418
+ input: unknown;
419
+ startTime: number;
420
+ }
421
+ interface StepCompletedContext {
422
+ type: 'workflow';
423
+ contextType: 'step-completed';
424
+ stepId: string;
425
+ stepStatus: 'completed';
426
+ output: unknown;
427
+ duration: number;
428
+ isTerminal: boolean;
429
+ startTime: number;
430
+ endTime: number;
431
+ }
432
+ interface StepFailedContext {
433
+ type: 'workflow';
434
+ contextType: 'step-failed';
435
+ stepId: string;
436
+ stepStatus: 'failed';
437
+ error: string;
438
+ duration: number;
439
+ startTime: number;
440
+ endTime: number;
441
+ }
442
+ interface ConditionalRouteContext {
443
+ type: 'workflow';
444
+ contextType: 'conditional-route';
445
+ stepId: string;
446
+ target: string;
447
+ error?: string;
448
+ }
449
+ interface ExecutionPathContext {
450
+ type: 'workflow';
451
+ contextType: 'execution-path';
452
+ executionPath: string[];
453
+ }
454
+ type WorkflowLogContext = WorkflowExecutionContext | WorkflowFailureContext | StepStartedContext | StepCompletedContext | StepFailedContext | ConditionalRouteContext | ExecutionPathContext;
455
+ interface WorkflowLogMessage {
456
+ level: ExecutionLogLevel;
457
+ message: string;
458
+ timestamp: number;
459
+ context?: WorkflowLogContext;
460
+ }
461
+
462
+ /**
463
+ * Agent-specific logging types
464
+ * Simplified 2-event model: lifecycle, iteration
465
+ *
466
+ * Design Philosophy:
467
+ * - LIFECYCLE EVENTS: Structural checkpoints (initialization, iteration, completion)
468
+ * - ITERATION EVENTS: Execution activities (reasoning, actions during iterations)
469
+ */
470
+
471
+ /**
472
+ * Agent lifecycle stages
473
+ * Universal checkpoints that apply to all agent executions
474
+ */
475
+ type AgentLifecycle = 'initialization' | 'iteration' | 'completion';
476
+ /**
477
+ * Iteration event types
478
+ * Activities that occur during agent iterations
479
+ */
480
+ type IterationEventType = 'reasoning' | 'action' | 'tool-call';
481
+ /**
482
+ * Base fields shared by all lifecycle events
483
+ */
484
+ interface AgentLifecycleEventBase {
485
+ type: 'agent';
486
+ agentId: string;
487
+ lifecycle: AgentLifecycle;
488
+ sessionId?: string;
489
+ }
490
+ /**
491
+ * Lifecycle started event - emitted when a phase begins
492
+ * REQUIRED: startTime (phase has started, no end yet)
493
+ */
494
+ interface AgentLifecycleStartedEvent extends AgentLifecycleEventBase {
495
+ stage: 'started';
496
+ startTime: number;
497
+ iteration?: number;
498
+ }
499
+ /**
500
+ * Lifecycle completed event - emitted when a phase succeeds
501
+ * REQUIRED: startTime, endTime, duration (phase has finished successfully)
502
+ */
503
+ interface AgentLifecycleCompletedEvent extends AgentLifecycleEventBase {
504
+ stage: 'completed';
505
+ startTime: number;
506
+ endTime: number;
507
+ duration: number;
508
+ iteration?: number;
509
+ attempts?: number;
510
+ memorySize?: {
511
+ sessionMemoryKeys: number;
512
+ historyEntries: number;
513
+ };
514
+ }
515
+ /**
516
+ * Lifecycle failed event - emitted when a phase fails
517
+ * REQUIRED: startTime, endTime, duration, error (phase has finished with error)
518
+ */
519
+ interface AgentLifecycleFailedEvent extends AgentLifecycleEventBase {
520
+ stage: 'failed';
521
+ startTime: number;
522
+ endTime: number;
523
+ duration: number;
524
+ error: string;
525
+ iteration?: number;
526
+ }
527
+ /**
528
+ * Union type for all lifecycle events
529
+ * Discriminated by 'stage' field for type narrowing
530
+ */
531
+ type AgentLifecycleEvent = AgentLifecycleStartedEvent | AgentLifecycleCompletedEvent | AgentLifecycleFailedEvent;
532
+ /**
533
+ * Placeholder data for MVP
534
+ * Will be typed per actionType in future
535
+ */
536
+ interface ActionPlaceholderData {
537
+ message: string;
538
+ }
539
+ /**
540
+ * Iteration event - captures activities during agent iterations
541
+ * Consolidates reasoning (LLM thought process) and actions (tool use, memory ops, etc.)
542
+ */
543
+ interface AgentIterationEvent {
544
+ type: 'agent';
545
+ agentId: string;
546
+ lifecycle: 'iteration';
547
+ eventType: IterationEventType;
548
+ iteration: number;
549
+ sessionId?: string;
550
+ startTime: number;
551
+ endTime: number;
552
+ duration: number;
553
+ output?: string;
554
+ actionType?: string;
555
+ data?: ActionPlaceholderData;
556
+ }
557
+ /**
558
+ * Tool call event - captures individual tool executions during iterations
559
+ * Provides granular timing for each tool invocation
560
+ */
561
+ interface AgentToolCallEvent {
562
+ type: 'agent';
563
+ agentId: string;
564
+ lifecycle: 'iteration';
565
+ eventType: 'tool-call';
566
+ iteration: number;
567
+ sessionId?: string;
568
+ toolName: string;
569
+ startTime: number;
570
+ endTime: number;
571
+ duration: number;
572
+ success: boolean;
573
+ error?: string;
574
+ input?: Record<string, unknown>;
575
+ output?: unknown;
576
+ }
577
+ /**
578
+ * Union type for all agent log contexts
579
+ * 3 event types total (lifecycle, iteration, tool-call)
580
+ */
581
+ type AgentLogContext = AgentLifecycleEvent | AgentIterationEvent | AgentToolCallEvent;
582
+
583
+ /**
584
+ * Base execution logger for Execution Engine
585
+ */
586
+ type ExecutionLogLevel = 'debug' | 'info' | 'warn' | 'error';
587
+
588
+ type LogContext = WorkflowLogContext | AgentLogContext;
589
+ interface ExecutionLogMessage {
590
+ level: ExecutionLogLevel;
591
+ message: string;
592
+ timestamp: number;
593
+ context?: LogContext;
594
+ }
595
+
596
+ /**
597
+ * Shared form field types for dynamic form generation
598
+ * Used by: Command Queue, Execution Runner UI, future form-based features
599
+ */
600
+ /**
601
+ * Supported form field types for action payloads
602
+ * Maps to Mantine form components
603
+ */
604
+ type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
605
+ /**
606
+ * Form field definition
607
+ */
608
+ interface FormField {
609
+ /** Field key in payload object */
610
+ name: string;
611
+ /** Field label for UI */
612
+ label: string;
613
+ /** Field type (determines UI component) */
614
+ type: FormFieldType;
615
+ /** Default value */
616
+ defaultValue?: unknown;
617
+ /** Required field */
618
+ required?: boolean;
619
+ /** Placeholder text */
620
+ placeholder?: string;
621
+ /** Help text */
622
+ description?: string;
623
+ /** Options for select/radio */
624
+ options?: Array<{
625
+ label: string;
626
+ value: string | number;
627
+ }>;
628
+ /** Min/max for number */
629
+ min?: number;
630
+ max?: number;
631
+ /** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
632
+ defaultValueFromContext?: string;
633
+ }
634
+ /**
635
+ * Form schema for action payload collection
636
+ */
637
+ interface FormSchema {
638
+ /** Form title */
639
+ title?: string;
640
+ /** Form description */
641
+ description?: string;
642
+ /** Form fields */
643
+ fields: FormField[];
644
+ }
645
+
646
+ /**
647
+ * Serialized Registry Types
648
+ *
649
+ * Pre-computed JSON-safe types for API responses and Command View.
650
+ * Serialization happens once at API startup, enabling instant response times.
651
+ */
652
+
653
+ /**
654
+ * Serialized form field for API responses
655
+ */
656
+ interface SerializedFormField {
657
+ name: string;
658
+ label: string;
659
+ type: FormFieldType;
660
+ defaultValue?: unknown;
661
+ required?: boolean;
662
+ placeholder?: string;
663
+ description?: string;
664
+ options?: Array<{
665
+ label: string;
666
+ value: string | number;
667
+ }>;
668
+ min?: number;
669
+ max?: number;
670
+ }
671
+ /**
672
+ * Serialized form schema for API responses
673
+ */
674
+ interface SerializedFormSchema {
675
+ title?: string;
676
+ description?: string;
677
+ fields: SerializedFormField[];
678
+ layout?: 'vertical' | 'horizontal' | 'grid';
679
+ }
680
+ /**
681
+ * Serialized execution form schema for API responses
682
+ */
683
+ interface SerializedExecutionFormSchema extends SerializedFormSchema {
684
+ fieldMappings?: Record<string, string>;
685
+ submitButton?: {
686
+ label?: string;
687
+ loadingLabel?: string;
688
+ confirmMessage?: string;
689
+ };
690
+ }
691
+ /**
692
+ * Serialized schedule config for API responses
693
+ */
694
+ interface SerializedScheduleConfig {
695
+ enabled: boolean;
696
+ defaultSchedule?: string;
697
+ allowedPatterns?: string[];
698
+ }
699
+ /**
700
+ * Serialized webhook config for API responses
701
+ */
702
+ interface SerializedWebhookConfig {
703
+ enabled: boolean;
704
+ payloadSchema?: unknown;
705
+ }
706
+ /**
707
+ * Serialized execution interface for API responses
708
+ */
709
+ interface SerializedExecutionInterface {
710
+ form: SerializedExecutionFormSchema;
711
+ schedule?: SerializedScheduleConfig;
712
+ webhook?: SerializedWebhookConfig;
713
+ }
714
+ /**
715
+ * Serialized agent definition (JSON-safe)
716
+ * Result of serializeDefinition(AgentDefinition)
717
+ */
718
+ interface SerializedAgentDefinition {
719
+ config: {
720
+ resourceId: string;
721
+ name: string;
722
+ description: string;
723
+ version: string;
724
+ type: 'agent';
725
+ status: 'dev' | 'prod';
726
+ /** Whether this resource is archived and should be excluded from registration and deployment */
727
+ archived?: boolean;
728
+ systemPrompt: string;
729
+ constraints?: {
730
+ maxIterations?: number;
731
+ timeout?: number;
732
+ maxSessionMemoryKeys?: number;
733
+ maxMemoryTokens?: number;
734
+ };
735
+ sessionCapable?: boolean;
736
+ memoryPreferences?: string;
737
+ };
738
+ modelConfig: {
739
+ provider: string;
740
+ model: string;
741
+ apiKey: string;
742
+ temperature: number;
743
+ maxOutputTokens: number;
744
+ topP?: number;
745
+ modelOptions?: Record<string, unknown>;
746
+ };
747
+ contract: {
748
+ inputSchema: object;
749
+ outputSchema?: object;
750
+ };
751
+ tools: Array<{
752
+ name: string;
753
+ description: string;
754
+ inputSchema?: object;
755
+ outputSchema?: object;
756
+ }>;
757
+ knowledgeMap?: {
758
+ nodeCount: number;
759
+ nodes: Array<{
760
+ id: string;
761
+ description: string;
762
+ loaded: boolean;
763
+ hasPrompt: boolean;
764
+ }>;
765
+ };
766
+ metricsConfig?: object;
767
+ interface?: SerializedExecutionInterface;
768
+ }
769
+ /**
770
+ * Serialized workflow definition (JSON-safe)
771
+ * Result of serializeDefinition(WorkflowDefinition)
772
+ */
773
+ interface SerializedWorkflowDefinition {
774
+ config: {
775
+ resourceId: string;
776
+ name: string;
777
+ description: string;
778
+ version: string;
779
+ type: 'workflow';
780
+ status: 'dev' | 'prod';
781
+ /** Whether this resource is archived and should be excluded from registration and deployment */
782
+ archived?: boolean;
783
+ };
784
+ entryPoint: string;
785
+ steps: Array<{
786
+ id: string;
787
+ name: string;
788
+ description: string;
789
+ inputSchema?: object;
790
+ outputSchema?: object;
791
+ next: {
792
+ type: 'linear' | 'conditional';
793
+ target?: string;
794
+ routes?: Array<{
795
+ target: string;
796
+ }>;
797
+ default?: string;
798
+ } | null;
799
+ }>;
800
+ contract: {
801
+ inputSchema: object;
802
+ outputSchema?: object;
803
+ };
804
+ metricsConfig?: object;
805
+ interface?: SerializedExecutionInterface;
806
+ }
807
+
808
+ /**
809
+ * Workflow step state
810
+ * Aggregates step context events with timing and logs
811
+ */
812
+ interface StepState {
813
+ stepId: string;
814
+ stepName: string;
815
+ status: 'pending' | 'running' | 'completed' | 'failed';
816
+ startTime?: number;
817
+ endTime?: number;
818
+ duration?: number;
819
+ input?: unknown;
820
+ output?: unknown;
821
+ error?: unknown;
822
+ logs: WorkflowLogMessage[];
823
+ }
824
+ /**
825
+ * Complete workflow execution data for node visualization
826
+ * Parsed from execution logs
827
+ */
828
+ interface WorkflowNodeVisualizerData {
829
+ steps: StepState[];
830
+ totalDuration: number;
831
+ isRunning: boolean;
832
+ }
833
+
834
+ /**
835
+ * Agent timeline and observability types
836
+ * Used for UI timeline visualization and backend processing
837
+ */
838
+
839
+ /**
840
+ * Sub-activity within an iteration
841
+ * Represents reasoning, actions, or tool calls with timing
842
+ */
843
+ interface SubActivity {
844
+ type: 'reasoning' | 'action' | 'tool-call';
845
+ startTime: number;
846
+ endTime: number;
847
+ duration: number;
848
+ details: AgentIterationEvent | AgentToolCallEvent;
849
+ }
850
+ /**
851
+ * Agent iteration state
852
+ * Aggregates lifecycle events and sub-activities for a single iteration
853
+ */
854
+ interface AgentIteration {
855
+ iterationNumber: number;
856
+ status: 'running' | 'completed' | 'failed' | 'pending';
857
+ iterationEvents: AgentIterationEvent[];
858
+ duration?: number;
859
+ timestamp: number;
860
+ subActivities: SubActivity[];
861
+ startTime?: number;
862
+ endTime?: number;
863
+ }
864
+ /**
865
+ * Agent lifecycle node state
866
+ * Represents initialization or completion phase
867
+ */
868
+ interface AgentLifecycleNode {
869
+ type: 'initialization' | 'completion';
870
+ status: 'running' | 'completed' | 'failed' | 'pending';
871
+ duration?: number;
872
+ timestamp?: number;
873
+ startTime?: number;
874
+ endTime?: number;
875
+ }
876
+ /**
877
+ * Complete agent execution data for timeline visualization
878
+ * Parsed from execution logs
879
+ */
880
+ interface AgentIterationData {
881
+ initialization: AgentLifecycleNode;
882
+ iterations: AgentIteration[];
883
+ completion: AgentLifecycleNode;
884
+ currentIteration: number | null;
885
+ totalIterations: number;
886
+ totalDuration?: number;
887
+ status: 'running' | 'completed' | 'failed' | 'warning';
888
+ }
889
+
890
+ /**
891
+ * Action configuration for HITL tasks
892
+ * Defines available user actions and their behavior
893
+ */
894
+ interface ActionConfig {
895
+ /** Unique action identifier (e.g., 'approve', 'retry', 'escalate') */
896
+ id: string;
897
+ /** Display label for UI button */
898
+ label: string;
899
+ /** Button variant/style */
900
+ type: 'primary' | 'secondary' | 'danger' | 'outline';
901
+ /** Tabler icon name (e.g., 'IconCheck', 'IconRefresh') */
902
+ icon?: string;
903
+ /** Button color (Mantine theme colors) */
904
+ color?: string;
905
+ /** Button variant (Mantine button variant, e.g., 'light', 'filled', 'outline') */
906
+ variant?: string;
907
+ /** Execution target (agent/workflow to invoke) */
908
+ target?: {
909
+ resourceType: 'agent' | 'workflow';
910
+ resourceId: string;
911
+ /**
912
+ * Optional session ID for agent continuation.
913
+ * If provided, invokes a new turn on the existing session instead of standalone execution.
914
+ * Only valid when resourceType is 'agent'.
915
+ */
916
+ sessionId?: string;
917
+ };
918
+ /** Form schema for collecting action-specific data */
919
+ form?: FormSchema;
920
+ /** Payload template for pre-filling forms */
921
+ payloadTemplate?: unknown;
922
+ /** Requires confirmation dialog */
923
+ requiresConfirmation?: boolean;
924
+ /** Confirmation message */
925
+ confirmationMessage?: string;
926
+ /** Help text / tooltip */
927
+ description?: string;
928
+ }
929
+
930
+ /**
931
+ * Origin resource type - where an execution/task originated from.
932
+ * Used for audit trails and tracking execution lineage.
933
+ */
934
+ type OriginResourceType = 'agent' | 'workflow' | 'scheduler' | 'api';
935
+ /**
936
+ * Origin tracking metadata - who/what created this execution/task.
937
+ * Used by both TaskScheduler and CommandQueue for complete audit trails.
938
+ */
939
+ interface OriginTracking {
940
+ originExecutionId: string;
941
+ originResourceType: OriginResourceType;
942
+ originResourceId: string;
943
+ }
944
+
945
+ /**
946
+ * Command queue task with flexible action system
947
+ */
948
+ interface Task extends OriginTracking {
949
+ id: string;
950
+ organizationId: string;
951
+ actions: ActionConfig[];
952
+ context: unknown;
953
+ selectedAction?: string;
954
+ actionPayload?: unknown;
955
+ description?: string;
956
+ priority: number;
957
+ /** Optional checkpoint identifier for grouping related human approval tasks */
958
+ humanCheckpoint?: string;
959
+ status: TaskStatus;
960
+ /**
961
+ * Target resource tracking — mirrors origin columns.
962
+ * Set when task is created; patchable to redirect execution to a different resource.
963
+ */
964
+ targetResourceId?: string;
965
+ targetResourceType?: 'agent' | 'workflow';
966
+ /**
967
+ * Execution ID for the action that runs AFTER user approval.
968
+ * NULL until execution starts.
969
+ *
970
+ * Naming distinction:
971
+ * - originExecutionId = Parent execution that CREATED the HITL task
972
+ * - targetExecutionId = Child execution that RUNS AFTER user approval
973
+ */
974
+ targetExecutionId?: string;
975
+ createdAt: Date;
976
+ completedAt?: Date;
977
+ completedBy?: string;
978
+ expiresAt?: Date;
979
+ idempotencyKey?: string | null;
980
+ }
981
+ /**
982
+ * Task status values
983
+ * - pending: awaiting action
984
+ * - processing: execution in progress after user approval
985
+ * - completed: action was taken and execution succeeded
986
+ * - failed: execution failed, task can be retried
987
+ * - expired: timed out before action
988
+ */
989
+ type TaskStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
990
+
991
+ /**
992
+ * Wire-format DTO for notification API responses.
993
+ * Dates are ISO 8601 strings (not Date objects like the domain Notification type).
994
+ * Used by frontend hooks that consume /api/notifications.
995
+ */
996
+ interface NotificationDTO {
997
+ id: string;
998
+ userId: string;
999
+ organizationId: string;
1000
+ category: string;
1001
+ title: string;
1002
+ message: string;
1003
+ actionUrl: string | null;
1004
+ read: boolean;
1005
+ readAt: string | null;
1006
+ createdAt: string;
1007
+ }
1008
+
1009
+ /**
1010
+ * Time range selector for dashboard metrics
1011
+ */
1012
+ type TimeRange = '1h' | '24h' | '7d' | '30d';
1013
+ /** Time-bucketed health data point */
1014
+ interface ResourceHealthDataPoint {
1015
+ time: string;
1016
+ success: number;
1017
+ failure: number;
1018
+ warning: number;
1019
+ rate: number;
1020
+ }
1021
+ /** Health data for a single resource */
1022
+ interface ResourceHealth {
1023
+ entityType: string;
1024
+ entityId: string;
1025
+ entityName: string | null;
1026
+ trendData: ResourceHealthDataPoint[];
1027
+ summary: {
1028
+ total: number;
1029
+ successRate: number;
1030
+ };
1031
+ }
1032
+
1033
+ /**
1034
+ * Base Execution Engine type definitions
1035
+ * Core types shared across all Execution Engine resources
1036
+ */
1037
+
1038
+ /**
1039
+ * NOTE: AIResource interface has been removed and replaced with ResourceDefinition
1040
+ * from registry/types.ts. All resources (executable and non-executable) now extend
1041
+ * the unified ResourceDefinition base interface.
1042
+ *
1043
+ * AgentConfig and WorkflowConfig now extend ResourceDefinition directly.
1044
+ * See packages/core/src/registry/types.ts for the base interface definition.
1045
+ */
1046
+ type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefinition;
1047
+
1048
+ /**
1049
+ * Resource Registry type definitions
1050
+ */
1051
+
1052
+ /**
1053
+ * Environment/deployment status for resources
1054
+ */
1055
+ type ResourceStatus = 'dev' | 'prod';
1056
+ /**
1057
+ * All resource types in the platform
1058
+ * Used as the discriminator field in ResourceDefinition
1059
+ */
1060
+ type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human';
1061
+ /**
1062
+ * Base interface for ALL platform resources
1063
+ * Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
1064
+ */
1065
+ interface ResourceDefinition {
1066
+ /** Unique resource identifier */
1067
+ resourceId: string;
1068
+ /** Display name */
1069
+ name: string;
1070
+ /** Purpose and functionality description */
1071
+ description: string;
1072
+ /** Version for change tracking and evolution */
1073
+ version: string;
1074
+ /** Resource type discriminator */
1075
+ type: ResourceType;
1076
+ /** Environment/deployment status */
1077
+ status: ResourceStatus;
1078
+ /** Domain tags for filtering and organization */
1079
+ domains?: ResourceDomain[];
1080
+ /** Whether the agent supports multi-turn sessions (agents only) */
1081
+ sessionCapable?: boolean;
1082
+ /** Whether the resource is local (monorepo) or remote (externally deployed) */
1083
+ origin?: 'local' | 'remote';
1084
+ /** Whether this resource is archived and should be excluded from registration and deployment */
1085
+ archived?: boolean;
1086
+ }
1087
+
1088
+ /**
1089
+ * Standard Domain Definitions
1090
+ * Centralized domain constants and definitions for all organization resources.
1091
+ */
1092
+
1093
+ declare const DOMAINS: {
1094
+ readonly INBOUND_PIPELINE: "inbound-pipeline";
1095
+ readonly LEAD_GEN_PIPELINE: "lead-gen-pipeline";
1096
+ readonly SUPPORT: "support";
1097
+ readonly CLIENT_SUPPORT: "client-support";
1098
+ readonly DELIVERY: "delivery";
1099
+ readonly OPERATIONS: "operations";
1100
+ readonly FINANCE: "finance";
1101
+ readonly EXECUTIVE: "executive";
1102
+ readonly INSTANTLY: "instantly";
1103
+ readonly TESTING: "testing";
1104
+ readonly INTERNAL: "internal";
1105
+ readonly INTEGRATION: "integration";
1106
+ readonly UTILITY: "utility";
1107
+ readonly DIAGNOSTIC: "diagnostic";
1108
+ };
1109
+ /**
1110
+ * ResourceDomain - Strongly typed domain identifier
1111
+ * Use this type for all domain references to ensure compile-time validation.
1112
+ */
1113
+ type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS];
1114
+
1115
+ type ExecutionStatus = 'pending' | 'running' | 'completed' | 'failed' | 'warning';
1116
+
1117
+ /**
1118
+ * Resource Type Metadata
1119
+ *
1120
+ * Centralized metadata for ResourceDefinition types including icon names and colors.
1121
+ * Icon names reference @tabler/icons-react - UI layer maps these to actual components.
1122
+ */
1123
+
1124
+ /**
1125
+ * Node color types for graph visualization
1126
+ * Used by both @repo/core (metadata) and @repo/ui (components)
1127
+ */
1128
+ type NodeColorType = 'violet' | 'blue' | 'orange' | 'teal' | 'gray' | 'yellow';
1129
+
1130
+ /**
1131
+ * Execution Runner Types
1132
+ *
1133
+ * Shared types for the Execution Runner UI feature.
1134
+ * Used by both API (apps/api) and frontend (apps/command-center).
1135
+ */
1136
+
1137
+ interface ExecutionRunnerCatalogItem {
1138
+ resourceId: string;
1139
+ resourceName: string;
1140
+ resourceType: 'workflow' | 'agent';
1141
+ description?: string;
1142
+ status: 'dev' | 'prod';
1143
+ version: string;
1144
+ interface: SerializedExecutionInterface;
1145
+ }
1146
+
1147
+ interface TimeRangeSelectorProps {
1148
+ value: TimeRange;
1149
+ onChange: (value: TimeRange) => void;
1150
+ width?: number;
1151
+ }
1152
+ declare function TimeRangeSelector({ value, onChange, width }: TimeRangeSelectorProps): react_jsx_runtime.JSX.Element;
1153
+
1154
+ declare function PageNotFound(): react_jsx_runtime.JSX.Element;
1155
+
1156
+ interface ResourceCardProps {
1157
+ resource: ResourceDefinition;
1158
+ onClick: (resource: ResourceDefinition) => void;
1159
+ /** Layout mode: 'stack' renders vertically (default), 'row' renders as a dense horizontal strip, 'grid' renders with a right section, 'card' renders with top section above details */
1160
+ layout?: 'stack' | 'row' | 'grid' | 'card';
1161
+ /** Content rendered in the right column when layout is 'grid' */
1162
+ rightSection?: ReactNode;
1163
+ /** Content rendered above the details when layout is 'card' */
1164
+ topSection?: ReactNode;
1165
+ /** Optional "Last run X ago" label shown below status badges */
1166
+ lastRunLabel?: string;
1167
+ /** HTML data attributes and style overrides passed to the root Card */
1168
+ 'data-resource-id'?: string;
1169
+ style?: CSSProperties;
1170
+ }
1171
+ declare function ResourceCard({ resource, onClick, layout, rightSection, topSection, lastRunLabel, style, ...rest }: ResourceCardProps): react_jsx_runtime.JSX.Element;
1172
+
1173
+ /**
1174
+ * Converts ExecutionRunnerCatalogItem to ResourceDefinition format
1175
+ * for use with the unified ResourceCard component.
1176
+ *
1177
+ * @param item - ExecutionRunnerCatalogItem from the execution runner API
1178
+ * @returns ResourceDefinition compatible with ResourceCard
1179
+ *
1180
+ * @example
1181
+ * const catalogItem = {
1182
+ * resourceId: 'wf-001',
1183
+ * resourceName: 'Order Processor',
1184
+ * resourceType: 'workflow',
1185
+ * description: 'Processes customer orders',
1186
+ * status: 'prod',
1187
+ * version: '1.0.0',
1188
+ * interface: { ... }
1189
+ * }
1190
+ *
1191
+ * const resource = catalogItemToResourceDefinition(catalogItem)
1192
+ * <ResourceCard resource={resource} />
1193
+ */
1194
+ declare function catalogItemToResourceDefinition(item: ExecutionRunnerCatalogItem): ResourceDefinition;
1195
+
1196
+ interface CardHeaderProps {
1197
+ icon?: ReactNode;
1198
+ title: string;
1199
+ subtitle?: string;
1200
+ rightSection?: ReactNode;
1201
+ }
1202
+ declare function CardHeader({ icon, title, subtitle, rightSection }: CardHeaderProps): react_jsx_runtime.JSX.Element;
1203
+
1204
+ /**
1205
+ * Custom Mantine loader — three ascending chevrons that pulse upward in sequence.
1206
+ * Mirrors the Elevasis logo's angular, upward-pointing silhouette.
1207
+ *
1208
+ * Uses `--loader-size` and `--loader-color` CSS variables automatically
1209
+ * provided by Mantine's `<Loader />` wrapper, so `size` and `color` props work.
1210
+ */
1211
+ declare const ElevasisLoader: MantineLoaderComponent;
1212
+
1213
+ interface ICustomModalProps {
1214
+ opened: boolean;
1215
+ onClose: () => void;
1216
+ children: react__default.ReactNode | react__default.ReactNode[] | string;
1217
+ loading?: boolean;
1218
+ style?: react__default.CSSProperties;
1219
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1220
+ }
1221
+ declare const CustomModal: ({ children, opened, onClose, loading, style, size }: ICustomModalProps) => react_jsx_runtime.JSX.Element;
1222
+
1223
+ interface IConfirmationModalProps {
1224
+ opened: boolean;
1225
+ onClose: () => void;
1226
+ icon: ReactElement<{
1227
+ size?: number;
1228
+ strokeWidth?: number;
1229
+ }>;
1230
+ confirmationHandler?: () => void;
1231
+ loading?: boolean;
1232
+ style?: React.CSSProperties;
1233
+ title: string;
1234
+ text?: ReactNode | string;
1235
+ buttonText?: string;
1236
+ buttonColor?: string;
1237
+ centerText?: boolean;
1238
+ }
1239
+ declare const ConfirmationModal: ({ opened, onClose, loading, icon, confirmationHandler, style, title, text, buttonText, buttonColor, centerText }: IConfirmationModalProps) => react_jsx_runtime.JSX.Element;
1240
+
1241
+ interface IConfirmationInputModalProps {
1242
+ opened: boolean;
1243
+ onClose: () => void;
1244
+ icon: ReactElement<{
1245
+ size?: number;
1246
+ strokeWidth?: number;
1247
+ }>;
1248
+ confirmationHandler?: () => void;
1249
+ loading?: boolean;
1250
+ style?: React.CSSProperties;
1251
+ title: string | ReactNode;
1252
+ text?: ReactNode | string;
1253
+ buttonText?: string;
1254
+ buttonColor?: string;
1255
+ centerText?: boolean;
1256
+ inputValue: string;
1257
+ onInputChange: (value: string) => void;
1258
+ expectedValue: string;
1259
+ placeholder?: string;
1260
+ }
1261
+ declare const ConfirmationInputModal: ({ opened, onClose, loading, icon, confirmationHandler, style, title, text, buttonText, buttonColor, inputValue, onInputChange, expectedValue, placeholder }: IConfirmationInputModalProps) => react_jsx_runtime.JSX.Element;
1262
+
1263
+ type SortDirection = 'asc' | 'desc';
1264
+ interface SortState {
1265
+ column: string;
1266
+ direction: SortDirection;
1267
+ }
1268
+
1269
+ interface SortableHeaderProps {
1270
+ column: string;
1271
+ children: React.ReactNode;
1272
+ sort: SortState;
1273
+ onToggle: (column: string) => void;
1274
+ style?: React.CSSProperties;
1275
+ w?: number | string;
1276
+ }
1277
+ declare function SortableHeader({ column, children, sort, onToggle, style, w }: SortableHeaderProps): react_jsx_runtime.JSX.Element;
1278
+
1279
+ interface FilterBarProps {
1280
+ children: ReactNode;
1281
+ actions?: ReactNode;
1282
+ }
1283
+ declare function FilterBar({ children, actions }: FilterBarProps): react_jsx_runtime.JSX.Element;
1284
+
1285
+ interface TableSelectionToolbarProps {
1286
+ selectedCount: number;
1287
+ onDelete?: () => void;
1288
+ isDeleting?: boolean;
1289
+ }
1290
+ declare function TableSelectionToolbar({ selectedCount, onDelete, isDeleting }: TableSelectionToolbarProps): react_jsx_runtime.JSX.Element | null;
1291
+
1292
+ interface FormFieldRendererProps {
1293
+ field: FormField;
1294
+ form: UseFormReturnType<any>;
1295
+ richTextRenderer?: (props: {
1296
+ content: string;
1297
+ onChange: (content: string) => void;
1298
+ placeholder?: string;
1299
+ }) => ReactNode;
1300
+ }
1301
+ declare function FormFieldRenderer({ field, form, richTextRenderer }: FormFieldRendererProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
1302
+
1303
+ interface ExecutionLogEntry {
1304
+ id: string;
1305
+ resourceId: string;
1306
+ resourceName: string;
1307
+ resourceType: 'workflow' | 'agent' | 'pipeline';
1308
+ status: ExecutionStatus;
1309
+ startTime: number;
1310
+ endTime?: number;
1311
+ duration?: number;
1312
+ resourceStatus: 'dev' | 'prod';
1313
+ resourceVersion?: string | null;
1314
+ apiVersion?: string | null;
1315
+ sdkVersion?: string | null;
1316
+ }
1317
+ interface ExecutionLogsTableProps {
1318
+ executions: ExecutionLogEntry[];
1319
+ isLoading: boolean;
1320
+ onRowClick?: (params: {
1321
+ resourceType: string;
1322
+ resourceId: string;
1323
+ executionId: string;
1324
+ }) => void;
1325
+ }
1326
+ declare function ExecutionLogsTable({ executions, isLoading, onRowClick }: ExecutionLogsTableProps): react_jsx_runtime.JSX.Element;
1327
+
1328
+ /**
1329
+ * Get chart color based on success rate
1330
+ */
1331
+ declare function getHealthColor(successRate: number, hasExecutions?: boolean): string;
1332
+ interface ResourceHealthChartProps {
1333
+ healthData: ResourceHealth | undefined;
1334
+ hasExecutions?: boolean;
1335
+ width?: number | string;
1336
+ height?: number;
1337
+ }
1338
+ /**
1339
+ * Mini health chart for resource cards
1340
+ */
1341
+ declare function ResourceHealthChart({ healthData, hasExecutions, width, height }: ResourceHealthChartProps): react_jsx_runtime.JSX.Element;
1342
+
1343
+ interface NotificationBellProps {
1344
+ /** Override unread count (e.g., from SSE-enhanced source) */
1345
+ unreadCount?: number;
1346
+ /** Callback for navigation when notification is clicked */
1347
+ onNavigate?: (url: string) => void;
1348
+ }
1349
+ declare function NotificationBell({ unreadCount, onNavigate }: NotificationBellProps): react_jsx_runtime.JSX.Element;
1350
+
1351
+ interface NotificationItemProps {
1352
+ notification: NotificationDTO;
1353
+ onClose?: () => void;
1354
+ onNavigate?: (url: string) => void;
1355
+ }
1356
+ declare function NotificationItem({ notification, onClose, onNavigate }: NotificationItemProps): react_jsx_runtime.JSX.Element;
1357
+
1358
+ interface NotificationListProps {
1359
+ notifications: NotificationDTO[];
1360
+ isLoading?: boolean;
1361
+ onClose?: () => void;
1362
+ onNavigate?: (url: string) => void;
1363
+ }
1364
+ declare function NotificationList({ notifications, isLoading, onClose, onNavigate }: NotificationListProps): react_jsx_runtime.JSX.Element;
1365
+
1366
+ interface NotificationPanelProps {
1367
+ notifications: NotificationDTO[];
1368
+ isLoading?: boolean;
1369
+ onClose?: () => void;
1370
+ onNavigate?: (url: string) => void;
1371
+ }
1372
+ declare function NotificationPanel({ notifications, isLoading, onClose, onNavigate }: NotificationPanelProps): react_jsx_runtime.JSX.Element;
1373
+
1374
+ /**
1375
+ * Shared visualization constants used by both workflow and agent visualizers
1376
+ */
1377
+ declare const SHARED_VIZ_CONSTANTS: {
1378
+ readonly NODE_WIDTH: 160;
1379
+ readonly NODE_SPACING: 220;
1380
+ readonly HANDLE_SIZE: 8;
1381
+ readonly MIN_ZOOM: 0.5;
1382
+ readonly MAX_ZOOM: 2;
1383
+ };
1384
+ /**
1385
+ * Container height constant (used by VisualizerContainer and EmptyVisualizer)
1386
+ */
1387
+ declare const CONTAINER_CONSTANTS: {
1388
+ CONTAINER_HEIGHT: number;
1389
+ };
1390
+
1391
+ /**
1392
+ * Timeline Bar Props
1393
+ * Represents a single horizontal bar in the timeline
1394
+ */
1395
+ interface TimelineBarProps {
1396
+ startTime: number;
1397
+ endTime: number;
1398
+ executionStart: number;
1399
+ executionEnd: number;
1400
+ status: ExecutionStatus;
1401
+ label?: string;
1402
+ onClick?: () => void;
1403
+ nodeId?: string | number;
1404
+ isSelected?: boolean;
1405
+ hasSelection?: boolean;
1406
+ }
1407
+ /**
1408
+ * Timeline Row Props
1409
+ * Represents a row with label + one or more bars
1410
+ */
1411
+ interface TimelineRowProps {
1412
+ label: string;
1413
+ bars: Array<{
1414
+ startTime: number;
1415
+ endTime: number;
1416
+ status: ExecutionStatus;
1417
+ label?: string;
1418
+ onClick?: () => void;
1419
+ nodeId?: string | number;
1420
+ }>;
1421
+ executionStart: number;
1422
+ executionEnd: number;
1423
+ indent?: number;
1424
+ selectedNodeId?: string | number | null;
1425
+ }
1426
+ /**
1427
+ * Timeline Container Props
1428
+ * Outer container for the timeline
1429
+ */
1430
+ interface TimelineContainerProps {
1431
+ executionStart: number;
1432
+ executionEnd: number;
1433
+ children: React.ReactNode;
1434
+ }
1435
+ /**
1436
+ * Unified node data combining workflow structure and execution state
1437
+ */
1438
+ interface UnifiedWorkflowNodeData {
1439
+ id: string;
1440
+ name: string;
1441
+ description: string;
1442
+ isEntryPoint: boolean;
1443
+ isEndNode: boolean;
1444
+ isConditional: boolean;
1445
+ routeCount?: number;
1446
+ executionStatus?: 'pending' | 'running' | 'completed' | 'failed';
1447
+ duration?: number;
1448
+ input?: unknown;
1449
+ output?: unknown;
1450
+ error?: unknown;
1451
+ logs?: WorkflowLogMessage[];
1452
+ isExecuted: boolean;
1453
+ isDimmed: boolean;
1454
+ isSelected?: boolean;
1455
+ [key: string]: unknown;
1456
+ }
1457
+ /**
1458
+ * Unified edge data combining workflow structure and execution state
1459
+ */
1460
+ interface UnifiedWorkflowEdgeData {
1461
+ edgeType: 'linear' | 'conditional' | 'default';
1462
+ label?: string;
1463
+ wasTaken: boolean;
1464
+ sourceStatus?: ExecutionStatus;
1465
+ targetStatus?: ExecutionStatus;
1466
+ isDimmed: boolean;
1467
+ isAnimated: boolean;
1468
+ [key: string]: unknown;
1469
+ }
1470
+
1471
+ /**
1472
+ * useWorkflowStepsLayout - Hook to convert workflow definition to ReactFlow nodes/edges
1473
+ *
1474
+ * Uses Dagre for automatic graph layout:
1475
+ * - Left-to-right flow (LR)
1476
+ * - Minimizes edge crossings
1477
+ * - Keeps connected nodes closer together
1478
+ */
1479
+
1480
+ /**
1481
+ * Serialized next config from API
1482
+ */
1483
+ interface SerializedNextConfig {
1484
+ type: 'linear' | 'conditional';
1485
+ target?: string;
1486
+ routes?: Array<{
1487
+ target: string;
1488
+ }>;
1489
+ default?: string;
1490
+ }
1491
+ /**
1492
+ * Serialized workflow step from API
1493
+ */
1494
+ interface SerializedWorkflowStep {
1495
+ id: string;
1496
+ name: string;
1497
+ description: string;
1498
+ next: SerializedNextConfig | null;
1499
+ }
1500
+ /**
1501
+ * Serialized workflow definition subset needed for layout
1502
+ */
1503
+ interface WorkflowStepsLayoutInput {
1504
+ entryPoint: string;
1505
+ steps: SerializedWorkflowStep[];
1506
+ }
1507
+
1508
+ interface ExecutionStatusBadgeProps {
1509
+ /** The execution status */
1510
+ status: ExecutionStatus;
1511
+ /** Badge size - defaults to 'sm' */
1512
+ size?: BadgeProps['size'];
1513
+ /** Badge variant - defaults to 'light' */
1514
+ variant?: 'light' | 'filled' | 'outline' | 'dot';
1515
+ /** Whether to show a loader for running status - defaults to true */
1516
+ showLoader?: boolean;
1517
+ }
1518
+ /**
1519
+ * ExecutionStatusBadge - Reusable badge for execution statuses
1520
+ *
1521
+ * Consolidates status badge rendering across:
1522
+ * - ExecutionSummaryRow.tsx
1523
+ * - SessionExecutionLogs.tsx
1524
+ * - BaseExecutionLogsHeader.tsx
1525
+ * - UnifiedWorkflowNode.tsx
1526
+ * - Dashboard.tsx task list
1527
+ *
1528
+ * Uses the centralized STATUS_COLORS from statusColors.ts
1529
+ *
1530
+ * @example
1531
+ * ```tsx
1532
+ * <ExecutionStatusBadge status="running" />
1533
+ * <ExecutionStatusBadge status="completed" variant="dot" />
1534
+ * ```
1535
+ */
1536
+ declare function ExecutionStatusBadge({ status, size, variant, showLoader }: ExecutionStatusBadgeProps): react_jsx_runtime.JSX.Element;
1537
+
1538
+ interface ExecutionStatsProps {
1539
+ totalExecutions: number;
1540
+ successCount: number;
1541
+ failureCount: number;
1542
+ warningCount?: number;
1543
+ successRate: number;
1544
+ align?: 'flex-start' | 'flex-end' | 'center';
1545
+ /** Compact mode renders metric chips in a horizontal row */
1546
+ compact?: boolean;
1547
+ }
1548
+ /**
1549
+ * Execution statistics with colored text — vertical stack or compact metric chips
1550
+ */
1551
+ declare function ExecutionStats({ totalExecutions, successCount, failureCount, warningCount, successRate, align, compact }: ExecutionStatsProps): react_jsx_runtime.JSX.Element | null;
1552
+
1553
+ /**
1554
+ * TimelineContainer Component
1555
+ *
1556
+ * Outer container for the timeline visualization.
1557
+ * Wraps timeline rows and displays time axis at the bottom.
1558
+ */
1559
+ declare function TimelineContainer({ executionStart, executionEnd, children }: TimelineContainerProps): react_jsx_runtime.JSX.Element;
1560
+
1561
+ interface TimelineAxisProps {
1562
+ totalDuration: number;
1563
+ }
1564
+ /**
1565
+ * TimelineAxis Component
1566
+ *
1567
+ * Renders time markers at the bottom of the timeline.
1568
+ * Shows 0ms on the left, total duration on the right, and 3 intermediate markers.
1569
+ */
1570
+ declare function TimelineAxis({ totalDuration }: TimelineAxisProps): react_jsx_runtime.JSX.Element;
1571
+
1572
+ /**
1573
+ * TimelineBar Component
1574
+ *
1575
+ * Renders a single horizontal bar in the timeline visualization.
1576
+ * Position and width are calculated as percentages based on absolute timestamps.
1577
+ */
1578
+ declare function TimelineBar({ startTime, endTime, executionStart, executionEnd, status, label, onClick, isSelected, hasSelection }: TimelineBarProps): react_jsx_runtime.JSX.Element;
1579
+
1580
+ /**
1581
+ * TimelineRow Component
1582
+ *
1583
+ * Renders a row in the timeline with a label and one or more timeline bars.
1584
+ * Supports indentation for nested rows (e.g., sub-activities within iterations).
1585
+ */
1586
+ declare function TimelineRow({ label, bars, executionStart, executionEnd, indent, selectedNodeId }: TimelineRowProps): react_jsx_runtime.JSX.Element;
1587
+
1588
+ interface IVisualizerContainerProps {
1589
+ children: React.ReactNode;
1590
+ /** Click handler for container (for deselecting nodes). Optional for definition mode. */
1591
+ handleContainerClick?: (event: React.MouseEvent) => void;
1592
+ /** Optional dynamic height calculated from graph layout. Falls back to default if not provided. */
1593
+ height?: number;
1594
+ }
1595
+ declare const VisualizerContainer: ({ children, handleContainerClick, height }: IVisualizerContainerProps) => react_jsx_runtime.JSX.Element;
1596
+
1597
+ declare const EmptyVisualizer: ({ message }: {
1598
+ message?: string;
1599
+ }) => react_jsx_runtime.JSX.Element;
1600
+
1601
+ interface UnifiedWorkflowGraphProps {
1602
+ /**
1603
+ * Workflow definition (entry point, steps, routes)
1604
+ * Accepts either SerializedWorkflowDefinition (execution mode) or WorkflowStepsLayoutInput (definition mode)
1605
+ */
1606
+ resourceDefinition: SerializedWorkflowDefinition | WorkflowStepsLayoutInput;
1607
+ /** Execution logs from SSE or useExecution hook (only used in execution mode) */
1608
+ executionLogs?: ExecutionLogMessage[];
1609
+ /** Currently selected step ID for highlighting (only used in execution mode) */
1610
+ selectedStepId?: string | null;
1611
+ /** Callback when step selection changes (only used in execution mode) */
1612
+ onStepSelect?: (stepId: string | null) => void;
1613
+ /** External trigger for fit view (increment to trigger, used after collapse animations) */
1614
+ fitViewTrigger?: number;
1615
+ }
1616
+ declare function UnifiedWorkflowGraph({ resourceDefinition, executionLogs, selectedStepId, onStepSelect, fitViewTrigger: externalFitViewTrigger }: UnifiedWorkflowGraphProps): react_jsx_runtime.JSX.Element;
1617
+
1618
+ type UnifiedWorkflowNodeProps = NodeProps<Node<UnifiedWorkflowNodeData>>;
1619
+ declare const UnifiedWorkflowNode: react.NamedExoticComponent<UnifiedWorkflowNodeProps>;
1620
+
1621
+ type UnifiedWorkflowEdgeProps = EdgeProps<Edge<UnifiedWorkflowEdgeData, string>>;
1622
+ declare const UnifiedWorkflowEdge: react.NamedExoticComponent<UnifiedWorkflowEdgeProps>;
1623
+
1624
+ interface WorkflowExecutionTimelineProps {
1625
+ timelineData: WorkflowNodeVisualizerData;
1626
+ selectedStepId?: string | null;
1627
+ }
1628
+ /**
1629
+ * WorkflowExecutionTimeline Component
1630
+ *
1631
+ * Renders a Temporal-style timeline visualization for workflow executions.
1632
+ * Shows all workflow steps with their timing and status.
1633
+ */
1634
+ declare function WorkflowExecutionTimeline({ timelineData, selectedStepId }: WorkflowExecutionTimelineProps): react_jsx_runtime.JSX.Element;
1635
+
1636
+ interface AgentExecutionVisualizerProps {
1637
+ resourceDefinition: SerializedAgentDefinition;
1638
+ iterationData: AgentIterationData | null;
1639
+ selectedExecutionId?: string;
1640
+ liveExecutions: Set<string>;
1641
+ selectedIterationId: number | 'initialization' | 'completion' | null;
1642
+ onIterationSelect: (iterationId: number | 'initialization' | 'completion' | null) => void;
1643
+ }
1644
+ declare function AgentExecutionVisualizer({ resourceDefinition, iterationData, selectedExecutionId, liveExecutions, selectedIterationId, onIterationSelect }: AgentExecutionVisualizerProps): react_jsx_runtime.JSX.Element;
1645
+
1646
+ interface AgentExecutionTimelineProps {
1647
+ iterationData: AgentIterationData;
1648
+ selectedIterationId?: number | 'initialization' | 'completion' | null;
1649
+ }
1650
+ /**
1651
+ * AgentExecutionTimeline Component
1652
+ *
1653
+ * Renders a Temporal-style timeline visualization for agent executions.
1654
+ * Shows initialization, iterations (with sub-activities), and completion phases.
1655
+ */
1656
+ declare function AgentExecutionTimeline({ iterationData, selectedIterationId }: AgentExecutionTimelineProps): react_jsx_runtime.JSX.Element;
1657
+
1658
+ declare const AgentIterationNode: react.NamedExoticComponent<NodeProps>;
1659
+
1660
+ declare const AgentIterationEdge: react.NamedExoticComponent<EdgeProps>;
1661
+
1662
+ /**
1663
+ * Graph Component Types
1664
+ *
1665
+ * Shared type definitions for graph components
1666
+ */
1667
+
1668
+ interface GraphThemeColors {
1669
+ primary: string;
1670
+ agent: string;
1671
+ workflow: string;
1672
+ trigger: string;
1673
+ integration: string;
1674
+ approval: string;
1675
+ primaryGlow: string;
1676
+ agentGlow: string;
1677
+ workflowGlow: string;
1678
+ triggerGlow: string;
1679
+ integrationGlow: string;
1680
+ approvalGlow: string;
1681
+ edgeTriggers: string;
1682
+ edgeUses: string;
1683
+ edgeApproval: string;
1684
+ edgeTriggersGlow: string;
1685
+ edgeUsesGlow: string;
1686
+ edgeApprovalGlow: string;
1687
+ }
1688
+
1689
+ /**
1690
+ * useGraphTheme - Hook for theme-aware graph colors
1691
+ *
1692
+ * Returns color values that adapt to light/dark mode for graph elements.
1693
+ * Self-contained: derives colors from hardcoded domain palette using color-mix().
1694
+ */
1695
+
1696
+ declare function useGraphTheme(): GraphThemeColors;
1697
+
1698
+ interface GraphContainerProps {
1699
+ children: React.ReactNode;
1700
+ height?: number | string;
1701
+ }
1702
+ /**
1703
+ * Returns the animated grid background styles for the current theme.
1704
+ * Uses color-mix() with --color-primary so the grid adapts to any preset.
1705
+ *
1706
+ * @param isDark - Whether dark mode is active
1707
+ * @returns CSSProperties object with background styles
1708
+ */
1709
+ declare function getGraphBackgroundStyles(isDark: boolean): CSSProperties;
1710
+ /**
1711
+ * Hook that returns the animated grid background styles for the current theme
1712
+ *
1713
+ * @returns CSSProperties object with background styles
1714
+ *
1715
+ * @example
1716
+ * ```tsx
1717
+ * function MyComponent() {
1718
+ * const backgroundStyles = useGraphBackgroundStyles()
1719
+ *
1720
+ * return (
1721
+ * <div style={{ ...myStyles, ...backgroundStyles }}>
1722
+ * Content
1723
+ * </div>
1724
+ * )
1725
+ * }
1726
+ * ```
1727
+ */
1728
+ declare function useGraphBackgroundStyles(): CSSProperties;
1729
+ declare function GraphContainer({ children, height }: GraphContainerProps): react_jsx_runtime.JSX.Element;
1730
+ /**
1731
+ * GraphBackground - Empty background component (no dots)
1732
+ *
1733
+ * Usage: Place inside <ReactFlow> component
1734
+ */
1735
+ declare function GraphBackground(): null;
1736
+
1737
+ /**
1738
+ * GraphLegend - Legend panel for graph visualization
1739
+ *
1740
+ * Provides:
1741
+ * - Theme-aware styling using CSS variables
1742
+ * - Colored legend dots (for nodes) or lines (for edges)
1743
+ * - Flexible positioning
1744
+ */
1745
+ interface LegendItem {
1746
+ color: string;
1747
+ label: string;
1748
+ /** Use 'line' for edge legends, 'dot' (default) for node legends */
1749
+ type?: 'dot' | 'line';
1750
+ }
1751
+ interface GraphLegendProps {
1752
+ title?: string;
1753
+ items: LegendItem[];
1754
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1755
+ }
1756
+ /**
1757
+ * GraphLegend - Main legend component
1758
+ *
1759
+ * Renders a glassmorphism panel with colored legend items.
1760
+ * Can be positioned in any corner of the graph.
1761
+ */
1762
+ declare function GraphLegend({ title, items, position }: GraphLegendProps): react_jsx_runtime.JSX.Element;
1763
+
1764
+ /**
1765
+ * GraphFitViewButton - Custom fit view button for ReactFlow graphs
1766
+ *
1767
+ * Supports two variants:
1768
+ * - 'reactflow': Native ReactFlow button style
1769
+ * - 'mantine': Mantine ActionIcon with theme support
1770
+ */
1771
+ type FitViewButtonVariant = 'reactflow' | 'mantine';
1772
+ interface GraphFitViewButtonProps {
1773
+ padding?: number;
1774
+ variant?: FitViewButtonVariant;
1775
+ duration?: number;
1776
+ }
1777
+ /**
1778
+ * GraphFitViewButton - Custom fit view button for ReactFlow visualizers
1779
+ *
1780
+ * Usage:
1781
+ * ```tsx
1782
+ * <ReactFlow>
1783
+ * <GraphFitViewButton padding={0.15} variant="mantine" duration={300} />
1784
+ * </ReactFlow>
1785
+ * ```
1786
+ */
1787
+ declare function GraphFitViewButton({ padding, variant, duration }: GraphFitViewButtonProps): react_jsx_runtime.JSX.Element;
1788
+
1789
+ /**
1790
+ * GraphFitViewHandler - Programmatic fit view trigger component
1791
+ *
1792
+ * Used to trigger fitView after animations complete (e.g., Mantine Collapse).
1793
+ * Must be placed inside ReactFlow component.
1794
+ *
1795
+ * @example
1796
+ * ```tsx
1797
+ * const [fitViewTrigger, setFitViewTrigger] = useState(0)
1798
+ *
1799
+ * // When collapse expands, trigger fit view
1800
+ * const handleExpand = () => {
1801
+ * setExpanded(true)
1802
+ * setFitViewTrigger(prev => prev + 1)
1803
+ * }
1804
+ *
1805
+ * <ReactFlow>
1806
+ * <GraphFitViewHandler trigger={fitViewTrigger} />
1807
+ * </ReactFlow>
1808
+ * ```
1809
+ */
1810
+ interface GraphFitViewHandlerProps {
1811
+ /**
1812
+ * Trigger value - increment to trigger fitView
1813
+ * Must be > 0 to trigger
1814
+ */
1815
+ trigger?: number;
1816
+ /**
1817
+ * Padding around nodes when fitting view
1818
+ * @default 0.15
1819
+ */
1820
+ padding?: number;
1821
+ /**
1822
+ * Animation duration in milliseconds
1823
+ * @default 300
1824
+ */
1825
+ duration?: number;
1826
+ /**
1827
+ * Delay before triggering fitView (to wait for animations)
1828
+ * @default 250
1829
+ */
1830
+ delay?: number;
1831
+ }
1832
+ /**
1833
+ * Invisible component that triggers fitView when trigger value changes
1834
+ *
1835
+ * @param trigger - Increment this value to trigger fitView
1836
+ * @param padding - Padding around nodes (default: 0.15)
1837
+ * @param duration - Animation duration in ms (default: 300)
1838
+ * @param delay - Delay before triggering in ms (default: 250)
1839
+ */
1840
+ declare function GraphFitViewHandler({ trigger, padding, duration, delay }: GraphFitViewHandlerProps): null;
1841
+
1842
+ interface BaseNodeProps {
1843
+ children: ReactNode;
1844
+ color: NodeColorType;
1845
+ selected?: boolean;
1846
+ highlighted?: boolean;
1847
+ width?: number;
1848
+ className?: string;
1849
+ /** Handle layout direction: 'horizontal' (left/right) or 'vertical' (top/bottom) */
1850
+ handleDirection?: 'horizontal' | 'vertical';
1851
+ /** Whether to render the source (outgoing) handle. Default: true */
1852
+ showSourceHandle?: boolean;
1853
+ /** Whether to render the target (incoming) handle. Default: true */
1854
+ showTargetHandle?: boolean;
1855
+ }
1856
+ declare const BaseNode: react.NamedExoticComponent<BaseNodeProps>;
1857
+
1858
+ interface BaseEdgeProps {
1859
+ id: string;
1860
+ sourceX: number;
1861
+ sourceY: number;
1862
+ targetX: number;
1863
+ targetY: number;
1864
+ sourcePosition: EdgeProps['sourcePosition'];
1865
+ targetPosition: EdgeProps['targetPosition'];
1866
+ color: string;
1867
+ glowColor: string;
1868
+ label?: string;
1869
+ animated?: boolean;
1870
+ selected?: boolean;
1871
+ dimmed?: boolean;
1872
+ edgeIndex?: number;
1873
+ totalEdges?: number;
1874
+ }
1875
+ declare const BaseEdge: react.NamedExoticComponent<BaseEdgeProps>;
1876
+
1877
+ interface TaskCardProps {
1878
+ task: Task;
1879
+ onViewExecution?: (params: {
1880
+ resourceType: string;
1881
+ resourceId: string;
1882
+ executionId: string;
1883
+ }) => void;
1884
+ richTextRenderer?: (props: {
1885
+ content: string;
1886
+ onChange: (content: string) => void;
1887
+ placeholder?: string;
1888
+ }) => ReactNode;
1889
+ }
1890
+ declare function TaskCard({ task, onViewExecution, richTextRenderer }: TaskCardProps): react_jsx_runtime.JSX.Element;
1891
+
1892
+ interface ActionModalProps {
1893
+ action: ActionConfig;
1894
+ task: Task;
1895
+ opened: boolean;
1896
+ onClose: () => void;
1897
+ onSubmit: (payload: unknown, notes?: string) => void;
1898
+ richTextRenderer?: (props: {
1899
+ content: string;
1900
+ onChange: (content: string) => void;
1901
+ placeholder?: string;
1902
+ }) => ReactNode;
1903
+ error?: unknown;
1904
+ isPending?: boolean;
1905
+ }
1906
+ declare function ActionModal({ action, task, opened, onClose, onSubmit, richTextRenderer, error, isPending }: ActionModalProps): react_jsx_runtime.JSX.Element | null;
1907
+
1908
+ declare const iconMap: Record<string, typeof IconCheck>;
1909
+ /** Allowed icon names: IconCheck, IconX, IconRefresh, IconAlertTriangle, IconEdit, IconEye, IconRocket, IconMessageCircle, IconArrowUp, IconClock, IconFileText, IconSend, IconMail */
1910
+ declare function getIcon(iconName?: string): typeof IconCheck | null;
1911
+
1912
+ interface ContentSectionsProps {
1913
+ context: Record<string, unknown>;
1914
+ sections?: string[];
1915
+ titles?: Record<string, string>;
1916
+ }
1917
+ declare function ContentSections({ context, sections, titles }: ContentSectionsProps): react_jsx_runtime.JSX.Element;
1918
+
1919
+ interface ResourceDefinitionSectionProps {
1920
+ resourceDefinition: AIResourceDefinition;
1921
+ defaultExpanded?: boolean;
1922
+ }
1923
+ declare function ResourceDefinitionSection({ resourceDefinition, defaultExpanded }: ResourceDefinitionSectionProps): react_jsx_runtime.JSX.Element;
1924
+
1925
+ interface AgentDefinitionDisplayProps {
1926
+ agent: SerializedAgentDefinition;
1927
+ defaultExpanded?: boolean;
1928
+ }
1929
+ declare function AgentDefinitionDisplay({ agent, defaultExpanded }: AgentDefinitionDisplayProps): react_jsx_runtime.JSX.Element;
1930
+
1931
+ interface WorkflowDefinitionDisplayProps {
1932
+ workflow: SerializedWorkflowDefinition;
1933
+ defaultExpanded?: boolean;
1934
+ }
1935
+ declare function WorkflowDefinitionDisplay({ workflow, defaultExpanded }: WorkflowDefinitionDisplayProps): react_jsx_runtime.JSX.Element;
1936
+
1937
+ interface ContractDisplayProps {
1938
+ contract: {
1939
+ inputSchema: unknown;
1940
+ outputSchema?: unknown;
1941
+ };
1942
+ defaultExpanded?: boolean;
1943
+ }
1944
+ declare function ContractDisplay({ contract, defaultExpanded }: ContractDisplayProps): react_jsx_runtime.JSX.Element;
1945
+
1946
+ interface ConfigItem {
1947
+ label: string;
1948
+ value: ReactNode;
1949
+ mono?: boolean;
1950
+ }
1951
+ interface ConfigCardProps {
1952
+ icon: ReactNode;
1953
+ title: string;
1954
+ badge?: string;
1955
+ items: ConfigItem[];
1956
+ color?: string;
1957
+ }
1958
+ declare function ConfigCard({ icon, title, badge, items, color }: ConfigCardProps): react_jsx_runtime.JSX.Element | null;
1959
+
1960
+ interface ToolInfo {
1961
+ name: string;
1962
+ description?: string;
1963
+ }
1964
+ interface ToolsListDisplayProps {
1965
+ tools: Array<string | ToolInfo>;
1966
+ compact?: boolean;
1967
+ maxVisible?: number;
1968
+ }
1969
+ declare function ToolsListDisplay({ tools, compact, maxVisible }: ToolsListDisplayProps): react_jsx_runtime.JSX.Element;
1970
+
1971
+ interface CollapsibleJsonSectionProps {
1972
+ title: React.ReactNode;
1973
+ data: unknown;
1974
+ defaultExpanded?: boolean;
1975
+ }
1976
+ declare function CollapsibleJsonSection({ title, data, defaultExpanded }: CollapsibleJsonSectionProps): react_jsx_runtime.JSX.Element;
1977
+
1978
+ /**
1979
+ * Shared types for ResourceDefinition components
1980
+ */
1981
+ /** Serialized knowledge node from API response */
1982
+ interface SerializedKnowledgeNode {
1983
+ id: string;
1984
+ description: string;
1985
+ loaded: boolean;
1986
+ hasPrompt: boolean;
1987
+ [key: string]: unknown;
1988
+ }
1989
+ /** Serialized knowledge map from API response */
1990
+ interface SerializedKnowledgeMap {
1991
+ nodeCount: number;
1992
+ nodes: SerializedKnowledgeNode[];
1993
+ }
1994
+
1995
+ interface NewKnowledgeMapGraphProps {
1996
+ knowledgeMap: SerializedKnowledgeMap;
1997
+ agentName: string;
1998
+ compact?: boolean;
1999
+ fitViewTrigger?: number;
2000
+ }
2001
+ declare function NewKnowledgeMapGraph(props: NewKnowledgeMapGraphProps): react_jsx_runtime.JSX.Element;
2002
+
2003
+ interface KnowledgeMapNodeData {
2004
+ id: string;
2005
+ name: string;
2006
+ description: string;
2007
+ loaded: boolean;
2008
+ hasPrompt: boolean;
2009
+ isAgentNode: boolean;
2010
+ [key: string]: unknown;
2011
+ }
2012
+ interface KnowledgeMapEdgeData {
2013
+ [key: string]: unknown;
2014
+ }
2015
+ declare function useNewKnowledgeMapLayout(knowledgeMap: SerializedKnowledgeMap | undefined, agentName: string): {
2016
+ nodes: Node<KnowledgeMapNodeData>[];
2017
+ edges: Edge<KnowledgeMapEdgeData>[];
2018
+ };
2019
+
2020
+ type NewKnowledgeMapNodeProps = NodeProps<Node<KnowledgeMapNodeData>>;
2021
+ declare const NewKnowledgeMapNode: react.NamedExoticComponent<NewKnowledgeMapNodeProps>;
2022
+
2023
+ type NewKnowledgeMapEdgeProps = EdgeProps<Edge<KnowledgeMapEdgeData, string>>;
2024
+ declare const NewKnowledgeMapEdge: react.NamedExoticComponent<NewKnowledgeMapEdgeProps>;
2025
+
2026
+ declare const showInfoNotification: (message: string) => void;
2027
+ declare const showSuccessNotification: (message: string) => void;
2028
+ declare const showErrorNotification: (error: Error | string) => void;
2029
+ declare const showWarningNotification: (message: string) => void;
2030
+ /**
2031
+ * Show API error notification with type-safe error handling
2032
+ * Automatically extracts error code, message, and request ID
2033
+ *
2034
+ * @param error - Any error (APIClientError, Error, or unknown)
2035
+ *
2036
+ * @example
2037
+ * ```typescript
2038
+ * import { showApiErrorNotification } from '@repo/ui/utils'
2039
+ *
2040
+ * onError: (error) => {
2041
+ * showApiErrorNotification(error)
2042
+ * }
2043
+ * ```
2044
+ */
2045
+ declare const showApiErrorNotification: (error: unknown) => void;
2046
+
2047
+ export { APIErrorAlert, ActionModal, AgentDefinitionDisplay, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CONTAINER_CONSTANTS, CardHeader, CollapsibleJsonSection, CollapsibleSection, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContextViewer, ContractDisplay, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, EmptyVisualizer, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FilterBar, FormFieldRenderer, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, JsonViewer, ListSkeleton, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, PageNotFound, PageTitleCaption, ResourceCard, ResourceDefinitionSection, ResourceHealthChart, SHARED_VIZ_CONSTANTS, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TableSelectionToolbar, TaskCard, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, catalogItemToResourceDefinition, getGraphBackgroundStyles, getHealthColor, getIcon, iconMap, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout };
2048
+ export type { BaseEdgeProps, ContextViewerProps, ExecutionLogEntry, ExecutionLogsTableProps, FitViewButtonVariant, GraphFitViewHandlerProps, JsonViewerProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, NavigationButtonProps, SerializedKnowledgeMap, SerializedKnowledgeNode, StatCardProps, StyledMarkdownProps, TrendIndicatorProps };