mcp-vector-search 0.12.0__py3-none-any.whl → 0.12.1__py3-none-any.whl

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.

Potentially problematic release.


This version of mcp-vector-search might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  """MCP Vector Search - CLI-first semantic code search with MCP integration."""
2
2
 
3
- __version__ = "0.12.0"
4
- __build__ = "50"
3
+ __version__ = "0.12.1"
4
+ __build__ = "51"
5
5
  __author__ = "Robert Matsuoka"
6
6
  __email__ = "bobmatnyc@gmail.com"
7
7
 
@@ -337,13 +337,14 @@ async def _run_batch_indexing(
337
337
  # Rebuild directory index after indexing completes
338
338
  try:
339
339
  import os
340
+
340
341
  chunk_stats = {}
341
342
  for file_path in files_to_index:
342
343
  try:
343
344
  mtime = os.path.getmtime(file_path)
344
345
  chunk_stats[str(file_path)] = {
345
- 'modified': mtime,
346
- 'chunks': 1, # Placeholder - real counts are in database
346
+ "modified": mtime,
347
+ "chunks": 1, # Placeholder - real counts are in database
347
348
  }
348
349
  except OSError:
349
350
  pass
@@ -361,13 +362,13 @@ async def _run_batch_indexing(
361
362
  console.print(
362
363
  f"[yellow]⚠ {failed_count} files failed to index[/yellow]"
363
364
  )
364
- error_log_path = indexer.project_root / ".mcp-vector-search" / "indexing_errors.log"
365
+ error_log_path = (
366
+ indexer.project_root / ".mcp-vector-search" / "indexing_errors.log"
367
+ )
365
368
  if error_log_path.exists():
366
369
  # Prune log to keep only last 1000 errors
367
370
  _prune_error_log(error_log_path, max_lines=1000)
368
- console.print(
369
- f"[dim] → See details in: {error_log_path}[/dim]"
370
- )
371
+ console.print(f"[dim] → See details in: {error_log_path}[/dim]")
371
372
  else:
372
373
  # Non-progress mode (fallback to original behavior)
373
374
  indexed_count = await indexer.index_project(
@@ -674,22 +675,10 @@ def watch_cmd(
674
675
  watch_app()
675
676
 
676
677
 
677
- @index_app.command("auto")
678
- def auto_cmd() -> None:
679
- """🔄 Manage automatic indexing.
680
-
681
- Configure automatic indexing strategies like git hooks and scheduled tasks.
682
- This command provides subcommands for setup, status, and checking.
678
+ # Import and register auto-index sub-app as a proper typer group
679
+ from .auto_index import auto_index_app # noqa: E402
683
680
 
684
- Examples:
685
- mcp-vector-search index auto setup
686
- mcp-vector-search index auto status
687
- mcp-vector-search index auto check
688
- """
689
- from .auto_index import auto_index_app
690
-
691
- # This will show help for the auto subcommands
692
- auto_index_app()
681
+ index_app.add_typer(auto_index_app, name="auto", help="🔄 Manage automatic indexing")
693
682
 
694
683
 
695
684
  @index_app.command("health")
@@ -733,17 +722,19 @@ def _prune_error_log(log_path: Path, max_lines: int = 1000) -> None:
733
722
  max_lines: Maximum number of lines to keep (default: 1000)
734
723
  """
735
724
  try:
736
- with open(log_path, 'r') as f:
725
+ with open(log_path) as f:
737
726
  lines = f.readlines()
738
727
 
739
728
  if len(lines) > max_lines:
740
729
  # Keep only the last max_lines lines
741
730
  pruned_lines = lines[-max_lines:]
742
731
 
743
- with open(log_path, 'w') as f:
732
+ with open(log_path, "w") as f:
744
733
  f.writelines(pruned_lines)
745
734
 
746
- logger.debug(f"Pruned error log from {len(lines)} to {len(pruned_lines)} lines")
735
+ logger.debug(
736
+ f"Pruned error log from {len(lines)} to {len(pruned_lines)} lines"
737
+ )
747
738
  except Exception as e:
748
739
  logger.warning(f"Failed to prune error log: {e}")
749
740