Skip to content

Providers

Steven Enamakel edited this page Oct 22, 2026 · 2 revisions

Providers

src/providers/ contains portable provider modules. The public exports are centralized from src/lib.rs and src/providers/mod.rs. The shared v2 ChannelAdapter API is available, but most built-in providers still implement the legacy Channel trait; provider-by-provider migration and conformance coverage remain in progress.

Exported Providers

Provider Export
DingTalk DingTalkChannel
Discord DiscordChannel
Email EmailChannel
iMessage IMessageChannel
IRC IrcChannel, IrcChannelConfig
Lark LarkChannel
Linq LinqChannel, verify_linq_signature
Mattermost MattermostChannel
QQ QQChannel
Signal SignalChannel
Slack SlackChannel
WhatsApp WhatsAppChannel
Yuanbao YuanbaoChannel

Provider Shapes

TinyChannels supports several provider shapes:

  • lean direct providers that implement Channel
  • richer providers that consume ProviderContext and host capabilities
  • providers with optional adapter traits for setup, directory, typing, reaction, edit, delete, or draft streaming support
  • relay-backed connectors that project normalized intents into relay actions

Provider work should normalize platform-specific events into ChannelInboundEnvelope as early as possible and convert outbound work into ChannelOutboundIntent before delivery or relay projection.

Controller Registry

The setup UI registry currently exposes definitions for:

  • Telegram
  • Discord
  • Web
  • iMessage
  • Lark
  • DingTalk
  • Email
  • Yuanbao

That registry is intentionally smaller than the config/provider set. Some config-backed providers remain hidden until their setup flows are promoted into ChannelDefinition metadata.

Provider Implementation Checklist

When adding or porting a provider:

  1. Add provider configuration to src/config.rs if needed.
  2. Add or update a provider module under src/providers/.
  3. Export the provider from src/providers/mod.rs and src/lib.rs only if it is part of the public API.
  4. Normalize inbound platform events into ChannelInboundEnvelope.
  5. Build outbound sends as ChannelOutboundIntent or preserve legacy SendMessage idempotency through ChannelSendExt.
  6. Return MessageReceipt where the provider can identify platform message ids.
  7. Advertise honest capabilities.
  8. Add setup metadata to src/controllers/definitions.rs only when the UI flow is ready.
  9. Add focused tests for serialization, routing, delivery, and provider edge cases.

Rich Provider Rule

If a provider needs harness turns, speech, approvals, history, events, shutdown, or telemetry, use ProviderContext::host. Do not import OpenHuman application modules into TinyChannels provider code.

Capability Claims

Do not infer support from the provider name or from a legacy capability flag. V2 adapters must report one ChannelCapabilities value for the configured account. Declare only behavior that the account can perform, including direction-specific content and voice support, events, addressing, actions, and delivery guarantees. Every declared capability must have conformance coverage. The current v2 contract and the distinction between implemented and target behavior are documented in the contract specification.

V2 Adapter Migration Snapshot

This source audit is pinned to TinyChannels 41443ee0 (the canonical main revision that introduced the v2 provider-ownership foundation). It is a snapshot, not generated conformance output: the direct provider modules do not yet publish v2 account descriptors for a conformance runner to consume.

Provider Direct implementation V2 adapter / conformance
DingTalk legacy Channel not migrated / not certified
Discord legacy Channel not migrated / not certified
Email legacy Channel not migrated / not certified
iMessage legacy Channel not migrated / not certified
IRC legacy Channel not migrated / not certified
Lark legacy Channel not migrated / not certified
Linq legacy Channel not migrated / not certified
Mattermost legacy Channel not migrated / not certified
QQ legacy Channel not migrated / not certified
Signal legacy Channel not migrated / not certified
Slack legacy Channel not migrated / not certified
Telegram legacy Channel not migrated / not certified
WhatsApp legacy Channel not migrated / not certified
WhatsApp Web legacy Channel not migrated / not certified
Yuanbao legacy Channel not migrated / not certified

“Not certified” means this revision has no built-in provider ChannelAdapter implementation with a v2 ChannelCapabilities declaration and conformance result. It does not mean the provider lacks the listed feature in its legacy implementation. Replace this snapshot with conformance-kit output when the provider migration lands; do not hand-convert legacy feature flags into v2 claims.

TinyChannels

Channel and messaging contracts for OpenHuman.

Getting started

Concepts

Modules

Contributing


Clone this wiki locally