""" bridge_constants.py - shared constants for the bridge modules. Extracted so the mixin modules can import these without a circular dependency on the kobrax_moonraker_bridge facade. Re-exported from there for callers. ──────────────────────────────────────────────────────────────────────────── Copyright (C) 2026 viewit (KX-Bridge contributors) Licensed under GPLv3 — see LICENSE in the project root. See NOTICE.md. """ # Maps the printer's own MQTT state strings to Klipper/Moonraker print states. KOBRA_TO_KLIPPER_STATE = { "free": "standby", "busy": "printing", "printing": "printing", "preheating": "printing", "auto_leveling": "printing", "checking": "printing", "updated": "printing", "init": "printing", "pausing": "paused", "paused": "paused", "resuming": "printing", "resumed": "printing", "stopping": "printing", "stoped": "standby", "finished": "complete", "failed": "error", "canceled": "standby", } MOONRAKER_VERSION = "v0.9.3-1" KLIPPER_VERSION = "v0.12.0-1" # Default kobra_state -> KXGauge emotion mapping (used when [kxgauge_mapping] # is absent or incomplete in config.ini). DEFAULT_KXGAUGE_MAPPING = { "free": "neutral", "printing": "happy", "paused": "worried", "pause": "worried", "finished": "glee", "error": "scared", "offline": "tired", } # Valid KXGauge emotion names (see kxgauge/API.md) - used to reject garbage # values coming in through the settings save. KXGAUGE_VALID_EMOTIONS = { "neutral", "happy", "angry", "tired", "surprised", "curious", "confused", "sleepy", "love", "dizzy", "crying", "focused", "glee", "sad", "worried", "annoyed", "skeptic", "frustrated", "unimpressed", "suspicious", "squint", "furious", "scared", "awe", }