Skip to content

refactor(scripts): share plugin packaging across hosts - #42

Merged
lauridskern merged 6 commits into
mainfrom
refactor/plugin-scripts
Oct 27, 2026
Merged

lauridskern merged 6 commits into
mainfrom
refactor/plugin-scripts

Conversation

@grabbou

@grabbou grabbou commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Stacked on #40.

Claude and Cursor each had their own config, package and smoke scripts, and most of each pair was copied from the other. This replaces those 6 scripts with 3 that take the host as an argument (claude or cursor), plus a small host table:

  • scripts/plugin-hosts.mjs: what differs per host (manifest folder, plugin-root variable, config snippet and where it goes, and the Claude Desktop MCPB bundle), plus the shared lists of documents and Codex-only paths.
  • scripts/package-plugin.mjs: builds the host plugin folder, and the MCPB bundle when the host has one.
  • scripts/smoke-plugin.mjs: the plugin-folder check plus the MCPB check for Claude Desktop.
  • scripts/plugin-config.mjs: writes the local config snippet.

What stays the same: npm command names (package:claude, test:cursor, claude:config, …), so CONTRIBUTING and CI need no changes. Output paths are also unchanged. Every check the old smoke scripts ran is still there. Two small additions:

  • The Claude plugin smoke test now also runs in development and checks the chat fallback, as Cursor's already did.
  • Each plugin is checked for the absence of the full Codex-only list, plus the other hosts' manifest folders.

Adding another host is now a manifest plus one table entry. The diff is 199 lines added and 280 removed.

Testing: npm run build, then package:claude, test:claude, package:cursor, test:cursor, claude:config and cursor:config all pass. The generated snippets match the old output.

🤖 Generated with Claude Code

Replace the per-host config, package and smoke scripts for Claude and
Cursor with one script per job that takes the host as an argument.
Host differences (manifest folder, plugin-root variable, config snippet,
Claude Desktop MCPB bundle) live in scripts/plugin-hosts.mjs. npm
command names, output paths and the checks each smoke test ran are
unchanged; the Claude plugin smoke test now also covers development and
the chat fallback, matching Cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grabbou
grabbou requested a review from lauridskern October 24, 2026 09:54
The shared plugin scripts move to tooling/ and build from the shared runtime;
apps/claude and apps/cursor keep only their manifests and icons. The smoke test
checks the shared server has no Codex updater, and compares hosts by name when
checking for other hosts' manifests.
Each plugin host app declares its manifest folder, plugin root, desktop
bundle and config snippet in plugin-host.json, and tooling/plugin-hosts.mjs
finds them, so adding a host is adding an app. The documents every package
ships move to host-runtime.mjs, shared with the Codex package.
Brings in the store-based Codex updater (#51): the shared plugin smoke test
checks for any Codex plugin_ tool and the store banner.
@lauridskern
lauridskern changed the base branch from feat/cursor to main October 27, 2026 15:29
@lauridskern
lauridskern merged commit cc993e6 into main Oct 27, 2026
6 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.

2 participants