"""Owner-authenticated dashboard API for Switchyard provider telemetry.""" from __future__ import annotations import sys from pathlib import Path from fastapi import APIRouter # Dashboard API files are loaded as standalone modules by Hermes. Put the # owning plugin directory on the import path so this API and the TUI command # share one normalization implementation. sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from provider_status import provider_status_payload router = APIRouter() @router.get("/status") def status() -> dict[str, object]: """Return only non-secret account health and observed router counters.""" return provider_status_payload()