tree-sitter-analyzer 1.3.9__py3-none-any.whl → 1.4.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 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__ = "1.3.9"
14
+ __version__ = "1.4.1"
15
15
  __author__ = "aisheng.yu"
16
16
  __email__ = "aimasteracc@gmail.com"
17
17
 
@@ -335,23 +335,36 @@ class FindAndGrepTool(BaseMCPTool):
335
335
  }
336
336
 
337
337
  # rg step on files list
338
- # Note: --files-from is not supported, so we'll use parent directories as roots
338
+ # Create specific file globs to limit search to only the files found by fd
339
339
  from pathlib import Path
340
340
 
341
341
  parent_dirs = set()
342
+ file_globs = []
343
+
342
344
  for file_path in files:
343
- parent_dirs.add(str(Path(file_path).parent))
345
+ parent_dir = str(Path(file_path).parent)
346
+ parent_dirs.add(parent_dir)
347
+
348
+ # Create a specific glob pattern for this exact file
349
+ file_name = Path(file_path).name
350
+ # Escape special characters in filename for glob pattern
351
+ escaped_name = file_name.replace("[", "[[]").replace("]", "[]]")
352
+ file_globs.append(escaped_name)
344
353
 
345
- # Use parent directories as roots for compatibility
354
+ # Use parent directories as roots but limit to specific files via globs
346
355
  rg_roots = list(parent_dirs)
347
356
 
357
+ # Combine user-provided include_globs with our file-specific globs
358
+ combined_include_globs = arguments.get("include_globs", []) or []
359
+ combined_include_globs.extend(file_globs)
360
+
348
361
  rg_cmd = fd_rg_utils.build_rg_command(
349
362
  query=arguments["query"],
350
363
  case=arguments.get("case", "smart"),
351
364
  fixed_strings=bool(arguments.get("fixed_strings", False)),
352
365
  word=bool(arguments.get("word", False)),
353
366
  multiline=bool(arguments.get("multiline", False)),
354
- include_globs=arguments.get("include_globs"),
367
+ include_globs=combined_include_globs,
355
368
  exclude_globs=arguments.get("exclude_globs"),
356
369
  follow_symlinks=bool(arguments.get("follow_symlinks", False)),
357
370
  hidden=bool(arguments.get("hidden", False)),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tree-sitter-analyzer
3
- Version: 1.3.9
3
+ Version: 1.4.1
4
4
  Summary: Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
5
5
  Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
6
6
  Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
@@ -172,10 +172,10 @@ Description-Content-Type: text/markdown
172
172
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
173
173
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
174
174
  [![Tests](https://img.shields.io/badge/tests-1797%20passed-brightgreen.svg)](#quality-assurance)
175
- [![Coverage](https://img.shields.io/badge/coverage-74.46%25-green.svg)](#quality-assurance)
175
+ [![Coverage](https://img.shields.io/badge/coverage-74.45%25-green.svg)](#quality-assurance)
176
176
  [![Quality](https://img.shields.io/badge/quality-enterprise%20grade-blue.svg)](#quality-assurance)
177
177
  [![PyPI](https://img.shields.io/pypi/v/tree-sitter-analyzer.svg)](https://pypi.org/project/tree-sitter-analyzer/)
178
- [![Version](https://img.shields.io/badge/version-1.3.9-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
178
+ [![Version](https://img.shields.io/badge/version-1.4.1-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
179
179
  [![GitHub Stars](https://img.shields.io/github/stars/aimasteracc/tree-sitter-analyzer.svg?style=social)](https://github.com/aimasteracc/tree-sitter-analyzer)
180
180
 
181
181
  ## 🚀 Break LLM Token Limits, Let AI Understand Code Files of Any Size
@@ -1008,15 +1008,15 @@ Tree-sitter Analyzer automatically detects and protects project boundaries:
1008
1008
 
1009
1009
  ### 📊 **Quality Metrics**
1010
1010
  - **1,797 tests** - 100% pass rate ✅
1011
- - **74.46% code coverage** - Industry-leading level
1011
+ - **74.45% code coverage** - Industry-leading level
1012
1012
  - **Zero test failures** - Fully CI/CD ready
1013
1013
  - **Cross-platform compatibility** - Windows, macOS, Linux
1014
1014
 
1015
- ### ⚡ **Latest Quality Achievements (v1.3.9)**
1015
+ ### ⚡ **Latest Quality Achievements (v1.4.1)**
1016
1016
  - ✅ **Cross-platform path compatibility** - Fixed Windows short path names and macOS symbolic link differences
1017
1017
  - ✅ **Windows environment** - Implemented robust path normalization using Windows API
1018
1018
  - ✅ **macOS environment** - Fixed `/var` vs `/private/var` symbolic link differences
1019
- - ✅ **Comprehensive test coverage** - 1797 tests, 74.46% coverage
1019
+ - ✅ **Comprehensive test coverage** - 1797 tests, 74.45% coverage
1020
1020
  - ✅ **GitFlow implementation** - Professional development/release branch strategy. See [GitFlow documentation](GITFLOW.md) for details.
1021
1021
 
1022
1022
  ### ⚙️ **Running Tests**
@@ -1133,9 +1133,9 @@ All AI prompts in this document have been thoroughly tested in real environments
1133
1133
 
1134
1134
  **Test Environment:**
1135
1135
  - Operating System: Windows 10
1136
- - Project: tree-sitter-analyzer v1.3.9
1136
+ - Project: tree-sitter-analyzer v1.4.1
1137
1137
  - Test Files: BigService.java (1419 lines), sample.py (256 lines), MultiClass.java (54 lines)
1138
- - Test Coverage: 1797 tests passed, 74.46% coverage
1138
+ - Test Coverage: 1797 tests passed, 74.45% coverage
1139
1139
  - Test Tools: All MCP tools (check_code_scale, analyze_code_structure, extract_code_section, query_code, list_files, search_content, find_and_grep)
1140
1140
 
1141
1141
  **🚀 Start Now** → [30-Second Quick Start](#-30-second-quick-start)
@@ -1,4 +1,4 @@
1
- tree_sitter_analyzer/__init__.py,sha256=gK2wP-miVipxTdSm9U2sq_FatIeudBPz108Z6Cmq0MQ,3067
1
+ tree_sitter_analyzer/__init__.py,sha256=nQl48OgTyirj1zOOkgOC_CYkFVJ40XhpsdAG_A9buIQ,3067
2
2
  tree_sitter_analyzer/__main__.py,sha256=Zl79tpe4UaMu-7yeztc06tgP0CVMRnvGgas4ZQP5SCs,228
3
3
  tree_sitter_analyzer/api.py,sha256=N_bcf1pLwzXS3elPn30OySLR6ehsHdWpchXMycjl0PY,17399
4
4
  tree_sitter_analyzer/cli_main.py,sha256=jWjVJ5AgNmtf6Z7CgeK3IF-zi7yIiu9zn4Oyvzl-iNQ,10349
@@ -61,7 +61,7 @@ tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py,sha256=JyS9gey2oFoWjzsiiLjw
61
61
  tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py,sha256=mssed7bEfGeGxW4mOf7dg8BDS1oqHLolIBNX9DaZ3DM,8997
62
62
  tree_sitter_analyzer/mcp/tools/base_tool.py,sha256=qf2My325azlnKOugNVMN_R1jtZcjXVy354sGVKzvZls,3546
63
63
  tree_sitter_analyzer/mcp/tools/fd_rg_utils.py,sha256=R1ICH40vkWO3OdKZjxok9ptQZpZ6-tM5SkLHHOC4-BE,17749
64
- tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py,sha256=D7eNjPZzV1YRo7VktvUqq7xNn4V8AS8429XjOBWXLsw,21531
64
+ tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py,sha256=G-aExFZUvpJtitmEfYAClsHmQ1p3HqsT4IkOlym9R_o,22100
65
65
  tree_sitter_analyzer/mcp/tools/list_files_tool.py,sha256=TA1BRQtb-D5x1pD-IcRJYnP0WnnFfl9q7skI25MOdHk,12873
66
66
  tree_sitter_analyzer/mcp/tools/query_tool.py,sha256=1xY1ONNY2sIFJxoILlnNzBnwGVgzEF7vVJ2ccqR9auA,10879
67
67
  tree_sitter_analyzer/mcp/tools/read_partial_tool.py,sha256=BMAJF205hTIrYTQJG6N1-vVuKSby2CSm9nWzSMMWceI,11339
@@ -85,7 +85,7 @@ tree_sitter_analyzer/security/__init__.py,sha256=ZTqTt24hsljCpTXAZpJC57L7MU5lJLT
85
85
  tree_sitter_analyzer/security/boundary_manager.py,sha256=3eeENRKWtz2pyZHzd8DiVaq8fdeC6s1eVOuBylSmQPg,9347
86
86
  tree_sitter_analyzer/security/regex_checker.py,sha256=jWK6H8PTPgzbwRPfK_RZ8bBTS6rtEbgjY5vr3YWjQ_U,9616
87
87
  tree_sitter_analyzer/security/validator.py,sha256=yR4qTWEcXpR--bSFwtWvSgY0AzqujOFAqlc1Z7dlTdk,9809
88
- tree_sitter_analyzer-1.3.9.dist-info/METADATA,sha256=v-HAPZHh6YCVlatOSd4Kn51xP8w_NT8nhZ_Z1mDqHqg,44081
89
- tree_sitter_analyzer-1.3.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
- tree_sitter_analyzer-1.3.9.dist-info/entry_points.txt,sha256=dEQkGMGmGGBzssEKlXW9F0-VlO3XJW2fJUv9i7898Ho,701
91
- tree_sitter_analyzer-1.3.9.dist-info/RECORD,,
88
+ tree_sitter_analyzer-1.4.1.dist-info/METADATA,sha256=x_rG0V8aNYSxNu7BAoO2RZDSC0UDOl11u3mavHYOXSY,44081
89
+ tree_sitter_analyzer-1.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
+ tree_sitter_analyzer-1.4.1.dist-info/entry_points.txt,sha256=dEQkGMGmGGBzssEKlXW9F0-VlO3XJW2fJUv9i7898Ho,701
91
+ tree_sitter_analyzer-1.4.1.dist-info/RECORD,,