feat(caldav): auto-discover Google CalDAV calendars from email accounts#5032
Open
Katsoragi wants to merge 5 commits into
Open
feat(caldav): auto-discover Google CalDAV calendars from email accounts#5032Katsoragi wants to merge 5 commits into
Katsoragi wants to merge 5 commits into
Conversation
Katsoragi
force-pushed
the
personal/caldav-autodiscover
branch
2 times, most recently
from
July 3, 2026 10:03
878f377 to
4bcb9e8
Compare
Katsoragi
force-pushed
the
personal/caldav-autodiscover
branch
from
July 12, 2026 15:16
4bcb9e8 to
7c24e9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enables automatic discovery of Google CalDAV accounts when a Google IMAP email account is connected. It dynamically maps to the CalDAV v2 endpoint (
apidata.googleusercontent.com/caldav/v2) for Google OAuth accounts, and automatically falls back to the legacy DAV endpoint (www.google.com/calendar/dav) for standard Basic Auth (App Passwords) since Google's v2 endpoint restricts basic auth.Additionally, this PR adds Google Calendar syncing support via OAuth bearer tokens, maps travel-related intents (flights, hotels, bookings, trips, etc.) to the email and calendar domains, and handles common calendar spelling variations (e.g.
callender,calender,calander) in the agent request classifier.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Fixes #4908
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
www.google.com/calendar/davfor App Passwords (Basic Auth) orapidata.googleusercontent.com/caldav/v2for OAuth.Checks Run
pytest tests/test_caldav_redirect_hardening.py(Passed).DAVClientconstruction insrc/caldav_sync.pyto preserve strict redirect and SSRF hardening.