@datatechsolutions/ui 2.11.1 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/contracts.d.mts +293 -0
- package/dist/astrlabe/contracts.d.ts +293 -0
- package/dist/astrlabe/contracts.js +5 -0
- package/dist/astrlabe/contracts.js.map +1 -0
- package/dist/astrlabe/contracts.mjs +4 -0
- package/dist/astrlabe/contracts.mjs.map +1 -0
- package/dist/astrlabe/graph-node.d.mts +28 -0
- package/dist/astrlabe/graph-node.d.ts +28 -0
- package/dist/astrlabe/graph-node.js +26 -0
- package/dist/astrlabe/graph-node.js.map +1 -0
- package/dist/astrlabe/graph-node.mjs +5 -0
- package/dist/astrlabe/graph-node.mjs.map +1 -0
- package/dist/astrlabe/index.d.mts +707 -0
- package/dist/astrlabe/index.d.ts +707 -0
- package/dist/astrlabe/index.js +3247 -0
- package/dist/astrlabe/index.js.map +1 -0
- package/dist/astrlabe/index.mjs +2956 -0
- package/dist/astrlabe/index.mjs.map +1 -0
- package/dist/astrlabe/utils.d.mts +71 -0
- package/dist/astrlabe/utils.d.ts +71 -0
- package/dist/astrlabe/utils.js +30 -0
- package/dist/astrlabe/utils.js.map +1 -0
- package/dist/astrlabe/utils.mjs +5 -0
- package/dist/astrlabe/utils.mjs.map +1 -0
- package/dist/astrlabe/workflow-canvas.d.mts +5 -0
- package/dist/astrlabe/workflow-canvas.d.ts +5 -0
- package/dist/astrlabe/workflow-canvas.js +19 -0
- package/dist/astrlabe/workflow-canvas.js.map +1 -0
- package/dist/astrlabe/workflow-canvas.mjs +10 -0
- package/dist/astrlabe/workflow-canvas.mjs.map +1 -0
- package/dist/astrlabe/workflow-preview-canvas.d.mts +10 -0
- package/dist/astrlabe/workflow-preview-canvas.d.ts +10 -0
- package/dist/astrlabe/workflow-preview-canvas.js +28 -0
- package/dist/astrlabe/workflow-preview-canvas.js.map +1 -0
- package/dist/astrlabe/workflow-preview-canvas.mjs +26 -0
- package/dist/astrlabe/workflow-preview-canvas.mjs.map +1 -0
- package/dist/chunk-3GE3MBUZ.js +279 -0
- package/dist/chunk-3GE3MBUZ.js.map +1 -0
- package/dist/chunk-55H6WZQP.js +5 -0
- package/dist/chunk-55H6WZQP.js.map +1 -0
- package/dist/chunk-7VJ7CMMT.mjs +96 -0
- package/dist/chunk-7VJ7CMMT.mjs.map +1 -0
- package/dist/chunk-BLNXRUC4.mjs +276 -0
- package/dist/chunk-BLNXRUC4.mjs.map +1 -0
- package/dist/chunk-D2JF6C3E.mjs +46 -0
- package/dist/chunk-D2JF6C3E.mjs.map +1 -0
- package/dist/chunk-JB6RNAD2.mjs +4 -0
- package/dist/chunk-JB6RNAD2.mjs.map +1 -0
- package/dist/chunk-LJSJMBLO.mjs +7177 -0
- package/dist/chunk-LJSJMBLO.mjs.map +1 -0
- package/dist/chunk-OZNTQROP.mjs +39 -0
- package/dist/chunk-OZNTQROP.mjs.map +1 -0
- package/dist/chunk-P4YYEM4B.js +44 -0
- package/dist/chunk-P4YYEM4B.js.map +1 -0
- package/dist/chunk-PBKTXX4Y.js +20756 -0
- package/dist/chunk-PBKTXX4Y.js.map +1 -0
- package/dist/chunk-PWBWP5FJ.js +197 -0
- package/dist/chunk-PWBWP5FJ.js.map +1 -0
- package/dist/chunk-QWG2FMUN.mjs +60 -0
- package/dist/chunk-QWG2FMUN.mjs.map +1 -0
- package/dist/chunk-S7KHTUHA.js +65 -0
- package/dist/chunk-S7KHTUHA.js.map +1 -0
- package/dist/chunk-TLPPVL3W.mjs +189 -0
- package/dist/chunk-TLPPVL3W.mjs.map +1 -0
- package/dist/chunk-UZ3CMNUJ.js +49 -0
- package/dist/chunk-UZ3CMNUJ.js.map +1 -0
- package/dist/chunk-XAQME7DD.js +7238 -0
- package/dist/chunk-XAQME7DD.js.map +1 -0
- package/dist/chunk-XO7IYJSF.mjs +20022 -0
- package/dist/chunk-XO7IYJSF.mjs.map +1 -0
- package/dist/chunk-YXN2K77G.js +102 -0
- package/dist/chunk-YXN2K77G.js.map +1 -0
- package/dist/dynamic-island-confirm-Cbxh-sta.d.mts +52 -0
- package/dist/dynamic-island-confirm-Cbxh-sta.d.ts +52 -0
- package/dist/index.d.mts +4771 -0
- package/dist/index.d.ts +4771 -0
- package/dist/index.js +2892 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/i18n-context.d.mts +36 -0
- package/dist/lib/i18n-context.d.ts +36 -0
- package/dist/lib/i18n-context.js +29 -0
- package/dist/lib/i18n-context.js.map +1 -0
- package/dist/lib/i18n-context.mjs +4 -0
- package/dist/lib/i18n-context.mjs.map +1 -0
- package/dist/lib/router-context.d.mts +35 -0
- package/dist/lib/router-context.d.ts +35 -0
- package/dist/lib/router-context.js +25 -0
- package/dist/lib/router-context.js.map +1 -0
- package/dist/lib/router-context.mjs +4 -0
- package/dist/lib/router-context.mjs.map +1 -0
- package/dist/use-haptic-RDQNJYBE.js +17 -0
- package/dist/use-haptic-RDQNJYBE.js.map +1 -0
- package/dist/use-haptic-TCMOLPGA.mjs +4 -0
- package/dist/use-haptic-TCMOLPGA.mjs.map +1 -0
- package/dist/workflow-canvas-CJwGehdk.d.mts +241 -0
- package/dist/workflow-canvas-DSm0iyof.d.ts +241 -0
- package/package.json +2 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Contracts
|
|
3
|
+
* ==============
|
|
4
|
+
* Self-contained workflow contracts for embeddable usage.
|
|
5
|
+
* No dependency on shared-domain.
|
|
6
|
+
*/
|
|
7
|
+
type WorkflowNodeType = 'agent' | 'tool' | 'agent_tool' | 'rule' | 'start' | 'end' | 'if_else' | 'code' | 'http_request' | 'template_transform' | 'iteration' | 'knowledge_base' | 'answer' | 'question_classifier' | 'parameter_extractor' | 'variable_assigner' | 'variable_aggregator' | 'document_extractor' | 'list_operator' | 'iteration_start' | 'note' | 'entity' | 'datasource' | 'group';
|
|
8
|
+
type StartNodeConfig = {
|
|
9
|
+
type: 'start';
|
|
10
|
+
inputVariables: string[];
|
|
11
|
+
};
|
|
12
|
+
type EndNodeConfig = {
|
|
13
|
+
type: 'end';
|
|
14
|
+
outputVariables: string[];
|
|
15
|
+
};
|
|
16
|
+
type IfElseNodeConfig = {
|
|
17
|
+
type: 'if_else';
|
|
18
|
+
conditions: Array<{
|
|
19
|
+
variable: string;
|
|
20
|
+
operator: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
logicalOperator: 'and' | 'or';
|
|
24
|
+
};
|
|
25
|
+
type CodeNodeConfig = {
|
|
26
|
+
type: 'code';
|
|
27
|
+
language: 'javascript' | 'python' | 'typescript';
|
|
28
|
+
code: string;
|
|
29
|
+
};
|
|
30
|
+
type HttpRequestNodeConfig = {
|
|
31
|
+
type: 'http_request';
|
|
32
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
33
|
+
url: string;
|
|
34
|
+
headers: Record<string, string>;
|
|
35
|
+
body: string;
|
|
36
|
+
timeoutMs: number;
|
|
37
|
+
};
|
|
38
|
+
type TemplateTransformNodeConfig = {
|
|
39
|
+
type: 'template_transform';
|
|
40
|
+
template: string;
|
|
41
|
+
outputVariable: string;
|
|
42
|
+
};
|
|
43
|
+
type IterationNodeConfig = {
|
|
44
|
+
type: 'iteration';
|
|
45
|
+
iteratorVariable: string;
|
|
46
|
+
maxIterations: number;
|
|
47
|
+
};
|
|
48
|
+
type KnowledgeBaseNodeConfig = {
|
|
49
|
+
type: 'knowledge_base';
|
|
50
|
+
sourceId: string;
|
|
51
|
+
topK: number;
|
|
52
|
+
similarityThreshold: number;
|
|
53
|
+
};
|
|
54
|
+
type AnswerNodeConfig = {
|
|
55
|
+
type: 'answer';
|
|
56
|
+
outputTemplate: string;
|
|
57
|
+
outputVariables: string[];
|
|
58
|
+
};
|
|
59
|
+
type QuestionClassifierNodeConfig = {
|
|
60
|
+
type: 'question_classifier';
|
|
61
|
+
modelId: string;
|
|
62
|
+
instructions: string;
|
|
63
|
+
categories: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
type ParameterExtractorNodeConfig = {
|
|
70
|
+
type: 'parameter_extractor';
|
|
71
|
+
modelId: string;
|
|
72
|
+
parameters: Array<{
|
|
73
|
+
name: string;
|
|
74
|
+
type: 'string' | 'number' | 'boolean' | 'array';
|
|
75
|
+
description: string;
|
|
76
|
+
required: boolean;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
79
|
+
type VariableAssignerNodeConfig = {
|
|
80
|
+
type: 'variable_assigner';
|
|
81
|
+
assignments: Array<{
|
|
82
|
+
target: string;
|
|
83
|
+
source: string;
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
86
|
+
type VariableAggregatorNodeConfig = {
|
|
87
|
+
type: 'variable_aggregator';
|
|
88
|
+
inputVariables: string[];
|
|
89
|
+
outputVariable: string;
|
|
90
|
+
aggregationMode: 'array' | 'object' | 'concatenate';
|
|
91
|
+
};
|
|
92
|
+
type DocumentExtractorNodeConfig = {
|
|
93
|
+
type: 'document_extractor';
|
|
94
|
+
extractionMode: 'text' | 'table' | 'structured';
|
|
95
|
+
outputVariable: string;
|
|
96
|
+
};
|
|
97
|
+
type ListOperatorNodeConfig = {
|
|
98
|
+
type: 'list_operator';
|
|
99
|
+
operation: 'filter' | 'map' | 'sort' | 'limit' | 'deduplicate' | 'flatten';
|
|
100
|
+
inputVariable: string;
|
|
101
|
+
outputVariable: string;
|
|
102
|
+
condition?: string;
|
|
103
|
+
sortKey?: string;
|
|
104
|
+
sortOrder?: 'asc' | 'desc';
|
|
105
|
+
limitCount?: number;
|
|
106
|
+
};
|
|
107
|
+
type IterationStartNodeConfig = {
|
|
108
|
+
type: 'iteration_start';
|
|
109
|
+
iteratorVariable: string;
|
|
110
|
+
itemVariable: string;
|
|
111
|
+
indexVariable: string;
|
|
112
|
+
};
|
|
113
|
+
type NoteNodeConfig = {
|
|
114
|
+
type: 'note';
|
|
115
|
+
text: string;
|
|
116
|
+
color: 'yellow' | 'blue' | 'green' | 'pink' | 'purple';
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
};
|
|
120
|
+
type GroupNodeConfig = {
|
|
121
|
+
type: 'group';
|
|
122
|
+
label: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
color: 'indigo' | 'teal' | 'amber' | 'rose' | 'slate';
|
|
125
|
+
isExpanded: boolean;
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
collapsedWidth: number;
|
|
129
|
+
collapsedHeight: number;
|
|
130
|
+
};
|
|
131
|
+
type EntityNodeConfig = {
|
|
132
|
+
type: 'entity';
|
|
133
|
+
entityMasterId: string;
|
|
134
|
+
selectedFields: string[];
|
|
135
|
+
filterVariables: Record<string, string>;
|
|
136
|
+
outputVariable: string;
|
|
137
|
+
limit: number;
|
|
138
|
+
};
|
|
139
|
+
type DatasourceNodeConfig = {
|
|
140
|
+
type: 'datasource';
|
|
141
|
+
datasourceId: string;
|
|
142
|
+
dialect: string;
|
|
143
|
+
table: string;
|
|
144
|
+
selectedColumns: string[];
|
|
145
|
+
filterVariables: Record<string, string>;
|
|
146
|
+
outputVariable: string;
|
|
147
|
+
limit: number;
|
|
148
|
+
};
|
|
149
|
+
type RuleNodeConfig = {
|
|
150
|
+
type: 'rule';
|
|
151
|
+
entityId?: string;
|
|
152
|
+
outputVariable?: string;
|
|
153
|
+
priceVariable?: string;
|
|
154
|
+
contextVariables?: Record<string, string>;
|
|
155
|
+
};
|
|
156
|
+
type LogicNodeConfig = StartNodeConfig | EndNodeConfig | IfElseNodeConfig | CodeNodeConfig | HttpRequestNodeConfig | TemplateTransformNodeConfig | IterationNodeConfig | KnowledgeBaseNodeConfig | AnswerNodeConfig | QuestionClassifierNodeConfig | ParameterExtractorNodeConfig | VariableAssignerNodeConfig | VariableAggregatorNodeConfig | DocumentExtractorNodeConfig | ListOperatorNodeConfig | IterationStartNodeConfig | NoteNodeConfig | GroupNodeConfig | EntityNodeConfig | DatasourceNodeConfig | RuleNodeConfig;
|
|
157
|
+
type WorkflowNodeData = {
|
|
158
|
+
entityId: string;
|
|
159
|
+
label: string;
|
|
160
|
+
config?: LogicNodeConfig;
|
|
161
|
+
errorStrategy?: 'fail_graph' | 'fail_branch' | 'continue';
|
|
162
|
+
};
|
|
163
|
+
type WorkflowNode = {
|
|
164
|
+
id: string;
|
|
165
|
+
type: WorkflowNodeType;
|
|
166
|
+
position: {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
};
|
|
170
|
+
data: WorkflowNodeData;
|
|
171
|
+
parentId?: string;
|
|
172
|
+
extent?: 'parent';
|
|
173
|
+
style?: {
|
|
174
|
+
width?: number;
|
|
175
|
+
height?: number;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
type WorkflowEdge = {
|
|
179
|
+
id: string;
|
|
180
|
+
source: string;
|
|
181
|
+
target: string;
|
|
182
|
+
sourceHandle: string | null;
|
|
183
|
+
targetHandle: string | null;
|
|
184
|
+
};
|
|
185
|
+
type WorkflowViewport = {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
zoom: number;
|
|
189
|
+
};
|
|
190
|
+
type WorkflowGraph = {
|
|
191
|
+
nodes: WorkflowNode[];
|
|
192
|
+
edges: WorkflowEdge[];
|
|
193
|
+
viewport?: WorkflowViewport;
|
|
194
|
+
};
|
|
195
|
+
type Workflow = {
|
|
196
|
+
id: string;
|
|
197
|
+
organizationId: string;
|
|
198
|
+
name: string;
|
|
199
|
+
description?: string;
|
|
200
|
+
graph: WorkflowGraph;
|
|
201
|
+
publishedGraph: WorkflowGraph | null;
|
|
202
|
+
version: number;
|
|
203
|
+
isDraft?: boolean;
|
|
204
|
+
createdAt: Date | string;
|
|
205
|
+
updatedAt: Date | string;
|
|
206
|
+
};
|
|
207
|
+
type WorkflowNodeStatus = 'pending' | 'running' | 'success' | 'error' | 'skipped';
|
|
208
|
+
type VariableValue = string | number | boolean | null | VariableValue[] | {
|
|
209
|
+
[key: string]: VariableValue;
|
|
210
|
+
};
|
|
211
|
+
type NodeExecutionResult = {
|
|
212
|
+
nodeId: string;
|
|
213
|
+
nodeType: WorkflowNodeType;
|
|
214
|
+
status: WorkflowNodeStatus;
|
|
215
|
+
inputs?: Record<string, VariableValue>;
|
|
216
|
+
outputs: Record<string, VariableValue>;
|
|
217
|
+
error?: string;
|
|
218
|
+
durationMs: number;
|
|
219
|
+
startedAt: string;
|
|
220
|
+
completedAt: string;
|
|
221
|
+
};
|
|
222
|
+
type WorkflowRunStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
223
|
+
type WorkflowRun = {
|
|
224
|
+
id: string;
|
|
225
|
+
workflowId: string;
|
|
226
|
+
organizationId: string;
|
|
227
|
+
status: WorkflowRunStatus;
|
|
228
|
+
inputVariables: Record<string, VariableValue>;
|
|
229
|
+
outputVariables: Record<string, VariableValue>;
|
|
230
|
+
nodeResults: NodeExecutionResult[];
|
|
231
|
+
error: string | null;
|
|
232
|
+
totalDurationMs: number | null;
|
|
233
|
+
triggeredBy: string;
|
|
234
|
+
graphSnapshot: WorkflowGraph;
|
|
235
|
+
createdAt: string;
|
|
236
|
+
updatedAt: string;
|
|
237
|
+
};
|
|
238
|
+
type AgentConfig = {
|
|
239
|
+
agentId: string;
|
|
240
|
+
id?: string;
|
|
241
|
+
name: string;
|
|
242
|
+
role?: string;
|
|
243
|
+
modelId?: string;
|
|
244
|
+
order?: number;
|
|
245
|
+
temperature?: number;
|
|
246
|
+
maxTokens?: number;
|
|
247
|
+
enabled?: boolean;
|
|
248
|
+
[key: string]: unknown;
|
|
249
|
+
};
|
|
250
|
+
type AgentModel = {
|
|
251
|
+
id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
provider: string;
|
|
254
|
+
enabled: boolean;
|
|
255
|
+
};
|
|
256
|
+
type Subworkflow = {
|
|
257
|
+
toolId: string;
|
|
258
|
+
name: string;
|
|
259
|
+
category?: string;
|
|
260
|
+
icon?: string;
|
|
261
|
+
endpoint?: string;
|
|
262
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
263
|
+
enabled: boolean;
|
|
264
|
+
[key: string]: unknown;
|
|
265
|
+
};
|
|
266
|
+
type AgentTool = {
|
|
267
|
+
agentToolId: string;
|
|
268
|
+
name: string;
|
|
269
|
+
description?: string;
|
|
270
|
+
category?: 'search' | 'code' | 'file' | 'web' | 'math' | 'custom';
|
|
271
|
+
icon?: string;
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
parameters?: Array<{
|
|
274
|
+
name: string;
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
required: boolean;
|
|
278
|
+
}>;
|
|
279
|
+
[key: string]: unknown;
|
|
280
|
+
};
|
|
281
|
+
type AgentRule = {
|
|
282
|
+
ruleId: string;
|
|
283
|
+
name: string;
|
|
284
|
+
description?: string;
|
|
285
|
+
enabled: boolean;
|
|
286
|
+
order?: number;
|
|
287
|
+
condition?: Record<string, unknown>;
|
|
288
|
+
conditions?: Array<Record<string, unknown>>;
|
|
289
|
+
actions?: Array<Record<string, unknown>>;
|
|
290
|
+
[key: string]: unknown;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export type { AgentConfig, AgentModel, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, Subworkflow, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowViewport };
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Contracts
|
|
3
|
+
* ==============
|
|
4
|
+
* Self-contained workflow contracts for embeddable usage.
|
|
5
|
+
* No dependency on shared-domain.
|
|
6
|
+
*/
|
|
7
|
+
type WorkflowNodeType = 'agent' | 'tool' | 'agent_tool' | 'rule' | 'start' | 'end' | 'if_else' | 'code' | 'http_request' | 'template_transform' | 'iteration' | 'knowledge_base' | 'answer' | 'question_classifier' | 'parameter_extractor' | 'variable_assigner' | 'variable_aggregator' | 'document_extractor' | 'list_operator' | 'iteration_start' | 'note' | 'entity' | 'datasource' | 'group';
|
|
8
|
+
type StartNodeConfig = {
|
|
9
|
+
type: 'start';
|
|
10
|
+
inputVariables: string[];
|
|
11
|
+
};
|
|
12
|
+
type EndNodeConfig = {
|
|
13
|
+
type: 'end';
|
|
14
|
+
outputVariables: string[];
|
|
15
|
+
};
|
|
16
|
+
type IfElseNodeConfig = {
|
|
17
|
+
type: 'if_else';
|
|
18
|
+
conditions: Array<{
|
|
19
|
+
variable: string;
|
|
20
|
+
operator: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
logicalOperator: 'and' | 'or';
|
|
24
|
+
};
|
|
25
|
+
type CodeNodeConfig = {
|
|
26
|
+
type: 'code';
|
|
27
|
+
language: 'javascript' | 'python' | 'typescript';
|
|
28
|
+
code: string;
|
|
29
|
+
};
|
|
30
|
+
type HttpRequestNodeConfig = {
|
|
31
|
+
type: 'http_request';
|
|
32
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
33
|
+
url: string;
|
|
34
|
+
headers: Record<string, string>;
|
|
35
|
+
body: string;
|
|
36
|
+
timeoutMs: number;
|
|
37
|
+
};
|
|
38
|
+
type TemplateTransformNodeConfig = {
|
|
39
|
+
type: 'template_transform';
|
|
40
|
+
template: string;
|
|
41
|
+
outputVariable: string;
|
|
42
|
+
};
|
|
43
|
+
type IterationNodeConfig = {
|
|
44
|
+
type: 'iteration';
|
|
45
|
+
iteratorVariable: string;
|
|
46
|
+
maxIterations: number;
|
|
47
|
+
};
|
|
48
|
+
type KnowledgeBaseNodeConfig = {
|
|
49
|
+
type: 'knowledge_base';
|
|
50
|
+
sourceId: string;
|
|
51
|
+
topK: number;
|
|
52
|
+
similarityThreshold: number;
|
|
53
|
+
};
|
|
54
|
+
type AnswerNodeConfig = {
|
|
55
|
+
type: 'answer';
|
|
56
|
+
outputTemplate: string;
|
|
57
|
+
outputVariables: string[];
|
|
58
|
+
};
|
|
59
|
+
type QuestionClassifierNodeConfig = {
|
|
60
|
+
type: 'question_classifier';
|
|
61
|
+
modelId: string;
|
|
62
|
+
instructions: string;
|
|
63
|
+
categories: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
type ParameterExtractorNodeConfig = {
|
|
70
|
+
type: 'parameter_extractor';
|
|
71
|
+
modelId: string;
|
|
72
|
+
parameters: Array<{
|
|
73
|
+
name: string;
|
|
74
|
+
type: 'string' | 'number' | 'boolean' | 'array';
|
|
75
|
+
description: string;
|
|
76
|
+
required: boolean;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
79
|
+
type VariableAssignerNodeConfig = {
|
|
80
|
+
type: 'variable_assigner';
|
|
81
|
+
assignments: Array<{
|
|
82
|
+
target: string;
|
|
83
|
+
source: string;
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
86
|
+
type VariableAggregatorNodeConfig = {
|
|
87
|
+
type: 'variable_aggregator';
|
|
88
|
+
inputVariables: string[];
|
|
89
|
+
outputVariable: string;
|
|
90
|
+
aggregationMode: 'array' | 'object' | 'concatenate';
|
|
91
|
+
};
|
|
92
|
+
type DocumentExtractorNodeConfig = {
|
|
93
|
+
type: 'document_extractor';
|
|
94
|
+
extractionMode: 'text' | 'table' | 'structured';
|
|
95
|
+
outputVariable: string;
|
|
96
|
+
};
|
|
97
|
+
type ListOperatorNodeConfig = {
|
|
98
|
+
type: 'list_operator';
|
|
99
|
+
operation: 'filter' | 'map' | 'sort' | 'limit' | 'deduplicate' | 'flatten';
|
|
100
|
+
inputVariable: string;
|
|
101
|
+
outputVariable: string;
|
|
102
|
+
condition?: string;
|
|
103
|
+
sortKey?: string;
|
|
104
|
+
sortOrder?: 'asc' | 'desc';
|
|
105
|
+
limitCount?: number;
|
|
106
|
+
};
|
|
107
|
+
type IterationStartNodeConfig = {
|
|
108
|
+
type: 'iteration_start';
|
|
109
|
+
iteratorVariable: string;
|
|
110
|
+
itemVariable: string;
|
|
111
|
+
indexVariable: string;
|
|
112
|
+
};
|
|
113
|
+
type NoteNodeConfig = {
|
|
114
|
+
type: 'note';
|
|
115
|
+
text: string;
|
|
116
|
+
color: 'yellow' | 'blue' | 'green' | 'pink' | 'purple';
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
};
|
|
120
|
+
type GroupNodeConfig = {
|
|
121
|
+
type: 'group';
|
|
122
|
+
label: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
color: 'indigo' | 'teal' | 'amber' | 'rose' | 'slate';
|
|
125
|
+
isExpanded: boolean;
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
collapsedWidth: number;
|
|
129
|
+
collapsedHeight: number;
|
|
130
|
+
};
|
|
131
|
+
type EntityNodeConfig = {
|
|
132
|
+
type: 'entity';
|
|
133
|
+
entityMasterId: string;
|
|
134
|
+
selectedFields: string[];
|
|
135
|
+
filterVariables: Record<string, string>;
|
|
136
|
+
outputVariable: string;
|
|
137
|
+
limit: number;
|
|
138
|
+
};
|
|
139
|
+
type DatasourceNodeConfig = {
|
|
140
|
+
type: 'datasource';
|
|
141
|
+
datasourceId: string;
|
|
142
|
+
dialect: string;
|
|
143
|
+
table: string;
|
|
144
|
+
selectedColumns: string[];
|
|
145
|
+
filterVariables: Record<string, string>;
|
|
146
|
+
outputVariable: string;
|
|
147
|
+
limit: number;
|
|
148
|
+
};
|
|
149
|
+
type RuleNodeConfig = {
|
|
150
|
+
type: 'rule';
|
|
151
|
+
entityId?: string;
|
|
152
|
+
outputVariable?: string;
|
|
153
|
+
priceVariable?: string;
|
|
154
|
+
contextVariables?: Record<string, string>;
|
|
155
|
+
};
|
|
156
|
+
type LogicNodeConfig = StartNodeConfig | EndNodeConfig | IfElseNodeConfig | CodeNodeConfig | HttpRequestNodeConfig | TemplateTransformNodeConfig | IterationNodeConfig | KnowledgeBaseNodeConfig | AnswerNodeConfig | QuestionClassifierNodeConfig | ParameterExtractorNodeConfig | VariableAssignerNodeConfig | VariableAggregatorNodeConfig | DocumentExtractorNodeConfig | ListOperatorNodeConfig | IterationStartNodeConfig | NoteNodeConfig | GroupNodeConfig | EntityNodeConfig | DatasourceNodeConfig | RuleNodeConfig;
|
|
157
|
+
type WorkflowNodeData = {
|
|
158
|
+
entityId: string;
|
|
159
|
+
label: string;
|
|
160
|
+
config?: LogicNodeConfig;
|
|
161
|
+
errorStrategy?: 'fail_graph' | 'fail_branch' | 'continue';
|
|
162
|
+
};
|
|
163
|
+
type WorkflowNode = {
|
|
164
|
+
id: string;
|
|
165
|
+
type: WorkflowNodeType;
|
|
166
|
+
position: {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
};
|
|
170
|
+
data: WorkflowNodeData;
|
|
171
|
+
parentId?: string;
|
|
172
|
+
extent?: 'parent';
|
|
173
|
+
style?: {
|
|
174
|
+
width?: number;
|
|
175
|
+
height?: number;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
type WorkflowEdge = {
|
|
179
|
+
id: string;
|
|
180
|
+
source: string;
|
|
181
|
+
target: string;
|
|
182
|
+
sourceHandle: string | null;
|
|
183
|
+
targetHandle: string | null;
|
|
184
|
+
};
|
|
185
|
+
type WorkflowViewport = {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
zoom: number;
|
|
189
|
+
};
|
|
190
|
+
type WorkflowGraph = {
|
|
191
|
+
nodes: WorkflowNode[];
|
|
192
|
+
edges: WorkflowEdge[];
|
|
193
|
+
viewport?: WorkflowViewport;
|
|
194
|
+
};
|
|
195
|
+
type Workflow = {
|
|
196
|
+
id: string;
|
|
197
|
+
organizationId: string;
|
|
198
|
+
name: string;
|
|
199
|
+
description?: string;
|
|
200
|
+
graph: WorkflowGraph;
|
|
201
|
+
publishedGraph: WorkflowGraph | null;
|
|
202
|
+
version: number;
|
|
203
|
+
isDraft?: boolean;
|
|
204
|
+
createdAt: Date | string;
|
|
205
|
+
updatedAt: Date | string;
|
|
206
|
+
};
|
|
207
|
+
type WorkflowNodeStatus = 'pending' | 'running' | 'success' | 'error' | 'skipped';
|
|
208
|
+
type VariableValue = string | number | boolean | null | VariableValue[] | {
|
|
209
|
+
[key: string]: VariableValue;
|
|
210
|
+
};
|
|
211
|
+
type NodeExecutionResult = {
|
|
212
|
+
nodeId: string;
|
|
213
|
+
nodeType: WorkflowNodeType;
|
|
214
|
+
status: WorkflowNodeStatus;
|
|
215
|
+
inputs?: Record<string, VariableValue>;
|
|
216
|
+
outputs: Record<string, VariableValue>;
|
|
217
|
+
error?: string;
|
|
218
|
+
durationMs: number;
|
|
219
|
+
startedAt: string;
|
|
220
|
+
completedAt: string;
|
|
221
|
+
};
|
|
222
|
+
type WorkflowRunStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
223
|
+
type WorkflowRun = {
|
|
224
|
+
id: string;
|
|
225
|
+
workflowId: string;
|
|
226
|
+
organizationId: string;
|
|
227
|
+
status: WorkflowRunStatus;
|
|
228
|
+
inputVariables: Record<string, VariableValue>;
|
|
229
|
+
outputVariables: Record<string, VariableValue>;
|
|
230
|
+
nodeResults: NodeExecutionResult[];
|
|
231
|
+
error: string | null;
|
|
232
|
+
totalDurationMs: number | null;
|
|
233
|
+
triggeredBy: string;
|
|
234
|
+
graphSnapshot: WorkflowGraph;
|
|
235
|
+
createdAt: string;
|
|
236
|
+
updatedAt: string;
|
|
237
|
+
};
|
|
238
|
+
type AgentConfig = {
|
|
239
|
+
agentId: string;
|
|
240
|
+
id?: string;
|
|
241
|
+
name: string;
|
|
242
|
+
role?: string;
|
|
243
|
+
modelId?: string;
|
|
244
|
+
order?: number;
|
|
245
|
+
temperature?: number;
|
|
246
|
+
maxTokens?: number;
|
|
247
|
+
enabled?: boolean;
|
|
248
|
+
[key: string]: unknown;
|
|
249
|
+
};
|
|
250
|
+
type AgentModel = {
|
|
251
|
+
id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
provider: string;
|
|
254
|
+
enabled: boolean;
|
|
255
|
+
};
|
|
256
|
+
type Subworkflow = {
|
|
257
|
+
toolId: string;
|
|
258
|
+
name: string;
|
|
259
|
+
category?: string;
|
|
260
|
+
icon?: string;
|
|
261
|
+
endpoint?: string;
|
|
262
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
263
|
+
enabled: boolean;
|
|
264
|
+
[key: string]: unknown;
|
|
265
|
+
};
|
|
266
|
+
type AgentTool = {
|
|
267
|
+
agentToolId: string;
|
|
268
|
+
name: string;
|
|
269
|
+
description?: string;
|
|
270
|
+
category?: 'search' | 'code' | 'file' | 'web' | 'math' | 'custom';
|
|
271
|
+
icon?: string;
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
parameters?: Array<{
|
|
274
|
+
name: string;
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
required: boolean;
|
|
278
|
+
}>;
|
|
279
|
+
[key: string]: unknown;
|
|
280
|
+
};
|
|
281
|
+
type AgentRule = {
|
|
282
|
+
ruleId: string;
|
|
283
|
+
name: string;
|
|
284
|
+
description?: string;
|
|
285
|
+
enabled: boolean;
|
|
286
|
+
order?: number;
|
|
287
|
+
condition?: Record<string, unknown>;
|
|
288
|
+
conditions?: Array<Record<string, unknown>>;
|
|
289
|
+
actions?: Array<Record<string, unknown>>;
|
|
290
|
+
[key: string]: unknown;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export type { AgentConfig, AgentModel, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, Subworkflow, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowViewport };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"contracts.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"contracts.mjs"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface GraphNodeIconBubbleProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function GraphNodeIconBubble({ children, className }: GraphNodeIconBubbleProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
interface GraphNodeHeaderProps {
|
|
10
|
+
icon: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
iconClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function GraphNodeHeader({ icon, title, description, compact, iconClassName, }: GraphNodeHeaderProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
interface GraphNodeMetaProps {
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare function GraphNodeMeta({ compact, children }: GraphNodeMetaProps): react_jsx_runtime.JSX.Element | null;
|
|
22
|
+
interface GraphNodeBadgeProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function GraphNodeBadge({ children, className }: GraphNodeBadgeProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface GraphNodeIconBubbleProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function GraphNodeIconBubble({ children, className }: GraphNodeIconBubbleProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
interface GraphNodeHeaderProps {
|
|
10
|
+
icon: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
iconClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function GraphNodeHeader({ icon, title, description, compact, iconClassName, }: GraphNodeHeaderProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
interface GraphNodeMetaProps {
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare function GraphNodeMeta({ compact, children }: GraphNodeMetaProps): react_jsx_runtime.JSX.Element | null;
|
|
22
|
+
interface GraphNodeBadgeProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function GraphNodeBadge({ children, className }: GraphNodeBadgeProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
require('../chunk-55H6WZQP.js');
|
|
5
|
+
var chunkP4YYEM4B_js = require('../chunk-P4YYEM4B.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "GraphNodeBadge", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkP4YYEM4B_js.GraphNodeBadge; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "GraphNodeHeader", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkP4YYEM4B_js.GraphNodeHeader; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "GraphNodeIconBubble", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkP4YYEM4B_js.GraphNodeIconBubble; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "GraphNodeMeta", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkP4YYEM4B_js.GraphNodeMeta; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=graph-node.js.map
|
|
26
|
+
//# sourceMappingURL=graph-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"graph-node.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"graph-node.mjs"}
|