Skip to content

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

Open
grabbou wants to merge 1 commit into
feat/cursorfrom
refactor/plugin-scripts
Open

grabbou wants to merge 1 commit into
feat/cursorfrom
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
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