Repository navigation
fix(ai): Cap strands-agents-tools below 0.9 - #380
Open
dfkunstler wants to merge 1 commit into
Open
dfkunstler wants to merge 1 commit into
dfkunstler wants to merge 1 commit into
Conversation
strands-agents-tools 0.9.0 removed strands_tools.file_read and strands_tools.file_write. The package imports both at start, so a new install that resolves 0.9.0 stops with an ImportError before it does any work. The committed uv.lock pins 0.8.6, so it does not show the defect. Cap the range at <0.9 until the two wrapper tools move to the read and write tools in strands.vended_tools. Refs awslabs#379
This branch has not been deployed
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.
Issue # (if applicable)
Closes #379.
Reason for this change
strands-agents-tools0.9.0 (PyPI, 2026-11-04) removedstrands_tools.file_readandstrands_tools.file_write. The package imports both at start. A new install, such asuvx --from git+..., resolves 0.9.0 and the CLI and the MCP server stop with anImportErrorbefore they do any work. The committeduv.lockpins 0.8.6, so it does not show the defect.Description of changes
Set the limit
strands-agents-tools>=0.2,<0.9inpackages/threat-composer-ai/pyproject.toml, and update the matchingrequires-distline inuv.lock(one line).This is a short-term fix. The long-term fix moves
threat_composer_workdir_file_read.pyandthreat_composer_workdir_file_write.pytostrands.vended_tools. That change is larger: the vendedreadtool has no modes, globs or multi-path reads, so it changes what the agents can do and needs an eval run. It will be a separate pull request.I regenerated
uv.lockwith a newer uv than the repository used (lock revision 3 to 5), and it rewrote about 200 lines. I reverted that and edited the one specifier line by hand.uv lock --checkpasses.Describe any new or updated permissions being added
None.
Description of how you validated changes
uv lock --checkexits 0.uv run --no-project --no-config --refresh --with ./threat-composer-ai) resolvesstrands-agents-tools0.8.12, andthreat_composer_workdir_file_readandthreat_composer_workdir_file_writeimport.uv run --frozen pytest tests/tools: 39 passed.import strands_tools.file_readandimport strands_tools.file_writefail on 0.9.0 with theImportErrors in [BUG] threat-composer-ai fails at import because strands-agents-tools 0.9.0 removed strands_tools.file_read and file_write #379.nxtargets were not run; this changes no code.Checklist
type(scope): Subject. It becomes the commit message onmain.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.