Invite people to an event, and give them somewhere to meet - #9
Merged
Merged
Conversation
`calendar_create_event` grows `attendees` and `online_meeting` -- the two things that separate a meeting from an appointment. Both are gated on a capability the provider declares, because CalDAV can do neither and the failure mode is silent: an `ATTENDEE` line in an iCalendar object is not an invitation. Delivering one is server-side scheduling (RFC 6638), which some servers do and others quietly do not, and nothing lets a client tell them apart. So the CalDAV backend answers False to both and the tool says which part will work instead, rather than creating an event that looks like a meeting nobody was told about and nobody can join. `supports_attendees` / `supports_online_meeting` are read with `getattr(..., False)`, the same shape (and the same reasoning) as the mail pillar's `supports_outgoing_attachments`, so a backend written before this answers no without being touched. The conference link comes back as `join_url` on `EventDetail` and on the create result: the backend mints it while creating the event, so the tool re-reads to report it. That read failing is logged, not raised -- the event exists by then, and a failed tool call invites a retry that books it twice. `attendees` takes the shapes mail recipients take (list, bare address, comma-separated) via the same `as_str_list`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KH5aahN2mPmZMoiS3dkeWL
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.
calendar_create_eventcould make an appointment but not a meeting: no way toinvite anyone, and no way to ask for a conference link. This adds both to the
seam, and lets a backend say it cannot do them.
What changed
attendeesoncalendar_create_event— email addresses; the backendinvites them. Takes the shapes mail recipients take (list, bare address,
comma-separated) through the same
as_str_list, deduped case-insensitively.online_meeting— asks the backend to mint a conference link. It comesback as
join_url, on both the create result andcalendar_read_event.supports_attendees/supports_online_meetingonCalendarProvider,read as
getattr(..., False)— the same shape as the mail pillar'ssupports_outgoing_attachments, and for the same reason.True and is the first backend that can do either.
Why the capability flags rather than a best-effort write
Writing an
ATTENDEEline into an iCalendar object does not invite anybody.Delivering the invitation is server-side scheduling (RFC 6638) — some CalDAV
servers implement it, others quietly do not, and nothing in the protocol lets a
client tell which one it is talking to. A caller who believes they invited five
people and invited none is worse off than one whose tool call refused, so the
refusal names the alternative in the same sentence. This is the existing
attachments doctrine applied to the calendar pillar.
An online meeting has no CalDAV equivalent at all: a plain calendar server
stores conferencing details and creates none.
The read-back
The backend mints the link while creating the event, so the only way to it is a
read.
calendar_create_eventdoes that read whenonline_meeting=true, andswallows a failure with a logged warning: the event exists by that point, and
reporting the tool call as failed invites a retry that books it twice.
Deliberately not here
calendar_update_eventstill cannot add attendees or turn an existing eventinto a meeting. Graph refuses the latter outright (
isOnlineMeetingcannot bechanged once set), and the former is a separate decision about whether an update
re-sends invitations. Worth doing; not worth bundling.
Tests
tests/test_calendar_invitations.py— 13 cases, mostly the refusals: attendeesand online meetings against a backend that cannot, a provider that predates both
properties (
getattrdefault), the plain-event path staying untouched, plus thecapable path, the normalisation, the join link, and a read-back that fails
without failing the creation.
make test168 passed ·make lintclean.Generated by Claude Code