pub fn ensure_local_api_token(cfg: &SharedConfig, config_path: &Path) -> StringExpand description
Ensure the per-install local API bearer token exists, minting and persisting one on first launch. A failed persist is warn-logged but non-fatal: the in-memory token still guards this session and the discovery file still tells clients what it is.