Skip to content

feat(simplex): groups, native attachments, text batching, auto-accept (salvage #27978) - #42584

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-75b24698
Jun 9, 2026
Merged

feat(simplex): groups, native attachments, text batching, auto-accept (salvage #27978)#42584
teknium1 merged 2 commits into
mainfrom
hermes/hermes-75b24698

Conversation

@teknium1

@teknium1 teknium1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Salvage of #27978 (@jooray) onto current main — the SimpleX plugin gains group chats, native attachments, inbound file/voice handling, MEDIA: dispatch, text batching, and auto-accept, all inside plugins/platforms/simplex/ with no core edits.

The PR branch was 1084 commits stale; main had independently fixed the bare-form DM addressing, added resp-envelope normalization, and quieted the health-monitor reconnect churn. Conflicts were resolved keeping main's fixes AND layering the contributor's features on top.

Changes

  • adapter.py: group support (SIMPLEX_GROUP_ALLOWED), inbound files/voice via rcvFileDescrReady/rcvFileComplete deferral, native send_image/send_voice/send_video/send_document via /_send … json, MEDIA:<path> strip+dispatch, text-burst batching, SIMPLEX_AUTO_ACCEPT. Group send uses structured /_send #<id> json (bracket #[<id>] is parsed as display-name lookup and silently drops).
  • plugin.yaml: 1.0.0 → 1.1.0, new env vars surfaced.
  • tests/gateway/test_simplex_plugin.py: test_send_dm/test_send_group updated to assert the bare-DM + structured-group forms.
  • website/docs/user-guide/messaging/simplex.md: documents the new env vars.
  • scripts/release.py: AUTHOR_MAP entry for jooray.

Validation

Path Result
pytest tests/gateway/test_simplex_plugin.py 28/28 pass
E2E DM send @Alice hi there (bare form)
E2E group send /_send #grp-99 json [...] (newlines/quotes escaped)
E2E group allowlist not-listed → ignored; listed → handled, chat_id=group:grp-99, chat_type=group
E2E contactRequest /accept 7
E2E rcvFileDescrReady immediate /freceive
E2E MEDIA: tag stripped from text body

Closes #27978. Original out-of-tree core-modifying version was #4870 (superseded by the plugin architecture).

Infographic

SimpleX plugin 1.1.0 — quest map

jooray and others added 2 commits June 8, 2026 20:40
Salvage of PR #27978 cherry-picked onto current main, resolving conflicts
with main's intervening SimpleX plugin fixes (resp-envelope normalization,
health-monitor reconnect-churn fix, bare-form DM addressing).

What's new:
- Group support via SIMPLEX_GROUP_ALLOWED (comma-separated IDs or '*');
  inbound items surface chat_id=group:<id> + chat_type=group. Disabled by
  default so a bot in a group doesn't process every member's traffic.
- Inbound files/voice via rcvFileDescrReady (immediate /freceive) deferred
  through _pending_file_transfers, replayed on rcvFileComplete. Voice notes
  -> MessageType.VOICE.
- Native outbound media: send_image (PNG/JPEG + inline thumbnail), send_voice
  (msgContent.type=voice), send_video, send_document. All addressed by numeric
  ID via /_send ... json [...].
- MEDIA:<path> tags in agent replies stripped and dispatched as voice/document.
- Text-burst batching (HERMES_SIMPLEX_TEXT_BATCH_DELAY, default 0.8s).
- Auto-accept contact requests (SIMPLEX_AUTO_ACCEPT, default true).
- Group send path uses structured /_send #<id> json form (the bracket
  #[<id>] form is parsed as display-name lookup and silently drops).

plugin.yaml bumped to 1.1.0; docs updated. All inside plugins/platforms/simplex/
- no core edits.

Co-authored-by: Juraj Bednar <juraj@bednar.io>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-75b24698 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10587 on HEAD, 10579 on base (🆕 +8)

🆕 New issues (8):

Rule Count
invalid-method-override 5
unresolved-import 2
invalid-argument-type 1
First entries
plugins/platforms/simplex/adapter.py:990: [invalid-method-override] invalid-method-override: Invalid override of method `send_video`: Definition is incompatible with `BasePlatformAdapter.send_video`
plugins/platforms/simplex/adapter.py:294: [unresolved-import] unresolved-import: Cannot resolve imported module `websockets.exceptions`
plugins/platforms/simplex/adapter.py:873: [unresolved-import] unresolved-import: Cannot resolve imported module `PIL`
plugins/platforms/simplex/adapter.py:436: [invalid-argument-type] invalid-argument-type: Argument to bound method `SimplexAdapter._handle_chat_item` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | None | dict[Unknown, Unknown]`
plugins/platforms/simplex/adapter.py:1033: [invalid-method-override] invalid-method-override: Invalid override of method `send_voice`: Definition is incompatible with `BasePlatformAdapter.send_voice`
plugins/platforms/simplex/adapter.py:1001: [invalid-method-override] invalid-method-override: Invalid override of method `send_document`: Definition is incompatible with `BasePlatformAdapter.send_document`
plugins/platforms/simplex/adapter.py:925: [invalid-method-override] invalid-method-override: Invalid override of method `send_image`: Definition is incompatible with `BasePlatformAdapter.send_image`
plugins/platforms/simplex/adapter.py:977: [invalid-method-override] invalid-method-override: Invalid override of method `send_image_file`: Definition is incompatible with `BasePlatformAdapter.send_image_file`

✅ Fixed issues (1):

Rule Count
invalid-argument-type 1
First entries
plugins/platforms/simplex/adapter.py:312: [invalid-argument-type] invalid-argument-type: Argument to bound method `SimplexAdapter._handle_new_chat_item` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | None | dict[Unknown, Unknown]`

Unchanged: 5556 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels Jun 9, 2026
@teknium1
teknium1 merged commit c3420d9 into main Jun 9, 2026
24 checks passed
@teknium1
teknium1 deleted the hermes/hermes-75b24698 branch June 9, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants