← Back to PRs

#12849: fix(plugins): fallback bundled channel specs when npm install returns 404

by vincentkoc open 2026-02-09 20:09 View on GitHub →
cli maintainer size: M
This change adds a bundled-plugin fallback for known bundled npm specs so installation can still succeed without a published npm tarball. `openclaw plugins install @openclaw/feishu` currently fails with npm `E404` even though Feishu can be provided by bundled extensions. - Fixes #8576 - Fixes #13913 - Fixes #12849 - Fixes #15622 - Fixes #13448 lobster-biscuit Changes: - add `src/plugins/bundled-sources.ts` to resolve bundled plugin sources and lookup by npm spec - add `src/plugins/bundled-sources.test.ts` coverage for bundled source resolution and npm spec matching - reuse the shared bundled source resolver from `src/plugins/update.ts` - add npm-404 fallback in `src/cli/plugins-cli.ts` to enable/link bundled plugin paths and persist install records <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a fallback path for `openclaw plugins install <npm-spec>` when `npm pack` fails with an E404/not-found error: it looks up a matching bundled plugin source by npm spec, adds the bundled plugin’s local path to `plugins.load.paths`, enables the plugin entry, and records an install record so the install persists. It also extracts the bundled-plugin discovery logic into a new shared module (`src/plugins/bundled-sources.ts`) and updates `src/plugins/update.ts` to reuse it, with accompanying Vitest coverage for bundled source resolution and npm-spec matching. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Reviewed the changed CLI install flow, new bundled-source resolver, tests, and the refactor in update.ts. The fallback is gated on the existing `npm pack failed:` error string and common 404 markers, and config/installs updates follow existing patterns without introducing obvious correctness or safety regressions. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs