Channel Adapters
What you'll do
Inspect and configure Craik's first production channel boundaries for WebChat, Telegram, Discord, and Slack without storing provider tokens inside Craik config files.
Pair first, authorize second.
Every adapter normalizes messages into the same policy-bound messaging shape. Unknown senders remain denied until their external account is paired to an operator subject and matched by a channel allowlist.
Supported Adapters
WebChat
Local browser chat surface for dashboard-backed operator conversations.
Telegram
Bot-token adapter boundary for Telegram message updates.
Discord
Bot-token adapter boundary for Discord message events.
Slack
App-token adapter boundary for Slack event callbacks.
Each adapter declares the same capabilities:
channel.message.receivechannel.message.respond
Both capabilities require grants and receipts. Inbound message text and outbound response text are redacted from receipts.
Setup
List the adapter contracts:
craik channels list
Install the default channel artifacts and print a redacted setup plan:
craik channels setup telegram
The setup command requires an active operator session. It persists the adapter contract, an operator-bound bootstrap pairing, a deny-by-default allowlist, and a channel-scoped policy envelope, then reports the environment variable to use as a secret reference. It does not echo token material.
CRAIK_WEBCHAT_TOKENCRAIK_TELEGRAM_BOT_TOKENCRAIK_DISCORD_BOT_TOKENCRAIK_SLACK_BOT_TOKENRun diagnostics after adding a secret reference:
craik channels doctor slack
Diagnostics report whether the token resolves and whether the platform credential backend is secure. They also report whether setup artifacts exist in the local store. Diagnostics never print the token.
Fixture Validation
Normalize one provider event without contacting the provider:
craik channels normalize-fixture webchat '{"message_id":"m1","user_id":"u1","text":"hello"}'
Build an outbound response fixture and delivery receipt:
craik channels respond-fixture telegram telegram_10 response_1 "Queued response"
Use --failed to inspect the receipt emitted for provider delivery
failure.
Runtime Flow
- The adapter validates provider-specific payload shape.
- The payload is normalized into
channel = messagingwith provider-specificmetadata.service. - The sender external id is matched against a paired
ChannelIdentityPairing. - The event is evaluated against a deny-by-default
ChannelAllowlist. - A channel-scoped policy envelope allows only message receive, response, and receipt write capabilities.
- Inbound and outbound receipts preserve the policy id, event id, service, sender id, and redaction fields.