fix: add missing API endpoints for CLI compatibility

- Add /v1/admin/status endpoint for system status
- Add /v1/blockchain/status endpoint for blockchain status
- Add /v1/blockchain/sync-status endpoint for sync status
- Add /v1/monitor/dashboard endpoint for monitoring dashboard
- Fix router imports and missing dependencies
- Handle optional dependencies gracefully (torch, tenseal)
- Update admin router with comprehensive system status endpoint
- Fix blockchain router endpoint paths
- Improve error handling in monitoring dashboard

These endpoints resolve CLI 404/405 errors reported in testing.
This commit is contained in:
oib
2026-03-05 12:42:01 +01:00
parent af68f46249
commit 40cf275985
5 changed files with 217 additions and 17 deletions

View File

@@ -205,7 +205,13 @@ class FHEService:
"""Main FHE service for AITBC"""
def __init__(self):
providers = {"tenseal": TenSEALProvider()}
providers = {}
# TenSEAL provider
try:
providers["tenseal"] = TenSEALProvider()
except ImportError as e:
logging.warning(f"TenSEAL provider not available: {e}")
# Optional Concrete ML provider
try: