Add session grant buttons to Telegram approval keyboard (fixes #230) - #231
Open
yablokolabs wants to merge 1 commit into
Open
Add session grant buttons to Telegram approval keyboard (fixes #230)#231yablokolabs wants to merge 1 commit into
yablokolabs wants to merge 1 commit into
Conversation
yablokolabs
force-pushed
the
fix/telegram-approval-grant-buttons
branch
from
August 22, 2026 20:32
db9cd95 to
cbaca21
Compare
The TUI approval prompt supports granting a category (s) or shell command shape (a) for the remainder of the session, but the Telegram inline keyboard only offered Approve (y) and Deny (n). This forced Telegram users to re-approve every command individually even for repeated safe operations. Add two new inline keyboard rows when applicable: - "Grant category for session" (s) — uses existing canGrantCategory() - "Grant <shape> for session" (a) — uses existing canGrantShape() The ApprovalGate already supports grant scopes via recordGrant(); this change simply wires the bridge callbacks to pass them through resolve(). Fixes AtomicBot-ai#230
yablokolabs
force-pushed
the
fix/telegram-approval-grant-buttons
branch
from
August 22, 2026 20:34
cbaca21 to
f3abe05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TUI approval prompt supports granting a category (
s) or shell command shape (a) for the remainder of the session, but the Telegram inline keyboard only offered Approve (y) and Deny (n). This forced Telegram users to re-approve every command individually even for repeated safe operations.Changes
buildKeyboard()now accepts the fullApprovalRequestand conditionally adds:srow ("Grant category for session") whencanGrantCategory()returns truearow ("Grant<shape>for session") whencanGrantShape()returns truehandleCallback()now parsess/acallback kinds and passes the matchinggrantscope throughApprovalGate.resolve()Impact
recordGrant,canGrantCategory,canGrantShape) — no new logic, just new buttons reaching existing codeappr:<id>:s/appr:<id>:a)Closes #230