@orbytautomation/engine 0.4.1 → 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.
Files changed (57) hide show
  1. package/dist/core/OrbytEngine.d.ts +3 -21
  2. package/dist/core/OrbytEngine.d.ts.map +1 -1
  3. package/dist/core/OrbytEngine.js +48 -139
  4. package/dist/core/OrbytEngine.js.map +1 -1
  5. package/dist/errors/ErrorDebugger.d.ts +78 -25
  6. package/dist/errors/ErrorDebugger.d.ts.map +1 -1
  7. package/dist/errors/ErrorDebugger.js +383 -2
  8. package/dist/errors/ErrorDebugger.js.map +1 -1
  9. package/dist/errors/ErrorDetector.d.ts +107 -5
  10. package/dist/errors/ErrorDetector.d.ts.map +1 -1
  11. package/dist/errors/ErrorDetector.js +195 -40
  12. package/dist/errors/ErrorDetector.js.map +1 -1
  13. package/dist/errors/ErrorFormatter.d.ts +51 -0
  14. package/dist/errors/ErrorFormatter.d.ts.map +1 -1
  15. package/dist/errors/ErrorFormatter.js +128 -0
  16. package/dist/errors/ErrorFormatter.js.map +1 -1
  17. package/dist/errors/ErrorHandler.d.ts +93 -7
  18. package/dist/errors/ErrorHandler.d.ts.map +1 -1
  19. package/dist/errors/ErrorHandler.js +91 -42
  20. package/dist/errors/ErrorHandler.js.map +1 -1
  21. package/dist/errors/OrbytError.d.ts +28 -0
  22. package/dist/errors/OrbytError.d.ts.map +1 -1
  23. package/dist/errors/OrbytError.js.map +1 -1
  24. package/dist/errors/SecurityErrors.d.ts +2 -25
  25. package/dist/errors/SecurityErrors.d.ts.map +1 -1
  26. package/dist/errors/SecurityErrors.js +5 -119
  27. package/dist/errors/SecurityErrors.js.map +1 -1
  28. package/dist/errors/WorkflowError.d.ts +11 -1
  29. package/dist/errors/WorkflowError.d.ts.map +1 -1
  30. package/dist/errors/WorkflowError.js +104 -0
  31. package/dist/errors/WorkflowError.js.map +1 -1
  32. package/dist/loader/WorkflowLoader.d.ts +77 -5
  33. package/dist/loader/WorkflowLoader.d.ts.map +1 -1
  34. package/dist/loader/WorkflowLoader.js +170 -35
  35. package/dist/loader/WorkflowLoader.js.map +1 -1
  36. package/dist/logging/EngineLogger.d.ts +240 -289
  37. package/dist/logging/EngineLogger.d.ts.map +1 -1
  38. package/dist/logging/EngineLogger.js +424 -842
  39. package/dist/logging/EngineLogger.js.map +1 -1
  40. package/dist/logging/LoggerManager.d.ts +111 -22
  41. package/dist/logging/LoggerManager.d.ts.map +1 -1
  42. package/dist/logging/LoggerManager.js +138 -32
  43. package/dist/logging/LoggerManager.js.map +1 -1
  44. package/dist/logging/index.d.ts.map +1 -1
  45. package/dist/logging/index.js.map +1 -1
  46. package/dist/parser/WorkflowParser.d.ts.map +1 -1
  47. package/dist/parser/WorkflowParser.js +0 -5
  48. package/dist/parser/WorkflowParser.js.map +1 -1
  49. package/dist/security/ReservedFields.d.ts +11 -0
  50. package/dist/security/ReservedFields.d.ts.map +1 -1
  51. package/dist/security/ReservedFields.js +71 -34
  52. package/dist/security/ReservedFields.js.map +1 -1
  53. package/dist/types/log-types.d.ts +134 -2
  54. package/dist/types/log-types.d.ts.map +1 -1
  55. package/dist/types/log-types.js +10 -0
  56. package/dist/types/log-types.js.map +1 -1
  57. package/package.json +1 -1
@@ -47,6 +47,11 @@ export class ErrorDebugger {
47
47
  * });
48
48
  * ```
49
49
  */
50
+ /**
51
+ * @deprecated Use {@link analyzeWithContext} which enriches fix steps with
52
+ * real workflow file context (file name, step count, field locations).
53
+ * Falls back identically when no context exists.
54
+ */
50
55
  static analyze(error) {
51
56
  const logger = LoggerManager.getLogger();
52
57
  logger.debug(`[ErrorDebugger] Analyzing error: ${error.code}`, {
@@ -73,6 +78,10 @@ export class ErrorDebugger {
73
78
  * @param useColors - Whether to use ANSI colors (default: true)
74
79
  * @returns Formatted debug output
75
80
  */
81
+ /**
82
+ * @deprecated Use {@link formatWithContext} which shows the workflow file name
83
+ * in the header and context-specific fix steps.
84
+ */
76
85
  static format(error, useColors = true) {
77
86
  const debug = this.analyze(error);
78
87
  const lines = [];
@@ -222,6 +231,117 @@ export class ErrorDebugger {
222
231
  urgent: true,
223
232
  estimatedFixTime: '10-30 minutes',
224
233
  },
234
+ // ── Schema errors ──────────────────────────────────────────────────────
235
+ [OrbytErrorCode.SCHEMA_PARSE_ERROR]: {
236
+ explanation: 'Your workflow file has a YAML or JSON syntax error that prevents it from being parsed.',
237
+ cause: 'The parser encountered unexpected characters, incorrect indentation, or malformed structure.',
238
+ fixSteps: [
239
+ 'Open the file in a YAML-aware editor to see the exact problem',
240
+ 'Check indentation — YAML requires consistent spaces (not tabs)',
241
+ 'Look for missing colons after keys (e.g. `name value` → `name: value`)',
242
+ 'Check for unclosed quotes or brackets',
243
+ ],
244
+ commonMistakes: [
245
+ 'Using tabs instead of spaces for indentation',
246
+ 'Forgetting the colon after a key',
247
+ 'Mixing YAML and JSON syntax in the same file',
248
+ 'Unclosed strings or brackets',
249
+ ],
250
+ estimatedFixTime: '2-5 minutes',
251
+ },
252
+ [OrbytErrorCode.SCHEMA_INVALID_TYPE]: {
253
+ explanation: 'A field in your workflow has the wrong value type.',
254
+ cause: 'The schema expects a specific type (string, number, boolean, array, or object) but received something different.',
255
+ fixSteps: [
256
+ 'Check that the field value matches the expected type shown in the error',
257
+ 'Wrap string values in quotes if they look like numbers or booleans',
258
+ 'Use square brackets for array values: `tags: [a, b, c]`',
259
+ ],
260
+ estimatedFixTime: '1-2 minutes',
261
+ },
262
+ [OrbytErrorCode.SCHEMA_INVALID_ENUM]: {
263
+ explanation: 'A field contains a value that is not one of the allowed options.',
264
+ cause: 'Orbyt validates enum fields strictly — only the specific listed values are accepted.',
265
+ fixSteps: [
266
+ 'Replace the current value with one of the valid options listed in the error',
267
+ 'Check spelling and casing — enum values are case-sensitive',
268
+ ],
269
+ commonMistakes: [
270
+ 'Using similar but wrong words (e.g. "Workflow" instead of "workflow")',
271
+ 'Wrong casing (e.g. "Sequential" instead of "sequential")',
272
+ ],
273
+ estimatedFixTime: '1 minute',
274
+ },
275
+ // ── Validation errors ───────────────────────────────────────────────────
276
+ [OrbytErrorCode.VALIDATION_UNKNOWN_STEP]: {
277
+ explanation: 'A step references another step that does not exist in this workflow.',
278
+ cause: 'The `needs` (or `dependsOn`) field references a step ID that is not defined anywhere in the workflow.',
279
+ fixSteps: [
280
+ 'Check the step ID spelling in the `needs` field',
281
+ 'Make sure the referenced step is defined somewhere in the workflow',
282
+ 'List all step IDs in the file to confirm none are missing',
283
+ ],
284
+ commonMistakes: [
285
+ 'Referencing a step by its `name` instead of its `id`',
286
+ 'Typos in step IDs',
287
+ ],
288
+ estimatedFixTime: '1-2 minutes',
289
+ },
290
+ [OrbytErrorCode.VALIDATION_FORWARD_REFERENCE]: {
291
+ explanation: 'A step references another step that is defined later in the workflow.',
292
+ cause: 'Steps can only depend on steps defined before them — Orbyt resolves dependencies top-to-bottom.',
293
+ fixSteps: [
294
+ 'Move the referenced step definition above the step that depends on it',
295
+ 'Or restructure the dependency so the earlier step does not need the later one',
296
+ ],
297
+ estimatedFixTime: '2-5 minutes',
298
+ },
299
+ [OrbytErrorCode.VALIDATION_EMPTY_WORKFLOW]: {
300
+ explanation: 'Your workflow has no steps defined.',
301
+ cause: 'The `workflow.steps` array is empty or missing, so there is nothing to execute.',
302
+ fixSteps: [
303
+ 'Add at least one step to the `workflow.steps` array',
304
+ 'Each step needs at minimum an `id` and a `uses` field',
305
+ ],
306
+ example: {
307
+ description: 'Minimal valid step:',
308
+ code: 'workflow:\n steps:\n - id: my-step\n uses: shell.run\n with:\n command: echo hello',
309
+ },
310
+ estimatedFixTime: '2-5 minutes',
311
+ },
312
+ [OrbytErrorCode.VALIDATION_MISSING_INPUT]: {
313
+ explanation: 'A required input value is missing.',
314
+ cause: 'The workflow or one of its steps requires an input that was not provided at runtime.',
315
+ fixSteps: [
316
+ 'Pass the missing input when invoking the workflow',
317
+ 'Or define a default value for it in the workflow `inputs` section',
318
+ ],
319
+ estimatedFixTime: '1-2 minutes',
320
+ },
321
+ [OrbytErrorCode.VALIDATION_INVALID_CONDITION]: {
322
+ explanation: 'A step `when` condition expression is not valid.',
323
+ cause: 'The `when` field contains an expression that cannot be evaluated by the Orbyt condition engine.',
324
+ fixSteps: [
325
+ 'Use simple comparisons: `$input.value == "yes"`',
326
+ 'Make sure every variable referenced in the condition is defined',
327
+ 'Check for typos in variable names',
328
+ ],
329
+ commonMistakes: [
330
+ 'Referencing undefined variables',
331
+ 'Using unsupported operators or JavaScript syntax',
332
+ ],
333
+ estimatedFixTime: '2-5 minutes',
334
+ },
335
+ [OrbytErrorCode.VALIDATION_INVALID_VARIABLE]: {
336
+ explanation: 'A variable reference in the workflow cannot be resolved.',
337
+ cause: 'The workflow references a variable that is not defined in `inputs`, `context`, or the `outputs` of an earlier step.',
338
+ fixSteps: [
339
+ 'Check the variable name for typos',
340
+ 'Make sure the variable is defined before the step that uses it',
341
+ 'Add it to the workflow `inputs` section if it is a runtime parameter',
342
+ ],
343
+ estimatedFixTime: '2-5 minutes',
344
+ },
225
345
  };
226
346
  const info = debugMap[code];
227
347
  if (info) {
@@ -261,8 +381,14 @@ export class ErrorDebugger {
261
381
  // Add context-specific information
262
382
  if (error.diagnostic.context) {
263
383
  const ctx = error.diagnostic.context;
264
- // For unknown field errors, add suggestion if available
265
- if (ctx.suggestion) {
384
+ // For unknown field errors: show top-3 similar names from FieldRegistry.
385
+ // These come from findMatches() stored by ErrorDetector.handleUnknownField.
386
+ if (ctx.suggestions && Array.isArray(ctx.suggestions) && ctx.suggestions.length > 0) {
387
+ const list = ctx.suggestions.map(s => `"${s}"`).join(', ');
388
+ fixSteps.push(`Closest valid fields at this location: ${list}`);
389
+ }
390
+ else if (ctx.suggestion) {
391
+ // Fallback: single suggestion from SchemaError.unknownField hint
266
392
  fixSteps.push(`Did you mean: "${ctx.suggestion}"?`);
267
393
  }
268
394
  // For enum errors, show valid values
@@ -273,6 +399,13 @@ export class ErrorDebugger {
273
399
  if (ctx.expected) {
274
400
  fixSteps.push(`Change type to: ${ctx.expected}`);
275
401
  }
402
+ // For parse errors: surface the line:col position when available.
403
+ // Populated by extractYAMLPosition inside ErrorDetector.
404
+ const line = (ctx.line ?? ctx.lineNumber);
405
+ const col = (ctx.column ?? ctx.col ?? ctx.columnNumber);
406
+ if (typeof line === 'number') {
407
+ fixSteps.push(`Syntax error at line ${line}${typeof col === 'number' ? `, column ${col}` : ''}`);
408
+ }
276
409
  }
277
410
  return { fixSteps };
278
411
  }
@@ -282,9 +415,257 @@ export class ErrorDebugger {
282
415
  * @param error - Error to summarize
283
416
  * @returns One-line debug summary
284
417
  */
418
+ /**
419
+ * @deprecated Use {@link quickDebugWithContext} which references the actual workflow file.
420
+ */
285
421
  static quickDebug(error) {
286
422
  const debug = this.analyze(error);
287
423
  return `💡 ${debug.fixSteps[0] || debug.cause}`;
288
424
  }
425
+ // ==================== CONTEXT-AWARE METHODS ====================
426
+ // These methods pull WorkflowContext (file name, step count, kind) from
427
+ // LoggerManager automatically — no manual wiring required by callers.
428
+ /**
429
+ * Analyze error with workflow file context for precise, file-specific fix suggestions.
430
+ *
431
+ * Automatically reads {@link WorkflowContext} from {@link LoggerManager} when no
432
+ * context is provided — so the typical call is simply:
433
+ *
434
+ * ```typescript
435
+ * const debug = ErrorDebugger.analyzeWithContext(error);
436
+ * // fixSteps now say: "Open my-workflow.yaml and add `version:`"
437
+ * ```
438
+ *
439
+ * Falls back to the generic {@link analyze} result when no context is available.
440
+ *
441
+ * @param error - OrbytError to analyze
442
+ * @param workflowCtx - Workflow context (auto-read from LoggerManager if omitted)
443
+ * @returns Debug information with context-specific fix suggestions
444
+ */
445
+ static analyzeWithContext(error, workflowCtx) {
446
+ const ctx = workflowCtx ?? LoggerManager.getWorkflowContext();
447
+ if (!ctx) {
448
+ return this.analyze(error);
449
+ }
450
+ const base = this.analyze(error);
451
+ const enrichedSteps = this.buildContextualFixSteps(error, ctx, base.fixSteps);
452
+ const enrichedCause = this.buildContextualCause(error, ctx) ?? base.cause;
453
+ return {
454
+ ...base,
455
+ cause: enrichedCause,
456
+ fixSteps: enrichedSteps,
457
+ };
458
+ }
459
+ /**
460
+ * Format debug information using workflow file context.
461
+ *
462
+ * Same visual layout as {@link format} but:
463
+ * - Header line shows the workflow file name
464
+ * - "How to fix" steps reference the actual file and field names
465
+ *
466
+ * Automatically reads context from {@link LoggerManager} if none is provided.
467
+ *
468
+ * @param error - Error to format
469
+ * @param workflowCtx - Workflow context (auto-read from LoggerManager if omitted)
470
+ * @param useColors - Whether to use ANSI colors (default: true)
471
+ * @returns Formatted debug output with context-aware suggestions
472
+ */
473
+ static formatWithContext(error, workflowCtx, useColors = true) {
474
+ const ctx = workflowCtx ?? LoggerManager.getWorkflowContext() ?? undefined;
475
+ const debug = ctx ? this.analyzeWithContext(error, ctx) : this.analyze(error);
476
+ const c = useColors ? {
477
+ reset: '\x1b[0m', bold: '\x1b[1m', dim: '\x1b[2m',
478
+ blue: '\x1b[34m', cyan: '\x1b[36m', yellow: '\x1b[33m',
479
+ green: '\x1b[32m', red: '\x1b[31m',
480
+ } : {
481
+ reset: '', bold: '', dim: '', blue: '', cyan: '', yellow: '', green: '', red: '',
482
+ };
483
+ const lines = [];
484
+ // Header — include workflow file name when available
485
+ if (ctx?.filePath || ctx?.name) {
486
+ const label = ctx.filePath ? (ctx.filePath.split('/').pop() ?? ctx.filePath) : ctx.name;
487
+ lines.push(`${c.bold}${c.blue}━━━━ DEBUG INFO ━━━━${c.reset} ${c.dim}(${label})${c.reset}`);
488
+ }
489
+ else {
490
+ lines.push(`${c.bold}${c.blue}━━━━ DEBUG INFO ━━━━${c.reset}`);
491
+ }
492
+ lines.push('');
493
+ lines.push(`${c.bold}What went wrong:${c.reset}`);
494
+ lines.push(debug.explanation);
495
+ lines.push('');
496
+ lines.push(`${c.bold}Why it happened:${c.reset}`);
497
+ lines.push(debug.cause);
498
+ lines.push('');
499
+ lines.push(`${c.bold}${c.green}How to fix:${c.reset}`);
500
+ debug.fixSteps.forEach((step, i) => {
501
+ lines.push(`${c.cyan}${i + 1}.${c.reset} ${step}`);
502
+ });
503
+ if (debug.commonMistakes && debug.commonMistakes.length > 0) {
504
+ lines.push('');
505
+ lines.push(`${c.bold}${c.yellow}Common mistakes:${c.reset}`);
506
+ debug.commonMistakes.forEach(m => lines.push(`${c.dim}•${c.reset} ${m}`));
507
+ }
508
+ if (debug.example) {
509
+ lines.push('');
510
+ lines.push(`${c.bold}Example:${c.reset}`);
511
+ lines.push(`${c.dim}${debug.example.description}${c.reset}`);
512
+ lines.push('');
513
+ lines.push(c.dim + '```' + c.reset);
514
+ lines.push(debug.example.code);
515
+ lines.push(c.dim + '```' + c.reset);
516
+ }
517
+ if (debug.estimatedFixTime) {
518
+ lines.push('');
519
+ lines.push(`${c.dim}⏱ Estimated fix time: ${debug.estimatedFixTime}${c.reset}`);
520
+ }
521
+ return lines.join('\n');
522
+ }
523
+ /**
524
+ * One-line context-aware summary — like {@link quickDebug} but references
525
+ * the actual workflow file when available.
526
+ *
527
+ * @param error - Error to summarize
528
+ * @param workflowCtx - Workflow context (auto-read from LoggerManager if omitted)
529
+ * @returns One-line debug summary
530
+ */
531
+ static quickDebugWithContext(error, workflowCtx) {
532
+ const debug = this.analyzeWithContext(error, workflowCtx);
533
+ return `💡 ${debug.fixSteps[0] || debug.cause}`;
534
+ }
535
+ // ==================== PRIVATE CONTEXT HELPERS ====================
536
+ /**
537
+ * Build context-aware fix steps using real workflow metadata.
538
+ *
539
+ * Combines `error.path`, `error.diagnostic.context` (field, suggestion,
540
+ * valid values, cycle, line, column), and the workflow context (file name,
541
+ * step count, kind) to produce precise, file-specific instructions.
542
+ *
543
+ * Falls back to `baseSteps` for error codes without a specific rule.
544
+ *
545
+ * @private
546
+ */
547
+ static buildContextualFixSteps(error, ctx, baseSteps) {
548
+ const steps = [];
549
+ const fileName = ctx.filePath ? (ctx.filePath.split('/').pop() ?? ctx.filePath) : undefined;
550
+ const fileRef = fileName ? `\`${fileName}\`` : (ctx.name ? `"${ctx.name}"` : 'the workflow file');
551
+ const label = ctx.name ? `"${ctx.name}"` : fileRef;
552
+ const diagCtx = error.diagnostic.context ?? {};
553
+ const field = diagCtx.field ?? error.path ?? '';
554
+ const suggestion = diagCtx.suggestion;
555
+ const validValues = diagCtx.validValues;
556
+ const expected = diagCtx.expected;
557
+ const cycle = diagCtx.cycle;
558
+ const line = (diagCtx.line ?? diagCtx.lineNumber);
559
+ const col = (diagCtx.column ?? diagCtx.columnNumber);
560
+ switch (error.code) {
561
+ case OrbytErrorCode.SCHEMA_UNKNOWN_FIELD:
562
+ if (field)
563
+ steps.push(`Open ${fileRef} and remove or rename the unrecognized field \`${field}\``);
564
+ if (suggestion)
565
+ steps.push(`Did you mean \`${suggestion}\`? Rename it in ${fileRef}`);
566
+ steps.push('Refer to the schema docs for all valid field names at this location');
567
+ break;
568
+ case OrbytErrorCode.SCHEMA_MISSING_FIELD:
569
+ if (field) {
570
+ steps.push(`Open ${fileRef} and add the missing \`${field}:\` field`);
571
+ if (error.path)
572
+ steps.push(`It belongs under: \`${error.path}\``);
573
+ }
574
+ else {
575
+ steps.push(`Open ${fileRef} and add the required field mentioned above`);
576
+ }
577
+ break;
578
+ case OrbytErrorCode.SCHEMA_INVALID_TYPE:
579
+ if (field && expected)
580
+ steps.push(`In ${fileRef}, change \`${field}\` to type \`${expected}\``);
581
+ else if (field)
582
+ steps.push(`In ${fileRef}, check the value type of \`${field}\``);
583
+ break;
584
+ case OrbytErrorCode.SCHEMA_INVALID_ENUM:
585
+ if (field)
586
+ steps.push(`In ${fileRef}, update \`${field}\` to an allowed value`);
587
+ if (validValues && validValues.length > 0)
588
+ steps.push(`Valid options: ${validValues.map(v => `\`${v}\``).join(', ')}`);
589
+ break;
590
+ case OrbytErrorCode.SCHEMA_RESERVED_FIELD:
591
+ if (field) {
592
+ steps.push(`In ${fileRef}, rename or remove the reserved field \`${field}\``);
593
+ steps.push('Fields prefixed with `_` are managed by the engine — do not set them manually');
594
+ }
595
+ break;
596
+ case OrbytErrorCode.VALIDATION_DUPLICATE_ID:
597
+ if (field) {
598
+ const stepRef = ctx.stepCount != null ? ` across ${ctx.stepCount} steps` : '';
599
+ steps.push(`In ${label}${stepRef}, search for every step using id \`${field}\` in ${fileRef}`);
600
+ steps.push('Rename all but one to a unique id');
601
+ }
602
+ break;
603
+ case OrbytErrorCode.VALIDATION_CIRCULAR_DEPENDENCY:
604
+ steps.push(`In ${label}, break the circular dependency chain in ${fileRef}`);
605
+ if (cycle && cycle.length > 0) {
606
+ steps.push(`Cycle: ${cycle.map(s => `\`${s}\``).join(' → ')}`);
607
+ steps.push(`Remove the \`needs\`/\`dependsOn\` from \`${cycle[cycle.length - 1]}\` back to \`${cycle[0]}\``);
608
+ }
609
+ break;
610
+ case OrbytErrorCode.VALIDATION_UNKNOWN_STEP:
611
+ if (field)
612
+ steps.push(`In ${fileRef}, verify that step \`${field}\` is defined before it is referenced`);
613
+ break;
614
+ case OrbytErrorCode.VALIDATION_FORWARD_REFERENCE:
615
+ if (field)
616
+ steps.push(`In ${fileRef}, move the definition of step \`${field}\` above where it is first used`);
617
+ break;
618
+ case OrbytErrorCode.VALIDATION_EMPTY_WORKFLOW:
619
+ steps.push(`Open ${fileRef} and add at least one step under the \`steps:\` key`);
620
+ if (ctx.kind)
621
+ steps.push(`A \`${ctx.kind}\` workflow requires at least one step to be valid`);
622
+ break;
623
+ case OrbytErrorCode.SCHEMA_PARSE_ERROR:
624
+ steps.push(`Open ${fileRef} in a YAML/JSON-aware editor and look for syntax errors`);
625
+ if (line)
626
+ steps.push(`Syntax error near line ${line}${col ? `, column ${col}` : ''} in ${fileRef}`);
627
+ steps.push('Common causes: wrong indentation, missing colons, unclosed quotes');
628
+ break;
629
+ default:
630
+ return baseSteps;
631
+ }
632
+ // Append the full file path as a reference if it hasn't been mentioned yet
633
+ if (ctx.filePath && steps.length > 0 && !steps.some(s => s.includes(ctx.filePath))) {
634
+ steps.push(`File: ${ctx.filePath}`);
635
+ }
636
+ return steps.length > 0 ? steps : baseSteps;
637
+ }
638
+ /**
639
+ * Build a context-aware root-cause sentence using workflow metadata.
640
+ *
641
+ * Returns `null` when the generic cause from {@link getBaseDebugInfo} is
642
+ * already adequate — callers should fall back to the base value in that case.
643
+ *
644
+ * @private
645
+ */
646
+ static buildContextualCause(error, ctx) {
647
+ const label = ctx.name ? `"${ctx.name}"` : 'this workflow';
648
+ const stepCount = ctx.stepCount != null ? `(${ctx.stepCount} steps)` : '';
649
+ const diagCtx = error.diagnostic.context ?? {};
650
+ const cycle = diagCtx.cycle;
651
+ switch (error.code) {
652
+ case OrbytErrorCode.VALIDATION_CIRCULAR_DEPENDENCY:
653
+ return cycle && cycle.length > 0
654
+ ? `${label} ${stepCount} has a step dependency cycle: ${cycle.map(s => `\`${s}\``).join(' → ')}`
655
+ : `${label} ${stepCount} contains a circular step dependency`;
656
+ case OrbytErrorCode.VALIDATION_DUPLICATE_ID: {
657
+ const field = diagCtx.field ?? error.path ?? 'unknown';
658
+ return `${label} ${stepCount} contains two or more steps with the id \`${field}\``;
659
+ }
660
+ case OrbytErrorCode.VALIDATION_EMPTY_WORKFLOW:
661
+ return `${label} has no steps defined${ctx.kind ? ` — a \`${ctx.kind}\` workflow requires at least one` : ''}`;
662
+ case OrbytErrorCode.SCHEMA_PARSE_ERROR:
663
+ return ctx.filePath
664
+ ? `The YAML/JSON in "${ctx.filePath.split('/').pop()}" has a syntax error and could not be parsed`
665
+ : null;
666
+ default:
667
+ return null;
668
+ }
669
+ }
289
670
  }
290
671
  //# sourceMappingURL=ErrorDebugger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorDebugger.js","sourceRoot":"","sources":["../../src/errors/ErrorDebugger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAkC5D;;;;GAIG;AACH,MAAM,OAAO,aAAa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AAc,CAAC,8BAA8B;gBAChD,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;oBAC9B,CAAC,CAAC,GAAG,KAAK,IAAI,SAAS,iCAAiC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBAChG,CAAC,CAAC,GAAG,KAAK,IAAI,SAAS,sCAAsC,CAAC;YAElE,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,CAAC;gBAC5C,MAAM,KAAK,GAAI,OAAO,CAAC,KAA4B,IAAI,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC;gBAC/E,OAAO,GAAG,KAAK,IAAI,SAAS,6CAA6C,KAAK,IAAI,CAAC;YACrF,CAAC;YAED,KAAK,cAAc,CAAC,yBAAyB;gBAC3C,OAAO,GAAG,KAAK,wBAAwB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,IAAI,mCAAmC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAEjH,KAAK,cAAc,CAAC,kBAAkB;gBACpC,OAAO,GAAG,CAAC,QAAQ;oBACjB,CAAC,CAAC,qBAAqB,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,8CAA8C;oBAClG,CAAC,CAAC,IAAI,CAAC;YAEX;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;CACF"}
@@ -30,10 +30,37 @@
30
30
  *
31
31
  * @module errors/detector
32
32
  */
33
- import { OrbytError } from './OrbytError.js';
33
+ import { OrbytError, type ErrorDebugInfo } from './OrbytError.js';
34
+ import type { WorkflowContext } from '../types/log-types.js';
34
35
  /**
35
- * Error context for detection
36
- * Provides information about what went wrong
36
+ * Error Detector (Smart Error Classification)
37
+ *
38
+ * Automatically detects error types and assigns correct error codes.
39
+ * Makes the engine smart enough to classify errors without manual coding.
40
+ * Also enriches errors with debug information for developers.
41
+ *
42
+ * PHILOSOPHY:
43
+ * ==========
44
+ * Instead of manually throwing specific error codes everywhere,
45
+ * the detector analyzes the error context and assigns the right code.
46
+ * Debug information is automatically attached at detection time.
47
+ *
48
+ * USAGE:
49
+ * ======
50
+ * ```typescript
51
+ * // Instead of manual classification:
52
+ * if (field === 'version') {
53
+ * throw SchemaError.missingField('version', 'workflow');
54
+ * }
55
+ *
56
+ * // Let detector classify automatically:
57
+ * const error = ErrorDetector.detect({
58
+ * type: 'missing_field',
59
+ * field: 'version',
60
+ * location: 'workflow'
61
+ * });
62
+ * throw error; // Already has debug info attached!
63
+ * ```
37
64
  */
38
65
  export interface ErrorContext {
39
66
  /** Type of error scenario */
@@ -92,11 +119,47 @@ export declare class ErrorDetector {
92
119
  * Detect error from raw exception
93
120
  * Analyzes exception and tries to classify it
94
121
  *
95
- * @param error - Raw error/exception
122
+ * @param error - Raw error/exception
96
123
  * @param location - Where the error occurred
97
124
  * @returns Classified OrbytError with debug info
125
+ *
126
+ * @deprecated Since 0.5.0 — prefer {@link detectFromExceptionEnhanced} which
127
+ * also extracts line/column numbers from YAML parse errors.
98
128
  */
99
129
  static detectFromException(error: Error, location?: string): OrbytError;
130
+ /**
131
+ * Detect error from raw exception — enhanced variant with line/column extraction.
132
+ *
133
+ * Identical to {@link detectFromException} but additionally:
134
+ * - Extracts `line` / `col` from YAML parse errors via the `yaml` library's
135
+ * `linePos` property (e.g. `error.linePos[0].line`).
136
+ * - Falls back to common message patterns: "line X, col Y", "(X:Y)".
137
+ * - Injects position into `diagnostic.context` so formatters can show
138
+ * the exact location in the workflow file.
139
+ *
140
+ * Prefer this method over {@link detectFromException} when the original
141
+ * exception is available and location-aware output is desired.
142
+ *
143
+ * @param error - Raw error/exception from the parser or validator
144
+ * @param location - Where the error occurred (file path or logical path)
145
+ * @returns Classified OrbytError with line/column in `diagnostic.context`
146
+ * @since 0.5.0
147
+ */
148
+ static detectFromExceptionEnhanced(error: Error, location?: string): OrbytError;
149
+ /**
150
+ * Extract line and column information from a YAML parse error.
151
+ *
152
+ * The `yaml` package attaches a `linePos` array to its parse errors.
153
+ * As a fallback, common "(line X, col Y)" and "X:Y" patterns in
154
+ * the error message are also checked.
155
+ *
156
+ * Only called internally for `parse_error` scenarios.
157
+ *
158
+ * @param error - Error object from the YAML / JSON parser
159
+ * @returns `{ line, col }` if found, empty object otherwise
160
+ * @private
161
+ */
162
+ private static extractYAMLPosition;
100
163
  /**
101
164
  * Check if field is reserved by engine
102
165
  */
@@ -111,7 +174,14 @@ export declare class ErrorDetector {
111
174
  private static getFieldType;
112
175
  private static handleUnknownField;
113
176
  /**
114
- * Get valid field names based on location in workflow
177
+ * Get valid field names for a workflow path location.
178
+ *
179
+ * Delegates to {@link getValidFields} from FieldRegistry which uses the
180
+ * `FIELD_REGISTRY` map and regex matching — covering `metadata`, `context`,
181
+ * `defaults`, `policies`, `permissions`, `retry`, `usage`, `secrets`,
182
+ * `workflow.steps`, `workflow.steps[N]`, and every other registered section.
183
+ *
184
+ * Falls back to ROOT_FIELDS for any unrecognised path.
115
185
  */
116
186
  private static getValidFieldsForLocation;
117
187
  private static handleReservedField;
@@ -144,5 +214,37 @@ export declare class ErrorDetector {
144
214
  * @private
145
215
  */
146
216
  private static enrichWithDebugInfo;
217
+ /**
218
+ * Analyze an error and return structured debug information.
219
+ *
220
+ * Proxies to `ErrorDebugger.analyzeWithContext()` — callers outside
221
+ * this module should use this instead of calling ErrorDebugger directly
222
+ * to respect the layer hierarchy.
223
+ *
224
+ * @param error - OrbytError to analyze
225
+ * @param workflowCtx - Optional workflow context (auto-read from LoggerManager if omitted)
226
+ */
227
+ static analyzeDebugInfo(error: OrbytError, workflowCtx?: WorkflowContext): ErrorDebugInfo;
228
+ /**
229
+ * Format debug information for terminal display.
230
+ *
231
+ * Proxies to `ErrorDebugger.formatWithContext()` — use this instead of
232
+ * importing ErrorDebugger in handler / formatter code.
233
+ *
234
+ * @param error - OrbytError to format
235
+ * @param workflowCtx - Optional workflow context (auto-read from LoggerManager if omitted)
236
+ * @param useColors - Whether to include ANSI color codes (default: true)
237
+ */
238
+ static formatDebugOutput(error: OrbytError, workflowCtx?: WorkflowContext, useColors?: boolean): string;
239
+ /**
240
+ * Return a one-line human-readable debug summary.
241
+ *
242
+ * Proxies to `ErrorDebugger.quickDebugWithContext()` — use this instead
243
+ * of importing ErrorDebugger in handler / formatter code.
244
+ *
245
+ * @param error - OrbytError to summarize
246
+ * @param workflowCtx - Optional workflow context (auto-read from LoggerManager if omitted)
247
+ */
248
+ static quickDebugSummary(error: OrbytError, workflowCtx?: WorkflowContext): string;
147
249
  }
148
250
  //# sourceMappingURL=ErrorDetector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorDetector.d.ts","sourceRoot":"","sources":["../../src/errors/ErrorDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAmB7C;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,6BAA6B;IAC7B,IAAI,EAAE,aAAa,CAAC;IAEpB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3B,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAEnB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,cAAc,GACd,aAAa,GACb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