Telegram: capture document/file uploads #24
Labels
No labels
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What to build
Let evie ingest Telegram document uploads so pi can read and act on files (summarize a PDF, ingest a markdown note, etc.). Today only text and photos are handled; documents are silently ignored.
When the user sends a document (with optional caption):
file_size; if it exceeds the Bot APIgetFilehard cap (20 MB), reply with a friendly "file too large" message and skip the download (respectingexpose_errorssemantics for the wording)./tmp/<rand>/report.pdf), sanitizing the filename against path traversal. The temp guard is held alive for the whole pi turn (so pi can copy the file into the vault if asked), mirroring how photos work today.image/*(an image sent uncompressed as a file), route it through the existing vision/ImageContentbase64 path instead of the file-path path.[Document file: <path>]into the message; the caption (if present) is the user's instruction. pi'sreadtool / a configured pi extension does all parsing — evie pulls in no parsing crates and stays a dumb pass-through.This slice generalizes the temp guard from a single
NamedTempFileto also cover a temp-dir-with-original-name guard. No protocol change, no new config.Acceptance criteria
[Document file: <path>]marker at a path bearing the original filename+extensionimage/*document is handled via the vision path, identically to a photofile_namecannot escape the temp directoryBlocked by
None - can start immediately