tzero-mcp 12.2.0 → 12.2.2
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/addmcp.py +10 -5
- package/src/app.py +3 -9
- package/src/tzero/__init__.py +1 -1
- package/src/tzero/anti_rea/asar_shield.py +3 -1
- package/src/tzero/anti_rea/auditor.py +42 -12
- package/src/tzero/anti_rea/canary_beacon.py +27 -19
- package/src/tzero/anti_rea/cli.py +7 -1
- package/src/tzero/anti_rea/confusables.py +62 -18
- package/src/tzero/anti_rea/engine.py +79 -10
- package/src/tzero/anti_rea/extractor_shield.py +52 -9
- package/src/tzero/anti_rea/gui.py +1 -4
- package/src/tzero/anti_rea/integrity_guard.py +17 -5
- package/src/tzero/anti_rea/rdtsc_guard.py +21 -8
- package/src/tzero/anti_rea/string_vault.py +10 -7
- package/src/tzero/siber_akademi.ico +0 -0
- package/src/tzero/siber_akademi_icon.py +14 -8
- package/src/tzero/tzero_armor.py +27 -5
- package/src/tzero/tzero_benchmark.py +4 -2
- package/src/tzero/tzero_budget.py +14 -5
- package/src/tzero/tzero_ci.py +1 -1
- package/src/tzero/tzero_contracts.py +7 -5
- package/src/tzero/tzero_dashboard.py +28 -9
- package/src/tzero/tzero_debt.py +19 -4
- package/src/tzero/tzero_explain.py +1 -1
- package/src/tzero/tzero_features.py +43 -29
- package/src/tzero/tzero_federation.py +9 -2
- package/src/tzero/tzero_fixer/mcp_server.py +10 -0
- package/src/tzero/tzero_golden.py +37 -9
- package/src/tzero/tzero_growth.py +166 -8
- package/src/tzero/tzero_guard.py +147 -46
- package/src/tzero/tzero_lsp.py +1 -1
- package/src/tzero/tzero_mcp.py +64 -16
- package/src/tzero/tzero_mutation.py +88 -15
- package/src/tzero/tzero_promo.py +1 -1
- package/src/tzero/tzero_proxy.py +105 -12
- package/src/tzero/tzero_scip.py +12 -6
- package/src/tzero/tzero_security.py +375 -60
- package/src/tzero/tzero_task_benchmark.py +2 -2
- package/src/tzero/tzero_traffic.py +35 -10
- package/src/tzero/tzero_tui.py +17 -8
- package/src/tzero/tzero_v3.py +268 -88
- package/src/tzero/tzero_welcome.py +65 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
"""Siber Akademi T-Zero — Traffic, Update & Crypto Support Engine (v12.
|
|
2
|
+
"""Siber Akademi T-Zero — Traffic, Update & Crypto Support Engine (v12.2.1).
|
|
3
3
|
|
|
4
4
|
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
5
5
|
License: AGPL-3.0-only
|
|
@@ -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.2.
|
|
21
|
+
CURRENT_VERSION = "12.2.2"
|
|
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/"
|
|
@@ -237,12 +237,13 @@ def run_live_roi_dashboard(workspace_dir: str = ".") -> Dict[str, Any]:
|
|
|
237
237
|
for model, d_val in dollar_savings.items():
|
|
238
238
|
dashboard += f"\n║ • {model:<20}: \033[1;32m${d_val:>7.4f} USD\033[1;32m ({d_val*100:>6.2f}¢) ║"
|
|
239
239
|
|
|
240
|
+
roi_stats = _resolve_community_stats()
|
|
240
241
|
dashboard += f"""
|
|
241
242
|
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
242
243
|
║ 💡 100 çağrılık bir Claude/Cursor sprintinde net tasarruf: \033[1;33m${dollar_savings.get('Claude 3.7 Sonnet', 0.0)*100:>6.2f} USD\033[1;32m ║
|
|
243
244
|
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
244
245
|
║ ⭐ T-Zero projenizi hızlandırıp token kurtardıysa, 1 yıldız verin: ║
|
|
245
|
-
║ ► tzero star (Mevcut:
|
|
246
|
+
║ ► tzero star (Mevcut: {roi_stats['stars']} / {roi_stats['target_stars']} Hedef) ║
|
|
246
247
|
╚══════════════════════════════════════════════════════════════════════════════╝\033[0m
|
|
247
248
|
"""
|
|
248
249
|
print(dashboard)
|
|
@@ -314,15 +315,39 @@ def run_system_disk_doctor(clean: bool = False, workspace_dir: str = ".") -> Dic
|
|
|
314
315
|
}
|
|
315
316
|
|
|
316
317
|
|
|
318
|
+
def _resolve_community_stats() -> Dict[str, Any]:
|
|
319
|
+
"""Retrieve live (with fast cache/offline fallback) star and download stats."""
|
|
320
|
+
try:
|
|
321
|
+
from tzero.tzero_growth import get_live_community_stats
|
|
322
|
+
return get_live_community_stats(timeout=1.5)
|
|
323
|
+
except Exception:
|
|
324
|
+
try:
|
|
325
|
+
from tzero_growth import get_live_community_stats
|
|
326
|
+
return get_live_community_stats(timeout=1.5)
|
|
327
|
+
except Exception:
|
|
328
|
+
return {
|
|
329
|
+
"stars": 111,
|
|
330
|
+
"target_stars": 250,
|
|
331
|
+
"progress_pct": 44.4,
|
|
332
|
+
"downloads_label": "22,900+",
|
|
333
|
+
"saved_tokens_label": "1,120,000+",
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
|
|
317
337
|
def open_github_star_page(open_browser: bool = True) -> Dict[str, Any]:
|
|
318
|
-
"""Displays
|
|
338
|
+
"""Displays live star milestone progress and opens GitHub repository in browser."""
|
|
339
|
+
stats = _resolve_community_stats()
|
|
340
|
+
stars = int(stats["stars"])
|
|
341
|
+
target_stars = int(stats["target_stars"])
|
|
342
|
+
dl_label = str(stats["downloads_label"])
|
|
343
|
+
saved_label = str(stats.get("saved_tokens_label", "1,120,000+"))
|
|
319
344
|
banner = f"""
|
|
320
345
|
\033[1;33m╔══════════════════════════════════════════════════════════════════════════════╗
|
|
321
|
-
║ ⭐ T-ZERO
|
|
346
|
+
║ ⭐ T-ZERO {target_stars} YILDIZ HEDEFİ: TOPLULUĞA KATILIN! ║
|
|
322
347
|
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
323
348
|
║ ║
|
|
324
|
-
║ 🎉
|
|
325
|
-
║ ⭐ Mevcut Yıldız Sayısı:
|
|
349
|
+
║ 🎉 {dl_label} İndirme & {saved_label} Kurtarılan Token! ║
|
|
350
|
+
║ ⭐ Mevcut Yıldız Sayısı: {stars} / {target_stars} Hedef (Topluluk Desteği) ║
|
|
326
351
|
║ ║
|
|
327
352
|
║ T-Zero'nun bağımsız, reklamsız ve %100 BEDAVA kalabilmesi için ║
|
|
328
353
|
║ GitHub depomuza 1 yıldız (Star) vererek bize güç katın! ║
|
|
@@ -342,9 +367,9 @@ def open_github_star_page(open_browser: bool = True) -> Dict[str, Any]:
|
|
|
342
367
|
pass
|
|
343
368
|
return {
|
|
344
369
|
"repo_url": REPO_URL,
|
|
345
|
-
"current_stars":
|
|
346
|
-
"target_stars":
|
|
347
|
-
"downloads":
|
|
370
|
+
"current_stars": stars,
|
|
371
|
+
"target_stars": target_stars,
|
|
372
|
+
"downloads": dl_label,
|
|
348
373
|
"opened_browser": opened,
|
|
349
374
|
}
|
|
350
375
|
|
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.2.
|
|
183
|
+
lines.append(cls._box_line(f" {c.BOLD}{c.BRIGHT_CYAN}⚡ SİBER AKADEMİ — T-ZERO CONTEXT ARCHITECT & LIVE COCKPIT v12.2.2{c.RESET}"))
|
|
184
184
|
lines.append(cls._box_line(f" {c.DIM}Zero-Leak AST Intelligence | 100% Offline | $0 Cloud Cost Guarantee{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.2.
|
|
328
|
+
entry = LocalSemanticCommitSynthesizer.generate_changelog_entry(version="v12.2.2", 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":
|
|
@@ -443,7 +443,7 @@ class TZeroTerminalCockpit:
|
|
|
443
443
|
# Fallback for non-interactive / piped environments
|
|
444
444
|
if not sys.stdin.isatty():
|
|
445
445
|
try:
|
|
446
|
-
choice = input(f"\n{cls.BOLD}Select an action [0-
|
|
446
|
+
choice = input(f"\n{cls.BOLD}Select an action [0-13] (or press Enter to refresh): {cls.RESET}").strip()
|
|
447
447
|
except (KeyboardInterrupt, EOFError):
|
|
448
448
|
print(f"\n{cls.CYAN}Goodbye! T-Zero Context Engine active.{cls.RESET}")
|
|
449
449
|
break
|
|
@@ -457,7 +457,7 @@ class TZeroTerminalCockpit:
|
|
|
457
457
|
chosen = False
|
|
458
458
|
choice = ""
|
|
459
459
|
while not chosen:
|
|
460
|
-
print(f"\r{cls.BOLD} Navigate [↑/↓/←/→, w/s, k/j] │ Select [Enter] │ Quick Jump [0-
|
|
460
|
+
print(f"\r{cls.BOLD} Navigate [↑/↓/←/→, w/s, k/j] │ Select [Enter] │ Quick Jump [0-13] │ Exit [q/esc]: {cls.RESET}", end="", flush=True)
|
|
461
461
|
key = cls._read_key()
|
|
462
462
|
if not key:
|
|
463
463
|
time.sleep(0.04)
|
|
@@ -510,12 +510,21 @@ class TZeroTerminalCockpit:
|
|
|
510
510
|
|
|
511
511
|
def main():
|
|
512
512
|
"""CLI entrypoint for standalone cockpit execution."""
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
513
|
+
import argparse
|
|
514
|
+
|
|
515
|
+
parser = argparse.ArgumentParser(
|
|
516
|
+
prog="tzero-tui",
|
|
517
|
+
description="T-Zero Interactive Terminal Cockpit (Zero-Leak, Context Engine & Telemetry)",
|
|
518
|
+
)
|
|
519
|
+
parser.add_argument("target_dir", nargs="?", default=".", help="Workspace directory to inspect (default: .)")
|
|
520
|
+
parser.add_argument("--snapshot", action="store_true", help="Print a non-interactive snapshot and exit")
|
|
521
|
+
args = parser.parse_args()
|
|
522
|
+
|
|
523
|
+
if args.snapshot:
|
|
524
|
+
metrics = TZeroTerminalCockpit.gather_workspace_metrics(args.target_dir)
|
|
516
525
|
print(TZeroTerminalCockpit.render_cockpit(metrics))
|
|
517
526
|
else:
|
|
518
|
-
TZeroTerminalCockpit.run_interactive(target_dir)
|
|
527
|
+
TZeroTerminalCockpit.run_interactive(args.target_dir)
|
|
519
528
|
|
|
520
529
|
|
|
521
530
|
if __name__ == "__main__":
|