f82729f88e
- Hero-Diagramm: lokaler Agent -> Leitung 1 (Gateway/Modell) + Leitung 2 (MCP/Gedaechtnis)
- Live-Status pro Leitung: neuer Endpoint GET /api/connect/health (llama-swap + mem0-Sidecar)
- Zwei nummerierte Setup-Spalten statt flacher Tab-Leiste; Memory-MCP aus tools{} geloest
- Claude-Code-Snippet: echte env-Anleitung (ANTHROPIC_BASE_URL/AUTH_TOKEN/MODEL + Shim-Hinweis),
da Gateway kein /v1/messages bietet (live verifiziert: :9001 405, :8080 404)
- MCP-Scriptpfad jetzt klar nur Leitung 2 zugeordnet
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
628 B
Python
22 lines
628 B
Python
"""Connect-Endpoint: erzeugt IDE-/Agent-Snippets (auf den Gateway + Memory-MCP)."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from services.connect import DEFAULT_HOST, build_snippets, check_health
|
|
|
|
router = APIRouter(prefix="/api")
|
|
|
|
|
|
@router.get("/connect")
|
|
def connect(host: str = DEFAULT_HOST, mcp_path: str | None = None) -> dict:
|
|
kwargs = {}
|
|
if mcp_path:
|
|
kwargs["mcp_script_path"] = mcp_path
|
|
return build_snippets(host=host, **kwargs)
|
|
|
|
|
|
@router.get("/connect/health")
|
|
def connect_health() -> dict:
|
|
"""Live-Status der zwei Leitungen (Gateway + Gedächtnis) für den Verbinden-Tab."""
|
|
return check_health()
|