Skip to content

Conversation

@riatzukiza
Copy link
Contributor

Summary

  • Add optional cwd parameter to bash tool allowing users to specify working directory for commands
  • Enables running commands in specific subdirectories without needing cd commands
  • Maintains security by restricting access to within project directory
  • Includes comprehensive test coverage and updated documentation

Why this change

Users previously had to use cd commands or absolute paths to run commands in specific directories, which was cumbersome and could lead to working directory confusion. The new cwd parameter provides precise control over command execution location while maintaining the existing security model.

Changes

  • Added cwd parameter to bash tool schema with validation
  • Updated spawn execution to use validated working directory
  • Enhanced documentation with usage examples
  • Added comprehensive test coverage for all scenarios

Summary by CodeRabbit

Release Notes

  • New Features

    • Added working directory parameter for bash commands, enabling execution in specific project directories with validation to ensure commands stay within the project scope.
  • Improvements

    • Enhanced markdown file parsing with centralized error handling and clearer error messages.
  • Documentation

    • Updated command execution guides with examples demonstrating the new working directory functionality.

Users can now specify a working directory for bash commands using the cwd parameter, allowing commands to run in specific subdirectories without needing cd commands. This provides more precise control over where commands execute while maintaining security by restricting access to within the project directory.
…ommand-paths

fix: resolve bash tool path validation relative to cwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants