← Back to PRs

#7090: fix: plugin install uses manifest ID for folder name (#2796)

by dial481 open 2026-02-02 11:22 View on GitHub →
**AI Assisted** **Tested** ## Summary - Plugin installation now prefers the `id` from `openclaw.plugin.json` over the npm package name for the installation folder - Falls back to package name if no manifest or ID is found (backward compatible) ## Problem When installing a plugin like `openclaw-penfield` (npm package name), it would install to `/extensions/openclaw-penfield/` even if he manifest specified `id: "penfield"`. ## Solution Read `openclaw.plugin.json` during install and use the manifest ID if available. ## Tests - [x] Tested with openclaw-penfield plugin (manifest ID differs from package name) - [x] Verified fallback works when no manifest exists - [ ] Existing unit tests pass Fixes #2796 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates plugin installation to prefer the `id` from `openclaw.plugin.json` when choosing the extensions folder name, falling back to the npm package name when no valid manifest/id is available. The change is localized to `src/plugins/install.ts` and reuses the existing `loadPluginManifest()` helper used elsewhere in the plugins subsystem, keeping the rest of the install flow (copy, dependency install, backups on update) unchanged. <h3>Confidence Score: 4/5</h3> - This PR is generally safe to merge; it’s a small behavioral change in plugin directory naming with limited surface area. - The change is simple and leverages existing manifest parsing, but it introduces a new source of truth for `pluginId` that may contain unexpected characters or formatting differences compared to npm-derived IDs, which can affect install paths and `expectedPluginId` checks. - src/plugins/install.ts <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs