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
|
|
@ -4,6 +4,15 @@ function asNonEmptyString(v: unknown): string | undefined {
|
|||
return typeof v === "string" && v.trim().length > 0 ? v.trim() : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicit display labels for subagents whose title-cased id reads poorly.
|
||||
* Legacy per-connector names (gmail, slack, ...) intentionally fall through
|
||||
* to {@link titleCaseSubagent} so historical conversations keep their labels.
|
||||
*/
|
||||
const SUBAGENT_DISPLAY_LABELS: Record<string, string> = {
|
||||
mcp_discovery: "Connected Apps",
|
||||
};
|
||||
|
||||
/**
|
||||
* Title-case a subagent identifier:
|
||||
* "notion" → "Notion"
|
||||
|
|
@ -27,7 +36,8 @@ export function titleCaseSubagent(raw: string): string {
|
|||
export function resolveSubagentTitle(item: ToolCallItem): string | undefined {
|
||||
if (item.toolName !== "task") return undefined;
|
||||
const subagent = asNonEmptyString(item.args?.subagent_type);
|
||||
return subagent ? titleCaseSubagent(subagent) : undefined;
|
||||
if (!subagent) return undefined;
|
||||
return SUBAGENT_DISPLAY_LABELS[subagent] ?? titleCaseSubagent(subagent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -165,10 +165,9 @@ const DeleteConfluencePageToolUI = dynamic(
|
|||
* - **Structural primitives** (``task``): the row IS the parent of a
|
||||
* delegation span; its job is to label the group. Children render
|
||||
* as their own indented entries.
|
||||
* - **Suppressed connectors** (``web_search``, ``link_preview``,
|
||||
* ``multi_link_preview``, ``scrape_webpage``): citations they
|
||||
* produce render inline in markdown; a separate card would be
|
||||
* redundant noise.
|
||||
* - **Suppressed connectors** (``link_preview``, ``multi_link_preview``,
|
||||
* ``scrape_webpage``): citations they produce render inline in
|
||||
* markdown; a separate card would be redundant noise.
|
||||
*/
|
||||
const NullTimelineBody: TimelineToolComponent = () => null;
|
||||
|
||||
|
|
@ -218,7 +217,6 @@ const TOOLS_BY_NAME = {
|
|||
create_confluence_page: CreateConfluencePageToolUI,
|
||||
update_confluence_page: UpdateConfluencePageToolUI,
|
||||
delete_confluence_page: DeleteConfluencePageToolUI,
|
||||
web_search: NullTimelineBody,
|
||||
link_preview: NullTimelineBody,
|
||||
multi_link_preview: NullTimelineBody,
|
||||
scrape_webpage: NullTimelineBody,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue