fix(hooks): normalize hooks.json to {"hooks": {}} in 4 vertical plugins#224
Open
aiiapairoj wants to merge 2 commits into
Open
fix(hooks): normalize hooks.json to {"hooks": {}} in 4 vertical plugins#224aiiapairoj wants to merge 2 commits into
aiiapairoj wants to merge 2 commits into
Conversation
The plugin loader validates `hooks/hooks.json` against a schema
expecting `{ "hooks": <object> }`. Four plugins shipped a bare
empty array, so they install but fail to load with:
Hook load failed: expected object, received array
Normalizing them to match the existing canonical shape in
`investment-banking/hooks/hooks.json` resolves the load.
Affected: financial-analysis, equity-research, private-equity,
wealth-management. Reported in anthropics#218, anthropics#219, anthropics#223.
Per repo convention: a plugin's `version` gates update delivery to already-installed users. The 4 plugins whose `hooks.json` was just fixed need a patch bump so the fix actually ships. (The local pre-commit hook skipped this on Windows because it shells out to `python3` rather than `python`. Filing separately won't hurt.)
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four vertical plugins ship
hooks/hooks.jsonas a bare empty array ([]). The Claude Code plugin loader validates that file against a schema expecting an object, so all four install but fail to load with:(The exact error text varies — some loader versions report
"expected": "record"— but it's the same root cause.)Fix
Replace the file contents in the four affected plugins with the canonical shape already used by
investment-banking/hooks/hooks.json:{ "hooks": {} }Affected plugins (all
0.1.0 → 0.1.1):financial-analysis[]{"hooks": {}}equity-research[]{"hooks": {}}private-equity[]{"hooks": {}}wealth-management[]{"hooks": {}}investment-bankingalready has the correct shape and is unchanged.Verification
python scripts/check.py→OK — 80 file(s) checked, 0 issues./doctorno longer reports the load failure.Closes
[]should be{"hooks": {}}— 4 vertical plugins fail to load #223Side note (not fixed here — out of scope)
The pre-commit hook in
.githooks/pre-commitshells out topython3. On Windows that binary is namedpython, so the hook printspython3 not found; skipping version-bump.and the contributor has to bump versions manually (as I did here in a second commit). Trivial fix: probepython3 || pythonin the hook. Happy to send a separate PR if useful.🤖 Generated with Claude Code