Commit graph

6 commits

Author SHA1 Message Date
CREDO23
64512c604d refactor(agents): colocate gmail + calendar connector tools into subagent slices
Gmail and Calendar are handled together because both Google connectors share
the _build_credentials helper that lived in shared/tools/gmail.

- relocate the gmail helpers (_get_token_encryption, _build_credentials,
  _gmail_headers, _format_gmail_summary) into the gmail subagent slice
  (tools/_helpers.py); repoint gmail search_emails/read_email to it.
- calendar search_events now imports _build_credentials from the gmail slice
  (preserving the existing cross-connector Google-auth dependency).
- repoint both dead tools/__init__ shims at the live local impls.
- fix tests/e2e native_google fake: it patched the dead shared
  google_calendar.*.build paths; point it at the live subagent calendar
  modules (which actually import googleapiclient build).
- delete dead shared/tools/{gmail,google_calendar} twins.

shared/tools now has zero connector dirs. agents unit suite green (942).
2026-06-04 20:09:37 +02:00
CREDO23
aab95b9130 refactor(agents): move tools package to app/agents/shared (slice 6)
Relocate the entire new_chat/tools/ package (62 files incl. registry, hitl, MCP
cluster, and all connector subpackages: gmail/slack/discord/teams/drive/etc.)
to the shared kernel. The package turned out to be a clean cohesive cluster:
its only references to non-tools new_chat modules were comments, and its
middleware deps were already flipped to shared in slice 5c.

Flip 33 live importers (multi-agent, flows, routes, services, anonymous_agent,
tests). Re-export shims remain for the frozen single-agent stack: a package
__init__ mirroring the public surface (new_chat.__init__ imports it) plus
invalid_tool + registry submodule shims (chat_deepagent imports those).

Resolves slice 5c's two transient back-edges: shared/middleware/action_log
(TYPE_CHECKING ToolDefinition) and tool_call_repair (local INVALID_TOOL_NAME)
now point at app.agents.shared.tools.
2026-06-04 13:11:56 +02:00
Anish Sarkar
dbf575fbd0 chore: ran linting 2026-05-09 05:16:20 +05:30
Anish Sarkar
5a2357b981 test(e2e): serve binary PDF bytes from storage connector fakes 2026-05-09 05:03:07 +05:30
Anish Sarkar
597bd34053 test(backend): add native Google Calendar E2E fakes 2026-05-07 04:42:28 +05:30
Anish Sarkar
a5c04cb38d test(backend): generalize native Google E2E fakes for Gmail 2026-05-07 04:22:59 +05:30
Renamed from surfsense_backend/tests/e2e/fakes/native_google_drive.py (Browse further)