tzero-mcp 12.3.2 → 12.3.3
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.
- package/package.json +1 -1
- package/src/addmcp.py +2 -2
- package/src/app.py +1 -1
- package/src/tzero/__init__.py +1 -1
- package/src/tzero/tzero_armor.py +1 -1
- package/src/tzero/tzero_benchmark.py +1 -1
- package/src/tzero/tzero_budget.py +1 -1
- package/src/tzero/tzero_ci.py +1 -1
- package/src/tzero/tzero_contracts.py +2 -2
- package/src/tzero/tzero_dashboard.py +3 -3
- package/src/tzero/tzero_debt.py +85 -7
- package/src/tzero/tzero_explain.py +1 -1
- package/src/tzero/tzero_golden.py +2 -2
- package/src/tzero/tzero_graph_hud.html +4 -4
- package/src/tzero/tzero_growth.py +1 -1
- package/src/tzero/tzero_jarvis/swarm.py +23 -2
- package/src/tzero/tzero_lsp.py +1 -1
- package/src/tzero/tzero_mcp.py +21 -3
- package/src/tzero/tzero_promo.py +1 -1
- package/src/tzero/tzero_task_benchmark.py +2 -2
- package/src/tzero/tzero_traffic.py +1 -1
- package/src/tzero/tzero_tui.py +2 -2
- package/src/tzero/tzero_v3.py +378 -206
- package/src/tzero/tzero_welcome.py +1 -1
package/package.json
CHANGED
package/src/addmcp.py
CHANGED
|
@@ -22,7 +22,7 @@ from pathlib import Path
|
|
|
22
22
|
from typing import Callable, Dict, List, Optional, Tuple
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
APP_VERSION = "12.3.
|
|
25
|
+
APP_VERSION = "12.3.3"
|
|
26
26
|
SERVER_NAME = "tzero"
|
|
27
27
|
SERVER_FILENAME = "TZeroMCP.exe"
|
|
28
28
|
|
|
@@ -1131,7 +1131,7 @@ def run_init(argv: Optional[List[str]] = None) -> int:
|
|
|
1131
1131
|
# Print banner
|
|
1132
1132
|
print(sanitize_terminal_text("""
|
|
1133
1133
|
\033[1;36m================================================================================
|
|
1134
|
-
⚡ SİBER AKADEMİ — T-ZERO 1-CLICK MCP INITIALIZATION (v12.3.
|
|
1134
|
+
⚡ SİBER AKADEMİ — T-ZERO 1-CLICK MCP INITIALIZATION (v12.3.3)
|
|
1135
1135
|
================================================================================\033[0m
|
|
1136
1136
|
\033[32m★ Zero-Config AST Codebase Context & 100% Zero-Leak Security Guard\033[0m
|
|
1137
1137
|
"""))
|
package/src/app.py
CHANGED
|
@@ -42,7 +42,7 @@ import gradio as gr
|
|
|
42
42
|
# ==================================================================================================
|
|
43
43
|
# CONSTANTS, PALETTES & MULTI-MODEL PRICING TIERS
|
|
44
44
|
# ==================================================================================================
|
|
45
|
-
APP_VERSION = "12.3.
|
|
45
|
+
APP_VERSION = "12.3.3"
|
|
46
46
|
REPO_URL = "https://github.com/toprakahmetaydogmus/TZeroAlgorithm"
|
|
47
47
|
VERCEL_URL = "https://tzero-indol.vercel.app"
|
|
48
48
|
SPACE_URL = "https://huggingface.co/spaces/toprakke4/tzero-token-reducer"
|
package/src/tzero/__init__.py
CHANGED
package/src/tzero/tzero_armor.py
CHANGED
|
@@ -8,7 +8,7 @@ Includes native Ring-3 anti-debugging against x64dbg, IDA Pro, WinDbg, and Cheat
|
|
|
8
8
|
opt-in tamper alert webhook, in-flight string vault, and Electron asar shielding.
|
|
9
9
|
|
|
10
10
|
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
11
|
-
Part of Siber Akademi T-Zero Context Architect v12.3.
|
|
11
|
+
Part of Siber Akademi T-Zero Context Architect v12.3.3 Master Edition.
|
|
12
12
|
License: MIT
|
|
13
13
|
"""
|
|
14
14
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
Siber Akademi — T-Zero Autonomous Benchmark & Performance Optimization Engine.
|
|
4
4
|
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
5
|
-
Version: 12.3.
|
|
5
|
+
Version: 12.3.3
|
|
6
6
|
License: MIT
|
|
7
7
|
|
|
8
8
|
Performs quantitative multi-model benchmarks comparing raw codebase context
|
|
@@ -12,7 +12,7 @@ Capabilities:
|
|
|
12
12
|
- 100% Offline, $0 cost, zero cloud dependencies (Python standard library only).
|
|
13
13
|
|
|
14
14
|
Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
15
|
-
Part of T-Zero Context Architect v12.3.
|
|
15
|
+
Part of T-Zero Context Architect v12.3.3 Master Edition.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
import hashlib
|
package/src/tzero/tzero_ci.py
CHANGED
|
@@ -755,7 +755,7 @@ def main():
|
|
|
755
755
|
prog="tzero-ci",
|
|
756
756
|
description="Siber Akademi T-Zero Local CI Pipeline & Pre-Push Verification Shield"
|
|
757
757
|
)
|
|
758
|
-
parser.add_argument("--version", "-v", action="version", version="%(prog)s 12.3.
|
|
758
|
+
parser.add_argument("--version", "-v", action="version", version="%(prog)s 12.3.3")
|
|
759
759
|
parser.add_argument("--quick", "-q", action="store_true", help="Run fast verification battery (seconds)")
|
|
760
760
|
parser.add_argument("--all", "-a", action="store_true", help="Run full matrix verification battery")
|
|
761
761
|
parser.add_argument("--fix", action="store_true", help="Attempt auto-repair for auto-fixable gates (metadata sync)")
|
|
@@ -13,7 +13,7 @@ Capabilities:
|
|
|
13
13
|
- 100% Offline, $0 cost, zero external dependencies (pure Python standard library).
|
|
14
14
|
|
|
15
15
|
Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
16
|
-
Part of T-Zero Context Architect v12.3.
|
|
16
|
+
Part of T-Zero Context Architect v12.3.3 Master Edition.
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
import ast
|
|
@@ -1056,7 +1056,7 @@ class ASTContractComparator:
|
|
|
1056
1056
|
"tool": {
|
|
1057
1057
|
"driver": {
|
|
1058
1058
|
"name": "T-Zero Contract Guardian",
|
|
1059
|
-
"version": "12.3.
|
|
1059
|
+
"version": "12.3.3",
|
|
1060
1060
|
"rules": rules_list
|
|
1061
1061
|
}
|
|
1062
1062
|
},
|
|
@@ -457,7 +457,7 @@ HTML_PAGE = """<!DOCTYPE html>
|
|
|
457
457
|
<div class="brand-logo">T0</div>
|
|
458
458
|
<div>
|
|
459
459
|
<div class="brand-title">T-Zero Developer Console</div>
|
|
460
|
-
<div class="brand-sub" id="headerBrandSub">Enterprise AST Context Architect • v12.3.
|
|
460
|
+
<div class="brand-sub" id="headerBrandSub">Enterprise AST Context Architect • v12.3.3</div>
|
|
461
461
|
</div>
|
|
462
462
|
</div>
|
|
463
463
|
<div class="header-actions">
|
|
@@ -850,7 +850,7 @@ x = 2
|
|
|
850
850
|
</main>
|
|
851
851
|
|
|
852
852
|
<footer>
|
|
853
|
-
<span id="footerBrand">T-Zero Context Architect v12.3.
|
|
853
|
+
<span id="footerBrand">T-Zero Context Architect v12.3.3</span> • Developer: Toprak Ahmet Aydoğmuş • Siber Akademi
|
|
854
854
|
</footer>
|
|
855
855
|
|
|
856
856
|
<script>
|
|
@@ -1481,7 +1481,7 @@ def compute_live_dashboard_stats(workspace_dir: str = ".") -> Dict[str, Any]:
|
|
|
1481
1481
|
if cached is not None and (now - _DASHBOARD_STATS_CACHE["ts"]) < 60.0:
|
|
1482
1482
|
return cached
|
|
1483
1483
|
|
|
1484
|
-
version = "12.3.
|
|
1484
|
+
version = "12.3.3"
|
|
1485
1485
|
tools_count = 57
|
|
1486
1486
|
try:
|
|
1487
1487
|
from tzero import tzero_mcp
|
package/src/tzero/tzero_debt.py
CHANGED
|
@@ -13,7 +13,7 @@ Capabilities:
|
|
|
13
13
|
- 100% Offline, $0 cost, zero cloud dependencies (Python standard library only).
|
|
14
14
|
|
|
15
15
|
Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
16
|
-
Part of T-Zero Context Architect v12.3.
|
|
16
|
+
Part of T-Zero Context Architect v12.3.3 Master Edition.
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
import ast
|
|
@@ -68,6 +68,7 @@ class FileHealthReport:
|
|
|
68
68
|
functions: List[FunctionHealth] = field(default_factory=list)
|
|
69
69
|
classes: List[ClassHealth] = field(default_factory=list)
|
|
70
70
|
debt_markers: List[Dict[str, Any]] = field(default_factory=list)
|
|
71
|
+
debt_by_scope: Dict[str, int] = field(default_factory=dict) # "Class.method" -> marker count
|
|
71
72
|
|
|
72
73
|
|
|
73
74
|
@dataclass
|
|
@@ -193,21 +194,64 @@ class CodeHealthAnalyzer:
|
|
|
193
194
|
normalized = max(0.0, min(100.0, (raw_mi * 100.0) / 171.0))
|
|
194
195
|
return round(normalized, 1)
|
|
195
196
|
|
|
197
|
+
# Estimated remediation hours per marker tag (replaces the flat 0.5h per marker).
|
|
198
|
+
TAG_DEBT_HOURS: Dict[str, float] = {
|
|
199
|
+
"TEMP": 0.25,
|
|
200
|
+
"TODO": 0.5,
|
|
201
|
+
"XXX": 0.5,
|
|
202
|
+
"FIXME": 1.0,
|
|
203
|
+
"HACK": 1.5,
|
|
204
|
+
}
|
|
205
|
+
|
|
196
206
|
@classmethod
|
|
197
207
|
def extract_debt_markers(cls, code: str) -> List[Dict[str, Any]]:
|
|
198
|
-
"""Finds TODO, FIXME, HACK, XXX, TEMP debt comments."""
|
|
208
|
+
"""Finds TODO, FIXME, HACK, XXX, TEMP debt comments (Python '#' and C-style '//')."""
|
|
199
209
|
markers = []
|
|
200
|
-
pattern = re.compile(r"
|
|
210
|
+
pattern = re.compile(r"(?:#|//)\s*(TODO|FIXME|HACK|XXX|TEMP)\b[:\s]*(.*)", re.IGNORECASE)
|
|
201
211
|
for idx, line in enumerate(code.splitlines(), start=1):
|
|
202
212
|
match = pattern.search(line)
|
|
203
213
|
if match:
|
|
214
|
+
tag = match.group(1).upper()
|
|
204
215
|
markers.append({
|
|
205
216
|
"line": idx,
|
|
206
|
-
"tag":
|
|
207
|
-
"text": match.group(2).strip()
|
|
217
|
+
"tag": tag,
|
|
218
|
+
"text": match.group(2).strip(),
|
|
219
|
+
"weight_hours": cls.TAG_DEBT_HOURS.get(tag, 0.5),
|
|
220
|
+
"scope": "<module>",
|
|
208
221
|
})
|
|
209
222
|
return markers
|
|
210
223
|
|
|
224
|
+
@staticmethod
|
|
225
|
+
def attach_marker_scopes(markers: List[Dict[str, Any]], tree: ast.AST) -> Dict[str, int]:
|
|
226
|
+
"""Sets each marker's 'scope' to its innermost enclosing class/function.
|
|
227
|
+
|
|
228
|
+
Returns a histogram {scope: marker_count} sorted by count (descending).
|
|
229
|
+
"""
|
|
230
|
+
spans: List[Tuple[int, int, str]] = []
|
|
231
|
+
|
|
232
|
+
def walk(node: ast.AST, prefix: str) -> None:
|
|
233
|
+
for child in ast.iter_child_nodes(node):
|
|
234
|
+
if isinstance(child, (ast.ClassDef, ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
235
|
+
name = f"{prefix}{child.name}"
|
|
236
|
+
end = getattr(child, "end_lineno", None) or child.lineno
|
|
237
|
+
spans.append((child.lineno, end, name))
|
|
238
|
+
walk(child, name + ".")
|
|
239
|
+
else:
|
|
240
|
+
walk(child, prefix)
|
|
241
|
+
|
|
242
|
+
walk(tree, "")
|
|
243
|
+
counts: Dict[str, int] = {}
|
|
244
|
+
for marker in markers:
|
|
245
|
+
line = marker["line"]
|
|
246
|
+
best: Optional[Tuple[int, int, str]] = None
|
|
247
|
+
for start, end, name in spans:
|
|
248
|
+
if start <= line <= end and (best is None or (end - start) < (best[1] - best[0])):
|
|
249
|
+
best = (start, end, name)
|
|
250
|
+
scope = best[2] if best else "<module>"
|
|
251
|
+
marker["scope"] = scope
|
|
252
|
+
counts[scope] = counts.get(scope, 0) + 1
|
|
253
|
+
return dict(sorted(counts.items(), key=lambda kv: kv[1], reverse=True))
|
|
254
|
+
|
|
211
255
|
@classmethod
|
|
212
256
|
def analyze_file(cls, file_path: str, code: Optional[str] = None) -> FileHealthReport:
|
|
213
257
|
if code is None:
|
|
@@ -257,10 +301,12 @@ class CodeHealthAnalyzer:
|
|
|
257
301
|
total_cog = cls.compute_cognitive_complexity(tree)
|
|
258
302
|
mi = cls.compute_maintainability_index(code, total_cc)
|
|
259
303
|
debt_markers = cls.extract_debt_markers(code)
|
|
304
|
+
debt_by_scope = cls.attach_marker_scopes(debt_markers, tree)
|
|
260
305
|
|
|
261
306
|
fn_reports: List[FunctionHealth] = []
|
|
262
307
|
cls_reports: List[ClassHealth] = []
|
|
263
|
-
|
|
308
|
+
# Tag-weighted marker cost (TODO 0.5h, FIXME 1h, HACK 1.5h, TEMP 0.25h).
|
|
309
|
+
total_debt_hours = sum(m["weight_hours"] for m in debt_markers)
|
|
264
310
|
|
|
265
311
|
for node in ast.walk(tree):
|
|
266
312
|
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
@@ -341,7 +387,8 @@ class CodeHealthAnalyzer:
|
|
|
341
387
|
todo_count=len(debt_markers),
|
|
342
388
|
functions=fn_reports,
|
|
343
389
|
classes=cls_reports,
|
|
344
|
-
debt_markers=debt_markers
|
|
390
|
+
debt_markers=debt_markers,
|
|
391
|
+
debt_by_scope=debt_by_scope,
|
|
345
392
|
)
|
|
346
393
|
|
|
347
394
|
@classmethod
|
|
@@ -483,3 +530,34 @@ class CodeHealthAnalyzer:
|
|
|
483
530
|
|
|
484
531
|
return "\n".join(lines).strip()
|
|
485
532
|
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
def format_debt_markers_markdown(report: WorkspaceHealthReport, limit: int = 50) -> str:
|
|
536
|
+
"""Renders every debt marker grouped by file and scope, sorted by weight (heaviest first)."""
|
|
537
|
+
rows: List[Tuple[float, str, Dict[str, Any]]] = []
|
|
538
|
+
for fr in report.file_reports:
|
|
539
|
+
for marker in fr.debt_markers:
|
|
540
|
+
rows.append((marker.get("weight_hours", 0.5), fr.file_path, marker))
|
|
541
|
+
rows.sort(key=lambda r: (-r[0], r[1], r[2]["line"]))
|
|
542
|
+
|
|
543
|
+
lines = [
|
|
544
|
+
"# Technical Debt Markers",
|
|
545
|
+
"",
|
|
546
|
+
f"- **Markers found:** {len(rows)}",
|
|
547
|
+
f"- **Estimated remediation:** {round(sum(r[0] for r in rows), 2)} h",
|
|
548
|
+
"",
|
|
549
|
+
]
|
|
550
|
+
if not rows:
|
|
551
|
+
lines.append("No TODO / FIXME / HACK / XXX / TEMP markers found.")
|
|
552
|
+
return "\n".join(lines)
|
|
553
|
+
|
|
554
|
+
lines += ["| Tag | Hours | File | Line | Scope | Text |", "|---|---|---|---|---|---|"]
|
|
555
|
+
for weight, path, marker in rows[:limit]:
|
|
556
|
+
text = marker.get("text", "").replace("|", "\\|")[:80]
|
|
557
|
+
lines.append(
|
|
558
|
+
f"| {marker['tag']} | {weight} | `{path}` | {marker['line']} | "
|
|
559
|
+
f"`{marker.get('scope', '<module>')}` | {text} |"
|
|
560
|
+
)
|
|
561
|
+
if len(rows) > limit:
|
|
562
|
+
lines.append(f"\n_…{len(rows) - limit} more markers omitted (limit={limit})._")
|
|
563
|
+
return "\n".join(lines)
|
|
@@ -11,7 +11,7 @@ Capabilities:
|
|
|
11
11
|
- 100% Offline, $0 cost, zero cloud dependencies (Python standard library only).
|
|
12
12
|
|
|
13
13
|
Author: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
14
|
-
Part of T-Zero Context Architect v12.3.
|
|
14
|
+
Part of T-Zero Context Architect v12.3.3 Master Edition.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import ast
|
|
@@ -208,7 +208,7 @@ class ASTGoldenRegressionEngine:
|
|
|
208
208
|
|
|
209
209
|
return GoldenBaseline(
|
|
210
210
|
workspace_root=abs_root,
|
|
211
|
-
version="12.3.
|
|
211
|
+
version="12.3.3",
|
|
212
212
|
created_at=time.time(),
|
|
213
213
|
symbols=all_sigs,
|
|
214
214
|
total_symbols=len(all_sigs),
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
<div id="controls">
|
|
98
|
-
<input type="text" id="searchInput" placeholder="
|
|
98
|
+
<input type="text" id="searchInput" placeholder="Search node / code (e.g. ESP32, #8421)..." oninput="filterGraph()">
|
|
99
99
|
</div>
|
|
100
100
|
|
|
101
101
|
<div id="stats-bar">
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
Nodes: <span id="nodeCount" style="color:#38bdf8">0</span> |
|
|
103
|
+
Edges: <span id="edgeCount" style="color:#818cf8">0</span> |
|
|
104
104
|
FPS: <span id="fpsCount" style="color:#fbbf24">60</span>
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="inspector">
|
|
108
|
-
<h3 id="insTitle" style="color:#38bdf8; margin-bottom:6px;">
|
|
108
|
+
<h3 id="insTitle" style="color:#38bdf8; margin-bottom:6px;">Details</h3>
|
|
109
109
|
<p id="insBody" style="color:#cbd5e1; line-height:1.5;"></p>
|
|
110
110
|
</div>
|
|
111
111
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
T-ZERO $0.00 BUDGET VIRAL MARKETING & COMMUNITY GROWTH ENGINE
|
|
4
4
|
-------------------------------------------------------------
|
|
5
5
|
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
6
|
-
License: MIT | Version: 12.3.
|
|
6
|
+
License: MIT | Version: 12.3.3
|
|
7
7
|
|
|
8
8
|
Strictly $0.00 budget: Zero paid ads, zero paid APIs, zero cloud tokens.
|
|
9
9
|
Pure organic developer-to-developer growth engine engineered to drive 100+ GitHub stars.
|
|
@@ -217,9 +217,22 @@ class SwarmCoordinator:
|
|
|
217
217
|
all_tokens = []
|
|
218
218
|
all_triplets = []
|
|
219
219
|
|
|
220
|
-
# Her uzman ajan hedefe göre rapor üretir
|
|
220
|
+
# Her uzman ajan hedefe göre rapor üretir. Bir ajanın hatası tüm görevi
|
|
221
|
+
# düşürmez: hata, WARNING verdict'li bir rapora dönüştürülür.
|
|
221
222
|
for agent in self.agents:
|
|
222
|
-
|
|
223
|
+
t_agent = time.time()
|
|
224
|
+
try:
|
|
225
|
+
rep = agent.evaluate(mission_goal, context)
|
|
226
|
+
except Exception as exc: # isolate per-agent failures
|
|
227
|
+
rep = SwarmAgentReport(
|
|
228
|
+
agent_name=agent.name,
|
|
229
|
+
role=agent.role,
|
|
230
|
+
verdict="WARNING",
|
|
231
|
+
confidence=0.0,
|
|
232
|
+
findings=[f"Ajan hata verdi: {type(exc).__name__}: {exc}"],
|
|
233
|
+
recommendations=["Ajan girdisini ve yapılandırmasını kontrol edin."],
|
|
234
|
+
latency_ms=(time.time() - t_agent) * 1000.0,
|
|
235
|
+
)
|
|
223
236
|
agent_reports.append(rep)
|
|
224
237
|
all_tokens.extend(rep.memory_tokens)
|
|
225
238
|
all_triplets.extend(rep.semantic_triplets)
|
|
@@ -248,9 +261,17 @@ class SwarmCoordinator:
|
|
|
248
261
|
verdicts = [r.verdict for r in agent_reports]
|
|
249
262
|
consensus = "APPROVED" if all(v == "APPROVED" for v in verdicts) else "WARNING"
|
|
250
263
|
|
|
264
|
+
# Güven ağırlıklı skor: APPROVED ajanların confidence toplamı / toplam confidence.
|
|
265
|
+
total_conf = sum(r.confidence for r in agent_reports)
|
|
266
|
+
approved_conf = sum(r.confidence for r in agent_reports if r.verdict == "APPROVED")
|
|
267
|
+
consensus_score = round(approved_conf / total_conf, 3) if total_conf > 0 else 0.0
|
|
268
|
+
blocking_agents = [r.agent_name for r in agent_reports if r.verdict != "APPROVED"]
|
|
269
|
+
|
|
251
270
|
return {
|
|
252
271
|
"mission_goal": mission_goal,
|
|
253
272
|
"consensus": consensus,
|
|
273
|
+
"consensus_score": consensus_score,
|
|
274
|
+
"blocking_agents": blocking_agents,
|
|
254
275
|
"orchestrator": "JARVIS Prime",
|
|
255
276
|
"swarm_agent_count": len(self.agents) + 1,
|
|
256
277
|
"agent_reports": [r.to_dict() for r in agent_reports],
|
package/src/tzero/tzero_lsp.py
CHANGED
package/src/tzero/tzero_mcp.py
CHANGED
|
@@ -33,7 +33,7 @@ import ast
|
|
|
33
33
|
import inspect
|
|
34
34
|
import logging
|
|
35
35
|
|
|
36
|
-
SERVER_VERSION = "12.3.
|
|
36
|
+
SERVER_VERSION = "12.3.3"
|
|
37
37
|
|
|
38
38
|
# Version checks must not initialize the MCP SDK or dependency bootstrap. Besides
|
|
39
39
|
# being needlessly expensive, that path may wait on package discovery/network
|
|
@@ -3433,16 +3433,34 @@ def create_mcp_server():
|
|
|
3433
3433
|
)
|
|
3434
3434
|
def audit_code_quality(
|
|
3435
3435
|
project_root: Annotated[str, Field(default=".", description="Root directory of the repository to audit (default: current directory).")] = ".",
|
|
3436
|
-
check_type: Annotated[str, Field(default="all", description="Audit scope: 'all' for complete check, 'smells' for code complexity/smells, 'duplicity' for copy-paste blocks, 'hallucinations' for invalid imports/signatures.")] = "all",
|
|
3436
|
+
check_type: Annotated[str, Field(default="all", description="Audit scope: 'all' for complete check, 'smells' for code complexity/smells, 'duplicity' for copy-paste blocks, 'hallucinations' for invalid imports/signatures, 'debt' for TODO/FIXME/HACK/XXX/TEMP markers grouped by scope with estimated remediation hours.")] = "all",
|
|
3437
3437
|
file_path: Annotated[str, Field(default="", description="Optional path to a single file to audit.")] = ""
|
|
3438
3438
|
) -> str:
|
|
3439
|
-
"""Audits AST code smells, cyclomatic complexity, copy-paste duplicity, and
|
|
3439
|
+
"""Audits AST code smells, cyclomatic complexity, copy-paste duplicity, hallucinations, and debt markers."""
|
|
3440
3440
|
c_type = (check_type or "all").lower().strip()
|
|
3441
3441
|
if c_type == "duplicity":
|
|
3442
3442
|
return _legacy_find_code_duplicity(project_root=project_root, min_lines=6)
|
|
3443
3443
|
elif c_type == "hallucinations":
|
|
3444
3444
|
target = file_path or project_root
|
|
3445
3445
|
return _legacy_verify_hallucination_guard(candidate_code=target, project_root=project_root)
|
|
3446
|
+
elif c_type == "debt":
|
|
3447
|
+
from tzero.tzero_debt import CodeHealthAnalyzer, WorkspaceHealthReport, format_debt_markers_markdown
|
|
3448
|
+
target = file_path or project_root
|
|
3449
|
+
if os.path.isfile(target):
|
|
3450
|
+
fr = CodeHealthAnalyzer.analyze_file(target)
|
|
3451
|
+
single = WorkspaceHealthReport(
|
|
3452
|
+
workspace_root=os.path.dirname(os.path.abspath(target)),
|
|
3453
|
+
total_files=1,
|
|
3454
|
+
total_lines_of_code=fr.lines_of_code,
|
|
3455
|
+
average_maintainability_index=fr.maintainability_index,
|
|
3456
|
+
overall_rating=fr.rating,
|
|
3457
|
+
total_debt_hours=fr.debt_hours,
|
|
3458
|
+
total_debt_cost_usd=fr.debt_cost_usd,
|
|
3459
|
+
total_todo_markers=fr.todo_count,
|
|
3460
|
+
file_reports=[fr],
|
|
3461
|
+
)
|
|
3462
|
+
return format_debt_markers_markdown(single)
|
|
3463
|
+
return format_debt_markers_markdown(CodeHealthAnalyzer.analyze_workspace(target))
|
|
3446
3464
|
else:
|
|
3447
3465
|
return _legacy_audit_codebase_quality(project_root=project_root, file_path=file_path)
|
|
3448
3466
|
|
package/src/tzero/tzero_promo.py
CHANGED
|
@@ -75,7 +75,7 @@ class TaskEvaluationResult:
|
|
|
75
75
|
|
|
76
76
|
@dataclass
|
|
77
77
|
class TaskBenchmarkReport:
|
|
78
|
-
version: str = "12.3.
|
|
78
|
+
version: str = "12.3.3"
|
|
79
79
|
tokenizer: str = "tiktoken (cl100k_base)" if TIKTOKEN_AVAILABLE else "character-ratio fallback"
|
|
80
80
|
total_tasks: int = 0
|
|
81
81
|
passed_tasks: int = 0
|
|
@@ -465,7 +465,7 @@ def analyze_symbol_impact(symbol_path: str, table: SymbolTable, dag: CallGraphDA
|
|
|
465
465
|
"""Formats ANSI-styled benchmark summary table."""
|
|
466
466
|
lines = []
|
|
467
467
|
lines.append("=" * 78)
|
|
468
|
-
lines.append(" T-ZERO TASK-COMPLETION & BPE TOKENIZER BENCHMARK REPORT (v12.3.
|
|
468
|
+
lines.append(" T-ZERO TASK-COMPLETION & BPE TOKENIZER BENCHMARK REPORT (v12.3.3)")
|
|
469
469
|
lines.append(f" Tokenizer: {report.tokenizer} | Tasks Evaluated: {report.total_tasks}")
|
|
470
470
|
lines.append("=" * 78)
|
|
471
471
|
lines.append(f"{'Task ID':<10} | {'Raw BPE':<8} | {'T-Zero':<8} | {'Saved %':<8} | {'Contract %':<10} | {'Status'}")
|
|
@@ -18,7 +18,7 @@ import webbrowser
|
|
|
18
18
|
from pathlib import Path
|
|
19
19
|
from typing import Any, Dict, List, Optional, Tuple
|
|
20
20
|
|
|
21
|
-
CURRENT_VERSION = "12.3.
|
|
21
|
+
CURRENT_VERSION = "12.3.3"
|
|
22
22
|
REPO_URL = "https://github.com/toprakahmetaydogmus/TZeroAlgorithm"
|
|
23
23
|
RELEASES_URL = f"{REPO_URL}/releases"
|
|
24
24
|
PYPI_URL = "https://pypi.org/project/tzero-mcp/"
|
package/src/tzero/tzero_tui.py
CHANGED
|
@@ -180,7 +180,7 @@ class TZeroTerminalCockpit:
|
|
|
180
180
|
box_bottom = f"{c.CYAN}╚{'═' * 78}╝{c.RESET}"
|
|
181
181
|
|
|
182
182
|
lines.append(box_top)
|
|
183
|
-
lines.append(cls._box_line(f" {c.BOLD}{c.BRIGHT_CYAN}⚡ SİBER AKADEMİ — T-ZERO CONTEXT ARCHITECT & LIVE COCKPIT v12.3.
|
|
183
|
+
lines.append(cls._box_line(f" {c.BOLD}{c.BRIGHT_CYAN}⚡ SİBER AKADEMİ — T-ZERO CONTEXT ARCHITECT & LIVE COCKPIT v12.3.3{c.RESET}"))
|
|
184
184
|
lines.append(cls._box_line(f" {c.DIM}Local AST Analysis | Optional Network Services{c.RESET}"))
|
|
185
185
|
lines.append(box_mid)
|
|
186
186
|
|
|
@@ -325,7 +325,7 @@ class TZeroTerminalCockpit:
|
|
|
325
325
|
elif choice == "4":
|
|
326
326
|
from tzero.tzero_commit import LocalSemanticCommitSynthesizer
|
|
327
327
|
print(f"\n{cls.YELLOW}[Synthesizing Release CHANGELOG]...{cls.RESET}")
|
|
328
|
-
entry = LocalSemanticCommitSynthesizer.generate_changelog_entry(version="v12.3.
|
|
328
|
+
entry = LocalSemanticCommitSynthesizer.generate_changelog_entry(version="v12.3.3", repo_dir=workspace_dir)
|
|
329
329
|
print(f"\n{cls.BRIGHT_CYAN}{entry}{cls.RESET}\n")
|
|
330
330
|
input("Press Enter to return to cockpit...")
|
|
331
331
|
elif choice == "5":
|