Repository navigation
Tools: Gmail attachments, Google Sheets, and scheduling - #12
Merged
Merged
Conversation
- gmail_read_thread lists each message's attachments (id, name, type, size) - gmail_save_attachment (read, untrusted) copies an attachment into the user's files: text and PDFs are extracted and indexed, photos become viewable with file_read, anything can be forwarded with gmail_send. Matches by name when Gmail's per-fetch attachment id changed, sniffs octet-stream types, refuses over 25 MB before downloading - New optional Sheets scope group (spreadsheets) with sheets_read, sheets_append, sheets_update and sheets_create; ids or links accepted, writes check the spreadsheet title the approval card shows - Risk facts: "Overwrites N cells" and "Includes formulas" - Approval card shows sheet writes as a table; Connections lists the tools - Fake Google covers attachments and the Sheets API; tests incl. an invoice-to-sheet run with approval - Docs: google.md, README, api.md
The agent can now schedule future work for the user with schedule_task, list_scheduled and cancel_scheduled. Each scheduled item is a one-off (new run_at column, turns itself off after firing) or recurring schedule automation on the chat it was asked in, so a fired task continues that conversation with its context. Reminders (kind "reminder") make no model call: they add a note to the chat and notify through push, Slack DM and email. Scheduling is allowed by default but asks in tainted runs, so an email cannot plant a scheduled instruction. Adds a per-user time zone setting (auto-filled from the browser), used for schedules, previews and the date in the system prompt; one-offs and reminders on the Automations page; an approval view for schedule_task.
# Conflicts: # apps/web/components/approval/payload.tsx # packages/tools/src/index.ts
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.
Three more groups of tools for the agent, built on the existing approval and policy rules.
Gmail attachments
gmail_read_threadlists each message's attachments.gmail_save_attachmentcopies an attachment into your files. Text and PDFs are extracted and indexed, photos can be viewed withfile_read, and anything saved can be forwarded withgmail_send.read: it only makes a private copy on the server. Its output is untrusted.Google Sheets
These need a new optional permission group, "Sheets" (
spreadsheets); grants without it get a reconnect prompt.sheets_read: with no range it lists the tabs; with a range it returns values, up to 200 rows × 50 columns per page, withnextRangefor the next page.sheets_append,sheets_updateandsheets_createare writes and ask for approval. All of them accept a spreadsheet link or id.spreadsheetTitle, and nothing is written if it doesn't match the real title. This keeps the approval card from naming a different spreadsheet than the one written to.=(a formula like=IMPORTDATAcan leak the sheet when someone opens it).Scheduling
schedule_taskcreates a reminder, which notifies you through push, Slack DM or email without calling the model, or a task, which the agent carries out in the same chat at that time.repeattakes none, daily, weekdays, weekly or monthly, or a cron at least 15 minutes apart.list_scheduledandcancel_scheduled. Cancelling pauses the item; nothing is deleted.memory_save. In a run that has read outside content (tainted), both ask, so an email can't plant a future instruction or turn off your automations.0010_schedule_tasksadds one-off automations (run_at,kind) anduser_settings.timezone.Checked