[codex] Fix Signal document attachments - #7445
Closed
cameronbergh wants to merge 1 commit into
Closed
Conversation
Collaborator
Collaborator
|
Thanks for this. Closing as stale — the branch is ~8731 commits behind main and the Signal adapter has been substantially rewritten since, so the diff no longer applies cleanly and would revert intervening work (inbound document classification already exists on main; the diff touches ~2129 files). The underlying idea is welcome — if it's still relevant on current main, a fresh PR against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This fixes inbound Signal file attachments so Hermes can actually use them during conversations.
application/*andtext/*attachments asDOCUMENT.mdand.txtdirectly into prompt contextgetAttachmentbytesWhy this changed
On the current Signal path, image and audio attachments worked, but document attachments were effectively dropped from the useful prompt path.
Two issues caused that:
MessageType.DOCUMENT, so the later document-enrichment flow never ran.This meant sending a
.mdfile over Signal often produced an empty or unhelpful response even though the file arrived.Impact
Users can now send small markdown or text files to Hermes over Signal and have Hermes read them as part of the message context. Other document attachments are preserved as documents with usable saved paths and filenames.
This also makes the Signal behavior consistent with the existing Slack and Discord document handling patterns.
Validation
python3 -m pytest -o addopts='' /Users/openclaw/.hermes/hermes-agent/tests/gateway/test_signal.py64 passedNotes
I observed existing
signal-cligetAttachmentnull-pointer errors in local logs. This change reduces reliance on that path by using the local attachment path when Signal already provides one.