@datatechsolutions/ui 2.11.53 → 2.11.56

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 (35) hide show
  1. package/dist/astrlabe/contracts.d.mts +16 -3
  2. package/dist/astrlabe/contracts.d.ts +16 -3
  3. package/dist/astrlabe/index.d.mts +1 -1
  4. package/dist/astrlabe/index.d.ts +1 -1
  5. package/dist/astrlabe/index.js +133 -120
  6. package/dist/astrlabe/index.js.map +1 -1
  7. package/dist/astrlabe/index.mjs +13 -8
  8. package/dist/astrlabe/index.mjs.map +1 -1
  9. package/dist/astrlabe/utils.d.mts +27 -23
  10. package/dist/astrlabe/utils.d.ts +27 -23
  11. package/dist/astrlabe/utils.js +15 -7
  12. package/dist/astrlabe/utils.mjs +2 -2
  13. package/dist/astrlabe/workflow-canvas.js +3 -3
  14. package/dist/astrlabe/workflow-canvas.mjs +2 -2
  15. package/dist/chunk-53SRKVKQ.mjs +542 -0
  16. package/dist/chunk-53SRKVKQ.mjs.map +1 -0
  17. package/dist/chunk-5UU3RQRB.js +547 -0
  18. package/dist/chunk-5UU3RQRB.js.map +1 -0
  19. package/dist/{chunk-PWBWP5FJ.js → chunk-C7BI5LQ6.js} +7 -2
  20. package/dist/chunk-C7BI5LQ6.js.map +1 -0
  21. package/dist/{chunk-PEBQWL6R.mjs → chunk-FXJBJ77I.mjs} +7 -3
  22. package/dist/chunk-FXJBJ77I.mjs.map +1 -0
  23. package/dist/{chunk-7LCEP4X5.js → chunk-P67L6WXL.js} +14 -10
  24. package/dist/chunk-P67L6WXL.js.map +1 -0
  25. package/dist/{chunk-TLPPVL3W.mjs → chunk-WNCPAWLC.mjs} +7 -2
  26. package/dist/chunk-WNCPAWLC.mjs.map +1 -0
  27. package/package.json +1 -1
  28. package/dist/chunk-3GE3MBUZ.js +0 -279
  29. package/dist/chunk-3GE3MBUZ.js.map +0 -1
  30. package/dist/chunk-7LCEP4X5.js.map +0 -1
  31. package/dist/chunk-BLNXRUC4.mjs +0 -276
  32. package/dist/chunk-BLNXRUC4.mjs.map +0 -1
  33. package/dist/chunk-PEBQWL6R.mjs.map +0 -1
  34. package/dist/chunk-PWBWP5FJ.js.map +0 -1
  35. package/dist/chunk-TLPPVL3W.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { WorkflowNodeType, LogicNodeConfig, WorkflowGraph } from './contracts.mjs';
1
+ import { WorkflowNodeType, LogicNodeConfig, WorkflowNode, WorkflowEdge, WorkflowGraph } from './contracts.mjs';
2
2
  import { Node, Edge } from '@xyflow/react';
3
3
 
4
4
  /**
@@ -28,33 +28,37 @@ declare function createDefaultLogicNodeConfig(nodeType: WorkflowNodeType): Logic
28
28
  /**
29
29
  * Workflow Validator
30
30
  * =================
31
- * Validates the workflow graph before publishing.
32
- * Ensures the graph forms a valid DAG with proper node connections.
31
+ * Localizes validation output inside the UI package while keeping issue codes
32
+ * stable enough for future contract tests against the backend validator.
33
33
  */
34
34
 
35
+ type SupportedLocale = 'en' | 'pt-BR' | 'es' | 'fr' | 'de' | 'it';
36
+ type ValidationParams = Record<string, string | number | undefined>;
37
+ type ValidationLocale = SupportedLocale | string;
38
+ type ValidationIssueCode = 'graph.noAgents' | 'graph.missingSource' | 'graph.missingTarget' | 'graph.orphanNode' | 'graph.toolToNonAgent' | 'graph.ruleNoAgent' | 'graph.cycleDetected' | 'graph.multipleStartNodes' | 'graph.multipleEndNodes' | 'graph.startHasIncoming' | 'graph.endHasOutgoing' | 'graph.iterationNoOutgoing' | 'node.required' | 'node.requiredWhenLanguageSet' | 'node.codeShapeRequired' | 'node.mustBeArray' | 'node.mustBeReferenceArray' | 'node.mustBeNonEmptyReferenceArray' | 'node.assignmentNeedsSourceOrValue' | 'node.invalidAggregationMode' | 'node.invalidListOperation' | 'node.invalidLogicalOperator' | 'node.mustBeNumber' | 'node.invalidHttpMethod' | 'node.providerIdentityRequired' | 'node.inputOrInstructionsRequired' | 'node.invalidExtractionMode' | 'node.unknownType';
39
+ type ValidationIssue = {
40
+ code: ValidationIssueCode;
41
+ message: string;
42
+ params?: ValidationParams;
43
+ };
44
+ type NodeValidationIssue = ValidationIssue & {
45
+ nodeId: string;
46
+ nodeType: string;
47
+ field?: string;
48
+ };
35
49
  type ValidationResult = {
36
50
  valid: boolean;
37
51
  errors: string[];
52
+ issues: ValidationIssue[];
53
+ nodeIssues: NodeValidationIssue[];
38
54
  };
39
- /**
40
- * Validate a workflow graph for publishing.
41
- * Checks:
42
- * - At least one agent node exists
43
- * - All edges have valid source/target nodes
44
- * - No orphan nodes (every node has at least one connection, except note nodes)
45
- * - Tool nodes connect to agent nodes only
46
- * - Agent chain forms a valid DAG (no cycles)
47
- * - Rule nodes have incoming edges from agents
48
- * - Logic node constraints (start/end uniqueness, config validation)
49
- * - New node type validations (answer, question_classifier, parameter_extractor, etc.)
50
- */
51
- declare function validateWorkflowGraph(graph: WorkflowGraph): ValidationResult;
52
- /**
53
- * Topologically sort agent nodes from the graph edges.
54
- * Returns agent entityIds in execution order.
55
- * Logic nodes are skipped — only agent entityIds are returned.
56
- */
57
- declare function topologicalSortAgents(graph: WorkflowGraph): string[];
55
+ type ValidationOptions = {
56
+ locale?: ValidationLocale;
57
+ };
58
+ declare function validateNodeConfig(node: WorkflowNode, options?: ValidationOptions): NodeValidationIssue[];
59
+ declare function validateGraphNodeConfigs(graph: WorkflowGraph, options?: ValidationOptions): NodeValidationIssue[];
60
+ declare function validateWorkflowGraph(graph: WorkflowGraph, options?: ValidationOptions): ValidationResult;
61
+ declare function topologicalSortAgents(agentNodes: WorkflowNode[], edges: WorkflowEdge[], nodeMap: Map<string, WorkflowNode>): WorkflowNode[];
58
62
 
59
63
  /**
60
64
  * Agent ELO Tier
@@ -68,4 +72,4 @@ type AgentTier = {
68
72
  };
69
73
  declare function getAgentTier(elo: number | undefined): AgentTier;
70
74
 
71
- export { type AgentTier, type LayoutDirection, applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier, topologicalSortAgents, validateWorkflowGraph };
75
+ export { type AgentTier, type LayoutDirection, type NodeValidationIssue, type ValidationResult, applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier, topologicalSortAgents, validateGraphNodeConfigs, validateNodeConfig, validateWorkflowGraph };
@@ -1,4 +1,4 @@
1
- import { WorkflowNodeType, LogicNodeConfig, WorkflowGraph } from './contracts.js';
1
+ import { WorkflowNodeType, LogicNodeConfig, WorkflowNode, WorkflowEdge, WorkflowGraph } from './contracts.js';
2
2
  import { Node, Edge } from '@xyflow/react';
3
3
 
4
4
  /**
@@ -28,33 +28,37 @@ declare function createDefaultLogicNodeConfig(nodeType: WorkflowNodeType): Logic
28
28
  /**
29
29
  * Workflow Validator
30
30
  * =================
31
- * Validates the workflow graph before publishing.
32
- * Ensures the graph forms a valid DAG with proper node connections.
31
+ * Localizes validation output inside the UI package while keeping issue codes
32
+ * stable enough for future contract tests against the backend validator.
33
33
  */
34
34
 
35
+ type SupportedLocale = 'en' | 'pt-BR' | 'es' | 'fr' | 'de' | 'it';
36
+ type ValidationParams = Record<string, string | number | undefined>;
37
+ type ValidationLocale = SupportedLocale | string;
38
+ type ValidationIssueCode = 'graph.noAgents' | 'graph.missingSource' | 'graph.missingTarget' | 'graph.orphanNode' | 'graph.toolToNonAgent' | 'graph.ruleNoAgent' | 'graph.cycleDetected' | 'graph.multipleStartNodes' | 'graph.multipleEndNodes' | 'graph.startHasIncoming' | 'graph.endHasOutgoing' | 'graph.iterationNoOutgoing' | 'node.required' | 'node.requiredWhenLanguageSet' | 'node.codeShapeRequired' | 'node.mustBeArray' | 'node.mustBeReferenceArray' | 'node.mustBeNonEmptyReferenceArray' | 'node.assignmentNeedsSourceOrValue' | 'node.invalidAggregationMode' | 'node.invalidListOperation' | 'node.invalidLogicalOperator' | 'node.mustBeNumber' | 'node.invalidHttpMethod' | 'node.providerIdentityRequired' | 'node.inputOrInstructionsRequired' | 'node.invalidExtractionMode' | 'node.unknownType';
39
+ type ValidationIssue = {
40
+ code: ValidationIssueCode;
41
+ message: string;
42
+ params?: ValidationParams;
43
+ };
44
+ type NodeValidationIssue = ValidationIssue & {
45
+ nodeId: string;
46
+ nodeType: string;
47
+ field?: string;
48
+ };
35
49
  type ValidationResult = {
36
50
  valid: boolean;
37
51
  errors: string[];
52
+ issues: ValidationIssue[];
53
+ nodeIssues: NodeValidationIssue[];
38
54
  };
39
- /**
40
- * Validate a workflow graph for publishing.
41
- * Checks:
42
- * - At least one agent node exists
43
- * - All edges have valid source/target nodes
44
- * - No orphan nodes (every node has at least one connection, except note nodes)
45
- * - Tool nodes connect to agent nodes only
46
- * - Agent chain forms a valid DAG (no cycles)
47
- * - Rule nodes have incoming edges from agents
48
- * - Logic node constraints (start/end uniqueness, config validation)
49
- * - New node type validations (answer, question_classifier, parameter_extractor, etc.)
50
- */
51
- declare function validateWorkflowGraph(graph: WorkflowGraph): ValidationResult;
52
- /**
53
- * Topologically sort agent nodes from the graph edges.
54
- * Returns agent entityIds in execution order.
55
- * Logic nodes are skipped — only agent entityIds are returned.
56
- */
57
- declare function topologicalSortAgents(graph: WorkflowGraph): string[];
55
+ type ValidationOptions = {
56
+ locale?: ValidationLocale;
57
+ };
58
+ declare function validateNodeConfig(node: WorkflowNode, options?: ValidationOptions): NodeValidationIssue[];
59
+ declare function validateGraphNodeConfigs(graph: WorkflowGraph, options?: ValidationOptions): NodeValidationIssue[];
60
+ declare function validateWorkflowGraph(graph: WorkflowGraph, options?: ValidationOptions): ValidationResult;
61
+ declare function topologicalSortAgents(agentNodes: WorkflowNode[], edges: WorkflowEdge[], nodeMap: Map<string, WorkflowNode>): WorkflowNode[];
58
62
 
59
63
  /**
60
64
  * Agent ELO Tier
@@ -68,4 +72,4 @@ type AgentTier = {
68
72
  };
69
73
  declare function getAgentTier(elo: number | undefined): AgentTier;
70
74
 
71
- export { type AgentTier, type LayoutDirection, applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier, topologicalSortAgents, validateWorkflowGraph };
75
+ export { type AgentTier, type LayoutDirection, type NodeValidationIssue, type ValidationResult, applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier, topologicalSortAgents, validateGraphNodeConfigs, validateNodeConfig, validateWorkflowGraph };
@@ -1,30 +1,38 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunk3GE3MBUZ_js = require('../chunk-3GE3MBUZ.js');
5
- var chunkPWBWP5FJ_js = require('../chunk-PWBWP5FJ.js');
4
+ var chunk5UU3RQRB_js = require('../chunk-5UU3RQRB.js');
5
+ var chunkC7BI5LQ6_js = require('../chunk-C7BI5LQ6.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "topologicalSortAgents", {
10
10
  enumerable: true,
11
- get: function () { return chunk3GE3MBUZ_js.topologicalSortAgents; }
11
+ get: function () { return chunk5UU3RQRB_js.topologicalSortAgents; }
12
+ });
13
+ Object.defineProperty(exports, "validateGraphNodeConfigs", {
14
+ enumerable: true,
15
+ get: function () { return chunk5UU3RQRB_js.validateGraphNodeConfigs; }
16
+ });
17
+ Object.defineProperty(exports, "validateNodeConfig", {
18
+ enumerable: true,
19
+ get: function () { return chunk5UU3RQRB_js.validateNodeConfig; }
12
20
  });
13
21
  Object.defineProperty(exports, "validateWorkflowGraph", {
14
22
  enumerable: true,
15
- get: function () { return chunk3GE3MBUZ_js.validateWorkflowGraph; }
23
+ get: function () { return chunk5UU3RQRB_js.validateWorkflowGraph; }
16
24
  });
17
25
  Object.defineProperty(exports, "applyDagreLayout", {
18
26
  enumerable: true,
19
- get: function () { return chunkPWBWP5FJ_js.applyDagreLayout; }
27
+ get: function () { return chunkC7BI5LQ6_js.applyDagreLayout; }
20
28
  });
21
29
  Object.defineProperty(exports, "createDefaultLogicNodeConfig", {
22
30
  enumerable: true,
23
- get: function () { return chunkPWBWP5FJ_js.createDefaultLogicNodeConfig; }
31
+ get: function () { return chunkC7BI5LQ6_js.createDefaultLogicNodeConfig; }
24
32
  });
25
33
  Object.defineProperty(exports, "getAgentTier", {
26
34
  enumerable: true,
27
- get: function () { return chunkPWBWP5FJ_js.getAgentTier; }
35
+ get: function () { return chunkC7BI5LQ6_js.getAgentTier; }
28
36
  });
29
37
  //# sourceMappingURL=utils.js.map
30
38
  //# sourceMappingURL=utils.js.map
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { topologicalSortAgents, validateWorkflowGraph } from '../chunk-BLNXRUC4.mjs';
3
- export { applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier } from '../chunk-TLPPVL3W.mjs';
2
+ export { topologicalSortAgents, validateGraphNodeConfigs, validateNodeConfig, validateWorkflowGraph } from '../chunk-53SRKVKQ.mjs';
3
+ export { applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier } from '../chunk-WNCPAWLC.mjs';
4
4
  //# sourceMappingURL=utils.mjs.map
5
5
  //# sourceMappingURL=utils.mjs.map
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunk7LCEP4X5_js = require('../chunk-7LCEP4X5.js');
4
+ var chunkP67L6WXL_js = require('../chunk-P67L6WXL.js');
5
5
  require('../chunk-5N6QYUAA.js');
6
6
  require('../chunk-YXN2K77G.js');
7
7
  require('../chunk-S7KHTUHA.js');
8
8
  require('../chunk-UZ3CMNUJ.js');
9
9
  require('../chunk-P4YYEM4B.js');
10
- require('../chunk-PWBWP5FJ.js');
10
+ require('../chunk-C7BI5LQ6.js');
11
11
 
12
12
 
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunk7LCEP4X5_js.Workspace; }
16
+ get: function () { return chunkP67L6WXL_js.Workspace; }
17
17
  });
18
18
  //# sourceMappingURL=workflow-canvas.js.map
19
19
  //# sourceMappingURL=workflow-canvas.js.map
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- export { Workspace } from '../chunk-PEBQWL6R.mjs';
2
+ export { Workspace } from '../chunk-FXJBJ77I.mjs';
3
3
  import '../chunk-GWLWSE2C.mjs';
4
4
  import '../chunk-7VJ7CMMT.mjs';
5
5
  import '../chunk-QWG2FMUN.mjs';
6
6
  import '../chunk-D2JF6C3E.mjs';
7
7
  import '../chunk-OZNTQROP.mjs';
8
- import '../chunk-TLPPVL3W.mjs';
8
+ import '../chunk-WNCPAWLC.mjs';
9
9
  //# sourceMappingURL=workflow-canvas.mjs.map
10
10
  //# sourceMappingURL=workflow-canvas.mjs.map