mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
Outbound MEDIA video/document tags on the Discord non-streaming path were extracted (stripped from the visible text) but never delivered: no attachment, no error, and no dispatch log line (#66797). The open-handle discord.File plus singular file= form could race Discord's multipart encoder after an earlier image batch on the same channel and return a successful message carrying zero attachments. Fix _send_file_attachment (used by send_video/send_document/ send_image_file) to: - use a path-based discord.File via the plural files=[...] kwarg, the same pattern as the working send_multiple_images batch path; - pre-flight os.path.isfile and return a File not found result instead of raising deep inside discord.File; - fail loud when Discord accepts the message but attaches nothing, so the dispatch loop surfaces a warning rather than a silent drop; - add INFO dispatch logs (base non-image MEDIA fan-out, video send, and file attachment) so a MEDIA:.mp4 cannot vanish without a trace. Tests (tests/gateway/test_discord_send.py): - path-based files=[...] kwarg used, singular file= unset; - fail-loud when the returned message has no attachments; - missing file fails fast without resolving the channel; - forum-parent delivery routes through create_thread with files=[...]; - end-to-end image+video response routes the mp4 to send_video while images still batch. Fixes #66797 |
||
|---|---|---|
| .. | ||
| browser | ||
| context_engine | ||
| cron_providers | ||
| dashboard_auth | ||
| disk-cleanup | ||
| google_meet | ||
| hermes-achievements | ||
| image_gen | ||
| kanban | ||
| memory | ||
| model-providers | ||
| observability | ||
| platforms | ||
| security-guidance | ||
| spotify | ||
| teams_pipeline | ||
| video_gen | ||
| web | ||
| __init__.py | ||
| plugin_utils.py | ||