tree-sitter-analyzer 1.1.3__py3-none-any.whl → 1.2.2__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.
- tree_sitter_analyzer/cli/commands/advanced_command.py +145 -6
- tree_sitter_analyzer/cli/commands/structure_command.py +23 -5
- tree_sitter_analyzer/cli/commands/summary_command.py +19 -4
- tree_sitter_analyzer/cli/commands/table_command.py +14 -6
- tree_sitter_analyzer/constants.py +68 -0
- tree_sitter_analyzer/core/analysis_engine.py +0 -5
- tree_sitter_analyzer/core/engine.py +0 -12
- tree_sitter_analyzer/interfaces/cli_adapter.py +27 -12
- tree_sitter_analyzer/interfaces/mcp_adapter.py +31 -15
- tree_sitter_analyzer/mcp/server.py +187 -35
- tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +42 -19
- tree_sitter_analyzer/mcp/tools/base_tool.py +90 -5
- tree_sitter_analyzer/mcp/tools/query_tool.py +73 -6
- tree_sitter_analyzer/mcp/tools/read_partial_tool.py +3 -6
- tree_sitter_analyzer/mcp/tools/table_format_tool.py +37 -11
- tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +102 -22
- tree_sitter_analyzer/models.py +138 -43
- tree_sitter_analyzer/security/boundary_manager.py +29 -9
- tree_sitter_analyzer/security/validator.py +16 -3
- {tree_sitter_analyzer-1.1.3.dist-info → tree_sitter_analyzer-1.2.2.dist-info}/METADATA +298 -127
- {tree_sitter_analyzer-1.1.3.dist-info → tree_sitter_analyzer-1.2.2.dist-info}/RECORD +23 -22
- {tree_sitter_analyzer-1.1.3.dist-info → tree_sitter_analyzer-1.2.2.dist-info}/WHEEL +0 -0
- {tree_sitter_analyzer-1.1.3.dist-info → tree_sitter_analyzer-1.2.2.dist-info}/entry_points.txt +0 -0
|
@@ -36,9 +36,22 @@ class SecurityValidator:
|
|
|
36
36
|
Args:
|
|
37
37
|
project_root: Optional project root directory for boundary checks
|
|
38
38
|
"""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
# Ensure project_root is properly resolved if provided
|
|
40
|
+
if project_root:
|
|
41
|
+
try:
|
|
42
|
+
resolved_root = str(Path(project_root).resolve())
|
|
43
|
+
self.boundary_manager = ProjectBoundaryManager(resolved_root)
|
|
44
|
+
log_debug(
|
|
45
|
+
f"SecurityValidator initialized with resolved project_root: {resolved_root}"
|
|
46
|
+
)
|
|
47
|
+
except Exception as e:
|
|
48
|
+
log_warning(
|
|
49
|
+
f"Failed to initialize ProjectBoundaryManager with {project_root}: {e}"
|
|
50
|
+
)
|
|
51
|
+
self.boundary_manager = None
|
|
52
|
+
else:
|
|
53
|
+
self.boundary_manager = None
|
|
54
|
+
|
|
42
55
|
self.regex_checker = RegexSafetyChecker()
|
|
43
56
|
|
|
44
57
|
log_debug(f"SecurityValidator initialized with project_root: {project_root}")
|