Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7655.
delete_fileshadconfirm_deletion: bool = Truein its tool signature, so the model controlled the approval flag and the tool never used the framework human-in-the-loop confirmation gate. The flag has been removed and the tool now requires confirmation through the framework.Changes
confirm_deletionparameter and the early-return block fromsrc/google/adk/cli/built_in_agents/tools/delete_files.py.FunctionTool(delete_files, require_confirmation=True)insrc/google/adk/cli/built_in_agents/adk_agent_builder_assistant.py.confirm_deletion=Trueargument fromtests/unittests/cli/test_resolve_root_directory.py.tests/unittests/cli/test_delete_files.py, which verifies that the registered tool requires confirmation, that a model-suppliedconfirm_deletionargument cannot bypass the gate, and that an approved call still deletes the file.cleanup_unused_filesonly scans and does not delete, and no other write/delete tool used this flag.Tests
Result: 19 passed.
Fixes #7655