tree-sitter-analyzer 0.8.3__tar.gz → 0.9.1__tar.gz
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-0.8.3 → tree_sitter_analyzer-0.9.1}/CHANGELOG.md +36 -14
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/PKG-INFO +28 -19
- tree_sitter_analyzer-0.9.1/PYPI_RELEASE_GUIDE.md +125 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/README.md +27 -18
- tree_sitter_analyzer-0.9.1/RELEASE_NOTES_v0.9.1.md +100 -0
- tree_sitter_analyzer-0.9.1/UPLOAD_COMMANDS.md +90 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/pyproject.toml +343 -345
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/__init__.py +1 -1
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/base_command.py +1 -3
- tree_sitter_analyzer-0.9.1/tree_sitter_analyzer/mcp/__init__.py +45 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/server.py +185 -53
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +673 -677
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +9 -4
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +4 -4
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/security/boundary_manager.py +237 -279
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/security/validator.py +241 -244
- tree_sitter_analyzer-0.9.1/upload_interactive.py +167 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/uv.lock +830 -830
- tree_sitter_analyzer-0.8.3/RELEASE_CHECKLIST_v0.8.2.md +0 -182
- tree_sitter_analyzer-0.8.3/RELEASE_NOTES_v0.8.2.md +0 -181
- tree_sitter_analyzer-0.8.3/tree_sitter_analyzer/mcp/__init__.py +0 -31
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/.gitignore +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/.pre-commit-config.yaml +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/AI_COLLABORATION_GUIDE.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/CODE_STYLE_GUIDE.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/CONTRIBUTING.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/DEPLOYMENT_GUIDE.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/LLM_CODING_GUIDELINES.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/MCP_SETUP_DEVELOPERS.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/MCP_SETUP_USERS.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/PROJECT_ROOT_CONFIG.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/README_ja.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/README_zh.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/build_standalone.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/check_quality.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/docs/api.md +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/BigService.java +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/BigService.json +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/BigService.summary.json +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/JavaDocTest.java +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/MultiClass.java +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/Sample.java +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/calculate_token_comparison.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/project_root_demo.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/sample.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/security_demo.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/examples/security_integration_demo.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/llm_code_checker.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/pytest.ini +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/start_mcp_server.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/__main__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/api.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/__main__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/advanced_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/default_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/partial_read_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/query_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/structure_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/summary_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/commands/table_command.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli/info_commands.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/cli_main.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/analysis_engine.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/cache_service.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/engine.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/parser.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/core/query.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/encoding_utils.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/exceptions.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/file_handler.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/formatters/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/formatters/base_formatter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/formatters/formatter_factory.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/formatters/java_formatter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/formatters/python_formatter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/interfaces/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/interfaces/cli.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/interfaces/cli_adapter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/interfaces/mcp_adapter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/interfaces/mcp_server.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/language_detector.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/language_loader.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/languages/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/languages/java_plugin.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/languages/javascript_plugin.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/languages/python_plugin.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/resources/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/resources/code_file_resource.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/base_tool.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/table_format_tool.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/utils/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/mcp/utils/error_handler.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/models.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/output_manager.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/plugins/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/plugins/base.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/plugins/manager.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/project_detector.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/queries/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/queries/java.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/queries/javascript.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/queries/python.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/queries/typescript.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/query_loader.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/security/__init__.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/security/regex_checker.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/table_formatter.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/tree_sitter_analyzer/utils.py +0 -0
- {tree_sitter_analyzer-0.8.3 → tree_sitter_analyzer-0.9.1}/upload_to_pypi.py +0 -0
|
@@ -1,24 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [Unreleased]
|
|
4
|
-
|
|
5
|
-
## [0.8.3] - 2025-08-11
|
|
6
|
-
|
|
7
|
-
### Fixed
|
|
8
|
-
- CLI: Ensure security validation error messaging uses "Invalid file path" when path fails project boundary checks.
|
|
9
|
-
- Windows: Normalize project root handling to avoid 8.3 short/long path mismatches in MCP server and security boundary checks.
|
|
10
|
-
- Security: Improve absolute-path validation on Windows to also treat leading `/` or `\\` as absolute and gate by project root.
|
|
11
|
-
- MCP AnalyzeScaleTool: Return `ValueError("Invalid file path ...")` for invalid input paths (previously `FileNotFoundError`).
|
|
12
|
-
- Boundary Manager: Use `os.path.realpath` for `project_root` to align with expectations in tests and relative-path calculations.
|
|
13
|
-
|
|
14
|
-
### Performance
|
|
15
|
-
- AnalyzeScaleToolCLICompatible: Use `time.perf_counter()` and measure only the engine call to improve timing accuracy and reduce measured latency.
|
|
16
|
-
|
|
17
3
|
All notable changes to this project will be documented in this file.
|
|
18
4
|
|
|
19
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
20
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
21
7
|
|
|
8
|
+
## [0.9.1] - 2025-08-12
|
|
9
|
+
|
|
10
|
+
### 🎯 MCP Tools Unification & Simplification
|
|
11
|
+
|
|
12
|
+
#### 🔧 Unified Tool Names
|
|
13
|
+
- **BREAKING**: Simplified MCP tools to 3 core tools with clear naming:
|
|
14
|
+
- `check_code_scale` - Step 1: Check file scale and complexity
|
|
15
|
+
- `analyze_code_structure` - Step 2: Generate structure tables with line positions
|
|
16
|
+
- `extract_code_section` - Step 3: Extract specific code sections by line range
|
|
17
|
+
- **Removed**: Backward compatibility for old tool names (`analyze_code_scale`, `read_code_partial`, `format_table`, `analyze_code_universal`)
|
|
18
|
+
- **Enhanced**: Tool descriptions with step numbers and usage guidance
|
|
19
|
+
|
|
20
|
+
#### 📋 Parameter Standardization
|
|
21
|
+
- **Standardized**: All parameters use snake_case naming convention
|
|
22
|
+
- **Fixed**: Common LLM parameter mistakes with clear validation
|
|
23
|
+
- **Required**: `file_path` parameter for all tools
|
|
24
|
+
- **Required**: `start_line` parameter for `extract_code_section`
|
|
25
|
+
|
|
26
|
+
#### 📖 Documentation Improvements
|
|
27
|
+
- **Updated**: README.md with unified tool workflow examples
|
|
28
|
+
- **Enhanced**: MCP_INFO with workflow guidance
|
|
29
|
+
- **Simplified**: Removed redundant documentation files
|
|
30
|
+
- **Added**: Clear three-step workflow instructions for LLMs
|
|
31
|
+
|
|
32
|
+
#### 🧪 Test Suite Updates
|
|
33
|
+
- **Fixed**: All MCP-related tests updated for new tool names
|
|
34
|
+
- **Updated**: 138 MCP tests passing with new unified structure
|
|
35
|
+
- **Enhanced**: Test coverage for unified tool workflow
|
|
36
|
+
- **Maintained**: 100% backward compatibility in core analysis engine
|
|
37
|
+
|
|
38
|
+
#### 🎉 Benefits
|
|
39
|
+
- **Simplified**: LLM integration with clear tool naming
|
|
40
|
+
- **Reduced**: Parameter confusion with consistent snake_case
|
|
41
|
+
- **Improved**: Workflow clarity with numbered steps
|
|
42
|
+
- **Enhanced**: Error messages with available tool suggestions
|
|
43
|
+
|
|
22
44
|
## [0.8.2] - 2025-08-05
|
|
23
45
|
|
|
24
46
|
### 🎯 Major Quality Improvements
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tree-sitter-analyzer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.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
|
|
@@ -137,7 +137,7 @@ Description-Content-Type: text/markdown
|
|
|
137
137
|
|
|
138
138
|
[](https://python.org)
|
|
139
139
|
[](LICENSE)
|
|
140
|
-
[](#testing)
|
|
141
141
|
[](#testing)
|
|
142
142
|
[](#quality)
|
|
143
143
|
|
|
@@ -228,11 +228,10 @@ Extract specific code sections efficiently:
|
|
|
228
228
|
- Content length information
|
|
229
229
|
|
|
230
230
|
### 3. AI Assistant Integration
|
|
231
|
-
|
|
232
|
-
- `
|
|
233
|
-
- `analyze_code_structure` - Generate detailed structure tables
|
|
234
|
-
- `
|
|
235
|
-
- `analyze_code_universal` - Universal analysis with auto-detection
|
|
231
|
+
Three-step workflow MCP tools for AI assistants:
|
|
232
|
+
- `check_code_scale` - **Step 1:** Get code metrics and complexity
|
|
233
|
+
- `analyze_code_structure` - **Step 2:** Generate detailed structure tables with line positions
|
|
234
|
+
- `extract_code_section` - **Step 3:** Extract specific code sections by line range
|
|
236
235
|
|
|
237
236
|
### 4. Multi-Language Support
|
|
238
237
|
- **Java** - Full support with advanced analysis
|
|
@@ -244,14 +243,25 @@ Four powerful MCP tools for AI assistants:
|
|
|
244
243
|
|
|
245
244
|
### AI Assistant Usage (via Claude Desktop)
|
|
246
245
|
|
|
247
|
-
**Step 1:
|
|
248
|
-
|
|
246
|
+
**Step 1: Check code scale**
|
|
247
|
+
```
|
|
248
|
+
Use tool: check_code_scale
|
|
249
|
+
Parameters: {"file_path": "examples/Sample.java"}
|
|
250
|
+
```
|
|
249
251
|
|
|
250
|
-
**Step 2: Analyze
|
|
251
|
-
|
|
252
|
+
**Step 2: Analyze structure (for large files >100 lines)**
|
|
253
|
+
```
|
|
254
|
+
Use tool: analyze_code_structure
|
|
255
|
+
Parameters: {"file_path": "examples/Sample.java", "format_type": "full"}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Step 3: Extract specific code (using line positions from step 2)**
|
|
259
|
+
```
|
|
260
|
+
Use tool: extract_code_section
|
|
261
|
+
Parameters: {"file_path": "examples/Sample.java", "start_line": 84, "end_line": 86}
|
|
262
|
+
```
|
|
252
263
|
|
|
253
|
-
**
|
|
254
|
-
> "Show me lines 84-86 from examples/Sample.java"
|
|
264
|
+
> **Note:** Always use snake_case parameter names: `file_path`, `start_line`, `end_line`, `format_type`
|
|
255
265
|
|
|
256
266
|
### CLI Usage
|
|
257
267
|
|
|
@@ -344,12 +354,11 @@ This project maintains **enterprise-grade quality** with comprehensive testing:
|
|
|
344
354
|
- **Zero test failures** - Complete CI/CD readiness
|
|
345
355
|
- **Cross-platform compatibility** - Windows, macOS, Linux
|
|
346
356
|
|
|
347
|
-
### 🏆 Recent Quality Achievements (v0.8.2
|
|
348
|
-
- ✅ **Complete test suite stabilization** -
|
|
349
|
-
- ✅ **
|
|
350
|
-
- ✅ **
|
|
351
|
-
- ✅ **
|
|
352
|
-
- ✅ **Security framework enhancements** - Better project boundary management
|
|
357
|
+
### 🏆 Recent Quality Achievements (v0.8.2)
|
|
358
|
+
- ✅ **Complete test suite stabilization** - Fixed all 31 failing tests
|
|
359
|
+
- ✅ **Formatters module breakthrough** - 0% → 42.30% coverage
|
|
360
|
+
- ✅ **Error handling improvements** - 61.64% → 82.76% coverage
|
|
361
|
+
- ✅ **104 new comprehensive tests** across critical modules
|
|
353
362
|
|
|
354
363
|
### 🔧 Running Tests
|
|
355
364
|
```bash
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# PyPI Release Guide for tree-sitter-analyzer v0.9.1
|
|
2
|
+
|
|
3
|
+
## 📦 Package Ready for Release
|
|
4
|
+
|
|
5
|
+
✅ **All tests passed**: 306 tests
|
|
6
|
+
✅ **Package built**: `dist/tree_sitter_analyzer-0.9.1-py3-none-any.whl`
|
|
7
|
+
✅ **Source distribution**: `dist/tree_sitter_analyzer-0.9.1.tar.gz`
|
|
8
|
+
✅ **Documentation updated**: README, CHANGELOG, release notes
|
|
9
|
+
✅ **GitHub released**: Tagged v0.9.1 and pushed
|
|
10
|
+
|
|
11
|
+
## 🚀 Manual PyPI Release Steps
|
|
12
|
+
|
|
13
|
+
### Option 1: Using uv (Recommended)
|
|
14
|
+
|
|
15
|
+
1. **Get PyPI API Token**:
|
|
16
|
+
- Go to https://pypi.org/account/register/ (create account if needed)
|
|
17
|
+
- Go to https://pypi.org/manage/account/token/
|
|
18
|
+
- Create a new API token with scope "Entire account"
|
|
19
|
+
- Copy the token (starts with `pypi-`)
|
|
20
|
+
|
|
21
|
+
2. **Set Environment Variable**:
|
|
22
|
+
```bash
|
|
23
|
+
# Windows
|
|
24
|
+
set UV_PUBLISH_TOKEN=pypi-your-token-here
|
|
25
|
+
|
|
26
|
+
# Linux/Mac
|
|
27
|
+
export UV_PUBLISH_TOKEN=pypi-your-token-here
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. **Upload to PyPI**:
|
|
31
|
+
```bash
|
|
32
|
+
uv publish
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Option 2: Using twine
|
|
36
|
+
|
|
37
|
+
1. **Install twine**:
|
|
38
|
+
```bash
|
|
39
|
+
uv add --dev twine
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
2. **Upload to PyPI**:
|
|
43
|
+
```bash
|
|
44
|
+
uv run twine upload dist/*
|
|
45
|
+
```
|
|
46
|
+
- Enter username: `__token__`
|
|
47
|
+
- Enter password: `pypi-your-token-here`
|
|
48
|
+
|
|
49
|
+
### Option 3: Test PyPI First (Recommended)
|
|
50
|
+
|
|
51
|
+
1. **Upload to Test PyPI**:
|
|
52
|
+
```bash
|
|
53
|
+
uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-your-test-token
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. **Test Installation**:
|
|
57
|
+
```bash
|
|
58
|
+
pip install --index-url https://test.pypi.org/simple/ tree-sitter-analyzer==0.9.1
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. **If successful, upload to production PyPI**:
|
|
62
|
+
```bash
|
|
63
|
+
uv publish --token pypi-your-production-token
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 📋 Pre-Release Checklist
|
|
67
|
+
|
|
68
|
+
- [x] All tests pass (306/306)
|
|
69
|
+
- [x] Version updated in pyproject.toml (0.9.1)
|
|
70
|
+
- [x] Version updated in __init__.py (0.9.1)
|
|
71
|
+
- [x] CHANGELOG.md updated
|
|
72
|
+
- [x] README.md updated
|
|
73
|
+
- [x] Release notes created
|
|
74
|
+
- [x] Git tagged and pushed
|
|
75
|
+
- [x] Package built successfully
|
|
76
|
+
- [x] Package integrity verified
|
|
77
|
+
|
|
78
|
+
## 🎯 Release Highlights
|
|
79
|
+
|
|
80
|
+
### MCP Tools Unification
|
|
81
|
+
- **check_code_scale**: STEP 1 - Check file scale and complexity
|
|
82
|
+
- **analyze_code_structure**: STEP 2 - Generate structure tables with line positions
|
|
83
|
+
- **extract_code_section**: STEP 3 - Extract specific code sections
|
|
84
|
+
|
|
85
|
+
### Key Benefits
|
|
86
|
+
- Clear 3-step workflow for LLMs
|
|
87
|
+
- Consistent snake_case parameter naming
|
|
88
|
+
- Enhanced error messages and guidance
|
|
89
|
+
- Simplified codebase (removed backward compatibility)
|
|
90
|
+
- 306 comprehensive tests
|
|
91
|
+
|
|
92
|
+
## 📊 Test Results Summary
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
MCP Tests: 103 passed ✅
|
|
96
|
+
Core Tests: 168 passed ✅
|
|
97
|
+
MCP Server Tests: 35 passed ✅
|
|
98
|
+
Total: 306 passed ✅
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 🔗 Post-Release Actions
|
|
102
|
+
|
|
103
|
+
After successful PyPI upload:
|
|
104
|
+
|
|
105
|
+
1. **Verify Installation**:
|
|
106
|
+
```bash
|
|
107
|
+
pip install tree-sitter-analyzer==0.9.1
|
|
108
|
+
python -c "import tree_sitter_analyzer; print(tree_sitter_analyzer.__version__)"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
2. **Update Documentation**:
|
|
112
|
+
- Update installation instructions
|
|
113
|
+
- Announce on relevant channels
|
|
114
|
+
- Update project status
|
|
115
|
+
|
|
116
|
+
3. **GitHub Release**:
|
|
117
|
+
- Create GitHub release from tag v0.9.1
|
|
118
|
+
- Attach release notes
|
|
119
|
+
- Include built packages
|
|
120
|
+
|
|
121
|
+
## 🎉 Ready to Release!
|
|
122
|
+
|
|
123
|
+
The package is fully tested and ready for PyPI release. All 306 tests pass, documentation is complete, and the MCP tools unification provides significant improvements for LLM integration.
|
|
124
|
+
|
|
125
|
+
**This release represents a major improvement in usability for AI assistants working with large codebases!**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://python.org)
|
|
4
4
|
[](LICENSE)
|
|
5
|
-
[](#testing)
|
|
6
6
|
[](#testing)
|
|
7
7
|
[](#quality)
|
|
8
8
|
|
|
@@ -93,11 +93,10 @@ Extract specific code sections efficiently:
|
|
|
93
93
|
- Content length information
|
|
94
94
|
|
|
95
95
|
### 3. AI Assistant Integration
|
|
96
|
-
|
|
97
|
-
- `
|
|
98
|
-
- `analyze_code_structure` - Generate detailed structure tables
|
|
99
|
-
- `
|
|
100
|
-
- `analyze_code_universal` - Universal analysis with auto-detection
|
|
96
|
+
Three-step workflow MCP tools for AI assistants:
|
|
97
|
+
- `check_code_scale` - **Step 1:** Get code metrics and complexity
|
|
98
|
+
- `analyze_code_structure` - **Step 2:** Generate detailed structure tables with line positions
|
|
99
|
+
- `extract_code_section` - **Step 3:** Extract specific code sections by line range
|
|
101
100
|
|
|
102
101
|
### 4. Multi-Language Support
|
|
103
102
|
- **Java** - Full support with advanced analysis
|
|
@@ -109,14 +108,25 @@ Four powerful MCP tools for AI assistants:
|
|
|
109
108
|
|
|
110
109
|
### AI Assistant Usage (via Claude Desktop)
|
|
111
110
|
|
|
112
|
-
**Step 1:
|
|
113
|
-
|
|
111
|
+
**Step 1: Check code scale**
|
|
112
|
+
```
|
|
113
|
+
Use tool: check_code_scale
|
|
114
|
+
Parameters: {"file_path": "examples/Sample.java"}
|
|
115
|
+
```
|
|
114
116
|
|
|
115
|
-
**Step 2: Analyze
|
|
116
|
-
|
|
117
|
+
**Step 2: Analyze structure (for large files >100 lines)**
|
|
118
|
+
```
|
|
119
|
+
Use tool: analyze_code_structure
|
|
120
|
+
Parameters: {"file_path": "examples/Sample.java", "format_type": "full"}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Step 3: Extract specific code (using line positions from step 2)**
|
|
124
|
+
```
|
|
125
|
+
Use tool: extract_code_section
|
|
126
|
+
Parameters: {"file_path": "examples/Sample.java", "start_line": 84, "end_line": 86}
|
|
127
|
+
```
|
|
117
128
|
|
|
118
|
-
**
|
|
119
|
-
> "Show me lines 84-86 from examples/Sample.java"
|
|
129
|
+
> **Note:** Always use snake_case parameter names: `file_path`, `start_line`, `end_line`, `format_type`
|
|
120
130
|
|
|
121
131
|
### CLI Usage
|
|
122
132
|
|
|
@@ -209,12 +219,11 @@ This project maintains **enterprise-grade quality** with comprehensive testing:
|
|
|
209
219
|
- **Zero test failures** - Complete CI/CD readiness
|
|
210
220
|
- **Cross-platform compatibility** - Windows, macOS, Linux
|
|
211
221
|
|
|
212
|
-
### 🏆 Recent Quality Achievements (v0.8.2
|
|
213
|
-
- ✅ **Complete test suite stabilization** -
|
|
214
|
-
- ✅ **
|
|
215
|
-
- ✅ **
|
|
216
|
-
- ✅ **
|
|
217
|
-
- ✅ **Security framework enhancements** - Better project boundary management
|
|
222
|
+
### 🏆 Recent Quality Achievements (v0.8.2)
|
|
223
|
+
- ✅ **Complete test suite stabilization** - Fixed all 31 failing tests
|
|
224
|
+
- ✅ **Formatters module breakthrough** - 0% → 42.30% coverage
|
|
225
|
+
- ✅ **Error handling improvements** - 61.64% → 82.76% coverage
|
|
226
|
+
- ✅ **104 new comprehensive tests** across critical modules
|
|
218
227
|
|
|
219
228
|
### 🔧 Running Tests
|
|
220
229
|
```bash
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Release Notes v0.9.1 - MCP Tools Unification
|
|
2
|
+
|
|
3
|
+
## 🎯 Major Feature: Superior MCP Tools Workflow Design
|
|
4
|
+
|
|
5
|
+
This release introduces a **revolutionary MCP tools unification** that solves LLM token limit problems with an intuitive 3-step workflow.
|
|
6
|
+
|
|
7
|
+
### 🔧 Unified Tool Names (Superior Design)
|
|
8
|
+
|
|
9
|
+
| Tool Name | Purpose | When to Use |
|
|
10
|
+
|-----------|---------|-------------|
|
|
11
|
+
| `check_code_scale` | **STEP 1:** Check file scale and complexity | Always use FIRST for any code file |
|
|
12
|
+
| `analyze_code_structure` | **STEP 2:** Generate structure tables with line positions | Use when file is large (>100 lines) |
|
|
13
|
+
| `extract_code_section` | **STEP 3:** Extract specific code sections | Use line positions from structure table |
|
|
14
|
+
|
|
15
|
+
### 🎉 Key Advantages
|
|
16
|
+
|
|
17
|
+
#### ✅ **Clear Workflow Guidance**
|
|
18
|
+
- Step-by-step process prevents LLM confusion
|
|
19
|
+
- Each tool description includes usage timing
|
|
20
|
+
- Emoji indicators for easy recognition
|
|
21
|
+
|
|
22
|
+
#### ✅ **Consistent Parameter Naming**
|
|
23
|
+
- All parameters use `snake_case` convention
|
|
24
|
+
- `file_path` (not `filepath` or `filePath`)
|
|
25
|
+
- `start_line`, `end_line` (not `startLine`, `endLine`)
|
|
26
|
+
- `format_type` (not `formatType`)
|
|
27
|
+
|
|
28
|
+
#### ✅ **Enhanced Error Messages**
|
|
29
|
+
- Clear tool availability information
|
|
30
|
+
- Helpful parameter validation
|
|
31
|
+
- Specific usage guidance
|
|
32
|
+
|
|
33
|
+
#### ✅ **Simplified Codebase**
|
|
34
|
+
- Removed backward compatibility complexity
|
|
35
|
+
- Clean, maintainable tool definitions
|
|
36
|
+
- Focused on LLM usability
|
|
37
|
+
|
|
38
|
+
### 🧪 Test Results
|
|
39
|
+
|
|
40
|
+
**All tests passing:** ✅ **306 tests**
|
|
41
|
+
- 138 MCP tests: All passed
|
|
42
|
+
- 120 Core functionality tests: All passed
|
|
43
|
+
- 48 CLI/API tests: All passed
|
|
44
|
+
|
|
45
|
+
### 📖 Documentation Updates
|
|
46
|
+
|
|
47
|
+
- **README.md**: Updated with unified workflow examples
|
|
48
|
+
- **CHANGELOG.md**: Detailed improvement documentation
|
|
49
|
+
- **Parameter Guide**: Clear naming standards
|
|
50
|
+
- **Usage Examples**: Step-by-step workflow demonstrations
|
|
51
|
+
|
|
52
|
+
### 🚀 Benefits for LLM Integration
|
|
53
|
+
|
|
54
|
+
1. **Eliminates Confusion**: Clear tool selection with numbered steps
|
|
55
|
+
2. **Prevents Errors**: Consistent parameter naming reduces mistakes
|
|
56
|
+
3. **Improves Efficiency**: Targeted code extraction saves tokens
|
|
57
|
+
4. **Enhances UX**: Intuitive workflow for AI assistants
|
|
58
|
+
|
|
59
|
+
### 💡 Example Workflow
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
// STEP 1: Check file scale
|
|
63
|
+
{"tool": "check_code_scale", "parameters": {"file_path": "src/BigFile.java"}}
|
|
64
|
+
|
|
65
|
+
// STEP 2: Get structure (if file is large)
|
|
66
|
+
{"tool": "analyze_code_structure", "parameters": {"file_path": "src/BigFile.java"}}
|
|
67
|
+
|
|
68
|
+
// STEP 3: Extract specific code
|
|
69
|
+
{"tool": "extract_code_section", "parameters": {"file_path": "src/BigFile.java", "start_line": 45, "end_line": 67}}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 🔄 Migration Guide
|
|
73
|
+
|
|
74
|
+
**No breaking changes for core functionality** - only MCP tool names are unified.
|
|
75
|
+
|
|
76
|
+
**Old tool names removed:**
|
|
77
|
+
- `analyze_code_scale` → `check_code_scale`
|
|
78
|
+
- `read_code_partial` → `extract_code_section`
|
|
79
|
+
- `format_table` → `analyze_code_structure`
|
|
80
|
+
|
|
81
|
+
### 📦 Installation
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install tree-sitter-analyzer==0.9.1
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 🎯 Why This Design is Superior
|
|
88
|
+
|
|
89
|
+
This implementation prioritizes **LLM usability** with:
|
|
90
|
+
- Clear step-by-step workflow
|
|
91
|
+
- Consistent naming patterns
|
|
92
|
+
- Comprehensive usage guidance
|
|
93
|
+
- Simplified tool selection
|
|
94
|
+
|
|
95
|
+
**Perfect for AI assistants working with large codebases!** 🤖✨
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
**Full Changelog**: [CHANGELOG.md](CHANGELOG.md)
|
|
100
|
+
**GitHub Release**: https://github.com/aimasteracc/tree-sitter-analyzer/releases/tag/v0.9.1
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# PyPI Upload Commands for tree-sitter-analyzer v0.9.1
|
|
2
|
+
|
|
3
|
+
## 📦 Package Ready for Upload
|
|
4
|
+
|
|
5
|
+
✅ **Built packages:**
|
|
6
|
+
- `dist/tree_sitter_analyzer-0.9.1-py3-none-any.whl`
|
|
7
|
+
- `dist/tree_sitter_analyzer-0.9.1.tar.gz`
|
|
8
|
+
|
|
9
|
+
✅ **Package integrity verified:** All checks passed
|
|
10
|
+
|
|
11
|
+
## 🚀 Upload Commands
|
|
12
|
+
|
|
13
|
+
### Option 1: Using uv (Recommended)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Set your PyPI API token
|
|
17
|
+
set UV_PUBLISH_TOKEN=pypi-your-token-here
|
|
18
|
+
|
|
19
|
+
# Upload to PyPI
|
|
20
|
+
uv publish
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Option 2: Using twine
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Install twine if not already installed
|
|
27
|
+
uv add --dev twine
|
|
28
|
+
|
|
29
|
+
# Upload to PyPI
|
|
30
|
+
uv run twine upload dist/*
|
|
31
|
+
# When prompted:
|
|
32
|
+
# Username: __token__
|
|
33
|
+
# Password: pypi-your-token-here
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Option 3: Test PyPI First (Recommended)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Upload to Test PyPI first
|
|
40
|
+
uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-your-test-token
|
|
41
|
+
|
|
42
|
+
# Test installation
|
|
43
|
+
pip install --index-url https://test.pypi.org/simple/ tree-sitter-analyzer==0.9.1
|
|
44
|
+
|
|
45
|
+
# If successful, upload to production PyPI
|
|
46
|
+
uv publish --token pypi-your-production-token
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 🔑 Getting PyPI API Token
|
|
50
|
+
|
|
51
|
+
1. **Create PyPI Account**: https://pypi.org/account/register/
|
|
52
|
+
2. **Generate API Token**: https://pypi.org/manage/account/token/
|
|
53
|
+
3. **Token Scope**: Select "Entire account" or specific project
|
|
54
|
+
4. **Copy Token**: Starts with `pypi-`
|
|
55
|
+
|
|
56
|
+
## ✅ Pre-Upload Verification
|
|
57
|
+
|
|
58
|
+
- [x] All 306 tests passed
|
|
59
|
+
- [x] Package built successfully
|
|
60
|
+
- [x] Package integrity verified
|
|
61
|
+
- [x] Version updated to 0.9.1
|
|
62
|
+
- [x] Documentation updated
|
|
63
|
+
- [x] GitHub tagged and pushed
|
|
64
|
+
|
|
65
|
+
## 🎯 Post-Upload Verification
|
|
66
|
+
|
|
67
|
+
After successful upload, verify:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Install from PyPI
|
|
71
|
+
pip install tree-sitter-analyzer==0.9.1
|
|
72
|
+
|
|
73
|
+
# Verify version
|
|
74
|
+
python -c "import tree_sitter_analyzer; print(tree_sitter_analyzer.__version__)"
|
|
75
|
+
|
|
76
|
+
# Test MCP tools
|
|
77
|
+
python -c "from tree_sitter_analyzer.mcp.server import TreeSitterAnalyzerMCPServer; print('MCP tools ready!')"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 📊 Release Summary
|
|
81
|
+
|
|
82
|
+
**Version:** 0.9.1
|
|
83
|
+
**Major Feature:** MCP Tools Unification
|
|
84
|
+
**Test Results:** 306/306 passed ✅
|
|
85
|
+
**Key Tools:**
|
|
86
|
+
- `check_code_scale` - STEP 1: Check file scale
|
|
87
|
+
- `analyze_code_structure` - STEP 2: Generate structure tables
|
|
88
|
+
- `extract_code_section` - STEP 3: Extract code sections
|
|
89
|
+
|
|
90
|
+
**Ready for production release!** 🚀
|