fix: make a marketplace install actually work - #10
Merged
Conversation
Two things were broken for anybody installing this the documented way.
**The install command could not work.** setup and install.sh both printed
`claude plugin install vta-agent-memory`, which resolves only against
*configured* marketplaces — so it fails with 'not found in any configured
marketplace' until the marketplace is added. It needs two commands, and
the qualified name:
claude plugin marketplace add OpenVTC/vta-agent-memory
claude plugin install vta-agent-memory@vta-agent-memory
**And the install produced a plugin that could not run.** .mcp.json and
hooks.json invoke ${CLAUDE_PLUGIN_ROOT}/bin/vta-agent-memory. When
installed from a marketplace that directory is a fresh git clone — and
bin/ was gitignored, because it held a copied build artifact. So the MCP
server and the hook both pointed at a file that does not exist. Verified
against the real installed copy at
~/.claude/plugins/marketplaces/vta-agent-memory: no bin/ at all.
bin/vta-agent-memory is now a committed shell shim that execs the real
binary — $VTA_AGENT_MEMORY_BIN, then ~/.cargo/bin, then a local target/,
then PATH. install.sh does `cargo install` instead of copying.
The shim's exit code differs by subcommand, because its two callers have
opposite contracts: `recall` exits 0 so a missing binary never fails a
session at start-up, everything else exits 1 so it fails loudly.
CI gains three guards, since this is a class of breakage the Rust build
cannot see: the shim is tracked, executable, and mode 100755; and every
${CLAUDE_PLUGIN_ROOT} path in the manifests resolves in a clean checkout.
Signed-off-by: Glenn Gore <glenn.gore@gmail.com>
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.
Two things were broken for anybody installing this the documented way.
1. The install command could not work
setupandinstall.shboth printed:installresolves against configured marketplaces, so it needs two commands and the qualified name:Verified — both now succeed.
2. …and the install produced a plugin that could not run
.mcp.jsonandhooks/hooks.jsoninvoke${CLAUDE_PLUGIN_ROOT}/bin/vta-agent-memory. When installed from a marketplace that directory is a fresh git clone — andbin/was gitignored, because it held a copied build artifact.So the MCP server and the SessionStart hook both pointed at a file that does not exist. Verified against the real installed copy:
The plugin installs, reports "enabled", and does nothing.
The fix
bin/vta-agent-memoryis now a committed shell shim that execs the real binary:$VTA_AGENT_MEMORY_BIN, then~/.cargo/bin, then a localtarget/, thenPATH.install.shdoescargo installinstead of copying intobin/.Its exit code differs by subcommand, because the two callers have opposite contracts:
with a message naming the fix.
CI guards
The Rust build cannot see any of this, so three checks were added:
bin/is ever gitignored again, CI fails rather than the plugin silently doing nothing${CLAUDE_PLUGIN_ROOT}path in.mcp.jsonandhooks.jsonresolves in a clean checkout, which is exactly what a marketplace install isTesting
cargo test— 84 pass, clippy clean, fmt clean. Shim behaviour verified in an isolated directory with no binary reachable. New CI steps dry-run locally.claude plugin marketplace add+installverified end to end against the real repo.