"""Typed application configuration (CF-01).

The single typed settings object for the embedded CLI and for any
consumer that wants to discover ``mgf-hrb``'s defaults without hard-
coding them. Subclasses :class:`mgf.common.config.BaseAppSettings`,
which gives the precedence chain CLI > env > YAML > defaults for free
(CF-02) and constructor-injection ergonomics (CF-08).

The fields are deliberately few — this is the minimum useful surface,
not a kitchen sink. Add fields here only when a real consumer asks for
the knob; "configurability for its own sake" leads to drift between
what the docs describe and what the broker actually honours.

Today's fields:

* ``socket_path`` — where the broker listens. Default matches the
  skeleton server (``/tmp/mgf-hrb.sock``); production deployments
  override via ``MGF_HRB_SOCKET_PATH=/run/mgf-hrb.sock`` or YAML.
* ``default_deadline_ms`` — the per-call deadline the CLI passes when
  no explicit deadline is given. The kabi contract requires a real
  deadline on every op (D-029); the broker still rejects garbage
  values above the 1-hour cap.
"""

from __future__ import annotations

from mgf.common.config import BaseAppSettings


class HrbSettings(BaseAppSettings, env_prefix="MGF_HRB_"):
    """Typed config for ``mgf.hrb``. See module docstring for fields."""

    # S108 noqa: this is the broker's default listen path (matches
    # hrb-code/src/server.zig); production deployments override via env.
    socket_path: str = "/tmp/mgf-hrb.sock"  # noqa: S108
    default_deadline_ms: int = 5_000


__all__ = ["HrbSettings"]
