import os

# API Endpoints
KORBIT_HOST = os.getenv("KORBIT_HOST", "https://mentor.korbit.ai:8000")
KORBIT_SCAN_REPORT_URL = f"{KORBIT_HOST}/database/v3/scans"
KORBIT_SCAN_VERSION_URL = f"{KORBIT_HOST}/cli"
KORBIT_SCAN_TELEMETRY_URL = f"{KORBIT_HOST}/cli/telemetry"
KORBIT_CODE_ANALYSIS_SERVICE = f"{KORBIT_HOST}/code-analysis/check"
KORBIT_CODE_ANALYSIS_CHECK = f"{KORBIT_CODE_ANALYSIS_SERVICE}/files"
KORBIT_CODE_ANALYSIS_PULL_REQUEST_CHECK = f"{KORBIT_CODE_ANALYSIS_SERVICE}/pull_request/files"

# Local paths
KORBIT_LOCAL_FOLDER = ".korbit"
KORBIT_LOCAL_OUTPUT_LOG_FILE = f"{KORBIT_LOCAL_FOLDER}/scan.log"
KORBIT_LOCAL_REPOSITORY_METADATA_FILENAME = "repository_metadata.json"
KORBIT_LOCAL_REPOSITORY_METADATA_PATH = f"{KORBIT_LOCAL_FOLDER}/{KORBIT_LOCAL_REPOSITORY_METADATA_FILENAME}"

# Exit codes
KORBIT_COMMAND_EXIT_CODE_UNKNOWN_ERROR = 90
KORBIT_COMMAND_EXIT_CODE_ISSUES_FOUND_WITHIN_THRESHOLD = 91
KORBIT_COMMAND_EXIT_CODE_CHECK_FAILED = 92
KORBIT_COMMAND_EXIT_CODE_AUTH_FAILED = 93
KORBIT_COMMAND_EXIT_CODE_FILE_TOO_LARGE = 94
KORBIT_COMMAND_EXIT_CODE_LICENSE_LIMIT_REACHED = 95
KORBIT_COMMAND_EXIT_CODE_DEPRECATED_CLI_VERSION = 96

KORBIT_COMMAND_EXIT_CODE_UNKNOWN_GIT_COMMAND_ERROR = 190
KORBIT_COMMAND_EXIT_CODE_NO_GIT_REPOSITORY = 191
KORBIT_COMMAND_EXIT_CODE_BRANCH_NOT_FOUND = 192
KORBIT_COMMAND_EXIT_CODE_GIT_IS_NOT_INSTALLED = 193

# Backend
KORBIT_BACKEND_DEFAULT_LICENSE_LIMIT_REACHED_MSG = "Invalid or missing license."
KORBIT_INSTALLATION_SOURCE_BINARY = "binary"
KORBIT_INSTALLATION_SOURCE_PIP = "pip"
