@graph-compose/client 1.0.0 → 1.0.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.
Files changed (49) hide show
  1. package/README.md +949 -476
  2. package/dist/core/adk-helpers.d.ts +94 -0
  3. package/dist/core/adk-helpers.d.ts.map +1 -0
  4. package/dist/core/adk-helpers.js +134 -0
  5. package/dist/core/adk-helpers.js.map +1 -0
  6. package/dist/core/adk-node-builder.d.ts +128 -0
  7. package/dist/core/adk-node-builder.d.ts.map +1 -0
  8. package/dist/core/adk-node-builder.js +175 -0
  9. package/dist/core/adk-node-builder.js.map +1 -0
  10. package/dist/core/adk-workflow-builder.d.ts +74 -0
  11. package/dist/core/adk-workflow-builder.d.ts.map +1 -0
  12. package/dist/core/adk-workflow-builder.js +138 -0
  13. package/dist/core/adk-workflow-builder.js.map +1 -0
  14. package/dist/core/base-builder.d.ts +80 -0
  15. package/dist/core/base-builder.d.ts.map +1 -0
  16. package/dist/core/base-builder.js +63 -0
  17. package/dist/core/base-builder.js.map +1 -0
  18. package/dist/core/builder.d.ts +35 -67
  19. package/dist/core/builder.d.ts.map +1 -1
  20. package/dist/core/builder.js +45 -144
  21. package/dist/core/builder.js.map +1 -1
  22. package/dist/core/node-builder.d.ts +15 -59
  23. package/dist/core/node-builder.d.ts.map +1 -1
  24. package/dist/core/node-builder.js +36 -106
  25. package/dist/core/node-builder.js.map +1 -1
  26. package/dist/index.d.ts +5 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +7 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/types.d.ts +50 -4
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/types.js.map +1 -1
  33. package/dist/validation/adk-validation.d.ts +10 -0
  34. package/dist/validation/adk-validation.d.ts.map +1 -0
  35. package/dist/validation/adk-validation.js +362 -0
  36. package/dist/validation/adk-validation.js.map +1 -0
  37. package/dist/validation/index.d.ts +34 -9
  38. package/dist/validation/index.d.ts.map +1 -1
  39. package/dist/validation/index.js +40 -131
  40. package/dist/validation/index.js.map +1 -1
  41. package/package.json +4 -2
  42. package/dist/core/tool-builder.d.ts +0 -130
  43. package/dist/core/tool-builder.d.ts.map +0 -1
  44. package/dist/core/tool-builder.js +0 -343
  45. package/dist/core/tool-builder.js.map +0 -1
  46. package/dist/node-builder.d.ts +0 -64
  47. package/dist/node-builder.d.ts.map +0 -1
  48. package/dist/node-builder.js +0 -261
  49. package/dist/node-builder.js.map +0 -1
@@ -3,24 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodeBuilder = void 0;
4
4
  const zod_to_json_schema_1 = require("zod-to-json-schema");
5
5
  const validation_1 = require("../validation");
6
+ const base_builder_1 = require("./base-builder");
6
7
  /**
7
8
  * Fluent API for configuring individual nodes within a GraphCompose workflow.
8
9
  * Chain configuration methods (e.g., `.get()`, `.withHeaders()`, `.withDependencies()`).
9
10
  * Call `.end()` to finalize the node definition and add it to the graph.
11
+ *
12
+ * Extends AbstractNodeBuilder to inherit common builder functionality.
10
13
  */
11
- class NodeBuilder {
14
+ class NodeBuilder extends base_builder_1.AbstractNodeBuilder {
12
15
  /**
13
16
  * Creates an instance of NodeBuilder.
14
17
  * @param graph The parent GraphCompose instance.
15
18
  * @param id The unique identifier for the node.
16
- * @param type The type of the node ('http', 'error_boundary', 'agent'). Defaults to 'http'.
19
+ * @param type The type of the node ('http' or 'error_boundary'). Defaults to 'http'.
17
20
  * @param protectedNodes Optional array of node IDs to protect if type is 'error_boundary'.
18
21
  */
19
22
  constructor(graph, id, type = "http", protectedNodes) {
20
- this.graph = graph;
23
+ super(graph, id);
21
24
  this.isHttpNode = type === "http";
22
- this.isAgentNode = type === "agent";
23
- this.id = id; // Store the ID
25
+ this.isErrorBoundaryNode = type === "error_boundary";
24
26
  if (type === "error_boundary") {
25
27
  this.node = {
26
28
  id,
@@ -33,22 +35,6 @@ class NodeBuilder {
33
35
  },
34
36
  };
35
37
  }
36
- else if (type === "agent") {
37
- this.node = {
38
- id,
39
- type: "agent",
40
- dependencies: [],
41
- tools: [],
42
- activityConfig: {},
43
- http: {
44
- method: "POST",
45
- url: "",
46
- config: {
47
- max_iterations: undefined,
48
- },
49
- },
50
- };
51
- }
52
38
  else {
53
39
  this.node = {
54
40
  id,
@@ -85,8 +71,12 @@ class NodeBuilder {
85
71
  * Sets the HTTP method to GET and specifies the URL for the node.
86
72
  * @param url The URL endpoint for the GET request.
87
73
  * @returns The NodeBuilder instance for chaining.
74
+ * @throws {Error} If called on a non-HTTP node.
88
75
  */
89
76
  get(url) {
77
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
78
+ throw new Error("HTTP methods can only be set on HTTP and error boundary nodes");
79
+ }
90
80
  this.node.http.method = "GET";
91
81
  this.node.http.url = url;
92
82
  return this;
@@ -95,8 +85,12 @@ class NodeBuilder {
95
85
  * Sets the HTTP method to POST and specifies the URL for the node.
96
86
  * @param url The URL endpoint for the POST request.
97
87
  * @returns The NodeBuilder instance for chaining.
88
+ * @throws {Error} If called on a non-HTTP node.
98
89
  */
99
90
  post(url) {
91
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
92
+ throw new Error("HTTP methods can only be set on HTTP and error boundary nodes");
93
+ }
100
94
  this.node.http.method = "POST";
101
95
  this.node.http.url = url;
102
96
  return this;
@@ -107,6 +101,9 @@ class NodeBuilder {
107
101
  * @returns The NodeBuilder instance for chaining.
108
102
  */
109
103
  put(url) {
104
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
105
+ throw new Error("HTTP methods can only be set on HTTP and error boundary nodes");
106
+ }
110
107
  this.node.http.method = "PUT";
111
108
  this.node.http.url = url;
112
109
  return this;
@@ -117,6 +114,9 @@ class NodeBuilder {
117
114
  * @returns The NodeBuilder instance for chaining.
118
115
  */
119
116
  delete(url) {
117
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
118
+ throw new Error("HTTP methods can only be set on HTTP and error boundary nodes");
119
+ }
120
120
  this.node.http.method = "DELETE";
121
121
  this.node.http.url = url;
122
122
  return this;
@@ -127,6 +127,9 @@ class NodeBuilder {
127
127
  * @returns The NodeBuilder instance for chaining.
128
128
  */
129
129
  patch(url) {
130
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
131
+ throw new Error("HTTP methods can only be set on HTTP and error boundary nodes");
132
+ }
130
133
  this.node.http.method = "PATCH";
131
134
  this.node.http.url = url;
132
135
  return this;
@@ -173,6 +176,9 @@ class NodeBuilder {
173
176
  * @throws {Error} If any JSONata expression within headers is invalid.
174
177
  */
175
178
  withHeaders(headers) {
179
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
180
+ throw new Error("Headers can only be set on HTTP and error boundary nodes");
181
+ }
176
182
  // Validate any JSONata expressions in headers
177
183
  Object.entries(headers).forEach(([key, value]) => {
178
184
  if (typeof value === "object" && "jsonataExpression" in value) {
@@ -190,6 +196,9 @@ class NodeBuilder {
190
196
  * @returns The NodeBuilder instance for chaining.
191
197
  */
192
198
  withBody(body) {
199
+ if (!this.isHttpNode && !this.isErrorBoundaryNode) {
200
+ throw new Error("Body can only be set on HTTP and error boundary nodes");
201
+ }
193
202
  // Note: Template expression validation happens during final workflow validation
194
203
  // This allows us to collect all validation errors at once and maintain a single source of truth
195
204
  if (typeof body === "string") {
@@ -246,7 +255,7 @@ class NodeBuilder {
246
255
  /**
247
256
  * Specifies the nodes that this node depends on.
248
257
  * The node will only execute after all its dependencies have successfully completed.
249
- * Applicable only to HTTP and agent nodes.
258
+ * Applicable to HTTP and agent nodes.
250
259
  * @param nodeIds An array of node IDs that this node depends on.
251
260
  * @returns The NodeBuilder instance for chaining.
252
261
  * @throws {Error} If called on a non-HTTP or non-agent node.
@@ -255,11 +264,8 @@ class NodeBuilder {
255
264
  if (this.isHttpNode) {
256
265
  this.node.dependencies = nodeIds;
257
266
  }
258
- else if (this.isAgentNode) {
259
- this.node.dependencies = nodeIds;
260
- }
261
267
  else {
262
- throw new Error("Dependencies can only be set on HTTP or agent nodes");
268
+ throw new Error("Dependencies can only be set on HTTP and agent nodes");
263
269
  }
264
270
  return this;
265
271
  }
@@ -292,79 +298,12 @@ class NodeBuilder {
292
298
  }
293
299
  return this;
294
300
  }
301
+ // Terminal operation - inherited from AbstractNodeBuilder
302
+ // end() is automatically provided by the base class
295
303
  /**
296
- * Set the maximum number of iterations for an agent node.
297
- * An agent runs until it returns a completion schema response.
298
- * You are responsible for ensuring the agent returns a `complete` response before this limit.
299
- * If the agent reaches the max iterations without completing, it will fail.
300
- *
301
- * @default 5
302
- * @param maxIterations Must be greater than 0
303
- * @throws {Error} If called on a non-agent node
304
- * @throws {ValidationError} If maxIterations is less than 1
305
- */
306
- withMaxIterations(maxIterations) {
307
- if (!this.isAgentNode) {
308
- throw new Error("Max iterations can only be set for agent nodes");
309
- }
310
- const agentNode = this.node;
311
- agentNode.http.config.max_iterations = maxIterations;
312
- return this;
313
- }
314
- /**
315
- * Set the tools available to the agent.
316
- * Tools must be defined in the global tools section of the workflow.
317
- * Each tool name must be unique within the workflow and have no dashes or spaces.
318
- *
319
- * @param tools Array of tool names that the agent can use
320
- * @throws {Error} If called on a non-agent node
321
- * @throws {ValidationError} If any tool is not found in global tools
322
- */
323
- withTools(tools) {
324
- if (!this.isAgentNode) {
325
- throw new Error("Tools can only be set for agent nodes");
326
- }
327
- const agentNode = this.node;
328
- agentNode.tools = tools;
329
- return this;
330
- }
331
- /**
332
- * Add a single tool to the agent's available tools.
333
- * The tool must be defined in the global tools section of the workflow.
334
- * The tool name must be unique within the workflow and have no dashes or spaces.
335
- *
336
- * @param tool Name of the tool to add
337
- * @throws {Error} If called on a non-agent node
338
- * @throws {ValidationError} If the tool is not found in global tools
339
- */
340
- addTool(tool) {
341
- if (!this.isAgentNode) {
342
- throw new Error("Tools can only be added to agent nodes");
343
- }
344
- const agentNode = this.node;
345
- if (!agentNode.tools.includes(tool)) {
346
- agentNode.tools.push(tool);
347
- }
348
- return this;
349
- }
350
- // Terminal operation
351
- /**
352
- * Finalizes the node configuration and adds it to the parent GraphCompose builder.
353
- * This method MUST be called to complete the node definition.
354
- *
355
- * @returns The parent GraphCompose instance, allowing for further chaining on the main graph.
356
- */
357
- end() {
358
- // Call the internal add method on the parent graph
359
- this.graph._addNodeDefinition(this.build());
360
- return this.graph;
361
- }
362
- // Internal method to get the built node
363
- /**
304
+ * Builds the final node configuration.
305
+ * Called internally by the base class when end() is invoked.
364
306
  * @internal
365
- * Retrieves the fully configured node object.
366
- * This method is intended for internal use by the GraphCompose builder.
367
- * @returns The configured Node object.
368
307
  */
369
308
  build() {
370
309
  // Remove empty activityConfig if no activity settings were provided
@@ -373,15 +312,6 @@ class NodeBuilder {
373
312
  }
374
313
  return this.node;
375
314
  }
376
- /**
377
- * @internal
378
- * Retrieves the ID of the node being built.
379
- * Used for generating informative error messages.
380
- * @returns The ID of the node.
381
- */
382
- getId() {
383
- return this.id;
384
- }
385
315
  }
386
316
  exports.NodeBuilder = NodeBuilder;
387
317
  //# sourceMappingURL=node-builder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-builder.js","sourceRoot":"","sources":["../../src/core/node-builder.ts"],"names":[],"mappings":";;;AAUA,2DAAqD;AACrD,8CAAmD;AAGnD;;;;GAIG;AACH,MAAa,WAAW;IAQtB;;;;;;OAMG;IACH,YACmB,KAAmB,EACpC,EAAU,EACV,OAA4C,MAAM,EAClD,cAAyB;QAHR,UAAK,GAAL,KAAK,CAAc;QAKpC,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,MAAM,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;QACpC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,eAAe;QAE7B,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG;gBACV,EAAE;gBACF,IAAI,EAAE,gBAAgB;gBACtB,cAAc,EAAE,cAAc,IAAI,EAAE;gBACpC,cAAc,EAAE,EAAE;gBAClB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;QACH,oEAAoE;QACpE,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnF,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;CACF;AAnZD,kCAmZC"}
1
+ {"version":3,"file":"node-builder.js","sourceRoot":"","sources":["../../src/core/node-builder.ts"],"names":[],"mappings":";;;AAQA,2DAAqD;AACrD,8CAAmD;AACnD,iDAAqD;AAGrD;;;;;;GAMG;AACH,MAAa,WAAY,SAAQ,kCAAiD;IAKhF;;;;;;OAMG;IACH,YACE,KAAmB,EACnB,EAAU,EACV,OAAkC,MAAM,EACxC,cAAyB;QAEzB,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,MAAM,CAAC;QAClC,IAAI,CAAC,mBAAmB,GAAG,IAAI,KAAK,gBAAgB,CAAC;QAErD,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG;gBACV,EAAE;gBACF,IAAI,EAAE,gBAAgB;gBACtB,cAAc,EAAE,cAAc,IAAI,EAAE;gBACpC,cAAc,EAAE,EAAE;gBAClB,IAAI,EAAE;oBACJ,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,EAAE;iBACR;aACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG;gBACV,EAAE;gBACF,IAAI,EAAE,MAAM;gBACZ,YAAY,EAAE,EAAE;gBAChB,IAAI,EAAE;oBACJ,MAAM,EAAE,KAAK;oBACb,GAAG,EAAE,EAAE;iBACR;gBACD,c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,yDAAyD;gBACzD,MAAM,YAAY,GAAG,IAAA,oCAAe,EAAC,MAAM,CAAC,MAAa,CAAC,CAAC;gBAC1D,IAAI,CAAC,IAAiB,CAAC,UAAW,CAAC,MAAM;oBACxC,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC1E,YAAY,CAAC;YACjB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0DAA0D;IAC1D,oDAAoD;IAEpD;;;;OAIG;IACH,KAAK;QACH,oEAAoE;QACpE,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnF,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CAGF;AAxUD,kCAwUC"}
package/dist/index.d.ts CHANGED
@@ -10,7 +10,11 @@ import "zod-openapi/extend";
10
10
  export declare const VERSION = "1.0.0";
11
11
  export * from "./core/builder";
12
12
  export * from "./core/node-builder";
13
+ export * from "./core/base-builder";
14
+ export * from "./core/adk-node-builder";
15
+ export * from "./core/adk-workflow-builder";
16
+ export * from "./core/adk-helpers";
13
17
  export * from "./types";
14
- export { validateWorkflow } from "./validation";
18
+ export { ClientValidationResult, ClientValidationResultSchema, validateWorkflow, } from "./validation";
15
19
  export * from "./errors";
16
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,oBAAoB,CAAC;AAE5B,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,SAAS,CAAC;AAIxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,oBAAoB,CAAC;AAE5B,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC;AAIxB,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.validateWorkflow = exports.VERSION = void 0;
17
+ exports.validateWorkflow = exports.ClientValidationResultSchema = exports.VERSION = void 0;
18
18
  /**
19
19
  * Graph Compose Client Package
20
20
  *
@@ -28,11 +28,17 @@ exports.VERSION = "1.0.0";
28
28
  // Core functionality
29
29
  __exportStar(require("./core/builder"), exports);
30
30
  __exportStar(require("./core/node-builder"), exports);
31
+ __exportStar(require("./core/base-builder"), exports);
32
+ // ADK (Agent Development Kit) functionality
33
+ __exportStar(require("./core/adk-node-builder"), exports);
34
+ __exportStar(require("./core/adk-workflow-builder"), exports);
35
+ __exportStar(require("./core/adk-helpers"), exports);
31
36
  // Type definitions
32
37
  __exportStar(require("./types"), exports);
33
38
  // Validation utilities
34
39
  // Explicitly export only needed members to avoid name clash with types.ts
35
40
  var validation_1 = require("./validation");
41
+ Object.defineProperty(exports, "ClientValidationResultSchema", { enumerable: true, get: function () { return validation_1.ClientValidationResultSchema; } });
36
42
  Object.defineProperty(exports, "validateWorkflow", { enumerable: true, get: function () { return validation_1.validateWorkflow; } });
37
43
  // Error handling
38
44
  __exportStar(require("./errors"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,8BAA4B;AAEf,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,qBAAqB;AACrB,iDAA+B;AAC/B,sDAAoC;AAEpC,mBAAmB;AACnB,0CAAwB;AAExB,uBAAuB;AACvB,0EAA0E;AAC1E,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AAEzB,iBAAiB;AACjB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,8BAA4B;AAEf,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,qBAAqB;AACrB,iDAA+B;AAC/B,sDAAoC;AACpC,sDAAoC;AAEpC,4CAA4C;AAC5C,0DAAwC;AACxC,8DAA4C;AAC5C,qDAAmC;AAEnC,mBAAmB;AACnB,0CAAwB;AAExB,uBAAuB;AACvB,0EAA0E;AAC1E,2CAIsB;AAFpB,0HAAA,4BAA4B,OAAA;AAC5B,8GAAA,gBAAgB,OAAA;AAGlB,iBAAiB;AACjB,2CAAyB"}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { GraphWorkflowState } from "@graph-compose/core";
1
2
  export interface ExecuteOptions {
2
3
  /**
3
4
  * Context data to pass to the workflow
@@ -41,25 +42,70 @@ export interface ApiResponse<T> {
41
42
  message: string;
42
43
  data: T | null;
43
44
  }
44
- export interface ValidationResult {
45
+ export interface ClientValidationResult {
45
46
  isValid: boolean;
46
47
  errors: {
47
48
  name: string;
48
49
  message: string;
49
50
  }[];
50
51
  }
52
+ /**
53
+ * Response structure for getting workflow status or details
54
+ */
51
55
  export interface GetWorkflowResponse {
56
+ /**
57
+ * Unique identifier for the workflow
58
+ */
52
59
  workflow_id: string;
60
+ /**
61
+ * Unique identifier for the specific workflow execution run
62
+ */
53
63
  run_id: string;
64
+ /**
65
+ * ISO DateTime string when the workflow was started
66
+ */
54
67
  started_at: string;
68
+ /**
69
+ * ID of the user who initiated the workflow
70
+ */
55
71
  user_id: string;
72
+ /**
73
+ * ID of the organization the workflow belongs to
74
+ */
56
75
  organization_id: string;
57
- status: string;
58
- execution_state: any;
59
- error?: any;
76
+ /**
77
+ * Current status of the workflow execution
78
+ */
79
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "TERMINATED" | "CONTINUED_AS_NEW" | "TIMED_OUT";
80
+ /**
81
+ * The current execution state of the workflow
82
+ * Contains context, node results, and execution information
83
+ */
84
+ execution_state: GraphWorkflowState;
85
+ /**
86
+ * Error information if workflow failed or terminated.
87
+ * Structure depends on failure type:
88
+ * - For failures: {message: string, stackTrace?: any}
89
+ * - For terminations: {reason: string, identity?: string}
90
+ */
91
+ error?: {
92
+ message?: string;
93
+ stackTrace?: any;
94
+ reason?: string;
95
+ identity?: string;
96
+ };
60
97
  }
98
+ /**
99
+ * Response structure for workflow termination requests
100
+ */
61
101
  export interface TerminateWorkflowResponse {
102
+ /**
103
+ * Identifier of the workflow that was terminated
104
+ */
62
105
  workflowId: string;
106
+ /**
107
+ * Status of the termination request (e.g., "Terminated" or "Termination requested")
108
+ */
63
109
  status: string;
64
110
  }
65
111
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAA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,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,EACF,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,kBAAkB,GAClB,WAAW,CAAC;IAEhB;;;OAGG;IACH,eAAe,EAAE,kBAAkB,CAAC;IAEpC;;;;;OAKG;IACH,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,GAAG,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAkFA,0BAA0B"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AA4IA,0BAA0B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ADK-specific validation for Agent Development Kit workflows
3
+ */
4
+ import type { AdkNode } from "@graph-compose/core";
5
+ import { ValidationError } from "../errors";
6
+ /**
7
+ * Validates an ADK node's configuration
8
+ */
9
+ export declare function validateAdkNode(node: AdkNode): ValidationError[];
10
+ //# sourceMappingURL=adk-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adk-validation.d.ts","sourceRoot":"","sources":["../../src/validation/adk-validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,qBAAqB,CAAC;AAMhE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,EAAE,CAmIhE"}