fix(plugins): use canonical {"hooks": {}} for empty hooks.json#193
fix(plugins): use canonical {"hooks": {}} for empty hooks.json#193devflowza wants to merge 1 commit into
Conversation
Four vertical plugins ship hooks/hooks.json containing `[]`, which fails the
Claude Code plugin loader's schema (root must be an object). The loader
rejects with "expected object, received array", blocking the entire plugin
from loading.
Switch to the canonical `{"hooks": {}}` shape already used by
investment-banking/hooks/hooks.json elsewhere in this repo.
Affected plugins:
- financial-analysis (actively erroring on /doctor)
- private-equity
- wealth-management
- equity-research
Repro:
1. Install any affected plugin via /plugin marketplace add
2. Run /doctor
3. See: Hook load failed — Invalid input: expected object, received array
Verified locally by patching the cached copies and reloading plugins;
the error clears and the plugin loads cleanly.
|
Hit this locally today after installing the marketplace. The |
|
Follow-up correction to my earlier comment: when I said "loads cleanly", I'd actually patched to bare Patching to |
Problem
Four vertical plugins ship
hooks/hooks.jsoncontaining[](an empty array). The Claude Code plugin loader's Zod schema expects an object at the root, so it rejects with:Result:
/doctorflags the plugin and the hooks can never be loaded.Repro
→
✘ Plugin errors→financial-analysis [financial-analysis]: Hook load failed: [{"expected":"object","code":"invalid_type","path":[],"message":"Invalid input: expected object, received array"}]Fix
Change
[]→{"hooks": {}}, matching the canonical shape already used byinvestment-banking/hooks/hooks.jsonelsewhere in this repo.Affected files (4)
plugins/vertical-plugins/financial-analysis/hooks/hooks.json← actively erroring on /doctorplugins/vertical-plugins/private-equity/hooks/hooks.json← latent (same bug, just not loaded by default)plugins/vertical-plugins/wealth-management/hooks/hooks.json← latentplugins/vertical-plugins/equity-research/hooks/hooks.json← latentVerification
Patched the locally cached marketplace copies, ran
/reload-plugins+/doctor— error cleared, all four plugins load cleanly.Test plan
/plugin install financial-analysisfollowed by/doctorshows no plugin errorsprivate-equity,wealth-management,equity-research🤖 Generated with Claude Code