From 5e5841925a07fedbdfd42b88036aa5b7a57ded3c Mon Sep 17 00:00:00 2001 From: rUv Date: Tue, 30 Dec 2025 19:22:00 +0000 Subject: [PATCH] fix(hooks): init command now fixes invalid schema and hook names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixes $schema to correct URL - Removes invalid Start/End hooks (renamed to SessionStart/Stop) - Preserves other existing settings when merging Bumps to v0.1.43 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- npm/packages/ruvector/bin/cli.js | 9 +++++++++ npm/packages/ruvector/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/npm/packages/ruvector/bin/cli.js b/npm/packages/ruvector/bin/cli.js index b49d4f33..c3b40e12 100755 --- a/npm/packages/ruvector/bin/cli.js +++ b/npm/packages/ruvector/bin/cli.js @@ -2275,6 +2275,15 @@ hooksCmd.command('init').description('Initialize hooks in current project').opti if (fs.existsSync(settingsPath) && !opts.force) { try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8')); } catch {} } + // Fix schema if present + if (settings.$schema) { + settings.$schema = 'https://json.schemastore.org/claude-code-settings.json'; + } + // Clean up invalid hook names + if (settings.hooks) { + if (settings.hooks.Start) { delete settings.hooks.Start; } + if (settings.hooks.End) { delete settings.hooks.End; } + } settings.hooks = settings.hooks || {}; settings.hooks.PreToolUse = [ { matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] }, diff --git a/npm/packages/ruvector/package.json b/npm/packages/ruvector/package.json index 81d1530b..b52e236f 100644 --- a/npm/packages/ruvector/package.json +++ b/npm/packages/ruvector/package.json @@ -1,6 +1,6 @@ { "name": "ruvector", - "version": "0.1.42", + "version": "0.1.43", "description": "High-performance vector database for Node.js with automatic native/WASM fallback", "main": "dist/index.js", "types": "dist/index.d.ts",