@hugex/ai 3.2.0 → 3.4.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/FlowEngine-UNMMHMN6.js +1 -0
- package/dist/{chunk-V35SRZAO.js → chunk-3D77ZXDC.js} +1 -1
- package/dist/{chunk-6AZ7RATD.js → chunk-AKJFVR6J.js} +1 -1
- package/dist/chunk-EHOK5FW2.js +1 -0
- package/dist/chunk-HJPR76HF.js +1 -0
- package/dist/chunk-J67BCWE3.js +1 -0
- package/dist/chunk-KKJW6HJA.js +3 -0
- package/dist/chunk-V43Y4KSA.js +12 -0
- package/dist/chunk-YXG3ZEUP.js +10 -0
- package/dist/{chunk-ZYIULB2P.js → chunk-Z4CYLB7J.js} +1 -1
- package/dist/client.js +1 -1
- package/dist/common/constants/clef-models.d.ts +48 -0
- package/dist/common/constants/tenant-only-nodes.d.ts +1 -1
- package/dist/common/flow-graph/catalog.d.ts +40 -0
- package/dist/common/flow-graph/classifier.d.ts +2 -0
- package/dist/common/flow-graph/composio.d.ts +2 -0
- package/dist/common/flow-graph/credentials.d.ts +3 -0
- package/dist/common/flow-graph/index.d.ts +11 -0
- package/dist/common/flow-graph/ops.d.ts +21 -0
- package/dist/common/flow-graph/refs.d.ts +18 -0
- package/dist/common/flow-graph/schema.d.ts +570 -0
- package/dist/common/flow-graph/templates.d.ts +2 -0
- package/dist/common/flow-graph/validate.d.ts +77 -0
- package/dist/common/types/classifier-types.d.ts +57 -0
- package/dist/common/types/classifier-validation.d.ts +2 -0
- package/dist/common/utils/clef-prefix.d.ts +16 -0
- package/dist/common/utils/clef.d.ts +49 -0
- package/dist/common.d.ts +5 -0
- package/dist/common.js +1 -1
- package/dist/composioDirectTool-ZCZRW5WU.js +1 -0
- package/dist/composioTool-RKVCX25U.js +1 -0
- package/dist/httpTool-IW4W7CGE.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -6
- package/dist/server/core/agentTurn.d.ts +4 -0
- package/dist/server/runners/classifierNodeRunner.d.ts +1 -1
- package/dist/server/utils/clef.d.ts +1 -0
- package/dist/server/utils/composio.d.ts +2 -0
- package/dist/server/utils/redactSecrets.d.ts +6 -0
- package/package.json +1 -1
- package/dist/FlowEngine-H3QNWZVB.js +0 -1
- package/dist/chunk-6JUKM6LT.js +0 -10
- package/dist/chunk-DEW7U7V7.js +0 -23
- package/dist/chunk-QEZQZG6Z.js +0 -3
- package/dist/chunk-RFWFJGER.js +0 -1
- package/dist/chunk-XXB57DMN.js +0 -1
- package/dist/composioDirectTool-XOKIM5FJ.js +0 -1
- package/dist/composioTool-C4KZMI4Q.js +0 -1
- package/dist/httpTool-RT5CTG4O.js +0 -1
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
export type NodeTypeName = 'startNode' | 'classifierNode' | 'memoNode' | 'llmNode' | 'answerNode' | 'apiNode' | 'toolNode' | 'workerNode' | 'crawlNode';
|
|
2
|
+
export interface AuthoringNode {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
data: Record<string, unknown>;
|
|
10
|
+
[ui: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface AuthoringEdge {
|
|
13
|
+
id: string;
|
|
14
|
+
source: string;
|
|
15
|
+
target: string;
|
|
16
|
+
sourceHandle?: string | null;
|
|
17
|
+
[ui: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkerGraph {
|
|
20
|
+
schemaVersion: 3;
|
|
21
|
+
nodes: AuthoringNode[];
|
|
22
|
+
edges: AuthoringEdge[];
|
|
23
|
+
}
|
|
24
|
+
export type IssueSeverity = 'error' | 'warning';
|
|
25
|
+
export type CredentialKind = 'bearer_token' | 'basic_auth' | 'known_token' | 'url_userinfo' | 'url_query' | 'sensitive_key' | 'high_entropy';
|
|
26
|
+
export type IssueCode = 'missing_state' | 'schema_version' | 'var_mapping' | 'classifier_invalid' | 'classifier_edge_missing' | 'out_vars_invalid' | 'start_count' | 'answer_missing' | 'dead_end' | 'unknown_node_type' | 'duplicate_node_id' | 'invalid_node_id' | 'node_id_collides_with_input' | 'edge_unknown_node' | 'edge_bad_handle' | 'edge_duplicate' | 'start_has_input' | 'answer_has_output' | 'multiple_outgoing' | 'field_type' | 'field_required' | 'field_range' | 'field_enum' | 'ref_syntax' | 'ref_unknown_node' | 'ref_out_of_scope' | 'ref_unknown_output' | 'ref_binary_not_allowed' | 'start_input_invalid' | 'answer_mapping_invalid' | 'worker_self_reference' | 'classifier_error_unrouted' | 'classifier_handle_inactive' | 'unreachable_node' | 'graph_cycle' | 'crawl_prompt_literal' | 'model_unknown' | 'param_unsupported' | 'reasoning_effort_unsupported' | 'tool_unavailable' | 'tool_kind_mismatch' | 'skill_unavailable' | 'builtin_unknown' | 'tool_args_invalid' | 'tool_args_unknown' | 'composio_slug_disabled' | 'composio_schema_missing' | 'memo_unavailable' | 'worker_unavailable' | 'worker_child_no_output' | 'worker_inputs_mismatch' | 'worker_child_inactive_forbidden' | 'worker_child_inactive' | 'secret_unknown' | 'secret_check_skipped' | 'inline_credential' | 'op_invalid' | 'op_unknown_node' | 'already_connected' | 'edge_not_found' | 'edge_ambiguous' | 'cannot_remove_start';
|
|
27
|
+
export interface GraphIssue {
|
|
28
|
+
code: IssueCode;
|
|
29
|
+
severity: IssueSeverity;
|
|
30
|
+
message: string;
|
|
31
|
+
nodeId?: string;
|
|
32
|
+
edgeId?: string;
|
|
33
|
+
field?: string;
|
|
34
|
+
ref?: string;
|
|
35
|
+
op?: number;
|
|
36
|
+
hint?: string;
|
|
37
|
+
kind?: CredentialKind;
|
|
38
|
+
suggestedSecret?: string;
|
|
39
|
+
}
|
|
40
|
+
export type InsertNodeType = 'memoNode' | 'llmNode' | 'apiNode' | 'toolNode' | 'workerNode' | 'crawlNode';
|
|
41
|
+
export type WorkerOp = {
|
|
42
|
+
op: 'add_node';
|
|
43
|
+
type: NodeTypeName;
|
|
44
|
+
id?: string;
|
|
45
|
+
data?: Record<string, unknown>;
|
|
46
|
+
position?: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
50
|
+
from?: {
|
|
51
|
+
node: string;
|
|
52
|
+
handle?: string;
|
|
53
|
+
};
|
|
54
|
+
to?: {
|
|
55
|
+
node: string;
|
|
56
|
+
handle?: string;
|
|
57
|
+
};
|
|
58
|
+
} | {
|
|
59
|
+
op: 'insert_node';
|
|
60
|
+
type: InsertNodeType;
|
|
61
|
+
id?: string;
|
|
62
|
+
data?: Record<string, unknown>;
|
|
63
|
+
between: {
|
|
64
|
+
from: string;
|
|
65
|
+
to: string;
|
|
66
|
+
handle?: string;
|
|
67
|
+
};
|
|
68
|
+
} | {
|
|
69
|
+
op: 'update_node';
|
|
70
|
+
id: string;
|
|
71
|
+
data: Record<string, unknown>;
|
|
72
|
+
} | {
|
|
73
|
+
op: 'rename_node';
|
|
74
|
+
id: string;
|
|
75
|
+
newId: string;
|
|
76
|
+
} | {
|
|
77
|
+
op: 'remove_node';
|
|
78
|
+
id: string;
|
|
79
|
+
reconnect?: boolean;
|
|
80
|
+
} | {
|
|
81
|
+
op: 'connect';
|
|
82
|
+
from: string;
|
|
83
|
+
to: string;
|
|
84
|
+
handle?: string;
|
|
85
|
+
replace?: boolean;
|
|
86
|
+
} | {
|
|
87
|
+
op: 'disconnect';
|
|
88
|
+
from: string;
|
|
89
|
+
to?: string;
|
|
90
|
+
handle?: string;
|
|
91
|
+
} | {
|
|
92
|
+
op: 'move_node';
|
|
93
|
+
id: string;
|
|
94
|
+
position: {
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export interface JsonSchema {
|
|
100
|
+
$schema?: string;
|
|
101
|
+
$id?: string;
|
|
102
|
+
$ref?: string;
|
|
103
|
+
$defs?: Record<string, JsonSchema>;
|
|
104
|
+
type?: string | readonly string[];
|
|
105
|
+
enum?: readonly unknown[];
|
|
106
|
+
const?: unknown;
|
|
107
|
+
properties?: Record<string, JsonSchema>;
|
|
108
|
+
required?: readonly string[];
|
|
109
|
+
additionalProperties?: boolean | JsonSchema;
|
|
110
|
+
pattern?: string;
|
|
111
|
+
minLength?: number;
|
|
112
|
+
maxLength?: number;
|
|
113
|
+
minItems?: number;
|
|
114
|
+
maxItems?: number;
|
|
115
|
+
minimum?: number;
|
|
116
|
+
maximum?: number;
|
|
117
|
+
maxProperties?: number;
|
|
118
|
+
items?: JsonSchema;
|
|
119
|
+
oneOf?: readonly JsonSchema[];
|
|
120
|
+
anyOf?: readonly JsonSchema[];
|
|
121
|
+
not?: JsonSchema;
|
|
122
|
+
dependentRequired?: Record<string, readonly string[]>;
|
|
123
|
+
description?: string;
|
|
124
|
+
}
|
|
125
|
+
/** Six definitions merged into any tool schema that accepts `graph` (N3). */
|
|
126
|
+
export declare const WORKER_GRAPH_DEFS: {
|
|
127
|
+
nodeType: {
|
|
128
|
+
readonly enum: readonly ['startNode', 'classifierNode', 'memoNode', 'llmNode', 'answerNode', 'apiNode', 'toolNode', 'workerNode', 'crawlNode'];
|
|
129
|
+
};
|
|
130
|
+
nodeId: {
|
|
131
|
+
readonly type: 'string';
|
|
132
|
+
readonly pattern: '^[A-Za-z0-9_-]{1,128}$';
|
|
133
|
+
};
|
|
134
|
+
position: {
|
|
135
|
+
readonly type: 'object';
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
readonly required: readonly ['x', 'y'];
|
|
138
|
+
readonly properties: {
|
|
139
|
+
readonly x: {
|
|
140
|
+
readonly type: 'number';
|
|
141
|
+
};
|
|
142
|
+
readonly y: {
|
|
143
|
+
readonly type: 'number';
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
node: {
|
|
148
|
+
readonly type: 'object';
|
|
149
|
+
readonly additionalProperties: false;
|
|
150
|
+
readonly required: readonly ['id', 'type', 'position', 'data'];
|
|
151
|
+
readonly properties: {
|
|
152
|
+
readonly id: {
|
|
153
|
+
readonly $ref: '#/$defs/nodeId';
|
|
154
|
+
};
|
|
155
|
+
readonly type: {
|
|
156
|
+
readonly $ref: '#/$defs/nodeType';
|
|
157
|
+
};
|
|
158
|
+
readonly position: {
|
|
159
|
+
readonly $ref: '#/$defs/position';
|
|
160
|
+
};
|
|
161
|
+
readonly data: {
|
|
162
|
+
readonly type: 'object';
|
|
163
|
+
readonly maxProperties: 100;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
edge: {
|
|
168
|
+
readonly type: 'object';
|
|
169
|
+
readonly additionalProperties: false;
|
|
170
|
+
readonly required: readonly ['source', 'target'];
|
|
171
|
+
readonly properties: {
|
|
172
|
+
readonly id: {
|
|
173
|
+
readonly type: 'string';
|
|
174
|
+
readonly minLength: 1;
|
|
175
|
+
readonly maxLength: 300;
|
|
176
|
+
};
|
|
177
|
+
readonly source: {
|
|
178
|
+
readonly $ref: '#/$defs/nodeId';
|
|
179
|
+
};
|
|
180
|
+
readonly target: {
|
|
181
|
+
readonly $ref: '#/$defs/nodeId';
|
|
182
|
+
};
|
|
183
|
+
readonly sourceHandle: {
|
|
184
|
+
readonly type: readonly ['string', 'null'];
|
|
185
|
+
readonly pattern: '^source-[A-Za-z0-9_.-]{1,100}$';
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
graph: {
|
|
190
|
+
readonly type: 'object';
|
|
191
|
+
readonly additionalProperties: false;
|
|
192
|
+
readonly required: readonly ['schemaVersion', 'nodes', 'edges'];
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly schemaVersion: {
|
|
195
|
+
readonly const: 3;
|
|
196
|
+
};
|
|
197
|
+
readonly nodes: {
|
|
198
|
+
readonly type: 'array';
|
|
199
|
+
readonly maxItems: 200;
|
|
200
|
+
readonly items: {
|
|
201
|
+
readonly $ref: '#/$defs/node';
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
readonly edges: {
|
|
205
|
+
readonly type: 'array';
|
|
206
|
+
readonly maxItems: 400;
|
|
207
|
+
readonly items: {
|
|
208
|
+
readonly $ref: '#/$defs/edge';
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
export declare const WORKER_GRAPH_SCHEMA: {
|
|
215
|
+
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
216
|
+
readonly $defs: {
|
|
217
|
+
nodeType: {
|
|
218
|
+
readonly enum: readonly ['startNode', 'classifierNode', 'memoNode', 'llmNode', 'answerNode', 'apiNode', 'toolNode', 'workerNode', 'crawlNode'];
|
|
219
|
+
};
|
|
220
|
+
nodeId: {
|
|
221
|
+
readonly type: 'string';
|
|
222
|
+
readonly pattern: '^[A-Za-z0-9_-]{1,128}$';
|
|
223
|
+
};
|
|
224
|
+
position: {
|
|
225
|
+
readonly type: 'object';
|
|
226
|
+
readonly additionalProperties: false;
|
|
227
|
+
readonly required: readonly ['x', 'y'];
|
|
228
|
+
readonly properties: {
|
|
229
|
+
readonly x: {
|
|
230
|
+
readonly type: 'number';
|
|
231
|
+
};
|
|
232
|
+
readonly y: {
|
|
233
|
+
readonly type: 'number';
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
node: {
|
|
238
|
+
readonly type: 'object';
|
|
239
|
+
readonly additionalProperties: false;
|
|
240
|
+
readonly required: readonly ['id', 'type', 'position', 'data'];
|
|
241
|
+
readonly properties: {
|
|
242
|
+
readonly id: {
|
|
243
|
+
readonly $ref: '#/$defs/nodeId';
|
|
244
|
+
};
|
|
245
|
+
readonly type: {
|
|
246
|
+
readonly $ref: '#/$defs/nodeType';
|
|
247
|
+
};
|
|
248
|
+
readonly position: {
|
|
249
|
+
readonly $ref: '#/$defs/position';
|
|
250
|
+
};
|
|
251
|
+
readonly data: {
|
|
252
|
+
readonly type: 'object';
|
|
253
|
+
readonly maxProperties: 100;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
edge: {
|
|
258
|
+
readonly type: 'object';
|
|
259
|
+
readonly additionalProperties: false;
|
|
260
|
+
readonly required: readonly ['source', 'target'];
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly id: {
|
|
263
|
+
readonly type: 'string';
|
|
264
|
+
readonly minLength: 1;
|
|
265
|
+
readonly maxLength: 300;
|
|
266
|
+
};
|
|
267
|
+
readonly source: {
|
|
268
|
+
readonly $ref: '#/$defs/nodeId';
|
|
269
|
+
};
|
|
270
|
+
readonly target: {
|
|
271
|
+
readonly $ref: '#/$defs/nodeId';
|
|
272
|
+
};
|
|
273
|
+
readonly sourceHandle: {
|
|
274
|
+
readonly type: readonly ['string', 'null'];
|
|
275
|
+
readonly pattern: '^source-[A-Za-z0-9_.-]{1,100}$';
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
graph: {
|
|
280
|
+
readonly type: 'object';
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly required: readonly ['schemaVersion', 'nodes', 'edges'];
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly schemaVersion: {
|
|
285
|
+
readonly const: 3;
|
|
286
|
+
};
|
|
287
|
+
readonly nodes: {
|
|
288
|
+
readonly type: 'array';
|
|
289
|
+
readonly maxItems: 200;
|
|
290
|
+
readonly items: {
|
|
291
|
+
readonly $ref: '#/$defs/node';
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly edges: {
|
|
295
|
+
readonly type: 'array';
|
|
296
|
+
readonly maxItems: 400;
|
|
297
|
+
readonly items: {
|
|
298
|
+
readonly $ref: '#/$defs/edge';
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
readonly $ref: '#/$defs/graph';
|
|
305
|
+
};
|
|
306
|
+
export declare const WORKER_OP_SCHEMA: {
|
|
307
|
+
readonly type: 'object';
|
|
308
|
+
readonly additionalProperties: false;
|
|
309
|
+
readonly required: readonly ['flowId', 'baseVersion', 'ops'];
|
|
310
|
+
readonly properties: {
|
|
311
|
+
readonly flowId: {
|
|
312
|
+
readonly type: 'string';
|
|
313
|
+
readonly pattern: '^[A-Za-z0-9_-]{1,128}$';
|
|
314
|
+
};
|
|
315
|
+
readonly baseVersion: {
|
|
316
|
+
readonly type: 'integer';
|
|
317
|
+
readonly minimum: 0;
|
|
318
|
+
};
|
|
319
|
+
readonly ops: {
|
|
320
|
+
readonly type: 'array';
|
|
321
|
+
readonly minItems: 1;
|
|
322
|
+
readonly maxItems: 50;
|
|
323
|
+
readonly items: {
|
|
324
|
+
readonly $ref: '#/$defs/op';
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly dryRun: {
|
|
328
|
+
readonly type: 'boolean';
|
|
329
|
+
};
|
|
330
|
+
readonly acknowledgeInlineCredentials: {
|
|
331
|
+
readonly type: 'boolean';
|
|
332
|
+
};
|
|
333
|
+
readonly returnGraph: {
|
|
334
|
+
readonly type: 'boolean';
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
readonly $defs: {
|
|
338
|
+
readonly nodeType: {
|
|
339
|
+
readonly enum: readonly ['startNode', 'classifierNode', 'memoNode', 'llmNode', 'answerNode', 'apiNode', 'toolNode', 'workerNode', 'crawlNode'];
|
|
340
|
+
};
|
|
341
|
+
readonly existingId: {
|
|
342
|
+
readonly type: 'string';
|
|
343
|
+
readonly pattern: '^[A-Za-z0-9_-]{1,128}$';
|
|
344
|
+
};
|
|
345
|
+
readonly newId: {
|
|
346
|
+
readonly type: 'string';
|
|
347
|
+
readonly pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$';
|
|
348
|
+
};
|
|
349
|
+
readonly handle: {
|
|
350
|
+
readonly type: 'string';
|
|
351
|
+
readonly pattern: '^(source-)?[A-Za-z0-9_.-]{1,100}$';
|
|
352
|
+
};
|
|
353
|
+
readonly position: {
|
|
354
|
+
readonly type: 'object';
|
|
355
|
+
readonly additionalProperties: false;
|
|
356
|
+
readonly required: readonly ['x', 'y'];
|
|
357
|
+
readonly properties: {
|
|
358
|
+
readonly x: {
|
|
359
|
+
readonly type: 'number';
|
|
360
|
+
};
|
|
361
|
+
readonly y: {
|
|
362
|
+
readonly type: 'number';
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly data: {
|
|
367
|
+
readonly type: 'object';
|
|
368
|
+
readonly maxProperties: 100;
|
|
369
|
+
};
|
|
370
|
+
readonly op: {
|
|
371
|
+
readonly oneOf: readonly [{
|
|
372
|
+
readonly type: 'object';
|
|
373
|
+
readonly additionalProperties: false;
|
|
374
|
+
readonly required: readonly ['op', 'type'];
|
|
375
|
+
readonly properties: {
|
|
376
|
+
readonly op: {
|
|
377
|
+
readonly const: 'add_node';
|
|
378
|
+
};
|
|
379
|
+
readonly type: {
|
|
380
|
+
readonly $ref: '#/$defs/nodeType';
|
|
381
|
+
};
|
|
382
|
+
readonly id: {
|
|
383
|
+
readonly $ref: '#/$defs/newId';
|
|
384
|
+
};
|
|
385
|
+
readonly data: {
|
|
386
|
+
readonly $ref: '#/$defs/data';
|
|
387
|
+
};
|
|
388
|
+
readonly position: {
|
|
389
|
+
readonly $ref: '#/$defs/position';
|
|
390
|
+
};
|
|
391
|
+
readonly from: {
|
|
392
|
+
readonly type: 'object';
|
|
393
|
+
readonly additionalProperties: false;
|
|
394
|
+
readonly required: readonly ['node'];
|
|
395
|
+
readonly properties: {
|
|
396
|
+
readonly node: {
|
|
397
|
+
readonly $ref: '#/$defs/existingId';
|
|
398
|
+
};
|
|
399
|
+
readonly handle: {
|
|
400
|
+
readonly $ref: '#/$defs/handle';
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
readonly to: {
|
|
405
|
+
readonly type: 'object';
|
|
406
|
+
readonly additionalProperties: false;
|
|
407
|
+
readonly required: readonly ['node'];
|
|
408
|
+
readonly properties: {
|
|
409
|
+
readonly node: {
|
|
410
|
+
readonly $ref: '#/$defs/existingId';
|
|
411
|
+
};
|
|
412
|
+
readonly handle: {
|
|
413
|
+
readonly $ref: '#/$defs/handle';
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
}, {
|
|
419
|
+
readonly type: 'object';
|
|
420
|
+
readonly additionalProperties: false;
|
|
421
|
+
readonly required: readonly ['op', 'type', 'between'];
|
|
422
|
+
readonly properties: {
|
|
423
|
+
readonly op: {
|
|
424
|
+
readonly const: 'insert_node';
|
|
425
|
+
};
|
|
426
|
+
readonly type: {
|
|
427
|
+
readonly enum: readonly ['memoNode', 'llmNode', 'apiNode', 'toolNode', 'workerNode', 'crawlNode'];
|
|
428
|
+
};
|
|
429
|
+
readonly id: {
|
|
430
|
+
readonly $ref: '#/$defs/newId';
|
|
431
|
+
};
|
|
432
|
+
readonly data: {
|
|
433
|
+
readonly $ref: '#/$defs/data';
|
|
434
|
+
};
|
|
435
|
+
readonly between: {
|
|
436
|
+
readonly type: 'object';
|
|
437
|
+
readonly additionalProperties: false;
|
|
438
|
+
readonly required: readonly ['from', 'to'];
|
|
439
|
+
readonly properties: {
|
|
440
|
+
readonly from: {
|
|
441
|
+
readonly $ref: '#/$defs/existingId';
|
|
442
|
+
};
|
|
443
|
+
readonly to: {
|
|
444
|
+
readonly $ref: '#/$defs/existingId';
|
|
445
|
+
};
|
|
446
|
+
readonly handle: {
|
|
447
|
+
readonly $ref: '#/$defs/handle';
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
}, {
|
|
453
|
+
readonly type: 'object';
|
|
454
|
+
readonly additionalProperties: false;
|
|
455
|
+
readonly required: readonly ['op', 'id', 'data'];
|
|
456
|
+
readonly properties: {
|
|
457
|
+
readonly op: {
|
|
458
|
+
readonly const: 'update_node';
|
|
459
|
+
};
|
|
460
|
+
readonly id: {
|
|
461
|
+
readonly $ref: '#/$defs/existingId';
|
|
462
|
+
};
|
|
463
|
+
readonly data: {
|
|
464
|
+
readonly $ref: '#/$defs/data';
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
}, {
|
|
468
|
+
readonly type: 'object';
|
|
469
|
+
readonly additionalProperties: false;
|
|
470
|
+
readonly required: readonly ['op', 'id', 'newId'];
|
|
471
|
+
readonly properties: {
|
|
472
|
+
readonly op: {
|
|
473
|
+
readonly const: 'rename_node';
|
|
474
|
+
};
|
|
475
|
+
readonly id: {
|
|
476
|
+
readonly $ref: '#/$defs/existingId';
|
|
477
|
+
};
|
|
478
|
+
readonly newId: {
|
|
479
|
+
readonly $ref: '#/$defs/newId';
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
}, {
|
|
483
|
+
readonly type: 'object';
|
|
484
|
+
readonly additionalProperties: false;
|
|
485
|
+
readonly required: readonly ['op', 'id'];
|
|
486
|
+
readonly properties: {
|
|
487
|
+
readonly op: {
|
|
488
|
+
readonly const: 'remove_node';
|
|
489
|
+
};
|
|
490
|
+
readonly id: {
|
|
491
|
+
readonly $ref: '#/$defs/existingId';
|
|
492
|
+
};
|
|
493
|
+
readonly reconnect: {
|
|
494
|
+
readonly type: 'boolean';
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
}, {
|
|
498
|
+
readonly type: 'object';
|
|
499
|
+
readonly additionalProperties: false;
|
|
500
|
+
readonly required: readonly ['op', 'from', 'to'];
|
|
501
|
+
readonly properties: {
|
|
502
|
+
readonly op: {
|
|
503
|
+
readonly const: 'connect';
|
|
504
|
+
};
|
|
505
|
+
readonly from: {
|
|
506
|
+
readonly $ref: '#/$defs/existingId';
|
|
507
|
+
};
|
|
508
|
+
readonly to: {
|
|
509
|
+
readonly $ref: '#/$defs/existingId';
|
|
510
|
+
};
|
|
511
|
+
readonly handle: {
|
|
512
|
+
readonly $ref: '#/$defs/handle';
|
|
513
|
+
};
|
|
514
|
+
readonly replace: {
|
|
515
|
+
readonly type: 'boolean';
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
}, {
|
|
519
|
+
readonly type: 'object';
|
|
520
|
+
readonly additionalProperties: false;
|
|
521
|
+
readonly required: readonly ['op', 'from'];
|
|
522
|
+
readonly properties: {
|
|
523
|
+
readonly op: {
|
|
524
|
+
readonly const: 'disconnect';
|
|
525
|
+
};
|
|
526
|
+
readonly from: {
|
|
527
|
+
readonly $ref: '#/$defs/existingId';
|
|
528
|
+
};
|
|
529
|
+
readonly to: {
|
|
530
|
+
readonly $ref: '#/$defs/existingId';
|
|
531
|
+
};
|
|
532
|
+
readonly handle: {
|
|
533
|
+
readonly $ref: '#/$defs/handle';
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
}, {
|
|
537
|
+
readonly type: 'object';
|
|
538
|
+
readonly additionalProperties: false;
|
|
539
|
+
readonly required: readonly ['op', 'id', 'position'];
|
|
540
|
+
readonly properties: {
|
|
541
|
+
readonly op: {
|
|
542
|
+
readonly const: 'move_node';
|
|
543
|
+
};
|
|
544
|
+
readonly id: {
|
|
545
|
+
readonly $ref: '#/$defs/existingId';
|
|
546
|
+
};
|
|
547
|
+
readonly position: {
|
|
548
|
+
readonly $ref: '#/$defs/position';
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
}];
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
/** Hand-written JSON Schema subset used by the parsers. No Ajv. */
|
|
556
|
+
export declare function schemaErrors(schema: object, value: unknown, root?: object): string[];
|
|
557
|
+
export declare function parseWorkerGraph(input: unknown): {
|
|
558
|
+
ok: true;
|
|
559
|
+
graph: WorkerGraph;
|
|
560
|
+
} | {
|
|
561
|
+
ok: false;
|
|
562
|
+
issues: GraphIssue[];
|
|
563
|
+
};
|
|
564
|
+
export declare function parseWorkerOps(input: unknown): {
|
|
565
|
+
ok: true;
|
|
566
|
+
ops: WorkerOp[];
|
|
567
|
+
} | {
|
|
568
|
+
ok: false;
|
|
569
|
+
issues: GraphIssue[];
|
|
570
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { GraphIssue, WorkerGraph } from './schema';
|
|
2
|
+
export declare const ISSUE_SEVERITY: {
|
|
3
|
+
readonly missing_state: 'blocking';
|
|
4
|
+
readonly schema_version: 'blocking';
|
|
5
|
+
readonly var_mapping: 'blocking';
|
|
6
|
+
readonly classifier_invalid: 'blocking';
|
|
7
|
+
readonly classifier_edge_missing: 'blocking';
|
|
8
|
+
readonly out_vars_invalid: 'blocking';
|
|
9
|
+
readonly start_count: 'blocking';
|
|
10
|
+
readonly answer_missing: 'blocking';
|
|
11
|
+
readonly dead_end: 'blocking';
|
|
12
|
+
readonly unknown_node_type: 'blocking';
|
|
13
|
+
readonly duplicate_node_id: 'blocking';
|
|
14
|
+
readonly invalid_node_id: 'blocking';
|
|
15
|
+
readonly node_id_collides_with_input: 'blocking';
|
|
16
|
+
readonly edge_unknown_node: 'blocking';
|
|
17
|
+
readonly edge_bad_handle: 'blocking';
|
|
18
|
+
readonly edge_duplicate: 'blocking';
|
|
19
|
+
readonly start_has_input: 'blocking';
|
|
20
|
+
readonly answer_has_output: 'blocking';
|
|
21
|
+
readonly multiple_outgoing: 'blocking';
|
|
22
|
+
readonly field_type: 'blocking';
|
|
23
|
+
readonly field_required: 'blocking';
|
|
24
|
+
readonly field_range: 'blocking';
|
|
25
|
+
readonly field_enum: 'blocking';
|
|
26
|
+
readonly ref_syntax: 'blocking';
|
|
27
|
+
readonly ref_unknown_node: 'blocking';
|
|
28
|
+
readonly ref_out_of_scope: 'blocking';
|
|
29
|
+
readonly ref_unknown_output: 'blocking';
|
|
30
|
+
readonly ref_binary_not_allowed: 'blocking';
|
|
31
|
+
readonly start_input_invalid: 'blocking';
|
|
32
|
+
readonly answer_mapping_invalid: 'blocking';
|
|
33
|
+
readonly worker_self_reference: 'blocking';
|
|
34
|
+
readonly classifier_error_unrouted: 'advisory';
|
|
35
|
+
readonly classifier_handle_inactive: 'advisory';
|
|
36
|
+
readonly unreachable_node: 'advisory';
|
|
37
|
+
readonly graph_cycle: 'advisory';
|
|
38
|
+
readonly crawl_prompt_literal: 'advisory';
|
|
39
|
+
readonly model_unknown: 'blocking';
|
|
40
|
+
readonly param_unsupported: 'advisory';
|
|
41
|
+
readonly reasoning_effort_unsupported: 'advisory';
|
|
42
|
+
readonly tool_unavailable: 'blocking';
|
|
43
|
+
readonly tool_kind_mismatch: 'blocking';
|
|
44
|
+
readonly skill_unavailable: 'blocking';
|
|
45
|
+
readonly builtin_unknown: 'blocking';
|
|
46
|
+
readonly tool_args_invalid: 'blocking';
|
|
47
|
+
readonly tool_args_unknown: 'advisory';
|
|
48
|
+
readonly composio_slug_disabled: 'blocking';
|
|
49
|
+
readonly composio_schema_missing: 'advisory';
|
|
50
|
+
readonly memo_unavailable: 'blocking';
|
|
51
|
+
readonly worker_unavailable: 'blocking';
|
|
52
|
+
readonly worker_child_no_output: 'blocking';
|
|
53
|
+
readonly worker_inputs_mismatch: 'blocking';
|
|
54
|
+
readonly worker_child_inactive_forbidden: 'blocking';
|
|
55
|
+
readonly worker_child_inactive: 'advisory';
|
|
56
|
+
readonly secret_unknown: 'advisory';
|
|
57
|
+
readonly secret_check_skipped: 'advisory';
|
|
58
|
+
readonly inline_credential: 'blocking';
|
|
59
|
+
readonly op_invalid: 'blocking';
|
|
60
|
+
readonly op_unknown_node: 'blocking';
|
|
61
|
+
readonly already_connected: 'blocking';
|
|
62
|
+
readonly edge_not_found: 'blocking';
|
|
63
|
+
readonly edge_ambiguous: 'blocking';
|
|
64
|
+
readonly cannot_remove_start: 'blocking';
|
|
65
|
+
};
|
|
66
|
+
/** L1, same order and same messages as FlowEngine.validateFlowStart. */
|
|
67
|
+
export declare function validateFlowStructure(graph: unknown): GraphIssue[];
|
|
68
|
+
/** L2 authoring issues, with intrinsic severity. Final severity is classifyIssues. */
|
|
69
|
+
export declare function validateAuthoring(graph: WorkerGraph): GraphIssue[];
|
|
70
|
+
/** Fingerprint of code, node, field, ref, and credential kind. Message and op are excluded. */
|
|
71
|
+
export declare function issueFingerprint(issue: GraphIssue): string;
|
|
72
|
+
export declare function classifyIssues(before: GraphIssue[], after: GraphIssue[], opts?: {
|
|
73
|
+
acknowledgeInlineCredentials?: boolean;
|
|
74
|
+
}): {
|
|
75
|
+
errors: GraphIssue[];
|
|
76
|
+
warnings: GraphIssue[];
|
|
77
|
+
};
|