fix: npm audit issues and stability bugs #10
Merged
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.
PR Summary: Bug Fixes and Improvements
🐛 Bug Fixes
Critical:
ServerOrchestrator: Fixed fire-and-forget async in constructor - added ensureReady() method for proper initialization tracking
Resource leaks: Added cleanup callbacks to ClientResourceCache and fixed stop() in both transports to properly close sessions
Double notifications: Fixed enableToolsets sending redundant notifications
Security/Correctness:
Header case sensitivity: PermissionResolver now handles headers case-insensitively per RFC 7230
Meta-tools in STATIC mode: enable_toolset/disable_toolset now correctly only register in DYNAMIC mode
ExposurePolicy enforcement: Permission-based servers now sanitize and warn about ignored policy options
Other:
Fixed validateToolsetModules to allow toolsets with only direct tools (no modules)
Fixed silent failures in permission bundle creation - now logs warnings and throws on total failure
Added error logging to previously swallowed catch blocks
Fixed moduleLoaders typing from Record<string, any> to Record<string, ModuleLoader>
📝 Documentation
Updated README meta-tools section to clarify DYNAMIC vs STATIC availability
Fixed incorrect server: → createServer: in static startup examples
Enhanced exposurePolicy documentation for permission-based servers
🔧 Maintenance
Upgraded vite ^5.3.1 → ^7.2.4 (fixes esbuild vulnerability)
Updated tests to match new behavior