Skip to content

Conversation

@aamar-shahzad
Copy link

Added comprehensive delete_file functionality to the filesystem middleware:

  • Implemented _delete_file_tool_generator with full support for both short-term (state) and long-term (store) memory
  • Added DELETE_FILE_TOOL_DESCRIPTION and longterm memory supplement
  • Updated FILESYSTEM_SYSTEM_PROMPT to include delete_file
  • Added delete_file to TOOL_GENERATORS dictionary
  • Updated FilesystemMiddleware docstring (four -> five tools)

Test coverage:

  • test_delete_file_shortterm: Tests deletion from ephemeral state
  • test_delete_file_longterm: Tests deletion from persistent store
  • test_delete_file_not_found_shortterm: Error handling for missing files
  • test_delete_file_not_found_longterm: Error handling in longterm memory
  • Updated assert_longterm_mem_tools and assert_shortterm_mem_tools helpers

Documentation:

  • Updated README.md to mention delete_file in Core Capabilities
  • Updated FilesystemMiddleware section with new tool listing

The implementation follows existing patterns and provides feature parity with other filesystem tools including path validation, error handling, and support for custom descriptions.

Added comprehensive delete_file functionality to the filesystem middleware:

- Implemented _delete_file_tool_generator with full support for both
  short-term (state) and long-term (store) memory
- Added DELETE_FILE_TOOL_DESCRIPTION and longterm memory supplement
- Updated FILESYSTEM_SYSTEM_PROMPT to include delete_file
- Added delete_file to TOOL_GENERATORS dictionary
- Updated FilesystemMiddleware docstring (four -> five tools)

Test coverage:
- test_delete_file_shortterm: Tests deletion from ephemeral state
- test_delete_file_longterm: Tests deletion from persistent store
- test_delete_file_not_found_shortterm: Error handling for missing files
- test_delete_file_not_found_longterm: Error handling in longterm memory
- Updated assert_longterm_mem_tools and assert_shortterm_mem_tools helpers

Documentation:
- Updated README.md to mention delete_file in Core Capabilities
- Updated FilesystemMiddleware section with new tool listing

The implementation follows existing patterns and provides feature parity
with other filesystem tools including path validation, error handling,
and support for custom descriptions.
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.

1 participant