🚀 Initial commit: Rose's custom WebUI with modernization + agent attribution

This commit is contained in:
Rose
2026-04-20 10:36:59 +02:00
parent 3bdf430413
commit 99dd1f57ae
118 changed files with 41900 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ from api.helpers import (
_redact_text,
)
from api import mc as _mc
from api import agents as _agents
# ── CSRF: validate Origin/Referer on POST ────────────────────────────────────
import re as _re
@@ -770,6 +771,18 @@ def handle_get(handler, parsed) -> bool:
limit = int(parse_qs(parsed.query).get("limit", ["50"])[0])
return j(handler, {"feed": _mc.get_feed(limit=limit)})
# ── Agents API (Rose + Tier-2) ──
if parsed.path == "/api/agents":
return j(handler, _agents.list_agents())
if parsed.path.startswith("/api/agents/inbox/"):
agent_id = parsed.path.split("/")[-1]
return j(handler, _agents.get_agent_inbox(agent_id))
if parsed.path.startswith("/api/agents/config/"):
agent_id = parsed.path.split("/")[-1]
return j(handler, _agents.get_agent_config(agent_id))
# ── Profile API (GET) ──
if parsed.path == "/api/profiles":
from api.profiles import list_profiles_api, get_active_profile_name