diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-18 00:09:05 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-18 00:09:05 -0500 |
| commit | 133df9a099785b5eabb5ad19bcd7daa33eff9afe (patch) | |
| tree | 600ea108ceca9a3aad2579a4b0227c77a68dc632 /Omni/Agent/Subagent/DESIGN.md | |
| parent | b5337a6c08b500cd3e603a48f8dfdb4772420929 (diff) | |
Add Telegram button confirmation for subagent spawning
Security improvement: subagents now require explicit user confirmation via
Telegram inline buttons, preventing the agent from bypassing approval.
Changes:
- Add InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery types
- Add parseCallbackQuery for handling button presses
- Add sendMessageWithKeyboard and answerCallbackQuery API functions
- Add PendingSpawn registry for tracking unconfirmed spawn requests
- Add spawnSubagentToolWithApproval that sends approval buttons
- Add handleCallbackQuery to process approve/reject button clicks
- Add approveAndSpawnSubagent and rejectPendingSpawn functions
Flow:
1. Agent calls spawn_subagent → creates pending request
2. User receives message with ✅ Approve / ❌ Reject buttons
3. Button click (outside agent loop) spawns or cancels
4. Pending requests expire after 10 minutes
Diffstat (limited to 'Omni/Agent/Subagent/DESIGN.md')
0 files changed, 0 insertions, 0 deletions
