# kybernis/context.py
import contextvars
from typing import Optional

kyb_run_id: contextvars.ContextVar[Optional[str]] = contextvars.ContextVar("kyb_run_id", default=None)
kyb_session_id: contextvars.ContextVar[Optional[str]] = contextvars.ContextVar("kyb_session_id", default=None)

# spans are optional but useful for graphs/traces
kyb_span_id: contextvars.ContextVar[Optional[str]] = contextvars.ContextVar("kyb_span_id", default=None)
kyb_parent_span_id: contextvars.ContextVar[Optional[str]] = contextvars.ContextVar("kyb_parent_span_id", default=None)
