fix: add router prefix for ai_ui_control WebSocket and REST routes

- APIRouter had no prefix, so WebSocket was on /ws not /api/v1/ai-ui-control/ws
- This caused 403 on every WebSocket connection attempt
- Remove debug print statements
This commit is contained in:
Agent Zero
2026-07-24 17:35:14 +02:00
parent d8787ea007
commit 6e930b814e
2 changed files with 1 additions and 4 deletions
@@ -46,14 +46,11 @@ class AIUIControlPlugin(BasePlugin):
async def on_activate(self, db, service_container, event_bus) -> None:
"""Register the WebSocket manager in the service container on every activation."""
print("[STARTUP] ai_ui_control on_activate called", flush=True)
await super().on_activate(db, service_container, event_bus)
print("[STARTUP] ai_ui_control super().on_activate done", flush=True)
from app.plugins.builtins.ai_ui_control.websocket_manager import AIUIControlWSManager
ws_manager = AIUIControlWSManager()
service_container.register("ai_ui_control_ws", ws_manager)
print("[STARTUP] ai_ui_control WS manager registered in container", flush=True)
logger.info("AI UI Control WebSocket manager registered")
async def on_deactivate(self, db, service_container, event_bus) -> None:
+1 -1
View File
@@ -26,7 +26,7 @@ from app.plugins.builtins.ai_ui_control.schemas import (
logger = logging.getLogger(__name__)
router = APIRouter(tags=["ai-ui-control"])
router = APIRouter(prefix="/api/v1/ai-ui-control", tags=["ai-ui-control"])
# ─── REST endpoints (for AI agents) ───