import type { IDomainError } from '@core/shared/errors';

/**
 * Domain Error: AutomationDomainError
 *
 * Implements the shared IDomainError contract for automation domain failures.
 */
export class AutomationDomainError extends Error implements IDomainError {
  readonly name = 'AutomationDomainError';
  readonly type = 'domain' as const;
  readonly context = 'automation';
  readonly kind: string;

  constructor(message: string, kind: string = 'validation') {
    super(message);
    this.kind = kind;
    Object.setPrototypeOf(this, new.target.prototype);
  }
}