mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
The Discord adapter silently dropped any attachment whose extension wasn't
in the SUPPORTED_DOCUMENT_TYPES allowlist (PDF, text family, zip, office).
Users uploading .wav / .bin / other unrecognized formats saw nothing in
their conversation — the file got logged as 'Unsupported document type'
and discarded before the agent ever saw it.
Add discord.allow_any_attachment (default false) to bypass the allowlist.
When on:
- Any file is downloaded, cached under ~/.hermes/cache/documents/, and
surfaced as a DOCUMENT-typed event with application/octet-stream MIME
- gateway/run.py already emits a context note with the cached path,
auto-translated via to_agent_visible_cache_path() for Docker/Modal
sandboxed terminals
- File body is NOT inlined — only the path — so binary uploads don't
blow up the context window
- Allowlisted text formats (.txt/.md/.log) keep their 100 KiB inline
behavior unchanged
Also adds discord.max_attachment_bytes (default 32 MiB matches the
historical hardcoded cap; 0 = unlimited) since users opting into arbitrary
types may want to raise the cap. The whole attachment is held in memory
while being cached, so unlimited carries a real memory cost.
Env overrides: DISCORD_ALLOW_ANY_ATTACHMENT, DISCORD_MAX_ATTACHMENT_BYTES.
Discord-only by deliberate scope. Telegram has hard 20 MB API limits and
Slack has its own caps — extending the same flag there is a separate
follow-up if/when requested.
|
||
|---|---|---|
| .. | ||
| _category_.json | ||
| bluebubbles.md | ||
| dingtalk.md | ||
| discord.md | ||
| email.md | ||
| feishu.md | ||
| google_chat.md | ||
| homeassistant.md | ||
| index.md | ||
| line.md | ||
| matrix.md | ||
| mattermost.md | ||
| msgraph-webhook.md | ||
| open-webui.md | ||
| qqbot.md | ||
| signal.md | ||
| simplex.md | ||
| slack.md | ||
| sms.md | ||
| teams-meetings.md | ||
| teams.md | ||
| telegram.md | ||
| webhooks.md | ||
| wecom-callback.md | ||
| wecom.md | ||
| weixin.md | ||
| whatsapp.md | ||
| yuanbao.md | ||