Skip to main content

Channels Reference

This page is the canonical reference for channel catalog status, config blocks, secret references, access policy fields, doctor checks, live-smoke readiness, and reload semantics. Per-channel setup pages should link here instead of repeating field tables.

Setup And Operation Loop

Use the same loop for every implemented channel:

anyy setup channels CHANNEL --write-config
anyy channels doctor CHANNEL
anyy gateway start
anyy channels reload

setup writes config and stores supplied secrets. doctor checks local readiness. gateway start runs the adapters. channels reload asks a running gateway to apply edited channel config without a full restart.

Implemented Channels

The runtime channel catalog currently marks these channels as implemented:

ChannelLabelAliases
telegramTelegramtg
discordDiscord-
slackSlack-
whatsappWhatsAppwa
facebookFacebook Messengerfacebook_messenger, messenger, meta
emailEmailimap, smtp
smsSMS (Twilio)twilio, sms_twilio
dingtalkDingTalkding_talk
feishuFeishu / Larklark
weixinWeixin / WeChatwechat, weixin_wechat
qqbotQQ Botqq, qq_bot
ircIRC-
lineLINE-

These catalog entries are planned but do not have registered runtime adapters:

ChannelLabel
yuanbaoYuanbao
google_chatGoogle Chat

Doctor reports planned channels as configured/planned rather than pretending they can deliver messages.

Capability Matrix

Capabilities come from the registered channel descriptors. They describe what the runtime adapter advertises; platform setup and access policy can still block a specific conversation or delivery path.

ChannelTransportConversationsThreadsInbound mediaOutbound mediaTypingLive smoke
telegrampollingDM, groupsNoYesNoYesYes
discordlifecycle/socketDM, groupsYesYesNoNoYes
slacklifecycle/socketDM, groupsYesYesNoNoYes
whatsapppollingDM, groupsNoYesNoYesYes
facebookwebhookDMNoYesNoYesYes
emailpollingmailboxYesNoNoNoYes
smswebhookDMNoNoNoNoYes
dingtalklifecycle/socketDM, groupsNoNoNoNoYes
feishulifecycle/websocket, webhook fallbackDM, groupsYesYesNoNoYes
weixinpollingDMNoYesimage, video, audio, voice, fileYesNo
qqbotlifecycle/socketDM, groupsNoNoNoNoYes
irclifecycle/socketDM, groupsNoNoNoNoYes
linewebhookDM, groupsNoNoNoNoYes

Channel Config Blocks

Channel blocks live under channels.<name> in config.yaml. Common fields:

FieldMeaning
enabledWhether the gateway should run the adapter.
account_idLocal label for the platform account/bot. Often used in identity and secret paths.
dm_policyDirect-message access policy.
group_policyGroup/channel access policy when the adapter supports group conversations.
allow_fromAllowed sender/user IDs for allowlist policies.
allow_groupsAllowed group/channel IDs for allowlist group policies.
send_chunk_charsMaximum outgoing text chunk size for adapters with message-size limits.
media_max_bytesMaximum inbound media download size for adapters that fetch media.

Recommended setup/default-mode fields by channel:

ChannelRequired config fieldsRequired secret refsOptional secret refs
telegram-token_ref-
discord-bot_token_ref-
slack-bot_token_refapp_token_ref
weixin-token_ref-
dingtalkclient_idclient_secret_ref-
qqbotapp_idclient_secret_ref-
facebookpage_idpage_access_token_refwebhook_verify_token_ref, app_secret_ref
emailaddress, imap_host, smtp_hostpassword_ref-
irchost, nick-password_ref
smsaccount_sid, from_numberauth_token_ref-
line-channel_access_token_ref, channel_secret_ref-
whatsapp--bridge_token_ref
feishuapp_idapp_secret_reftenant_access_token_ref, verification_token_ref, encrypt_key_ref

Use anyy setup channels CHANNEL --write-config where available; it writes the block and stores supplied secrets in profile-local secret files.

The table follows the documented setup path and the default adapter mode. Some adapter parsers accept narrower blocks, but setup-generated config is the recommended operational baseline.

Secret References

Channel secret fields accept the standard secret ref scheme:

RefMeaning
secret:path/nameRead <home>/secrets/path/name.
env:NAMERead environment variable NAME.
file:/path/to/fileRead an arbitrary file.
literal:valueUse the literal value. Avoid for real credentials.

Doctor checks the secret refs known to its local channel probe. Missing refs that the probe marks required fail the channel's doctor check. Optional refs are checked when present.

A passing doctor result does not prove every adapter mode can authenticate. For example, the documented Feishu websocket setup needs app_id and app_secret_ref.

warning

Do not paste platform tokens into channel docs, chat messages, screenshots, or issue reports. Store them as secret: refs or inject them with service-manager environment.

Access Policies

Access policies are adapter-owned strings, but implemented channel setup uses these common values:

PolicyMeaning
openAccept messages from anyone the platform delivers to the adapter.
allowlistAccept only IDs listed in allow_from or allow_groups.
pairingAccept already-paired identities.
mentionIn groups, respond only when the bot is mentioned or otherwise addressed.
disabledReject that conversation type.

Not every adapter uses every policy. Check the channel's setup page for the recommended policy and platform-specific identity format.

Access policy is channel-level authorization. It does not change Anyy's tool permissions, provider credentials, or profile boundaries.

Live Smoke Checks

anyy channels doctor CHANNEL reports live-smoke readiness, but the doctor itself does not contact external platform APIs. It reports whether a real live test would have enough environment to run.

The gate for all live tests is:

ANYY_LIVE_CHANNEL_TESTS=1

When the required channel-specific variables are also set, the live-smoke plan reports ready and prints the Go test command, such as:

ANYY_LIVE_CHANNEL_TESTS=1 go test ./internal/channels/telegram -run TestLive -count=1

Use live smoke only with test accounts or safe platform targets.

Reload Semantics

Channels run inside the resident gateway. After editing channel config, either restart the gateway or request a channel reload:

anyy channels reload --home ~/.anyy
anyy channels reload --home ~/.anyy --json

Reload applies channel configuration to the running gateway through the local socket. If the gateway is not running, start it first:

anyy gateway start --home ~/.anyy