ruvector 0.1.71 → 0.1.72

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.
@@ -3,9 +3,9 @@
3
3
  "cmd_shell_general|success": {
4
4
  "state": "cmd_shell_general",
5
5
  "action": "success",
6
- "q_value": 0.7954188664823821,
7
- "visits": 49,
8
- "last_update": 1767196918
6
+ "q_value": 0.7962892818507296,
7
+ "visits": 51,
8
+ "last_update": 1767196950
9
9
  },
10
10
  "edit_ts_in_project|successful-edit": {
11
11
  "state": "edit_ts_in_project",
@@ -4489,6 +4489,152 @@
4489
4489
  ],
4490
4490
  "metadata": {},
4491
4491
  "timestamp": 1767196918
4492
+ },
4493
+ {
4494
+ "id": "mem_1767196937",
4495
+ "memory_type": "command",
4496
+ "content": " succeeded",
4497
+ "embedding": [
4498
+ 0,
4499
+ 0,
4500
+ 0,
4501
+ 0.31622776601683794,
4502
+ 0,
4503
+ 0,
4504
+ 0,
4505
+ 0,
4506
+ 0.31622776601683794,
4507
+ 0,
4508
+ 0,
4509
+ 0,
4510
+ 0,
4511
+ 0,
4512
+ 0,
4513
+ 0.31622776601683794,
4514
+ 0,
4515
+ 0,
4516
+ 0,
4517
+ 0,
4518
+ 0,
4519
+ 0.31622776601683794,
4520
+ 0,
4521
+ 0,
4522
+ 0,
4523
+ 0,
4524
+ 0,
4525
+ 0,
4526
+ 0,
4527
+ 0.31622776601683794,
4528
+ 0,
4529
+ 0,
4530
+ 0.31622776601683794,
4531
+ 0,
4532
+ 0,
4533
+ 0.31622776601683794,
4534
+ 0,
4535
+ 0,
4536
+ 0,
4537
+ 0,
4538
+ 0,
4539
+ 0,
4540
+ 0,
4541
+ 0,
4542
+ 0,
4543
+ 0,
4544
+ 0,
4545
+ 0,
4546
+ 0,
4547
+ 0,
4548
+ 0,
4549
+ 0,
4550
+ 0,
4551
+ 0,
4552
+ 0,
4553
+ 0,
4554
+ 0.31622776601683794,
4555
+ 0,
4556
+ 0.31622776601683794,
4557
+ 0,
4558
+ 0,
4559
+ 0,
4560
+ 0,
4561
+ 0.31622776601683794
4562
+ ],
4563
+ "metadata": {},
4564
+ "timestamp": 1767196937
4565
+ },
4566
+ {
4567
+ "id": "mem_1767196950",
4568
+ "memory_type": "command",
4569
+ "content": " succeeded",
4570
+ "embedding": [
4571
+ 0,
4572
+ 0,
4573
+ 0,
4574
+ 0.31622776601683794,
4575
+ 0,
4576
+ 0,
4577
+ 0,
4578
+ 0,
4579
+ 0.31622776601683794,
4580
+ 0,
4581
+ 0,
4582
+ 0,
4583
+ 0,
4584
+ 0,
4585
+ 0,
4586
+ 0.31622776601683794,
4587
+ 0,
4588
+ 0,
4589
+ 0,
4590
+ 0,
4591
+ 0,
4592
+ 0.31622776601683794,
4593
+ 0,
4594
+ 0,
4595
+ 0,
4596
+ 0,
4597
+ 0,
4598
+ 0,
4599
+ 0,
4600
+ 0.31622776601683794,
4601
+ 0,
4602
+ 0,
4603
+ 0.31622776601683794,
4604
+ 0,
4605
+ 0,
4606
+ 0.31622776601683794,
4607
+ 0,
4608
+ 0,
4609
+ 0,
4610
+ 0,
4611
+ 0,
4612
+ 0,
4613
+ 0,
4614
+ 0,
4615
+ 0,
4616
+ 0,
4617
+ 0,
4618
+ 0,
4619
+ 0,
4620
+ 0,
4621
+ 0,
4622
+ 0,
4623
+ 0,
4624
+ 0,
4625
+ 0,
4626
+ 0,
4627
+ 0.31622776601683794,
4628
+ 0,
4629
+ 0.31622776601683794,
4630
+ 0,
4631
+ 0,
4632
+ 0,
4633
+ 0,
4634
+ 0.31622776601683794
4635
+ ],
4636
+ "metadata": {},
4637
+ "timestamp": 1767196950
4492
4638
  }
4493
4639
  ],
4494
4640
  "trajectories": [
@@ -4939,6 +5085,22 @@
4939
5085
  "outcome": "completed",
4940
5086
  "reward": 0.8,
4941
5087
  "timestamp": 1767196918
5088
+ },
5089
+ {
5090
+ "id": "traj_1767196937",
5091
+ "state": "cmd_shell_general",
5092
+ "action": "success",
5093
+ "outcome": "completed",
5094
+ "reward": 0.8,
5095
+ "timestamp": 1767196937
5096
+ },
5097
+ {
5098
+ "id": "traj_1767196950",
5099
+ "state": "cmd_shell_general",
5100
+ "action": "success",
5101
+ "outcome": "completed",
5102
+ "reward": 0.8,
5103
+ "timestamp": 1767196950
4942
5104
  }
4943
5105
  ],
4944
5106
  "errors": {},
@@ -4947,8 +5109,8 @@
4947
5109
  "edges": [],
4948
5110
  "stats": {
4949
5111
  "total_patterns": 5,
4950
- "total_memories": 61,
4951
- "total_trajectories": 56,
5112
+ "total_memories": 63,
5113
+ "total_trajectories": 58,
4952
5114
  "total_errors": 0,
4953
5115
  "session_count": 6,
4954
5116
  "last_session": 1767195588
package/bin/cli.js CHANGED
@@ -2836,26 +2836,81 @@ hooksCmd.command('init')
2836
2836
  // StatusLine configuration (unless --minimal or --no-statusline)
2837
2837
  if (!opts.minimal && opts.statusline !== false) {
2838
2838
  if (!settings.statusLine) {
2839
- // Create a simple statusline script
2840
- const statuslineScript = path.join(settingsDir, 'statusline.sh');
2841
- const statuslineContent = `#!/bin/bash
2842
- # RuVector Status Line - shows intelligence stats
2843
- INTEL_FILE=".ruvector/intelligence.json"
2844
- if [ -f "$INTEL_FILE" ]; then
2845
- PATTERNS=$(jq -r '.patterns | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
2846
- MEMORIES=$(jq -r '.memories | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
2847
- echo "🧠 $PATTERNS patterns | 💾 $MEMORIES memories"
2839
+ const isWindows = process.platform === 'win32';
2840
+
2841
+ if (isWindows) {
2842
+ // Windows: PowerShell statusline
2843
+ const statuslineScript = path.join(settingsDir, 'statusline-command.ps1');
2844
+ const statuslineContent = `# RuVector Intelligence Statusline for Windows PowerShell
2845
+ $ErrorActionPreference = "SilentlyContinue"
2846
+ $inputData = [Console]::In.ReadToEnd()
2847
+ $data = $inputData | ConvertFrom-Json
2848
+ $Model = if ($data.model.display_name) { $data.model.display_name } else { "Claude" }
2849
+ $CWD = if ($data.workspace.current_dir) { $data.workspace.current_dir } else { $data.cwd }
2850
+ $Dir = Split-Path -Leaf $CWD
2851
+ $Branch = $null; Push-Location $CWD 2>$null; $Branch = git branch --show-current 2>$null; Pop-Location
2852
+ $Reset = "\`e[0m"; $Bold = "\`e[1m"; $Cyan = "\`e[36m"; $Yellow = "\`e[33m"; $Green = "\`e[32m"; $Magenta = "\`e[35m"; $Blue = "\`e[34m"; $Dim = "\`e[2m"
2853
+ $Line1 = "$Bold$Model$Reset in $Cyan$Dir$Reset"
2854
+ if ($Branch) { $Line1 += " on $Yellow⎇ $Branch$Reset" }
2855
+ Write-Host $Line1
2856
+ $IntelFile = "$CWD\.ruvector\intelligence.json"
2857
+ if (Test-Path $IntelFile) {
2858
+ $Intel = Get-Content $IntelFile -Raw | ConvertFrom-Json
2859
+ $MemoryCount = if ($Intel.memories) { $Intel.memories.Count } else { 0 }
2860
+ $TrajCount = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 }
2861
+ $SessionCount = if ($Intel.stats.session_count) { $Intel.stats.session_count } else { 0 }
2862
+ Write-Host "$Magenta🧠 RuVector$Reset $Blue⬡$Reset $MemoryCount mem $Yellow↝$Reset$TrajCount $Dim#$SessionCount$Reset"
2863
+ } else {
2864
+ Write-Host "$Dim🧠 RuVector: run 'npx ruvector hooks session-start' to initialize$Reset"
2865
+ }
2866
+ `;
2867
+ fs.writeFileSync(statuslineScript, statuslineContent);
2868
+ settings.statusLine = {
2869
+ type: 'command',
2870
+ command: '.claude/statusline-command.ps1'
2871
+ };
2872
+ } else {
2873
+ // Unix (macOS, Linux): Bash statusline
2874
+ const statuslineScript = path.join(settingsDir, 'statusline-command.sh');
2875
+ const statuslineContent = `#!/bin/bash
2876
+ # RuVector Intelligence Statusline - Multi-line display
2877
+ INPUT=\$(cat)
2878
+ MODEL=\$(echo "\$INPUT" | jq -r '.model.display_name // "Claude"')
2879
+ CWD=\$(echo "\$INPUT" | jq -r '.workspace.current_dir // .cwd')
2880
+ DIR=\$(basename "\$CWD")
2881
+ BRANCH=\$(cd "\$CWD" 2>/dev/null && git branch --show-current 2>/dev/null)
2882
+ RESET="\\033[0m"; BOLD="\\033[1m"; CYAN="\\033[36m"; YELLOW="\\033[33m"; GREEN="\\033[32m"; MAGENTA="\\033[35m"; BLUE="\\033[34m"; DIM="\\033[2m"; RED="\\033[31m"
2883
+ printf "\$BOLD\$MODEL\$RESET in \$CYAN\$DIR\$RESET"
2884
+ [ -n "\$BRANCH" ] && printf " on \$YELLOW⎇ \$BRANCH\$RESET"
2885
+ echo
2886
+ INTEL_FILE=""
2887
+ for P in "\$CWD/.ruvector/intelligence.json" "\$CWD/npm/packages/ruvector/.ruvector/intelligence.json" "\$HOME/.ruvector/intelligence.json"; do
2888
+ [ -f "\$P" ] && INTEL_FILE="\$P" && break
2889
+ done
2890
+ if [ -n "\$INTEL_FILE" ]; then
2891
+ INTEL=\$(cat "\$INTEL_FILE" 2>/dev/null)
2892
+ MEMORY_COUNT=\$(echo "\$INTEL" | jq -r '.memories | length // 0' 2>/dev/null)
2893
+ TRAJ_COUNT=\$(echo "\$INTEL" | jq -r '.trajectories | length // 0' 2>/dev/null)
2894
+ SESSION_COUNT=\$(echo "\$INTEL" | jq -r '.stats.session_count // 0' 2>/dev/null)
2895
+ PATTERN_COUNT=\$(echo "\$INTEL" | jq -r '.patterns | length // 0' 2>/dev/null)
2896
+ printf "\$MAGENTA🧠 RuVector\$RESET"
2897
+ [ "\$PATTERN_COUNT" != "null" ] && [ "\$PATTERN_COUNT" -gt 0 ] 2>/dev/null && printf " \$GREEN◆\$RESET \$PATTERN_COUNT patterns" || printf " \$DIM◇ learning\$RESET"
2898
+ [ "\$MEMORY_COUNT" != "null" ] && [ "\$MEMORY_COUNT" -gt 0 ] 2>/dev/null && printf " \$BLUE⬡\$RESET \$MEMORY_COUNT mem"
2899
+ [ "\$TRAJ_COUNT" != "null" ] && [ "\$TRAJ_COUNT" -gt 0 ] 2>/dev/null && printf " \$YELLOW↝\$RESET\$TRAJ_COUNT"
2900
+ [ "\$SESSION_COUNT" != "null" ] && [ "\$SESSION_COUNT" -gt 0 ] 2>/dev/null && printf " \$DIM#\$SESSION_COUNT\$RESET"
2901
+ echo
2848
2902
  else
2849
- echo "🧠 RuVector"
2903
+ printf "\$DIM🧠 RuVector: run 'npx ruvector hooks session-start' to initialize\$RESET\\n"
2850
2904
  fi
2851
2905
  `;
2852
- fs.writeFileSync(statuslineScript, statuslineContent);
2853
- fs.chmodSync(statuslineScript, '755');
2854
- settings.statusLine = {
2855
- type: 'command',
2856
- command: '.claude/statusline.sh'
2857
- };
2858
- console.log(chalk.blue(' ✓ StatusLine configured'));
2906
+ fs.writeFileSync(statuslineScript, statuslineContent);
2907
+ fs.chmodSync(statuslineScript, '755');
2908
+ settings.statusLine = {
2909
+ type: 'command',
2910
+ command: '.claude/statusline-command.sh'
2911
+ };
2912
+ }
2913
+ console.log(chalk.blue(` ✓ StatusLine configured (${isWindows ? 'PowerShell' : 'Bash'})`));
2859
2914
  }
2860
2915
  }
2861
2916
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
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",