Skip to content

fix(server): ship the plugin catalog in released bundles - #458

Open
leoisadev1 wants to merge 2 commits into
mainfrom
leoplayz317/akr-222-released-remote-servers-crash-while-loading-the-plugin
Open

leoisadev1 wants to merge 2 commits into
mainfrom
leoplayz317/akr-222-released-remote-servers-crash-while-loading-the-plugin

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Released Akeru servers crash outside the source tree because the package omits the plugin catalog. Every server bundle now carries the manifests and logos inside dist, and the loader checks that location before the existing repository and desktop fallbacks.

node_modules/akeru-bot/dist/
├── bin.mjs
├── service-launcher.mjs
└── plugins/entries/<plugin>/
    ├── plugin.json
    └── logo assets

The portable copy step runs after both bundle commands. npm, the remote installer archives, Docker, and desktop already carry the whole dist directory. Includes a patch changeset.

Evidence

Before: a built npm tarball installed outside the repo failed with:

exit=1
Error: Akeru plugin catalog directory is unavailable.
    at loadNodeCatalogModules (.../node_modules/akeru-bot/dist/bin.mjs:625576:25)

After: built the full server/web distribution, packed it with the publish metadata, and installed it into a temporary npm prefix. Then ran serve with a disposable home and a free loopback port:

PASS npm-after: free port 40071, discovery HTTP 200,
installed CLI imports and lists 54 plugins
PASS remote-after: free port 42343, discovery HTTP 200,
installed CLI imports and lists 54 plugins
PASS source-after: free port 33743, discovery HTTP 200,
source CLI imports and lists 54 plugins
  • The remote check used the release workflow's production deploy and dist relocation, built the Linux archive with scripts/package-remote.ts, extracted it into versions/0.2.1, and started its bundled akeru serve launcher. All 160 catalog files in both installed artifacts match source byte for byte.
  • A consumer of the actual catalog loader and runtime loaded all 54 manifests from each installed artifact and found Exa through plugin search. This revision has no plugin-list RPC.
  • Regression tests failed before the fix; 20 focused tests passed afterward, including source/desktop fallback loading and archive preservation. Targeted lint and server/scripts typechecks passed. Independent GPT-6.1 Sol review found no concrete defects.
  • Native desktop and Docker execution were not run. Their shared distribution paths were inspected; desktop resource layouts were exercised by the loader tests. All launched test servers were stopped.

Merge Danger

Door: two-way. Reverting restores the prior bundle layout; no persisted data or wire contracts change.

Blast radius: server packaging and catalog loading across npm, remote, Docker, and desktop distributions. Existing source and desktop lookup paths remain available.

Fixes AKR-222

Created with GPT-6.1 Sol in T3 Code.


Devin Review

Exercise catalog loading in isolated release, source, and desktop layouts. Released entry points fail with the catalog-unavailable error; packaging tests cover manifests and logos.

Model: GPT-6.1 Sol. Harness: Codex in T3 Code.
Released remote servers crashed outside the repository because the plugin catalog was neither bundled nor resolved beside the entry point. Copy catalog entries after both bundle passes and search the bundled catalog before existing repository and desktop fallbacks.

Model: GPT-6.1 Sol. Harness: Codex in T3 Code.
@vercel

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Oct 6, 2026 4:23pm UTC

Request Review

@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 6, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread apps/server/package.json
"scripts": {
"dev": "node --watch src/bin.ts",
"build:bundle": "vp pack && vp pack src/service-launcher.ts --out-dir dist --no-clean",
"build:bundle": "vp pack && vp pack src/service-launcher.ts --out-dir dist --no-clean && node scripts/copy-plugin-catalog.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Desktop artifacts duplicate the catalog

The desktop build already stages a catalog in resources/plugins. Copying the full server distribution into desktop artifacts adds another, including inside Windows server.asar; removing either copy needs a loader and WSL check.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Build process now copies plugin catalog into release bundles.

The PR appears safe to merge based on the reviewed build and catalog-loading paths.

Summary

The PR copies the plugin catalog into the server’s dist directory after bundling and makes the Node loader check that location before its existing fallbacks.

  • Adds focused copy, loader-layout, and remote-archive tests.
  • Adds a patch changeset for the release fix.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["plugins/entries"] --> B["build:bundle copy step"]
  B --> C["dist/plugins/entries"]
  C --> D["npm, remote, Docker, desktop bundles"]
  D --> E["Node catalog loader"]
  F["Repository and desktop fallback paths"] --> E
Loading

Reviews (1) · Last reviewed commit: "fix(server): ship the plugin catalog wit..."

This branch was successfully deployed

1 active deployment
Preview — 70fef8f0 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant