/**
 * Invalid Supervisor Policy Error
 *
 * Thrown by ConfigureSupervisor / EnableSupervisor / DisableSupervisor
 * use cases when the supplied policy fields fail validation
 * (unknown autonomy enum, malformed gate-authority map, malformed
 * policy-rules array, missing appId, etc.).
 */
export class InvalidSupervisorPolicyError extends Error {
    field;
    reason;
    code = 'INVALID_SUPERVISOR_POLICY';
    constructor(field, reason) {
        super(`Invalid supervisor policy: ${field} — ${reason}`);
        this.field = field;
        this.reason = reason;
        this.name = 'InvalidSupervisorPolicyError';
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
