Skip to content

fix: pin SDK version and auto-build dist on install - #52

Open
lsimpsonsfdc wants to merge 1 commit into
lacymorrow:mainfrom
s4solutionsllc:upstream/fix-install-build-sdk-pin
Open

lsimpsonsfdc wants to merge 1 commit into
lacymorrow:mainfrom
s4solutionsllc:upstream/fix-install-build-sdk-pin

Conversation

@lsimpsonsfdc

Copy link
Copy Markdown
Contributor

Summary

Installing this plugin from a git ref or local path (isLocalPath: true) currently fails or produces a broken install, for two related reasons:

  • @paperclipai/plugin-sdk is pinned to latest in package.json/lockfiles. This makes installs non-reproducible — two installs on different days can silently resolve different SDK versions, and a breaking SDK release can brick existing installs with no way to pin back. Pinned to the current release, 2026.722.0.
  • There is no prepare script, so dist/ is never built when installing from a git ref or local path (only npm publish triggers prepublishOnly). Consumers installing via { "packageName": "/path/to/paperclip-plugin-agent-usage", "isLocalPath: true }" (documented in this repo's own README) get a plugin with no dist/manifest.js / dist/worker.js, which fails to load in Paperclip.

Both were found while debugging repeated install failures against a self-hosted Paperclip instance.

How to test

rm -rf node_modules dist
npm install        # prepare script now builds dist/ automatically
npm run typecheck
npm run build
npm test

Checklist

  • npm run typecheck passes
  • npm run build produces dist/manifest.js + dist/worker.js
  • Updated the README if a public option or agent tool changed — n/a, no public option or tool changed
  • PR is focused (one logical change)

Installing from npm or a local path failed because "latest" for
@paperclipai/plugin-sdk is unpinned (breaks reproducible installs) and
there was no prepare script, so dist/ was never built for consumers
installing from a git ref or local path.
@lacymorrow

Copy link
Copy Markdown
Owner

This one needs a rebase: Dependabot #48 just bumped the lockfiles to 2026.722.0 on main, so bun.lock and package-lock.json conflict now. The parts that still matter after that merge are the package.json pin itself (main still says "latest") and the prepare script for git/local installs. Both are worth keeping. If you rebase down to those, happy to re-review.

@lacymorrow

Copy link
Copy Markdown
Owner

Audit-hold (LAC-3664 / LAC-3656) — Security Engineer review.

Status: HELD, not merged.

Reasons:

  1. Stale — needs a full rebase. Owner asked for a rebase on 2026-08-11 (nearly 4 weeks ago) after Dependabot chore(deps): bump @paperclipai/plugin-sdk from 2026.517.0 to 2026.722.0 #48 bumped the lockfiles to 2026.722.0. Since then Dependabot has bumped the SDK again — main is now at 2026.824.1 (just merged via chore(deps): bump @paperclipai/plugin-sdk from 2026.817.0 to 2026.824.1 #60), so this PR's pin to 2026.722.0 is now doubly stale. Both bun.lock and package-lock.json will conflict.
  2. The valuable parts still survive a rebase and are worth keeping if you want to rework this: (a) pinning package.json @paperclipai/plugin-sdk off of "latest" — main still uses "latest", which is the underlying complaint here; (b) the "prepare": "npm run build" script so git/local installs build dist/ on install.
  3. No security concerns in the current diff — pure lockfile/package.json pins plus a lifecycle hook that already exists in ecosystem norms.

Unblock path: rebase onto current main, refresh the pin to the current SDK version (or drop the lockfile pin and keep just the package.json change + prepare script), then ping for re-review. If no update in the next audit sweep, this should be closed as abandoned and the two useful bits picked up in a fresh internal PR.

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