diff --git a/.claude/settings.json b/.claude/settings.json index 37e8cd2d..a668b39c 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -48,13 +48,13 @@ "hooks": { "PreToolUse": [ { - "matcher": { "tools": ["Edit", "Write", "MultiEdit"] }, + "matcher": "Edit|Write|MultiEdit", "hooks": [ { "type": "command", "command": "npx ruvector hooks pre-edit \"$TOOL_INPUT_file_path\"" } ] }, { - "matcher": { "tools": ["Bash"] }, + "matcher": "Bash", "hooks": [ { "type": "command", "command": "npx ruvector hooks pre-command \"$TOOL_INPUT_command\"" } ] @@ -62,23 +62,31 @@ ], "PostToolUse": [ { - "matcher": { "tools": ["Edit", "Write", "MultiEdit"] }, + "matcher": "Edit|Write|MultiEdit", "hooks": [ { "type": "command", "command": "npx ruvector hooks post-edit \"$TOOL_INPUT_file_path\"" } ] }, { - "matcher": { "tools": ["Bash"] }, + "matcher": "Bash", "hooks": [ { "type": "command", "command": "npx ruvector hooks post-command \"$TOOL_INPUT_command\"" } ] } ], "SessionStart": [ - { "type": "command", "command": "npx ruvector hooks session-start" } + { + "hooks": [ + { "type": "command", "command": "npx ruvector hooks session-start" } + ] + } ], "Stop": [ - { "type": "command", "command": "npx ruvector hooks session-end" } + { + "hooks": [ + { "type": "command", "command": "npx ruvector hooks session-end" } + ] + } ], "PreCompact": [ { diff --git a/npm/packages/ruvector/bin/cli.js b/npm/packages/ruvector/bin/cli.js index 935258da..b49d4f33 100755 --- a/npm/packages/ruvector/bin/cli.js +++ b/npm/packages/ruvector/bin/cli.js @@ -2277,15 +2277,15 @@ hooksCmd.command('init').description('Initialize hooks in current project').opti } settings.hooks = settings.hooks || {}; settings.hooks.PreToolUse = [ - { matcher: { tools: ['Edit', 'Write', 'MultiEdit'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] }, - { matcher: { tools: ['Bash'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks pre-command "$TOOL_INPUT_command"' }] } + { matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] }, + { matcher: 'Bash', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-command "$TOOL_INPUT_command"' }] } ]; settings.hooks.PostToolUse = [ - { matcher: { tools: ['Edit', 'Write', 'MultiEdit'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks post-edit "$TOOL_INPUT_file_path"' }] }, - { matcher: { tools: ['Bash'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks post-command "$TOOL_INPUT_command"' }] } + { matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks post-edit "$TOOL_INPUT_file_path"' }] }, + { matcher: 'Bash', hooks: [{ type: 'command', command: 'npx ruvector hooks post-command "$TOOL_INPUT_command"' }] } ]; - settings.hooks.SessionStart = [{ type: 'command', command: 'npx ruvector hooks session-start' }]; - settings.hooks.Stop = [{ type: 'command', command: 'npx ruvector hooks session-end' }]; + settings.hooks.SessionStart = [{ hooks: [{ type: 'command', command: 'npx ruvector hooks session-start' }] }]; + settings.hooks.Stop = [{ hooks: [{ type: 'command', command: 'npx ruvector hooks session-end' }] }]; fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2)); console.log(chalk.green('✅ Hooks initialized in .claude/settings.json')); }); diff --git a/npm/packages/ruvector/package.json b/npm/packages/ruvector/package.json index 8869d45e..81d1530b 100644 --- a/npm/packages/ruvector/package.json +++ b/npm/packages/ruvector/package.json @@ -1,6 +1,6 @@ { "name": "ruvector", - "version": "0.1.41", + "version": "0.1.42", "description": "High-performance vector database for Node.js with automatic native/WASM fallback", "main": "dist/index.js", "types": "dist/index.d.ts",