feat(send): [[plain]] directive + --plain flag for unformatted sends - #50048
Draft
arminanton wants to merge 3 commits into
Draft
feat(send): [[plain]] directive + --plain flag for unformatted sends#50048arminanton wants to merge 3 commits into
arminanton wants to merge 3 commits into
Conversation
Adds a `[[plain]]` message directive and a `--plain`/`-p` CLI flag that send with no parse_mode (no HTML/MarkdownV2), for status notifiers whose dynamic content legitimately contains `<placeholder>` tokens, commit messages, and markdown that would otherwise break formatting. tools/send_message_tool.py + hermes_cli/send_cmd.py.
…ll assertion The [[plain]]/--plain feature adds `plain`: getattr(args,'plain',False) to the send-message call dict, but test_positional_message_success still asserted the dict WITHOUT 'plain', so it failed on the PR branch. Add the expected 'plain': False.
arminanton
added a commit
to arminanton/hermes-agent
that referenced
this pull request
Jun 21, 2026
full_matrix_all_41_prs.sh + matrix.jsonl + per-PR logs/ + matrix-classified.json. Every open PR: rebase onto fresh v0.17.0 (38 clean + 2 documented-drift + 1 tracker), build OK (40/40), test = own/relevant-existing/justified-no-test. 5 test failures all classified; CAUGHT + FIXED a real NousResearch#50048 regression (send 'plain' field broke test_send_cmd not in its own diff). 3 justified no-test rationales.
The [[plain]]/--plain feature adds a force_plain kwarg to _send_to_platform and _send_telegram. Update test_send_message_tool.py's await assertions and the _send_telegram fake stub to include force_plain=False so the test file matches the new call signature (7 tests were asserting the old signature).
arminanton
added a commit
to arminanton/hermes-agent
that referenced
this pull request
Jun 22, 2026
…aught+fixed 2 real defects (NousResearch#50047 root-guard order, NousResearch#50048 force_plain test sig); xhigh test is overlay-only; clean-only failures are upstream bugs our PRs fix
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding an explicit escape hatch for Telegram text that must not be interpreted as HTML or MarkdownV2.
Problems
tools/send_message_tool.py:387adds the control path, but the PR has no test that exercises it. Its test changes only assert defaultforce_plain=False/plain=Falsevalues (tests/tools/test_send_message_tool.py:267,tests/hermes_cli/test_send_cmd.py:73); they do not verify--plain,[[plain]], literal<placeholder>text, orparse_mode=None.
Suggested changes
- Add focused CLI and Telegram-send tests for both entry points and the raw parse mode.
- Salvage against current main without restoring the PR branch's old Telegram pre-format chunk loop: current main passes the full message to
_send_telegramattools/send_message_tool.py:843-859so it can format and chunk safely.
Automated hermes-sweeper review.
| # (cron heartbeats, escalation alerts) whose dynamic content legitimately | ||
| # contains <placeholder> tokens, commit messages, and markdown metacharacters | ||
| # that the HTML/MarkdownV2 parsers misread and mangle. Stripped before send. | ||
| force_plain = args.get("plain", False) or "[[plain]]" in message |
Contributor
There was a problem hiding this comment.
Please add a focused test for [[plain]] with literal <placeholder> text that asserts the directive is stripped and Telegram receives the raw text with parse_mode=None; the current test changes cover only the default force_plain=False path.
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.
Adds a
[[plain]]message directive and a--plain/-pCLI flag that send with no parse_mode (no HTML/MarkdownV2), for status notifiers whose dynamic content legitimately contains<placeholder>tokens, commit messages, and markdown that would otherwise break formatting. tools/send_message_tool.py + hermes_cli/send_cmd.py.