{"version":3,"file":"routing-error.mjs","names":[],"sources":["../../../../../../../ai/src/errors/routing-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { WorkflowError } from \"./workflow-error\";\n\nexport type RoutingErrorOptions = AIErrorOptions & {\n  stepName: string;\n  targetName?: string;\n};\n\n/**\n * `nextStep` returned an invalid `goto`, or the `nextStep` callback\n * itself threw. Routing is authoritative and has no recovery path —\n * the workflow terminates immediately.\n */\nexport class RoutingError extends WorkflowError {\n  public static readonly defaultCategory: ErrorCategory = \"routing\";\n\n  public readonly stepName: string;\n  public readonly targetName?: string;\n\n  public constructor(message: string, options: RoutingErrorOptions) {\n    super(message, options, \"WORKFLOW_INVALID_GOTO\");\n    this.name = \"RoutingError\";\n    this.stepName = options.stepName;\n    this.targetName = options.targetName;\n  }\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,eAAb,cAAkC,cAAc;;yBACU;;CAKxD,AAAO,YAAY,SAAiB,SAA8B;EAChE,MAAM,SAAS,SAAS,uBAAuB;EAC/C,KAAK,OAAO;EACZ,KAAK,WAAW,QAAQ;EACxB,KAAK,aAAa,QAAQ;CAC5B;AACF"}