Skip to content

feat(gateway): Google Chat channel adapter + pluggable platform hooks (Hermes v0.13 parity) #315

@subinium

Description

@subinium

Background

Hermes v0.13 (#21306, #21331) — Google Chat ships as the 20th messaging platform. Alongside it, generic env_enablement_fn and
cron_deliver_env_var platform-plugin hooks turn the gateway into a true plugin host (IRC and Teams migrated to use the new surface).

Current state in CrowClaw

  • packages/gateway/src/channel-registry.ts ships Telegram, Discord, Slack, WhatsApp, Signal, Matrix, Mattermost — 7 channels.
  • No plugin surface for adding channels; every new channel requires editing channel-registry.ts.
  • v0.8.2 feat(gateway): WhatsApp and Signal channel adapters (Hermes parity) #283 added WhatsApp + Signal as new entries in the registry — the pluggable surface is missing.

Scope

  • New: packages/gateway/src/platform-plugin.tsPlatformPlugin ABC with env_enablement_fn, cron_deliver_env_var, send, receive
  • New: packages/gateway/src/channels/google-chat.ts — Google Chat impl via Chat API + webhook
  • Modified: channel-registry.ts — discover registered platforms via plugin registry
  • Tests: tests/google-chat-channel.test.ts, tests/platform-plugin-registry.test.ts

Implementation sketch

  1. PlatformPlugin { name, displayName, enabledByEnv(env: Record<string,string>): boolean, cronDeliveryEnvVar: string, build(config) -> ChannelAdapter }
  2. Existing channels (Telegram, Discord, etc.) refactored to register through this surface — behavior unchanged
  3. Google Chat plugin: OAuth (service-account or user), incoming webhook handler, outbound message via chat.googleapis.com/v1/spaces
  4. Threading: Google Chat supports threads — preserve thread_name across restarts (parity with #20160)
  5. Card v2 support for tool-call result rendering

Acceptance criteria

  • Google Chat space configured → agent receives messages, replies in thread
  • Plugin registry enumerated by crowclaw channels list
  • Existing channels (Telegram, Discord, etc.) all work after refactor (no regression)
  • Third-party plugin example (packages/gateway/examples/example-platform/) demonstrates external registration

Effort

L — pluggable surface refactor + new channel impl. Could be split into "pluggable surface" + "Google Chat impl" if needed.

Effect

Lays the groundwork for downstream channels (Teams, Yuanbao — sibling issues) to land as plugins. Without this, every new channel is a
channel-registry.ts merge conflict and a core-team review.

Source

Hermes #21306, #21331 · CrowClaw current: packages/gateway/src/channel-registry.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority/warningReal cost / risk; fix when scheduledsource/hermesPattern from NousResearch/hermes-agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions