feat(2.0): implement cockpit improvements, dynamic mcp path, v2 venv, and ko-residency

This commit is contained in:
Hitonabi
2026-06-25 21:50:16 +02:00
parent 807c2c6194
commit e1da5c797d
14 changed files with 87 additions and 50 deletions
+13 -1
View File
@@ -6,7 +6,7 @@ Hermes' eigener Config verdrahtet (siehe docs/HERMES_SETUP.md).
import httpx
from config import HERMES_API_URL, HERMES_HOME, HERMES_WEBUI_URL
from config import HERMES_API_URL, HERMES_HOME, HERMES_WEBUI_URL, yaml
def _reach(url: str, path: str = "") -> bool:
@@ -20,12 +20,24 @@ def _reach(url: str, path: str = "") -> bool:
def agent_status() -> dict:
"""Erreichbarkeit von Gateway (:8642) + WebUI (:8787) + lokale Hinweise."""
home = HERMES_HOME
brain_model = "auto"
config_path = home / "config.yaml"
if config_path.exists():
try:
with config_path.open("r", encoding="utf-8") as f:
cfg = yaml.load(f) or {}
if isinstance(cfg, dict):
brain_model = cfg.get("model", {}).get("model", "auto")
except Exception:
pass
return {
"gateway_url": HERMES_API_URL,
"webui_url": HERMES_WEBUI_URL,
"gateway_reachable": _reach(HERMES_API_URL, "/v1/models"),
"webui_reachable": _reach(HERMES_WEBUI_URL),
"home_exists": home.exists(),
"brain_model": brain_model,
# Best-effort: welche Verdrahtung lokal sichtbar ist (auf der Box aussagekräftig).
"has_config": (home / "config.yaml").exists() or (home / "config.json").exists(),
"has_skills": (home / "skills").exists(),
+1 -1
View File
@@ -18,7 +18,7 @@ from services import discover, jobengine, llamaswap
# System-Dienste (root, via sudo -n NOPASSWD) vs. User-Dienste (systemctl --user).
SYSTEM_SERVICES = {"llama-swap"}
USER_SERVICES = {"mission-control-2", "hermes-gateway", "hermes-dashboard", "hermes-webui", "litellm-gateway"}
USER_SERVICES = {"mission-control-2", "hermes-gateway", "hermes-dashboard", "hermes-webui"}
ENGINE_UPDATE_CMD = os.environ.get("MC_ENGINE_UPDATE_CMD", "")
ENGINE_PATH = os.environ.get("MC_ENGINE_PATH", "/opt/llamacpp")