Skip to content

feat(bot-mode): share files across autonomous Group Chats - #96789

Closed
dokterdok wants to merge 39 commits into
NousResearch:mainfrom
dokterdok:feat/roomlink-group-chat-files-20260828
Closed

dokterdok wants to merge 39 commits into
NousResearch:mainfrom
dokterdok:feat/roomlink-group-chat-files-20260828

Conversation

@dokterdok

Copy link
Copy Markdown
Contributor

What this fixes

Group Chats can keep working after Desktop closes, including when their Bots
live on different Hermes gateways. Files were the missing part: a screenshot,
PDF, or document could not follow that work across gateways, so the same Group
Chat behaved differently depending on where its Bots happened to run.

This change makes file sharing part of autonomous Group Chats. Attach once in
the normal composer and every Bot selected for that message receives the same
verified file on its own gateway before its turn starts. No proprietary cloud
or public download URL sits between them.

If one gateway is too old, Hermes keeps the draft and names the gateway that
needs an update. It never drops the file, sends a text-only substitute, or
quietly gives only some Bots the attachment.

User flow

  1. Create a Group Chat with Bots from one or several gateways.
  2. Add an image, PDF, or file by picker, paste, or drag and drop.
  3. Send it with text or as an attachment-only message.
  4. Close Desktop if the Group Chat is autonomous. Its gateways keep running
    the same turn and the file remains available from room history.

The ordinary one-gateway and Desktop-driven paths keep their existing UX.

How the safety boundary works

  • The Group Chat's home gateway stores the canonical bytes and freezes the
    recipients when the message is accepted.
  • It pushes each authorized Bot's bytes to that Bot's gateway before run
    admission, using a short-lived room/member/profile-scoped grant.
  • The run identity commits to the ordered file manifest. A missing, changed,
    partial, or replayed batch cannot start a different run.
  • Upload retries are idempotent. Redirects are rejected so neither file bytes
    nor the scoped grant can be forwarded elsewhere.
  • Room history carries only opaque file ids and bounded metadata. It never
    carries bytes, local paths, API keys, or public URLs.
  • Revocation removes the scoped target spool; bounded expiry remains the crash
    backstop.

Text-only RoomLink remains compatible with older gateways. File sharing is
enabled only after every participating gateway advertises the complete binary
contract.

Stack

This is the file-sharing increment on top of the autonomous Group Chat stack:

The commits stay separated so the same-gateway storage/UI work can be reviewed
or cherry-picked without the cross-gateway transfer.

Related: #89995 tracks gateway-hosted Group Chats. #89758 independently adds a
file-manager reveal affordance for data-URL attachment chips; this stack keeps
its transport and lazy viewer separate and should rebase onto that final chip
surface if it lands first.

Validation

Current implementation-head checks:

  • 242 focused Python tests passed across storage, grants, API runs, driver,
    service, stop/restart, and two-gateway scoped transport
  • 680 Desktop Bot Mode plugin tests passed
  • Desktop TypeScript checks passed
  • Ruff and git diff --check passed
  • concurrent retry/conflict stress coverage: 16 same-content writers and 12
    conflicting writers converge without partial blobs

Before moving out of draft, the stack will also receive:

  • full Python and affected frontend lanes on current main
  • adversarial security/lifecycle review with no open P1/P2 finding
  • real UAT for Desktop-driven, one-gateway, same-network multi-gateway, and
    separate-network multi-gateway Group Chats
  • image, PDF, generic file, attachment-only, reply, restart, offline/reconnect,
    duplicate delivery, stop, history, preview, and download checks with hashes
  • light/dark and narrow/wide visual QA, with a full-app screenshot and focused
    attachment-state crops

Deliberate boundaries

This does not create public file URLs, a general gateway file API, new network
topology, or a cloud relay. It does not change Group Chat ownership or speaker
policy. General attachment-chip presentation remains compatible with the
ongoing #89758 work.

dokterdok and others added 30 commits August 27, 2026 18:01
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/plugins Plugin system and bundled plugins comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have needs-decision Awaiting maintainer decision before any implementation sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 28, 2026
@dokterdok

Copy link
Copy Markdown
Contributor Author

Closing this cumulative prototype now that #97681 captures the user contract, safety boundaries, and phased landing plan against the rebuilt Bot Mode tree. Its useful layer can be re-cut as a narrow current-main contribution after the foundation direction is agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/desktop Electron desktop app (apps/desktop/*) comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins comp/tui Terminal UI (ui-tui/ + tui_gateway/) needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants