@elevasis/ui 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +2 -2
- package/dist/{chunk-DMYELNGA.js → chunk-3HEUGBOT.js} +1 -1
- package/dist/{chunk-KVW56ERD.js → chunk-AXXTN44Z.js} +5 -3
- package/dist/{chunk-7GG6OSD7.js → chunk-B4FHWKEF.js} +3354 -2918
- package/dist/{chunk-XLZZOFGM.js → chunk-BSZRKBAW.js} +275 -76
- package/dist/{chunk-CZK67OHH.js → chunk-COG4ABRI.js} +3 -3
- package/dist/{chunk-S7RL77QS.js → chunk-DDZOHLHB.js} +1 -1
- package/dist/{chunk-I5WRKH25.js → chunk-GJ7EIABJ.js} +1 -1
- package/dist/{chunk-LQU62KHD.js → chunk-IBUYJXA3.js} +1209 -705
- package/dist/{chunk-EDX6WIN3.js → chunk-IOTLB6ND.js} +3 -3
- package/dist/{chunk-GBMNCNHX.js → chunk-KVJ3LFH2.js} +3 -1
- package/dist/{chunk-VQESMHQV.js → chunk-LJWV4TWV.js} +1 -2
- package/dist/{chunk-EGKNRM6P.js → chunk-LKVBEE63.js} +2 -2
- package/dist/{chunk-BJWIKEQG.js → chunk-LVJGPE6H.js} +6 -14
- package/dist/{chunk-TIIPYB2Z.js → chunk-QZJM3RYI.js} +1 -1
- package/dist/{chunk-7YQKVWSD.js → chunk-SQ5JGELM.js} +25 -5
- package/dist/{chunk-RX4UWZZR.js → chunk-TKAYX2SP.js} +8 -3
- package/dist/{chunk-ATEHYDL3.js → chunk-WWJ6S2HQ.js} +6 -2
- package/dist/{chunk-Q5HC6ENG.js → chunk-XOTJNW4Q.js} +1 -1
- package/dist/{chunk-ULZ2B3NC.js → chunk-ZBCTB5CA.js} +1 -1
- package/dist/components/index.css +85 -85
- package/dist/components/index.d.ts +1646 -1381
- package/dist/components/index.js +236 -30
- package/dist/components/navigation/index.css +589 -0
- package/dist/components/navigation/index.js +3 -3
- package/dist/features/auth/index.css +2 -2
- package/dist/features/auth/index.d.ts +184 -3
- package/dist/features/crm/index.css +2 -2
- package/dist/features/crm/index.d.ts +189 -3
- package/dist/features/crm/index.js +10 -10
- package/dist/features/dashboard/index.css +2 -2
- package/dist/features/dashboard/index.js +9 -9
- package/dist/features/delivery/index.css +85 -85
- package/dist/features/delivery/index.d.ts +189 -3
- package/dist/features/delivery/index.js +10 -10
- package/dist/features/lead-gen/index.css +2 -2
- package/dist/features/lead-gen/index.d.ts +5 -0
- package/dist/features/lead-gen/index.js +10 -10
- package/dist/features/monitoring/index.css +85 -85
- package/dist/features/monitoring/index.d.ts +6 -1
- package/dist/features/monitoring/index.js +11 -11
- package/dist/features/monitoring/requests/index.css +2 -2
- package/dist/features/monitoring/requests/index.d.ts +5 -0
- package/dist/features/monitoring/requests/index.js +9 -9
- package/dist/features/operations/index.css +2 -2
- package/dist/features/operations/index.d.ts +7 -4
- package/dist/features/operations/index.js +12 -12
- package/dist/features/seo/index.d.ts +5 -0
- package/dist/features/settings/index.css +2 -2
- package/dist/features/settings/index.d.ts +210 -9
- package/dist/features/settings/index.js +11 -11
- package/dist/graph/index.css +2 -2
- package/dist/hooks/delivery/index.css +2 -2
- package/dist/hooks/delivery/index.d.ts +184 -3
- package/dist/hooks/index.css +85 -85
- package/dist/hooks/index.d.ts +1815 -1515
- package/dist/hooks/index.js +8 -8
- package/dist/hooks/published.css +85 -85
- package/dist/hooks/published.d.ts +1815 -1515
- package/dist/hooks/published.js +8 -8
- package/dist/index.css +12 -12
- package/dist/index.d.ts +322 -16
- package/dist/index.js +9 -9
- package/dist/initialization/index.d.ts +184 -3
- package/dist/layout/index.js +2 -2
- package/dist/organization/index.css +589 -0
- package/dist/organization/index.js +1 -1
- package/dist/profile/index.d.ts +184 -3
- package/dist/provider/index.css +384 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/index.js +7 -7
- package/dist/provider/published.css +463 -0
- package/dist/provider/published.d.ts +6 -0
- package/dist/provider/published.js +4 -4
- package/dist/supabase/index.d.ts +359 -6
- package/dist/test-utils/index.d.ts +46 -2
- package/dist/test-utils/index.js +102 -1
- package/dist/theme/index.js +2 -2
- package/dist/types/index.d.ts +195 -6
- package/package.json +2 -2
- /package/dist/{chunk-6GUW5GGF.js → chunk-6Z3G4U2R.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { MantineSpacing, MantineColor, MantineLoaderComponent, BadgeProps } from '@mantine/core';
|
|
3
2
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, {
|
|
3
|
+
import React__default, { ReactNode, ComponentType, CSSProperties, ReactElement } from 'react';
|
|
4
|
+
import { MantineSpacing, MantineColor, MantineLoaderComponent, BadgeProps } from '@mantine/core';
|
|
5
5
|
import { Icon, IconCheck } from '@tabler/icons-react';
|
|
6
6
|
import { Components } from 'react-markdown';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -10,771 +10,383 @@ import { NodeProps, Node, EdgeProps, Edge } from '@xyflow/react';
|
|
|
10
10
|
export { default as graphStyles } from '../graph/Graph.module.css';
|
|
11
11
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
12
12
|
|
|
13
|
-
interface EmptyStateProps {
|
|
14
|
-
/** Icon component to display (e.g., IconKey from @tabler/icons-react) */
|
|
15
|
-
icon: ComponentType<{
|
|
16
|
-
size: number;
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
}>;
|
|
19
|
-
/** Main title text */
|
|
20
|
-
title: string;
|
|
21
|
-
/** Description text shown below title */
|
|
22
|
-
description?: string;
|
|
23
|
-
/** Optional action button */
|
|
24
|
-
action?: {
|
|
25
|
-
label: string;
|
|
26
|
-
onClick: () => void;
|
|
27
|
-
icon?: ReactNode;
|
|
28
|
-
};
|
|
29
|
-
/** Vertical padding - defaults to 'xl' */
|
|
30
|
-
py?: MantineSpacing;
|
|
31
|
-
}
|
|
32
13
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* Consolidates the Center + Stack + Icon + Text pattern used across:
|
|
36
|
-
* - ApiKeyList.tsx
|
|
37
|
-
* - CredentialList.tsx
|
|
38
|
-
* - Various other list components
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```tsx
|
|
42
|
-
* <EmptyState
|
|
43
|
-
* icon={IconKey}
|
|
44
|
-
* title="No API keys yet"
|
|
45
|
-
* description="Create your first API key to enable external integrations"
|
|
46
|
-
* action={{ label: "Create API Key", onClick: handleCreate }}
|
|
47
|
-
* />
|
|
48
|
-
* ```
|
|
14
|
+
* Workflow-specific logging types and utilities
|
|
49
15
|
*/
|
|
50
|
-
declare function EmptyState({ icon: Icon, title, description, action, py }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
51
16
|
|
|
52
|
-
interface
|
|
53
|
-
|
|
54
|
-
|
|
17
|
+
interface WorkflowExecutionContext {
|
|
18
|
+
type: 'workflow';
|
|
19
|
+
contextType: 'workflow-execution';
|
|
20
|
+
executionId: string;
|
|
21
|
+
workflowId: string;
|
|
22
|
+
workflowName?: string;
|
|
23
|
+
organizationId: string;
|
|
24
|
+
executionPath?: string[];
|
|
25
|
+
}
|
|
26
|
+
interface WorkflowFailureContext {
|
|
27
|
+
type: 'workflow';
|
|
28
|
+
contextType: 'workflow-failure';
|
|
29
|
+
executionId: string;
|
|
30
|
+
workflowId: string;
|
|
31
|
+
error: string;
|
|
32
|
+
}
|
|
33
|
+
interface StepStartedContext {
|
|
34
|
+
type: 'workflow';
|
|
35
|
+
contextType: 'step-started';
|
|
36
|
+
stepId: string;
|
|
37
|
+
stepStatus: 'started';
|
|
38
|
+
input: unknown;
|
|
39
|
+
startTime: number;
|
|
40
|
+
}
|
|
41
|
+
interface StepCompletedContext {
|
|
42
|
+
type: 'workflow';
|
|
43
|
+
contextType: 'step-completed';
|
|
44
|
+
stepId: string;
|
|
45
|
+
stepStatus: 'completed';
|
|
46
|
+
output: unknown;
|
|
47
|
+
duration: number;
|
|
48
|
+
isTerminal: boolean;
|
|
49
|
+
startTime: number;
|
|
50
|
+
endTime: number;
|
|
51
|
+
}
|
|
52
|
+
interface StepFailedContext {
|
|
53
|
+
type: 'workflow';
|
|
54
|
+
contextType: 'step-failed';
|
|
55
|
+
stepId: string;
|
|
56
|
+
stepStatus: 'failed';
|
|
57
|
+
error: string;
|
|
58
|
+
duration: number;
|
|
59
|
+
startTime: number;
|
|
60
|
+
endTime: number;
|
|
61
|
+
}
|
|
62
|
+
interface ConditionalRouteContext {
|
|
63
|
+
type: 'workflow';
|
|
64
|
+
contextType: 'conditional-route';
|
|
65
|
+
stepId: string;
|
|
66
|
+
target: string;
|
|
67
|
+
error?: string;
|
|
68
|
+
}
|
|
69
|
+
interface ExecutionPathContext {
|
|
70
|
+
type: 'workflow';
|
|
71
|
+
contextType: 'execution-path';
|
|
72
|
+
executionPath: string[];
|
|
73
|
+
}
|
|
74
|
+
type WorkflowLogContext = WorkflowExecutionContext | WorkflowFailureContext | StepStartedContext | StepCompletedContext | StepFailedContext | ConditionalRouteContext | ExecutionPathContext;
|
|
75
|
+
interface WorkflowLogMessage {
|
|
76
|
+
level: ExecutionLogLevel;
|
|
77
|
+
message: string;
|
|
78
|
+
timestamp: number;
|
|
79
|
+
context?: WorkflowLogContext;
|
|
55
80
|
}
|
|
81
|
+
|
|
56
82
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
83
|
+
* Agent-specific logging types
|
|
84
|
+
* Simplified 2-event model: lifecycle, iteration
|
|
85
|
+
*
|
|
86
|
+
* Design Philosophy:
|
|
87
|
+
* - LIFECYCLE EVENTS: Structural checkpoints (initialization, iteration, completion)
|
|
88
|
+
* - ITERATION EVENTS: Execution activities (reasoning, actions during iterations)
|
|
60
89
|
*/
|
|
61
|
-
declare function TabCountBadge({ count, isLoading }: TabCountBadgeProps): react_jsx_runtime.JSX.Element;
|
|
62
90
|
|
|
63
91
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
92
|
+
* Agent lifecycle stages
|
|
93
|
+
* Universal checkpoints that apply to all agent executions
|
|
66
94
|
*/
|
|
67
|
-
|
|
68
|
-
/** Current value */
|
|
69
|
-
current: number;
|
|
70
|
-
/** Previous value to compare against */
|
|
71
|
-
previous: number;
|
|
72
|
-
/** Optional formatter for the value (not used in display but kept for API compatibility) */
|
|
73
|
-
formatter?: (value: number) => string;
|
|
74
|
-
/** If true, negative change is considered positive (e.g., for costs) */
|
|
75
|
-
inverse?: boolean;
|
|
76
|
-
}
|
|
95
|
+
type AgentLifecycle = 'initialization' | 'iteration' | 'completion';
|
|
77
96
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* // Positive trend (green when going up)
|
|
82
|
-
* <TrendIndicator current={100} previous={80} />
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* // Inverse trend (green when going down, useful for costs)
|
|
86
|
-
* <TrendIndicator current={100} previous={120} inverse />
|
|
97
|
+
* Iteration event types
|
|
98
|
+
* Activities that occur during agent iterations
|
|
87
99
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
maxHeight?: number;
|
|
100
|
+
type IterationEventType = 'reasoning' | 'action' | 'tool-call';
|
|
101
|
+
/**
|
|
102
|
+
* Base fields shared by all lifecycle events
|
|
103
|
+
*/
|
|
104
|
+
interface AgentLifecycleEventBase {
|
|
105
|
+
type: 'agent';
|
|
106
|
+
agentId: string;
|
|
107
|
+
lifecycle: AgentLifecycle;
|
|
108
|
+
sessionId?: string;
|
|
98
109
|
}
|
|
99
110
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
111
|
+
* Lifecycle started event - emitted when a phase begins
|
|
112
|
+
* REQUIRED: startTime (phase has started, no end yet)
|
|
102
113
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
caption?: string;
|
|
108
|
-
rightSection?: ReactNode;
|
|
114
|
+
interface AgentLifecycleStartedEvent extends AgentLifecycleEventBase {
|
|
115
|
+
stage: 'started';
|
|
116
|
+
startTime: number;
|
|
117
|
+
iteration?: number;
|
|
109
118
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Lifecycle completed event - emitted when a phase succeeds
|
|
121
|
+
* REQUIRED: startTime, endTime, duration (phase has finished successfully)
|
|
122
|
+
*/
|
|
123
|
+
interface AgentLifecycleCompletedEvent extends AgentLifecycleEventBase {
|
|
124
|
+
stage: 'completed';
|
|
125
|
+
startTime: number;
|
|
126
|
+
endTime: number;
|
|
127
|
+
duration: number;
|
|
128
|
+
iteration?: number;
|
|
129
|
+
attempts?: number;
|
|
130
|
+
memorySize?: {
|
|
131
|
+
sessionMemoryKeys: number;
|
|
132
|
+
historyEntries: number;
|
|
133
|
+
};
|
|
119
134
|
}
|
|
120
135
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* Used across:
|
|
124
|
-
* - ExecutionHealthCard.tsx
|
|
125
|
-
* - CostMetricsCard.tsx
|
|
126
|
-
* - ThroughputCard.tsx
|
|
127
|
-
* - BusinessImpactCard.tsx
|
|
136
|
+
* Lifecycle failed event - emitted when a phase fails
|
|
137
|
+
* REQUIRED: startTime, endTime, duration, error (phase has finished with error)
|
|
128
138
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
interface AgentLifecycleFailedEvent extends AgentLifecycleEventBase {
|
|
140
|
+
stage: 'failed';
|
|
141
|
+
startTime: number;
|
|
142
|
+
endTime: number;
|
|
143
|
+
duration: number;
|
|
144
|
+
error: string;
|
|
145
|
+
iteration?: number;
|
|
135
146
|
}
|
|
136
147
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* Used across:
|
|
140
|
-
* - ApiKeyList.tsx
|
|
141
|
-
* - CredentialList.tsx
|
|
142
|
-
* - DeploymentList.tsx
|
|
143
|
-
* - WebhookEndpointList.tsx
|
|
148
|
+
* Union type for all lifecycle events
|
|
149
|
+
* Discriminated by 'stage' field for type narrowing
|
|
144
150
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
type AgentLifecycleEvent = AgentLifecycleStartedEvent | AgentLifecycleCompletedEvent | AgentLifecycleFailedEvent;
|
|
152
|
+
/**
|
|
153
|
+
* Placeholder data for MVP
|
|
154
|
+
* Will be typed per actionType in future
|
|
155
|
+
*/
|
|
156
|
+
interface ActionPlaceholderData {
|
|
157
|
+
message: string;
|
|
149
158
|
}
|
|
150
159
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* Used for cards like CostBreakdownCard
|
|
160
|
+
* Iteration event - captures activities during agent iterations
|
|
161
|
+
* Consolidates reasoning (LLM thought process) and actions (tool use, memory ops, etc.)
|
|
154
162
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
hasSubItems?: boolean;
|
|
169
|
-
/** Whether sub-items are expanded (controls chevron rotation) */
|
|
170
|
-
isExpanded?: boolean;
|
|
171
|
-
/** Whether the icon and text should be styled as active */
|
|
172
|
-
isActive?: boolean;
|
|
173
|
-
/** Whether the background should be styled as active */
|
|
174
|
-
hasActiveBackground?: boolean;
|
|
175
|
-
/** Click handler */
|
|
176
|
-
onClick?: () => void;
|
|
177
|
-
/** Additional styles for the button container */
|
|
178
|
-
style?: React__default.CSSProperties;
|
|
179
|
-
/** Custom transition duration in ms */
|
|
180
|
-
transitionDuration?: number;
|
|
163
|
+
interface AgentIterationEvent {
|
|
164
|
+
type: 'agent';
|
|
165
|
+
agentId: string;
|
|
166
|
+
lifecycle: 'iteration';
|
|
167
|
+
eventType: IterationEventType;
|
|
168
|
+
iteration: number;
|
|
169
|
+
sessionId?: string;
|
|
170
|
+
startTime: number;
|
|
171
|
+
endTime: number;
|
|
172
|
+
duration: number;
|
|
173
|
+
output?: string;
|
|
174
|
+
actionType?: string;
|
|
175
|
+
data?: ActionPlaceholderData;
|
|
181
176
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Tool call event - captures individual tool executions during iterations
|
|
179
|
+
* Provides granular timing for each tool invocation
|
|
180
|
+
*/
|
|
181
|
+
interface AgentToolCallEvent {
|
|
182
|
+
type: 'agent';
|
|
183
|
+
agentId: string;
|
|
184
|
+
lifecycle: 'iteration';
|
|
185
|
+
eventType: 'tool-call';
|
|
186
|
+
iteration: number;
|
|
187
|
+
sessionId?: string;
|
|
188
|
+
toolName: string;
|
|
189
|
+
startTime: number;
|
|
190
|
+
endTime: number;
|
|
191
|
+
duration: number;
|
|
192
|
+
success: boolean;
|
|
193
|
+
error?: string;
|
|
194
|
+
input?: Record<string, unknown>;
|
|
195
|
+
output?: unknown;
|
|
199
196
|
}
|
|
200
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Union type for all agent log contexts
|
|
199
|
+
* 3 event types total (lifecycle, iteration, tool-call)
|
|
200
|
+
*/
|
|
201
|
+
type AgentLogContext = AgentLifecycleEvent | AgentIterationEvent | AgentToolCallEvent;
|
|
201
202
|
|
|
202
|
-
interface APIErrorAlertProps {
|
|
203
|
-
/**
|
|
204
|
-
* The error to display. Can be an APIClientError, generic Error, or any unknown value.
|
|
205
|
-
*/
|
|
206
|
-
error: unknown;
|
|
207
|
-
/**
|
|
208
|
-
* Optional title override. If not provided, uses getErrorTitle() based on error code.
|
|
209
|
-
*/
|
|
210
|
-
title?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Whether to show the request ID (if available). Defaults to true.
|
|
213
|
-
*/
|
|
214
|
-
showRequestId?: boolean;
|
|
215
|
-
/**
|
|
216
|
-
* Optional custom icon. Defaults to IconAlertCircle.
|
|
217
|
-
*/
|
|
218
|
-
icon?: React.ReactNode;
|
|
219
|
-
/**
|
|
220
|
-
* Alert color. Defaults to 'red'.
|
|
221
|
-
*/
|
|
222
|
-
color?: string;
|
|
223
|
-
}
|
|
224
203
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* Automatically extracts error message, code, and request ID from APIClientError
|
|
228
|
-
* or falls back to generic Error handling.
|
|
229
|
-
*
|
|
230
|
-
* @example
|
|
231
|
-
* ```tsx
|
|
232
|
-
* const { data, error } = useQuery(...)
|
|
233
|
-
*
|
|
234
|
-
* if (error) {
|
|
235
|
-
* return <APIErrorAlert error={error} />
|
|
236
|
-
* }
|
|
237
|
-
* ```
|
|
238
|
-
*
|
|
239
|
-
* @example With custom title
|
|
240
|
-
* ```tsx
|
|
241
|
-
* <APIErrorAlert
|
|
242
|
-
* error={error}
|
|
243
|
-
* title="Failed to load resources"
|
|
244
|
-
* />
|
|
245
|
-
* ```
|
|
246
|
-
*
|
|
247
|
-
* @example Without request ID
|
|
248
|
-
* ```tsx
|
|
249
|
-
* <APIErrorAlert
|
|
250
|
-
* error={error}
|
|
251
|
-
* showRequestId={false}
|
|
252
|
-
* />
|
|
253
|
-
* ```
|
|
204
|
+
* Base execution logger for Execution Engine
|
|
254
205
|
*/
|
|
255
|
-
|
|
206
|
+
type ExecutionLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
256
207
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
py?: MantineSpacing;
|
|
208
|
+
type LogContext = WorkflowLogContext | AgentLogContext;
|
|
209
|
+
interface ExecutionLogMessage {
|
|
210
|
+
level: ExecutionLogLevel;
|
|
211
|
+
message: string;
|
|
212
|
+
timestamp: number;
|
|
213
|
+
context?: LogContext;
|
|
264
214
|
}
|
|
215
|
+
|
|
265
216
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* The caller is responsible for providing the container (e.g. `<Paper withBorder>`).
|
|
269
|
-
* This component only handles centering + rendering the error alert.
|
|
270
|
-
*
|
|
271
|
-
* @example
|
|
272
|
-
* ```tsx
|
|
273
|
-
* if (error) {
|
|
274
|
-
* return (
|
|
275
|
-
* <Paper withBorder>
|
|
276
|
-
* <CenteredErrorState error={error} title="Failed to load trends" />
|
|
277
|
-
* </Paper>
|
|
278
|
-
* )
|
|
279
|
-
* }
|
|
280
|
-
* ```
|
|
217
|
+
* Shared form field types for dynamic form generation
|
|
218
|
+
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
281
219
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Supported form field types for action payloads
|
|
222
|
+
* Maps to Mantine form components
|
|
223
|
+
*/
|
|
224
|
+
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
225
|
+
/**
|
|
226
|
+
* Form field definition
|
|
227
|
+
*/
|
|
228
|
+
interface FormField {
|
|
229
|
+
/** Field key in payload object */
|
|
230
|
+
name: string;
|
|
231
|
+
/** Field label for UI */
|
|
286
232
|
label: string;
|
|
287
|
-
/**
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
233
|
+
/** Field type (determines UI component) */
|
|
234
|
+
type: FormFieldType;
|
|
235
|
+
/** Default value */
|
|
236
|
+
defaultValue?: unknown;
|
|
237
|
+
/** Required field */
|
|
238
|
+
required?: boolean;
|
|
239
|
+
/** Placeholder text */
|
|
240
|
+
placeholder?: string;
|
|
241
|
+
/** Help text */
|
|
242
|
+
description?: string;
|
|
243
|
+
/** Options for select/radio */
|
|
244
|
+
options?: Array<{
|
|
245
|
+
label: string;
|
|
246
|
+
value: string | number;
|
|
247
|
+
}>;
|
|
248
|
+
/** Min/max for number */
|
|
249
|
+
min?: number;
|
|
250
|
+
max?: number;
|
|
251
|
+
/** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
|
|
252
|
+
defaultValueFromContext?: string;
|
|
300
253
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
|
|
309
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Form schema for action payload collection
|
|
256
|
+
*/
|
|
257
|
+
interface FormSchema {
|
|
258
|
+
/** Form title */
|
|
259
|
+
title?: string;
|
|
260
|
+
/** Form description */
|
|
261
|
+
description?: string;
|
|
262
|
+
/** Form fields */
|
|
263
|
+
fields: FormField[];
|
|
310
264
|
}
|
|
311
|
-
|
|
265
|
+
|
|
312
266
|
/**
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* Supports two variants:
|
|
316
|
-
* - `default`: Compact card with ThemeIcon (used in admin overviews)
|
|
317
|
-
* - `hero`: Glass card with glowing icon ring (used on dashboards)
|
|
318
|
-
*
|
|
319
|
-
* @example
|
|
320
|
-
* ```tsx
|
|
321
|
-
* // Default variant
|
|
322
|
-
* <StatCard label="Total Executions" value={150} icon={IconPlayerPlay} color="blue" />
|
|
267
|
+
* Serialized Registry Types
|
|
323
268
|
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
* ```
|
|
269
|
+
* Pre-computed JSON-safe types for API responses and Command View.
|
|
270
|
+
* Serialization happens once at API startup, enabling instant response times.
|
|
327
271
|
*/
|
|
328
|
-
|
|
272
|
+
|
|
329
273
|
/**
|
|
330
|
-
*
|
|
274
|
+
* Serialized form field for API responses
|
|
331
275
|
*/
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
276
|
+
interface SerializedFormField {
|
|
277
|
+
name: string;
|
|
278
|
+
label: string;
|
|
279
|
+
type: FormFieldType;
|
|
280
|
+
defaultValue?: unknown;
|
|
281
|
+
required?: boolean;
|
|
282
|
+
placeholder?: string;
|
|
283
|
+
description?: string;
|
|
284
|
+
options?: Array<{
|
|
285
|
+
label: string;
|
|
286
|
+
value: string | number;
|
|
287
|
+
}>;
|
|
288
|
+
min?: number;
|
|
289
|
+
max?: number;
|
|
343
290
|
}
|
|
344
291
|
/**
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* Features:
|
|
348
|
-
* - Colored headings using theme primary color
|
|
349
|
-
* - Syntax-highlighted code blocks (oneDark theme, no token backgrounds)
|
|
350
|
-
* - Styled inline code with Mantine Code component
|
|
351
|
-
* - Styled blockquotes with left border
|
|
352
|
-
* - Proper list styling
|
|
353
|
-
*
|
|
354
|
-
* @example
|
|
355
|
-
* ```tsx
|
|
356
|
-
* import { StyledMarkdown } from '@repo/ui'
|
|
357
|
-
*
|
|
358
|
-
* <StyledMarkdown>{markdownContent}</StyledMarkdown>
|
|
359
|
-
* ```
|
|
292
|
+
* Serialized form schema for API responses
|
|
360
293
|
*/
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
/** Maximum height with scroll (e.g., '300px'). If not set, expands to content */
|
|
367
|
-
maxHeight?: string | number;
|
|
368
|
-
/** Font size override */
|
|
369
|
-
fontSize?: string | number;
|
|
294
|
+
interface SerializedFormSchema {
|
|
295
|
+
title?: string;
|
|
296
|
+
description?: string;
|
|
297
|
+
fields: SerializedFormField[];
|
|
298
|
+
layout?: 'vertical' | 'horizontal' | 'grid';
|
|
370
299
|
}
|
|
371
300
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* @example
|
|
375
|
-
* ```tsx
|
|
376
|
-
* import { JsonViewer } from '@repo/ui'
|
|
377
|
-
*
|
|
378
|
-
* <JsonViewer data={{ foo: 'bar', count: 42 }} />
|
|
379
|
-
* <JsonViewer data={apiResponse} maxHeight={300} />
|
|
380
|
-
* ```
|
|
301
|
+
* Serialized execution form schema for API responses
|
|
381
302
|
*/
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
303
|
+
interface SerializedExecutionFormSchema extends SerializedFormSchema {
|
|
304
|
+
fieldMappings?: Record<string, string>;
|
|
305
|
+
submitButton?: {
|
|
306
|
+
label?: string;
|
|
307
|
+
loadingLabel?: string;
|
|
308
|
+
confirmMessage?: string;
|
|
309
|
+
};
|
|
387
310
|
}
|
|
388
311
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* - Strings → rendered as markdown (supports formatting, lists, tables)
|
|
392
|
-
* - Flat key-value objects → labeled field list
|
|
393
|
-
* - Nested objects → indented subsections with left border
|
|
394
|
-
* - Arrays → bulleted lists or bordered cards
|
|
395
|
-
* - null/undefined/boolean/number → inline text
|
|
396
|
-
*
|
|
397
|
-
* No display configuration needed — the component infers layout from data shape.
|
|
398
|
-
*/
|
|
399
|
-
declare function ContextViewer({ data }: ContextViewerProps): react_jsx_runtime.JSX.Element;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Workflow-specific logging types and utilities
|
|
312
|
+
* Serialized schedule config for API responses
|
|
403
313
|
*/
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
executionId: string;
|
|
409
|
-
workflowId: string;
|
|
410
|
-
workflowName?: string;
|
|
411
|
-
organizationId: string;
|
|
412
|
-
executionPath?: string[];
|
|
413
|
-
}
|
|
414
|
-
interface WorkflowFailureContext {
|
|
415
|
-
type: 'workflow';
|
|
416
|
-
contextType: 'workflow-failure';
|
|
417
|
-
executionId: string;
|
|
418
|
-
workflowId: string;
|
|
419
|
-
error: string;
|
|
420
|
-
}
|
|
421
|
-
interface StepStartedContext {
|
|
422
|
-
type: 'workflow';
|
|
423
|
-
contextType: 'step-started';
|
|
424
|
-
stepId: string;
|
|
425
|
-
stepStatus: 'started';
|
|
426
|
-
input: unknown;
|
|
427
|
-
startTime: number;
|
|
428
|
-
}
|
|
429
|
-
interface StepCompletedContext {
|
|
430
|
-
type: 'workflow';
|
|
431
|
-
contextType: 'step-completed';
|
|
432
|
-
stepId: string;
|
|
433
|
-
stepStatus: 'completed';
|
|
434
|
-
output: unknown;
|
|
435
|
-
duration: number;
|
|
436
|
-
isTerminal: boolean;
|
|
437
|
-
startTime: number;
|
|
438
|
-
endTime: number;
|
|
439
|
-
}
|
|
440
|
-
interface StepFailedContext {
|
|
441
|
-
type: 'workflow';
|
|
442
|
-
contextType: 'step-failed';
|
|
443
|
-
stepId: string;
|
|
444
|
-
stepStatus: 'failed';
|
|
445
|
-
error: string;
|
|
446
|
-
duration: number;
|
|
447
|
-
startTime: number;
|
|
448
|
-
endTime: number;
|
|
449
|
-
}
|
|
450
|
-
interface ConditionalRouteContext {
|
|
451
|
-
type: 'workflow';
|
|
452
|
-
contextType: 'conditional-route';
|
|
453
|
-
stepId: string;
|
|
454
|
-
target: string;
|
|
455
|
-
error?: string;
|
|
456
|
-
}
|
|
457
|
-
interface ExecutionPathContext {
|
|
458
|
-
type: 'workflow';
|
|
459
|
-
contextType: 'execution-path';
|
|
460
|
-
executionPath: string[];
|
|
461
|
-
}
|
|
462
|
-
type WorkflowLogContext = WorkflowExecutionContext | WorkflowFailureContext | StepStartedContext | StepCompletedContext | StepFailedContext | ConditionalRouteContext | ExecutionPathContext;
|
|
463
|
-
interface WorkflowLogMessage {
|
|
464
|
-
level: ExecutionLogLevel;
|
|
465
|
-
message: string;
|
|
466
|
-
timestamp: number;
|
|
467
|
-
context?: WorkflowLogContext;
|
|
314
|
+
interface SerializedScheduleConfig {
|
|
315
|
+
enabled: boolean;
|
|
316
|
+
defaultSchedule?: string;
|
|
317
|
+
allowedPatterns?: string[];
|
|
468
318
|
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Agent-specific logging types
|
|
472
|
-
* Simplified 2-event model: lifecycle, iteration
|
|
473
|
-
*
|
|
474
|
-
* Design Philosophy:
|
|
475
|
-
* - LIFECYCLE EVENTS: Structural checkpoints (initialization, iteration, completion)
|
|
476
|
-
* - ITERATION EVENTS: Execution activities (reasoning, actions during iterations)
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
319
|
/**
|
|
480
|
-
*
|
|
481
|
-
* Universal checkpoints that apply to all agent executions
|
|
482
|
-
*/
|
|
483
|
-
type AgentLifecycle = 'initialization' | 'iteration' | 'completion';
|
|
484
|
-
/**
|
|
485
|
-
* Iteration event types
|
|
486
|
-
* Activities that occur during agent iterations
|
|
487
|
-
*/
|
|
488
|
-
type IterationEventType = 'reasoning' | 'action' | 'tool-call';
|
|
489
|
-
/**
|
|
490
|
-
* Base fields shared by all lifecycle events
|
|
320
|
+
* Serialized webhook config for API responses
|
|
491
321
|
*/
|
|
492
|
-
interface
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
lifecycle: AgentLifecycle;
|
|
496
|
-
sessionId?: string;
|
|
322
|
+
interface SerializedWebhookConfig {
|
|
323
|
+
enabled: boolean;
|
|
324
|
+
payloadSchema?: unknown;
|
|
497
325
|
}
|
|
498
326
|
/**
|
|
499
|
-
*
|
|
500
|
-
* REQUIRED: startTime (phase has started, no end yet)
|
|
327
|
+
* Serialized execution interface for API responses
|
|
501
328
|
*/
|
|
502
|
-
interface
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
329
|
+
interface SerializedExecutionInterface {
|
|
330
|
+
form: SerializedExecutionFormSchema;
|
|
331
|
+
schedule?: SerializedScheduleConfig;
|
|
332
|
+
webhook?: SerializedWebhookConfig;
|
|
506
333
|
}
|
|
507
334
|
/**
|
|
508
|
-
*
|
|
509
|
-
*
|
|
335
|
+
* Serialized agent definition (JSON-safe)
|
|
336
|
+
* Result of serializeDefinition(AgentDefinition)
|
|
510
337
|
*/
|
|
511
|
-
interface
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
338
|
+
interface SerializedAgentDefinition {
|
|
339
|
+
config: {
|
|
340
|
+
resourceId: string;
|
|
341
|
+
name: string;
|
|
342
|
+
description: string;
|
|
343
|
+
version: string;
|
|
344
|
+
type: 'agent';
|
|
345
|
+
status: 'dev' | 'prod';
|
|
346
|
+
links?: ResourceLink[];
|
|
347
|
+
category?: ResourceCategory;
|
|
348
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
349
|
+
archived?: boolean;
|
|
350
|
+
systemPrompt: string;
|
|
351
|
+
constraints?: {
|
|
352
|
+
maxIterations?: number;
|
|
353
|
+
timeout?: number;
|
|
354
|
+
maxSessionMemoryKeys?: number;
|
|
355
|
+
maxMemoryTokens?: number;
|
|
356
|
+
};
|
|
357
|
+
sessionCapable?: boolean;
|
|
358
|
+
memoryPreferences?: string;
|
|
359
|
+
};
|
|
360
|
+
modelConfig: {
|
|
361
|
+
provider: string;
|
|
362
|
+
model: string;
|
|
363
|
+
apiKey: string;
|
|
364
|
+
temperature: number;
|
|
365
|
+
maxOutputTokens: number;
|
|
366
|
+
topP?: number;
|
|
367
|
+
modelOptions?: Record<string, unknown>;
|
|
368
|
+
};
|
|
369
|
+
contract: {
|
|
370
|
+
inputSchema: object;
|
|
371
|
+
outputSchema?: object;
|
|
372
|
+
};
|
|
373
|
+
tools: Array<{
|
|
374
|
+
name: string;
|
|
375
|
+
description: string;
|
|
376
|
+
inputSchema?: object;
|
|
377
|
+
outputSchema?: object;
|
|
378
|
+
}>;
|
|
379
|
+
knowledgeMap?: {
|
|
380
|
+
nodeCount: number;
|
|
381
|
+
nodes: Array<{
|
|
382
|
+
id: string;
|
|
383
|
+
description: string;
|
|
384
|
+
loaded: boolean;
|
|
385
|
+
hasPrompt: boolean;
|
|
386
|
+
}>;
|
|
521
387
|
};
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
* Lifecycle failed event - emitted when a phase fails
|
|
525
|
-
* REQUIRED: startTime, endTime, duration, error (phase has finished with error)
|
|
526
|
-
*/
|
|
527
|
-
interface AgentLifecycleFailedEvent extends AgentLifecycleEventBase {
|
|
528
|
-
stage: 'failed';
|
|
529
|
-
startTime: number;
|
|
530
|
-
endTime: number;
|
|
531
|
-
duration: number;
|
|
532
|
-
error: string;
|
|
533
|
-
iteration?: number;
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Union type for all lifecycle events
|
|
537
|
-
* Discriminated by 'stage' field for type narrowing
|
|
538
|
-
*/
|
|
539
|
-
type AgentLifecycleEvent = AgentLifecycleStartedEvent | AgentLifecycleCompletedEvent | AgentLifecycleFailedEvent;
|
|
540
|
-
/**
|
|
541
|
-
* Placeholder data for MVP
|
|
542
|
-
* Will be typed per actionType in future
|
|
543
|
-
*/
|
|
544
|
-
interface ActionPlaceholderData {
|
|
545
|
-
message: string;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Iteration event - captures activities during agent iterations
|
|
549
|
-
* Consolidates reasoning (LLM thought process) and actions (tool use, memory ops, etc.)
|
|
550
|
-
*/
|
|
551
|
-
interface AgentIterationEvent {
|
|
552
|
-
type: 'agent';
|
|
553
|
-
agentId: string;
|
|
554
|
-
lifecycle: 'iteration';
|
|
555
|
-
eventType: IterationEventType;
|
|
556
|
-
iteration: number;
|
|
557
|
-
sessionId?: string;
|
|
558
|
-
startTime: number;
|
|
559
|
-
endTime: number;
|
|
560
|
-
duration: number;
|
|
561
|
-
output?: string;
|
|
562
|
-
actionType?: string;
|
|
563
|
-
data?: ActionPlaceholderData;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Tool call event - captures individual tool executions during iterations
|
|
567
|
-
* Provides granular timing for each tool invocation
|
|
568
|
-
*/
|
|
569
|
-
interface AgentToolCallEvent {
|
|
570
|
-
type: 'agent';
|
|
571
|
-
agentId: string;
|
|
572
|
-
lifecycle: 'iteration';
|
|
573
|
-
eventType: 'tool-call';
|
|
574
|
-
iteration: number;
|
|
575
|
-
sessionId?: string;
|
|
576
|
-
toolName: string;
|
|
577
|
-
startTime: number;
|
|
578
|
-
endTime: number;
|
|
579
|
-
duration: number;
|
|
580
|
-
success: boolean;
|
|
581
|
-
error?: string;
|
|
582
|
-
input?: Record<string, unknown>;
|
|
583
|
-
output?: unknown;
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Union type for all agent log contexts
|
|
587
|
-
* 3 event types total (lifecycle, iteration, tool-call)
|
|
588
|
-
*/
|
|
589
|
-
type AgentLogContext = AgentLifecycleEvent | AgentIterationEvent | AgentToolCallEvent;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Base execution logger for Execution Engine
|
|
593
|
-
*/
|
|
594
|
-
type ExecutionLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
595
|
-
|
|
596
|
-
type LogContext = WorkflowLogContext | AgentLogContext;
|
|
597
|
-
interface ExecutionLogMessage {
|
|
598
|
-
level: ExecutionLogLevel;
|
|
599
|
-
message: string;
|
|
600
|
-
timestamp: number;
|
|
601
|
-
context?: LogContext;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Shared form field types for dynamic form generation
|
|
606
|
-
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
607
|
-
*/
|
|
608
|
-
/**
|
|
609
|
-
* Supported form field types for action payloads
|
|
610
|
-
* Maps to Mantine form components
|
|
611
|
-
*/
|
|
612
|
-
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
613
|
-
/**
|
|
614
|
-
* Form field definition
|
|
615
|
-
*/
|
|
616
|
-
interface FormField {
|
|
617
|
-
/** Field key in payload object */
|
|
618
|
-
name: string;
|
|
619
|
-
/** Field label for UI */
|
|
620
|
-
label: string;
|
|
621
|
-
/** Field type (determines UI component) */
|
|
622
|
-
type: FormFieldType;
|
|
623
|
-
/** Default value */
|
|
624
|
-
defaultValue?: unknown;
|
|
625
|
-
/** Required field */
|
|
626
|
-
required?: boolean;
|
|
627
|
-
/** Placeholder text */
|
|
628
|
-
placeholder?: string;
|
|
629
|
-
/** Help text */
|
|
630
|
-
description?: string;
|
|
631
|
-
/** Options for select/radio */
|
|
632
|
-
options?: Array<{
|
|
633
|
-
label: string;
|
|
634
|
-
value: string | number;
|
|
635
|
-
}>;
|
|
636
|
-
/** Min/max for number */
|
|
637
|
-
min?: number;
|
|
638
|
-
max?: number;
|
|
639
|
-
/** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
|
|
640
|
-
defaultValueFromContext?: string;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Form schema for action payload collection
|
|
644
|
-
*/
|
|
645
|
-
interface FormSchema {
|
|
646
|
-
/** Form title */
|
|
647
|
-
title?: string;
|
|
648
|
-
/** Form description */
|
|
649
|
-
description?: string;
|
|
650
|
-
/** Form fields */
|
|
651
|
-
fields: FormField[];
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* Serialized Registry Types
|
|
656
|
-
*
|
|
657
|
-
* Pre-computed JSON-safe types for API responses and Command View.
|
|
658
|
-
* Serialization happens once at API startup, enabling instant response times.
|
|
659
|
-
*/
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Serialized form field for API responses
|
|
663
|
-
*/
|
|
664
|
-
interface SerializedFormField {
|
|
665
|
-
name: string;
|
|
666
|
-
label: string;
|
|
667
|
-
type: FormFieldType;
|
|
668
|
-
defaultValue?: unknown;
|
|
669
|
-
required?: boolean;
|
|
670
|
-
placeholder?: string;
|
|
671
|
-
description?: string;
|
|
672
|
-
options?: Array<{
|
|
673
|
-
label: string;
|
|
674
|
-
value: string | number;
|
|
675
|
-
}>;
|
|
676
|
-
min?: number;
|
|
677
|
-
max?: number;
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* Serialized form schema for API responses
|
|
681
|
-
*/
|
|
682
|
-
interface SerializedFormSchema {
|
|
683
|
-
title?: string;
|
|
684
|
-
description?: string;
|
|
685
|
-
fields: SerializedFormField[];
|
|
686
|
-
layout?: 'vertical' | 'horizontal' | 'grid';
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* Serialized execution form schema for API responses
|
|
690
|
-
*/
|
|
691
|
-
interface SerializedExecutionFormSchema extends SerializedFormSchema {
|
|
692
|
-
fieldMappings?: Record<string, string>;
|
|
693
|
-
submitButton?: {
|
|
694
|
-
label?: string;
|
|
695
|
-
loadingLabel?: string;
|
|
696
|
-
confirmMessage?: string;
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Serialized schedule config for API responses
|
|
701
|
-
*/
|
|
702
|
-
interface SerializedScheduleConfig {
|
|
703
|
-
enabled: boolean;
|
|
704
|
-
defaultSchedule?: string;
|
|
705
|
-
allowedPatterns?: string[];
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* Serialized webhook config for API responses
|
|
709
|
-
*/
|
|
710
|
-
interface SerializedWebhookConfig {
|
|
711
|
-
enabled: boolean;
|
|
712
|
-
payloadSchema?: unknown;
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* Serialized execution interface for API responses
|
|
716
|
-
*/
|
|
717
|
-
interface SerializedExecutionInterface {
|
|
718
|
-
form: SerializedExecutionFormSchema;
|
|
719
|
-
schedule?: SerializedScheduleConfig;
|
|
720
|
-
webhook?: SerializedWebhookConfig;
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* Serialized agent definition (JSON-safe)
|
|
724
|
-
* Result of serializeDefinition(AgentDefinition)
|
|
725
|
-
*/
|
|
726
|
-
interface SerializedAgentDefinition {
|
|
727
|
-
config: {
|
|
728
|
-
resourceId: string;
|
|
729
|
-
name: string;
|
|
730
|
-
description: string;
|
|
731
|
-
version: string;
|
|
732
|
-
type: 'agent';
|
|
733
|
-
status: 'dev' | 'prod';
|
|
734
|
-
links?: ResourceLink[];
|
|
735
|
-
category?: ResourceCategory;
|
|
736
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
737
|
-
archived?: boolean;
|
|
738
|
-
systemPrompt: string;
|
|
739
|
-
constraints?: {
|
|
740
|
-
maxIterations?: number;
|
|
741
|
-
timeout?: number;
|
|
742
|
-
maxSessionMemoryKeys?: number;
|
|
743
|
-
maxMemoryTokens?: number;
|
|
744
|
-
};
|
|
745
|
-
sessionCapable?: boolean;
|
|
746
|
-
memoryPreferences?: string;
|
|
747
|
-
};
|
|
748
|
-
modelConfig: {
|
|
749
|
-
provider: string;
|
|
750
|
-
model: string;
|
|
751
|
-
apiKey: string;
|
|
752
|
-
temperature: number;
|
|
753
|
-
maxOutputTokens: number;
|
|
754
|
-
topP?: number;
|
|
755
|
-
modelOptions?: Record<string, unknown>;
|
|
756
|
-
};
|
|
757
|
-
contract: {
|
|
758
|
-
inputSchema: object;
|
|
759
|
-
outputSchema?: object;
|
|
760
|
-
};
|
|
761
|
-
tools: Array<{
|
|
762
|
-
name: string;
|
|
763
|
-
description: string;
|
|
764
|
-
inputSchema?: object;
|
|
765
|
-
outputSchema?: object;
|
|
766
|
-
}>;
|
|
767
|
-
knowledgeMap?: {
|
|
768
|
-
nodeCount: number;
|
|
769
|
-
nodes: Array<{
|
|
770
|
-
id: string;
|
|
771
|
-
description: string;
|
|
772
|
-
loaded: boolean;
|
|
773
|
-
hasPrompt: boolean;
|
|
774
|
-
}>;
|
|
775
|
-
};
|
|
776
|
-
metricsConfig?: object;
|
|
777
|
-
interface?: SerializedExecutionInterface;
|
|
388
|
+
metricsConfig?: object;
|
|
389
|
+
interface?: SerializedExecutionInterface;
|
|
778
390
|
}
|
|
779
391
|
/**
|
|
780
392
|
* Serialized workflow definition (JSON-safe)
|
|
@@ -2555,6 +2167,7 @@ type Database = {
|
|
|
2555
2167
|
Row: {
|
|
2556
2168
|
config: Json;
|
|
2557
2169
|
created_at: string | null;
|
|
2170
|
+
effective_permissions: string[];
|
|
2558
2171
|
id: string;
|
|
2559
2172
|
membership_status: string | null;
|
|
2560
2173
|
organization_id: string;
|
|
@@ -2566,6 +2179,7 @@ type Database = {
|
|
|
2566
2179
|
Insert: {
|
|
2567
2180
|
config?: Json;
|
|
2568
2181
|
created_at?: string | null;
|
|
2182
|
+
effective_permissions?: string[];
|
|
2569
2183
|
id?: string;
|
|
2570
2184
|
membership_status?: string | null;
|
|
2571
2185
|
organization_id: string;
|
|
@@ -2577,6 +2191,7 @@ type Database = {
|
|
|
2577
2191
|
Update: {
|
|
2578
2192
|
config?: Json;
|
|
2579
2193
|
created_at?: string | null;
|
|
2194
|
+
effective_permissions?: string[];
|
|
2580
2195
|
id?: string;
|
|
2581
2196
|
membership_status?: string | null;
|
|
2582
2197
|
organization_id?: string;
|
|
@@ -2602,6 +2217,147 @@ type Database = {
|
|
|
2602
2217
|
}
|
|
2603
2218
|
];
|
|
2604
2219
|
};
|
|
2220
|
+
org_rol_assignments: {
|
|
2221
|
+
Row: {
|
|
2222
|
+
granted_at: string;
|
|
2223
|
+
granted_by: string | null;
|
|
2224
|
+
membership_id: string;
|
|
2225
|
+
role_id: string;
|
|
2226
|
+
};
|
|
2227
|
+
Insert: {
|
|
2228
|
+
granted_at?: string;
|
|
2229
|
+
granted_by?: string | null;
|
|
2230
|
+
membership_id: string;
|
|
2231
|
+
role_id: string;
|
|
2232
|
+
};
|
|
2233
|
+
Update: {
|
|
2234
|
+
granted_at?: string;
|
|
2235
|
+
granted_by?: string | null;
|
|
2236
|
+
membership_id?: string;
|
|
2237
|
+
role_id?: string;
|
|
2238
|
+
};
|
|
2239
|
+
Relationships: [
|
|
2240
|
+
{
|
|
2241
|
+
foreignKeyName: "org_rol_assignments_granted_by_fkey";
|
|
2242
|
+
columns: ["granted_by"];
|
|
2243
|
+
isOneToOne: false;
|
|
2244
|
+
referencedRelation: "users";
|
|
2245
|
+
referencedColumns: ["id"];
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
foreignKeyName: "org_rol_assignments_membership_id_fkey";
|
|
2249
|
+
columns: ["membership_id"];
|
|
2250
|
+
isOneToOne: false;
|
|
2251
|
+
referencedRelation: "org_memberships";
|
|
2252
|
+
referencedColumns: ["id"];
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
foreignKeyName: "org_rol_assignments_role_id_fkey";
|
|
2256
|
+
columns: ["role_id"];
|
|
2257
|
+
isOneToOne: false;
|
|
2258
|
+
referencedRelation: "org_rol_definitions";
|
|
2259
|
+
referencedColumns: ["id"];
|
|
2260
|
+
}
|
|
2261
|
+
];
|
|
2262
|
+
};
|
|
2263
|
+
org_rol_definitions: {
|
|
2264
|
+
Row: {
|
|
2265
|
+
created_at: string;
|
|
2266
|
+
description: string | null;
|
|
2267
|
+
id: string;
|
|
2268
|
+
is_system: boolean;
|
|
2269
|
+
name: string;
|
|
2270
|
+
organization_id: string | null;
|
|
2271
|
+
slug: string;
|
|
2272
|
+
updated_at: string;
|
|
2273
|
+
};
|
|
2274
|
+
Insert: {
|
|
2275
|
+
created_at?: string;
|
|
2276
|
+
description?: string | null;
|
|
2277
|
+
id?: string;
|
|
2278
|
+
is_system?: boolean;
|
|
2279
|
+
name: string;
|
|
2280
|
+
organization_id?: string | null;
|
|
2281
|
+
slug: string;
|
|
2282
|
+
updated_at?: string;
|
|
2283
|
+
};
|
|
2284
|
+
Update: {
|
|
2285
|
+
created_at?: string;
|
|
2286
|
+
description?: string | null;
|
|
2287
|
+
id?: string;
|
|
2288
|
+
is_system?: boolean;
|
|
2289
|
+
name?: string;
|
|
2290
|
+
organization_id?: string | null;
|
|
2291
|
+
slug?: string;
|
|
2292
|
+
updated_at?: string;
|
|
2293
|
+
};
|
|
2294
|
+
Relationships: [
|
|
2295
|
+
{
|
|
2296
|
+
foreignKeyName: "org_rol_definitions_organization_id_fkey";
|
|
2297
|
+
columns: ["organization_id"];
|
|
2298
|
+
isOneToOne: false;
|
|
2299
|
+
referencedRelation: "organizations";
|
|
2300
|
+
referencedColumns: ["id"];
|
|
2301
|
+
}
|
|
2302
|
+
];
|
|
2303
|
+
};
|
|
2304
|
+
org_rol_grants: {
|
|
2305
|
+
Row: {
|
|
2306
|
+
granted_at: string;
|
|
2307
|
+
permission_key: string;
|
|
2308
|
+
role_id: string;
|
|
2309
|
+
};
|
|
2310
|
+
Insert: {
|
|
2311
|
+
granted_at?: string;
|
|
2312
|
+
permission_key: string;
|
|
2313
|
+
role_id: string;
|
|
2314
|
+
};
|
|
2315
|
+
Update: {
|
|
2316
|
+
granted_at?: string;
|
|
2317
|
+
permission_key?: string;
|
|
2318
|
+
role_id?: string;
|
|
2319
|
+
};
|
|
2320
|
+
Relationships: [
|
|
2321
|
+
{
|
|
2322
|
+
foreignKeyName: "org_rol_grants_permission_key_fkey";
|
|
2323
|
+
columns: ["permission_key"];
|
|
2324
|
+
isOneToOne: false;
|
|
2325
|
+
referencedRelation: "org_rol_permissions";
|
|
2326
|
+
referencedColumns: ["key"];
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
foreignKeyName: "org_rol_grants_role_id_fkey";
|
|
2330
|
+
columns: ["role_id"];
|
|
2331
|
+
isOneToOne: false;
|
|
2332
|
+
referencedRelation: "org_rol_definitions";
|
|
2333
|
+
referencedColumns: ["id"];
|
|
2334
|
+
}
|
|
2335
|
+
];
|
|
2336
|
+
};
|
|
2337
|
+
org_rol_permissions: {
|
|
2338
|
+
Row: {
|
|
2339
|
+
created_at: string;
|
|
2340
|
+
description: string;
|
|
2341
|
+
is_org_grantable: boolean;
|
|
2342
|
+
key: string;
|
|
2343
|
+
updated_at: string;
|
|
2344
|
+
};
|
|
2345
|
+
Insert: {
|
|
2346
|
+
created_at?: string;
|
|
2347
|
+
description: string;
|
|
2348
|
+
is_org_grantable?: boolean;
|
|
2349
|
+
key: string;
|
|
2350
|
+
updated_at?: string;
|
|
2351
|
+
};
|
|
2352
|
+
Update: {
|
|
2353
|
+
created_at?: string;
|
|
2354
|
+
description?: string;
|
|
2355
|
+
is_org_grantable?: boolean;
|
|
2356
|
+
key?: string;
|
|
2357
|
+
updated_at?: string;
|
|
2358
|
+
};
|
|
2359
|
+
Relationships: [];
|
|
2360
|
+
};
|
|
2605
2361
|
organizations: {
|
|
2606
2362
|
Row: {
|
|
2607
2363
|
config: Json;
|
|
@@ -3359,7 +3115,8 @@ type Database = {
|
|
|
3359
3115
|
created_at: string;
|
|
3360
3116
|
description: string | null;
|
|
3361
3117
|
id: string;
|
|
3362
|
-
|
|
3118
|
+
key_hash: string;
|
|
3119
|
+
key_prefix: string | null;
|
|
3363
3120
|
last_triggered_at: string | null;
|
|
3364
3121
|
name: string;
|
|
3365
3122
|
organization_id: string;
|
|
@@ -3372,7 +3129,8 @@ type Database = {
|
|
|
3372
3129
|
created_at?: string;
|
|
3373
3130
|
description?: string | null;
|
|
3374
3131
|
id?: string;
|
|
3375
|
-
|
|
3132
|
+
key_hash: string;
|
|
3133
|
+
key_prefix?: string | null;
|
|
3376
3134
|
last_triggered_at?: string | null;
|
|
3377
3135
|
name: string;
|
|
3378
3136
|
organization_id: string;
|
|
@@ -3385,7 +3143,8 @@ type Database = {
|
|
|
3385
3143
|
created_at?: string;
|
|
3386
3144
|
description?: string | null;
|
|
3387
3145
|
id?: string;
|
|
3388
|
-
|
|
3146
|
+
key_hash?: string;
|
|
3147
|
+
key_prefix?: string | null;
|
|
3389
3148
|
last_triggered_at?: string | null;
|
|
3390
3149
|
name?: string;
|
|
3391
3150
|
organization_id?: string;
|
|
@@ -3431,6 +3190,13 @@ type Database = {
|
|
|
3431
3190
|
Args: never;
|
|
3432
3191
|
Returns: string;
|
|
3433
3192
|
};
|
|
3193
|
+
can_assign_role_in_org: {
|
|
3194
|
+
Args: {
|
|
3195
|
+
p_role_id: string;
|
|
3196
|
+
p_target_membership_id: string;
|
|
3197
|
+
};
|
|
3198
|
+
Returns: boolean;
|
|
3199
|
+
};
|
|
3434
3200
|
current_user_is_platform_admin: {
|
|
3435
3201
|
Args: never;
|
|
3436
3202
|
Returns: boolean;
|
|
@@ -3460,6 +3226,10 @@ type Database = {
|
|
|
3460
3226
|
user_id: string;
|
|
3461
3227
|
}[];
|
|
3462
3228
|
};
|
|
3229
|
+
get_platform_credential_kek: {
|
|
3230
|
+
Args: never;
|
|
3231
|
+
Returns: string;
|
|
3232
|
+
};
|
|
3463
3233
|
get_storage_org_id: {
|
|
3464
3234
|
Args: {
|
|
3465
3235
|
file_path: string;
|
|
@@ -3470,6 +3240,13 @@ type Database = {
|
|
|
3470
3240
|
Args: never;
|
|
3471
3241
|
Returns: string;
|
|
3472
3242
|
};
|
|
3243
|
+
has_org_permission: {
|
|
3244
|
+
Args: {
|
|
3245
|
+
org_id: string;
|
|
3246
|
+
perm_key: string;
|
|
3247
|
+
};
|
|
3248
|
+
Returns: boolean;
|
|
3249
|
+
};
|
|
3473
3250
|
is_org_admin: {
|
|
3474
3251
|
Args: {
|
|
3475
3252
|
org_id: string;
|
|
@@ -3502,6 +3279,22 @@ type Database = {
|
|
|
3502
3279
|
Args: never;
|
|
3503
3280
|
Returns: Json;
|
|
3504
3281
|
};
|
|
3282
|
+
recompute_all_memberships: {
|
|
3283
|
+
Args: never;
|
|
3284
|
+
Returns: undefined;
|
|
3285
|
+
};
|
|
3286
|
+
sync_all_memberships_with_role: {
|
|
3287
|
+
Args: {
|
|
3288
|
+
p_role_id: string;
|
|
3289
|
+
};
|
|
3290
|
+
Returns: undefined;
|
|
3291
|
+
};
|
|
3292
|
+
sync_one_membership: {
|
|
3293
|
+
Args: {
|
|
3294
|
+
p_membership_id: string;
|
|
3295
|
+
};
|
|
3296
|
+
Returns: undefined;
|
|
3297
|
+
};
|
|
3505
3298
|
upsert_user_profile: {
|
|
3506
3299
|
Args: never;
|
|
3507
3300
|
Returns: {
|
|
@@ -3555,787 +3348,1253 @@ interface SubActivity {
|
|
|
3555
3348
|
details: AgentIterationEvent | AgentToolCallEvent;
|
|
3556
3349
|
}
|
|
3557
3350
|
/**
|
|
3558
|
-
* Agent iteration state
|
|
3559
|
-
* Aggregates lifecycle events and sub-activities for a single iteration
|
|
3351
|
+
* Agent iteration state
|
|
3352
|
+
* Aggregates lifecycle events and sub-activities for a single iteration
|
|
3353
|
+
*/
|
|
3354
|
+
interface AgentIteration {
|
|
3355
|
+
iterationNumber: number;
|
|
3356
|
+
status: 'running' | 'completed' | 'failed' | 'pending';
|
|
3357
|
+
iterationEvents: AgentIterationEvent[];
|
|
3358
|
+
duration?: number;
|
|
3359
|
+
timestamp: number;
|
|
3360
|
+
subActivities: SubActivity[];
|
|
3361
|
+
startTime?: number;
|
|
3362
|
+
endTime?: number;
|
|
3363
|
+
}
|
|
3364
|
+
/**
|
|
3365
|
+
* Agent lifecycle node state
|
|
3366
|
+
* Represents initialization or completion phase
|
|
3367
|
+
*/
|
|
3368
|
+
interface AgentLifecycleNode {
|
|
3369
|
+
type: 'initialization' | 'completion';
|
|
3370
|
+
status: 'running' | 'completed' | 'failed' | 'pending';
|
|
3371
|
+
duration?: number;
|
|
3372
|
+
timestamp?: number;
|
|
3373
|
+
startTime?: number;
|
|
3374
|
+
endTime?: number;
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Complete agent execution data for timeline visualization
|
|
3378
|
+
* Parsed from execution logs
|
|
3379
|
+
*/
|
|
3380
|
+
interface AgentIterationData {
|
|
3381
|
+
initialization: AgentLifecycleNode;
|
|
3382
|
+
iterations: AgentIteration[];
|
|
3383
|
+
completion: AgentLifecycleNode;
|
|
3384
|
+
currentIteration: number | null;
|
|
3385
|
+
totalIterations: number;
|
|
3386
|
+
totalDuration?: number;
|
|
3387
|
+
status: 'running' | 'completed' | 'failed' | 'warning';
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
/** Raw database row type for acq_deals table */
|
|
3391
|
+
type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
|
|
3392
|
+
type DealStage = 'interested' | 'proposal' | 'closing' | 'closed_won' | 'closed_lost' | 'nurturing';
|
|
3393
|
+
interface KanbanStageConfig {
|
|
3394
|
+
color: string;
|
|
3395
|
+
label?: string;
|
|
3396
|
+
}
|
|
3397
|
+
type KanbanBoardConfig = Partial<Record<DealStage, KanbanStageConfig>>;
|
|
3398
|
+
interface DealContact {
|
|
3399
|
+
id: string;
|
|
3400
|
+
first_name: string | null;
|
|
3401
|
+
last_name: string | null;
|
|
3402
|
+
email: string;
|
|
3403
|
+
title: string | null;
|
|
3404
|
+
headline: string | null;
|
|
3405
|
+
linkedin_url: string | null;
|
|
3406
|
+
pipeline_status: Record<string, unknown> | null;
|
|
3407
|
+
enrichment_data: Record<string, unknown> | null;
|
|
3408
|
+
company: {
|
|
3409
|
+
id: string;
|
|
3410
|
+
name: string;
|
|
3411
|
+
domain: string | null;
|
|
3412
|
+
website: string | null;
|
|
3413
|
+
linkedin_url: string | null;
|
|
3414
|
+
segment: string | null;
|
|
3415
|
+
category: string | null;
|
|
3416
|
+
num_employees: number | null;
|
|
3417
|
+
} | null;
|
|
3418
|
+
}
|
|
3419
|
+
interface DealFilters {
|
|
3420
|
+
stage?: DealStage;
|
|
3421
|
+
search?: string;
|
|
3422
|
+
limit?: number;
|
|
3423
|
+
offset?: number;
|
|
3424
|
+
}
|
|
3425
|
+
/** Deal list item with joined contact and company data */
|
|
3426
|
+
interface DealListItem extends AcqDealRow {
|
|
3427
|
+
contact: DealContact | null;
|
|
3428
|
+
}
|
|
3429
|
+
type DealDetail = DealListItem;
|
|
3430
|
+
|
|
3431
|
+
/**
|
|
3432
|
+
* Action configuration for HITL tasks
|
|
3433
|
+
* Defines available user actions and their behavior
|
|
3434
|
+
*/
|
|
3435
|
+
interface ActionConfig {
|
|
3436
|
+
/** Unique action identifier (e.g., 'approve', 'retry', 'escalate') */
|
|
3437
|
+
id: string;
|
|
3438
|
+
/** Display label for UI button */
|
|
3439
|
+
label: string;
|
|
3440
|
+
/** Button variant/style */
|
|
3441
|
+
type: 'primary' | 'secondary' | 'danger' | 'outline';
|
|
3442
|
+
/** Tabler icon name (e.g., 'IconCheck', 'IconRefresh') */
|
|
3443
|
+
icon?: string;
|
|
3444
|
+
/** Button color (Mantine theme colors) */
|
|
3445
|
+
color?: string;
|
|
3446
|
+
/** Button variant (Mantine button variant, e.g., 'light', 'filled', 'outline') */
|
|
3447
|
+
variant?: string;
|
|
3448
|
+
/** Execution target (agent/workflow to invoke) */
|
|
3449
|
+
target?: {
|
|
3450
|
+
resourceType: 'agent' | 'workflow';
|
|
3451
|
+
resourceId: string;
|
|
3452
|
+
/**
|
|
3453
|
+
* Optional session ID for agent continuation.
|
|
3454
|
+
* If provided, invokes a new turn on the existing session instead of standalone execution.
|
|
3455
|
+
* Only valid when resourceType is 'agent'.
|
|
3456
|
+
*/
|
|
3457
|
+
sessionId?: string;
|
|
3458
|
+
};
|
|
3459
|
+
/** Form schema for collecting action-specific data */
|
|
3460
|
+
form?: FormSchema;
|
|
3461
|
+
/** Payload template for pre-filling forms */
|
|
3462
|
+
payloadTemplate?: unknown;
|
|
3463
|
+
/** Requires confirmation dialog */
|
|
3464
|
+
requiresConfirmation?: boolean;
|
|
3465
|
+
/** Confirmation message */
|
|
3466
|
+
confirmationMessage?: string;
|
|
3467
|
+
/** Help text / tooltip */
|
|
3468
|
+
description?: string;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* Origin resource type - where an execution/task originated from.
|
|
3473
|
+
* Used for audit trails and tracking execution lineage.
|
|
3474
|
+
*/
|
|
3475
|
+
type OriginResourceType = 'agent' | 'workflow' | 'scheduler' | 'api';
|
|
3476
|
+
/**
|
|
3477
|
+
* Origin tracking metadata - who/what created this execution/task.
|
|
3478
|
+
* Used by both TaskScheduler and CommandQueue for complete audit trails.
|
|
3479
|
+
*/
|
|
3480
|
+
interface OriginTracking {
|
|
3481
|
+
originExecutionId: string;
|
|
3482
|
+
originResourceType: OriginResourceType;
|
|
3483
|
+
originResourceId: string;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* Command queue task with flexible action system
|
|
3488
|
+
*/
|
|
3489
|
+
interface Task extends OriginTracking {
|
|
3490
|
+
id: string;
|
|
3491
|
+
organizationId: string;
|
|
3492
|
+
actions: ActionConfig[];
|
|
3493
|
+
context: unknown;
|
|
3494
|
+
selectedAction?: string;
|
|
3495
|
+
actionPayload?: unknown;
|
|
3496
|
+
description?: string;
|
|
3497
|
+
priority: number;
|
|
3498
|
+
/** Optional checkpoint identifier for grouping related human approval tasks */
|
|
3499
|
+
humanCheckpoint?: string;
|
|
3500
|
+
status: QueueTaskStatus;
|
|
3501
|
+
/**
|
|
3502
|
+
* Target resource tracking — mirrors origin columns.
|
|
3503
|
+
* Set when task is created; patchable to redirect execution to a different resource.
|
|
3504
|
+
*/
|
|
3505
|
+
targetResourceId?: string;
|
|
3506
|
+
targetResourceType?: 'agent' | 'workflow';
|
|
3507
|
+
/**
|
|
3508
|
+
* Execution ID for the action that runs AFTER user approval.
|
|
3509
|
+
* NULL until execution starts.
|
|
3510
|
+
*
|
|
3511
|
+
* Naming distinction:
|
|
3512
|
+
* - originExecutionId = Parent execution that CREATED the HITL task
|
|
3513
|
+
* - targetExecutionId = Child execution that RUNS AFTER user approval
|
|
3514
|
+
*/
|
|
3515
|
+
targetExecutionId?: string;
|
|
3516
|
+
createdAt: Date;
|
|
3517
|
+
completedAt?: Date;
|
|
3518
|
+
completedBy?: string;
|
|
3519
|
+
expiresAt?: Date;
|
|
3520
|
+
idempotencyKey?: string | null;
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* Task status values
|
|
3524
|
+
* - pending: awaiting action
|
|
3525
|
+
* - processing: execution in progress after user approval
|
|
3526
|
+
* - completed: action was taken and execution succeeded
|
|
3527
|
+
* - failed: execution failed, task can be retried
|
|
3528
|
+
* - expired: timed out before action
|
|
3529
|
+
*/
|
|
3530
|
+
type QueueTaskStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
|
|
3531
|
+
|
|
3532
|
+
/**
|
|
3533
|
+
* Target for schedule execution - identifies what resource to execute.
|
|
3534
|
+
* Unlike ExecutionTarget, payload is NOT included here because schedules
|
|
3535
|
+
* store payload in the scheduleConfig (varies per step/item).
|
|
3536
|
+
*/
|
|
3537
|
+
interface ScheduleTarget {
|
|
3538
|
+
resourceType: 'agent' | 'workflow';
|
|
3539
|
+
resourceId: string;
|
|
3540
|
+
}
|
|
3541
|
+
/**
|
|
3542
|
+
* Optional origin tracking for schedules.
|
|
3543
|
+
* Unlike OriginTracking (which is required), these fields are all optional
|
|
3544
|
+
* for schedules created directly via API (not triggered by another resource).
|
|
3545
|
+
*/
|
|
3546
|
+
interface ScheduleOriginTracking {
|
|
3547
|
+
originExecutionId?: string;
|
|
3548
|
+
originResourceType?: OriginResourceType;
|
|
3549
|
+
originResourceId?: string;
|
|
3550
|
+
}
|
|
3551
|
+
type TaskScheduleConfig = RecurringScheduleConfig | RelativeScheduleConfig | AbsoluteScheduleConfig;
|
|
3552
|
+
interface RecurringScheduleConfig {
|
|
3553
|
+
type: 'recurring';
|
|
3554
|
+
cron?: string;
|
|
3555
|
+
interval?: 'daily' | 'weekly' | 'monthly';
|
|
3556
|
+
time?: string;
|
|
3557
|
+
timezone: string;
|
|
3558
|
+
payload: Record<string, unknown>;
|
|
3559
|
+
endAt?: string | null;
|
|
3560
|
+
overduePolicy?: 'skip' | 'execute';
|
|
3561
|
+
}
|
|
3562
|
+
interface RelativeScheduleConfig {
|
|
3563
|
+
type: 'relative';
|
|
3564
|
+
anchorAt: string;
|
|
3565
|
+
anchorLabel?: string;
|
|
3566
|
+
items: RelativeScheduleItem[];
|
|
3567
|
+
overduePolicy?: 'skip' | 'execute';
|
|
3568
|
+
}
|
|
3569
|
+
interface RelativeScheduleItem {
|
|
3570
|
+
offset: string;
|
|
3571
|
+
payload: Record<string, unknown>;
|
|
3572
|
+
label?: string;
|
|
3573
|
+
}
|
|
3574
|
+
interface AbsoluteScheduleConfig {
|
|
3575
|
+
type: 'absolute';
|
|
3576
|
+
items: AbsoluteScheduleItem[];
|
|
3577
|
+
overduePolicy?: 'skip' | 'execute';
|
|
3578
|
+
}
|
|
3579
|
+
interface AbsoluteScheduleItem {
|
|
3580
|
+
runAt: string;
|
|
3581
|
+
payload: Record<string, unknown>;
|
|
3582
|
+
label?: string;
|
|
3583
|
+
}
|
|
3584
|
+
interface TaskSchedule extends ScheduleOriginTracking {
|
|
3585
|
+
id: string;
|
|
3586
|
+
organizationId: string;
|
|
3587
|
+
name: string;
|
|
3588
|
+
description?: string;
|
|
3589
|
+
target: ScheduleTarget;
|
|
3590
|
+
scheduleConfig: TaskScheduleConfig;
|
|
3591
|
+
nextRunAt?: Date;
|
|
3592
|
+
currentStep: number;
|
|
3593
|
+
status: 'active' | 'paused' | 'completed' | 'cancelled';
|
|
3594
|
+
lastRunAt?: Date;
|
|
3595
|
+
lastExecutionId?: string;
|
|
3596
|
+
maxRetries: number;
|
|
3597
|
+
idempotencyKey?: string;
|
|
3598
|
+
createdAt: Date;
|
|
3599
|
+
updatedAt: Date;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
/**
|
|
3603
|
+
* Wire-format DTO for notification API responses.
|
|
3604
|
+
* Dates are ISO 8601 strings (not Date objects like the domain Notification type).
|
|
3605
|
+
* Used by frontend hooks that consume /api/notifications.
|
|
3606
|
+
*/
|
|
3607
|
+
interface NotificationDTO {
|
|
3608
|
+
id: string;
|
|
3609
|
+
userId: string;
|
|
3610
|
+
organizationId: string;
|
|
3611
|
+
category: string;
|
|
3612
|
+
title: string;
|
|
3613
|
+
message: string;
|
|
3614
|
+
actionUrl: string | null;
|
|
3615
|
+
read: boolean;
|
|
3616
|
+
readAt: string | null;
|
|
3617
|
+
createdAt: string;
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
type MilestoneRow = Database['public']['Tables']['prj_milestones']['Row'];
|
|
3621
|
+
type TaskRow = Database['public']['Tables']['prj_tasks']['Row'];
|
|
3622
|
+
|
|
3623
|
+
/**
|
|
3624
|
+
* Full ListConfig shape. `qualification` is required; everything else optional.
|
|
3625
|
+
* Matches `acq_lists.config` jsonb and ListConfig type in types.ts.
|
|
3626
|
+
*/
|
|
3627
|
+
declare const ListConfigSchema: z.ZodObject<{
|
|
3628
|
+
qualification: z.ZodObject<{
|
|
3629
|
+
targetDescription: z.ZodString;
|
|
3630
|
+
minReviewCount: z.ZodNumber;
|
|
3631
|
+
minRating: z.ZodNumber;
|
|
3632
|
+
excludeFranchises: z.ZodBoolean;
|
|
3633
|
+
customRules: z.ZodString;
|
|
3634
|
+
}, z.core.$strip>;
|
|
3635
|
+
enrichment: z.ZodOptional<z.ZodObject<{
|
|
3636
|
+
emailDiscovery: z.ZodOptional<z.ZodObject<{
|
|
3637
|
+
primary: z.ZodEnum<{
|
|
3638
|
+
tomba: "tomba";
|
|
3639
|
+
anymailfinder: "anymailfinder";
|
|
3640
|
+
}>;
|
|
3641
|
+
credentialName: z.ZodOptional<z.ZodString>;
|
|
3642
|
+
}, z.core.$strip>>;
|
|
3643
|
+
emailVerification: z.ZodOptional<z.ZodObject<{
|
|
3644
|
+
provider: z.ZodLiteral<"millionverifier">;
|
|
3645
|
+
threshold: z.ZodOptional<z.ZodEnum<{
|
|
3646
|
+
ok: "ok";
|
|
3647
|
+
"ok+catch_all": "ok+catch_all";
|
|
3648
|
+
}>>;
|
|
3649
|
+
}, z.core.$strip>>;
|
|
3650
|
+
}, z.core.$strip>>;
|
|
3651
|
+
personalization: z.ZodOptional<z.ZodObject<{
|
|
3652
|
+
industryContext: z.ZodOptional<z.ZodString>;
|
|
3653
|
+
emailBody: z.ZodOptional<z.ZodString>;
|
|
3654
|
+
creativeDirection: z.ZodOptional<z.ZodString>;
|
|
3655
|
+
exclusionRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3656
|
+
}, z.core.$strip>>;
|
|
3657
|
+
pipeline: z.ZodOptional<z.ZodObject<{
|
|
3658
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3659
|
+
key: z.ZodString;
|
|
3660
|
+
label: z.ZodString;
|
|
3661
|
+
resourceId: z.ZodString;
|
|
3662
|
+
inputTemplate: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3663
|
+
enabled: z.ZodBoolean;
|
|
3664
|
+
order: z.ZodNumber;
|
|
3665
|
+
}, z.core.$strip>>;
|
|
3666
|
+
}, z.core.$strip>>;
|
|
3667
|
+
}, z.core.$strip>;
|
|
3668
|
+
type ListConfigInput = z.infer<typeof ListConfigSchema>;
|
|
3669
|
+
|
|
3670
|
+
declare const GetRecentActivityResponseSchema: z.ZodObject<{
|
|
3671
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
3672
|
+
id: z.ZodString;
|
|
3673
|
+
kind: z.ZodEnum<{
|
|
3674
|
+
note: "note";
|
|
3675
|
+
stage_change: "stage_change";
|
|
3676
|
+
deal_created: "deal_created";
|
|
3677
|
+
}>;
|
|
3678
|
+
dealId: z.ZodString;
|
|
3679
|
+
occurredAt: z.ZodString;
|
|
3680
|
+
description: z.ZodString;
|
|
3681
|
+
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3682
|
+
companyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3683
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3684
|
+
}, z.core.$strip>>;
|
|
3685
|
+
}, z.core.$strip>;
|
|
3686
|
+
type GetRecentActivityResponse = z.infer<typeof GetRecentActivityResponseSchema>;
|
|
3687
|
+
|
|
3688
|
+
/**
|
|
3689
|
+
* Multi-tenancy configuration types
|
|
3690
|
+
*
|
|
3691
|
+
* Config is stored in dedicated `config` columns (NOT nested in metadata):
|
|
3692
|
+
* - organizations.config: Org-level config (no feature toggles -- all features available by default)
|
|
3693
|
+
* - org_memberships.config: Per-user-per-org feature overrides
|
|
3694
|
+
* - users.config: User-global config
|
|
3695
|
+
*/
|
|
3696
|
+
/**
|
|
3697
|
+
* Per-user-per-org config (stored in org_memberships.config)
|
|
3698
|
+
* Controls which features a specific member can access within their org.
|
|
3699
|
+
* Keys are feature IDs from the organization model (e.g. crm, lead-gen, projects, seo).
|
|
3700
|
+
*/
|
|
3701
|
+
interface MembershipFeatureConfig {
|
|
3702
|
+
features?: Record<string, boolean>;
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
/**
|
|
3706
|
+
* Memberships Domain - Zod Validation Schemas
|
|
3707
|
+
*
|
|
3708
|
+
* Validation schemas for membership management endpoints.
|
|
3709
|
+
* Includes request bodies, query params, and path params.
|
|
3710
|
+
*
|
|
3711
|
+
* Security:
|
|
3712
|
+
* - All schemas use .strict() to prevent mass assignment attacks
|
|
3713
|
+
* - UUID validation prevents invalid references
|
|
3714
|
+
* - Role enum validation prevents privilege escalation
|
|
3715
|
+
* - organizationId never accepted in body (from JWT when needed)
|
|
3716
|
+
*/
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* Membership status validation
|
|
3720
|
+
* Note: Database constraint only allows 'active' | 'inactive'
|
|
3721
|
+
*/
|
|
3722
|
+
declare const MembershipStatusSchema: z.ZodEnum<{
|
|
3723
|
+
active: "active";
|
|
3724
|
+
inactive: "inactive";
|
|
3725
|
+
}>;
|
|
3726
|
+
type MembershipStatus = z.infer<typeof MembershipStatusSchema>;
|
|
3727
|
+
|
|
3728
|
+
/**
|
|
3729
|
+
* Organization Membership types based on WorkOS API
|
|
3730
|
+
*/
|
|
3731
|
+
interface OrganizationMembership {
|
|
3732
|
+
object: 'organization_membership';
|
|
3733
|
+
id: string;
|
|
3734
|
+
userId: string;
|
|
3735
|
+
organizationId: string;
|
|
3736
|
+
role: {
|
|
3737
|
+
slug: string;
|
|
3738
|
+
};
|
|
3739
|
+
status: 'active' | 'inactive';
|
|
3740
|
+
createdAt: string;
|
|
3741
|
+
updatedAt: string;
|
|
3742
|
+
}
|
|
3743
|
+
/**
|
|
3744
|
+
* Extended membership with user and organization details for UI
|
|
3745
|
+
*/
|
|
3746
|
+
interface MembershipWithDetails extends OrganizationMembership {
|
|
3747
|
+
user?: {
|
|
3748
|
+
id: string;
|
|
3749
|
+
email: string;
|
|
3750
|
+
firstName?: string;
|
|
3751
|
+
lastName?: string;
|
|
3752
|
+
profilePictureUrl?: string;
|
|
3753
|
+
};
|
|
3754
|
+
organization?: {
|
|
3755
|
+
id: string;
|
|
3756
|
+
name: string;
|
|
3757
|
+
workos_org_id: string;
|
|
3758
|
+
primaryDomain?: string;
|
|
3759
|
+
is_test?: boolean;
|
|
3760
|
+
status?: string;
|
|
3761
|
+
metadata?: Record<string, unknown>;
|
|
3762
|
+
config?: Record<string, unknown>;
|
|
3763
|
+
};
|
|
3764
|
+
config?: MembershipFeatureConfig;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
interface OAuthToken extends Record<string, unknown> {
|
|
3768
|
+
provider: string;
|
|
3769
|
+
accessToken: string;
|
|
3770
|
+
refreshToken: string;
|
|
3771
|
+
expiresAt: string;
|
|
3772
|
+
tokenType: 'Bearer';
|
|
3773
|
+
scope?: string;
|
|
3774
|
+
}
|
|
3775
|
+
interface OAuthProviderConfig {
|
|
3776
|
+
id: string;
|
|
3777
|
+
name: string;
|
|
3778
|
+
authUrl: string;
|
|
3779
|
+
tokenUrl: string;
|
|
3780
|
+
scopes?: string[];
|
|
3781
|
+
authParams?: Record<string, string>;
|
|
3782
|
+
tokenExchange: 'basic-auth' | 'form-encoded' | 'json-body';
|
|
3783
|
+
usePKCE?: boolean;
|
|
3784
|
+
customAuthFlow?: (config: OAuthProviderConfig, state: OAuthState) => URL;
|
|
3785
|
+
customTokenExchange?: (code: string, config: OAuthProviderConfig) => Promise<OAuthToken>;
|
|
3786
|
+
}
|
|
3787
|
+
interface OAuthState {
|
|
3788
|
+
organizationId: string;
|
|
3789
|
+
nonce: string;
|
|
3790
|
+
timestamp: number;
|
|
3791
|
+
credentialName: string;
|
|
3792
|
+
provider: string;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
/**
|
|
3796
|
+
* Time range selector for dashboard metrics
|
|
3797
|
+
*/
|
|
3798
|
+
type TimeRange = '1h' | '24h' | '7d' | '30d';
|
|
3799
|
+
/**
|
|
3800
|
+
* Execution health metrics response
|
|
3801
|
+
* Success rate, P95 duration, execution counts, and trend data
|
|
3802
|
+
* trendData includes executionCount for throughput visualization (eliminates separate API call)
|
|
3803
|
+
*/
|
|
3804
|
+
interface ExecutionHealthMetrics {
|
|
3805
|
+
successRate: number;
|
|
3806
|
+
p95Duration: number;
|
|
3807
|
+
totalExecutions: number;
|
|
3808
|
+
trendData: Array<{
|
|
3809
|
+
time: string;
|
|
3810
|
+
rate: number;
|
|
3811
|
+
successCount: number;
|
|
3812
|
+
errorCount: number;
|
|
3813
|
+
warningCount: number;
|
|
3814
|
+
executionCount: number;
|
|
3815
|
+
}>;
|
|
3816
|
+
statusCounts: {
|
|
3817
|
+
success: number;
|
|
3818
|
+
failed: number;
|
|
3819
|
+
pending: number;
|
|
3820
|
+
warning: number;
|
|
3821
|
+
};
|
|
3822
|
+
peakPeriod: string;
|
|
3823
|
+
granularity: 'hour' | 'day';
|
|
3824
|
+
}
|
|
3825
|
+
/**
|
|
3826
|
+
* Error analysis metrics response
|
|
3827
|
+
* Error categories and top failing resources
|
|
3560
3828
|
*/
|
|
3561
|
-
interface
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3829
|
+
interface ErrorAnalysisMetrics {
|
|
3830
|
+
totalErrors: number;
|
|
3831
|
+
errorsByCategory: Array<{
|
|
3832
|
+
category: string;
|
|
3833
|
+
count: number;
|
|
3834
|
+
percentage: number;
|
|
3835
|
+
}>;
|
|
3836
|
+
topFailingResources: Array<{
|
|
3837
|
+
resourceId: string;
|
|
3838
|
+
name: string;
|
|
3839
|
+
errorCount: number;
|
|
3840
|
+
failureRate: number;
|
|
3841
|
+
}>;
|
|
3570
3842
|
}
|
|
3571
3843
|
/**
|
|
3572
|
-
*
|
|
3573
|
-
*
|
|
3844
|
+
* Business impact metrics response
|
|
3845
|
+
* ROI, labor savings, and cost analysis
|
|
3574
3846
|
*/
|
|
3575
|
-
interface
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
startTime?: number;
|
|
3581
|
-
endTime?: number;
|
|
3847
|
+
interface BusinessImpactMetrics {
|
|
3848
|
+
totalSavingsUsd: number;
|
|
3849
|
+
totalCostUsd: number;
|
|
3850
|
+
netSavingsUsd: number;
|
|
3851
|
+
roi: number;
|
|
3582
3852
|
}
|
|
3583
3853
|
/**
|
|
3584
|
-
*
|
|
3585
|
-
*
|
|
3854
|
+
* Cost breakdown metrics response
|
|
3855
|
+
* Per-resource cost analysis
|
|
3586
3856
|
*/
|
|
3587
|
-
interface
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
status: 'running' | 'completed' | 'failed' | 'warning';
|
|
3595
|
-
}
|
|
3596
|
-
|
|
3597
|
-
/** Raw database row type for acq_deals table */
|
|
3598
|
-
type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
|
|
3599
|
-
type DealStage = 'interested' | 'proposal' | 'closing' | 'closed_won' | 'closed_lost' | 'nurturing';
|
|
3600
|
-
interface KanbanStageConfig {
|
|
3601
|
-
color: string;
|
|
3602
|
-
label?: string;
|
|
3857
|
+
interface CostBreakdownMetrics {
|
|
3858
|
+
resources: Array<{
|
|
3859
|
+
resourceId: string;
|
|
3860
|
+
totalCostUsd: number;
|
|
3861
|
+
executionCount: number;
|
|
3862
|
+
avgCostUsd: number;
|
|
3863
|
+
}>;
|
|
3603
3864
|
}
|
|
3604
|
-
|
|
3605
|
-
interface
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
headline: string | null;
|
|
3612
|
-
linkedin_url: string | null;
|
|
3613
|
-
pipeline_status: Record<string, unknown> | null;
|
|
3614
|
-
enrichment_data: Record<string, unknown> | null;
|
|
3615
|
-
company: {
|
|
3616
|
-
id: string;
|
|
3617
|
-
name: string;
|
|
3618
|
-
domain: string | null;
|
|
3619
|
-
website: string | null;
|
|
3620
|
-
linkedin_url: string | null;
|
|
3621
|
-
segment: string | null;
|
|
3622
|
-
category: string | null;
|
|
3623
|
-
num_employees: number | null;
|
|
3624
|
-
} | null;
|
|
3865
|
+
/** Time-bucketed health data point */
|
|
3866
|
+
interface ResourceHealthDataPoint {
|
|
3867
|
+
time: string;
|
|
3868
|
+
success: number;
|
|
3869
|
+
failure: number;
|
|
3870
|
+
warning: number;
|
|
3871
|
+
rate: number;
|
|
3625
3872
|
}
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3873
|
+
/** Health data for a single resource */
|
|
3874
|
+
interface ResourceHealth {
|
|
3875
|
+
entityType: string;
|
|
3876
|
+
entityId: string;
|
|
3877
|
+
entityName: string | null;
|
|
3878
|
+
trendData: ResourceHealthDataPoint[];
|
|
3879
|
+
summary: {
|
|
3880
|
+
total: number;
|
|
3881
|
+
successRate: number;
|
|
3882
|
+
};
|
|
3631
3883
|
}
|
|
3632
|
-
/**
|
|
3633
|
-
|
|
3634
|
-
|
|
3884
|
+
/**
|
|
3885
|
+
* Cost trend data point for time-series charts
|
|
3886
|
+
* Represents a single time bucket (hour or day)
|
|
3887
|
+
*/
|
|
3888
|
+
interface CostTrendDataPoint {
|
|
3889
|
+
time: string;
|
|
3890
|
+
totalCostUsd: number;
|
|
3891
|
+
executionCount: number;
|
|
3892
|
+
avgCostPerExecution: number;
|
|
3635
3893
|
}
|
|
3636
|
-
type DealDetail = DealListItem;
|
|
3637
|
-
|
|
3638
3894
|
/**
|
|
3639
|
-
*
|
|
3640
|
-
* Defines available user actions and their behavior
|
|
3895
|
+
* Cost trends response (time-series data)
|
|
3641
3896
|
*/
|
|
3642
|
-
interface
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
/** Button variant/style */
|
|
3648
|
-
type: 'primary' | 'secondary' | 'danger' | 'outline';
|
|
3649
|
-
/** Tabler icon name (e.g., 'IconCheck', 'IconRefresh') */
|
|
3650
|
-
icon?: string;
|
|
3651
|
-
/** Button color (Mantine theme colors) */
|
|
3652
|
-
color?: string;
|
|
3653
|
-
/** Button variant (Mantine button variant, e.g., 'light', 'filled', 'outline') */
|
|
3654
|
-
variant?: string;
|
|
3655
|
-
/** Execution target (agent/workflow to invoke) */
|
|
3656
|
-
target?: {
|
|
3657
|
-
resourceType: 'agent' | 'workflow';
|
|
3658
|
-
resourceId: string;
|
|
3659
|
-
/**
|
|
3660
|
-
* Optional session ID for agent continuation.
|
|
3661
|
-
* If provided, invokes a new turn on the existing session instead of standalone execution.
|
|
3662
|
-
* Only valid when resourceType is 'agent'.
|
|
3663
|
-
*/
|
|
3664
|
-
sessionId?: string;
|
|
3665
|
-
};
|
|
3666
|
-
/** Form schema for collecting action-specific data */
|
|
3667
|
-
form?: FormSchema;
|
|
3668
|
-
/** Payload template for pre-filling forms */
|
|
3669
|
-
payloadTemplate?: unknown;
|
|
3670
|
-
/** Requires confirmation dialog */
|
|
3671
|
-
requiresConfirmation?: boolean;
|
|
3672
|
-
/** Confirmation message */
|
|
3673
|
-
confirmationMessage?: string;
|
|
3674
|
-
/** Help text / tooltip */
|
|
3675
|
-
description?: string;
|
|
3897
|
+
interface CostTrendsResponse {
|
|
3898
|
+
trendData: CostTrendDataPoint[];
|
|
3899
|
+
granularity: 'hour' | 'day';
|
|
3900
|
+
totalCostUsd: number;
|
|
3901
|
+
totalExecutions: number;
|
|
3676
3902
|
}
|
|
3677
|
-
|
|
3678
3903
|
/**
|
|
3679
|
-
*
|
|
3680
|
-
* Used for audit trails and tracking execution lineage.
|
|
3904
|
+
* Cost summary response with MTD and projections
|
|
3681
3905
|
*/
|
|
3682
|
-
|
|
3906
|
+
interface CostSummaryResponse {
|
|
3907
|
+
current: {
|
|
3908
|
+
totalCostUsd: number;
|
|
3909
|
+
executionCount: number;
|
|
3910
|
+
};
|
|
3911
|
+
previous: {
|
|
3912
|
+
totalCostUsd: number;
|
|
3913
|
+
executionCount: number;
|
|
3914
|
+
};
|
|
3915
|
+
mtd: {
|
|
3916
|
+
totalCostUsd: number;
|
|
3917
|
+
daysElapsed: number;
|
|
3918
|
+
};
|
|
3919
|
+
projection: {
|
|
3920
|
+
monthlyCostUsd: number;
|
|
3921
|
+
confidence: 'low' | 'medium' | 'high';
|
|
3922
|
+
};
|
|
3923
|
+
trend: {
|
|
3924
|
+
changePercent: number;
|
|
3925
|
+
direction: 'up' | 'down' | 'flat';
|
|
3926
|
+
};
|
|
3927
|
+
}
|
|
3683
3928
|
/**
|
|
3684
|
-
*
|
|
3685
|
-
* Used by both TaskScheduler and CommandQueue for complete audit trails.
|
|
3929
|
+
* Cost by model data for model-level breakdown
|
|
3686
3930
|
*/
|
|
3687
|
-
interface
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3931
|
+
interface CostByModelData {
|
|
3932
|
+
model: string;
|
|
3933
|
+
totalCostUsd: number;
|
|
3934
|
+
callCount: number;
|
|
3935
|
+
totalInputTokens: number;
|
|
3936
|
+
totalOutputTokens: number;
|
|
3937
|
+
avgCostPerCall: number;
|
|
3691
3938
|
}
|
|
3692
|
-
|
|
3693
3939
|
/**
|
|
3694
|
-
*
|
|
3940
|
+
* Cost by model response
|
|
3695
3941
|
*/
|
|
3696
|
-
interface
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
context: unknown;
|
|
3701
|
-
selectedAction?: string;
|
|
3702
|
-
actionPayload?: unknown;
|
|
3703
|
-
description?: string;
|
|
3704
|
-
priority: number;
|
|
3705
|
-
/** Optional checkpoint identifier for grouping related human approval tasks */
|
|
3706
|
-
humanCheckpoint?: string;
|
|
3707
|
-
status: QueueTaskStatus;
|
|
3708
|
-
/**
|
|
3709
|
-
* Target resource tracking — mirrors origin columns.
|
|
3710
|
-
* Set when task is created; patchable to redirect execution to a different resource.
|
|
3711
|
-
*/
|
|
3712
|
-
targetResourceId?: string;
|
|
3713
|
-
targetResourceType?: 'agent' | 'workflow';
|
|
3714
|
-
/**
|
|
3715
|
-
* Execution ID for the action that runs AFTER user approval.
|
|
3716
|
-
* NULL until execution starts.
|
|
3717
|
-
*
|
|
3718
|
-
* Naming distinction:
|
|
3719
|
-
* - originExecutionId = Parent execution that CREATED the HITL task
|
|
3720
|
-
* - targetExecutionId = Child execution that RUNS AFTER user approval
|
|
3721
|
-
*/
|
|
3722
|
-
targetExecutionId?: string;
|
|
3723
|
-
createdAt: Date;
|
|
3724
|
-
completedAt?: Date;
|
|
3725
|
-
completedBy?: string;
|
|
3726
|
-
expiresAt?: Date;
|
|
3727
|
-
idempotencyKey?: string | null;
|
|
3942
|
+
interface CostByModelResponse {
|
|
3943
|
+
models: CostByModelData[];
|
|
3944
|
+
totalCostUsd: number;
|
|
3945
|
+
totalCallCount: number;
|
|
3728
3946
|
}
|
|
3947
|
+
|
|
3729
3948
|
/**
|
|
3730
|
-
*
|
|
3731
|
-
*
|
|
3732
|
-
* - processing: execution in progress after user approval
|
|
3733
|
-
* - completed: action was taken and execution succeeded
|
|
3734
|
-
* - failed: execution failed, task can be retried
|
|
3735
|
-
* - expired: timed out before action
|
|
3949
|
+
* Base Execution Engine type definitions
|
|
3950
|
+
* Core types shared across all Execution Engine resources
|
|
3736
3951
|
*/
|
|
3737
|
-
type QueueTaskStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
|
|
3738
3952
|
|
|
3739
3953
|
/**
|
|
3740
|
-
*
|
|
3741
|
-
*
|
|
3742
|
-
*
|
|
3954
|
+
* NOTE: AIResource interface has been removed and replaced with ResourceDefinition
|
|
3955
|
+
* from registry/types.ts. All resources (executable and non-executable) now extend
|
|
3956
|
+
* the unified ResourceDefinition base interface.
|
|
3957
|
+
*
|
|
3958
|
+
* AgentConfig and WorkflowConfig now extend ResourceDefinition directly.
|
|
3959
|
+
* See packages/core/src/registry/types.ts for the base interface definition.
|
|
3743
3960
|
*/
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
resourceId: string;
|
|
3747
|
-
}
|
|
3961
|
+
type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefinition;
|
|
3962
|
+
|
|
3748
3963
|
/**
|
|
3749
|
-
*
|
|
3750
|
-
* Unlike OriginTracking (which is required), these fields are all optional
|
|
3751
|
-
* for schedules created directly via API (not triggered by another resource).
|
|
3964
|
+
* Resource Registry type definitions
|
|
3752
3965
|
*/
|
|
3753
|
-
interface ScheduleOriginTracking {
|
|
3754
|
-
originExecutionId?: string;
|
|
3755
|
-
originResourceType?: OriginResourceType;
|
|
3756
|
-
originResourceId?: string;
|
|
3757
|
-
}
|
|
3758
|
-
type TaskScheduleConfig = RecurringScheduleConfig | RelativeScheduleConfig | AbsoluteScheduleConfig;
|
|
3759
|
-
interface RecurringScheduleConfig {
|
|
3760
|
-
type: 'recurring';
|
|
3761
|
-
cron?: string;
|
|
3762
|
-
interval?: 'daily' | 'weekly' | 'monthly';
|
|
3763
|
-
time?: string;
|
|
3764
|
-
timezone: string;
|
|
3765
|
-
payload: Record<string, unknown>;
|
|
3766
|
-
endAt?: string | null;
|
|
3767
|
-
overduePolicy?: 'skip' | 'execute';
|
|
3768
|
-
}
|
|
3769
|
-
interface RelativeScheduleConfig {
|
|
3770
|
-
type: 'relative';
|
|
3771
|
-
anchorAt: string;
|
|
3772
|
-
anchorLabel?: string;
|
|
3773
|
-
items: RelativeScheduleItem[];
|
|
3774
|
-
overduePolicy?: 'skip' | 'execute';
|
|
3775
|
-
}
|
|
3776
|
-
interface RelativeScheduleItem {
|
|
3777
|
-
offset: string;
|
|
3778
|
-
payload: Record<string, unknown>;
|
|
3779
|
-
label?: string;
|
|
3780
|
-
}
|
|
3781
|
-
interface AbsoluteScheduleConfig {
|
|
3782
|
-
type: 'absolute';
|
|
3783
|
-
items: AbsoluteScheduleItem[];
|
|
3784
|
-
overduePolicy?: 'skip' | 'execute';
|
|
3785
|
-
}
|
|
3786
|
-
interface AbsoluteScheduleItem {
|
|
3787
|
-
runAt: string;
|
|
3788
|
-
payload: Record<string, unknown>;
|
|
3789
|
-
label?: string;
|
|
3790
|
-
}
|
|
3791
|
-
interface TaskSchedule extends ScheduleOriginTracking {
|
|
3792
|
-
id: string;
|
|
3793
|
-
organizationId: string;
|
|
3794
|
-
name: string;
|
|
3795
|
-
description?: string;
|
|
3796
|
-
target: ScheduleTarget;
|
|
3797
|
-
scheduleConfig: TaskScheduleConfig;
|
|
3798
|
-
nextRunAt?: Date;
|
|
3799
|
-
currentStep: number;
|
|
3800
|
-
status: 'active' | 'paused' | 'completed' | 'cancelled';
|
|
3801
|
-
lastRunAt?: Date;
|
|
3802
|
-
lastExecutionId?: string;
|
|
3803
|
-
maxRetries: number;
|
|
3804
|
-
idempotencyKey?: string;
|
|
3805
|
-
createdAt: Date;
|
|
3806
|
-
updatedAt: Date;
|
|
3807
|
-
}
|
|
3808
3966
|
|
|
3809
3967
|
/**
|
|
3810
|
-
*
|
|
3811
|
-
* Dates are ISO 8601 strings (not Date objects like the domain Notification type).
|
|
3812
|
-
* Used by frontend hooks that consume /api/notifications.
|
|
3968
|
+
* Environment/deployment status for resources
|
|
3813
3969
|
*/
|
|
3814
|
-
|
|
3970
|
+
type ResourceStatus = 'dev' | 'prod';
|
|
3971
|
+
/**
|
|
3972
|
+
* All resource types in the platform
|
|
3973
|
+
* Used as the discriminator field in ResourceDefinition
|
|
3974
|
+
*/
|
|
3975
|
+
type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human';
|
|
3976
|
+
/**
|
|
3977
|
+
* Base interface for ALL platform resources
|
|
3978
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
3979
|
+
*/
|
|
3980
|
+
interface ResourceDefinition {
|
|
3981
|
+
/** Unique resource identifier */
|
|
3982
|
+
resourceId: string;
|
|
3983
|
+
/** Display name */
|
|
3984
|
+
name: string;
|
|
3985
|
+
/** Purpose and functionality description */
|
|
3986
|
+
description: string;
|
|
3987
|
+
/** Version for change tracking and evolution */
|
|
3988
|
+
version: string;
|
|
3989
|
+
/** Resource type discriminator */
|
|
3990
|
+
type: ResourceType;
|
|
3991
|
+
/** Environment/deployment status */
|
|
3992
|
+
status: ResourceStatus;
|
|
3993
|
+
/** Graph links to Organization Model nodes */
|
|
3994
|
+
links?: ResourceLink[];
|
|
3995
|
+
/** Infrastructure category for filtering */
|
|
3996
|
+
category?: ResourceCategory;
|
|
3997
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
3998
|
+
sessionCapable?: boolean;
|
|
3999
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
4000
|
+
origin?: 'local' | 'remote';
|
|
4001
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
4002
|
+
archived?: boolean;
|
|
4003
|
+
}
|
|
4004
|
+
|
|
4005
|
+
declare const LinkSchema: z.ZodObject<{
|
|
4006
|
+
nodeId: z.ZodString;
|
|
4007
|
+
kind: z.ZodEnum<{
|
|
4008
|
+
contains: "contains";
|
|
4009
|
+
references: "references";
|
|
4010
|
+
exposes: "exposes";
|
|
4011
|
+
maps_to: "maps_to";
|
|
4012
|
+
"operates-on": "operates-on";
|
|
4013
|
+
uses: "uses";
|
|
4014
|
+
}>;
|
|
4015
|
+
}, z.core.$strip>;
|
|
4016
|
+
type Link = z.infer<typeof LinkSchema>;
|
|
4017
|
+
|
|
4018
|
+
declare const ResourceCategorySchema: z.ZodEnum<{
|
|
4019
|
+
production: "production";
|
|
4020
|
+
diagnostic: "diagnostic";
|
|
4021
|
+
internal: "internal";
|
|
4022
|
+
testing: "testing";
|
|
4023
|
+
}>;
|
|
4024
|
+
type ResourceCategory = z.infer<typeof ResourceCategorySchema>;
|
|
4025
|
+
type ResourceLink = Link;
|
|
4026
|
+
|
|
4027
|
+
type ExecutionStatus = 'pending' | 'running' | 'completed' | 'failed' | 'warning';
|
|
4028
|
+
interface APIExecutionSummary {
|
|
3815
4029
|
id: string;
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
4030
|
+
status: ExecutionStatus;
|
|
4031
|
+
startTime: number;
|
|
4032
|
+
endTime?: number;
|
|
4033
|
+
resourceStatus?: ResourceStatus;
|
|
4034
|
+
}
|
|
4035
|
+
interface APIExecutionDetail extends APIExecutionSummary {
|
|
4036
|
+
executionLogs: ExecutionLogMessage[];
|
|
4037
|
+
input?: unknown;
|
|
4038
|
+
result?: unknown;
|
|
4039
|
+
error?: string;
|
|
4040
|
+
resourceStatus: ResourceStatus;
|
|
4041
|
+
apiVersion?: string | null;
|
|
4042
|
+
resourceVersion?: string | null;
|
|
4043
|
+
sdkVersion?: string | null;
|
|
4044
|
+
isArchived?: boolean;
|
|
4045
|
+
archivedLogCount?: number;
|
|
3825
4046
|
}
|
|
3826
4047
|
|
|
3827
|
-
|
|
3828
|
-
|
|
4048
|
+
/**
|
|
4049
|
+
* Resource Type Metadata
|
|
4050
|
+
*
|
|
4051
|
+
* Centralized metadata for ResourceDefinition types including icon names and colors.
|
|
4052
|
+
* Icon names reference @tabler/icons-react - UI layer maps these to actual components.
|
|
4053
|
+
*/
|
|
3829
4054
|
|
|
3830
4055
|
/**
|
|
3831
|
-
*
|
|
3832
|
-
*
|
|
4056
|
+
* Node color types for graph visualization
|
|
4057
|
+
* Used by both @repo/core (metadata) and @repo/ui (components)
|
|
3833
4058
|
*/
|
|
3834
|
-
|
|
3835
|
-
qualification: z.ZodObject<{
|
|
3836
|
-
targetDescription: z.ZodString;
|
|
3837
|
-
minReviewCount: z.ZodNumber;
|
|
3838
|
-
minRating: z.ZodNumber;
|
|
3839
|
-
excludeFranchises: z.ZodBoolean;
|
|
3840
|
-
customRules: z.ZodString;
|
|
3841
|
-
}, z.core.$strip>;
|
|
3842
|
-
enrichment: z.ZodOptional<z.ZodObject<{
|
|
3843
|
-
emailDiscovery: z.ZodOptional<z.ZodObject<{
|
|
3844
|
-
primary: z.ZodEnum<{
|
|
3845
|
-
tomba: "tomba";
|
|
3846
|
-
anymailfinder: "anymailfinder";
|
|
3847
|
-
}>;
|
|
3848
|
-
credentialName: z.ZodOptional<z.ZodString>;
|
|
3849
|
-
}, z.core.$strip>>;
|
|
3850
|
-
emailVerification: z.ZodOptional<z.ZodObject<{
|
|
3851
|
-
provider: z.ZodLiteral<"millionverifier">;
|
|
3852
|
-
threshold: z.ZodOptional<z.ZodEnum<{
|
|
3853
|
-
ok: "ok";
|
|
3854
|
-
"ok+catch_all": "ok+catch_all";
|
|
3855
|
-
}>>;
|
|
3856
|
-
}, z.core.$strip>>;
|
|
3857
|
-
}, z.core.$strip>>;
|
|
3858
|
-
personalization: z.ZodOptional<z.ZodObject<{
|
|
3859
|
-
industryContext: z.ZodOptional<z.ZodString>;
|
|
3860
|
-
emailBody: z.ZodOptional<z.ZodString>;
|
|
3861
|
-
creativeDirection: z.ZodOptional<z.ZodString>;
|
|
3862
|
-
exclusionRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3863
|
-
}, z.core.$strip>>;
|
|
3864
|
-
pipeline: z.ZodOptional<z.ZodObject<{
|
|
3865
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
3866
|
-
key: z.ZodString;
|
|
3867
|
-
label: z.ZodString;
|
|
3868
|
-
resourceId: z.ZodString;
|
|
3869
|
-
inputTemplate: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3870
|
-
enabled: z.ZodBoolean;
|
|
3871
|
-
order: z.ZodNumber;
|
|
3872
|
-
}, z.core.$strip>>;
|
|
3873
|
-
}, z.core.$strip>>;
|
|
3874
|
-
}, z.core.$strip>;
|
|
3875
|
-
type ListConfigInput = z.infer<typeof ListConfigSchema>;
|
|
4059
|
+
type NodeColorType = 'violet' | 'blue' | 'orange' | 'teal' | 'gray' | 'yellow';
|
|
3876
4060
|
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
4061
|
+
type ActivityType = 'workflow_execution' | 'agent_run' | 'hitl_action' | 'webhook_received' | 'webhook_executed' | 'webhook_failed' | 'credential_change' | 'credential_read' | 'api_key_change' | 'deployment_change' | 'membership_change';
|
|
4062
|
+
type ActivityStatus = 'success' | 'failure' | 'pending' | 'approved' | 'rejected' | 'completed';
|
|
4063
|
+
interface Activity {
|
|
4064
|
+
id: string;
|
|
4065
|
+
organizationId: string;
|
|
4066
|
+
activityType: ActivityType;
|
|
4067
|
+
status: ActivityStatus;
|
|
4068
|
+
title: string;
|
|
4069
|
+
description: string | null;
|
|
4070
|
+
entityType: string;
|
|
4071
|
+
entityId: string;
|
|
4072
|
+
entityName: string | null;
|
|
4073
|
+
metadata: Record<string, unknown> | null;
|
|
4074
|
+
actorId: string | null;
|
|
4075
|
+
actorType: string | null;
|
|
4076
|
+
occurredAt: Date;
|
|
4077
|
+
createdAt: Date;
|
|
4078
|
+
}
|
|
3894
4079
|
|
|
3895
4080
|
/**
|
|
3896
|
-
*
|
|
4081
|
+
* Canonical permission catalog.
|
|
3897
4082
|
*
|
|
3898
|
-
*
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
*
|
|
3902
|
-
|
|
4083
|
+
* Source of truth for the permission keys used by:
|
|
4084
|
+
* - RLS policies in Supabase (via has_org_permission(org_id, key))
|
|
4085
|
+
* - API middleware (via requireOrganizationPermission(key))
|
|
4086
|
+
* - UI hooks (via useOrganizationPermissions().hasPermission(key))
|
|
4087
|
+
*
|
|
4088
|
+
* The DB table `org_rol_permissions` mirrors this constant. Reconciliation
|
|
4089
|
+
* runs at API boot (insert-or-update only — never auto-delete; see the
|
|
4090
|
+
* deletion runbook in the auth-role-system-redesign doc).
|
|
4091
|
+
*
|
|
4092
|
+
* Adding a permission:
|
|
4093
|
+
* 1. Add an entry below.
|
|
4094
|
+
* 2. Add a row to the migration / via reconcilePermissionCatalog at boot.
|
|
4095
|
+
* 3. Reference it in RLS / middleware as needed.
|
|
4096
|
+
* 4. Optionally grant it to one or more system roles in org_rol_grants.
|
|
4097
|
+
*
|
|
4098
|
+
* Removing a permission: follow the deletion runbook — never just delete
|
|
4099
|
+
* the entry. Existing role grants and policy references must be cleared first.
|
|
4100
|
+
*/
|
|
4101
|
+
declare const PERMISSIONS: {
|
|
4102
|
+
readonly ORG_READ: "org.read";
|
|
4103
|
+
readonly ORG_MANAGE: "org.manage";
|
|
4104
|
+
readonly ORG_DELETE: "org.delete";
|
|
4105
|
+
readonly MEMBERS_MANAGE: "members.manage";
|
|
4106
|
+
readonly ROLES_MANAGE: "roles.manage";
|
|
4107
|
+
readonly SECRETS_MANAGE: "secrets.manage";
|
|
4108
|
+
readonly OPERATIONS_READ: "operations.read";
|
|
4109
|
+
readonly OPERATIONS_MANAGE: "operations.manage";
|
|
4110
|
+
readonly WORK_MANAGE: "work.manage";
|
|
4111
|
+
};
|
|
4112
|
+
type PermissionKey = (typeof PERMISSIONS)[keyof typeof PERMISSIONS];
|
|
3903
4113
|
/**
|
|
3904
|
-
*
|
|
3905
|
-
*
|
|
3906
|
-
*
|
|
4114
|
+
* Static metadata for each permission. Mirrored into org_rol_permissions on
|
|
4115
|
+
* boot reconciliation. is_org_grantable=false means the permission is reserved
|
|
4116
|
+
* to system roles only — custom roles cannot include it (privilege-escalation guard).
|
|
3907
4117
|
*/
|
|
3908
|
-
interface
|
|
3909
|
-
|
|
4118
|
+
interface PermissionDescriptor {
|
|
4119
|
+
key: PermissionKey;
|
|
4120
|
+
description: string;
|
|
4121
|
+
isOrgGrantable: boolean;
|
|
3910
4122
|
}
|
|
3911
4123
|
|
|
3912
4124
|
/**
|
|
3913
|
-
*
|
|
3914
|
-
*
|
|
3915
|
-
* Validation schemas for membership management endpoints.
|
|
3916
|
-
* Includes request bodies, query params, and path params.
|
|
4125
|
+
* Execution Runner Types
|
|
3917
4126
|
*
|
|
3918
|
-
*
|
|
3919
|
-
*
|
|
3920
|
-
* - UUID validation prevents invalid references
|
|
3921
|
-
* - Role enum validation prevents privilege escalation
|
|
3922
|
-
* - organizationId never accepted in body (from JWT when needed)
|
|
4127
|
+
* Shared types for the Execution Runner UI feature.
|
|
4128
|
+
* Used by both API (apps/api) and frontend (apps/command-center).
|
|
3923
4129
|
*/
|
|
3924
4130
|
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
4131
|
+
interface ExecutionRunnerCatalogItem {
|
|
4132
|
+
resourceId: string;
|
|
4133
|
+
resourceName: string;
|
|
4134
|
+
resourceType: 'workflow' | 'agent';
|
|
4135
|
+
description?: string;
|
|
4136
|
+
status: 'dev' | 'prod';
|
|
4137
|
+
version: string;
|
|
4138
|
+
interface: SerializedExecutionInterface;
|
|
4139
|
+
}
|
|
3934
4140
|
|
|
3935
4141
|
/**
|
|
3936
|
-
*
|
|
4142
|
+
* Deployment types — browser-safe
|
|
4143
|
+
*
|
|
4144
|
+
* Canonical API response types for the deployment resource.
|
|
4145
|
+
* The API's transformRow converts snake_case DB columns to these camelCase fields.
|
|
3937
4146
|
*/
|
|
3938
|
-
|
|
3939
|
-
|
|
4147
|
+
type DeploymentStatus = 'deploying' | 'active' | 'failed' | 'rolled_back' | 'stopped';
|
|
4148
|
+
interface Deployment {
|
|
3940
4149
|
id: string;
|
|
3941
|
-
userId: string;
|
|
3942
4150
|
organizationId: string;
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
4151
|
+
status: DeploymentStatus;
|
|
4152
|
+
sdkVersion: string;
|
|
4153
|
+
deploymentVersion: string | null;
|
|
4154
|
+
port: number | null;
|
|
4155
|
+
pid: number | null;
|
|
4156
|
+
tarballPath: string | null;
|
|
4157
|
+
errorMessage: string | null;
|
|
3947
4158
|
createdAt: string;
|
|
3948
4159
|
updatedAt: string;
|
|
3949
4160
|
}
|
|
4161
|
+
|
|
3950
4162
|
/**
|
|
3951
|
-
*
|
|
4163
|
+
* GET /api/credentials - List credentials
|
|
3952
4164
|
*/
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
id:
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
}
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
workos_org_id: string;
|
|
3965
|
-
primaryDomain?: string;
|
|
3966
|
-
is_test?: boolean;
|
|
3967
|
-
status?: string;
|
|
3968
|
-
metadata?: Record<string, unknown>;
|
|
3969
|
-
config?: Record<string, unknown>;
|
|
3970
|
-
};
|
|
3971
|
-
config?: MembershipFeatureConfig;
|
|
3972
|
-
}
|
|
4165
|
+
declare const ListCredentialsResponseSchema: z.ZodObject<{
|
|
4166
|
+
credentials: z.ZodArray<z.ZodObject<{
|
|
4167
|
+
id: z.ZodString;
|
|
4168
|
+
name: z.ZodString;
|
|
4169
|
+
type: z.ZodString;
|
|
4170
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
4171
|
+
createdAt: z.ZodString;
|
|
4172
|
+
}, z.core.$strip>>;
|
|
4173
|
+
}, z.core.$strip>;
|
|
4174
|
+
/** API response type for a single credential list item */
|
|
4175
|
+
type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number];
|
|
3973
4176
|
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
id: string;
|
|
4177
|
+
type Props$2 = {
|
|
4178
|
+
permission: PermissionKey | string;
|
|
4179
|
+
fallback?: ReactNode;
|
|
4180
|
+
children: ReactNode;
|
|
4181
|
+
};
|
|
4182
|
+
declare function Can({ permission, fallback, children }: Props$2): react_jsx_runtime.JSX.Element | null;
|
|
4183
|
+
|
|
4184
|
+
type Props$1 = {
|
|
4185
|
+
slug: string;
|
|
3984
4186
|
name: string;
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
timestamp: number;
|
|
3998
|
-
credentialName: string;
|
|
3999
|
-
provider: string;
|
|
4000
|
-
}
|
|
4187
|
+
isSystem: boolean;
|
|
4188
|
+
};
|
|
4189
|
+
declare function RoleBadge({ name, isSystem }: Props$1): react_jsx_runtime.JSX.Element;
|
|
4190
|
+
|
|
4191
|
+
type PermissionRow = PermissionDescriptor;
|
|
4192
|
+
type Props = {
|
|
4193
|
+
catalog: PermissionRow[];
|
|
4194
|
+
selectedKeys: string[];
|
|
4195
|
+
onChange?: (keys: string[]) => void;
|
|
4196
|
+
systemLocked?: boolean;
|
|
4197
|
+
};
|
|
4198
|
+
declare function PermissionMatrix({ catalog, selectedKeys, onChange, systemLocked }: Props): react_jsx_runtime.JSX.Element;
|
|
4001
4199
|
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
successCount: number;
|
|
4019
|
-
errorCount: number;
|
|
4020
|
-
warningCount: number;
|
|
4021
|
-
executionCount: number;
|
|
4022
|
-
}>;
|
|
4023
|
-
statusCounts: {
|
|
4024
|
-
success: number;
|
|
4025
|
-
failed: number;
|
|
4026
|
-
pending: number;
|
|
4027
|
-
warning: number;
|
|
4028
|
-
};
|
|
4029
|
-
peakPeriod: string;
|
|
4030
|
-
granularity: 'hour' | 'day';
|
|
4031
|
-
}
|
|
4032
|
-
/**
|
|
4033
|
-
* Error analysis metrics response
|
|
4034
|
-
* Error categories and top failing resources
|
|
4035
|
-
*/
|
|
4036
|
-
interface ErrorAnalysisMetrics {
|
|
4037
|
-
totalErrors: number;
|
|
4038
|
-
errorsByCategory: Array<{
|
|
4039
|
-
category: string;
|
|
4040
|
-
count: number;
|
|
4041
|
-
percentage: number;
|
|
4042
|
-
}>;
|
|
4043
|
-
topFailingResources: Array<{
|
|
4044
|
-
resourceId: string;
|
|
4045
|
-
name: string;
|
|
4046
|
-
errorCount: number;
|
|
4047
|
-
failureRate: number;
|
|
4048
|
-
}>;
|
|
4049
|
-
}
|
|
4050
|
-
/**
|
|
4051
|
-
* Business impact metrics response
|
|
4052
|
-
* ROI, labor savings, and cost analysis
|
|
4053
|
-
*/
|
|
4054
|
-
interface BusinessImpactMetrics {
|
|
4055
|
-
totalSavingsUsd: number;
|
|
4056
|
-
totalCostUsd: number;
|
|
4057
|
-
netSavingsUsd: number;
|
|
4058
|
-
roi: number;
|
|
4059
|
-
}
|
|
4060
|
-
/**
|
|
4061
|
-
* Cost breakdown metrics response
|
|
4062
|
-
* Per-resource cost analysis
|
|
4063
|
-
*/
|
|
4064
|
-
interface CostBreakdownMetrics {
|
|
4065
|
-
resources: Array<{
|
|
4066
|
-
resourceId: string;
|
|
4067
|
-
totalCostUsd: number;
|
|
4068
|
-
executionCount: number;
|
|
4069
|
-
avgCostUsd: number;
|
|
4200
|
+
declare function NoAccessState(): react_jsx_runtime.JSX.Element;
|
|
4201
|
+
|
|
4202
|
+
type CreateRoleModalProps = {
|
|
4203
|
+
opened: boolean;
|
|
4204
|
+
onClose: () => void;
|
|
4205
|
+
onCreated?: (roleId: string) => void;
|
|
4206
|
+
};
|
|
4207
|
+
declare function CreateRoleModal({ opened, onClose, onCreated }: CreateRoleModalProps): react_jsx_runtime.JSX.Element;
|
|
4208
|
+
|
|
4209
|
+
declare function showAuthError(error: unknown): void;
|
|
4210
|
+
|
|
4211
|
+
interface EmptyStateProps {
|
|
4212
|
+
/** Icon component to display (e.g., IconKey from @tabler/icons-react) */
|
|
4213
|
+
icon: ComponentType<{
|
|
4214
|
+
size: number;
|
|
4215
|
+
style?: React.CSSProperties;
|
|
4070
4216
|
}>;
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
/** Health data for a single resource */
|
|
4081
|
-
interface ResourceHealth {
|
|
4082
|
-
entityType: string;
|
|
4083
|
-
entityId: string;
|
|
4084
|
-
entityName: string | null;
|
|
4085
|
-
trendData: ResourceHealthDataPoint[];
|
|
4086
|
-
summary: {
|
|
4087
|
-
total: number;
|
|
4088
|
-
successRate: number;
|
|
4217
|
+
/** Main title text */
|
|
4218
|
+
title: string;
|
|
4219
|
+
/** Description text shown below title */
|
|
4220
|
+
description?: string;
|
|
4221
|
+
/** Optional action button */
|
|
4222
|
+
action?: {
|
|
4223
|
+
label: string;
|
|
4224
|
+
onClick: () => void;
|
|
4225
|
+
icon?: ReactNode;
|
|
4089
4226
|
};
|
|
4227
|
+
/** Vertical padding - defaults to 'xl' */
|
|
4228
|
+
py?: MantineSpacing;
|
|
4090
4229
|
}
|
|
4091
4230
|
/**
|
|
4092
|
-
*
|
|
4093
|
-
*
|
|
4231
|
+
* EmptyState - Reusable empty state component for lists and tables
|
|
4232
|
+
*
|
|
4233
|
+
* Consolidates the Center + Stack + Icon + Text pattern used across:
|
|
4234
|
+
* - ApiKeyList.tsx
|
|
4235
|
+
* - CredentialList.tsx
|
|
4236
|
+
* - Various other list components
|
|
4237
|
+
*
|
|
4238
|
+
* @example
|
|
4239
|
+
* ```tsx
|
|
4240
|
+
* <EmptyState
|
|
4241
|
+
* icon={IconKey}
|
|
4242
|
+
* title="No API keys yet"
|
|
4243
|
+
* description="Create your first API key to enable external integrations"
|
|
4244
|
+
* action={{ label: "Create API Key", onClick: handleCreate }}
|
|
4245
|
+
* />
|
|
4246
|
+
* ```
|
|
4094
4247
|
*/
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4248
|
+
declare function EmptyState({ icon: Icon, title, description, action, py }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
4249
|
+
|
|
4250
|
+
interface TabCountBadgeProps {
|
|
4251
|
+
count: number;
|
|
4252
|
+
isLoading?: boolean;
|
|
4100
4253
|
}
|
|
4101
4254
|
/**
|
|
4102
|
-
*
|
|
4255
|
+
* A badge that displays a count in tabs with consistent sizing.
|
|
4256
|
+
* Uses a fixed-width container to prevent layout shift when switching
|
|
4257
|
+
* between the loading spinner and the count badge.
|
|
4103
4258
|
*/
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
granularity: 'hour' | 'day';
|
|
4107
|
-
totalCostUsd: number;
|
|
4108
|
-
totalExecutions: number;
|
|
4109
|
-
}
|
|
4259
|
+
declare function TabCountBadge({ count, isLoading }: TabCountBadgeProps): react_jsx_runtime.JSX.Element;
|
|
4260
|
+
|
|
4110
4261
|
/**
|
|
4111
|
-
*
|
|
4262
|
+
* TrendIndicator - Reusable component for showing percentage change trends
|
|
4263
|
+
* Displays up/down/flat arrow with colored badge
|
|
4112
4264
|
*/
|
|
4113
|
-
interface
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
mtd: {
|
|
4123
|
-
totalCostUsd: number;
|
|
4124
|
-
daysElapsed: number;
|
|
4125
|
-
};
|
|
4126
|
-
projection: {
|
|
4127
|
-
monthlyCostUsd: number;
|
|
4128
|
-
confidence: 'low' | 'medium' | 'high';
|
|
4129
|
-
};
|
|
4130
|
-
trend: {
|
|
4131
|
-
changePercent: number;
|
|
4132
|
-
direction: 'up' | 'down' | 'flat';
|
|
4133
|
-
};
|
|
4265
|
+
interface TrendIndicatorProps {
|
|
4266
|
+
/** Current value */
|
|
4267
|
+
current: number;
|
|
4268
|
+
/** Previous value to compare against */
|
|
4269
|
+
previous: number;
|
|
4270
|
+
/** Optional formatter for the value (not used in display but kept for API compatibility) */
|
|
4271
|
+
formatter?: (value: number) => string;
|
|
4272
|
+
/** If true, negative change is considered positive (e.g., for costs) */
|
|
4273
|
+
inverse?: boolean;
|
|
4134
4274
|
}
|
|
4135
4275
|
/**
|
|
4136
|
-
*
|
|
4276
|
+
* Shows a trend indicator with arrow icon and percentage change badge
|
|
4277
|
+
*
|
|
4278
|
+
* @example
|
|
4279
|
+
* // Positive trend (green when going up)
|
|
4280
|
+
* <TrendIndicator current={100} previous={80} />
|
|
4281
|
+
*
|
|
4282
|
+
* @example
|
|
4283
|
+
* // Inverse trend (green when going down, useful for costs)
|
|
4284
|
+
* <TrendIndicator current={100} previous={120} inverse />
|
|
4137
4285
|
*/
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4286
|
+
declare function TrendIndicator({ current, previous, inverse }: TrendIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
4287
|
+
|
|
4288
|
+
interface CollapsibleSectionProps {
|
|
4289
|
+
title: string | ReactNode;
|
|
4290
|
+
count?: number;
|
|
4291
|
+
countLabel?: string;
|
|
4292
|
+
children: ReactNode;
|
|
4293
|
+
emptyMessage?: string;
|
|
4294
|
+
defaultExpanded?: boolean;
|
|
4295
|
+
maxHeight?: number;
|
|
4145
4296
|
}
|
|
4146
4297
|
/**
|
|
4147
|
-
*
|
|
4298
|
+
* Reusable collapsible section with header, badge, and scroll area
|
|
4299
|
+
* Used for expandable content like memory sections, logs, etc.
|
|
4148
4300
|
*/
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4301
|
+
declare function CollapsibleSection({ title, count, countLabel, children, emptyMessage, defaultExpanded, maxHeight }: CollapsibleSectionProps): react_jsx_runtime.JSX.Element;
|
|
4302
|
+
|
|
4303
|
+
interface PageTitleCaptionProps {
|
|
4304
|
+
title: string;
|
|
4305
|
+
caption?: string;
|
|
4306
|
+
rightSection?: ReactNode;
|
|
4153
4307
|
}
|
|
4308
|
+
declare const PageTitleCaption: ({ title, caption, rightSection }: PageTitleCaptionProps) => react_jsx_runtime.JSX.Element;
|
|
4154
4309
|
|
|
4310
|
+
interface StatsCardSkeletonProps {
|
|
4311
|
+
/** Height of the loader area - defaults to 200 */
|
|
4312
|
+
chartHeight?: number;
|
|
4313
|
+
/** Kept for API compat, unused */
|
|
4314
|
+
withChart?: boolean;
|
|
4315
|
+
/** Kept for API compat, unused */
|
|
4316
|
+
statCount?: 2 | 3;
|
|
4317
|
+
}
|
|
4155
4318
|
/**
|
|
4156
|
-
*
|
|
4157
|
-
*
|
|
4319
|
+
* StatsCardSkeleton - Loading state for dashboard metric cards
|
|
4320
|
+
*
|
|
4321
|
+
* Used across:
|
|
4322
|
+
* - ExecutionHealthCard.tsx
|
|
4323
|
+
* - CostMetricsCard.tsx
|
|
4324
|
+
* - ThroughputCard.tsx
|
|
4325
|
+
* - BusinessImpactCard.tsx
|
|
4158
4326
|
*/
|
|
4159
|
-
|
|
4327
|
+
declare function StatsCardSkeleton({ chartHeight }: StatsCardSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
4328
|
+
interface ListSkeletonProps {
|
|
4329
|
+
/** Number of rows (used to calculate height) - defaults to 3 */
|
|
4330
|
+
rows?: number;
|
|
4331
|
+
/** Height of each row - defaults to 50 */
|
|
4332
|
+
rowHeight?: number;
|
|
4333
|
+
}
|
|
4160
4334
|
/**
|
|
4161
|
-
*
|
|
4162
|
-
* from registry/types.ts. All resources (executable and non-executable) now extend
|
|
4163
|
-
* the unified ResourceDefinition base interface.
|
|
4335
|
+
* ListSkeleton - Loading state for table/list content
|
|
4164
4336
|
*
|
|
4165
|
-
*
|
|
4166
|
-
*
|
|
4337
|
+
* Used across:
|
|
4338
|
+
* - ApiKeyList.tsx
|
|
4339
|
+
* - CredentialList.tsx
|
|
4340
|
+
* - DeploymentList.tsx
|
|
4341
|
+
* - WebhookEndpointList.tsx
|
|
4167
4342
|
*/
|
|
4168
|
-
|
|
4169
|
-
|
|
4343
|
+
declare function ListSkeleton({ rows, rowHeight }: ListSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
4344
|
+
interface DetailCardSkeletonProps {
|
|
4345
|
+
/** Number of detail rows (used to calculate height) - defaults to 3 */
|
|
4346
|
+
rows?: number;
|
|
4347
|
+
}
|
|
4170
4348
|
/**
|
|
4171
|
-
*
|
|
4349
|
+
* DetailCardSkeleton - Loading state for cards with list of detail items
|
|
4350
|
+
*
|
|
4351
|
+
* Used for cards like CostBreakdownCard
|
|
4172
4352
|
*/
|
|
4353
|
+
declare function DetailCardSkeleton({ rows }: DetailCardSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
4173
4354
|
|
|
4355
|
+
interface NavigationButtonProps {
|
|
4356
|
+
/** Icon component to display */
|
|
4357
|
+
icon: React__default.ComponentType<{
|
|
4358
|
+
size?: number;
|
|
4359
|
+
stroke?: number;
|
|
4360
|
+
}>;
|
|
4361
|
+
/** Button label text */
|
|
4362
|
+
label: string;
|
|
4363
|
+
/** Whether the button is in collapsed state (hides text) */
|
|
4364
|
+
isCollapsed?: boolean;
|
|
4365
|
+
/** Whether this button has sub-items/links */
|
|
4366
|
+
hasSubItems?: boolean;
|
|
4367
|
+
/** Whether sub-items are expanded (controls chevron rotation) */
|
|
4368
|
+
isExpanded?: boolean;
|
|
4369
|
+
/** Whether the icon and text should be styled as active */
|
|
4370
|
+
isActive?: boolean;
|
|
4371
|
+
/** Whether the background should be styled as active */
|
|
4372
|
+
hasActiveBackground?: boolean;
|
|
4373
|
+
/** Click handler */
|
|
4374
|
+
onClick?: () => void;
|
|
4375
|
+
/** Additional styles for the button container */
|
|
4376
|
+
style?: React__default.CSSProperties;
|
|
4377
|
+
/** Custom transition duration in ms */
|
|
4378
|
+
transitionDuration?: number;
|
|
4379
|
+
}
|
|
4380
|
+
declare const NavigationButton: React__default.FC<NavigationButtonProps>;
|
|
4381
|
+
|
|
4382
|
+
interface CustomSelectorProps {
|
|
4383
|
+
value: string | null;
|
|
4384
|
+
onChange: (value: string | null) => void;
|
|
4385
|
+
data: {
|
|
4386
|
+
value: string;
|
|
4387
|
+
label: string;
|
|
4388
|
+
}[] | readonly {
|
|
4389
|
+
value: string;
|
|
4390
|
+
label: string;
|
|
4391
|
+
}[];
|
|
4392
|
+
leftSection?: ReactNode;
|
|
4393
|
+
placeholder?: string;
|
|
4394
|
+
w?: number | string;
|
|
4395
|
+
withCheckIcon?: boolean;
|
|
4396
|
+
disabled?: boolean;
|
|
4397
|
+
}
|
|
4398
|
+
declare function CustomSelector({ value, onChange, data, leftSection, placeholder, w, withCheckIcon, disabled }: CustomSelectorProps): react_jsx_runtime.JSX.Element;
|
|
4399
|
+
|
|
4400
|
+
interface APIErrorAlertProps {
|
|
4401
|
+
/**
|
|
4402
|
+
* The error to display. Can be an APIClientError, generic Error, or any unknown value.
|
|
4403
|
+
*/
|
|
4404
|
+
error: unknown;
|
|
4405
|
+
/**
|
|
4406
|
+
* Optional title override. If not provided, uses getErrorTitle() based on error code.
|
|
4407
|
+
*/
|
|
4408
|
+
title?: string;
|
|
4409
|
+
/**
|
|
4410
|
+
* Whether to show the request ID (if available). Defaults to true.
|
|
4411
|
+
*/
|
|
4412
|
+
showRequestId?: boolean;
|
|
4413
|
+
/**
|
|
4414
|
+
* Optional custom icon. Defaults to IconAlertCircle.
|
|
4415
|
+
*/
|
|
4416
|
+
icon?: React.ReactNode;
|
|
4417
|
+
/**
|
|
4418
|
+
* Alert color. Defaults to 'red'.
|
|
4419
|
+
*/
|
|
4420
|
+
color?: string;
|
|
4421
|
+
}
|
|
4174
4422
|
/**
|
|
4175
|
-
*
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
*
|
|
4180
|
-
*
|
|
4423
|
+
* Alert component for displaying API errors with type-safe error handling.
|
|
4424
|
+
*
|
|
4425
|
+
* Automatically extracts error message, code, and request ID from APIClientError
|
|
4426
|
+
* or falls back to generic Error handling.
|
|
4427
|
+
*
|
|
4428
|
+
* @example
|
|
4429
|
+
* ```tsx
|
|
4430
|
+
* const { data, error } = useQuery(...)
|
|
4431
|
+
*
|
|
4432
|
+
* if (error) {
|
|
4433
|
+
* return <APIErrorAlert error={error} />
|
|
4434
|
+
* }
|
|
4435
|
+
* ```
|
|
4436
|
+
*
|
|
4437
|
+
* @example With custom title
|
|
4438
|
+
* ```tsx
|
|
4439
|
+
* <APIErrorAlert
|
|
4440
|
+
* error={error}
|
|
4441
|
+
* title="Failed to load resources"
|
|
4442
|
+
* />
|
|
4443
|
+
* ```
|
|
4444
|
+
*
|
|
4445
|
+
* @example Without request ID
|
|
4446
|
+
* ```tsx
|
|
4447
|
+
* <APIErrorAlert
|
|
4448
|
+
* error={error}
|
|
4449
|
+
* showRequestId={false}
|
|
4450
|
+
* />
|
|
4451
|
+
* ```
|
|
4181
4452
|
*/
|
|
4182
|
-
|
|
4453
|
+
declare function APIErrorAlert({ error, title, showRequestId, icon, color }: APIErrorAlertProps): react_jsx_runtime.JSX.Element;
|
|
4454
|
+
|
|
4455
|
+
interface CenteredErrorStateProps {
|
|
4456
|
+
error: unknown;
|
|
4457
|
+
title?: string;
|
|
4458
|
+
/** Minimum height of the centering container. Defaults to 300. */
|
|
4459
|
+
h?: number | string;
|
|
4460
|
+
/** Vertical padding (used when h is not set). */
|
|
4461
|
+
py?: MantineSpacing;
|
|
4462
|
+
}
|
|
4183
4463
|
/**
|
|
4184
|
-
*
|
|
4185
|
-
*
|
|
4464
|
+
* CenteredErrorState - Displays an error centered inside its container.
|
|
4465
|
+
*
|
|
4466
|
+
* The caller is responsible for providing the container (e.g. `<Paper withBorder>`).
|
|
4467
|
+
* This component only handles centering + rendering the error alert.
|
|
4468
|
+
*
|
|
4469
|
+
* @example
|
|
4470
|
+
* ```tsx
|
|
4471
|
+
* if (error) {
|
|
4472
|
+
* return (
|
|
4473
|
+
* <Paper withBorder>
|
|
4474
|
+
* <CenteredErrorState error={error} title="Failed to load trends" />
|
|
4475
|
+
* </Paper>
|
|
4476
|
+
* )
|
|
4477
|
+
* }
|
|
4478
|
+
* ```
|
|
4186
4479
|
*/
|
|
4187
|
-
|
|
4188
|
-
/** Unique resource identifier */
|
|
4189
|
-
resourceId: string;
|
|
4190
|
-
/** Display name */
|
|
4191
|
-
name: string;
|
|
4192
|
-
/** Purpose and functionality description */
|
|
4193
|
-
description: string;
|
|
4194
|
-
/** Version for change tracking and evolution */
|
|
4195
|
-
version: string;
|
|
4196
|
-
/** Resource type discriminator */
|
|
4197
|
-
type: ResourceType;
|
|
4198
|
-
/** Environment/deployment status */
|
|
4199
|
-
status: ResourceStatus;
|
|
4200
|
-
/** Graph links to Organization Model nodes */
|
|
4201
|
-
links?: ResourceLink[];
|
|
4202
|
-
/** Infrastructure category for filtering */
|
|
4203
|
-
category?: ResourceCategory;
|
|
4204
|
-
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
4205
|
-
sessionCapable?: boolean;
|
|
4206
|
-
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
4207
|
-
origin?: 'local' | 'remote';
|
|
4208
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
4209
|
-
archived?: boolean;
|
|
4210
|
-
}
|
|
4211
|
-
|
|
4212
|
-
declare const LinkSchema: z.ZodObject<{
|
|
4213
|
-
nodeId: z.ZodString;
|
|
4214
|
-
kind: z.ZodEnum<{
|
|
4215
|
-
contains: "contains";
|
|
4216
|
-
references: "references";
|
|
4217
|
-
exposes: "exposes";
|
|
4218
|
-
maps_to: "maps_to";
|
|
4219
|
-
"operates-on": "operates-on";
|
|
4220
|
-
uses: "uses";
|
|
4221
|
-
}>;
|
|
4222
|
-
}, z.core.$strip>;
|
|
4223
|
-
type Link = z.infer<typeof LinkSchema>;
|
|
4224
|
-
|
|
4225
|
-
declare const ResourceCategorySchema: z.ZodEnum<{
|
|
4226
|
-
production: "production";
|
|
4227
|
-
diagnostic: "diagnostic";
|
|
4228
|
-
internal: "internal";
|
|
4229
|
-
testing: "testing";
|
|
4230
|
-
}>;
|
|
4231
|
-
type ResourceCategory = z.infer<typeof ResourceCategorySchema>;
|
|
4232
|
-
type ResourceLink = Link;
|
|
4480
|
+
declare function CenteredErrorState({ error, title, h, py }: CenteredErrorStateProps): react_jsx_runtime.JSX.Element;
|
|
4233
4481
|
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4482
|
+
interface StatCardBaseProps {
|
|
4483
|
+
/** The label/description text */
|
|
4484
|
+
label: string;
|
|
4485
|
+
/** The value to display (number or formatted string) */
|
|
4486
|
+
value: string | number;
|
|
4487
|
+
/** Tabler icon component */
|
|
4488
|
+
icon: Icon;
|
|
4489
|
+
/** Optional extra content rendered below the label */
|
|
4490
|
+
children?: ReactNode;
|
|
4241
4491
|
}
|
|
4242
|
-
interface
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
apiVersion?: string | null;
|
|
4249
|
-
resourceVersion?: string | null;
|
|
4250
|
-
sdkVersion?: string | null;
|
|
4251
|
-
isArchived?: boolean;
|
|
4252
|
-
archivedLogCount?: number;
|
|
4492
|
+
interface StatCardDefaultProps extends StatCardBaseProps {
|
|
4493
|
+
variant?: 'default';
|
|
4494
|
+
/** Theme color for the icon (defaults to theme primary) */
|
|
4495
|
+
color?: MantineColor;
|
|
4496
|
+
isLoading?: never;
|
|
4497
|
+
valueColor?: never;
|
|
4253
4498
|
}
|
|
4254
|
-
|
|
4499
|
+
interface StatCardHeroProps extends StatCardBaseProps {
|
|
4500
|
+
variant: 'hero';
|
|
4501
|
+
/** Whether data is loading */
|
|
4502
|
+
isLoading?: boolean;
|
|
4503
|
+
/** Custom color for the value text */
|
|
4504
|
+
valueColor?: string;
|
|
4505
|
+
/** Card sizing — 'sm' (default) for compact layouts, 'md' for spacious layouts */
|
|
4506
|
+
size?: 'sm' | 'md';
|
|
4507
|
+
color?: never;
|
|
4508
|
+
}
|
|
4509
|
+
type StatCardProps = StatCardDefaultProps | StatCardHeroProps;
|
|
4255
4510
|
/**
|
|
4256
|
-
*
|
|
4511
|
+
* StatCard - Stat display card with icon, label, and value.
|
|
4257
4512
|
*
|
|
4258
|
-
*
|
|
4259
|
-
*
|
|
4513
|
+
* Supports two variants:
|
|
4514
|
+
* - `default`: Compact card with ThemeIcon (used in admin overviews)
|
|
4515
|
+
* - `hero`: Glass card with glowing icon ring (used on dashboards)
|
|
4516
|
+
*
|
|
4517
|
+
* @example
|
|
4518
|
+
* ```tsx
|
|
4519
|
+
* // Default variant
|
|
4520
|
+
* <StatCard label="Total Executions" value={150} icon={IconPlayerPlay} color="blue" />
|
|
4521
|
+
*
|
|
4522
|
+
* // Hero variant
|
|
4523
|
+
* <StatCard variant="hero" label="Executions" value={43} icon={IconPlayerPlay} isLoading={false} />
|
|
4524
|
+
* ```
|
|
4260
4525
|
*/
|
|
4261
|
-
|
|
4526
|
+
declare function StatCard(props: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
4262
4527
|
/**
|
|
4263
|
-
*
|
|
4264
|
-
* Used by both @repo/core (metadata) and @repo/ui (components)
|
|
4528
|
+
* StatCardSkeleton - Loading skeleton for StatCard (default variant)
|
|
4265
4529
|
*/
|
|
4266
|
-
|
|
4530
|
+
declare function StatCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
4267
4531
|
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
entityType: string;
|
|
4278
|
-
entityId: string;
|
|
4279
|
-
entityName: string | null;
|
|
4280
|
-
metadata: Record<string, unknown> | null;
|
|
4281
|
-
actorId: string | null;
|
|
4282
|
-
actorType: string | null;
|
|
4283
|
-
occurredAt: Date;
|
|
4284
|
-
createdAt: Date;
|
|
4532
|
+
interface StyledMarkdownProps {
|
|
4533
|
+
/** Markdown content to render */
|
|
4534
|
+
children: string;
|
|
4535
|
+
/** Custom component overrides */
|
|
4536
|
+
components?: Partial<Components>;
|
|
4537
|
+
/** Additional class name */
|
|
4538
|
+
className?: string;
|
|
4539
|
+
/** Inline styles for the wrapper div */
|
|
4540
|
+
style?: React.CSSProperties;
|
|
4285
4541
|
}
|
|
4286
|
-
|
|
4287
4542
|
/**
|
|
4288
|
-
*
|
|
4543
|
+
* Styled markdown renderer with Mantine components and syntax highlighting
|
|
4289
4544
|
*
|
|
4290
|
-
*
|
|
4291
|
-
*
|
|
4545
|
+
* Features:
|
|
4546
|
+
* - Colored headings using theme primary color
|
|
4547
|
+
* - Syntax-highlighted code blocks (oneDark theme, no token backgrounds)
|
|
4548
|
+
* - Styled inline code with Mantine Code component
|
|
4549
|
+
* - Styled blockquotes with left border
|
|
4550
|
+
* - Proper list styling
|
|
4551
|
+
*
|
|
4552
|
+
* @example
|
|
4553
|
+
* ```tsx
|
|
4554
|
+
* import { StyledMarkdown } from '@repo/ui'
|
|
4555
|
+
*
|
|
4556
|
+
* <StyledMarkdown>{markdownContent}</StyledMarkdown>
|
|
4557
|
+
* ```
|
|
4292
4558
|
*/
|
|
4559
|
+
declare function StyledMarkdown({ children, components, className, style }: StyledMarkdownProps): react_jsx_runtime.JSX.Element;
|
|
4293
4560
|
|
|
4294
|
-
interface
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
interface: SerializedExecutionInterface;
|
|
4561
|
+
interface JsonViewerProps {
|
|
4562
|
+
/** JSON data to display (will be stringified) or pre-formatted JSON string */
|
|
4563
|
+
data: unknown;
|
|
4564
|
+
/** Maximum height with scroll (e.g., '300px'). If not set, expands to content */
|
|
4565
|
+
maxHeight?: string | number;
|
|
4566
|
+
/** Font size override */
|
|
4567
|
+
fontSize?: string | number;
|
|
4302
4568
|
}
|
|
4303
|
-
|
|
4304
4569
|
/**
|
|
4305
|
-
*
|
|
4570
|
+
* Syntax-highlighted JSON viewer component
|
|
4306
4571
|
*
|
|
4307
|
-
*
|
|
4308
|
-
*
|
|
4572
|
+
* @example
|
|
4573
|
+
* ```tsx
|
|
4574
|
+
* import { JsonViewer } from '@repo/ui'
|
|
4575
|
+
*
|
|
4576
|
+
* <JsonViewer data={{ foo: 'bar', count: 42 }} />
|
|
4577
|
+
* <JsonViewer data={apiResponse} maxHeight={300} />
|
|
4578
|
+
* ```
|
|
4309
4579
|
*/
|
|
4310
|
-
|
|
4311
|
-
interface Deployment {
|
|
4312
|
-
id: string;
|
|
4313
|
-
organizationId: string;
|
|
4314
|
-
status: DeploymentStatus;
|
|
4315
|
-
sdkVersion: string;
|
|
4316
|
-
deploymentVersion: string | null;
|
|
4317
|
-
port: number | null;
|
|
4318
|
-
pid: number | null;
|
|
4319
|
-
tarballPath: string | null;
|
|
4320
|
-
errorMessage: string | null;
|
|
4321
|
-
createdAt: string;
|
|
4322
|
-
updatedAt: string;
|
|
4323
|
-
}
|
|
4580
|
+
declare function JsonViewer({ data, maxHeight, fontSize }: JsonViewerProps): react_jsx_runtime.JSX.Element;
|
|
4324
4581
|
|
|
4582
|
+
interface ContextViewerProps {
|
|
4583
|
+
/** Any JSON-serializable data to display in a human-readable format */
|
|
4584
|
+
data: unknown;
|
|
4585
|
+
}
|
|
4325
4586
|
/**
|
|
4326
|
-
*
|
|
4587
|
+
* Auto-formats any JSON context into a human-readable layout.
|
|
4588
|
+
*
|
|
4589
|
+
* - Strings → rendered as markdown (supports formatting, lists, tables)
|
|
4590
|
+
* - Flat key-value objects → labeled field list
|
|
4591
|
+
* - Nested objects → indented subsections with left border
|
|
4592
|
+
* - Arrays → bulleted lists or bordered cards
|
|
4593
|
+
* - null/undefined/boolean/number → inline text
|
|
4594
|
+
*
|
|
4595
|
+
* No display configuration needed — the component infers layout from data shape.
|
|
4327
4596
|
*/
|
|
4328
|
-
declare
|
|
4329
|
-
credentials: z.ZodArray<z.ZodObject<{
|
|
4330
|
-
id: z.ZodString;
|
|
4331
|
-
name: z.ZodString;
|
|
4332
|
-
type: z.ZodString;
|
|
4333
|
-
provider: z.ZodNullable<z.ZodString>;
|
|
4334
|
-
createdAt: z.ZodString;
|
|
4335
|
-
}, z.core.$strip>>;
|
|
4336
|
-
}, z.core.$strip>;
|
|
4337
|
-
/** API response type for a single credential list item */
|
|
4338
|
-
type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number];
|
|
4597
|
+
declare function ContextViewer({ data }: ContextViewerProps): react_jsx_runtime.JSX.Element;
|
|
4339
4598
|
|
|
4340
4599
|
interface TimeRangeSelectorProps {
|
|
4341
4600
|
value: TimeRange;
|
|
@@ -4446,7 +4705,7 @@ interface ICustomModalProps {
|
|
|
4446
4705
|
children: React__default.ReactNode | React__default.ReactNode[] | string;
|
|
4447
4706
|
loading?: boolean;
|
|
4448
4707
|
style?: React__default.CSSProperties;
|
|
4449
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4708
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | string;
|
|
4450
4709
|
}
|
|
4451
4710
|
declare const CustomModal: ({ children, opened, onClose, loading, style, size }: ICustomModalProps) => react_jsx_runtime.JSX.Element;
|
|
4452
4711
|
|
|
@@ -4633,7 +4892,8 @@ interface CreateCredentialResponse {
|
|
|
4633
4892
|
declare const WebhookEndpointResponseSchema: z.ZodObject<{
|
|
4634
4893
|
id: z.ZodString;
|
|
4635
4894
|
organizationId: z.ZodString;
|
|
4636
|
-
key: z.ZodString
|
|
4895
|
+
key: z.ZodOptional<z.ZodString>;
|
|
4896
|
+
keyPrefix: z.ZodNullable<z.ZodString>;
|
|
4637
4897
|
name: z.ZodString;
|
|
4638
4898
|
description: z.ZodNullable<z.ZodString>;
|
|
4639
4899
|
resourceId: z.ZodNullable<z.ZodString>;
|
|
@@ -6296,6 +6556,9 @@ type FeatureIconComponent = ComponentType<{
|
|
|
6296
6556
|
size?: number;
|
|
6297
6557
|
stroke?: number;
|
|
6298
6558
|
}>;
|
|
6559
|
+
type FeatureSidebarWidthResolver = number | ((context: {
|
|
6560
|
+
currentPath: string;
|
|
6561
|
+
}) => number);
|
|
6299
6562
|
interface FeatureModule {
|
|
6300
6563
|
/** Unique stable identifier for this feature module. */
|
|
6301
6564
|
key: string;
|
|
@@ -6307,6 +6570,8 @@ interface FeatureModule {
|
|
|
6307
6570
|
icon?: FeatureIconComponent;
|
|
6308
6571
|
/** Sidebar component rendered when this feature's subtree route is active. */
|
|
6309
6572
|
sidebar?: FeatureSidebarComponent;
|
|
6573
|
+
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
6574
|
+
sidebarWidth?: FeatureSidebarWidthResolver;
|
|
6310
6575
|
/** Operations-only bridge connecting this feature to the organization graph node. */
|
|
6311
6576
|
organizationGraph?: OrganizationGraphFeatureBridge;
|
|
6312
6577
|
}
|
|
@@ -6476,5 +6741,5 @@ declare const OperationsSidebarMiddle: () => react_jsx_runtime.JSX.Element;
|
|
|
6476
6741
|
|
|
6477
6742
|
declare const operationsManifest: FeatureModule;
|
|
6478
6743
|
|
|
6479
|
-
export { APIErrorAlert, AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, ActivityTimeline, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, CONTAINER_CONSTANTS, CardHeader, CenteredErrorState, CheckpointGroup, CollapsibleJsonSection, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewEdge, CommandViewGraph, CommandViewNode, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContextUsageBadge, ContextViewer, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, CustomSelector, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealDrawer, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, DetailCardSkeleton, EditApiKeyModal, ElevasisLoader, EmptyState, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FeatureUnavailableState, FilterBar, FormFieldRenderer, GlowDot, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, JsonViewer, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LIST_TEMPLATE_OPTIONS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, ListSkeleton, LogEntry, LogGroup, MdxRenderer, MembershipFeaturePanel, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PageNotFound, PageTitleCaption, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceCard, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RunResourceButton, SAVED_VIEW_PRESETS, SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, SHARED_VIZ_CONSTANTS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, StyledMarkdown, TabCountBadge, TableSelectionToolbar, TaskCard, TaskScheduler, TasksDueWidget, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, buildErrorReport, buildListConfig, calculateProgress, catalogItemToResourceDefinition, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, seoManifest, settingsManifest, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity };
|
|
6480
|
-
export type { ActivityEntry, ActivityFiltersProps, ActivityTableProps, BaseEdgeProps, BaseExecutionLogsProps, BreadcrumbsProps, CommandViewGraphRef, ContextViewerProps, CostByModelTableProps, CrashErrorFallbackProps, CrmOverviewProps, DealDrawerProps, DealKanbanCardProps, ErrorAnalysisCardProps, ErrorReportCardProps, ExecutionBreakdownTableProps, ExecutionHealthCardProps, ExecutionLogEntry, ExecutionLogsFiltersProps, ExecutionLogsTableProps, FeatureUnavailableStateProps, FitViewButtonVariant, FormFieldRendererProps, GraphFitViewHandlerProps, JsonViewerProps, KanbanBoardProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, LogLevel, MdxRendererProps, NavigationButtonProps, ProjectsSidebarMiddleProps, ResourceHealthPanelProps, RichTextEditorProps, RunResourceButtonProps, RunResourceInputResolver, SavedViewPreset, ScheduleType, SerializedKnowledgeMap, SerializedKnowledgeNode, StatCardProps, StyledMarkdownProps, TaskFilterStatus, TrendIndicatorProps, ZodFormRendererProps };
|
|
6744
|
+
export { APIErrorAlert, AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, ActivityTimeline, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, CONTAINER_CONSTANTS, Can, CardHeader, CenteredErrorState, CheckpointGroup, CollapsibleJsonSection, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewEdge, CommandViewGraph, CommandViewNode, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContextUsageBadge, ContextViewer, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateRoleModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, CustomSelector, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealDrawer, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, DetailCardSkeleton, EditApiKeyModal, ElevasisLoader, EmptyState, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FeatureUnavailableState, FilterBar, FormFieldRenderer, GlowDot, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, JsonViewer, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LIST_TEMPLATE_OPTIONS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, ListSkeleton, LogEntry, LogGroup, MdxRenderer, MembershipFeaturePanel, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NoAccessState, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PageNotFound, PageTitleCaption, PermissionMatrix, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceCard, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RoleBadge, RunResourceButton, SAVED_VIEW_PRESETS, SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, SHARED_VIZ_CONSTANTS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, StyledMarkdown, TabCountBadge, TableSelectionToolbar, TaskCard, TaskScheduler, TasksDueWidget, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, buildErrorReport, buildListConfig, calculateProgress, catalogItemToResourceDefinition, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, seoManifest, settingsManifest, showApiErrorNotification, showAuthError, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity };
|
|
6745
|
+
export type { ActivityEntry, ActivityFiltersProps, ActivityTableProps, BaseEdgeProps, BaseExecutionLogsProps, BreadcrumbsProps, CommandViewGraphRef, ContextViewerProps, CostByModelTableProps, CrashErrorFallbackProps, CreateRoleModalProps, CrmOverviewProps, DealDrawerProps, DealKanbanCardProps, ErrorAnalysisCardProps, ErrorReportCardProps, ExecutionBreakdownTableProps, ExecutionHealthCardProps, ExecutionLogEntry, ExecutionLogsFiltersProps, ExecutionLogsTableProps, FeatureUnavailableStateProps, FitViewButtonVariant, FormFieldRendererProps, GraphFitViewHandlerProps, JsonViewerProps, KanbanBoardProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, LogLevel, MdxRendererProps, NavigationButtonProps, PermissionRow, ProjectsSidebarMiddleProps, ResourceHealthPanelProps, RichTextEditorProps, RunResourceButtonProps, RunResourceInputResolver, SavedViewPreset, ScheduleType, SerializedKnowledgeMap, SerializedKnowledgeNode, StatCardProps, StyledMarkdownProps, TaskFilterStatus, TrendIndicatorProps, ZodFormRendererProps };
|