pub const UPDATE_ROUTE_MANIFEST: &str = "/v1/projects/{project}/channels/{channel}/manifest";
pub const UPDATE_ROUTE_BLOB: &str = "/v1/blobs/{sha256}";
pub const UPDATE_ROUTE_EVENTS: &str = "/v1/projects/{project}/channels/{channel}/events";
pub const UPDATE_ROUTE_HEALTHZ: &str = "/healthz";
pub const DEFAULT_UPDATE_STORE_PATH: &str = ".euv-updates";
pub const DEFAULT_OTA_CONFIG_FILE: &str = "euv-ota.json";
pub const DEFAULT_OTA_PROJECT_NAME: &str = "euv-showcase";
pub const DEFAULT_OTA_PROD_CHANNEL: &str = "prod";
pub const DEFAULT_OTA_DEV_CHANNEL: &str = "dev";
pub const DEFAULT_OTA_SIGNING_KEY_ENV: &str = "EUV_UPDATE_SIGNING_KEY";
pub const DEFAULT_OTA_GC_KEEP_RELEASES: usize = 5;
pub const DEFAULT_WRITER_LOCK_STALE_SECS: u64 = 120;
pub const OTA_KEYGEN_BIT_LENGTH: usize = 256;
pub const OTA_CONFIG_SCHEMA_V1: u32 = 1;
pub const DEFAULT_UPDATE_SERVER_HOST: &str = "127.0.0.1";
pub const DEFAULT_UPDATE_SERVER_PORT: u16 = 8787;
pub const DEFAULT_UPDATE_HEARTBEAT_MS: u64 = 15_000;
pub const DEFAULT_UPDATE_WATCH_POLL_MS: u64 = 100;
pub const DEFAULT_UPDATE_EVENT_LOG_CAP: usize = 256;
pub const STORE_DIR_STAGING: &str = "staging";
pub const STORE_DIR_BLOBS: &str = "blobs";
pub const STORE_DIR_SHA256: &str = "sha256";
pub const STORE_DIR_RELEASES: &str = "releases";
pub const STORE_DIR_CHANNELS: &str = "channels";
pub const STORE_DIR_TRACKS: &str = "tracks";
pub const STORE_DIR_STATE: &str = "state";
pub const STORE_DIR_EVENTS: &str = "events";
pub const DEFAULT_UPDATE_ROUTE: &str = "/dynamic-panel";
pub const DEFAULT_UPDATE_SLOT: &str = "promo_banner";
pub const DEFAULT_UPDATE_ACCENT_RGB: u32 = 0x16A34A;
pub(crate) const WASM_BINARY_MAGIC: &[u8; 4] = b"\0asm";
pub(crate) const SLOT_CONTAINER_MODULE_ID: &str = "slot-container";
pub(crate) const SLOT_CONTAINER_MARKER_BYTES: &[u8] = b"{}";
pub(crate) const PUSH_ARTIFACT_MODULE_ID: &str = "hot-update";
pub(crate) const ERR_PUSH_SOURCE_REQUIRED: &str =
"euv update push requires either --file <path> or --title <text>";
pub(crate) const ERR_PUSH_INVALID_SPEC: &str =
"pushed JSON artifact is not a valid DynamicNodeSpec";
pub(crate) const ERR_PUSH_INVALID_WASM: &str =
"pushed .wasm artifact failed sandbox or host ABI verification";
pub(crate) const DEFAULT_PUSH_INLINE_BODY: &str =
"Live hot-update delivered via euv update push + Hyperlane SSE (zero restart).";
pub(crate) const STORE_WRITER_LOCK_FILE: &str = "writer.lock";
pub(crate) const STORE_ACTIVE_POINTER_FILE: &str = "active.json";
pub(crate) const STORE_STAGED_MANIFEST_FILE: &str = "manifest.json";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_PROTOCOL: &str = "protocol";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_ABI: &str = "abi";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_MODE: &str = "mode";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_TRACK: &str = "track";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_LAST_EVENT_ID: &str = "last_event_id";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_PROJECT: &str = "project";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_CHANNEL: &str = "channel";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_SHA256: &str = "sha256";
#[cfg(feature = "update-server")]
pub(crate) const MODE_TOKEN_DATA: &str = "declarative_data";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ETAG: &str = "etag";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ACCEPT_RANGES: &str = "accept-ranges";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_BYTES: &str = "bytes";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CONTENT_RANGE: &str = "content-range";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_RANGE_LOWER: &str = "range";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_LAST_EVENT_ID_LOWER: &str = "last-event-id";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_IMMUTABLE: &str = "public, max-age=31536000, immutable";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_NO_CACHE: &str = "no-cache";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_CACHE_CONTROL: &str = "no-cache, no-transform";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ACCEL_BUFFERING: &str = "x-accel-buffering";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_VAL_NO_BUFFER: &str = "no";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CORS_ORIGIN: &str = "access-control-allow-origin";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CORS_METHODS: &str = "access-control-allow-methods";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CORS_HEADERS: &str = "access-control-allow-headers";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CORS_EXPOSE: &str = "access-control-expose-headers";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_VAL_CORS_ANY: &str = "*";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_VAL_CORS_METHODS: &str = "GET, HEAD, OPTIONS";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_VAL_CORS_HEADERS: &str = "Range, Last-Event-ID, Authorization, Proxy-Authorization, X-Forwarded-Prefix, X-Forwarded-Host, X-Forwarded-Proto";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_VAL_CORS_EXPOSE: &str =
"ETag, Content-Range, Accept-Ranges, X-Euv-Proxy-Base";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_X_FWD_PREFIX: &str = "x-forwarded-prefix";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_X_FWD_HOST: &str = "x-forwarded-host";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_X_FWD_PROTO: &str = "x-forwarded-proto";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_X_PROXY_BASE: &str = "x-euv-proxy-base";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_JSON: &str = "application/json; charset=utf-8";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_OCTET: &str = "application/octet-stream";
pub(crate) const RANGE_BYTES_PREFIX: &str = "bytes=";
pub(crate) const EXT_JSON_DOT: &str = ".json";
pub(crate) const EXT_JSONL_DOT: &str = ".jsonl";
pub(crate) const ASCII_HYPHEN: u8 = b'-';
pub(crate) const ASCII_UNDERSCORE: u8 = b'_';
pub(crate) const ASCII_DOT: u8 = b'.';
pub(crate) const ERR_INVALID_STORE_IDENT: &str =
"store identifier must contain only ASCII alphanumerics, '-', '_', or '.' without traversal";
pub(crate) const ERR_WRITER_LOCK_TIMEOUT: &str = "timed out acquiring update store writer lock";
pub(crate) const ERR_EMPTY_SIGNING_KEY: &str =
"signing key cannot be empty for publish or rollback";
pub(crate) const ERR_STAGE_NOT_FOUND: &str = "staged release directory not found";
pub(crate) const ERR_ROLLBACK_TARGET_MISSING: &str = "rollback target release manifest not found";
pub(crate) const ERR_BLOB_INTEGRITY: &str = "blob missing or SHA-256 digest mismatch";
pub(crate) const ERR_NO_COMPATIBLE_RELEASE: &str =
"no compatible release available for client protocol, ABI, or delivery mode";
#[cfg(not(feature = "update-server"))]
pub(crate) const ERR_UPDATE_SERVER_FEATURE_DISABLED: &str =
"euv-cli was built without the `update-server` Cargo feature";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_NOT_FOUND: &str = "{\"error\":\"not_found\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_METHOD_NOT_ALLOWED: &str = "{\"error\":\"method_not_allowed\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_BAD_REQUEST: &str = "{\"error\":\"bad_request\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_RANGE_INVALID: &str = "{\"error\":\"range_not_satisfiable\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_UNCONFIGURED: &str = "{\"error\":\"update_server_unconfigured\"}";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_CONNECTED_COMMENT: &str = "connected";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_HEARTBEAT_COMMENT: &str = "keep-alive";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_IF_NONE_MATCH_LOWER: &str = "if-none-match";
pub(crate) const OTA_HEALTH_STATUS_OK: &str = "ok";
pub(crate) const OTA_VERIFY_SEVERITY_ERROR: &str = "error";
pub(crate) const OTA_VERIFY_SEVERITY_WARN: &str = "warning";
pub(crate) const OTA_DIFF_ADDED: &str = "added";
pub(crate) const OTA_DIFF_REMOVED: &str = "removed";
pub(crate) const OTA_DIFF_CHANGED: &str = "changed";
pub(crate) const OTA_DIFF_UNCHANGED: &str = "unchanged";
pub(crate) const OTA_LOCK_PID_PREFIX: &str = "pid=";
pub(crate) const OTA_LOCK_CREATED_PREFIX: &str = "created_unix=";
#[cfg(unix)]
pub(crate) const OTA_KILL_BIN: &str = "kill";
#[cfg(unix)]
pub(crate) const OTA_KILL_SIGNAL_ZERO: &str = "-0";
#[cfg(unix)]
pub(crate) const OTA_ERR_NO_SUCH_PROCESS: &str = "no such process";
#[cfg(unix)]
pub(crate) const OTA_PROC_DIR: &str = "/proc";
#[cfg(unix)]
pub(crate) const OTA_DEV_URANDOM: &str = "/dev/urandom";
pub(crate) const OTA_WASM_TARGET_TRIPLE: &str = "wasm32-unknown-unknown";
pub(crate) const OTA_BUILD_OUT_SUBDIR: &str = "dist/ota";
pub(crate) const OTA_DEFAULT_WIDGET_FILENAME: &str = "widget.wasm";
pub(crate) const OTA_CARGO_MANIFEST_FILE: &str = "Cargo.toml";
pub(crate) const OTA_ENV_CARGO_TARGET_DIR: &str = "CARGO_TARGET_DIR";
pub(crate) const OTA_DIR_TARGET: &str = "target";
pub(crate) const OTA_DIR_RELEASE: &str = "release";
pub(crate) const OTA_DIR_DEBUG: &str = "debug";
pub(crate) const OTA_CARGO_ARG_LIB: &str = "--lib";
pub(crate) const OTA_EXT_WASM: &str = "wasm";
pub(crate) const OTA_LAN_PROBE_PRIMARY: &str = "8.8.8.8:80";
pub(crate) const OTA_LAN_PROBE_FALLBACK: &str = "1.1.1.1:80";
pub(crate) const OTA_LAN_BIND_ANY: &str = "0.0.0.0:0";
#[cfg(feature = "update-server")]
pub(crate) const OTA_HOST_ALL_INTERFACES: &str = "0.0.0.0";
#[cfg(feature = "update-server")]
pub(crate) const OTA_HOST_LOCALHOST: &str = "127.0.0.1";
pub(crate) const OTA_HTTP_STATUS_OK: &str = "OK";
pub(crate) const OTA_HTTP_STATUS_NO_CONTENT: &str = "No Content";
pub(crate) const OTA_HTTP_STATUS_PARTIAL: &str = "Partial Content";
pub(crate) const OTA_HTTP_STATUS_NOT_MODIFIED: &str = "Not Modified";
pub(crate) const OTA_HTTP_STATUS_BAD_REQUEST: &str = "Bad Request";
pub(crate) const OTA_HTTP_STATUS_NOT_FOUND: &str = "Not Found";
pub(crate) const OTA_HTTP_STATUS_METHOD_NOT_ALLOWED: &str = "Method Not Allowed";
pub(crate) const OTA_HTTP_STATUS_CONFLICT: &str = "Conflict";
pub(crate) const OTA_HTTP_STATUS_RANGE_INVALID: &str = "Range Not Satisfiable";
pub(crate) const OTA_HDR_CACHE_CONTROL_TITLE: &str = "Cache-Control";
pub(crate) const OTA_HDR_ETAG_TITLE: &str = "ETag";
pub(crate) const OTA_HDR_ACCEPT_RANGES_TITLE: &str = "Accept-Ranges";
pub(crate) const OTA_HDR_CONTENT_RANGE_TITLE: &str = "Content-Range";
pub(crate) const OTA_PATH_V1_BLOBS_PREFIX: &str = "/v1/blobs/";
pub(crate) const OTA_PATH_V1_PROJECTS_PREFIX: &str = "/v1/projects/";
pub(crate) const OTA_PATH_SEG_CHANNELS: &str = "channels";
pub(crate) const OTA_PATH_SEG_MANIFEST: &str = "manifest";
pub(crate) const OTA_PATH_SEG_EVENTS: &str = "events";
pub(crate) const OTA_METHOD_GET: &str = "GET";
pub(crate) const OTA_METHOD_HEAD: &str = "HEAD";
pub(crate) const OTA_METHOD_OPTIONS: &str = "OPTIONS";
pub(crate) const OTA_ERR_BUILD_FAILED: &str = "cargo wasm widget build failed";
pub(crate) const OTA_ERR_WASM_NOT_FOUND: &str = "compiled .wasm output artifact not found";
pub(crate) const OTA_ERR_PUSH_KEY_MISSING: &str = "signing key is required when --push is enabled";
pub(crate) const OTA_ERR_RELEASE_MISSING: &str =
"release manifest not found for requested sequence";
pub(crate) const OTA_ERR_UNSIGNED_MANIFEST: &str = "release manifest signature is empty";
pub(crate) const OTA_ERR_SIZE_MISMATCH: &str = "blob byte size mismatch";
pub(crate) const OTA_ERR_MANIFEST_DIGEST_MISMATCH: &str =
"channel pointer manifest_sha256 does not match manifest";
pub(crate) const OTA_ERR_ROLLBACK_TARGET_BROKEN: &str =
"rollback_of points to missing historical release";
pub(crate) const OTA_WARN_NO_KEY_VERIFY: &str =
"signature verification skipped because no signing key was provided";
pub(crate) const OTA_HTTP_CACHE_NO_CACHE: &str = "no-cache";
pub(crate) const OTA_HTTP_CACHE_IMMUTABLE: &str = "public, max-age=31536000, immutable";
pub(crate) const OTA_HTTP_MIME_JSON: &str = "application/json; charset=utf-8";
pub(crate) const OTA_HTTP_MIME_OCTET: &str = "application/octet-stream";
pub(crate) const OTA_HTTP_RANGE_BYTES: &str = "bytes";
pub(crate) const OTA_HTTP_ERR_NOT_FOUND: &str = "{\"error\":\"not_found\"}";
pub(crate) const OTA_HTTP_ERR_BAD_REQUEST: &str = "{\"error\":\"bad_request\"}";
pub(crate) const OTA_HTTP_ERR_METHOD_NOT_ALLOWED: &str = "{\"error\":\"method_not_allowed\"}";
pub(crate) const OTA_HTTP_ERR_RANGE_INVALID: &str = "{\"error\":\"range_not_satisfiable\"}";
pub(crate) const OTA_HTTP_QUERY_PROTOCOL: &str = "protocol";
pub(crate) const OTA_HTTP_QUERY_ABI: &str = "abi";
pub(crate) const OTA_HTTP_QUERY_MODE: &str = "mode";
pub(crate) const OTA_HTTP_QUERY_TRACK: &str = "track";
pub(crate) const OTA_HTTP_MODE_DATA: &str = "declarative_data";
pub(crate) const OTA_ETAG_WEAK_PREFIX: &str = "W/";
pub(crate) const OTA_ETAG_WEAK_PREFIX_LOWER: &str = "w/";