mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-08 22:22:17 +02:00
feat(agents): consolidate connectors under mcp_discovery; route web search through google_search
MCP consolidation: - Route all MCP-capable connectors (Slack, Jira, Linear, ClickUp, Airtable, Notion, Confluence, interim Gmail/Calendar, custom MCP) through a single `mcp_discovery` subagent. Drive/OneDrive/Dropbox stay native to enrich the KB. - Deprecate Discord/Teams/Luma: no viable official MCP server. Google-only web search: - Remove the main-agent `web_search` tool and the SearXNG platform service; all public web search now flows through the `google_search` subagent via task(). - Deprecate the Tavily/SearXNG/Linkup/Baidu search connectors (HTTP 410 on create, "Deprecated" badge); guide heavy users to the custom MCP connector. - Remove web search from anonymous chat (pure Q&A). - Tear SearXNG out of docker compose + install scripts; drop tavily-python and linkup-sdk deps and their config/env vars. Fix: - metrics._package_version() now swallows any metadata lookup failure. A malformed editable-install distribution with no `Version` field raised KeyError deep in importlib.metadata, and since it runs on every record_subagent_invoke_duration call it was crashing every task() delegation. Verified end-to-end against live GPT-5.4. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ff2e5f390f
commit
ab747e7a49
206 changed files with 1704 additions and 7223 deletions
|
|
@ -12,6 +12,52 @@ from typing import Any
|
|||
import validators
|
||||
from fastapi import HTTPException
|
||||
|
||||
# Connectors retired during the MCP migration: no viable official MCP server
|
||||
# exists yet, so new connections are refused. Existing rows keep working until
|
||||
# the user removes them. If demand returns, reinstate the connector by dropping
|
||||
# it from this set and re-enabling its subagent/route.
|
||||
#
|
||||
# The four search APIs (TAVILY/SEARXNG/LINKUP/BAIDU) are deprecated alongside the
|
||||
# Google-only web-search consolidation: public web search now runs through the
|
||||
# google_search subagent, and users who still want Tavily/Linkup can add them via
|
||||
# the generic Custom MCP connector (API-key headers).
|
||||
DEPRECATED_CONNECTOR_TYPES: frozenset[str] = frozenset(
|
||||
{
|
||||
"DISCORD_CONNECTOR",
|
||||
"TEAMS_CONNECTOR",
|
||||
"LUMA_CONNECTOR",
|
||||
"TAVILY_API",
|
||||
"SEARXNG_API",
|
||||
"LINKUP_API",
|
||||
"BAIDU_SEARCH_API",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def raise_if_connector_deprecated(connector_type: str | Any) -> None:
|
||||
"""Refuse new connections for a deprecated connector type (HTTP 410 Gone)."""
|
||||
connector_type_str = (
|
||||
connector_type.value
|
||||
if hasattr(connector_type, "value")
|
||||
else str(connector_type)
|
||||
)
|
||||
if connector_type_str in DEPRECATED_CONNECTOR_TYPES:
|
||||
pretty = (
|
||||
connector_type_str.replace("_CONNECTOR", "")
|
||||
.replace("_SEARCH_API", "")
|
||||
.replace("_API", "")
|
||||
.replace("_", " ")
|
||||
.title()
|
||||
)
|
||||
raise HTTPException(
|
||||
status_code=410,
|
||||
detail=(
|
||||
f"The {pretty} connector has been deprecated and can no longer be "
|
||||
"connected. If you were relying on it heavily, let us know and we'll "
|
||||
"consider bringing it back."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def validate_workspace_id(workspace_id: Any) -> int:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue