Skip to content

v0.35.0 — Telegram inline approval buttons

Choose a tag to compare

@OneStepAt4time OneStepAt4time released this 27 May 17:27
· 8 commits to main since this release

Highlights

Closes the approve-from-your-phone loop CHARTER §3 promises.

v0.27.0 added a Telegram notification when a Claude Code session hits a
tool-permission prompt. You still had to open the dashboard to approve.
Not anymore. The notification now ships with [✓ Allow] / [✕ Deny]
buttons directly in the Telegram chat:

Polaris — approval needed

Session: abc123def456
cwd: /Users/you/my-project
Tool: Bash

[ ✓ Allow ]  [ ✕ Deny ]

Tap a button → SessionManager.respondToApproval fires within seconds,
the agent unblocks, Telegram acks with Allowed by @yourname. No
browser round-trip required.

How it works

Step Component
Send Allow/Deny on message Telegram channel emits reply_markup.inline_keyboard
Receive callback_query New telegram-poller.ts long-polls getUpdates
Resolve approval Server handler matches truncated id prefixes against live SessionManager state
Respond SessionManager.respondToApproval
Ack answerCallbackQuery writes "Allowed by @user" toast

callback_data length is capped at 64 bytes by Telegram — IDs are
truncated to 16-char prefixes (still 2^64 entropy per pair, collision
probability ~10^-15 at realistic load).

Long-polling, not webhook

Self-hosted MVP can't require a public URL. getUpdates with
timeout=30s is the same approach the official Bot SDK uses by default
and works behind NAT.

Setup

No new env var. If POLARIS_TELEGRAM is set the poller starts
automatically alongside the existing channel. No bot config changes
needed — buttons just work on the next approval-needed tick.

Image

docker pull ghcr.io/onestepat4time/polaris:0.35.0
docker pull ghcr.io/onestepat4time/polaris:latest

What's changed

  • feat(channels): Telegram inline Allow/Deny buttons + callback poller (#86)
  • fix(telegram): truncate ids in callback_data to fit 64-byte cap (#86)

Full changelog: v0.34.0...v0.35.0