- Add AI_FEATURES_ENABLED config flag to gate AI/natural-language features - Conditionally register /api/ask router based on AI_FEATURES_ENABLED - Add GET /api/config/features endpoint for frontend feature detection - Update frontend to hide Ask panel when AI features are disabled - Implement standalone MCP server (backend/mcp_server.py) with tools: * search_events, get_event, get_summary, ask - Add mcp dependency to requirements.txt - Update .env.example, AGENTS.md, and ROADMAP.md - Bump VERSION to 1.3.0
29 lines
592 B
Python
29 lines
592 B
Python
from config import (
|
|
AI_FEATURES_ENABLED,
|
|
AUTH_CLIENT_ID,
|
|
AUTH_ENABLED,
|
|
AUTH_SCOPE,
|
|
AUTH_TENANT_ID,
|
|
)
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/config/auth")
|
|
def auth_config():
|
|
return {
|
|
"auth_enabled": AUTH_ENABLED,
|
|
"tenant_id": AUTH_TENANT_ID,
|
|
"client_id": AUTH_CLIENT_ID,
|
|
"scope": AUTH_SCOPE,
|
|
"redirect_uri": None, # frontend uses window.location.origin by default
|
|
}
|
|
|
|
|
|
@router.get("/config/features")
|
|
def features_config():
|
|
return {
|
|
"ai_features_enabled": AI_FEATURES_ENABLED,
|
|
}
|