#4263: fix(plugins): default configSchema when missing from manifest
Cluster:
Plugin Management Enhancements
## 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
#7090: fix: plugin install uses manifest ID for folder name (#2796)
by dial481 · 2026-02-02
80.0%
#2556: fix(plugin-install): handle existing plugins and filter workspace deps
by longmaba · 2026-01-27
77.9%
#11096: fix(plugins): require explicit trust for workspace and external plu...
by T1mn · 2026-02-07
77.8%
#20424: Fix plugin extension path traversal in discovery/install
by markmusson · 2026-02-18
77.3%
#7204: Plugins: default non-bundled plugins off
by veganmosfet · 2026-02-02
75.8%
#23540: fix(compat): add legacy manifest keys for clawdbot and moltbot plugins
by 402goose · 2026-02-22
75.6%
#18966: fix(config): downgrade unknown bundled plugin references to warnings
by moxunjinmu · 2026-02-17
75.5%
#5823: fix(config): exit cleanly on invalid config instead of high CPU loop
by gavinbmoore · 2026-02-01
75.4%
#12499: fix(config): add missing customBindHost to gateway Zod schema
by sfo2001 · 2026-02-09
75.4%
#21660: fix(plugins): require explicit allowlist for non-bundled plugins
by AI-Reviewer-QS · 2026-02-20
75.3%