Skip to content

feat(gateway): add clearer Telegram command approval decision prompts - #33190

Closed
hellodoggo wants to merge 1 commit into
NousResearch:mainfrom
hellodoggo:feat/telegram-approval-decision-copy
Closed

feat(gateway): add clearer Telegram command approval decision prompts#33190
hellodoggo wants to merge 1 commit into
NousResearch:mainfrom
hellodoggo:feat/telegram-approval-decision-copy

Conversation

@hellodoggo

Copy link
Copy Markdown

Summary

  • Reframes Telegram command approval prompts as plain-English decision cards.
  • Preserves the existing approval enforcement path; this does not change whether commands are allowed, denied, scoped, or checked.
  • Keeps the raw command visible under optional technical details.
  • Adds best-effort risk/context framing for common command shapes:
    • read-only web/API data fetched and parsed locally
    • GitHub repo fetch/clone for inspection
    • remote content piped into a shell/interpreter
    • destructive, config-editing, service-control, script, and multi-action shell commands
  • Includes targeted tests for the prompt copy and existing inline approval-button flow.

Why

Manual approval prompts are easier to answer when they explain the action type and likely risk in user-facing language. Broad safety detectors can flag both low-risk data parsing and high-risk remote code execution; this prompt copy helps users distinguish those cases without weakening the actual approval gate.

Implementation notes

  • The command-trait helper is UX-only and explicitly not a security boundary.
  • Existing command approval enforcement remains in the approval/Tirith path.
  • Telegram inline button behavior is unchanged.
  • Raw command details remain visible for users who want to inspect the exact command.
  • This starts with Telegram because the Telegram adapter already owns this inline approval prompt; the formatter can be shared later if other gateways need the same copy.

Test plan

python -m pytest tests/gateway/test_telegram_approval_buttons.py -q

Result locally:

23 passed in 1.19s

Reframe Telegram command approval prompts as a plain-English decision card while preserving the existing approval enforcement path.

The prompt keeps the raw command visible, adds risk/context copy for common command shapes, and distinguishes read-only data parsing from remote script execution.

Includes targeted Telegram approval prompt tests.
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter P3 Low — cosmetic, nice to have labels May 27, 2026
@hellodoggo
hellodoggo marked this pull request as ready for review May 27, 2026 11:13
@hellodoggo
hellodoggo marked this pull request as draft May 27, 2026 12:19
@hellodoggo hellodoggo closed this by deleting the head repository Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants