fix: installer symlinks, agent selection, and detection refinements#297
fix: installer symlinks, agent selection, and detection refinements#297quuu merged 10 commits intovercel-labs:mainfrom
Conversation
This commit: 1. Prevents 'skills add' from hanging on invalid/private repos by disabling git terminal prompts. 2. Refines agent detection for antigravity, copilot, opencode, and replit to reduce false positives.
|
Hey @qual1337, I've put together a few fixes for common CLI annoyances:
Tested these locally and they seem to make the experience much smoother. Let me know if you need any adjustments! |
…symlinked agent dirs This fixes a bug where installing a skill would fail (or delete existing data) if the agent's skill directory was a symlink to the canonical .agents/skills location. By using realpath for comparison, we correctly identify when paths resolve to the same location even if their string representations differ due to symlinks.
This fixes vercel-labs#65 by removing the forced inclusion of universal agents when --agent is explicitly specified in handleRemoteSkill. It also ensures consistent behavior across all installation handlers by calling ensureUniversalAgents in all auto-selection paths.
|
I've updated this PR to include two additional critical fixes:
These are now included in the same branch/PR along with the previously mentioned detection refinements. All tests are passing. |
Fixes vercel-labs#287 by checking if any remaining installed agents are still using the target skill before removing its canonical storage. The first removal loop now also correctly avoids deleting the canonical storage directly.
|
Hey @qual1337, I've updated this PR with several more fixes and a new test for the removal protection logic. All 284 tests are passing! Let me know if you'd like any adjustments. |
|
@Ashutosh0x looks like only 2 fixes are in here?
|
|
@quuu Apologies for the confusion! It looks like I pushed the previous updates to my other fork by mistake, so the PR didn't reflect the new commits. I've just force-pushed the correct branch to this PR. It now contains all 5 fixes as described:
All 284 tests are passing. Let me know if you need any further adjustments! |
|
@quuu I have pushed an additional refinement to this PR. I noticed your feedback on #284 regarding the Antigravity path—I have updated it to This PR now addresses 6 issues: #58, #186, #284, #293, #287, and #65. It provides a comprehensive set of CLI improvements and detection refinements. @Ashutosh0x I am tagging you here for visibility. The PR is ready for further review. |
|
@quuu I have pushed one more update! I noticed your comment on #257 regarding the desire for a non-symlink installation method. This PR now also includes a new
Total issues addressed in this PR: 7 (#58, #186, #284, #293, #287, #65, #257). All tests are passing. Ready for your review! |
|
@quuu I've pushed even more updates! I've now addressed a total of 9 issues in this PR. New additions in this latest push:
Total issues addressed in this PR: 9 (#58, #186, #284, #293, #287, #65, #257, #294, #61). All tests are passing. I believe this covers almost all the currently open regression bugs and high-priority CLI refinements. Ready for a final review! |
|
hey @Ashutosh0x if you can resolve the merge conflicts, this looks ready to merge! |
|
@quuu Done! I've resolved the merge conflicts and fixed a small build issue that popped up during the merge. It's all set and ready for another look! |
src/agents.ts
Outdated
| name: 'antigravity', | ||
| displayName: 'Antigravity', | ||
| skillsDir: '.agent/skills', | ||
| skillsDir: '.agents/skills', |
There was a problem hiding this comment.
based on https://antigravity.google/docs/skills
looks like it's still .agent ?
|
Verified all tests pass (304/304). Corrected antigravity path to .agent/skills and resolved Windows environment issues (timeouts and path handling). |
Pull Request: fix installer symlinks, agent selection, and removal protection
Fixes #58
Fixes #186
Fixes #293
Fixes #65
Fixes #287
Changes
1. Fix Symlink Installation Bug (#293)
Modified
src/installer.tsto userealpathfor path comparisons increateSymlink. This ensures that when an agent's skills directory is a symlink to the canonical.agents/skillslocation, the installer doesn't accidentally delete the canonical data while trying to "clean" the link path.2. Fix Canonical Storage Protection on Removal (#287)
Updated
src/remove.tsto check if any other installed agents are still using a skill before deleting its canonical storage in.agents/skills. Previously, removing a skill from one agent would delete the source files even if other agents were still using them via symlinks.3. Fix Explicit Agent Choice (#65)
Updated
src/add.tsand unified handler logic to respect the--agentflag. Universal agents are no longer forced into the installation list when a specific agent is explicitly requested.4. Prevent hangs on invalid/private Git repos (#58)
Modified
src/git.tsto setGIT_TERMINAL_PROMPT: '0'. This preventsgit clonefrom hanging indefinitely by waiting for credential prompts.5. Refine agent detection logic (#186)
Narrowed down the
detectInstalledlogic forantigravity,github-copilot,opencode, andreplitto avoid false positives from common directories like.github.Verification Results
Symlink Bug (#293)
Verified with a reproduction script that creating a symlink where the target is already reached via another symlink no longer deletes the target files.
Removal Protection (#287)
Added a new test
tests/remove-canonical.test.tsthat verifies:Agent Selection (#65)
Verified that
skills add vercel-labs/skills --agent claude-codeinstalls ONLY to Claude and doesn't force other agents.All Tests
Ran
pnpm testand verified all 284 tests pass.