Agents save a message's attachment to the downloads folder #57
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/tuimail!57
Loading…
Reference in a new issue
No description provided.
Delete branch "save-attachment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/TUI-18
Adds
save_attachmentto tuimail's agent interface (tuimail mcp). Until now agents saw attachments' names only and nothing could hand a file to an agent.Added
save_attachment { id, index }: saves one attachment of a message (fromsearch_messages) or an archived one (fromsearch_archive) the waysdoes: into the downloads folder throughtools::save_new(never over a file, a new name instead, marked as downloaded), checked to be the one listed, never opened. Answerssaved(the path),name,size.read_message/read_archivednow give each attachment itsindex.AgentRead.wants), within the existing download limits.AppEvent::AgentSaved). At most 50 saves an hour; refused in the demo.Choice: a save changes no mail, so it isn't put to the user's
ythe way changes are; it's visible instead. The server instructions tell agents to save only a file the user asked for.Unchanged: no tool opens, sends or deletes anything; mail itself isn't touched.
Docs: README's AI agents section, CLAUDE.md's security notes,
mcp::INSTRUCTIONS(1,588 of 2,048 characters).Tested:
agents_save_an_attachment_read_message_lists(index listed, saved to the downloads folder, a second save gets a new name, a wrong index and the demo save nothing, status line shows it);ci-checkpasses (fmt, clippy, 276 tests).🤖 Generated with Claude Code
merge-queue stopped this at
829221c: CI failed: Suite release / check-build (rust, aarch64-pc-windows-msvc) (, rust-aarch64-pc-windows-msvc, aarch64-pc-windows-msvc, false, windows-latest, aarch64-pc-windows-msvc, rust) (pull_request). Push a fix, or once it is fixed outside this pull request, remove and re-add thequeuelabel.