tzero-mcp 10.7.4 → 11.0.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 (127) hide show
  1. package/CHANGELOG.md +56 -29
  2. package/CONTRIBUTING.md +71 -71
  3. package/README.md +64 -64
  4. package/bin/tzero-mcp.js +62 -66
  5. package/bin/tzero.js +61 -65
  6. package/index.d.ts +25 -25
  7. package/index.js +15 -15
  8. package/package.json +88 -88
  9. package/src/addmcp.py +14 -11
  10. package/src/app.py +1810 -0
  11. package/src/main.py +1 -1
  12. package/src/pc_fixer_mcp.py +25 -0
  13. package/src/tzero/__init__.py +54 -0
  14. package/src/tzero/__main__.py +6 -0
  15. package/src/tzero/siber_akademi.ico +0 -0
  16. package/src/tzero/tzero_arch_test.py +463 -0
  17. package/src/{tzero_benchmark.py → tzero/tzero_benchmark.py} +475 -475
  18. package/src/tzero/tzero_blackboard.py +257 -0
  19. package/src/{tzero_bridge.py → tzero/tzero_bridge.py} +546 -362
  20. package/src/tzero/tzero_budget.py +195 -0
  21. package/src/{tzero_ci.py → tzero/tzero_ci.py} +153 -153
  22. package/src/{tzero_commit.py → tzero/tzero_commit.py} +192 -192
  23. package/src/tzero/tzero_contracts.py +1093 -0
  24. package/src/{tzero_cost.py → tzero/tzero_cost.py} +166 -163
  25. package/src/{tzero_dashboard.py → tzero/tzero_dashboard.py} +531 -19
  26. package/src/tzero/tzero_debt.py +461 -0
  27. package/src/{tzero_deps.py → tzero/tzero_deps.py} +179 -4
  28. package/src/{tzero_drift.py → tzero/tzero_drift.py} +208 -208
  29. package/src/{tzero_explain.py → tzero/tzero_explain.py} +73 -7
  30. package/src/{tzero_features.py → tzero/tzero_features.py} +19 -17
  31. package/src/tzero/tzero_federation.py +299 -0
  32. package/src/{tzero_fix.py → tzero/tzero_fix.py} +228 -228
  33. package/src/{tzero_fixer → tzero/tzero_fixer}/__init__.py +63 -63
  34. package/src/{tzero_fixer → tzero/tzero_fixer}/ast_syntax_healer.py +464 -464
  35. package/src/{tzero_fixer → tzero/tzero_fixer}/ast_type_modernizer.py +288 -288
  36. package/src/{tzero_fixer → tzero/tzero_fixer}/async_io_modernizer.py +127 -127
  37. package/src/{tzero_fixer → tzero/tzero_fixer}/automated_regression_suite.py +600 -600
  38. package/src/{tzero_fixer → tzero/tzero_fixer}/benchmarks_and_diagnostics.py +174 -174
  39. package/src/{tzero_fixer → tzero/tzero_fixer}/ci_cd_self_healing_gate.py +246 -246
  40. package/src/{tzero_fixer → tzero/tzero_fixer}/code_duplicity_and_refactorer.py +151 -151
  41. package/src/{tzero_fixer → tzero/tzero_fixer}/code_smells_healer.py +260 -260
  42. package/src/{tzero_fixer → tzero/tzero_fixer}/cwe_remediator.py +171 -171
  43. package/src/{tzero_fixer → tzero/tzero_fixer}/dead_code_eliminator.py +150 -150
  44. package/src/{tzero_fixer → tzero/tzero_fixer}/dependency_vulnerability_auditor.py +309 -309
  45. package/src/{tzero_fixer → tzero/tzero_fixer}/git_advanced_surgeon.py +1 -1
  46. package/src/{tzero_fixer → tzero/tzero_fixer}/hardware_and_disk_doctor.py +1 -1
  47. package/src/{tzero_fixer → tzero/tzero_fixer}/import_graph_healer.py +412 -412
  48. package/src/{tzero_fixer → tzero/tzero_fixer}/interactive_tui.py +91 -91
  49. package/src/{tzero_fixer → tzero/tzero_fixer}/knowledge_base.py +295 -295
  50. package/src/{tzero_fixer → tzero/tzero_fixer}/knowledge_base_extended.py +940 -940
  51. package/src/{tzero_fixer → tzero/tzero_fixer}/linters_and_static_analyzer.py +307 -307
  52. package/src/{tzero_fixer → tzero/tzero_fixer}/mcp_server.py +49 -7
  53. package/src/{tzero_fixer → tzero/tzero_fixer}/os_doctor.py +502 -502
  54. package/src/{tzero_fixer → tzero/tzero_fixer}/packaging_abi_surgeon.py +1 -1
  55. package/src/{tzero_fixer → tzero/tzero_fixer}/pc_fixer_doctor.py +600 -599
  56. package/src/{tzero_fixer → tzero/tzero_fixer}/performance_and_memory_profiler.py +274 -274
  57. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_ast_parsers.py +313 -313
  58. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_build_healer.py +1 -1
  59. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_config_healer.py +318 -318
  60. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_doctor.py +372 -372
  61. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_linters.py +1 -1
  62. package/src/{tzero_fixer → tzero/tzero_fixer}/polyglot_schema_validator.py +305 -305
  63. package/src/{tzero_fixer → tzero/tzero_fixer}/security_cwe_database.py +444 -444
  64. package/src/{tzero_fixer → tzero/tzero_fixer}/security_deep_rules.py +114 -114
  65. package/src/{tzero_fixer → tzero/tzero_fixer}/security_rules_catalog.py +110 -110
  66. package/src/{tzero_fixer → tzero/tzero_fixer}/security_zero_leak.py +326 -326
  67. package/src/{tzero_fixer → tzero/tzero_fixer}/smart_patch_recommender.py +223 -223
  68. package/src/{tzero_fixer → tzero/tzero_fixer}/synthetic_workspace_generator.py +220 -220
  69. package/src/{tzero_fixer → tzero/tzero_fixer}/system_diagnostics_extended.py +1 -1
  70. package/src/{tzero_fixer → tzero/tzero_fixer}/system_repair_recipes.py +447 -447
  71. package/src/{tzero_fixer → tzero/tzero_fixer}/venv_doctor.py +309 -309
  72. package/src/tzero/tzero_golden.py +319 -0
  73. package/src/tzero/tzero_graph_hud.html +338 -0
  74. package/src/tzero/tzero_graph_rag.py +263 -0
  75. package/src/{tzero_guard.py → tzero/tzero_guard.py} +243 -243
  76. package/src/tzero/tzero_hooks.py +565 -0
  77. package/src/{tzero_infra.py → tzero/tzero_infra.py} +274 -274
  78. package/src/{tzero_jarvis → tzero/tzero_jarvis}/__init__.py +124 -124
  79. package/src/{tzero_jarvis → tzero/tzero_jarvis}/causal_graph.py +310 -310
  80. package/src/{tzero_jarvis → tzero/tzero_jarvis}/graph_visualizer.py +395 -395
  81. package/src/{tzero_jarvis → tzero/tzero_jarvis}/hybrid_search.py +214 -214
  82. package/src/{tzero_jarvis → tzero/tzero_jarvis}/latent_press.py +137 -137
  83. package/src/{tzero_jarvis → tzero/tzero_jarvis}/memory_consolidation.py +212 -212
  84. package/src/{tzero_jarvis → tzero/tzero_jarvis}/minhash_lsh.py +184 -184
  85. package/src/{tzero_jarvis → tzero/tzero_jarvis}/orchestrator.py +335 -335
  86. package/src/{tzero_jarvis → tzero/tzero_jarvis}/self_healing.py +308 -308
  87. package/src/{tzero_jarvis → tzero/tzero_jarvis}/semantic_compressor.py +887 -887
  88. package/src/{tzero_jarvis → tzero/tzero_jarvis}/swarm.py +261 -261
  89. package/src/{tzero_jarvis → tzero/tzero_jarvis}/swarm_bft.py +144 -144
  90. package/src/{tzero_jarvis → tzero/tzero_jarvis}/workspace_orchestrator.py +1167 -1167
  91. package/src/{tzero_jarvis → tzero/tzero_jarvis}/zero_key_router.py +173 -173
  92. package/src/tzero/tzero_lsp.py +634 -0
  93. package/src/{tzero_mcp.py → tzero/tzero_mcp.py} +479 -100
  94. package/src/tzero/tzero_mutation.py +358 -0
  95. package/src/tzero/tzero_packer.py +577 -0
  96. package/src/{tzero_patch.py → tzero/tzero_patch.py} +624 -624
  97. package/src/{tzero_pc_fixer.py → tzero/tzero_pc_fixer.py} +12699 -12657
  98. package/src/{tzero_pipe.py → tzero/tzero_pipe.py} +95 -95
  99. package/src/tzero/tzero_polyglot.py +799 -0
  100. package/src/tzero/tzero_proxy.py +127 -0
  101. package/src/{tzero_reachability.py → tzero/tzero_reachability.py} +272 -272
  102. package/src/{tzero_replay.py → tzero/tzero_replay.py} +141 -141
  103. package/src/tzero/tzero_rust_bridge.py +198 -0
  104. package/src/tzero/tzero_scip.py +368 -0
  105. package/src/{tzero_security.py → tzero/tzero_security.py} +5 -2
  106. package/src/tzero/tzero_semantic_merge.py +189 -0
  107. package/src/tzero/tzero_snapshot.py +471 -0
  108. package/src/{tzero_stubs.py → tzero/tzero_stubs.py} +313 -313
  109. package/src/tzero/tzero_subagent_engine.py +459 -0
  110. package/src/{tzero_superdesign.py → tzero/tzero_superdesign.py} +774 -774
  111. package/src/{tzero_sync.py → tzero/tzero_sync.py} +241 -241
  112. package/src/{tzero_task_benchmark.py → tzero/tzero_task_benchmark.py} +458 -363
  113. package/src/{tzero_tui.py → tzero/tzero_tui.py} +91 -22
  114. package/src/tzero/tzero_turbo.py +264 -0
  115. package/src/{tzero_v3.py → tzero/tzero_v3.py} +628 -163
  116. package/src/tzero.py +2 -54
  117. package/test/package.test.js +55 -43
  118. package/src/tzero/jarvis/semantic_compressor.py +0 -373
  119. package/src/tzero_gateway.py +0 -885
  120. package/src/tzero_packer.py +0 -370
  121. package/src/tzero_polyglot.py +0 -422
  122. package/src/tzero_snapshot.py +0 -258
  123. /package/src/{siber_akademi_icon.py → tzero/siber_akademi_icon.py} +0 -0
  124. /package/src/{tzero_fixer → tzero/tzero_fixer}/amalgamation.py +0 -0
  125. /package/src/{tzero_fixer → tzero/tzero_fixer}/models.py +0 -0
  126. /package/src/{tzero_fixer → tzero/tzero_fixer}/orchestrator.py +0 -0
  127. /package/src/{tzero_neural_cortex.py → tzero/tzero_neural_cortex.py} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,29 +1,56 @@
1
- # Changelog
2
-
3
- All notable changes to the `tzero-mcp` package are documented in this file.
4
-
5
- ## [10.7.4] - 2026-11-07
6
-
7
- ### Added
8
- - Multi-contributor transparency in package manifest.
9
- - Comprehensive native test suite (`test/package.test.js`) verifying binary integrity and metadata.
10
- - Full TypeScript definitions export (`index.d.ts`).
11
- - Direct fallback detection for `PYTHON` environment variable in CLI launchers.
12
-
13
- ### Security & Supply Chain
14
- - 100% Zero-Dependency architecture (0 production dependencies, 0 development dependencies).
15
- - Zero lifecycle install scripts (removed postinstall hook for 100/100 Supply Chain score).
16
- - Secure process spawning with explicit argument arrays and `{ shell: false }`.
17
- - Complete bundled offline source code (`src/`).
18
-
19
- ## [10.7.3] - 2026-11-07
20
- - Removed postinstall lifecycle script to eliminate supply chain flags.
21
- - Switched launcher process execution from execSync to spawnSync with non-shell execution.
22
- - Added native Node.js test suite.
23
-
24
- ## [10.7.2] - 2026-11-07
25
- - Bundled full 98 Python source files in `src/`.
26
- - Packaged all core T-Zero AST engines.
27
-
28
- ## [10.7.0] - 2026-11-07
29
- - 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/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
- ### ⭐ Built by a 15-Year-Old Solo Developer (Please Star Our Repo!)
13
-
14
- Hi! I'm **Toprak Ahmet Aydoğmuş**, a 15-year-old solo open-source developer 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
- *Every single star means the world to a young open-source creator! 🚀*
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,66 +1,62 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * T-Zero Model Context Protocol (MCP) Server Launcher
5
- * Author: Toprak Ahmet Aydoğmuş (15-Year-Old Solo Developer @ 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[33m
16
- ┌──────────────────────────────────────────────────────────────────────────────┐
17
- │ ⭐ T-ZERO MCP SERVER v${pkg.version} (Model Context Protocol) │
18
- │ │
19
- │ Hi! I'm Toprak Ahmet Aydoğmuş, a 15-year-old developer from Siber Akademi. │
20
- │ I created T-Zero to eliminate token limits & hallucinations. │
21
- │ │
22
- │ If T-Zero helps your workflows, please give our project a STAR on GitHub: │
23
- │ 👉 https://github.com/toprakahmetaydogmus/TZeroAlgorithm │
24
- │ │
25
- │ Every star means the world to a young open-source creator! 🚀 Thank you! │
26
- └──────────────────────────────────────────────────────────────────────────────┘
27
- \x1b[0m`;
28
-
29
- if (process.stderr.isTTY) {
30
- process.stderr.write(banner + "\n");
31
- }
32
-
33
- function findPython() {
34
- if (process.env.PYTHON) return process.env.PYTHON;
35
- const candidates = ["python3", "python", "py"];
36
- for (const cmd of candidates) {
37
- try {
38
- const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
39
- if (res.status === 0) return cmd;
40
- } catch (e) {
41
- // continue
42
- }
43
- }
44
- return null;
45
- }
46
-
47
- const py = findPython();
48
- if (!py) {
49
- console.error("\x1b[31m[ERROR] Python 3.10+ is required to run T-Zero MCP Server.\x1b[0m");
50
- console.error("Please install Python from https://python.org or your package manager.");
51
- process.exit(1);
52
- }
53
-
54
- const srcDir = path.resolve(__dirname, "..", "src");
55
- const scriptPath = path.join(srcDir, "tzero_mcp.py");
56
-
57
- const env = Object.assign({}, process.env, {
58
- PYTHONPATH: srcDir + (process.env.PYTHONPATH ? path.delimiter + process.env.PYTHONPATH : "")
59
- });
60
-
61
- const args = [scriptPath, ...process.argv.slice(2)];
62
- const child = spawn(py, args, { stdio: "inherit", shell: false, env });
63
-
64
- child.on("close", (code) => {
65
- process.exit(code ?? 0);
66
- });
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
+ });
package/bin/tzero.js CHANGED
@@ -1,65 +1,61 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * T-Zero Context Architect CLI Launcher
5
- * Author: Toprak Ahmet Aydoğmuş (15-Year-Old Solo Developer @ 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
- const banner = `\x1b[33m
15
- ┌──────────────────────────────────────────────────────────────────────────────┐
16
- │ ⭐ T-ZERO CONTEXT ARCHITECT & MCP ENGINE v${pkg.version} │
17
- │ │
18
- │ Hi! I'm Toprak Ahmet Aydoğmuş, a 15-year-old developer from Siber Akademi. │
19
- │ I built T-Zero from scratch to eliminate token bloat and AI hallucinations. │
20
- │ │
21
- │ If this tool saves you tokens, please give our project a STAR on GitHub: │
22
- │ 👉 https://github.com/toprakahmetaydogmus/TZeroAlgorithm │
23
- │ │
24
- │ Every star means the world to a young open-source creator! 🚀 Thank you! │
25
- └──────────────────────────────────────────────────────────────────────────────┘
26
- \x1b[0m`;
27
-
28
- if (process.stdout.isTTY && !process.argv.includes("--json") && !process.argv.includes("--pipe")) {
29
- console.log(banner);
30
- }
31
-
32
- function findPython() {
33
- if (process.env.PYTHON) return process.env.PYTHON;
34
- const candidates = ["python3", "python", "py"];
35
- for (const cmd of candidates) {
36
- try {
37
- const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
38
- if (res.status === 0) return cmd;
39
- } catch (e) {
40
- // continue
41
- }
42
- }
43
- return null;
44
- }
45
-
46
- const py = findPython();
47
- if (!py) {
48
- console.error("\x1b[31m[ERROR] Python 3.10+ is required to run T-Zero.\x1b[0m");
49
- console.error("Please install Python from https://python.org or your package manager.");
50
- process.exit(1);
51
- }
52
-
53
- const srcDir = path.resolve(__dirname, "..", "src");
54
- const scriptPath = path.join(srcDir, "tzero_v3.py");
55
-
56
- const env = Object.assign({}, process.env, {
57
- PYTHONPATH: srcDir + (process.env.PYTHONPATH ? path.delimiter + process.env.PYTHONPATH : "")
58
- });
59
-
60
- const args = [scriptPath, ...process.argv.slice(2)];
61
- const child = spawn(py, args, { stdio: "inherit", shell: false, env });
62
-
63
- child.on("close", (code) => {
64
- process.exit(code ?? 0);
65
- });
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * T-Zero Context Architect CLI 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
+ const banner = `\x1b[36m
15
+ ┌──────────────────────────────────────────────────────────────────────────────┐
16
+ │ ⚡ T-ZERO CONTEXT ARCHITECT & MCP ENGINE v${pkg.version} │
17
+ │ Deterministic AST Context Compressor, 95% Token Reducer & Security Guard │
18
+ │ │
19
+ │ ⭐ Star on GitHub: https://github.com/toprakahmetaydogmus/TZeroAlgorithm │
20
+ │ 💡 1-Click Init: tzero init (Cursor, Claude, Windsurf, Antigravity) │
21
+ └──────────────────────────────────────────────────────────────────────────────┘
22
+ \x1b[0m`;
23
+
24
+ if (process.stdout.isTTY && !process.argv.includes("--json") && !process.argv.includes("--pipe")) {
25
+ console.log(banner);
26
+ }
27
+
28
+ function findPython() {
29
+ if (process.env.PYTHON) return process.env.PYTHON;
30
+ const candidates = ["python3", "python", "py"];
31
+ for (const cmd of candidates) {
32
+ try {
33
+ const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
34
+ if (res.status === 0) return cmd;
35
+ } catch (e) {
36
+ // continue
37
+ }
38
+ }
39
+ return null;
40
+ }
41
+
42
+ const py = findPython();
43
+ if (!py) {
44
+ console.error("\x1b[31m[ERROR] Python 3.10+ is required to run T-Zero.\x1b[0m");
45
+ console.error("Please install Python from https://python.org or your package manager.");
46
+ process.exit(1);
47
+ }
48
+
49
+ const srcDir = path.resolve(__dirname, "..", "src");
50
+ const scriptPath = path.join(srcDir, "tzero", "tzero_v3.py");
51
+
52
+ const env = Object.assign({}, process.env, {
53
+ PYTHONPATH: srcDir + (process.env.PYTHONPATH ? path.delimiter + process.env.PYTHONPATH : "")
54
+ });
55
+
56
+ const args = [scriptPath, ...process.argv.slice(2)];
57
+ const child = spawn(py, args, { stdio: "inherit", shell: false, env });
58
+
59
+ child.on("close", (code) => {
60
+ process.exit(code ?? 0);
61
+ });