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
@@ -1,153 +1,153 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- Siber Akademi — T-Zero CI/CD Pipeline & Security Gate Generator.
4
- Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
5
- License: MIT
6
-
7
- Installs zero-dependency, automated CI/CD security and verification pipelines:
8
- - GitHub Actions: .github/workflows/tzero_guard.yml
9
- - GitLab CI: .gitlab-ci.yml
10
- - Pre-commit: .pre-commit-config.yaml
11
- """
12
-
13
- import sys
14
- if sys.platform == "win32":
15
- try:
16
- sys.stdout.reconfigure(encoding="utf-8")
17
- sys.stderr.reconfigure(encoding="utf-8")
18
- except Exception:
19
- pass
20
-
21
- import os
22
- from typing import Tuple, Dict, Any
23
-
24
-
25
- GITHUB_WORKFLOW_TEMPLATE = """name: T-Zero Autonomous Quality & Zero-Leak Gate
26
-
27
- on:
28
- push:
29
- branches: [ main, master ]
30
- pull_request:
31
- branches: [ main, master ]
32
-
33
- jobs:
34
- tzero-verify:
35
- name: T-Zero Autonomous Verification Gate
36
- runs-on: ${{ matrix.os }}
37
- strategy:
38
- fail-fast: false
39
- matrix:
40
- os: [ubuntu-24.04, windows-latest]
41
- python-version: ["3.10", "3.11", "3.12"]
42
-
43
- steps:
44
- - name: Checkout Codebase
45
- uses: actions/checkout@v5
46
- with:
47
- fetch-depth: 0
48
-
49
- - name: Set up Python ${{ matrix.python-version }}
50
- uses: actions/setup-python@v6
51
- with:
52
- python-version: ${{ matrix.python-version }}
53
- cache: 'pip'
54
-
55
- - name: Install Dependencies
56
- run: |
57
- python -m pip install --upgrade pip
58
- pip install flake8 fastmcp keyring requests
59
-
60
- - name: Zero-Leak Security & Code Quality Audit
61
- run: |
62
- tzero --audit . --format text
63
-
64
- - name: Enforce T-4 Architectural Boundary Rules
65
- run: |
66
- tzero --enforce-boundaries tzero.rules.json
67
-
68
- - name: Run Comprehensive Test Suite
69
- run: |
70
- python -m unittest discover -s tests -p "test_*.py" -v
71
-
72
- - name: PR Incremental Token Savings Telemetry
73
- if: github.event_name == 'pull_request'
74
- run: |
75
- tzero --diff HEAD~1
76
- """
77
-
78
- GITLAB_CI_TEMPLATE = """stages:
79
- - audit
80
- - test
81
-
82
- variables:
83
- PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
84
-
85
- cache:
86
- paths:
87
- - .cache/pip
88
-
89
- tzero_audit:
90
- stage: audit
91
- image: python:3.11-slim
92
- script:
93
- - pip install --upgrade pip
94
- - pip install fastmcp keyring requests
95
- - tzero --audit . --format text
96
- - tzero --enforce-boundaries tzero.rules.json
97
-
98
- tzero_tests:
99
- stage: test
100
- image: python:3.11-slim
101
- script:
102
- - pip install --upgrade pip
103
- - pip install fastmcp keyring requests
104
- - python -m unittest discover -s tests -p "test_*.py" -v
105
- """
106
-
107
- PRE_COMMIT_CONFIG_TEMPLATE = """repos:
108
- - repo: local
109
- hooks:
110
- - id: tzero-zero-leak
111
- name: T-Zero 100% Zero-Leak Security Scanner
112
- entry: tzero --audit .
113
- language: system
114
- pass_filenames: false
115
- always_run: true
116
-
117
- - id: tzero-architectural-boundaries
118
- name: T-Zero Architectural Boundaries Enforcer
119
- entry: tzero --enforce-boundaries
120
- language: system
121
- pass_filenames: false
122
- always_run: true
123
- """
124
-
125
-
126
- class CIPipelineGenerator:
127
- """Turnkey generator for automated enterprise CI/CD verification workflows."""
128
-
129
- @classmethod
130
- def install_github_workflow(cls, repo_dir: str = ".") -> Tuple[bool, str]:
131
- """Installs GitHub Actions workflow into .github/workflows/tzero_guard.yml."""
132
- wf_dir = os.path.join(repo_dir, ".github", "workflows")
133
- os.makedirs(wf_dir, exist_ok=True)
134
- wf_path = os.path.join(wf_dir, "tzero_guard.yml")
135
- with open(wf_path, "w", encoding="utf-8") as f:
136
- f.write(GITHUB_WORKFLOW_TEMPLATE.strip() + "\n")
137
- return True, wf_path
138
-
139
- @classmethod
140
- def install_gitlab_ci(cls, repo_dir: str = ".") -> Tuple[bool, str]:
141
- """Installs GitLab CI configuration into .gitlab-ci.yml."""
142
- ci_path = os.path.join(repo_dir, ".gitlab-ci.yml")
143
- with open(ci_path, "w", encoding="utf-8") as f:
144
- f.write(GITLAB_CI_TEMPLATE.strip() + "\n")
145
- return True, ci_path
146
-
147
- @classmethod
148
- def install_pre_commit(cls, repo_dir: str = ".") -> Tuple[bool, str]:
149
- """Installs pre-commit configuration into .pre-commit-config.yaml."""
150
- pc_path = os.path.join(repo_dir, ".pre-commit-config.yaml")
151
- with open(pc_path, "w", encoding="utf-8") as f:
152
- f.write(PRE_COMMIT_CONFIG_TEMPLATE.strip() + "\n")
153
- return True, pc_path
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Siber Akademi — T-Zero CI/CD Pipeline & Security Gate Generator.
4
+ Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
5
+ License: MIT
6
+
7
+ Installs zero-dependency, automated CI/CD security and verification pipelines:
8
+ - GitHub Actions: .github/workflows/tzero_guard.yml
9
+ - GitLab CI: .gitlab-ci.yml
10
+ - Pre-commit: .pre-commit-config.yaml
11
+ """
12
+
13
+ import sys
14
+ if sys.platform == "win32":
15
+ try:
16
+ sys.stdout.reconfigure(encoding="utf-8")
17
+ sys.stderr.reconfigure(encoding="utf-8")
18
+ except Exception:
19
+ pass
20
+
21
+ import os
22
+ from typing import Tuple, Dict, Any
23
+
24
+
25
+ GITHUB_WORKFLOW_TEMPLATE = """name: T-Zero Autonomous Quality & Zero-Leak Gate
26
+
27
+ on:
28
+ push:
29
+ branches: [ main, master ]
30
+ pull_request:
31
+ branches: [ main, master ]
32
+
33
+ jobs:
34
+ tzero-verify:
35
+ name: T-Zero Autonomous Verification Gate
36
+ runs-on: ${{ matrix.os }}
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ os: [ubuntu-24.04, windows-latest]
41
+ python-version: ["3.10", "3.11", "3.12"]
42
+
43
+ steps:
44
+ - name: Checkout Codebase
45
+ uses: actions/checkout@v5
46
+ with:
47
+ fetch-depth: 0
48
+
49
+ - name: Set up Python ${{ matrix.python-version }}
50
+ uses: actions/setup-python@v6
51
+ with:
52
+ python-version: ${{ matrix.python-version }}
53
+ cache: 'pip'
54
+
55
+ - name: Install Dependencies
56
+ run: |
57
+ python -m pip install --upgrade pip
58
+ pip install flake8 fastmcp keyring requests
59
+
60
+ - name: Zero-Leak Security & Code Quality Audit
61
+ run: |
62
+ tzero --audit . --format text
63
+
64
+ - name: Enforce T-4 Architectural Boundary Rules
65
+ run: |
66
+ tzero --enforce-boundaries tzero.rules.json
67
+
68
+ - name: Run Comprehensive Test Suite
69
+ run: |
70
+ python -m unittest discover -s tests -p "test_*.py" -v
71
+
72
+ - name: PR Incremental Token Savings Telemetry
73
+ if: github.event_name == 'pull_request'
74
+ run: |
75
+ tzero --diff HEAD~1
76
+ """
77
+
78
+ GITLAB_CI_TEMPLATE = """stages:
79
+ - audit
80
+ - test
81
+
82
+ variables:
83
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
84
+
85
+ cache:
86
+ paths:
87
+ - .cache/pip
88
+
89
+ tzero_audit:
90
+ stage: audit
91
+ image: python:3.11-slim
92
+ script:
93
+ - pip install --upgrade pip
94
+ - pip install fastmcp keyring requests
95
+ - tzero --audit . --format text
96
+ - tzero --enforce-boundaries tzero.rules.json
97
+
98
+ tzero_tests:
99
+ stage: test
100
+ image: python:3.11-slim
101
+ script:
102
+ - pip install --upgrade pip
103
+ - pip install fastmcp keyring requests
104
+ - python -m unittest discover -s tests -p "test_*.py" -v
105
+ """
106
+
107
+ PRE_COMMIT_CONFIG_TEMPLATE = """repos:
108
+ - repo: local
109
+ hooks:
110
+ - id: tzero-zero-leak
111
+ name: T-Zero 100% Zero-Leak Security Scanner
112
+ entry: tzero --audit .
113
+ language: system
114
+ pass_filenames: false
115
+ always_run: true
116
+
117
+ - id: tzero-architectural-boundaries
118
+ name: T-Zero Architectural Boundaries Enforcer
119
+ entry: tzero --enforce-boundaries
120
+ language: system
121
+ pass_filenames: false
122
+ always_run: true
123
+ """
124
+
125
+
126
+ class CIPipelineGenerator:
127
+ """Turnkey generator for automated enterprise CI/CD verification workflows."""
128
+
129
+ @classmethod
130
+ def install_github_workflow(cls, repo_dir: str = ".") -> Tuple[bool, str]:
131
+ """Installs GitHub Actions workflow into .github/workflows/tzero_guard.yml."""
132
+ wf_dir = os.path.join(repo_dir, ".github", "workflows")
133
+ os.makedirs(wf_dir, exist_ok=True)
134
+ wf_path = os.path.join(wf_dir, "tzero_guard.yml")
135
+ with open(wf_path, "w", encoding="utf-8") as f:
136
+ f.write(GITHUB_WORKFLOW_TEMPLATE.strip() + "\n")
137
+ return True, wf_path
138
+
139
+ @classmethod
140
+ def install_gitlab_ci(cls, repo_dir: str = ".") -> Tuple[bool, str]:
141
+ """Installs GitLab CI configuration into .gitlab-ci.yml."""
142
+ ci_path = os.path.join(repo_dir, ".gitlab-ci.yml")
143
+ with open(ci_path, "w", encoding="utf-8") as f:
144
+ f.write(GITLAB_CI_TEMPLATE.strip() + "\n")
145
+ return True, ci_path
146
+
147
+ @classmethod
148
+ def install_pre_commit(cls, repo_dir: str = ".") -> Tuple[bool, str]:
149
+ """Installs pre-commit configuration into .pre-commit-config.yaml."""
150
+ pc_path = os.path.join(repo_dir, ".pre-commit-config.yaml")
151
+ with open(pc_path, "w", encoding="utf-8") as f:
152
+ f.write(PRE_COMMIT_CONFIG_TEMPLATE.strip() + "\n")
153
+ return True, pc_path