Skip to content

Release v1.0.3: File Edit Functions Safety Enhancement

Choose a tag to compare

@jwesleye jwesleye released this 31 Oct 20:51
· 34 commits to main since this release

🔒 Safety & Confirmation Enhancements

This hotfix release adds user confirmation and preview features to file editing functions for improved safety in agent environments.

Added

  • skip_confirm parameter to append_to_file, insert_at_line, and replace_in_file
  • Preview generation showing operation details before execution
  • Three-mode confirmation system:
    • Bypass mode (skip_confirm=True or BYPASS_TOOL_CONSENT env var)
    • Interactive mode (TTY terminal prompts with preview)
    • Agent mode (raises CONFIRMATION_REQUIRED error for LLM agents)
  • Enhanced logging:
    • Debug-level input logging (file paths, content previews, parameters)
    • Info-level operation success logging
    • Error logging with context

Changed

  • All file edit functions now require explicit skip_confirm parameter (no default)
  • Updated all tests to use skip_confirm=True
  • Added confirmation requirement tests for agent mode behavior

Documentation

  • Updated CLAUDE.md with new functions requiring skip_confirm
  • Updated agent test instructions with confirmation requirements

🤖 Generated with Claude Code