Files
DocsGPT/docsgpt/retriever/base.py
T
arc53-machine b692eaf7ad Add MCP presets, admin connector policies and connector attribution
Six vendor-run MCP servers (Notion, Linear, Atlassian, Sentry, Asana,
Stripe) join the catalog as presets from docsgpt/connectors/presets/
mcp.yaml; existing connections to those servers show under them.

connector_policies lets an admin turn a connector off or force whose
account every share uses, and app_metadata's
connectors.allow_custom_mcp turns custom MCP servers off. Both are
enforced on the server: new connections, OAuth sign-ins, MCP test and
save, and the tools of a disabled connector stop resolving.
GET/PUT /api/admin/connectors reads and changes them.

A shared tool's owner picks owner or member credentials with
PUT /api/connections/tools/<id>/credential-mode, and a member running
the owner's account always confirms write actions.

Tool-call events and retrieved chunks name the connector they came
from (key and display name, never the account), and tool calls keep
those fields when the conversation is reloaded.
2026-09-28 17:30:53 +01:00

22 lines
590 B
Python

from abc import ABC, abstractmethod
class BaseRetriever(ABC):
@property
def _connector_labels(self):
"""Per-retriever memo of each source's connector ("From Google Drive")."""
cache = self.__dict__.get("_connector_label_cache")
if cache is None:
from docsgpt.connectors.attribution import ConnectorLabelCache
cache = ConnectorLabelCache()
self.__dict__["_connector_label_cache"] = cache
return cache
def __init__(self):
pass
@abstractmethod
def search(self, *args, **kwargs):
pass