"""Central configuration overlay: the hive's config on top of the local one.

The hive (``hive/app.py``) stores one versioned document. An instance asks
for the layers that target it, merges them in order, and applies the result
over its own config — only the fields the hive names, everything else from
the local files. No document, or a document with no matching layer, means the
local config stands unchanged.

Reading order in ``navi.config``::

    navi.config.settings = bootstrap_settings(Settings)

which captures the local base, fetches (with the last-good cache as a
fallback), validates, and returns the overlaid settings object. The other
sections are picked up where they are built: ``apply_profiles_list`` in the
profile registry, ``overlay_llm_raw`` in the LLM registry,
``overlay_mcp_configs`` in the container.

A live push (``POST /config/notify`` from the hive) calls ``refresh``: hot
settings are rewritten in the live singleton, profiles are swapped in the
registry, and anything that needs a restart is reported as such instead of
being pretended into effect.
"""

from __future__ import annotations

from navi.overlay.apply import (
    apply_profiles_list,
    apply_profiles_registry,
    apply_settings_live,
    bootstrap_settings,
    overlay_llm_raw,
    overlay_mcp_configs,
    refresh,
    register_apply_hook,
)
from navi.overlay.fetch import confirm_startup
from navi.overlay.state import get_state, reset_state, status_dict, status_summary

__all__ = [
    "apply_profiles_list",
    "apply_profiles_registry",
    "apply_settings_live",
    "bootstrap_settings",
    "confirm_startup",
    "get_state",
    "overlay_llm_raw",
    "overlay_mcp_configs",
    "refresh",
    "register_apply_hook",
    "reset_state",
    "status_dict",
    "status_summary",
]
