@hexabot-ai/agentic 3.2.3 → 3.2.4

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.
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
3
+ * Copyright (c) 2026 Hexastack.
4
+ * Full terms: see LICENSE.md.
5
+ */
6
+
7
+ export type WorkflowValidationIssueCode =
8
+ | 'yaml_parse'
9
+ | 'schema'
10
+ | 'unknown_task'
11
+ | 'missing_action'
12
+ | 'action_inputs'
13
+ | 'action_settings'
14
+ | 'binding_registry_required'
15
+ | 'unknown_binding_kind'
16
+ | 'action_required'
17
+ | 'action_forbidden'
18
+ | 'binding_settings'
19
+ | 'binding_ref'
20
+ | 'binding_unsupported'
21
+ | 'binding_cycle';
22
+
23
+ export type WorkflowValidationIssue = {
24
+ code: WorkflowValidationIssueCode;
25
+ /** Human-readable message; kept identical to the legacy error strings. */
26
+ message: string;
27
+ /** Path within the YAML document, e.g. ["defs", "my_task", "action"]. */
28
+ path?: Array<string | number>;
29
+ /** Referenced action name, set for action-specific issues where known. */
30
+ actionName?: string;
31
+ /** Referenced task id, set for task-specific issues where known. */
32
+ taskId?: string;
33
+ /** Binding kind involved, set for binding-related issues where known. */
34
+ bindingKind?: string;
35
+ };
36
+
37
+ export const issueMessages = (issues: WorkflowValidationIssue[]): string[] =>
38
+ issues.map((issue) => issue.message);
@@ -20,6 +20,7 @@ import type {
20
20
  WorkflowDefinition,
21
21
  } from './dsl.types';
22
22
  import { extractTaskDefinitions as extractTaskDefinitionsFromDefs } from './dsl.types';
23
+ import { issueMessages } from './validation-issue';
23
24
  import { StepType } from './workflow-event-emitter';
24
25
  import type {
25
26
  CompiledMapping,
@@ -158,9 +159,9 @@ const compileTasks = (
158
159
  actions: options.actions,
159
160
  });
160
161
 
161
- if (bindingValidation.errors.length > 0) {
162
+ if (bindingValidation.issues.length > 0) {
162
163
  throw new Error(
163
- `Workflow bindings validation failed: ${bindingValidation.errors.join('; ')}`,
164
+ `Workflow bindings validation failed: ${issueMessages(bindingValidation.issues).join('; ')}`,
164
165
  );
165
166
  }
166
167
 
package/src/workflow.ts CHANGED
@@ -19,6 +19,7 @@ import {
19
19
  type FlowStep,
20
20
  } from './dsl.types';
21
21
  import { safeRenameTaskInDefinition as renameTaskInDefinition } from './utils/workflow-definition';
22
+ import { issueMessages } from './validation-issue';
22
23
  import {
23
24
  compileWorkflow,
24
25
  type WorkflowCompileOptions,
@@ -123,7 +124,7 @@ export class Workflow {
123
124
  });
124
125
  if (!validation.success) {
125
126
  throw new Error(
126
- `Workflow validation failed: ${validation.errors.join('; ')}`,
127
+ `Workflow validation failed: ${issueMessages(validation.issues).join('; ')}`,
127
128
  );
128
129
  }
129
130
 
@@ -143,7 +144,7 @@ export class Workflow {
143
144
  });
144
145
  if (!validation.success) {
145
146
  throw new Error(
146
- `Workflow validation failed: ${validation.errors.join('; ')}`,
147
+ `Workflow validation failed: ${issueMessages(validation.issues).join('; ')}`,
147
148
  );
148
149
  }
149
150