Vendor the server code into the Claude plugin folder - #23
Merged
Merged
Conversation
A directory install receives only client-plugin/, and the launcher found its code only in the release ZIP's server/src, so the server failed at import. The folder now carries client-plugin/server/src/plexus/, the same files the source ZIP ships. build_client_package.py --sync-vendored rewrites the copy from src/, the builder leaves it out of its input scan so nothing is counted twice, and a test fails when the copy drifts. The launcher refuses to start with a one-line message when the copy is missing. A test launches a copy of the folder alone with the exact Claude command. The icon moves to the 512 px render so every file stays under 256 KiB, and a test checks that limit and the 512-file limit. The skill description and the MCP tool descriptions now say "tool" where they said "organ". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The directory's 256 KiB per-file rule covers code and text, not images or fonts. The limits test now exempts image and font types and holds every file under 2 MB, so the 1024 px icon returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Problem
A directory install receives only
client-plugin/. The launcher loaded its code fromserver/src, which only the release ZIP contained, so an installed plugin failed at import.Changes
client-plugin/server/src/plexus/: the 11 modules the source ZIP ships underserver/src/, committed with LF endings.scripts/build_client_package.py:vendored()is the single selection used for both the ZIP and the committed copy.--sync-vendoredrewrites the copy fromsrc/and deletes stale files.client_entries()leaves the copy out of the client-plugin input scan, so the ZIP and the source hashes count it once.client-plugin/server/serve.py: whenserver/src/plexus/mcp.pyis missing, the launcher printsplexus: the server code is missing from the plugin folder. Reinstall the plugin.and exits 1.-I -S -Bbehavior is unchanged.goalparameter say "tool" where they said "organ". The skill text drops "installed", because the built-in manifests describe tools whether or not they are installed.Tests
test_vendored_server_code_matches_the_builder: fails on a missing, extra or changed file (CRLF normalized) and names the sync command. Controls: an appended line and an extra file each fail it.test_builder_counts_the_vendored_copy_oncetest_plugin_folder_alone_launches_with_the_claude_command: copies onlyclient-plugin/, runs the.mcp.jsoncommand withsys.executable, gets the six tool names, then removesserver/srcand checks the message and exit 1.test_plugin_folder_fits_the_directory_limits: at most 512 files, every code and text file under 256 KiB (images and fonts exempt), every file under 2 MB, no.gitattributesin the folder. The 1024 px icon (395,775 bytes) stays.Checks
python -m pytest -qpasses.examples/tour.pyandtools/check_repo_art.pypass.client-plugin/copied alone to an empty folder,initializeandtools/listpiped topython -I -S -B <folder>/server/serve.py: returnsplexus_discover,plexus_wiring,plexus_plan,plexus_route,plexus.status,plexus.doctor.claude plugin validate ./client-pluginpasses with the expected directory-field warnings.🤖 Generated with Claude Code