tree-sitter-analyzer 0.8.2__py3-none-any.whl → 0.8.3__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 tree-sitter-analyzer might be problematic. Click here for more details.

@@ -11,7 +11,7 @@ Architecture:
11
11
  - Data Models: Generic and language-specific code element representations
12
12
  """
13
13
 
14
- __version__ = "0.8.2"
14
+ __version__ = "0.8.3"
15
15
  __author__ = "aisheng.yu"
16
16
  __email__ = "aimasteracc@gmail.com"
17
17
 
@@ -47,7 +47,9 @@ class BaseCommand(ABC):
47
47
  return False
48
48
 
49
49
  # Security validation
50
- is_valid, error_msg = self.security_validator.validate_file_path(self.args.file_path)
50
+ is_valid, error_msg = self.security_validator.validate_file_path(
51
+ self.args.file_path, base_path=self.project_root
52
+ )
51
53
  if not is_valid:
52
54
  output_error(f"Invalid file path: {error_msg}")
53
55
  return False
@@ -77,6 +77,16 @@ class TreeSitterAnalyzerMCPServer:
77
77
 
78
78
  self.analysis_engine = get_analysis_engine(project_root)
79
79
  self.security_validator = SecurityValidator(project_root)
80
+ # Ensure boundary manager exposes the exact provided project_root for consistency in tests/environments
81
+ try:
82
+ import os as _os
83
+ if self.security_validator.boundary_manager and project_root:
84
+ provided_root = _os.path.abspath(project_root)
85
+ self.security_validator.boundary_manager.project_root = provided_root
86
+ # Keep allowed directories in sync with the exposed project_root
87
+ self.security_validator.boundary_manager.allowed_directories = {provided_root}
88
+ except Exception:
89
+ pass
80
90
  # Use unified analysis engine instead of deprecated AdvancedAnalyzer
81
91
 
82
92
  # Initialize MCP tools with security validation