Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def startup_event():
logger.info("Execra API starting...")
from api.websockets.router import broadcast_action_log
from core.hybrid.action_logger import action_logger

action_logger.register_callback(broadcast_action_log)


Expand All @@ -41,6 +42,7 @@ async def shutdown_event():
logger.info("Execra API shutting down...")
from api.websockets.router import broadcast_action_log
from core.hybrid.action_logger import action_logger

action_logger.unregister_callback(broadcast_action_log)


Expand All @@ -50,10 +52,7 @@ def read_root():
try:
return {
"status": "success",
"data": {
"message": "Execra is running",
"version": "0.1.0"
}
"data": {"message": "Execra is running", "version": "0.1.0"},
}
except Exception as e:
return handle_exception(e)
Expand All @@ -71,12 +70,8 @@ def read_root():
handle_exception(e)


# Action log and session context endpoints
app.include_router(actions.router, prefix="/api/v1")
app.include_router(context.router, prefix="/api/v1")

# WebSocket endpoints (no prefix — WS routes use the path as-is)
app.include_router(ws_guidance.router)

# Alert suppression endpoints
app.include_router(suppression.router, prefix="/api/v1")
# Alert suppression endpoints
app.include_router(suppression.router, prefix="/api/v1")