fix: replace clipboardy with native clipboard commands (#162) - #180
Merged
Conversation
clipboardy bundles clipboard_x86_64.exe and clipboard_i686.exe as Windows fallbacks, which enterprise Threat Intelligence systems flag as malicious binaries and block stitch-mcp installation in managed environments. Replace clipboardy with a small in-house module that pipes text to platform-native clipboard commands: - darwin: pbcopy - win32: clip.exe / clip - linux: wl-copy / xclip / xsel (in that order) The exported API (copyText, copyJson, downloadAndCopyText) is unchanged, so all callers swap their imports without further changes. clipboardy and @types/clipboardy are removed from package.json. npm pack confirms zero .exe files in the published tarball.
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.
Summary
clipboardy(and@types/clipboardy) from dependencies. It bundlesclipboard_x86_64.exeandclipboard_i686.exeas Windows fallbacks, which enterprise Threat Intelligence systems flag as malicious binaries and block stitch-mcp installation in managed environments (clipboard_x86_64.exe in clipboardy fallbacks flagged as Malicious Binary by Threat Intelligence #162).pbcopyon darwin,clip.exeon win32, andwl-copy/xclip/xsel(in that order) on linux.copyText,copyJson,downloadAndCopyText,downloadAndCopyImage) is unchanged; callers inchecklist.ts,AuthStep.ts, andScreensView.tsxswap imports without further changes.Fixes #162.
Test plan
bun test— 485 pass, 6 skip, 0 fail (no new skips)npx tsc --noEmit— zero new errors in touched files (only pre-existing test-file errors)bun scripts/verify-pack.ts— cleannpm packtarball contains zero.exefilescopyText→pbpasteround-trip worksclip.exeround-tripxclip/wl-copyround-trip