@orbytautomation/engine 0.5.0 → 0.6.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/core/OrbytEngine.d.ts.map +1 -1
- package/dist/core/OrbytEngine.js +18 -4
- package/dist/core/OrbytEngine.js.map +1 -1
- package/dist/errors/ErrorDebugger.d.ts +78 -25
- package/dist/errors/ErrorDebugger.d.ts.map +1 -1
- package/dist/errors/ErrorDebugger.js +383 -2
- package/dist/errors/ErrorDebugger.js.map +1 -1
- package/dist/errors/ErrorDetector.d.ts +107 -5
- package/dist/errors/ErrorDetector.d.ts.map +1 -1
- package/dist/errors/ErrorDetector.js +195 -40
- package/dist/errors/ErrorDetector.js.map +1 -1
- package/dist/errors/ErrorFormatter.d.ts +51 -0
- package/dist/errors/ErrorFormatter.d.ts.map +1 -1
- package/dist/errors/ErrorFormatter.js +128 -0
- package/dist/errors/ErrorFormatter.js.map +1 -1
- package/dist/errors/ErrorHandler.d.ts +93 -7
- package/dist/errors/ErrorHandler.d.ts.map +1 -1
- package/dist/errors/ErrorHandler.js +91 -42
- package/dist/errors/ErrorHandler.js.map +1 -1
- package/dist/errors/OrbytError.d.ts +28 -0
- package/dist/errors/OrbytError.d.ts.map +1 -1
- package/dist/errors/OrbytError.js.map +1 -1
- package/dist/errors/SecurityErrors.d.ts +2 -25
- package/dist/errors/SecurityErrors.d.ts.map +1 -1
- package/dist/errors/SecurityErrors.js +5 -119
- package/dist/errors/SecurityErrors.js.map +1 -1
- package/dist/errors/WorkflowError.d.ts +11 -1
- package/dist/errors/WorkflowError.d.ts.map +1 -1
- package/dist/errors/WorkflowError.js +104 -0
- package/dist/errors/WorkflowError.js.map +1 -1
- package/dist/loader/WorkflowLoader.d.ts +71 -5
- package/dist/loader/WorkflowLoader.d.ts.map +1 -1
- package/dist/loader/WorkflowLoader.js +135 -50
- package/dist/loader/WorkflowLoader.js.map +1 -1
- package/dist/logging/EngineLogger.d.ts +252 -337
- package/dist/logging/EngineLogger.d.ts.map +1 -1
- package/dist/logging/EngineLogger.js +460 -1012
- package/dist/logging/EngineLogger.js.map +1 -1
- package/dist/logging/LoggerManager.d.ts +109 -33
- package/dist/logging/LoggerManager.d.ts.map +1 -1
- package/dist/logging/LoggerManager.js +136 -47
- package/dist/logging/LoggerManager.js.map +1 -1
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js.map +1 -1
- package/dist/types/log-types.d.ts +50 -11
- package/dist/types/log-types.d.ts.map +1 -1
- package/dist/types/log-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityErrors.js","sourceRoot":"","sources":["../../src/errors/SecurityErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"SecurityErrors.js","sourceRoot":"","sources":["../../src/errors/SecurityErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAC3C,YAAY,UAAgC;QAC1C,KAAK,CAAC;YACJ,GAAG,UAAU;YACb,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,QAAQ,EAAE,UAAU,CAAC,QAAQ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29
|
*
|
|
30
30
|
* @module errors
|
|
31
31
|
*/
|
|
32
|
-
import { OrbytError } from './OrbytError.js';
|
|
32
|
+
import { OrbytError, type ErrorDebugInfo } from './OrbytError.js';
|
|
33
|
+
import { OrbytErrorCode } from './ErrorCodes.js';
|
|
33
34
|
import { OrbytErrorDiagnostic } from '../types/core-types.js';
|
|
34
35
|
/**
|
|
35
36
|
* Schema validation error (structure problems)
|
|
@@ -107,6 +108,15 @@ export declare class SchemaError extends OrbytError {
|
|
|
107
108
|
* @returns SchemaError for unknown adapter
|
|
108
109
|
*/
|
|
109
110
|
static invalidAdapter(adapter: string, path: string, validAdapters?: string[]): SchemaError;
|
|
111
|
+
/**
|
|
112
|
+
* Return structured debug information for any schema-related error code.
|
|
113
|
+
*
|
|
114
|
+
* `ErrorDebugger` delegates to this method so the explanations, fix steps
|
|
115
|
+
* and common-mistakes live next to the class that owns the error codes.
|
|
116
|
+
*
|
|
117
|
+
* @returns An `ErrorDebugInfo` object for recognised codes, `null` otherwise.
|
|
118
|
+
*/
|
|
119
|
+
static getDebugInfo(code: OrbytErrorCode): ErrorDebugInfo | null;
|
|
110
120
|
}
|
|
111
121
|
/**
|
|
112
122
|
* Semantic validation error (logic problems)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowError.d.ts","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"WorkflowError.d.ts","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAC;AAChE,O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EAAE,oBAAoB;IAQ5C;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,MAAM,GACvB,eAAe;IAgBlB;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,eAAe;IAgBlB;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CACvB,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAYnD;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,EAAE,GACvB,eAAe;CAenB"}
|
|
@@ -191,6 +191,110 @@ export class SchemaError extends OrbytError {
|
|
|
191
191
|
context: { adapter, validAdapters },
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Return structured debug information for any schema-related error code.
|
|
196
|
+
*
|
|
197
|
+
* `ErrorDebugger` delegates to this method so the explanations, fix steps
|
|
198
|
+
* and common-mistakes live next to the class that owns the error codes.
|
|
199
|
+
*
|
|
200
|
+
* @returns An `ErrorDebugInfo` object for recognised codes, `null` otherwise.
|
|
201
|
+
*/
|
|
202
|
+
static getDebugInfo(code) {
|
|
203
|
+
const map = {
|
|
204
|
+
[OrbytErrorCode.SCHEMA_UNKNOWN_FIELD]: {
|
|
205
|
+
explanation: 'Your workflow contains a field that is not recognized by Orbyt.',
|
|
206
|
+
cause: "This usually happens due to a typo in the field name or using a field that doesn't exist in the schema.",
|
|
207
|
+
fixSteps: [
|
|
208
|
+
'Check the spelling of the field name',
|
|
209
|
+
'Refer to Orbyt documentation for valid field names',
|
|
210
|
+
'Remove the field if it\'s not needed',
|
|
211
|
+
],
|
|
212
|
+
commonMistakes: [
|
|
213
|
+
'Typos in field names (e.g., "varion" instead of "version")',
|
|
214
|
+
'Using deprecated field names',
|
|
215
|
+
'Copy-pasting from old workflow versions',
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
[OrbytErrorCode.SCHEMA_RESERVED_FIELD]: {
|
|
219
|
+
explanation: 'You tried to use a field name that is reserved by Orbyt engine.',
|
|
220
|
+
cause: 'Reserved fields are used internally for billing, execution tracking, and security. Users cannot set these.',
|
|
221
|
+
fixSteps: [
|
|
222
|
+
'Rename the field to something else',
|
|
223
|
+
'Avoid using fields starting with "_" or "__"',
|
|
224
|
+
'Avoid fields like "executionId", "billingMode", "userId"',
|
|
225
|
+
],
|
|
226
|
+
commonMistakes: [
|
|
227
|
+
'Using underscore-prefixed fields (_internal, __context)',
|
|
228
|
+
'Trying to set billing fields manually',
|
|
229
|
+
'Using engine-managed field names',
|
|
230
|
+
],
|
|
231
|
+
docsLinks: ['https://docs.orbyt.dev/reserved-fields'],
|
|
232
|
+
},
|
|
233
|
+
[OrbytErrorCode.SCHEMA_MISSING_FIELD]: {
|
|
234
|
+
explanation: 'A required field is missing from your workflow definition.',
|
|
235
|
+
cause: 'Orbyt requires certain fields to be present for the workflow to be valid.',
|
|
236
|
+
fixSteps: [
|
|
237
|
+
'Add the missing required field to your workflow',
|
|
238
|
+
'Check field name spelling',
|
|
239
|
+
'Refer to schema documentation for required fields',
|
|
240
|
+
],
|
|
241
|
+
estimatedFixTime: '1-2 minutes',
|
|
242
|
+
},
|
|
243
|
+
[OrbytErrorCode.SCHEMA_PARSE_ERROR]: {
|
|
244
|
+
explanation: 'Your workflow file has a YAML or JSON syntax error that prevents it from being parsed.',
|
|
245
|
+
cause: 'The parser encountered unexpected characters, incorrect indentation, or malformed structure.',
|
|
246
|
+
fixSteps: [
|
|
247
|
+
'Open the file in a YAML-aware editor to see the exact problem',
|
|
248
|
+
'Check indentation — YAML requires consistent spaces (not tabs)',
|
|
249
|
+
'Look for missing colons after keys (e.g. `name value` → `name: value`)',
|
|
250
|
+
'Check for unclosed quotes or brackets',
|
|
251
|
+
],
|
|
252
|
+
commonMistakes: [
|
|
253
|
+
'Using tabs instead of spaces for indentation',
|
|
254
|
+
'Forgetting the colon after a key',
|
|
255
|
+
'Mixing YAML and JSON syntax in the same file',
|
|
256
|
+
'Unclosed strings or brackets',
|
|
257
|
+
],
|
|
258
|
+
estimatedFixTime: '2-5 minutes',
|
|
259
|
+
},
|
|
260
|
+
[OrbytErrorCode.SCHEMA_INVALID_TYPE]: {
|
|
261
|
+
explanation: 'A field in your workflow has the wrong value type.',
|
|
262
|
+
cause: 'The schema expects a specific type (string, number, boolean, array, or object) but received something different.',
|
|
263
|
+
fixSteps: [
|
|
264
|
+
'Check that the field value matches the expected type shown in the error',
|
|
265
|
+
'Wrap string values in quotes if they look like numbers or booleans',
|
|
266
|
+
'Use square brackets for array values: `tags: [a, b, c]`',
|
|
267
|
+
],
|
|
268
|
+
estimatedFixTime: '1-2 minutes',
|
|
269
|
+
},
|
|
270
|
+
[OrbytErrorCode.SCHEMA_INVALID_ENUM]: {
|
|
271
|
+
explanation: 'A field contains a value that is not one of the allowed options.',
|
|
272
|
+
cause: 'Orbyt validates enum fields strictly — only the specific listed values are accepted.',
|
|
273
|
+
fixSteps: [
|
|
274
|
+
'Replace the current value with one of the valid options listed in the error',
|
|
275
|
+
'Check spelling and casing — enum values are case-sensitive',
|
|
276
|
+
],
|
|
277
|
+
commonMistakes: [
|
|
278
|
+
'Using similar but wrong words (e.g. "Workflow" instead of "workflow")',
|
|
279
|
+
'Wrong casing (e.g. "Sequential" instead of "sequential")',
|
|
280
|
+
],
|
|
281
|
+
estimatedFixTime: '1 minute',
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
const entry = map[code];
|
|
285
|
+
if (!entry)
|
|
286
|
+
return null;
|
|
287
|
+
return {
|
|
288
|
+
explanation: entry.explanation ?? 'An error occurred in your workflow.',
|
|
289
|
+
cause: entry.cause ?? 'The exact cause depends on the specific error code and context.',
|
|
290
|
+
fixSteps: entry.fixSteps ?? [],
|
|
291
|
+
commonMistakes: entry.commonMistakes,
|
|
292
|
+
docsLinks: entry.docsLinks,
|
|
293
|
+
example: entry.example,
|
|
294
|
+
urgent: entry.urgent ?? false,
|
|
295
|
+
estimatedFixTime: entry.estimatedFixTime,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
194
298
|
}
|
|
195
299
|
/**
|
|
196
300
|
* Semantic validation error (logic problems)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowError.js","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"WorkflowError.js","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAuB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,aA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AAE,cAAc,CAAC,4BAA4B;YACjD,OAAO,EAAE,iCAAiC,SAAS,EAAE;YACrD,QAAQ,EAAE,SAAS,CAAC,iBAAiB;YACrC,IAAI;YACJ,IAAI,EAAE,MAAM,IAAI,8EAA8E;YAC9F,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;SAC/B,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CACpB,QAAgB,EAChB,IAAY,EACZ,aAAwB;QAExB,MAAM,IAAI,GAAG,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC;YACpD,CAAC,CAAC,wBAAwB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACpD,CAAC,CAAC,aAAa,QAAQ,yDAAyD,CAAC;QAEnF,OAAO,IAAI,eAAe,CAAC;YACzB,IAAI,EAAE,cAAc,CAAC,2BAA2B;YAChD,OAAO,EAAE,+BAA+B,QAAQ,EAAE;YAClD,QAAQ,EAAE,SAAS,CAAC,iBAAiB;YACrC,IAAI;YACJ,IAAI;YACJ,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -49,8 +49,46 @@ import { ParsedWorkflow, WorkflowLoadOptions } from '../types/core-types.js';
|
|
|
49
49
|
/**
|
|
50
50
|
* Workflow Loader
|
|
51
51
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
52
|
+
* ARCHITECTURAL ROLE:
|
|
53
|
+
* ===================
|
|
54
|
+
* This is a UTILITY layer, NOT part of the execution engine.
|
|
55
|
+
*
|
|
56
|
+
* Responsibilities:
|
|
57
|
+
* - File I/O (reading workflow files from disk)
|
|
58
|
+
* - YAML/JSON parsing
|
|
59
|
+
* - Schema validation
|
|
60
|
+
* - Security validation
|
|
61
|
+
* - Return validated workflow objects
|
|
62
|
+
*
|
|
63
|
+
* Does NOT:
|
|
64
|
+
* - Execute workflows (that's OrbytEngine)
|
|
65
|
+
* - Manage state
|
|
66
|
+
* - Handle billing
|
|
67
|
+
* - Know about execution context
|
|
68
|
+
*
|
|
69
|
+
* USAGE:
|
|
70
|
+
* ======
|
|
71
|
+
* CLI/API/SDK uses this loader to convert files → validated objects.
|
|
72
|
+
* Then passes objects to engine for execution.
|
|
73
|
+
*
|
|
74
|
+
* Example:
|
|
75
|
+
* ```ts
|
|
76
|
+
* // CLI
|
|
77
|
+
* const workflow = await WorkflowLoader.fromFile('./workflow.yaml');
|
|
78
|
+
* await engine.run(workflow);
|
|
79
|
+
*
|
|
80
|
+
* // API
|
|
81
|
+
* const workflow = WorkflowLoader.fromYAML(requestBody);
|
|
82
|
+
* await engine.run(workflow);
|
|
83
|
+
*
|
|
84
|
+
* // Test
|
|
85
|
+
* await engine.run(mockWorkflowObject);
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* This keeps:
|
|
89
|
+
* - Engine I/O-agnostic (testable, embeddable)
|
|
90
|
+
* - Loader focused on parsing
|
|
91
|
+
* - CLI/API deciding what to load
|
|
54
92
|
*/
|
|
55
93
|
export declare class WorkflowLoader {
|
|
56
94
|
/**
|
|
@@ -86,7 +124,7 @@ export declare class WorkflowLoader {
|
|
|
86
124
|
* @returns Parsed and validated workflow
|
|
87
125
|
* @throws OrbytError with proper error code and debug info
|
|
88
126
|
*/
|
|
89
|
-
static fromYAML(yamlContent: string, filePath?: string, logger?: EngineLogger): ParsedWorkflow
|
|
127
|
+
static fromYAML(yamlContent: string, filePath?: string, logger?: EngineLogger): Promise<ParsedWorkflow>;
|
|
90
128
|
/**
|
|
91
129
|
* Parse workflow from JSON string
|
|
92
130
|
*
|
|
@@ -100,7 +138,7 @@ export declare class WorkflowLoader {
|
|
|
100
138
|
* @returns Parsed and validated workflow
|
|
101
139
|
* @throws OrbytError with proper error code and debug info
|
|
102
140
|
*/
|
|
103
|
-
static fromJSON(jsonContent: string, filePath?: string, logger?: EngineLogger): ParsedWorkflow
|
|
141
|
+
static fromJSON(jsonContent: string, filePath?: string, logger?: EngineLogger): Promise<ParsedWorkflow>;
|
|
104
142
|
/**
|
|
105
143
|
* Parse workflow from object
|
|
106
144
|
*
|
|
@@ -113,7 +151,7 @@ export declare class WorkflowLoader {
|
|
|
113
151
|
* @returns Parsed and validated workflow
|
|
114
152
|
* @throws OrbytError with proper error code and debug info
|
|
115
153
|
*/
|
|
116
|
-
static fromObject(workflowObject: unknown, logger?: EngineLogger): ParsedWorkflow
|
|
154
|
+
static fromObject(workflowObject: unknown, logger?: EngineLogger): Promise<ParsedWorkflow>;
|
|
117
155
|
/**
|
|
118
156
|
* Validate a workflow and return parsed result with metadata
|
|
119
157
|
*
|
|
@@ -151,6 +189,34 @@ export declare class WorkflowLoader {
|
|
|
151
189
|
* @throws OrbytError with proper error code and debug info
|
|
152
190
|
*/
|
|
153
191
|
static fromString(source: string, options?: WorkflowLoadOptions): Promise<ParsedWorkflow>;
|
|
192
|
+
/**
|
|
193
|
+
* Check a parsed workflow object for reserved/internal field violations.
|
|
194
|
+
*
|
|
195
|
+
* Called immediately after Phase 1 (syntax parse) and before Phase 2
|
|
196
|
+
* (schema validation) in every loading path. Throws SecurityError on the
|
|
197
|
+
* first violation so execution never reaches the schema validator with
|
|
198
|
+
* tampered data.
|
|
199
|
+
*
|
|
200
|
+
* @param workflowObject - Plain object from the parser
|
|
201
|
+
* @throws SecurityError if any engine-reserved field is found
|
|
202
|
+
* @private
|
|
203
|
+
*/
|
|
204
|
+
private static _validateSecurity;
|
|
205
|
+
/**
|
|
206
|
+
* Set workflow context on the LoggerManager after every successful parse.
|
|
207
|
+
*
|
|
208
|
+
* This ensures all subsequent logs (runtime, analysis, security categories)
|
|
209
|
+
* are automatically enriched with workflow metadata without the caller
|
|
210
|
+
* needing to set it manually.
|
|
211
|
+
*
|
|
212
|
+
* System logs do not need this context and are unaffected.
|
|
213
|
+
* Context is cleared by OrbytEngine after each operation.
|
|
214
|
+
*
|
|
215
|
+
* @param parsed - Successfully parsed workflow
|
|
216
|
+
* @param filePath - Resolved file path (only available for file-based loads)
|
|
217
|
+
* @private
|
|
218
|
+
*/
|
|
219
|
+
private static _setContext;
|
|
154
220
|
/**
|
|
155
221
|
* Parse YAML content to plain object (Phase 1: Loading)
|
|
156
222
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowLoader.d.ts","sourceRoot":"","sources":["../../src/loader/WorkflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAYH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"WorkflowLoader.d.ts","sourceRoot":"","sources":["../../src/loader/WorkflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAYH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAqB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,cAAc;IACzB;;;;;;;;;;;;;;;OAeG;WACU,QAAQ,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,cAAc,CAAC;IA4D1B;;;;;;;;;;;;;;;OAeG;WACU,QAAQ,CACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,cAAc,CAAC;IAc1B;;;;;;;;;;;;OAYG;WACU,QAAQ,CACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,cAAc,CAAC;IAc1B;;;;;;;;;;;OAWG;WACU,UAAU,CAAC,cAAc,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;IAQhG;;;;;;;;;;;;;;;OAeG;WACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,OAAO,EACxB,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,cAAc,CAAC;IAkB1B;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAW9C;;;;;;;;;;;OAWG;WACU,UAAU,CACrB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,cAAc,CAAC;IAc1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAoBhC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAY1B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAwBhC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAkBhC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAwC/B,MAAM,CAAC,YAAY,iCAA2B;IAC9C,MAAM,CAAC,YAAY,iCAA2B;IAC9C,MAAM,CAAC,YAAY,iCAA2B;IAC9C,MAAM,CAAC,cAAc,mCAA6B;IAClD,MAAM,CAAC,gBAAgB,iCAA2B;IAClD,MAAM,CAAC,cAAc,mCAA6B;CACnD"}
|
|
@@ -53,13 +53,52 @@ import { SecurityError } from '../errors/SecurityErrors.js';
|
|
|
53
53
|
import { getAllReservedFieldViolations } from '../security/ReservedFields.js';
|
|
54
54
|
import { ErrorDetector } from '../errors/ErrorDetector.js';
|
|
55
55
|
import { OrbytError } from '../errors/OrbytError.js';
|
|
56
|
-
import {
|
|
56
|
+
import { logErrorToEngineWithContext } from '../errors/ErrorFormatter.js';
|
|
57
|
+
import { LoggerManager } from '../logging/index.js';
|
|
57
58
|
import { SecurityErrorCode } from '../types/core-types.js';
|
|
58
59
|
/**
|
|
59
60
|
* Workflow Loader
|
|
60
61
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
62
|
+
* ARCHITECTURAL ROLE:
|
|
63
|
+
* ===================
|
|
64
|
+
* This is a UTILITY layer, NOT part of the execution engine.
|
|
65
|
+
*
|
|
66
|
+
* Responsibilities:
|
|
67
|
+
* - File I/O (reading workflow files from disk)
|
|
68
|
+
* - YAML/JSON parsing
|
|
69
|
+
* - Schema validation
|
|
70
|
+
* - Security validation
|
|
71
|
+
* - Return validated workflow objects
|
|
72
|
+
*
|
|
73
|
+
* Does NOT:
|
|
74
|
+
* - Execute workflows (that's OrbytEngine)
|
|
75
|
+
* - Manage state
|
|
76
|
+
* - Handle billing
|
|
77
|
+
* - Know about execution context
|
|
78
|
+
*
|
|
79
|
+
* USAGE:
|
|
80
|
+
* ======
|
|
81
|
+
* CLI/API/SDK uses this loader to convert files → validated objects.
|
|
82
|
+
* Then passes objects to engine for execution.
|
|
83
|
+
*
|
|
84
|
+
* Example:
|
|
85
|
+
* ```ts
|
|
86
|
+
* // CLI
|
|
87
|
+
* const workflow = await WorkflowLoader.fromFile('./workflow.yaml');
|
|
88
|
+
* await engine.run(workflow);
|
|
89
|
+
*
|
|
90
|
+
* // API
|
|
91
|
+
* const workflow = WorkflowLoader.fromYAML(requestBody);
|
|
92
|
+
* await engine.run(workflow);
|
|
93
|
+
*
|
|
94
|
+
* // Test
|
|
95
|
+
* await engine.run(mockWorkflowObject);
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* This keeps:
|
|
99
|
+
* - Engine I/O-agnostic (testable, embeddable)
|
|
100
|
+
* - Loader focused on parsing
|
|
101
|
+
* - CLI/API deciding what to load
|
|
63
102
|
*/
|
|
64
103
|
export class WorkflowLoader {
|
|
65
104
|
/**
|
|
@@ -117,36 +156,7 @@ export class WorkflowLoader {
|
|
|
117
156
|
throw err;
|
|
118
157
|
}
|
|
119
158
|
// Step 4: SECURITY - Check for internal/reserved fields before any validation
|
|
120
|
-
|
|
121
|
-
// Use getAllReservedFieldViolations for detailed error reporting
|
|
122
|
-
const violations = getAllReservedFieldViolations(workflowObject);
|
|
123
|
-
if (violations.length > 0) {
|
|
124
|
-
// Use the first violation for error context, but attach all for diagnostics
|
|
125
|
-
const v = violations[0];
|
|
126
|
-
// Map SecurityErrorCode to the correct fieldType for SecurityError
|
|
127
|
-
let fieldType = 'internal';
|
|
128
|
-
// Use enum values for type safety
|
|
129
|
-
const code = v.code;
|
|
130
|
-
if (code === SecurityErrorCode.BILLING_FIELD_OVERRIDE)
|
|
131
|
-
fieldType = 'billing';
|
|
132
|
-
else if (code === SecurityErrorCode.IDENTITY_FIELD_OVERRIDE)
|
|
133
|
-
fieldType = 'identity';
|
|
134
|
-
else if (code === SecurityErrorCode.OWNERSHIP_FIELD_OVERRIDE)
|
|
135
|
-
fieldType = 'ownership';
|
|
136
|
-
else if (code === SecurityErrorCode.USAGE_COUNTER_OVERRIDE)
|
|
137
|
-
fieldType = 'usage';
|
|
138
|
-
else if (code === SecurityErrorCode.INTERNAL_STATE_OVERRIDE)
|
|
139
|
-
fieldType = 'internal';
|
|
140
|
-
else
|
|
141
|
-
fieldType = 'internal';
|
|
142
|
-
const err = SecurityError.reservedFieldOverride(v.field, v.location, fieldType);
|
|
143
|
-
err.reason = v.reason;
|
|
144
|
-
err.allViolations = violations;
|
|
145
|
-
throw err;
|
|
146
|
-
}
|
|
147
|
-
// Also run strict validation for immediate throw (backward compatibility)
|
|
148
|
-
// validateWorkflowSecurity removed: all security validation now handled by getAllReservedFieldViolations
|
|
149
|
-
}
|
|
159
|
+
WorkflowLoader._validateSecurity(workflowObject);
|
|
150
160
|
// Step 5: Validate and parse (schema, steps, etc)
|
|
151
161
|
let parsed = this.validateAndParse(workflowObject, resolvedPath, options.logger);
|
|
152
162
|
// Step 6: Inject internal fields (engine-only, after validation)
|
|
@@ -156,6 +166,9 @@ export class WorkflowLoader {
|
|
|
156
166
|
if (options.variables && parsed.inputs) {
|
|
157
167
|
parsed.inputs = { ...parsed.inputs, ...options.variables };
|
|
158
168
|
}
|
|
169
|
+
// Set workflow context so all downstream logs (runtime, analysis, security)
|
|
170
|
+
// are automatically enriched — cleared by OrbytEngine after the operation.
|
|
171
|
+
WorkflowLoader._setContext(parsed, resolvedPath);
|
|
159
172
|
return parsed;
|
|
160
173
|
}
|
|
161
174
|
/**
|
|
@@ -174,14 +187,16 @@ export class WorkflowLoader {
|
|
|
174
187
|
* @returns Parsed and validated workflow
|
|
175
188
|
* @throws OrbytError with proper error code and debug info
|
|
176
189
|
*/
|
|
177
|
-
static fromYAML(yamlContent, filePath, logger) {
|
|
190
|
+
static async fromYAML(yamlContent, filePath, logger) {
|
|
178
191
|
const location = filePath || 'YAML content';
|
|
179
192
|
// PHASE 1: LOADING
|
|
180
193
|
// Parse YAML syntax to plain object (no validation yet)
|
|
181
194
|
const workflowObject = this.parseYAMLToObject(yamlContent, location);
|
|
182
|
-
// PHASE 2: VALIDATION
|
|
183
|
-
|
|
184
|
-
|
|
195
|
+
// PHASE 2: VALIDATION — Security check first, then schema
|
|
196
|
+
WorkflowLoader._validateSecurity(workflowObject);
|
|
197
|
+
const parsed = this.validateAndParse(workflowObject, location, logger);
|
|
198
|
+
WorkflowLoader._setContext(parsed, filePath);
|
|
199
|
+
return parsed;
|
|
185
200
|
}
|
|
186
201
|
/**
|
|
187
202
|
* Parse workflow from JSON string
|
|
@@ -196,14 +211,16 @@ export class WorkflowLoader {
|
|
|
196
211
|
* @returns Parsed and validated workflow
|
|
197
212
|
* @throws OrbytError with proper error code and debug info
|
|
198
213
|
*/
|
|
199
|
-
static fromJSON(jsonContent, filePath, logger) {
|
|
214
|
+
static async fromJSON(jsonContent, filePath, logger) {
|
|
200
215
|
const location = filePath || 'JSON content';
|
|
201
216
|
// PHASE 1: LOADING
|
|
202
217
|
// Parse JSON syntax to plain object (no validation yet)
|
|
203
218
|
const workflowObject = this.parseJSONToObject(jsonContent, location);
|
|
204
|
-
// PHASE 2: VALIDATION
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
// PHASE 2: VALIDATION — Security check first, then schema
|
|
220
|
+
WorkflowLoader._validateSecurity(workflowObject);
|
|
221
|
+
const parsed = this.validateAndParse(workflowObject, location, logger);
|
|
222
|
+
WorkflowLoader._setContext(parsed, filePath);
|
|
223
|
+
return parsed;
|
|
207
224
|
}
|
|
208
225
|
/**
|
|
209
226
|
* Parse workflow from object
|
|
@@ -217,9 +234,12 @@ export class WorkflowLoader {
|
|
|
217
234
|
* @returns Parsed and validated workflow
|
|
218
235
|
* @throws OrbytError with proper error code and debug info
|
|
219
236
|
*/
|
|
220
|
-
static fromObject(workflowObject, logger) {
|
|
221
|
-
// Object is already loaded
|
|
222
|
-
|
|
237
|
+
static async fromObject(workflowObject, logger) {
|
|
238
|
+
// Object is already loaded — run security check then schema validation
|
|
239
|
+
WorkflowLoader._validateSecurity(workflowObject);
|
|
240
|
+
const parsed = this.validateAndParse(workflowObject, 'workflow object', logger);
|
|
241
|
+
WorkflowLoader._setContext(parsed);
|
|
242
|
+
return parsed;
|
|
223
243
|
}
|
|
224
244
|
/**
|
|
225
245
|
* Validate a workflow and return parsed result with metadata
|
|
@@ -289,11 +309,70 @@ export class WorkflowLoader {
|
|
|
289
309
|
return this.fromFile(source, options);
|
|
290
310
|
}
|
|
291
311
|
// Otherwise parse as content
|
|
292
|
-
return this.fromYAML(source, 'inline YAML', options.logger);
|
|
312
|
+
return await this.fromYAML(source, 'inline YAML', options.logger);
|
|
293
313
|
}
|
|
294
314
|
// ============================================================================
|
|
295
315
|
// PRIVATE HELPER METHODS
|
|
296
316
|
// ============================================================================
|
|
317
|
+
/**
|
|
318
|
+
* Check a parsed workflow object for reserved/internal field violations.
|
|
319
|
+
*
|
|
320
|
+
* Called immediately after Phase 1 (syntax parse) and before Phase 2
|
|
321
|
+
* (schema validation) in every loading path. Throws SecurityError on the
|
|
322
|
+
* first violation so execution never reaches the schema validator with
|
|
323
|
+
* tampered data.
|
|
324
|
+
*
|
|
325
|
+
* @param workflowObject - Plain object from the parser
|
|
326
|
+
* @throws SecurityError if any engine-reserved field is found
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
static _validateSecurity(workflowObject) {
|
|
330
|
+
if (!workflowObject || typeof workflowObject !== 'object')
|
|
331
|
+
return;
|
|
332
|
+
const violations = getAllReservedFieldViolations(workflowObject);
|
|
333
|
+
if (violations.length === 0)
|
|
334
|
+
return;
|
|
335
|
+
const v = violations[0];
|
|
336
|
+
let fieldType = 'internal';
|
|
337
|
+
const code = v.code;
|
|
338
|
+
if (code === SecurityErrorCode.BILLING_FIELD_OVERRIDE)
|
|
339
|
+
fieldType = 'billing';
|
|
340
|
+
else if (code === SecurityErrorCode.IDENTITY_FIELD_OVERRIDE)
|
|
341
|
+
fieldType = 'identity';
|
|
342
|
+
else if (code === SecurityErrorCode.OWNERSHIP_FIELD_OVERRIDE)
|
|
343
|
+
fieldType = 'ownership';
|
|
344
|
+
else if (code === SecurityErrorCode.USAGE_COUNTER_OVERRIDE)
|
|
345
|
+
fieldType = 'usage';
|
|
346
|
+
const err = SecurityError.reservedFieldOverride(v.field, v.location, fieldType);
|
|
347
|
+
err.reason = v.reason;
|
|
348
|
+
err.allViolations = violations;
|
|
349
|
+
throw err;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Set workflow context on the LoggerManager after every successful parse.
|
|
353
|
+
*
|
|
354
|
+
* This ensures all subsequent logs (runtime, analysis, security categories)
|
|
355
|
+
* are automatically enriched with workflow metadata without the caller
|
|
356
|
+
* needing to set it manually.
|
|
357
|
+
*
|
|
358
|
+
* System logs do not need this context and are unaffected.
|
|
359
|
+
* Context is cleared by OrbytEngine after each operation.
|
|
360
|
+
*
|
|
361
|
+
* @param parsed - Successfully parsed workflow
|
|
362
|
+
* @param filePath - Resolved file path (only available for file-based loads)
|
|
363
|
+
* @private
|
|
364
|
+
*/
|
|
365
|
+
static _setContext(parsed, filePath) {
|
|
366
|
+
LoggerManager.setWorkflowContext({
|
|
367
|
+
name: parsed.name ?? parsed.metadata?.name,
|
|
368
|
+
version: parsed.version,
|
|
369
|
+
kind: parsed.kind,
|
|
370
|
+
description: parsed.description ?? parsed.metadata?.description,
|
|
371
|
+
stepCount: parsed.steps?.length,
|
|
372
|
+
tags: parsed.tags ?? parsed.metadata?.tags,
|
|
373
|
+
filePath,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
297
376
|
/**
|
|
298
377
|
* Parse YAML content to plain object (Phase 1: Loading)
|
|
299
378
|
*
|
|
@@ -310,13 +389,18 @@ export class WorkflowLoader {
|
|
|
310
389
|
return YAML.parse(yamlContent);
|
|
311
390
|
}
|
|
312
391
|
catch (error) {
|
|
313
|
-
//
|
|
392
|
+
// Extract line/col from the yaml library's linePos property (if present)
|
|
393
|
+
// so formatters can point the user to the exact location in the file.
|
|
394
|
+
const yamlErr = error;
|
|
395
|
+
const linePos = Array.isArray(yamlErr.linePos) ? yamlErr.linePos[0] : undefined;
|
|
314
396
|
const parseError = ErrorDetector.detect({
|
|
315
397
|
type: 'parse_error',
|
|
316
398
|
location,
|
|
317
399
|
rawMessage: error instanceof Error ? error.message : String(error),
|
|
318
400
|
data: {
|
|
319
401
|
content: yamlContent.substring(0, 200), // First 200 chars for context
|
|
402
|
+
line: linePos?.line,
|
|
403
|
+
column: linePos?.col,
|
|
320
404
|
},
|
|
321
405
|
});
|
|
322
406
|
throw parseError;
|
|
@@ -376,12 +460,13 @@ export class WorkflowLoader {
|
|
|
376
460
|
orbytError = error;
|
|
377
461
|
}
|
|
378
462
|
else {
|
|
379
|
-
//
|
|
380
|
-
orbytError = ErrorDetector.
|
|
463
|
+
// Use enhanced detection so line/col are extracted for parse errors
|
|
464
|
+
orbytError = ErrorDetector.detectFromExceptionEnhanced(error instanceof Error ? error : new Error(String(error)), location);
|
|
381
465
|
}
|
|
382
|
-
// 1. Log to EngineLogger
|
|
466
|
+
// 1. Log to EngineLogger — use context-aware variant so sourceFile,
|
|
467
|
+
// workflowName, and stepCount are attached to the log entry.
|
|
383
468
|
if (logger) {
|
|
384
|
-
|
|
469
|
+
logErrorToEngineWithContext(orbytError, logger);
|
|
385
470
|
}
|
|
386
471
|
// 2. Display detailed debug info that was attached by ErrorDetector
|
|
387
472
|
// The debug output includes: explanation, cause, fix steps, examples
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowLoader.js","sourceRoot":"","sources":["../../src/loader/WorkflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"WorkflowLoader.js","sourceRoot":"","sources":["../../src/loader/WorkflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,IAA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