/**
 * Platform Review Service Interface
 *
 * Output port for platform-specific code review operations.
 * The primary implementation uses GitHub (gh CLI), but the port
 * abstraction enables future GitLab support without changing use cases.
 */
// ---------------------------------------------------------------------------
// Error classes
// ---------------------------------------------------------------------------
/**
 * Thrown when a platform review operation fails.
 */
export class PlatformReviewError extends Error {
    code;
    constructor(message, code, cause) {
        super(message);
        this.code = code;
        this.name = 'PlatformReviewError';
        Object.setPrototypeOf(this, new.target.prototype);
        if (cause)
            this.cause = cause;
    }
}
/**
 * Error codes for platform review operations.
 */
export var PlatformReviewErrorCode;
(function (PlatformReviewErrorCode) {
    /** GitHub CLI not found or not authenticated */
    PlatformReviewErrorCode["AUTH_FAILURE"] = "AUTH_FAILURE";
    /** PR not found */
    PlatformReviewErrorCode["PR_NOT_FOUND"] = "PR_NOT_FOUND";
    /** API rate limit exceeded */
    PlatformReviewErrorCode["RATE_LIMITED"] = "RATE_LIMITED";
    /** Review submission failed (e.g. 422 validation error) */
    PlatformReviewErrorCode["SUBMISSION_FAILED"] = "SUBMISSION_FAILED";
    /** Network or transient error */
    PlatformReviewErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
    /** Generic error */
    PlatformReviewErrorCode["UNKNOWN"] = "UNKNOWN";
})(PlatformReviewErrorCode || (PlatformReviewErrorCode = {}));
