feat(10-02): mount KB and calendar routers, update tool registry and prompt builder

- Mount kb_router and calendar_auth_router on gateway (Phase 10 agent capabilities)
- Update calendar_lookup tool schema with action/event_summary/event_start/event_end params
- Add tool result formatting instruction to build_system_prompt when tools assigned (CAP-06)
- Add kb_router and calendar_auth_router to shared/api/__init__.py exports
- Confirm CAP-04 (http_request) and CAP-07 (audit logging) already working
This commit is contained in:
2026-03-26 09:10:01 -06:00
parent 9c7686a7b4
commit a64634ff90
4 changed files with 58 additions and 7 deletions

View File

@@ -17,6 +17,8 @@ Endpoints:
GET /api/portal/tenants/{id}/llm-keys — BYO LLM key management
GET /api/portal/usage/* — Usage and cost analytics
POST /api/webhooks/* — Stripe webhook receiver
GET /api/portal/kb/* — Knowledge base document management
GET /api/portal/calendar/* — Google Calendar OAuth endpoints
GET /health — Health check
Startup sequence:
@@ -43,9 +45,11 @@ from gateway.channels.web import web_chat_router
from gateway.channels.whatsapp import whatsapp_router
from shared.api import (
billing_router,
calendar_auth_router,
channels_router,
chat_router,
invitations_router,
kb_router,
llm_keys_router,
portal_router,
push_router,
@@ -164,6 +168,12 @@ app.include_router(web_chat_router) # WebSocket: /chat/ws/{conversation_id}
# ---------------------------------------------------------------------------
app.include_router(push_router) # Push subscribe/unsubscribe/send
# ---------------------------------------------------------------------------
# Phase 10 Agent Capabilities routers
# ---------------------------------------------------------------------------
app.include_router(kb_router) # KB documents: /api/portal/kb/{tenant_id}/documents
app.include_router(calendar_auth_router) # Google Calendar OAuth: /api/portal/calendar/*
# ---------------------------------------------------------------------------
# Routes