Skip to content

feat: Add safety approval before executing any command - #6

Merged
edenreich merged 4 commits into
mainfrom
claude/issue-5-20250810-1438
Aug 10, 2025
Merged

edenreich merged 4 commits into
mainfrom
claude/issue-5-20250810-1438

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Implements the safety approval system requested in issue #5.

Summary

Adds a comprehensive safety approval system that prompts users before executing any command with three dropdown options:

  • Yes: Execute this command
  • Yes, and don't ask again: Execute this and all future commands
  • No: Cancel command execution

Changes

  • Add RequireApproval configuration setting in tools.safety
  • Implement interactive approval prompt with session-based tracking
  • Integrate approval system into ToolEngine.ExecuteBash method
  • Add new CLI commands for safety management
  • Update documentation with new configuration options
  • Safety approval enabled by default for security

Testing

  • All safety commands tested and working
  • Build, format, and lint checks pass
  • Configuration management verified

Fixes #5

Generated with Claude Code

claude Bot and others added 3 commits August 10, 2025 14:43
- Add RequireApproval configuration setting in tools.safety
- Implement interactive approval prompt with three options:
  - Yes: Execute this command  
  - Yes, and don't ask again: Execute this and all future commands
  - No: Cancel command execution
- Add session-based approval tracking to avoid repeated prompts
- Integrate approval system into ToolEngine.ExecuteBash method
- Add new CLI commands:
  - `infer tools safety status`: Show current safety approval status
  - `infer tools safety enable`: Enable safety approval requirement
  - `infer tools safety disable`: Disable safety approval requirement
- Update documentation with new safety configuration options
- Safety approval is enabled by default for security

Co-authored-by: Eden Reich <[email protected]>
@edenreich

Copy link
Copy Markdown
Contributor Author

@claude You didn't update the README.md with the information of this feature.

@claude

claude Bot commented Aug 10, 2025 •

Copy link
Copy Markdown
Contributor

Claude finished @edenreich's task —— View job


I've successfully updated the README.md with comprehensive documentation for the safety approval system.

Todo List

  • Read current README.md structure
  • Review safety feature implementation details
  • Add safety approval documentation to README.md
  • Commit changes to PR branch

What was added to the README:

Configuration Section:

  • Added tools.safety.require_approval configuration option with description
  • Updated the default configuration example to include the safety settings

Tool Commands:

  • Documented new infer tools safety command and subcommands:
    • infer tools safety enable - Enable safety approval prompts
    • infer tools safety disable - Disable safety approval prompts
    • infer tools safety status - Show current safety approval status

Security Features:

  • Added "Safety Approval System" to the tool security features list
  • Updated the tool usage example to show the interactive approval prompt

Troubleshooting:

  • Added troubleshooting section for safety approval prompts
  • Included commands to manage safety settings

Examples:

  • Added safety management commands to the tool management examples
  • Updated the interactive chat example to demonstrate the approval flow

The documentation now provides complete coverage of the safety approval feature, making it easy for users to understand and configure this security enhancement.


- Add tools.safety.require_approval configuration option
- Document new safety management CLI commands
- Update tool security features section
- Include interactive safety approval example
- Add troubleshooting section for safety prompts

Co-authored-by: Eden Reich <[email protected]>
@edenreich
edenreich merged commit ba5fd7e into main Aug 10, 2025
@edenreich
edenreich deleted the claude/issue-5-20250810-1438 branch August 10, 2025 17:36
inference-gateway-releaser Bot pushed a commit that referenced this pull request Aug 10, 2025
## [0.3.0](v0.2.0...v0.3.0) (2025-08-10)

### 🚀 Features

* Add safety approval before executing any command ([#6](#6)) ([ba5fd7e](ba5fd7e)), closes [#5](#5) [#5](#5)
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add safety approval before executing any command

1 participant