What happened?
yaml is declared in devDependencies in package.json:56, but the YAML pack loader (src/infrastructure/yaml-pack-loader.ts:2) imports parse from yaml at runtime.
When agent-guardrails is installed as a dependency in a downstream project, devDependencies are not installed. Any consumer who calls loadYamlRulePack / loadAllRulePacks will hit Cannot find module 'yaml' at runtime.
There is no dependencies field in package.json at all.
What did you expect to happen?
yaml should be in dependencies (or peerDependencies) so that consumers who use the YAML loader get it installed automatically.
Steps to reproduce
- Install the package in a downstream project:
npm install agent-guardrails
- Call
loadYamlRulePack(...) from the public API
- Observe
Error: Cannot find module 'yaml'
Relevant log output
Error: Cannot find module 'yaml'
at .../node_modules/agent-guardrails/dist/infrastructure/yaml-pack-loader.js
What happened?
yamlis declared indevDependenciesinpackage.json:56, but the YAML pack loader (src/infrastructure/yaml-pack-loader.ts:2) importsparsefromyamlat runtime.When
agent-guardrailsis installed as a dependency in a downstream project,devDependenciesare not installed. Any consumer who callsloadYamlRulePack/loadAllRulePackswill hitCannot find module 'yaml'at runtime.There is no
dependenciesfield inpackage.jsonat all.What did you expect to happen?
yamlshould be independencies(orpeerDependencies) so that consumers who use the YAML loader get it installed automatically.Steps to reproduce
npm install agent-guardrailsloadYamlRulePack(...)from the public APIError: Cannot find module 'yaml'Relevant log output