{"version":3,"file":"orchestrator-failed-error.mjs","names":[],"sources":["../../../../../../../ai/src/errors/orchestrator-failed-error.ts"],"sourcesContent":["import { AIError, type AIErrorOptions } from \"./ai-error\";\nimport type { AIErrorCode } from \"./error-code.type\";\n\n/**\n * Base class for every orchestrator-specific failure surfaced from\n * `orchestrator.execute()` / `orchestrator.resume()` /\n * `orchestrator.command()` or thrown at authoring-time by\n * `ai.orchestrator()` validation (orchestrator.md §17).\n *\n * **Role.** Anchor for the `ORCHESTRATOR_*` code family. Subclasses\n * carry precise codes (`ORCHESTRATOR_DRIFT`, `ORCHESTRATOR_CONFIG`,\n * `ORCHESTRATOR_CANCELLED`, …); this base catches everything a turn can\n * produce that isn't already an agent / tool / provider / supervisor\n * error bubbling up from the dispatched child.\n *\n * Child-execution errors (agent, tool, provider, supervisor) flow\n * through the orchestrator unchanged — they are captured on the turn's\n * `childReport` and surfaced on `result.error` directly, never\n * re-wrapped.\n *\n * @example\n * const result = await orchestrator.execute(message, { sessionId, history });\n * if (result.error instanceof OrchestratorFailedError) {\n *   console.error(result.error.code, result.error.message);\n * }\n */\nexport class OrchestratorFailedError extends AIError {\n  public constructor(\n    message: string,\n    options?: AIErrorOptions,\n    code: AIErrorCode = \"ORCHESTRATOR_FAILED\",\n  ) {\n    super(code, message, options);\n    this.name = \"OrchestratorFailedError\";\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,0BAAb,cAA6C,QAAQ;CACnD,AAAO,YACL,SACA,SACA,OAAoB,uBACpB;EACA,MAAM,MAAM,SAAS,OAAO;EAC5B,KAAK,OAAO;CACd;AACF"}