tzero-mcp 11.0.0 → 11.11.0

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +56 -56
  2. package/CONTRIBUTING.md +71 -71
  3. package/LICENSE +21 -21
  4. package/README.md +64 -64
  5. package/bin/tzero-mcp.js +62 -62
  6. package/bin/tzero.js +61 -61
  7. package/index.d.ts +25 -25
  8. package/index.js +15 -15
  9. package/package.json +89 -88
  10. package/src/addmcp.py +1203 -1197
  11. package/src/app.py +1810 -1810
  12. package/src/main.py +60 -60
  13. package/src/pc_fixer_mcp.py +25 -25
  14. package/src/tzero/__init__.py +54 -54
  15. package/src/tzero/__main__.py +6 -6
  16. package/src/tzero/siber_akademi_icon.py +77 -77
  17. package/src/tzero/tzero_arch_test.py +463 -463
  18. package/src/tzero/tzero_benchmark.py +475 -475
  19. package/src/tzero/tzero_blackboard.py +257 -257
  20. package/src/tzero/tzero_bridge.py +546 -546
  21. package/src/tzero/tzero_budget.py +195 -195
  22. package/src/tzero/tzero_card.py +431 -0
  23. package/src/tzero/tzero_ci.py +153 -153
  24. package/src/tzero/tzero_commit.py +192 -192
  25. package/src/tzero/tzero_contracts.py +1093 -1093
  26. package/src/tzero/tzero_cost.py +166 -166
  27. package/src/tzero/tzero_dashboard.py +1960 -1960
  28. package/src/tzero/tzero_debt.py +461 -461
  29. package/src/tzero/tzero_deps.py +462 -462
  30. package/src/tzero/tzero_drift.py +208 -208
  31. package/src/tzero/tzero_explain.py +306 -306
  32. package/src/tzero/tzero_features.py +3024 -3024
  33. package/src/tzero/tzero_federation.py +299 -299
  34. package/src/tzero/tzero_fix.py +557 -228
  35. package/src/tzero/tzero_fixer/__init__.py +63 -63
  36. package/src/tzero/tzero_fixer/amalgamation.py +334 -334
  37. package/src/tzero/tzero_fixer/ast_syntax_healer.py +464 -464
  38. package/src/tzero/tzero_fixer/ast_type_modernizer.py +288 -288
  39. package/src/tzero/tzero_fixer/async_io_modernizer.py +127 -127
  40. package/src/tzero/tzero_fixer/automated_regression_suite.py +600 -600
  41. package/src/tzero/tzero_fixer/benchmarks_and_diagnostics.py +174 -174
  42. package/src/tzero/tzero_fixer/ci_cd_self_healing_gate.py +246 -246
  43. package/src/tzero/tzero_fixer/code_duplicity_and_refactorer.py +151 -151
  44. package/src/tzero/tzero_fixer/code_smells_healer.py +260 -260
  45. package/src/tzero/tzero_fixer/cwe_remediator.py +171 -171
  46. package/src/tzero/tzero_fixer/dead_code_eliminator.py +150 -150
  47. package/src/tzero/tzero_fixer/dependency_vulnerability_auditor.py +309 -309
  48. package/src/tzero/tzero_fixer/git_advanced_surgeon.py +280 -280
  49. package/src/tzero/tzero_fixer/hardware_and_disk_doctor.py +325 -325
  50. package/src/tzero/tzero_fixer/import_graph_healer.py +412 -412
  51. package/src/tzero/tzero_fixer/interactive_tui.py +91 -91
  52. package/src/tzero/tzero_fixer/knowledge_base.py +295 -295
  53. package/src/tzero/tzero_fixer/knowledge_base_extended.py +940 -940
  54. package/src/tzero/tzero_fixer/linters_and_static_analyzer.py +307 -307
  55. package/src/tzero/tzero_fixer/mcp_server.py +489 -489
  56. package/src/tzero/tzero_fixer/models.py +385 -385
  57. package/src/tzero/tzero_fixer/orchestrator.py +375 -375
  58. package/src/tzero/tzero_fixer/os_doctor.py +502 -502
  59. package/src/tzero/tzero_fixer/packaging_abi_surgeon.py +323 -323
  60. package/src/tzero/tzero_fixer/pc_fixer_doctor.py +600 -600
  61. package/src/tzero/tzero_fixer/performance_and_memory_profiler.py +274 -274
  62. package/src/tzero/tzero_fixer/polyglot_ast_parsers.py +313 -313
  63. package/src/tzero/tzero_fixer/polyglot_build_healer.py +364 -364
  64. package/src/tzero/tzero_fixer/polyglot_config_healer.py +318 -318
  65. package/src/tzero/tzero_fixer/polyglot_doctor.py +372 -372
  66. package/src/tzero/tzero_fixer/polyglot_linters.py +619 -619
  67. package/src/tzero/tzero_fixer/polyglot_schema_validator.py +305 -305
  68. package/src/tzero/tzero_fixer/security_cwe_database.py +444 -444
  69. package/src/tzero/tzero_fixer/security_deep_rules.py +114 -114
  70. package/src/tzero/tzero_fixer/security_rules_catalog.py +110 -110
  71. package/src/tzero/tzero_fixer/security_zero_leak.py +326 -326
  72. package/src/tzero/tzero_fixer/smart_patch_recommender.py +223 -223
  73. package/src/tzero/tzero_fixer/synthetic_workspace_generator.py +220 -220
  74. package/src/tzero/tzero_fixer/system_diagnostics_extended.py +493 -493
  75. package/src/tzero/tzero_fixer/system_repair_recipes.py +447 -447
  76. package/src/tzero/tzero_fixer/venv_doctor.py +309 -309
  77. package/src/tzero/tzero_golden.py +319 -319
  78. package/src/tzero/tzero_graph_hud.html +338 -338
  79. package/src/tzero/tzero_graph_rag.py +263 -263
  80. package/src/tzero/tzero_growth.py +415 -0
  81. package/src/tzero/tzero_guard.py +251 -243
  82. package/src/tzero/tzero_hooks.py +565 -565
  83. package/src/tzero/tzero_infra.py +274 -274
  84. package/src/tzero/tzero_jarvis/__init__.py +134 -124
  85. package/src/tzero/tzero_jarvis/causal_graph.py +310 -310
  86. package/src/tzero/tzero_jarvis/creative_director.py +333 -0
  87. package/src/tzero/tzero_jarvis/graph_visualizer.py +395 -395
  88. package/src/tzero/tzero_jarvis/hybrid_search.py +214 -214
  89. package/src/tzero/tzero_jarvis/latent_press.py +137 -137
  90. package/src/tzero/tzero_jarvis/memory_consolidation.py +212 -212
  91. package/src/tzero/tzero_jarvis/minhash_lsh.py +184 -184
  92. package/src/tzero/tzero_jarvis/orchestrator.py +335 -335
  93. package/src/tzero/tzero_jarvis/self_healing.py +308 -308
  94. package/src/tzero/tzero_jarvis/semantic_compressor.py +887 -887
  95. package/src/tzero/tzero_jarvis/swarm.py +261 -261
  96. package/src/tzero/tzero_jarvis/swarm_bft.py +144 -144
  97. package/src/tzero/tzero_jarvis/workspace_orchestrator.py +1167 -1167
  98. package/src/tzero/tzero_jarvis/zero_key_router.py +173 -173
  99. package/src/tzero/tzero_lsp.py +634 -634
  100. package/src/tzero/tzero_mcp.py +5314 -5237
  101. package/src/tzero/tzero_mutation.py +358 -358
  102. package/src/tzero/tzero_neural_cortex.py +1425 -1425
  103. package/src/tzero/tzero_packer.py +577 -577
  104. package/src/tzero/tzero_patch.py +624 -624
  105. package/src/tzero/tzero_pc_fixer.py +12699 -12699
  106. package/src/tzero/tzero_pipe.py +95 -95
  107. package/src/tzero/tzero_polyglot.py +799 -799
  108. package/src/tzero/tzero_proxy.py +127 -127
  109. package/src/tzero/tzero_reachability.py +272 -272
  110. package/src/tzero/tzero_replay.py +141 -141
  111. package/src/tzero/tzero_rust_bridge.py +198 -198
  112. package/src/tzero/tzero_scip.py +368 -368
  113. package/src/tzero/tzero_security.py +573 -573
  114. package/src/tzero/tzero_semantic_merge.py +189 -189
  115. package/src/tzero/tzero_snapshot.py +471 -471
  116. package/src/tzero/tzero_stubs.py +313 -313
  117. package/src/tzero/tzero_subagent_engine.py +459 -459
  118. package/src/tzero/tzero_superdesign.py +774 -774
  119. package/src/tzero/tzero_sync.py +241 -241
  120. package/src/tzero/tzero_task_benchmark.py +506 -458
  121. package/src/tzero/tzero_tui.py +313 -313
  122. package/src/tzero/tzero_turbo.py +264 -264
  123. package/src/tzero/tzero_v3.py +9997 -9900
  124. package/src/tzero.py +6 -6
  125. package/src/tzero_mcp.py +25 -0
  126. package/test/package.test.js +55 -55
package/CHANGELOG.md CHANGED
@@ -1,56 +1,56 @@
1
- # Changelog
2
-
3
- ## [11.0.0] - 2026-11-11
4
-
5
- - Bundle the reorganized `tzero/` package and desktop icon.
6
- - Include exact token measurement for selected Python definitions and lossless context updates.
7
-
8
- All notable changes to the `tzero-mcp` package are documented in this file.
9
-
10
- ## [10.9.0] - 2026-11-07
11
-
12
- ### Added
13
- - Autonomous Golden Baseline & AST Regression Engine (`tzero_golden.py` / `tzero golden`).
14
- - Autonomous AST Context Budget Enforcer & Compression Certifier (`tzero_budget.py` / `tzero budget`).
15
- - Autonomous AST Public API Contract & SemVer Guardian (`tzero_contracts.py` / `tzero contracts` / `tzero breaking-changes`).
16
- - Autonomous AST Code Health, Cognitive Complexity & Technical Debt Index (`tzero_debt.py` / `tzero debt`).
17
- - Automated Architecture Guard Test Suite Generator (`tzero_arch_test.py` / `--generate-arch-tests` / `--check-arch`).
18
- - Autonomous AST Mutation Testing & Test Quality Engine (`tzero_mutation.py` / `--mutate`).
19
- - New MCP omni-tool workflow actions: `budget`, `contracts`, `debt`, `golden`, `generate_architecture_tests`, `check_architecture`, `mutation_test`.
20
- - Dashboard POST endpoints: `/api/budget/optimize`, `/api/contracts/compare`, `/api/debt/analyze`, `/api/golden/verify`, `/api/mutation/test`.
21
-
22
- ## [10.8.0] - 2026-11-07
23
-
24
- ### Added
25
- - Dynamic Multi-Agent Swarm Coordinator & Shared Working Memory (`tzero_subagent_engine.py` / `tzero_blackboard.py`).
26
- - Bidirectional Reverse Polyglot Type Transpiler (`tzero_bridge.py` / `--bridge-reverse`): TS/Rust/Go -> Python models.
27
- - Semantic 3-Way AST Conflict Healer (`tzero_semantic_merge.py` / `--merge-heal`): Resolves git conflict markers on disjoint ASTs.
28
- - Turbo Overdrive Burst Accelerator / Kamçılama Mode (`tzero_turbo.py` / `--turbo` / `--kamcilama`).
29
- - VS Code & Cursor Extension official release (`tzero-vscode-10.8.0.vsix`).
30
- - Sub-8ms multi-core AST response caching and adaptive latency sensing.
31
-
32
- ## [10.7.4] - 2026-11-07
33
-
34
- ### Added
35
- - Multi-contributor transparency in package manifest.
36
- - Comprehensive native test suite (`test/package.test.js`) verifying binary integrity and metadata.
37
- - Full TypeScript definitions export (`index.d.ts`).
38
- - Direct fallback detection for `PYTHON` environment variable in CLI launchers.
39
-
40
- ### Security & Supply Chain
41
- - 100% Zero-Dependency architecture (0 production dependencies, 0 development dependencies).
42
- - Zero lifecycle install scripts (removed postinstall hook for 100/100 Supply Chain score).
43
- - Secure process spawning with explicit argument arrays and `{ shell: false }`.
44
- - Complete bundled offline source code (`src/`).
45
-
46
- ## [10.7.3] - 2026-11-07
47
- - Removed postinstall lifecycle script to eliminate supply chain flags.
48
- - Switched launcher process execution from execSync to spawnSync with non-shell execution.
49
- - Added native Node.js test suite.
50
-
51
- ## [10.7.2] - 2026-11-07
52
- - Bundled full 98 Python source files in `src/`.
53
- - Packaged all core T-Zero AST engines.
54
-
55
- ## [10.7.0] - 2026-11-07
56
- - Initial release of T-Zero MCP Server on npm.
1
+ # Changelog
2
+
3
+ ## [11.0.0] - 2026-11-11
4
+
5
+ - Bundle the reorganized `tzero/` package and desktop icon.
6
+ - Include exact token measurement for selected Python definitions and lossless context updates.
7
+
8
+ All notable changes to the `tzero-mcp` package are documented in this file.
9
+
10
+ ## [10.9.0] - 2026-11-07
11
+
12
+ ### Added
13
+ - Autonomous Golden Baseline & AST Regression Engine (`tzero_golden.py` / `tzero golden`).
14
+ - Autonomous AST Context Budget Enforcer & Compression Certifier (`tzero_budget.py` / `tzero budget`).
15
+ - Autonomous AST Public API Contract & SemVer Guardian (`tzero_contracts.py` / `tzero contracts` / `tzero breaking-changes`).
16
+ - Autonomous AST Code Health, Cognitive Complexity & Technical Debt Index (`tzero_debt.py` / `tzero debt`).
17
+ - Automated Architecture Guard Test Suite Generator (`tzero_arch_test.py` / `--generate-arch-tests` / `--check-arch`).
18
+ - Autonomous AST Mutation Testing & Test Quality Engine (`tzero_mutation.py` / `--mutate`).
19
+ - New MCP omni-tool workflow actions: `budget`, `contracts`, `debt`, `golden`, `generate_architecture_tests`, `check_architecture`, `mutation_test`.
20
+ - Dashboard POST endpoints: `/api/budget/optimize`, `/api/contracts/compare`, `/api/debt/analyze`, `/api/golden/verify`, `/api/mutation/test`.
21
+
22
+ ## [10.8.0] - 2026-11-07
23
+
24
+ ### Added
25
+ - Dynamic Multi-Agent Swarm Coordinator & Shared Working Memory (`tzero_subagent_engine.py` / `tzero_blackboard.py`).
26
+ - Bidirectional Reverse Polyglot Type Transpiler (`tzero_bridge.py` / `--bridge-reverse`): TS/Rust/Go -> Python models.
27
+ - Semantic 3-Way AST Conflict Healer (`tzero_semantic_merge.py` / `--merge-heal`): Resolves git conflict markers on disjoint ASTs.
28
+ - Turbo Overdrive Burst Accelerator / Kamçılama Mode (`tzero_turbo.py` / `--turbo` / `--kamcilama`).
29
+ - VS Code & Cursor Extension official release (`tzero-vscode-10.8.0.vsix`).
30
+ - Sub-8ms multi-core AST response caching and adaptive latency sensing.
31
+
32
+ ## [10.7.4] - 2026-11-07
33
+
34
+ ### Added
35
+ - Multi-contributor transparency in package manifest.
36
+ - Comprehensive native test suite (`test/package.test.js`) verifying binary integrity and metadata.
37
+ - Full TypeScript definitions export (`index.d.ts`).
38
+ - Direct fallback detection for `PYTHON` environment variable in CLI launchers.
39
+
40
+ ### Security & Supply Chain
41
+ - 100% Zero-Dependency architecture (0 production dependencies, 0 development dependencies).
42
+ - Zero lifecycle install scripts (removed postinstall hook for 100/100 Supply Chain score).
43
+ - Secure process spawning with explicit argument arrays and `{ shell: false }`.
44
+ - Complete bundled offline source code (`src/`).
45
+
46
+ ## [10.7.3] - 2026-11-07
47
+ - Removed postinstall lifecycle script to eliminate supply chain flags.
48
+ - Switched launcher process execution from execSync to spawnSync with non-shell execution.
49
+ - Added native Node.js test suite.
50
+
51
+ ## [10.7.2] - 2026-11-07
52
+ - Bundled full 98 Python source files in `src/`.
53
+ - Packaged all core T-Zero AST engines.
54
+
55
+ ## [10.7.0] - 2026-11-07
56
+ - Initial release of T-Zero MCP Server on npm.
package/CONTRIBUTING.md CHANGED
@@ -1,71 +1,71 @@
1
- # Contributing to T-Zero
2
-
3
- Thank you for your interest in contributing to **T-Zero**! We welcome community contributions, bug reports, and performance optimizations from engineers worldwide.
4
-
5
- ---
6
-
7
- ## 🛠 Local Development Setup
8
-
9
- 1. **Clone the repository:**
10
- ```bash
11
- git clone https://github.com/toprakahmetaydogmus/TZeroAlgorithm.git
12
- cd TZeroAlgorithm
13
- ```
14
-
15
- 2. **Create a virtual environment:**
16
- ```bash
17
- python -m venv .venv
18
- # Windows:
19
- .venv\Scripts\activate
20
- # Linux/macOS:
21
- source .venv/bin/activate
22
- ```
23
-
24
- 3. **Install dependencies and editable package:**
25
- ```bash
26
- pip install -e ".[test,build]"
27
- ```
28
-
29
- ---
30
-
31
- ## 🧪 Verification Pipeline Before Submitting a PR
32
-
33
- Before opening a pull request, ensure all verification gates pass locally:
34
-
35
- 1. **Syntax Check:**
36
- ```bash
37
- python -m py_compile $(git diff --name-only HEAD | grep '\.py$')
38
- ```
39
-
40
- 2. **Run Zero-Leak Secret Audit:**
41
- ```bash
42
- python tests/audit_secrets.py
43
- # Must return: Total secret audit findings: 0
44
- ```
45
-
46
- 3. **Run Unit Tests:**
47
- ```bash
48
- python -m unittest discover tests -v
49
- ```
50
-
51
- 4. **Run Empirical Task Benchmark:**
52
- ```bash
53
- python tzero_task_benchmark.py
54
- ```
55
-
56
- ---
57
-
58
- ## 📐 Code Style & Architecture Guidelines
59
-
60
- - **Determinism First:** All AST parsing, BM25 searching, and token reduction must run 100% locally with zero external network telemetry.
61
- - **Inward Dependencies:** Core modules (`tzero_packer`, `tzero_guard`) must not depend on outer presentation layers (`tzero_tui`, `tzero_gui`).
62
- - **No Plaintext Secrets:** Never commit API keys, connection URIs, or high-entropy tokens.
63
- - **Air-Gapped Compliance:** Respect `TZERO_NO_AUTO_INSTALL=1` across all scripts.
64
-
65
- ---
66
-
67
- ## 💬 Community & Discussions
68
-
69
- - **GitHub Issues:** [Bug Reports & Feature Requests](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/issues)
70
- - **Hugging Face Space:** [Interactive Web Demo](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)
71
- - **Maintainer:** Toprak Ahmet Aydoğmuş (`siberakademi@org.tr`)
1
+ # Contributing to T-Zero
2
+
3
+ Thank you for your interest in contributing to **T-Zero**! We welcome community contributions, bug reports, and performance optimizations from engineers worldwide.
4
+
5
+ ---
6
+
7
+ ## 🛠 Local Development Setup
8
+
9
+ 1. **Clone the repository:**
10
+ ```bash
11
+ git clone https://github.com/toprakahmetaydogmus/TZeroAlgorithm.git
12
+ cd TZeroAlgorithm
13
+ ```
14
+
15
+ 2. **Create a virtual environment:**
16
+ ```bash
17
+ python -m venv .venv
18
+ # Windows:
19
+ .venv\Scripts\activate
20
+ # Linux/macOS:
21
+ source .venv/bin/activate
22
+ ```
23
+
24
+ 3. **Install dependencies and editable package:**
25
+ ```bash
26
+ pip install -e ".[test,build]"
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 🧪 Verification Pipeline Before Submitting a PR
32
+
33
+ Before opening a pull request, ensure all verification gates pass locally:
34
+
35
+ 1. **Syntax Check:**
36
+ ```bash
37
+ python -m py_compile $(git diff --name-only HEAD | grep '\.py$')
38
+ ```
39
+
40
+ 2. **Run Zero-Leak Secret Audit:**
41
+ ```bash
42
+ python tests/audit_secrets.py
43
+ # Must return: Total secret audit findings: 0
44
+ ```
45
+
46
+ 3. **Run Unit Tests:**
47
+ ```bash
48
+ python -m unittest discover tests -v
49
+ ```
50
+
51
+ 4. **Run Empirical Task Benchmark:**
52
+ ```bash
53
+ python tzero_task_benchmark.py
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 📐 Code Style & Architecture Guidelines
59
+
60
+ - **Determinism First:** All AST parsing, BM25 searching, and token reduction must run 100% locally with zero external network telemetry.
61
+ - **Inward Dependencies:** Core modules (`tzero_packer`, `tzero_guard`) must not depend on outer presentation layers (`tzero_tui`, `tzero_gui`).
62
+ - **No Plaintext Secrets:** Never commit API keys, connection URIs, or high-entropy tokens.
63
+ - **Air-Gapped Compliance:** Respect `TZERO_NO_AUTO_INSTALL=1` across all scripts.
64
+
65
+ ---
66
+
67
+ ## 💬 Community & Discussions
68
+
69
+ - **GitHub Issues:** [Bug Reports & Feature Requests](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/issues)
70
+ - **Hugging Face Space:** [Interactive Web Demo](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)
71
+ - **Maintainer:** Toprak Ahmet Aydoğmuş (`siberakademi@org.tr`)
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Toprak Ahmet Aydoğmuş
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Toprak Ahmet Aydoğmuş
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,64 +1,64 @@
1
- # tzero-mcp
2
-
3
- > **Deterministic AST Context Compressor, 95% Token Reducer & 20-Tool MCP Server for Cursor, Claude Desktop, Antigravity & Copilot.**
4
-
5
- [![npm version](https://img.shields.io/npm/v/tzero-mcp.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/tzero-mcp)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
- [![Socket Badge](https://socket.dev/api/badge/npm/package/tzero-mcp)](https://socket.dev/npm/package/tzero-mcp)
8
- [![GitHub Stars](https://img.shields.io/github/stars/toprakahmetaydogmus/TZeroAlgorithm?style=social)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)
9
-
10
- ---
11
-
12
- ### ⭐ Open-Source Engineering (Please Star Our Repo!)
13
-
14
- Hi! I'm **Toprak Ahmet Aydoğmuş** from **Siber Akademi**. I created T-Zero from scratch to eliminate token limits, reduce prompt costs by up to 95%, and stop AI coding hallucinations using deterministic Abstract Syntax Tree (AST) analysis.
15
-
16
- If this package helps your engineering team or AI workflows:
17
- ⭐ **Please give our repository a STAR on GitHub:**
18
- 👉 **[https://github.com/toprakahmetaydogmus/TZeroAlgorithm](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)**
19
- *100% Free & Open-Source under MIT License. Thank you! 🚀*
20
-
21
- ---
22
-
23
- ## ⚡ Instant MCP Execution (Zero Install Needed)
24
-
25
- Run directly via `npx` in your `claude_desktop_config.json`, Cursor MCP settings, or Windsurf / Antigravity config:
26
-
27
- ```json
28
- {
29
- "mcpServers": {
30
- "tzero": {
31
- "command": "npx",
32
- "args": ["-y", "tzero-mcp@latest"]
33
- }
34
- }
35
- }
36
- ```
37
-
38
- ## 🚀 CLI Installation & Usage
39
-
40
- ```bash
41
- # Global installation via npm
42
- npm install -g tzero-mcp
43
-
44
- # Compress any project directory into an AST Skeleton tree (95% token savings)
45
- tzero --tree . --out tree.txt
46
-
47
- # Launch interactive Model Context Protocol (MCP) Server
48
- tzero-mcp
49
-
50
- # 1-Click connect to Cursor, Claude Desktop, Antigravity & VS Code
51
- tzero-add-mcp
52
- ```
53
-
54
- ## 🛠 Key Capabilities
55
-
56
- - **95% Deterministic Token Reduction:** Compresses source code into AST skeletons preserving function signatures, type annotations, and docstrings while pruning redundant logic bodies.
57
- - **100% Zero-Leak Security Guard:** Deep Shannon Entropy ($H \ge 4.75$) scanner for API keys and secrets before LLM context ingestion.
58
- - **Reality-Lock Pre-Flight:** Catches hallucinations before code execution by validating imports and call hierarchies against real AST nodes.
59
- - **20 Native Developer Tools:** AST PageRank, call-chain tracer, BM25 semantic hybrid search, change blast radius analyzer, and system doctor.
60
- - **100% Private, Local & Free:** Pure offline operation — $0 API cost, zero cloud lock-in.
61
-
62
- ## 📄 License
63
-
64
- MIT © [Toprak Ahmet Aydoğmuş](https://github.com/toprakahmetaydogmus)
1
+ # tzero-mcp
2
+
3
+ > **Deterministic AST Context Compressor, 95% Token Reducer & 20-Tool MCP Server for Cursor, Claude Desktop, Antigravity & Copilot.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/tzero-mcp.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/tzero-mcp)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/tzero-mcp)](https://socket.dev/npm/package/tzero-mcp)
8
+ [![GitHub Stars](https://img.shields.io/github/stars/toprakahmetaydogmus/TZeroAlgorithm?style=social)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)
9
+
10
+ ---
11
+
12
+ ### ⭐ Open-Source Engineering (Please Star Our Repo!)
13
+
14
+ Hi! I'm **Toprak Ahmet Aydoğmuş** from **Siber Akademi**. I created T-Zero from scratch to eliminate token limits, reduce prompt costs by up to 95%, and stop AI coding hallucinations using deterministic Abstract Syntax Tree (AST) analysis.
15
+
16
+ If this package helps your engineering team or AI workflows:
17
+ ⭐ **Please give our repository a STAR on GitHub:**
18
+ 👉 **[https://github.com/toprakahmetaydogmus/TZeroAlgorithm](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)**
19
+ *100% Free & Open-Source under MIT License. Thank you! 🚀*
20
+
21
+ ---
22
+
23
+ ## ⚡ Instant MCP Execution (Zero Install Needed)
24
+
25
+ Run directly via `npx` in your `claude_desktop_config.json`, Cursor MCP settings, or Windsurf / Antigravity config:
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "tzero": {
31
+ "command": "npx",
32
+ "args": ["-y", "tzero-mcp@latest"]
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## 🚀 CLI Installation & Usage
39
+
40
+ ```bash
41
+ # Global installation via npm
42
+ npm install -g tzero-mcp
43
+
44
+ # Compress any project directory into an AST Skeleton tree (95% token savings)
45
+ tzero --tree . --out tree.txt
46
+
47
+ # Launch interactive Model Context Protocol (MCP) Server
48
+ tzero-mcp
49
+
50
+ # 1-Click connect to Cursor, Claude Desktop, Antigravity & VS Code
51
+ tzero-add-mcp
52
+ ```
53
+
54
+ ## 🛠 Key Capabilities
55
+
56
+ - **95% Deterministic Token Reduction:** Compresses source code into AST skeletons preserving function signatures, type annotations, and docstrings while pruning redundant logic bodies.
57
+ - **100% Zero-Leak Security Guard:** Deep Shannon Entropy ($H \ge 4.75$) scanner for API keys and secrets before LLM context ingestion.
58
+ - **Reality-Lock Pre-Flight:** Catches hallucinations before code execution by validating imports and call hierarchies against real AST nodes.
59
+ - **20 Native Developer Tools:** AST PageRank, call-chain tracer, BM25 semantic hybrid search, change blast radius analyzer, and system doctor.
60
+ - **100% Private, Local & Free:** Pure offline operation — $0 API cost, zero cloud lock-in.
61
+
62
+ ## 📄 License
63
+
64
+ MIT © [Toprak Ahmet Aydoğmuş](https://github.com/toprakahmetaydogmus)
package/bin/tzero-mcp.js CHANGED
@@ -1,62 +1,62 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * T-Zero Model Context Protocol (MCP) Server Launcher
5
- * Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
6
- * Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
7
- */
8
-
9
- const { spawn, spawnSync } = require("child_process");
10
- const process = require("process");
11
- const path = require("path");
12
- const pkg = require("../package.json");
13
-
14
- // In MCP mode, banner is printed to stderr to keep stdout strictly for JSON-RPC
15
- const banner = `\x1b[36m
16
- ┌──────────────────────────────────────────────────────────────────────────────┐
17
- │ ⚡ T-ZERO MCP SERVER v${pkg.version} (Model Context Protocol) │
18
- │ Enterprise AST Context Compressor, Zero-Leak Guard & 20 Canonical Tools │
19
- │ │
20
- │ ⭐ Star on GitHub: https://github.com/toprakahmetaydogmus/TZeroAlgorithm │
21
- │ 🔌 Connected to: Cursor, Claude Desktop, Antigravity, Windsurf & Cline │
22
- └──────────────────────────────────────────────────────────────────────────────┘
23
- \x1b[0m`;
24
-
25
- if (process.stderr.isTTY) {
26
- process.stderr.write(banner + "\n");
27
- }
28
-
29
- function findPython() {
30
- if (process.env.PYTHON) return process.env.PYTHON;
31
- const candidates = ["python3", "python", "py"];
32
- for (const cmd of candidates) {
33
- try {
34
- const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
35
- if (res.status === 0) return cmd;
36
- } catch (e) {
37
- // continue
38
- }
39
- }
40
- return null;
41
- }
42
-
43
- const py = findPython();
44
- if (!py) {
45
- console.error("\x1b[31m[ERROR] Python 3.10+ is required to run T-Zero MCP Server.\x1b[0m");
46
- console.error("Please install Python from https://python.org or your package manager.");
47
- process.exit(1);
48
- }
49
-
50
- const srcDir = path.resolve(__dirname, "..", "src");
51
- const scriptPath = path.join(srcDir, "tzero", "tzero_mcp.py");
52
-
53
- const env = Object.assign({}, process.env, {
54
- PYTHONPATH: srcDir + (process.env.PYTHONPATH ? path.delimiter + process.env.PYTHONPATH : "")
55
- });
56
-
57
- const args = [scriptPath, ...process.argv.slice(2)];
58
- const child = spawn(py, args, { stdio: "inherit", shell: false, env });
59
-
60
- child.on("close", (code) => {
61
- process.exit(code ?? 0);
62
- });
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * T-Zero Model Context Protocol (MCP) Server Launcher
5
+ * Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
6
+ * Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
7
+ */
8
+
9
+ const { spawn, spawnSync } = require("child_process");
10
+ const process = require("process");
11
+ const path = require("path");
12
+ const pkg = require("../package.json");
13
+
14
+ // In MCP mode, banner is printed to stderr to keep stdout strictly for JSON-RPC
15
+ const banner = `\x1b[36m
16
+ ┌──────────────────────────────────────────────────────────────────────────────┐
17
+ │ ⚡ T-ZERO MCP SERVER v${pkg.version} (Model Context Protocol) │
18
+ │ Enterprise AST Context Compressor, Zero-Leak Guard & 20 Canonical Tools │
19
+ │ │
20
+ │ ⭐ Star on GitHub: https://github.com/toprakahmetaydogmus/TZeroAlgorithm │
21
+ │ 🔌 Connected to: Cursor, Claude Desktop, Antigravity, Windsurf & Cline │
22
+ └──────────────────────────────────────────────────────────────────────────────┘
23
+ \x1b[0m`;
24
+
25
+ if (process.stderr.isTTY) {
26
+ process.stderr.write(banner + "\n");
27
+ }
28
+
29
+ function findPython() {
30
+ if (process.env.PYTHON) return process.env.PYTHON;
31
+ const candidates = ["python3", "python", "py"];
32
+ for (const cmd of candidates) {
33
+ try {
34
+ const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
35
+ if (res.status === 0) return cmd;
36
+ } catch (e) {
37
+ // continue
38
+ }
39
+ }
40
+ return null;
41
+ }
42
+
43
+ const py = findPython();
44
+ if (!py) {
45
+ console.error("\x1b[31m[ERROR] Python 3.10+ is required to run T-Zero MCP Server.\x1b[0m");
46
+ console.error("Please install Python from https://python.org or your package manager.");
47
+ process.exit(1);
48
+ }
49
+
50
+ const srcDir = path.resolve(__dirname, "..", "src");
51
+ const scriptPath = path.join(srcDir, "tzero", "tzero_mcp.py");
52
+
53
+ const env = Object.assign({}, process.env, {
54
+ PYTHONPATH: srcDir + (process.env.PYTHONPATH ? path.delimiter + process.env.PYTHONPATH : "")
55
+ });
56
+
57
+ const args = [scriptPath, ...process.argv.slice(2)];
58
+ const child = spawn(py, args, { stdio: "inherit", shell: false, env });
59
+
60
+ child.on("close", (code) => {
61
+ process.exit(code ?? 0);
62
+ });