@claxedo/channels
@claxedo/channels is the framework glue for running Claxedo sessions from chat-shaped systems — GitHub, Telegram, Slack, Discord, WhatsApp, and local fake transports. It handles inbound command parsing, session resolution, runtime message forwarding, approval prompts, and reply rendering. It deliberately does not authenticate provider webhooks itself: the caller or mounted transport must verify signatures, secrets, and scopes before invoking the channel core.
Install
Section titled “Install”npm install @claxedo/channelsQuickstart
Section titled “Quickstart”Wire a channel core with an authorize hook and in-memory stores:
import { createChannelCore, createMemoryDedupStore, createMemorySessionResolver, type ChannelRuntime,} from "@claxedo/channels"
declare const runtime: ChannelRuntime // your session/prompt runtime binding
const core = createChannelCore({ runtime, dedup: createMemoryDedupStore(), sessions: createMemorySessionResolver(runtime), authorize: async (envelope) => { if (envelope.channel !== "github") return { ok: false, message: "Unsupported channel." } if (envelope.repo?.owner !== "acme") return { ok: false, message: "Repository is not linked." } return { ok: true } },})The authorize hook runs before deduplication and session creation — use it to bind provider identities to workspace permissions and least-privilege channel policy.
Key capabilities
Section titled “Key capabilities”- Core —
createChannelCorehandles inbound commands, session resolution, runtime forwarding, approvals, and replies over sharedInboundEnvelope/OutboundChunkcontracts. - Ingress —
createChannelsIngressmounts Hono routes and delegates enabled provider routes to a caller-provided bot/transport;createChannelRegistrydrives env-based registration. - Provider helpers —
githubWebhookEnvelope+verifyGitHubWebhookSignature,telegramUpdateEnvelope, and Baileys WhatsApp personal-mode transport glue. - Memory stores —
createMemoryDedupStore,createMemorySessionResolver,createMemoryApprovalBridgeare single-process helpers; use durable storage for multi-instance deployments.
Trust model
Section titled “Trust model”Full API
Section titled “Full API”See the README on GitHub for the full export table, per-provider security notes, and trust-model details.