- Introduced a new `context` module and its endpoints for Context Management. - Added `/context` route to the API router for assembling LLM context, token counting, budget management, and cache invalidation. - Implemented health checks, context assembly, token counting, and caching operations in the Context Management Engine. - Included schemas for request/response models and tightened error handling for context-related operations.
55 lines
1.8 KiB
Python
55 lines
1.8 KiB
Python
from fastapi import APIRouter
|
|
|
|
from app.api.routes import (
|
|
admin,
|
|
agent_types,
|
|
agents,
|
|
auth,
|
|
context,
|
|
events,
|
|
issues,
|
|
mcp,
|
|
oauth,
|
|
oauth_provider,
|
|
organizations,
|
|
projects,
|
|
sessions,
|
|
sprints,
|
|
users,
|
|
)
|
|
|
|
api_router = APIRouter()
|
|
api_router.include_router(auth.router, prefix="/auth", tags=["Authentication"])
|
|
api_router.include_router(oauth.router, prefix="/oauth", tags=["OAuth"])
|
|
api_router.include_router(
|
|
oauth_provider.router, prefix="/oauth", tags=["OAuth Provider"]
|
|
)
|
|
api_router.include_router(users.router, prefix="/users", tags=["Users"])
|
|
api_router.include_router(sessions.router, prefix="/sessions", tags=["Sessions"])
|
|
api_router.include_router(admin.router, prefix="/admin", tags=["Admin"])
|
|
api_router.include_router(
|
|
organizations.router, prefix="/organizations", tags=["Organizations"]
|
|
)
|
|
# SSE events router - no prefix, routes define full paths
|
|
api_router.include_router(events.router, tags=["Events"])
|
|
|
|
# MCP (Model Context Protocol) router
|
|
api_router.include_router(mcp.router, prefix="/mcp", tags=["MCP"])
|
|
|
|
# Context Management Engine router
|
|
api_router.include_router(context.router, prefix="/context", tags=["Context"])
|
|
|
|
# Syndarix domain routers
|
|
api_router.include_router(projects.router, prefix="/projects", tags=["Projects"])
|
|
api_router.include_router(
|
|
agent_types.router, prefix="/agent-types", tags=["Agent Types"]
|
|
)
|
|
# Issues router - routes include /projects/{project_id}/issues paths
|
|
api_router.include_router(issues.router, tags=["Issues"])
|
|
# Agents router - routes include /projects/{project_id}/agents paths
|
|
api_router.include_router(agents.router, tags=["Agents"])
|
|
# Sprints router - routes need prefix as they use /projects/{project_id}/sprints paths
|
|
api_router.include_router(
|
|
sprints.router, prefix="/projects/{project_id}/sprints", tags=["Sprints"]
|
|
)
|