feat: add optional permission notification hook for AFK mode
Added optional hook that sends Telegram notifications when Claude requests tool permissions, solving the issue where users in AFK mode don't get notified about pending permission prompts. Features: - Self-contained hook in hooks/PermissionRequest.sh - Easy installation script (scripts/install-hook.sh) - Opt-in per project - users choose where to install - Sends Telegram alert with tool name and description - Shows ⏸️ warning icon for permission requests Installation: Users can now run ./scripts/install-hook.sh from any project to enable permission notifications. The hook integrates with the existing InnerVoice bridge. Documentation: - Added "Optional: Install Permission Notification Hook" section - Includes installation and uninstallation instructions - Example notification message format This keeps InnerVoice self-contained while allowing users to opt-in to enhanced AFK mode notifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
24
README.md
24
README.md
@@ -224,6 +224,30 @@ This is perfect for:
|
||||
|
||||
The toggle state is preserved while the bridge is running, and you'll get a Telegram message confirming each change.
|
||||
|
||||
#### Optional: Install Permission Notification Hook
|
||||
|
||||
By default, AFK mode only sends notifications when Claude explicitly uses notification tools. If you want to receive Telegram alerts when **permission prompts** appear (so you know Claude is waiting for approval), install the permission hook:
|
||||
|
||||
```bash
|
||||
# From the innervoice directory
|
||||
cd /path/to/innervoice
|
||||
|
||||
# Install in a specific project
|
||||
./scripts/install-hook.sh /path/to/your/project
|
||||
|
||||
# Or install in current directory
|
||||
cd /path/to/your/project
|
||||
/path/to/innervoice/scripts/install-hook.sh
|
||||
```
|
||||
|
||||
This will send you a Telegram message like:
|
||||
> ⏸️ **Claude needs permission**
|
||||
> **Tool:** `Bash`
|
||||
> **Action:** Check scraped sets files
|
||||
> Check your terminal to approve or deny.
|
||||
|
||||
**To uninstall:** Simply delete `.claude/hooks/PermissionRequest.sh` from your project.
|
||||
|
||||
### 8. Verify Global Setup
|
||||
|
||||
After adding the MCP server, verify it's available globally:
|
||||
|
||||
Reference in New Issue
Block a user