@open-neko/channel-telegram
v0.4.0
Published
Telegram channel for OpenNeko: delivers the agent's Briefing, findings, and approvals to a Telegram chat, and turns replies + inline-button taps back into agent intents. Bidirectional. Runs in a microsandbox VM with network egress limited to api.telegram.
Downloads
875
Readme
@open-neko/channel-telegram
A channel for OpenNeko — a frontend, like Slack or the built-in web app, but talking to a Telegram chat. It is bidirectional: it delivers the agent's Briefing, findings, and approvals to a chat, and turns replies and inline-button taps back into agent intents.
Unlike an action plugin (which the agent calls to do one thing), a channel
sits at the Interaction Protocol waist: the
agent emits modality-free InteractionEvents for an audience, and this plugin
projects them into Telegram's native shape inside its sandbox VM.
What it does
| RPC | Direction | Behaviour |
|---|---|---|
| deliver | OpenNeko → Telegram | Projects InteractionEvent[] → sendMessage calls (HTML; an ask becomes an inline keyboard). |
| parse_inbound | Telegram → OpenNeko | Normalizes a Telegram Update (button tap / message / /command) → IntentEvent[]. |
| verify_inbound | Telegram → OpenNeko | Constant-time check of the X-Telegram-Bot-Api-Secret-Token webhook header. |
The capability profile it declares: text modality, Markdown, inline buttons
(interactiveControls + canApproveInline + quickReplies), 4096-char limit,
push attention — richer than WhatsApp, leaner than the web dashboard.
Setup
- Create a bot with @BotFather → get the bot token.
- Install the channel and set the token:
openneko install @open-neko/channel-telegram openneko secrets set @open-neko/channel-telegram TELEGRAM_BOT_TOKEN 123456789:AA… - Inbound — either:
- Long-poll (no public URL): a worker-side poller calls
getUpdatesand feeds eachUpdatetoparse_inbound; or - Webhook: register
https://<deployment>/channels/@open-neko%2Fchannel-telegram/inboundwith asecret_token, and setTELEGRAM_WEBHOOK_SECRETto the same value soverify_inboundcan authenticate it.
- Long-poll (no public URL): a worker-side poller calls
Dry-run
If TELEGRAM_BOT_TOKEN is unset at exec time, deliver still projects the
payload and writes it to stderr, returning { delivered: false, ref: "dry-run:N" }
— so the projection can be exercised locally with no bot and no network.
Network
Egress is limited to api.telegram.org by the manifest; the sandbox blocks
everything else.
