Repository navigation
feat(assistant): send mail, add events and write files after a yes - #552
Merged
Merged
Conversation
Three new connection tools: send_mail (Gmail: send, or save a draft; reply_to keeps the thread), add_event (Google Calendar, inviting people if asked) and write_file (a text file on a storage connection, replacing one only when asked). Each always waits for the person's approval, which now carries a preview of all of it. Gmail and Google Calendar connections only read until an admin sets write "yes", which asks Google for gmail.compose or calendar.events, so nothing changes for existing connections. Google Drive connected read only is never written. Every change is audited. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GbBS222wEEQgkuui6CHo6c
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GbBS222wEEQgkuui6CHo6c
This was referenced Oct 18, 2026
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.
Requested by Adeel · project thread
Description
Before: an admin's assistant could search and read connected mail, calendars and files (#533), but couldn't send a reply, put a meeting on the calendar or save a file.
After: three new tools in "Mail, calendars and files":
send_mailsends from Gmail, or saves a draft;reply_to(a message id fromsearch_mail) keeps the thread and answers its sender with "Re:".add_eventadds an event to Google Calendar (a date alone is all day; a time without an offset is in the calendar's zone), inviting attendees unlessinviteis false.write_filewrites a text file to a storage connection, replacing one only whenoverwriteis set; a file that appeared after it asked is never replaced.Each always waits for the person's approval, even in a setup conversation, and the approval card (in chat and the Approvals inbox) now shows all of it first: the whole message with recipients, the event, the file's text, plus a note when the answer read outside text. Gmail and Google Calendar connections only read until an admin picks "Also sends mail and saves drafts" / "Also adds events" under The assistant in the connection's settings (
write"yes") and connects again, since Google is then asked forgmail.compose/calendar.events. Google Drive connected read only is never offeredwrite_file. Each change is audited (mail.send,mail.draft,calendar.add,connections.write).gmail.send(cfg, src, msg, thread_id=None, draft=False)is a module-level function so other features (the email responder) send through the same path.Motivation and Context
Second part of "Chat tools for Gmail, Calendar, Drive, S3 and Bash". Next: the sandbox node seam, so
run_python/run_bashcan run on compute nodes over the mesh.Refine later (in docs/assistant.md): sending from IMAP over SMTP, attachments on sent mail, changing or removing events and files.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
.env; Google writes need one pick and a reconnect, by design (new scope).writeis in the connection form with "Only reads" as default.gmail.send,gmail.draft,google.calendar(events.insert),connections.write.write, absent means "only reads"; no stored data change.rclone rcat; frontend tests for the form, scopes and the approval preview;make openapiregenerated; requirements row added.google_auth,gmail._Gmail,gcal,sources.run/browse/check_path,untrusted.Generated by Claude Code