ruvector 0.1.36 → 0.1.37

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/ruvector.js +10 -7
  2. package/package.json +1 -1
package/bin/ruvector.js CHANGED
@@ -820,8 +820,9 @@ class Intelligence {
820
820
 
821
821
  load() {
822
822
  try {
823
- if (fs.existsSync(INTEL_PATH)) {
824
- return JSON.parse(require('fs').readFileSync(INTEL_PATH, 'utf-8'));
823
+ const fss = require('fs');
824
+ if (fss.existsSync(INTEL_PATH)) {
825
+ return JSON.parse(fss.readFileSync(INTEL_PATH, 'utf-8'));
825
826
  }
826
827
  } catch {}
827
828
  return {
@@ -837,9 +838,10 @@ class Intelligence {
837
838
  }
838
839
 
839
840
  save() {
841
+ const fss = require('fs');
840
842
  const dir = path.dirname(INTEL_PATH);
841
- if (!fs.existsSync(dir)) require('fs').mkdirSync(dir, { recursive: true });
842
- require('fs').writeFileSync(INTEL_PATH, JSON.stringify(this.data, null, 2));
843
+ if (!fss.existsSync(dir)) fss.mkdirSync(dir, { recursive: true });
844
+ fss.writeFileSync(INTEL_PATH, JSON.stringify(this.data, null, 2));
843
845
  }
844
846
 
845
847
  now() { return Math.floor(Date.now() / 1000); }
@@ -996,17 +998,18 @@ class Intelligence {
996
998
  const hooksCmd = program.command('hooks').description('Self-learning intelligence hooks for Claude Code');
997
999
 
998
1000
  hooksCmd.command('init').description('Initialize hooks in current project').option('--force', 'Force overwrite').action((opts) => {
1001
+ const fss = require('fs');
999
1002
  const settingsPath = path.join(process.cwd(), '.claude', 'settings.json');
1000
1003
  const settingsDir = path.dirname(settingsPath);
1001
- if (!fs.existsSync(settingsDir)) require('fs').mkdirSync(settingsDir, { recursive: true });
1004
+ if (!fss.existsSync(settingsDir)) fss.mkdirSync(settingsDir, { recursive: true });
1002
1005
  let settings = {};
1003
- if (fs.existsSync(settingsPath)) try { settings = JSON.parse(require('fs').readFileSync(settingsPath, 'utf-8')); } catch {}
1006
+ if (fss.existsSync(settingsPath)) try { settings = JSON.parse(fss.readFileSync(settingsPath, 'utf-8')); } catch {}
1004
1007
  settings.hooks = settings.hooks || {};
1005
1008
  settings.hooks.PreToolUse = [{ matcher: 'Edit|Write|MultiEdit', hooks: ['ruvector hooks pre-edit "$TOOL_INPUT_file_path"'] }, { matcher: 'Bash', hooks: ['ruvector hooks pre-command "$TOOL_INPUT_command"'] }];
1006
1009
  settings.hooks.PostToolUse = [{ matcher: 'Edit|Write|MultiEdit', hooks: ['ruvector hooks post-edit "$TOOL_INPUT_file_path"'] }, { matcher: 'Bash', hooks: ['ruvector hooks post-command "$TOOL_INPUT_command"'] }];
1007
1010
  settings.hooks.SessionStart = ['ruvector hooks session-start'];
1008
1011
  settings.hooks.Stop = ['ruvector hooks session-end'];
1009
- require('fs').writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
1012
+ fss.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
1010
1013
  console.log(chalk.green('✅ Hooks initialized in .claude/settings.json'));
1011
1014
  });
1012
1015
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "High-performance vector database with Graph Neural Networks, Cypher queries, and AI agent routing. Build RAG apps, semantic search, recommendations, and agentic AI systems. Pinecone + Neo4j + PyTorch alternative.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",