fix(status): match branch-qualified cache for GitHub plugins#412
Merged
Conversation
`workspace status` looked up plugin caches by `<owner>-<repo>`, but `fetchPlugin`/`seedCacheFromClone` write to `<owner>-<repo>@<branch>` whenever the source URL pins a branch (e.g. /blob/main/...). The result was a false "not cached" right after a successful `skills add`. Plumb the parsed branch through `ParsedPluginSource` so `getPluginStatus` calls `getPluginCachePath` with the same branch the fetcher used. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying allagents with
|
| Latest commit: |
1340700
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8e59c2e4.allagents.pages.dev |
| Branch Preview URL: | https://fix-status-branch-cache.allagents.pages.dev |
Contributor
Author
E2E verification logFresh temp dir, same commands the user originally ran. Same cache state for both runs — only the CLI binary changes. Setup
repositories: []
plugins:
- source: https://github.com/NousResearch/hermes-agent/blob/main/skills/research/llm-wiki
skills:
- llm-wiki
clients:
- claude
version: 2Cache on disk (note the Before (allagents@1.11.9 from npm)After (this PR's build)Only the |
12 tasks
christso
added a commit
that referenced
this pull request
May 25, 2026
- Add formatPluginSource() helper that shortens GitHub URLs to OWNER/REPO, strips /blob/<default-branch>/, and preserves @<ref> for non-default refs. Used by `workspace status` and `skill list` output (display-only — the workspace.yaml source is preserved verbatim). - Recursively walk skills/ to find every SKILL.md, including nested layouts like skills/research/llm-wiki/SKILL.md. Each discovered skill carries its qualified subpath alongside the bare leaf name; the allowlist now matches either form so users can disambiguate with `category/skill` if needed. As a side effect, `skill add --list` no longer reports container dirs that lack a SKILL.md as fake skills. - Add npx-skills positional shape: when the positional argument to `skill add` looks like a GitHub source AND a selector (--skill, --list, --all) is provided, treat the positional as the source. Adds a --skill flag that accepts a comma-separated list for multi-skill installs. The legacy `--from`/deep-URL forms continue to work unchanged. - Update transform.copySkills() and collectPluginSkills() to use the same recursive walk so sync correctly copies nested skills referenced by the allowlist. Builds on #412.
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
workspace statusreported✗ not cachedfor any GitHub plugin whose source pins a branch (e.g./blob/main/...orowner/repo@v1), even immediately after a successfulskills add.parsePluginSourcediscarded thebranchfield returned byparseGitHubUrl, sogetPluginStatuscalledgetPluginCachePath(owner, repo)without it and looked at~/.allagents/plugins/marketplaces/<owner>-<repo>. ButfetchPlugin(src/core/plugin.ts:102,160) andseedCacheFromClone(src/core/workspace.ts:381) write to<owner>-<repo>@<branch>, so the existence check always missed.branch?: stringtoParsedPluginSource, populate it inparsePluginSource, and pass it through togetPluginCachePathingetPluginStatus. No other call sites needed changes — they already pass branch directly.Repro (before)
After the fix, the same command reports
✓ ... (cached).Test plan
bun test tests/unit/utils/plugin-path.test.ts tests/unit/core/status-both-scopes.test.ts— added one test forparsePluginSourcereturningbranchfrom a/blob/URL, one forowner/repo@refshorthand, and one regression test asserting status reportsavailable: trueagainst a branch-qualified cache dir.bun test— full suite (1285 pass, 4 skip, 0 fail).bun run typecheck— clean./blob/main/...source — status flipped from✗ not cachedto✓ cached.🤖 Generated with Claude Code