Source code for web.state

"""Mutable process-wide state for the FastAPI web layer (set by main.py)."""

from __future__ import annotations

from typing import Any

_bot_runner: Any = None
_cfg: Any = None
_sessions: dict[str, dict[str, Any]] = {}
_oauth_states: dict[str, dict[str, Any]] = {}
_limbic_redis: Any = None


[docs] def set_bot_runner(runner: Any) -> None: """Set the bot runner.""" global _bot_runner _bot_runner = runner
[docs] def set_config(cfg: Any) -> None: """Set bot configuration.""" global _cfg _cfg = cfg