ruvector 0.1.72 → 0.1.74

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 +18 -12
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -2842,32 +2842,38 @@ hooksCmd.command('init')
2842
2842
  // Windows: PowerShell statusline
2843
2843
  const statuslineScript = path.join(settingsDir, 'statusline-command.ps1');
2844
2844
  const statuslineContent = `# RuVector Intelligence Statusline for Windows PowerShell
2845
+ # Compatible with PowerShell 5.1+ and PowerShell Core
2845
2846
  $ErrorActionPreference = "SilentlyContinue"
2847
+ $e = [char]27
2846
2848
  $inputData = [Console]::In.ReadToEnd()
2847
2849
  $data = $inputData | ConvertFrom-Json
2848
2850
  $Model = if ($data.model.display_name) { $data.model.display_name } else { "Claude" }
2849
2851
  $CWD = if ($data.workspace.current_dir) { $data.workspace.current_dir } else { $data.cwd }
2850
2852
  $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"
2853
+ $Branch = $null
2854
+ try { Push-Location $CWD -ErrorAction Stop; $Branch = git branch --show-current 2>$null; Pop-Location } catch {}
2855
+ Write-Host "$e[1m$Model$e[0m in $e[36m$Dir$e[0m$(if($Branch){" on $e[33m$Branch$e[0m"})"
2856
+ $IntelFile = Join-Path $CWD ".ruvector\intelligence.json"
2857
2857
  if (Test-Path $IntelFile) {
2858
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"
2859
+ $Mem = if ($Intel.memories) { $Intel.memories.Count } else { 0 }
2860
+ $Traj = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 }
2861
+ $Sess = if ($Intel.stats -and $Intel.stats.session_count) { $Intel.stats.session_count } else { 0 }
2862
+ $Pat = if ($Intel.patterns) { ($Intel.patterns | Get-Member -MemberType NoteProperty).Count } else { 0 }
2863
+ $Line2 = "$e[35m RuVector$e[0m"
2864
+ if ($Pat -gt 0) { $Line2 += " $e[32m$Pat patterns$e[0m" } else { $Line2 += " $e[2mlearning$e[0m" }
2865
+ if ($Mem -gt 0) { $Line2 += " $e[34m$Mem mem$e[0m" }
2866
+ if ($Traj -gt 0) { $Line2 += " $e[33m$Traj traj$e[0m" }
2867
+ if ($Sess -gt 0) { $Line2 += " $e[2m#$Sess$e[0m" }
2868
+ Write-Host $Line2
2863
2869
  } else {
2864
- Write-Host "$Dim🧠 RuVector: run 'npx ruvector hooks session-start' to initialize$Reset"
2870
+ Write-Host "$e[2m RuVector: run 'npx ruvector hooks session-start'$e[0m"
2865
2871
  }
2866
2872
  `;
2867
2873
  fs.writeFileSync(statuslineScript, statuslineContent);
2868
2874
  settings.statusLine = {
2869
2875
  type: 'command',
2870
- command: '.claude/statusline-command.ps1'
2876
+ command: 'powershell -NoProfile -ExecutionPolicy Bypass -File .claude/statusline-command.ps1'
2871
2877
  };
2872
2878
  } else {
2873
2879
  // Unix (macOS, Linux): Bash statusline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
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",