Skip to content

Vendor the server code into the Claude plugin folder - #23

Merged
HarperZ9 merged 2 commits into
mainfrom
claude/vendor-server-code
Oct 2, 2026
Merged

HarperZ9 merged 2 commits into
mainfrom
claude/vendor-server-code

Conversation

@HarperZ9

@HarperZ9 HarperZ9 commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

A directory install receives only client-plugin/. The launcher loaded its code from server/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 under server/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-vendored rewrites the copy from src/ 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: when server/src/plexus/mcp.py is missing, the launcher prints plexus: the server code is missing from the plugin folder. Reinstall the plugin. and exits 1. -I -S -B behavior is unchanged.
  • F7: the skill description and the four MCP tool descriptions and the goal parameter say "tool" where they said "organ". The skill text drops "installed", because the built-in manifests describe tools whether or not they are installed.
  • README install text explains the vendored copy and the missing-copy message. CHANGELOG Unreleased entry.

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_once
  • test_plugin_folder_alone_launches_with_the_claude_command: copies only client-plugin/, runs the .mcp.json command with sys.executable, gets the six tool names, then removes server/src and 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 .gitattributes in the folder. The 1024 px icon (395,775 bytes) stays.

Checks

  • python -m pytest -q passes. examples/tour.py and tools/check_repo_art.py pass.
  • Fresh clone of this branch, client-plugin/ copied alone to an empty folder, initialize and tools/list piped to python -I -S -B <folder>/server/serve.py: returns plexus_discover, plexus_wiring, plexus_plan, plexus_route, plexus.status, plexus.doctor.
  • claude plugin validate ./client-plugin passes with the expected directory-field warnings.

🤖 Generated with Claude Code

HarperZ9 and others added 2 commits October 1, 2026 19:07
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>
@HarperZ9
HarperZ9 merged commit 1ff54bf into main Oct 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant