← Back to PRs

#4263: fix(plugins): default configSchema when missing from manifest

by SoulSniper-V2 open 2026-01-30 00:14 View on GitHub →
## Summary When loading a plugin from `~/.clawdbot/extensions/`, if the manifest is missing the `configSchema` field, the gateway crashes. This PR defaults to an empty object schema instead, matching the workaround users already apply manually. ## Changes - Default `configSchema` to `{ type: "object", additionalProperties: false, properties: {} }` when missing - Add `manifest.test.ts` with test coverage for the new behavior ## Testing - `npm run lint` — passed - `npx tsc` — passed - `npx vitest run src/plugins/manifest.test.ts` — 5/5 passed - `npx vitest run src/plugins/loader.test.ts` — 14/14 passed Fixes #4069 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR changes plugin manifest loading so that `configSchema` is no longer mandatory: when absent, `loadPluginManifest` now defaults it to an empty object schema, preventing gateway crashes when loading local extensions under `~/.clawdbot/extensions/`. It also adds a new Vitest suite that covers missing-file, missing-id, default-schema, and optional-field parsing behavior. The change is localized to `src/plugins/manifest.ts` (manifest parsing) and is exercised via `src/plugins/manifest.test.ts`, aligning behavior with how users were previously working around missing `configSchema` manually. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge; the behavioral change is small and covered by new tests. - Changes are limited to manifest parsing with a straightforward default value and accompanying unit tests. Main risk is whether downstream schema validation expects a specific JSON Schema draft/shape beyond a basic object schema. - src/plugins/manifest.ts (ensure default schema matches downstream validator expectations) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs