ruvector 0.1.41 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +15 -6
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -2275,17 +2275,26 @@ hooksCmd.command('init').description('Initialize hooks in current project').opti
2275
2275
  if (fs.existsSync(settingsPath) && !opts.force) {
2276
2276
  try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8')); } catch {}
2277
2277
  }
2278
+ // Fix schema if present
2279
+ if (settings.$schema) {
2280
+ settings.$schema = 'https://json.schemastore.org/claude-code-settings.json';
2281
+ }
2282
+ // Clean up invalid hook names
2283
+ if (settings.hooks) {
2284
+ if (settings.hooks.Start) { delete settings.hooks.Start; }
2285
+ if (settings.hooks.End) { delete settings.hooks.End; }
2286
+ }
2278
2287
  settings.hooks = settings.hooks || {};
2279
2288
  settings.hooks.PreToolUse = [
2280
- { matcher: { tools: ['Edit', 'Write', 'MultiEdit'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] },
2281
- { matcher: { tools: ['Bash'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks pre-command "$TOOL_INPUT_command"' }] }
2289
+ { matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] },
2290
+ { matcher: 'Bash', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-command "$TOOL_INPUT_command"' }] }
2282
2291
  ];
2283
2292
  settings.hooks.PostToolUse = [
2284
- { matcher: { tools: ['Edit', 'Write', 'MultiEdit'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks post-edit "$TOOL_INPUT_file_path"' }] },
2285
- { matcher: { tools: ['Bash'] }, hooks: [{ type: 'command', command: 'npx ruvector hooks post-command "$TOOL_INPUT_command"' }] }
2293
+ { matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks post-edit "$TOOL_INPUT_file_path"' }] },
2294
+ { matcher: 'Bash', hooks: [{ type: 'command', command: 'npx ruvector hooks post-command "$TOOL_INPUT_command"' }] }
2286
2295
  ];
2287
- settings.hooks.SessionStart = [{ type: 'command', command: 'npx ruvector hooks session-start' }];
2288
- settings.hooks.Stop = [{ type: 'command', command: 'npx ruvector hooks session-end' }];
2296
+ settings.hooks.SessionStart = [{ hooks: [{ type: 'command', command: 'npx ruvector hooks session-start' }] }];
2297
+ settings.hooks.Stop = [{ hooks: [{ type: 'command', command: 'npx ruvector hooks session-end' }] }];
2289
2298
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
2290
2299
  console.log(chalk.green('✅ Hooks initialized in .claude/settings.json'));
2291
2300
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "High-performance vector database for Node.js with automatic native/WASM fallback",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",