chatbot-lex-design-builder 2.0.21 → 2.0.22
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.
|
@@ -61,4 +61,5 @@ export declare function updateWorkflowWrtDiff(oldWorkflow: WorkflowFile, newWork
|
|
|
61
61
|
deletedAgentResourceIds: string[];
|
|
62
62
|
deletedToolResourceIds: string[];
|
|
63
63
|
};
|
|
64
|
+
export declare function updateWorkflow(workflow: WorkflowFile, diff: UpdatedResourceDiff, resourceIdsToDelete: string[]): any;
|
|
64
65
|
export declare function getStartNodeResourceIds(workflow: WorkflowFile): any[];
|
package/dist/cjs/agentic/sdk.js
CHANGED
|
@@ -3,95 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getInstruction = getInstruction;
|
|
4
4
|
exports.transformAgentSchema = transformAgentSchema;
|
|
5
5
|
exports.updateWorkflowWrtDiff = updateWorkflowWrtDiff;
|
|
6
|
+
exports.updateWorkflow = updateWorkflow;
|
|
6
7
|
exports.getStartNodeResourceIds = getStartNodeResourceIds;
|
|
7
8
|
const nodes_1 = require("./nodes");
|
|
8
9
|
const agentSchema = String.raw `
|
|
9
10
|
import z from "zod";
|
|
10
11
|
|
|
11
|
-
const CommonStringSchema = z
|
|
12
|
-
.string()
|
|
13
|
-
.trim()
|
|
14
|
-
.min(1, { error: "This is required" })
|
|
15
|
-
.max(30, { error: "This can't exceed 30 charectors" });
|
|
16
|
-
|
|
17
|
-
type CommonString = z.infer<typeof CommonStringSchema>;
|
|
18
|
-
|
|
19
|
-
const FunctionConfigurationSchema = z.object({
|
|
20
|
-
type: z.literal("function"),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
type FunctionConfiguration = z.infer<typeof FunctionConfigurationSchema>;
|
|
24
|
-
|
|
25
|
-
const HeaderSchema = z.object({
|
|
26
|
-
name: CommonStringSchema,
|
|
27
|
-
value: CommonStringSchema,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
type Header = z.infer<typeof HeaderSchema>;
|
|
31
|
-
|
|
32
|
-
const NoAuthConfigurationSchema = z.object({
|
|
33
|
-
type: z.literal("noAuth"),
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
type NoAuthConfig = z.infer<typeof NoAuthConfigurationSchema>;
|
|
37
|
-
|
|
38
|
-
const ApiKeyConfigurationSchema = z.object({
|
|
39
|
-
type: z.literal("apiKey"),
|
|
40
|
-
key: CommonStringSchema,
|
|
41
|
-
value: CommonStringSchema,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
type ApiKey = z.infer<typeof ApiKeyConfigurationSchema>;
|
|
45
|
-
|
|
46
|
-
const BearerTokenConfigurationSchema = z.object({
|
|
47
|
-
type: z.literal("bearer"),
|
|
48
|
-
tokenUrl: z.url(),
|
|
49
|
-
username: CommonStringSchema,
|
|
50
|
-
password: CommonStringSchema,
|
|
51
|
-
tokenResponseField: CommonStringSchema,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
type BearerToken = z.infer<typeof BearerTokenConfigurationSchema>;
|
|
55
|
-
|
|
56
|
-
const BasicAuthConfigurationSchema = z.object({
|
|
57
|
-
type: z.literal("basic"),
|
|
58
|
-
username: CommonStringSchema,
|
|
59
|
-
password: CommonStringSchema,
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
type BasicAuth = z.infer<typeof BasicAuthConfigurationSchema>;
|
|
63
|
-
|
|
64
|
-
const ApiConfigurationSchema = z.object({
|
|
65
|
-
type: z.literal("api"),
|
|
66
|
-
url: z.url(),
|
|
67
|
-
method: z.enum(["get", "put", "post", "delete", "patch"]),
|
|
68
|
-
contentType: z.enum([
|
|
69
|
-
"application/json",
|
|
70
|
-
"application/xml",
|
|
71
|
-
"text/plain",
|
|
72
|
-
"application/x-www-from-urlencoded",
|
|
73
|
-
]),
|
|
74
|
-
headers: HeaderSchema.array(),
|
|
75
|
-
responseBody: z
|
|
76
|
-
.object({
|
|
77
|
-
id: CommonStringSchema,
|
|
78
|
-
value: CommonStringSchema,
|
|
79
|
-
})
|
|
80
|
-
.array(),
|
|
81
|
-
auth: z.discriminatedUnion("type", [
|
|
82
|
-
NoAuthConfigurationSchema,
|
|
83
|
-
ApiKeyConfigurationSchema,
|
|
84
|
-
BearerTokenConfigurationSchema,
|
|
85
|
-
BasicAuthConfigurationSchema,
|
|
86
|
-
]),
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
type ApiConfiguration = z.infer<typeof ApiConfigurationSchema>;
|
|
90
|
-
|
|
91
|
-
const FullfillmentNodeDataSchema = z.discriminatedUnion("type", [
|
|
92
|
-
FunctionConfigurationSchema,
|
|
93
|
-
ApiConfigurationSchema,
|
|
94
|
-
]);
|
|
95
12
|
export const ParameterSchema = z.object({
|
|
96
13
|
name: z.string().describe("Name of the parameter"),
|
|
97
14
|
type: z
|
|
@@ -109,7 +26,6 @@ export const ToolSchema = z.object({
|
|
|
109
26
|
name: z.string().describe("Name of the tool"),
|
|
110
27
|
description: z.string().describe("Description of the tool"),
|
|
111
28
|
parameters: ParameterSchema.array().describe("Parameters for the tool"),
|
|
112
|
-
configuration: FullfillmentNodeDataSchema.describe("Configuration for fullfillment"),
|
|
113
29
|
});
|
|
114
30
|
|
|
115
31
|
export type Tool = z.infer<typeof ToolSchema>;
|
|
@@ -148,35 +64,23 @@ export const CommonStringSchema = z
|
|
|
148
64
|
export type CommonString = z.infer<typeof CommonStringSchema>;
|
|
149
65
|
|
|
150
66
|
const ConditionSchema = z.object({
|
|
67
|
+
id: CommonStringSchema,
|
|
151
68
|
expression: CommonStringSchema,
|
|
152
|
-
name: CommonStringSchema.describe("a short human readable name."),
|
|
153
|
-
isDefault: z
|
|
154
|
-
.boolean()
|
|
155
|
-
.default(false)
|
|
156
|
-
.describe(
|
|
157
|
-
"indicates if this is the default condition. if this is true then expression will be ignored."
|
|
158
|
-
),
|
|
159
69
|
});
|
|
160
70
|
|
|
161
71
|
type Condition = z.infer<typeof ConditionSchema>;
|
|
162
72
|
|
|
163
73
|
export const ConditionNodeDataSchema = z.object({
|
|
164
|
-
conditions: ConditionSchema.array()
|
|
165
|
-
.min(1)
|
|
166
|
-
.describe("at least a default case will be present"),
|
|
74
|
+
conditions: ConditionSchema.array().min(1),
|
|
167
75
|
});
|
|
168
76
|
|
|
169
77
|
export type ConditionNodeData = z.infer<typeof ConditionNodeDataSchema>;
|
|
170
78
|
|
|
171
|
-
export const ConditionNodeSchema = z
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
})
|
|
177
|
-
.describe(
|
|
178
|
-
"Conditional node allows agent to make decisions based on conditions"
|
|
179
|
-
);
|
|
79
|
+
export const ConditionNodeSchema = z.object({
|
|
80
|
+
id: z.string(),
|
|
81
|
+
type: z.literal(NodeType.conditionNode),
|
|
82
|
+
data: ConditionNodeDataSchema,
|
|
83
|
+
});
|
|
180
84
|
|
|
181
85
|
export type ConditionNode = z.infer<typeof ConditionNodeSchema>;
|
|
182
86
|
|
|
@@ -269,21 +173,17 @@ export const FullfillmentNodeDataSchema = z.discriminatedUnion("type", [
|
|
|
269
173
|
|
|
270
174
|
export type FullfillmentNodeData = z.infer<typeof FullfillmentNodeDataSchema>;
|
|
271
175
|
|
|
272
|
-
export const FullfillmentNodeSchema = z
|
|
273
|
-
.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
})
|
|
278
|
-
.describe("It represents the end action node in the flow.");
|
|
176
|
+
export const FullfillmentNodeSchema = z.object({
|
|
177
|
+
id: z.string(),
|
|
178
|
+
type: z.literal(NodeType.fullfillmentNode),
|
|
179
|
+
data: FullfillmentNodeDataSchema,
|
|
180
|
+
});
|
|
279
181
|
|
|
280
182
|
export type FullfillmentNode = z.infer<typeof FullfillmentNodeSchema>;
|
|
281
183
|
|
|
282
184
|
export const NameDescriptionSchema = z.object({
|
|
283
|
-
name: CommonStringSchema
|
|
284
|
-
description: CommonStringSchema
|
|
285
|
-
"a short human readable description about the node"
|
|
286
|
-
),
|
|
185
|
+
name: CommonStringSchema,
|
|
186
|
+
description: CommonStringSchema,
|
|
287
187
|
});
|
|
288
188
|
|
|
289
189
|
export type NameDescription = z.infer<typeof NameDescriptionSchema>;
|
|
@@ -295,51 +195,39 @@ export const ParameterNodeDataSchema = NameDescriptionSchema.extend({
|
|
|
295
195
|
|
|
296
196
|
export type ParameterNodeData = z.infer<typeof ParameterNodeDataSchema>;
|
|
297
197
|
|
|
298
|
-
export const ParameterNodeSchema = z
|
|
299
|
-
.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
})
|
|
304
|
-
.describe(
|
|
305
|
-
"A Parameter node is used to define and pass parameters within the flow. It has both a target handle to receive input and a source handle to provide output."
|
|
306
|
-
);
|
|
198
|
+
export const ParameterNodeSchema = z.object({
|
|
199
|
+
id: z.string(),
|
|
200
|
+
type: z.literal(NodeType.parameterNode),
|
|
201
|
+
data: ParameterNodeDataSchema,
|
|
202
|
+
});
|
|
307
203
|
|
|
308
204
|
export type ParameterNode = z.infer<typeof ParameterNodeSchema>;
|
|
309
205
|
|
|
310
206
|
export const StartNodeDataSchema = z.object({
|
|
311
|
-
resourceId: z.string().nullish()
|
|
207
|
+
resourceId: z.string().nullish()
|
|
312
208
|
});
|
|
313
209
|
|
|
314
210
|
export type StartNodeData = z.infer<typeof StartNodeDataSchema>;
|
|
315
211
|
|
|
316
|
-
export const StartNodeSchema = z
|
|
317
|
-
.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
})
|
|
322
|
-
.describe(
|
|
323
|
-
"The Start node represents the entry point of the flow. It acts as the parent of all tool nodes and contains only a target handle."
|
|
324
|
-
);
|
|
212
|
+
export const StartNodeSchema = z.object({
|
|
213
|
+
id: z.string(),
|
|
214
|
+
type: z.literal(NodeType.startNode),
|
|
215
|
+
data: StartNodeDataSchema,
|
|
216
|
+
});
|
|
325
217
|
|
|
326
218
|
export type StartNode = z.infer<typeof StartNodeSchema>;
|
|
327
219
|
|
|
328
220
|
export const ToolNodeDataSchema = NameDescriptionSchema.extend({
|
|
329
|
-
resourceId: z.string().nullish()
|
|
221
|
+
resourceId: z.string().nullish()
|
|
330
222
|
});
|
|
331
223
|
|
|
332
224
|
export type ToolNodeData = z.infer<typeof ToolNodeDataSchema>;
|
|
333
225
|
|
|
334
|
-
export const ToolNodeSchema = z
|
|
335
|
-
.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
})
|
|
340
|
-
.describe(
|
|
341
|
-
"A Tool node represents an executable step in the flow. It can receive input through a target handle and pass output through a source handle."
|
|
342
|
-
);
|
|
226
|
+
export const ToolNodeSchema = z.object({
|
|
227
|
+
id: z.string(),
|
|
228
|
+
type: z.literal(NodeType.toolNode),
|
|
229
|
+
data: ToolNodeDataSchema,
|
|
230
|
+
});
|
|
343
231
|
|
|
344
232
|
export type ToolNode = z.infer<typeof ToolNodeSchema>;
|
|
345
233
|
|
|
@@ -445,6 +333,39 @@ function updateWorkflowWrtDiff(oldWorkflow, newWorkflow, diff) {
|
|
|
445
333
|
deletedToolResourceIds
|
|
446
334
|
};
|
|
447
335
|
}
|
|
336
|
+
function updateWorkflow(workflow, diff, resourceIdsToDelete) {
|
|
337
|
+
const _newWorkflow = JSON.parse(JSON.stringify(workflow));
|
|
338
|
+
// update resource ids in new workflow based on diff
|
|
339
|
+
diff.forEach(({ nodeId, resourceId }) => {
|
|
340
|
+
const node = _newWorkflow.graph.nodes.find((n) => n.id === nodeId);
|
|
341
|
+
if (node) {
|
|
342
|
+
node.data.resourceId = resourceId;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
// remove edges associated with deleted nodes
|
|
346
|
+
_newWorkflow.graph.edges = _newWorkflow.graph.edges.filter((edge) => {
|
|
347
|
+
const sourceNode = _newWorkflow.graph.nodes.find((n) => n.id === edge.source);
|
|
348
|
+
const targetNode = _newWorkflow.graph.nodes.find((n) => n.id === edge.target);
|
|
349
|
+
if (sourceNode && targetNode) {
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
return false;
|
|
353
|
+
});
|
|
354
|
+
// remove tools and start nodes which are deleted in new workflow
|
|
355
|
+
_newWorkflow.graph.nodes = _newWorkflow.graph.nodes.filter((node) => {
|
|
356
|
+
var _a, _b;
|
|
357
|
+
if (node.type === nodes_1.NodeType.startNode) {
|
|
358
|
+
const resourceId = (_a = node.data) === null || _a === void 0 ? void 0 : _a.resourceId;
|
|
359
|
+
return !resourceIdsToDelete.includes(resourceId);
|
|
360
|
+
}
|
|
361
|
+
else if (node.type === nodes_1.NodeType.toolNode) {
|
|
362
|
+
const resourceId = (_b = node.data) === null || _b === void 0 ? void 0 : _b.resourceId;
|
|
363
|
+
return !resourceIdsToDelete.includes(resourceId);
|
|
364
|
+
}
|
|
365
|
+
return true;
|
|
366
|
+
});
|
|
367
|
+
return _newWorkflow;
|
|
368
|
+
}
|
|
448
369
|
function getDeletedAgentResourceIds(oldWorkflow, newWorkflow) {
|
|
449
370
|
const oldAgentIds = new Set(getStartNodeResourceIds(oldWorkflow).filter(Boolean));
|
|
450
371
|
const newAgentIds = new Set(getStartNodeResourceIds(newWorkflow).filter(Boolean));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../agentic/sdk.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../agentic/sdk.ts"],"names":[],"mappings":";;AAsRA,wCAsBC;AAGD,oDAEC;AAID,sDA8BC;AAED,wCAmCC;AAuBD,0DAIC;AAnZD,mCAAwD;AAGxD,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AS,CAAC;SAC5C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAC,CAAS,CAAC,IAAI,0CAAE,UAAU,CAAA,EAAA,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -61,4 +61,5 @@ export declare function updateWorkflowWrtDiff(oldWorkflow: WorkflowFile, newWork
|
|
|
61
61
|
deletedAgentResourceIds: string[];
|
|
62
62
|
deletedToolResourceIds: string[];
|
|
63
63
|
};
|
|
64
|
+
export declare function updateWorkflow(workflow: WorkflowFile, diff: UpdatedResourceDiff, resourceIdsToDelete: string[]): any;
|
|
64
65
|
export declare function getStartNodeResourceIds(workflow: WorkflowFile): any[];
|
package/dist/esm/agentic/sdk.js
CHANGED
|
@@ -2,90 +2,6 @@ import { NodeType } from "./nodes";
|
|
|
2
2
|
const agentSchema = String.raw `
|
|
3
3
|
import z from "zod";
|
|
4
4
|
|
|
5
|
-
const CommonStringSchema = z
|
|
6
|
-
.string()
|
|
7
|
-
.trim()
|
|
8
|
-
.min(1, { error: "This is required" })
|
|
9
|
-
.max(30, { error: "This can't exceed 30 charectors" });
|
|
10
|
-
|
|
11
|
-
type CommonString = z.infer<typeof CommonStringSchema>;
|
|
12
|
-
|
|
13
|
-
const FunctionConfigurationSchema = z.object({
|
|
14
|
-
type: z.literal("function"),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
type FunctionConfiguration = z.infer<typeof FunctionConfigurationSchema>;
|
|
18
|
-
|
|
19
|
-
const HeaderSchema = z.object({
|
|
20
|
-
name: CommonStringSchema,
|
|
21
|
-
value: CommonStringSchema,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
type Header = z.infer<typeof HeaderSchema>;
|
|
25
|
-
|
|
26
|
-
const NoAuthConfigurationSchema = z.object({
|
|
27
|
-
type: z.literal("noAuth"),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
type NoAuthConfig = z.infer<typeof NoAuthConfigurationSchema>;
|
|
31
|
-
|
|
32
|
-
const ApiKeyConfigurationSchema = z.object({
|
|
33
|
-
type: z.literal("apiKey"),
|
|
34
|
-
key: CommonStringSchema,
|
|
35
|
-
value: CommonStringSchema,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
type ApiKey = z.infer<typeof ApiKeyConfigurationSchema>;
|
|
39
|
-
|
|
40
|
-
const BearerTokenConfigurationSchema = z.object({
|
|
41
|
-
type: z.literal("bearer"),
|
|
42
|
-
tokenUrl: z.url(),
|
|
43
|
-
username: CommonStringSchema,
|
|
44
|
-
password: CommonStringSchema,
|
|
45
|
-
tokenResponseField: CommonStringSchema,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
type BearerToken = z.infer<typeof BearerTokenConfigurationSchema>;
|
|
49
|
-
|
|
50
|
-
const BasicAuthConfigurationSchema = z.object({
|
|
51
|
-
type: z.literal("basic"),
|
|
52
|
-
username: CommonStringSchema,
|
|
53
|
-
password: CommonStringSchema,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
type BasicAuth = z.infer<typeof BasicAuthConfigurationSchema>;
|
|
57
|
-
|
|
58
|
-
const ApiConfigurationSchema = z.object({
|
|
59
|
-
type: z.literal("api"),
|
|
60
|
-
url: z.url(),
|
|
61
|
-
method: z.enum(["get", "put", "post", "delete", "patch"]),
|
|
62
|
-
contentType: z.enum([
|
|
63
|
-
"application/json",
|
|
64
|
-
"application/xml",
|
|
65
|
-
"text/plain",
|
|
66
|
-
"application/x-www-from-urlencoded",
|
|
67
|
-
]),
|
|
68
|
-
headers: HeaderSchema.array(),
|
|
69
|
-
responseBody: z
|
|
70
|
-
.object({
|
|
71
|
-
id: CommonStringSchema,
|
|
72
|
-
value: CommonStringSchema,
|
|
73
|
-
})
|
|
74
|
-
.array(),
|
|
75
|
-
auth: z.discriminatedUnion("type", [
|
|
76
|
-
NoAuthConfigurationSchema,
|
|
77
|
-
ApiKeyConfigurationSchema,
|
|
78
|
-
BearerTokenConfigurationSchema,
|
|
79
|
-
BasicAuthConfigurationSchema,
|
|
80
|
-
]),
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
type ApiConfiguration = z.infer<typeof ApiConfigurationSchema>;
|
|
84
|
-
|
|
85
|
-
const FullfillmentNodeDataSchema = z.discriminatedUnion("type", [
|
|
86
|
-
FunctionConfigurationSchema,
|
|
87
|
-
ApiConfigurationSchema,
|
|
88
|
-
]);
|
|
89
5
|
export const ParameterSchema = z.object({
|
|
90
6
|
name: z.string().describe("Name of the parameter"),
|
|
91
7
|
type: z
|
|
@@ -103,7 +19,6 @@ export const ToolSchema = z.object({
|
|
|
103
19
|
name: z.string().describe("Name of the tool"),
|
|
104
20
|
description: z.string().describe("Description of the tool"),
|
|
105
21
|
parameters: ParameterSchema.array().describe("Parameters for the tool"),
|
|
106
|
-
configuration: FullfillmentNodeDataSchema.describe("Configuration for fullfillment"),
|
|
107
22
|
});
|
|
108
23
|
|
|
109
24
|
export type Tool = z.infer<typeof ToolSchema>;
|
|
@@ -142,35 +57,23 @@ export const CommonStringSchema = z
|
|
|
142
57
|
export type CommonString = z.infer<typeof CommonStringSchema>;
|
|
143
58
|
|
|
144
59
|
const ConditionSchema = z.object({
|
|
60
|
+
id: CommonStringSchema,
|
|
145
61
|
expression: CommonStringSchema,
|
|
146
|
-
name: CommonStringSchema.describe("a short human readable name."),
|
|
147
|
-
isDefault: z
|
|
148
|
-
.boolean()
|
|
149
|
-
.default(false)
|
|
150
|
-
.describe(
|
|
151
|
-
"indicates if this is the default condition. if this is true then expression will be ignored."
|
|
152
|
-
),
|
|
153
62
|
});
|
|
154
63
|
|
|
155
64
|
type Condition = z.infer<typeof ConditionSchema>;
|
|
156
65
|
|
|
157
66
|
export const ConditionNodeDataSchema = z.object({
|
|
158
|
-
conditions: ConditionSchema.array()
|
|
159
|
-
.min(1)
|
|
160
|
-
.describe("at least a default case will be present"),
|
|
67
|
+
conditions: ConditionSchema.array().min(1),
|
|
161
68
|
});
|
|
162
69
|
|
|
163
70
|
export type ConditionNodeData = z.infer<typeof ConditionNodeDataSchema>;
|
|
164
71
|
|
|
165
|
-
export const ConditionNodeSchema = z
|
|
166
|
-
.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
})
|
|
171
|
-
.describe(
|
|
172
|
-
"Conditional node allows agent to make decisions based on conditions"
|
|
173
|
-
);
|
|
72
|
+
export const ConditionNodeSchema = z.object({
|
|
73
|
+
id: z.string(),
|
|
74
|
+
type: z.literal(NodeType.conditionNode),
|
|
75
|
+
data: ConditionNodeDataSchema,
|
|
76
|
+
});
|
|
174
77
|
|
|
175
78
|
export type ConditionNode = z.infer<typeof ConditionNodeSchema>;
|
|
176
79
|
|
|
@@ -263,21 +166,17 @@ export const FullfillmentNodeDataSchema = z.discriminatedUnion("type", [
|
|
|
263
166
|
|
|
264
167
|
export type FullfillmentNodeData = z.infer<typeof FullfillmentNodeDataSchema>;
|
|
265
168
|
|
|
266
|
-
export const FullfillmentNodeSchema = z
|
|
267
|
-
.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})
|
|
272
|
-
.describe("It represents the end action node in the flow.");
|
|
169
|
+
export const FullfillmentNodeSchema = z.object({
|
|
170
|
+
id: z.string(),
|
|
171
|
+
type: z.literal(NodeType.fullfillmentNode),
|
|
172
|
+
data: FullfillmentNodeDataSchema,
|
|
173
|
+
});
|
|
273
174
|
|
|
274
175
|
export type FullfillmentNode = z.infer<typeof FullfillmentNodeSchema>;
|
|
275
176
|
|
|
276
177
|
export const NameDescriptionSchema = z.object({
|
|
277
|
-
name: CommonStringSchema
|
|
278
|
-
description: CommonStringSchema
|
|
279
|
-
"a short human readable description about the node"
|
|
280
|
-
),
|
|
178
|
+
name: CommonStringSchema,
|
|
179
|
+
description: CommonStringSchema,
|
|
281
180
|
});
|
|
282
181
|
|
|
283
182
|
export type NameDescription = z.infer<typeof NameDescriptionSchema>;
|
|
@@ -289,51 +188,39 @@ export const ParameterNodeDataSchema = NameDescriptionSchema.extend({
|
|
|
289
188
|
|
|
290
189
|
export type ParameterNodeData = z.infer<typeof ParameterNodeDataSchema>;
|
|
291
190
|
|
|
292
|
-
export const ParameterNodeSchema = z
|
|
293
|
-
.
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
})
|
|
298
|
-
.describe(
|
|
299
|
-
"A Parameter node is used to define and pass parameters within the flow. It has both a target handle to receive input and a source handle to provide output."
|
|
300
|
-
);
|
|
191
|
+
export const ParameterNodeSchema = z.object({
|
|
192
|
+
id: z.string(),
|
|
193
|
+
type: z.literal(NodeType.parameterNode),
|
|
194
|
+
data: ParameterNodeDataSchema,
|
|
195
|
+
});
|
|
301
196
|
|
|
302
197
|
export type ParameterNode = z.infer<typeof ParameterNodeSchema>;
|
|
303
198
|
|
|
304
199
|
export const StartNodeDataSchema = z.object({
|
|
305
|
-
resourceId: z.string().nullish()
|
|
200
|
+
resourceId: z.string().nullish()
|
|
306
201
|
});
|
|
307
202
|
|
|
308
203
|
export type StartNodeData = z.infer<typeof StartNodeDataSchema>;
|
|
309
204
|
|
|
310
|
-
export const StartNodeSchema = z
|
|
311
|
-
.
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
})
|
|
316
|
-
.describe(
|
|
317
|
-
"The Start node represents the entry point of the flow. It acts as the parent of all tool nodes and contains only a target handle."
|
|
318
|
-
);
|
|
205
|
+
export const StartNodeSchema = z.object({
|
|
206
|
+
id: z.string(),
|
|
207
|
+
type: z.literal(NodeType.startNode),
|
|
208
|
+
data: StartNodeDataSchema,
|
|
209
|
+
});
|
|
319
210
|
|
|
320
211
|
export type StartNode = z.infer<typeof StartNodeSchema>;
|
|
321
212
|
|
|
322
213
|
export const ToolNodeDataSchema = NameDescriptionSchema.extend({
|
|
323
|
-
resourceId: z.string().nullish()
|
|
214
|
+
resourceId: z.string().nullish()
|
|
324
215
|
});
|
|
325
216
|
|
|
326
217
|
export type ToolNodeData = z.infer<typeof ToolNodeDataSchema>;
|
|
327
218
|
|
|
328
|
-
export const ToolNodeSchema = z
|
|
329
|
-
.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
})
|
|
334
|
-
.describe(
|
|
335
|
-
"A Tool node represents an executable step in the flow. It can receive input through a target handle and pass output through a source handle."
|
|
336
|
-
);
|
|
219
|
+
export const ToolNodeSchema = z.object({
|
|
220
|
+
id: z.string(),
|
|
221
|
+
type: z.literal(NodeType.toolNode),
|
|
222
|
+
data: ToolNodeDataSchema,
|
|
223
|
+
});
|
|
337
224
|
|
|
338
225
|
export type ToolNode = z.infer<typeof ToolNodeSchema>;
|
|
339
226
|
|
|
@@ -439,6 +326,39 @@ export function updateWorkflowWrtDiff(oldWorkflow, newWorkflow, diff) {
|
|
|
439
326
|
deletedToolResourceIds
|
|
440
327
|
};
|
|
441
328
|
}
|
|
329
|
+
export function updateWorkflow(workflow, diff, resourceIdsToDelete) {
|
|
330
|
+
const _newWorkflow = JSON.parse(JSON.stringify(workflow));
|
|
331
|
+
// update resource ids in new workflow based on diff
|
|
332
|
+
diff.forEach(({ nodeId, resourceId }) => {
|
|
333
|
+
const node = _newWorkflow.graph.nodes.find((n) => n.id === nodeId);
|
|
334
|
+
if (node) {
|
|
335
|
+
node.data.resourceId = resourceId;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
// remove edges associated with deleted nodes
|
|
339
|
+
_newWorkflow.graph.edges = _newWorkflow.graph.edges.filter((edge) => {
|
|
340
|
+
const sourceNode = _newWorkflow.graph.nodes.find((n) => n.id === edge.source);
|
|
341
|
+
const targetNode = _newWorkflow.graph.nodes.find((n) => n.id === edge.target);
|
|
342
|
+
if (sourceNode && targetNode) {
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
return false;
|
|
346
|
+
});
|
|
347
|
+
// remove tools and start nodes which are deleted in new workflow
|
|
348
|
+
_newWorkflow.graph.nodes = _newWorkflow.graph.nodes.filter((node) => {
|
|
349
|
+
var _a, _b;
|
|
350
|
+
if (node.type === NodeType.startNode) {
|
|
351
|
+
const resourceId = (_a = node.data) === null || _a === void 0 ? void 0 : _a.resourceId;
|
|
352
|
+
return !resourceIdsToDelete.includes(resourceId);
|
|
353
|
+
}
|
|
354
|
+
else if (node.type === NodeType.toolNode) {
|
|
355
|
+
const resourceId = (_b = node.data) === null || _b === void 0 ? void 0 : _b.resourceId;
|
|
356
|
+
return !resourceIdsToDelete.includes(resourceId);
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
});
|
|
360
|
+
return _newWorkflow;
|
|
361
|
+
}
|
|
442
362
|
function getDeletedAgentResourceIds(oldWorkflow, newWorkflow) {
|
|
443
363
|
const oldAgentIds = new Set(getStartNodeResourceIds(oldWorkflow).filter(Boolean));
|
|
444
364
|
const newAgentIds = new Set(getStartNodeResourceIds(newWorkflow).filter(Boolean));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../agentic/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAGxD,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../agentic/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAGxD,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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