{"version":3,"file":"supervisor-drift-error.mjs","names":[],"sources":["../../../../../../../ai/src/errors/supervisor-drift-error.ts"],"sourcesContent":["import type { AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\nimport { SupervisorFailedError } from \"./supervisor-failed-error\";\n\nexport type SupervisorDriftErrorOptions = AIErrorOptions & {\n  /** Signature recorded on the snapshot being resumed. */\n  savedSignature: string;\n  /** Signature computed from the current supervisor definition. */\n  currentSignature: string;\n  runId: string;\n};\n\n/**\n * `supervisor.resume(runId)` loaded a snapshot whose structural\n * fingerprint does not match the current supervisor definition\n * (agent keys + descriptions + router identity + route presence).\n * The resume is refused — no iteration runs — and the user decides\n * how to recover: discard the snapshot, migrate manually, or call\n * `resume(runId, { force: true })` to bypass the check.\n *\n * Mirrors `WorkflowDriftError` for workflow resume — same rationale,\n * different primitive.\n */\nexport class SupervisorDriftError extends SupervisorFailedError {\n  public static readonly defaultCategory: ErrorCategory = \"drift\";\n\n  public readonly savedSignature: string;\n  public readonly currentSignature: string;\n  public readonly runId: string;\n\n  public constructor(message: string, options: SupervisorDriftErrorOptions) {\n    super(message, options, \"SUPERVISOR_DRIFT\");\n    this.name = \"SupervisorDriftError\";\n    this.savedSignature = options.savedSignature;\n    this.currentSignature = options.currentSignature;\n    this.runId = options.runId;\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,IAAa,uBAAb,cAA0C,sBAAsB;;yBACN;;CAMxD,AAAO,YAAY,SAAiB,SAAsC;EACxE,MAAM,SAAS,SAAS,kBAAkB;EAC1C,KAAK,OAAO;EACZ,KAAK,iBAAiB,QAAQ;EAC9B,KAAK,mBAAmB,QAAQ;EAChC,KAAK,QAAQ,QAAQ;CACvB;AACF"}