feat(mcp): connect authenticated AquaPortal tools to Vocero (#1)
Vocero needs to query AquaPortal on behalf of the caller selected by the existing phone link. This adds server-owned conversations and MCP tool execution for voice and HTTP reasoning while leaving the speech pipeline unchanged. Release notes: - Added browser-bound conversations that keep backend credentials server-side and isolate callers. - Connected the eight-tool AquaPortal catalog through authenticated Streamable HTTP with full input schemas and structured results. - Added bounded multi-step tool execution with cancellation, expiry, and stale-result protection. - Updated browser bootstrap, tool progress, reasoning headers, and conversation cleanup. - Disabled legacy unscoped content preloads in MCP mode and documented configuration and deployment constraints. - Preserved disabled-mode contracts and added local SDK, WebSocket, and browser regression coverage. Reviewed-on: AquaPortal/s2s#1
This commit is contained in:
@@ -35,6 +35,8 @@ async def user_by_phone(phoneNumber: str) -> JSONResponse:
|
||||
it as Authorization: Bearer on the subsequent profile GET.
|
||||
"""
|
||||
|
||||
if settings.S2S_MCP_URL:
|
||||
raise HTTPException(409, "Usa la sesión de conversación para consultar AquaPortal.")
|
||||
if not settings.VOCERO_USER_PHONE_AUTH_URL:
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
@@ -118,6 +120,8 @@ async def user_reports(phoneNumber: str | None = None) -> JSONResponse:
|
||||
a subtle loophole where the browser could still fetch scheduled reports
|
||||
through /api/user/reports while the LLM prompt paths were gated.
|
||||
"""
|
||||
if settings.S2S_MCP_URL:
|
||||
raise HTTPException(409, "Los reportes se consultan durante la conversación con AquaPortal.")
|
||||
# ── MASS-INJECTION KILL SWITCH (user request) ─────────────────────────
|
||||
if not settings.S2S_INJECT_REPORTS:
|
||||
return validated_json_response(
|
||||
|
||||
Reference in New Issue
Block a user