feat(cli): allow generic file uploads including zip - #4880
Conversation
Agent co-lab was blocked on skill packs because buzz-cli only allowed image/* and video/mp4. The relay already accepts generic Blossom uploads via a danger denylist (HTML/JS/SVG/executables). Align the CLI with that policy so zip/pdf/text and similar types work while unsafe types stay blocked. Add unit coverage for allow/block and size tiers (100MB generic). Signed-off-by: Trevor P <trev2005@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1562cc9cda
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if mime.starts_with("audio/") { | ||
| return false; | ||
| } | ||
| !BLOCKED_FILE_MIMES.contains(&mime) |
There was a problem hiding this comment.
Render generic attachments as links
Allowing every non-blocklisted MIME here also enables buzz messages send --file <pdf|zip|txt>, but that send path still formats every uploaded non-video descriptor as  in crates/buzz-cli/src/commands/messages.rs:622-626. Desktop's generic file renderer keys on a plain [filename](url) link with matching non-media imeta, so these newly allowed attachments render as broken inline images instead of download cards; update the CLI message formatting before broadening this allowlist.
Useful? React with 👍 / 👎.
|
Independent prod verification, in case it's useful for review — I hit the exact One thing I liked reviewing the diff: `is_upload_mime_allowed()` mirrors the relay's denylist rather than hand-rolling a parallel allowlist, so the CLI won't silently drift out of sync the next time `buzz-media` adds a MIME. That's a nicer factoring than a static list would have been. |
Codex P2 on block#4880: after widening upload MIME types, `messages send --file` still emitted `` for every non-video blob. Desktop FileCard expects plain `[filename](url)` plus imeta `filename` for zip/pdf/txt. Match Desktop formatImetaMediaLine: images/video stay inline; generic files and agent/team snapshot PNGs use markdown links; escape label metacharacters; include basename on imeta tags. Signed-off-by: Trevor P <trev2005@gmail.com>
Codex P2 on block#4880: after widening upload MIME types, `messages send --file` still emitted `` for every non-video blob. Desktop FileCard expects plain `[filename](url)` plus imeta `filename` for zip/pdf/txt. Match Desktop formatImetaMediaLine: images/video stay inline; generic files and agent/team snapshot PNGs use markdown links; escape label metacharacters; include basename on imeta tags. Signed-off-by: Trevor P <trev2005@gmail.com>
1d36957 to
5fb4c1a
Compare
|
Addressed the Codex P2 (generic attachments as links):
Pushed on this PR as |
Summary
buzz-cliupload MIME policy so agent co-lab can attach zip skill packs and other safe generic files (pdf, text, json, common archives/docs).buzz-media(HTML/JS/SVG, native executables/installers); images andvideo/mp4unchanged.BUZZ_MAX_FILE_BYTES).The relay already routes non-image uploads through
process_file_upload+ denylist. The CLI was the choke (unsupported file type: application/zip).Dogfood
Test plan
cargo test -p buzz-cli --lib upload_buzz upload file --file pack.zipagainst a local or private relay