From c831ccb36693ccc744c30531912880a3c5cd7fdc Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 17 Jul 2026 18:30:00 -0700 Subject: [PATCH] fix(cli): ship registry manifest and pi-llama-cpp extension in npm package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tarball-completeness audit found two more assets stripped from the published package: dist/pi-llama-cpp (staged by tsup, matched no files glob — useLlamaCpp silently reported not-installed) and the dashboard's registry-manifest.json (resolved beside the bundled bin.js by plugin-routes but never staged into cli dist — published installs served an empty plugin registry). Stage the manifest in tsup onSuccess and add both to files; npm pack --dry-run now lists them. Co-Authored-By: Claude Fable 5 --- .../cli-tarball-registry-and-llama-assets.md | 7 +++++++ packages/cli/package.json | 2 ++ packages/cli/tsup.config.ts | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 .changeset/cli-tarball-registry-and-llama-assets.md diff --git a/.changeset/cli-tarball-registry-and-llama-assets.md b/.changeset/cli-tarball-registry-and-llama-assets.md new file mode 100644 index 0000000000..56a0272fb7 --- /dev/null +++ b/.changeset/cli-tarball-registry-and-llama-assets.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Ship the plugin registry manifest and llama.cpp extension in the published npm package. +category: fix +dev: "Tarball-completeness audit follow-ups to the migrations fix: (1) dist/pi-llama-cpp was staged by tsup but matched no files glob, so useLlamaCpp silently reported not-installed in every published build — added dist/pi-llama-cpp/** to files. (2) dashboard plugin-routes resolves ./registry-manifest.json beside the bundled bin.js but it was never staged into the CLI dist, so published installs served an empty plugin registry — tsup now stages it from packages/dashboard/src and files includes dist/registry-manifest.json." diff --git a/packages/cli/package.json b/packages/cli/package.json index 9f4ea172af..023a254bf6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -34,9 +34,11 @@ "dist/**/*.d.ts.map", "dist/**/*.js.map", "dist/migrations/**", + "dist/registry-manifest.json", "dist/client/**", "dist/desktop/**", "dist/pi-claude-cli/**", + "dist/pi-llama-cpp/**", "dist/droid-cli/**", "dist/plugins/**", "skill/**", diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts index 6681ded875..32e0ae8890 100644 --- a/packages/cli/tsup.config.ts +++ b/packages/cli/tsup.config.ts @@ -424,6 +424,22 @@ const cliBuildConfig = { ); } + /* + FNXC:CliPackaging 2026-07-17-19:55: + The dashboard's plugin-registry route resolves ./registry-manifest.json next to the + bundled server (new URL relative to import.meta.url in plugin-routes.ts), i.e. + dist/registry-manifest.json beside bin.js after bundling. It was never staged into + the CLI dist, so every published install served an empty plugin registry with a + warning. Stage it from the dashboard source of truth in both fast and full modes. + */ + const registryManifestSrc = join(__dirname, "..", "dashboard", "src", "registry-manifest.json"); + if (existsSync(registryManifestSrc)) { + cpSync(registryManifestSrc, join(__dirname, "dist", "registry-manifest.json")); + console.log("Copied registry-manifest.json to dist/"); + } else { + console.warn(`WARNING: registry manifest not found at ${registryManifestSrc}; plugin registry will be empty.`); + } + /* FNXC:CliPackaging 2026-07-15-03:25: Fast local packaging: migrations + optional dashboard client copy only. Skip desktop ensure-build, multi-plugin esbuild staging, and assertAllStagedBundledPluginsLoadable — those dominate CPU/wall time and are only needed for published artifacts. Prior staged dist/plugins/desktop is left in place if present so a previous full build remains usable.