fix: Add missing yaml dependency for hooks#636
Closed
m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
Closed
fix: Add missing yaml dependency for hooks#636m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
SecurityValidator.hook.ts imports from 'yaml', but there is no root package.json in ~/.claude/. The yaml package only exists in subdirectory package.json files (Agents/Tools, Prompting/Templates/Tools), which don't resolve for hooks running from the root. This adds a root package.json with the yaml dependency and a bun install step to INSTALL.ts so fresh installs don't fail with "Cannot find package 'yaml'" when SecurityValidator triggers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Thank you for catching the missing yaml dependency, @m4nt0de4! Good catch — hooks that parse YAML need the dependency available. The target path (Releases/v2.5/) has been superseded by v3.0's restructured installer. Closing as the paths no longer match. Appreciate the fix! |
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
SecurityValidator.hook.tsimportsfrom 'yaml', but there is no rootpackage.jsonin~/.claude/yamlpackage only exists in subdirectorypackage.jsonfiles (skills/Agents/Tools/,skills/Prompting/Templates/Tools/)Cannot find package 'yaml'when SecurityValidator triggerspackage.jsonwith theyamldependency and abun installstep toINSTALL.tsAffected files
Files that import from
yamlat the root resolution scope:hooks/SecurityValidator.hook.ts(line 66)skills/PAI/Tools/LoadSkillConfig.ts(line 20)skills/Evals/Tools/SuiteManager.ts(line 10)skills/Evals/Tools/AlgorithmBridge.ts(line 13)skills/Evals/Tools/FailureToTask.ts(line 11)Reproduction
Cannot find package 'yaml'Fix
Releases/v2.5/.claude/package.jsonwithyamldependencybun installstep toINSTALL.tsafter directory creationTest plan
🤖 Generated with Claude Code