channel-telegram
Run and operate a Telegram channel worker for LionClaw using the kernel channel bridge APIs.
Telegram Channel Worker
Use this skill when the user wants Telegram as a LionClaw channel.
What you run:
- start LionClaw in service mode,
- run the Telegram worker,
- let it bridge Telegram traffic into LionClaw.
Under the hood, the worker:
- polls Telegram updates,
- posts inbound text to
/v0/channels/inboundand treats the response as queued work, not completed work, - long-polls
/v0/channels/stream/pull, - starts Telegram typing from kernel queue/runtime status events and coalesces
answerdeltas into provider-facing Telegram replies, - advances its consumer cursor through
/v0/channels/stream/ack.
Prerequisites
curljq- Telegram bot token with DM access
- LionClaw running (default
http://127.0.0.1:8979)
Setup
- Register the skill and channel:
lionclaw skill add skills/channel-telegram --alias telegram
lionclaw channel add telegram
- Start LionClaw for background channels:
lionclaw service up --runtime codex
- Run the worker script:
TELEGRAM_BOT_TOKEN=... \
LIONCLAW_BASE_URL=http://127.0.0.1:8979 \
./skills/channel-telegram/scripts/worker.sh
Notes
- LionClaw enforces peer pairing (
pending->approvedvia/v0/channels/peers/approve). peer_idis Telegramchat.idserialized as string.- The worker defaults
consumer_idtotelegram:<channel_id>andstart_mode=resume, so undelivered stream events are replayed after worker restart. - Telegram delivery is message-oriented by default: typing while a turn is active, final answer on
done, no reasoning lane delivery. - Runtime selection normally comes from
lionclaw service up --runtime ....LIONCLAW_RUNTIME_IDis an optional per-worker override for low-level testing. - The worker stores Telegram offset in
.lionclaw-telegram-offsetby default.