Skip to content

feat: host-side channel bridge architecture for all messaging integrations #618

@ericksoa

Description

@ericksoa

Summary

Messaging integrations (Discord, Slack, Telegram) should all follow the Telegram bridge pattern: run on the host, relay messages to the sandbox via OpenShell SSH. Credentials never enter the sandbox.

Current state

Integration Where it runs Token location Problems
Telegram Host (bridge script) Host only None — this is the target pattern
Discord Sandbox (OpenClaw plugin) Passed as sandbox env var Immutable config issues (#599, #606), can't update without recreate
Slack Sandbox (OpenClaw plugin) Passed as sandbox env var Same as Discord

Target state

All messaging integrations run as host-side bridges:

  1. Bridge process runs on the host with access to ~/.nemoclaw/credentials.json
  2. Connects to the messaging API directly (tokens never enter sandbox)
  3. Relays messages to the sandbox agent via OpenShell SSH
  4. Credentials can be changed anytime by restarting the bridge

This eliminates the entire class of problems around:

Existing work

Proposed approach

  1. Generalize telegram-bridge.js into a reusable bridge framework
  2. Add Discord bridge using the same pattern
  3. Add Slack bridge using the same pattern
  4. Remove Discord/Slack token passthrough from sandbox creation (no longer needed)
  5. Remove configWrites: False from Dockerfile (no longer needed)
  6. Update start-services.sh to manage all bridges
  7. Document host-side bridge as the canonical pattern for messaging integrations

Context

The current env-var-into-sandbox approach (#601, #616) was a narrow fix. This issue reframes the architecture to match what Telegram already does successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: integrationsThird-party service integration behaviorintegration: discordDiscord integration or channel behaviorintegration: telegramTelegram integration or channel behavior
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions