cmvr-visual/backend/app/api/routes/system.py
zhanghao 88cf14d794 feat: consolidate story studio and editable automatic production
Restructure backend and frontend modules; add story, library, and editor schema migrations.

Support editable automatic production, manual confirmation modes, account and user lifecycle management, compact container scrolling, consistent forms, and per-task result previews.

Update inference and TTS scheduling, deployment guidance, and regression coverage; remove obsolete standalone pages and temporary acceptance artifacts.
2026-11-14 14:07:26 +08:00

37 lines
1020 B
Python

from fastapi import APIRouter, Depends, Request
from fastapi.responses import JSONResponse
from app.api.dependencies import current_actor
from app.services import system as service
router = APIRouter()
@router.get("/health")
async def health(request: Request):
return await service.health(request.app.state)
@router.get("/live")
async def live():
return {"status": "ok"}
@router.get("/ready")
async def ready(request: Request):
checks = await service.readiness(request.app.state)
healthy = all(checks.values())
return JSONResponse(
status_code=200 if healthy else 503,
content={"status": "ready" if healthy else "not_ready", "checks": checks},
)
@router.get("/capabilities", dependencies=[Depends(current_actor)])
async def capabilities(request: Request):
return await service.capabilities(request.app.state)
@router.get("/system/status", dependencies=[Depends(current_actor)])
async def status(request: Request):
return await service.status(request.app.state)