Repository navigation
feat(tools): add excluded_tools to stop linking into tools you never run - #19
Merged
Merged
Conversation
`CodingTool::is_installed` only checks that a tool's config directory exists, so any directory another program owns makes a tool look installed. `~/.gemini` is the worst case: Antigravity keeps it live, so gemini-cli always registers and `sync` pulls its links back in even after `manage unlink` removes them. On one machine that was 781 links across five tools that had never been run. Add `excluded_tools` to `Config` and filter it in `installed_tools()`, the single choke point every linking path already goes through. The list is read once per process via `OnceLock` because some callers invoke `installed_tools()` inside a loop. `agentspec tools` reported excluded tools as installed, which directly contradicts its own promise to answer "why isn't agentspec touching X". It now marks them with a dim marker and prints a count.
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
CodingTool::is_installedonly checks that a tool's config directory exists. Any directory another program owns therefore makes a tool look installed, and there is no way to tell agentspec otherwise.~/.geminiis the worst case. Antigravity keeps it live, sogemini-clialways registers as installed.manage unlinkremoves its links and the nextsyncputs them straight back, as real file copies. On one machine that was 781 links across five tools that had never been run (cline, windsurf, openhands, cursor, gemini-cli), out of 1,327 total.Deleting the directories is not a fix:
~/.geminiholds 1GB of live Antigravity data.excluded_tools: Vec<String>toConfigand filter it ininstalled_tools(), the single choke point all 12 linking callers already route through. Read once per process viaOnceLock, since some callers invokeinstalled_tools()inside a loop.tools::is_excluded(slug).agentspec toolsreported excluded tools as installed. Its own doc comment says the table exists to answer "why isn't agentspec touching X", so this contradicted the command's stated purpose. It now marks them and prints a count.Usage:
Test plan
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test(152 passing, including two new cases covering a populated and an empty exclusion list)sync --fastruns with zero drift. Before the change the same sync re-added 462 links.