SurfSense/surfsense_backend/app/tasks/chat/streaming/handlers
DESKTOP-RTLN3BA\$punk ab747e7a49 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>
2026-07-04 21:06:04 -07:00
..
tools feat(agents): consolidate connectors under mcp_discovery; route web search through google_search 2026-07-04 21:06:04 -07:00
__init__.py Add LangGraph handlers for chat model, chain, tool, and custom events. 2026-05-06 20:08:48 +02:00
chain_end.py Add LangGraph handlers for chat model, chain, tool, and custom events. 2026-05-06 20:08:48 +02:00
chat_model_stream.py Mint pending span id when the task tool registers from chunks. 2026-05-08 22:47:08 +02:00
custom_event_dispatch.py Forward span metadata from report_progress thinking updates. 2026-05-08 22:47:50 +02:00
custom_events.py feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
tool_end.py refactor(agents): introduce chat/ category; dissolve top-level agents/shared 2026-06-05 12:54:02 +02:00
tool_output_frame.py Clear spans after task completion and pass span id on tool output. 2026-05-08 22:47:38 +02:00
tool_start.py Pass thinkingStepId through tool-input start and available metadata. 2026-05-08 23:17:05 +02:00