tzero-mcp 12.3.2 → 12.3.5
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/CONTRIBUTING.md +1 -1
- package/README.md +4 -0
- package/package.json +3 -4
- package/src/addmcp.py +2 -2
- package/src/app.py +1 -1
- package/src/main.py +4 -0
- package/src/tzero/__init__.py +1 -1
- package/src/tzero/desktop_updater.py +6 -0
- 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_deps.py +1 -0
- package/src/tzero/tzero_explain.py +1 -1
- package/src/tzero/tzero_features.py +31 -74
- 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/orchestrator.py +1 -1
- package/src/tzero/tzero_jarvis/swarm.py +23 -2
- package/src/tzero/tzero_jarvis/workspace_orchestrator.py +10 -21
- package/src/tzero/tzero_lsp.py +1 -1
- package/src/tzero/tzero_mcp.py +39 -122
- package/src/tzero/tzero_promo.py +1 -1
- package/src/tzero/tzero_security.py +3 -3
- package/src/tzero/tzero_sync.py +73 -148
- package/src/tzero/tzero_task_benchmark.py +2 -2
- package/src/tzero/tzero_traffic.py +1 -1
- package/src/tzero/tzero_tui.py +2 -13
- package/src/tzero/tzero_v3.py +433 -392
- package/src/tzero/tzero_welcome.py +1 -1
- package/src/tzero/anti_rea/__init__.py +0 -84
- package/src/tzero/anti_rea/algebraic_mutator.py +0 -107
- package/src/tzero/anti_rea/anti_agent_guard.py +0 -96
- package/src/tzero/anti_rea/anti_debugger.py +0 -272
- package/src/tzero/anti_rea/anti_vm.py +0 -160
- package/src/tzero/anti_rea/asar_shield.py +0 -122
- package/src/tzero/anti_rea/auditor.py +0 -208
- package/src/tzero/anti_rea/bpe_disrupter.py +0 -48
- package/src/tzero/anti_rea/bytecode_trap.py +0 -85
- package/src/tzero/anti_rea/canary_beacon.py +0 -167
- package/src/tzero/anti_rea/cli.py +0 -134
- package/src/tzero/anti_rea/confusables.py +0 -130
- package/src/tzero/anti_rea/crypto_loader.py +0 -132
- package/src/tzero/anti_rea/engine.py +0 -304
- package/src/tzero/anti_rea/extractor_shield.py +0 -180
- package/src/tzero/anti_rea/flattener.py +0 -136
- package/src/tzero/anti_rea/gui.py +0 -264
- package/src/tzero/anti_rea/honeypot.py +0 -58
- package/src/tzero/anti_rea/integrity_guard.py +0 -78
- package/src/tzero/anti_rea/jailbreak_decoy.py +0 -77
- package/src/tzero/anti_rea/mcp_poison.py +0 -41
- package/src/tzero/anti_rea/native_bridge.py +0 -169
- package/src/tzero/anti_rea/rdtsc_guard.py +0 -77
- package/src/tzero/anti_rea/string_vault.py +0 -97
- package/src/tzero/anti_rea/sybil_network.py +0 -53
- package/src/tzero/anti_rea/tier_catalog.py +0 -388
- package/src/tzero/anti_rea/timing_guard.py +0 -46
- package/src/tzero/anti_rea/token_bomb.py +0 -65
- package/src/tzero/anti_rea/traps.py +0 -76
- package/src/tzero/anti_rea/vm_obfuscator.py +0 -182
- package/src/tzero/tzero_armor.py +0 -187
package/CONTRIBUTING.md
CHANGED
|
@@ -68,4 +68,4 @@ Before opening a pull request, ensure all verification gates pass locally:
|
|
|
68
68
|
|
|
69
69
|
- **GitHub Issues:** [Bug Reports & Feature Requests](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/issues)
|
|
70
70
|
- **Hugging Face Space:** [Interactive Web Demo](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)
|
|
71
|
-
- **Maintainer:** Toprak Ahmet Aydoğmuş (`
|
|
71
|
+
- **Maintainer:** Toprak Ahmet Aydoğmuş (`toprakahmetaydogmus0@gmail.com`)
|
package/README.md
CHANGED
|
@@ -38,3 +38,7 @@ This npm package uses a separate Python interpreter. It requires Python dependen
|
|
|
38
38
|
## License
|
|
39
39
|
|
|
40
40
|
AGPL-3.0-only © [Toprak Ahmet Aydoğmuş](https://github.com/toprakahmetaydogmus)
|
|
41
|
+
|
|
42
|
+
## Security notice
|
|
43
|
+
|
|
44
|
+
The npm advisory [GHSA-pm3r-rxg9-cj5j](https://github.com/advisories/GHSA-pm3r-rxg9-cj5j) covers version 12.3.0. Follow the advisory if you installed or ran that version. See the [security review](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/main/SECURITY-REVIEW.md) and [privacy documentation](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/main/PRIVACY.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tzero-mcp",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.5",
|
|
4
4
|
"description": "Deterministic AST Context Compressor, 95% Token Reducer & 20-Tool MCP Server for Cursor, Claude Desktop & Copilot",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -65,16 +65,15 @@
|
|
|
65
65
|
"antigravity",
|
|
66
66
|
"windsurf"
|
|
67
67
|
],
|
|
68
|
-
"author": "Toprak Ahmet Aydoğmuş (Siber Akademi) <
|
|
68
|
+
"author": "Toprak Ahmet Aydoğmuş (Siber Akademi) <toprakahmetaydogmus0@gmail.com> (https://github.com/toprakahmetaydogmus)",
|
|
69
69
|
"contributors": [
|
|
70
70
|
{
|
|
71
71
|
"name": "Toprak Ahmet Aydoğmuş",
|
|
72
|
-
"email": "
|
|
72
|
+
"email": "toprakahmetaydogmus0@gmail.com",
|
|
73
73
|
"url": "https://github.com/toprakahmetaydogmus"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "Siber Akademi Core Team",
|
|
77
|
-
"email": "contact@siberakademi.org.tr",
|
|
78
77
|
"url": "https://github.com/toprakahmetaydogmus"
|
|
79
78
|
}
|
|
80
79
|
],
|
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.5"
|
|
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.5)
|
|
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.5"
|
|
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/main.py
CHANGED
|
@@ -62,5 +62,9 @@ from tzero.tzero_v3 import main
|
|
|
62
62
|
|
|
63
63
|
if __name__ == "__main__":
|
|
64
64
|
multiprocessing.freeze_support()
|
|
65
|
+
if sys.platform == "win32" and getattr(sys, "frozen", False) and len(sys.argv) == 2 and sys.argv[1] == "--skip-startup-update":
|
|
66
|
+
sys.argv.pop()
|
|
67
|
+
main()
|
|
68
|
+
sys.exit(0)
|
|
65
69
|
main()
|
|
66
70
|
|
package/src/tzero/__init__.py
CHANGED
|
@@ -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.5
|
|
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.5 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.5")
|
|
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.5 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.5",
|
|
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.5</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.5</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.5"
|
|
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.5 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)
|
package/src/tzero/tzero_deps.py
CHANGED
|
@@ -37,6 +37,7 @@ class Dependency(NamedTuple):
|
|
|
37
37
|
|
|
38
38
|
REQUIRED: List[Dependency] = [
|
|
39
39
|
Dependency("requests", "requests", "2.28.0", "AI provider HTTP calls"),
|
|
40
|
+
Dependency("cryptography", "cryptography", "44", "Authenticated credential backups"),
|
|
40
41
|
Dependency("keyring", "keyring", "23.13.1", "OS credential storage"),
|
|
41
42
|
Dependency("darkdetect", "darkdetect", "0.8.0", "OS theme detection"),
|
|
42
43
|
Dependency("pygments", "pygments", "2.14.0", "syntax highlighting"),
|
|
@@ -685,80 +685,37 @@ globs: **/*
|
|
|
685
685
|
"""
|
|
686
686
|
|
|
687
687
|
@classmethod
|
|
688
|
-
def export_all(cls, project_dir: str) -> List[str]:
|
|
689
|
-
"""
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
os.makedirs(gh_dir, exist_ok=True)
|
|
720
|
-
copilot_path = os.path.join(gh_dir, "copilot-instructions.md")
|
|
721
|
-
with open(copilot_path, "w", encoding="utf-8") as f:
|
|
722
|
-
f.write(cls.generate_copilot_instructions(p_name))
|
|
723
|
-
created.append(copilot_path)
|
|
724
|
-
|
|
725
|
-
# 6. .cursor/rules/*.mdc
|
|
726
|
-
c_rules_dir = os.path.join(project_dir, ".cursor", "rules")
|
|
727
|
-
os.makedirs(c_rules_dir, exist_ok=True)
|
|
728
|
-
for mdc_name, content in cls.generate_cursor_mdc_rules(p_name, project_dir=project_dir).items():
|
|
729
|
-
mdc_path = os.path.join(c_rules_dir, mdc_name)
|
|
730
|
-
with open(mdc_path, "w", encoding="utf-8") as f:
|
|
731
|
-
f.write(content)
|
|
732
|
-
created.append(mdc_path)
|
|
733
|
-
|
|
734
|
-
# 7. AGENT.md / AGENTS.md (Antigravity & Autonomous Orchestrator Directive)
|
|
735
|
-
from tzero.tzero_jarvis.workspace_orchestrator import WorkspaceProfiler, WorkspaceGovernanceSynthesizer
|
|
736
|
-
try:
|
|
737
|
-
prof = WorkspaceProfiler(project_dir).profile()
|
|
738
|
-
agent_md_content = WorkspaceGovernanceSynthesizer.generate_agent_md(prof)
|
|
739
|
-
|
|
740
|
-
agents_p = os.path.join(project_dir, "AGENTS.md")
|
|
741
|
-
with open(agents_p, "w", encoding="utf-8") as f:
|
|
742
|
-
f.write(agent_md_content)
|
|
743
|
-
created.append(agents_p)
|
|
744
|
-
|
|
745
|
-
agent_p = os.path.join(project_dir, "AGENT.md")
|
|
746
|
-
with open(agent_p, "w", encoding="utf-8") as f:
|
|
747
|
-
f.write(agent_md_content)
|
|
748
|
-
created.append(agent_p)
|
|
749
|
-
|
|
750
|
-
# 8. ARCHITECTURE.md (in docs/ if docs exists, else root)
|
|
751
|
-
docs_dir = os.path.join(project_dir, "docs")
|
|
752
|
-
target_arch_dir = docs_dir if os.path.isdir(docs_dir) else project_dir
|
|
753
|
-
arch_p = os.path.join(target_arch_dir, "ARCHITECTURE.md")
|
|
754
|
-
if not os.path.isfile(arch_p):
|
|
755
|
-
with open(arch_p, "w", encoding="utf-8") as f:
|
|
756
|
-
f.write(WorkspaceGovernanceSynthesizer.generate_architecture_md(prof))
|
|
757
|
-
created.append(arch_p)
|
|
758
|
-
except Exception:
|
|
759
|
-
pass
|
|
760
|
-
|
|
761
|
-
return created
|
|
688
|
+
def export_all(cls, project_dir: str, target: str = "all") -> List[str]:
|
|
689
|
+
"""Create missing agent-rule files in the selected editor formats."""
|
|
690
|
+
from tzero.tzero_sync import create_workspace_file
|
|
691
|
+
|
|
692
|
+
name = os.path.basename(os.path.abspath(project_dir)) or "Project"
|
|
693
|
+
selected = (target or "all").lower().strip()
|
|
694
|
+
entries = {}
|
|
695
|
+
if selected in ("all", "cursor", "cursorrules"):
|
|
696
|
+
entries[".cursorrules"] = cls.generate_cursorrules(name)
|
|
697
|
+
for path, content in cls.generate_cursor_mdc_rules(name, project_dir=project_dir).items():
|
|
698
|
+
entries[os.path.join(".cursor", "rules", path)] = content
|
|
699
|
+
if selected in ("all", "cline", "clinerules"):
|
|
700
|
+
entries[".clinerules"] = cls.generate_clinerules(name)
|
|
701
|
+
if selected in ("all", "windsurf", "windsurfrules"):
|
|
702
|
+
entries[".windsurfrules"] = cls.generate_windsurfrules(name)
|
|
703
|
+
if selected in ("all", "claude", "claudemd"):
|
|
704
|
+
entries["CLAUDE.md"] = cls.generate_claude_instructions(name)
|
|
705
|
+
if selected in ("all", "github", "copilot"):
|
|
706
|
+
entries[os.path.join(".github", "copilot-instructions.md")] = cls.generate_copilot_instructions(name)
|
|
707
|
+
if selected == "all":
|
|
708
|
+
from tzero.tzero_jarvis.workspace_orchestrator import WorkspaceGovernanceSynthesizer, WorkspaceProfiler
|
|
709
|
+
|
|
710
|
+
profile = WorkspaceProfiler(project_dir).profile()
|
|
711
|
+
entries["AGENTS.md"] = entries["AGENT.md"] = WorkspaceGovernanceSynthesizer.generate_agent_md(profile)
|
|
712
|
+
arch_path = os.path.join("docs", "ARCHITECTURE.md") if os.path.isdir(os.path.join(project_dir, "docs")) else "ARCHITECTURE.md"
|
|
713
|
+
entries[arch_path] = WorkspaceGovernanceSynthesizer.generate_architecture_md(profile)
|
|
714
|
+
return [
|
|
715
|
+
os.path.join(project_dir, path)
|
|
716
|
+
for path, content in entries.items()
|
|
717
|
+
if create_workspace_file(project_dir, path, content)
|
|
718
|
+
]
|
|
762
719
|
|
|
763
720
|
|
|
764
721
|
# =============================================================================
|
|
@@ -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.5 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.5",
|
|
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.5
|
|
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.
|
|
@@ -238,7 +238,7 @@ class JarvisOrchestrator:
|
|
|
238
238
|
rules = self.workspace_orchestrator.synthesize_rules(profile)
|
|
239
239
|
applied = []
|
|
240
240
|
if auto_apply:
|
|
241
|
-
applied = self.workspace_orchestrator.apply_governance_rules(rules
|
|
241
|
+
applied = self.workspace_orchestrator.apply_governance_rules(rules)
|
|
242
242
|
return {
|
|
243
243
|
"project_name": profile.project_name,
|
|
244
244
|
"generated_rules": list(rules.keys()),
|
|
@@ -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],
|
|
@@ -847,28 +847,17 @@ class WorkspaceOrchestrator:
|
|
|
847
847
|
prof = profile or self.profile_workspace()
|
|
848
848
|
return WorkspaceGovernanceSynthesizer.synthesize_all(prof)
|
|
849
849
|
|
|
850
|
-
def apply_governance_rules(self, rules: Optional[Dict[str, str]] = None
|
|
851
|
-
"""
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
"""
|
|
850
|
+
def apply_governance_rules(self, rules: Optional[Dict[str, str]] = None) -> List[str]:
|
|
851
|
+
"""Write generated governance files only when their paths are unoccupied."""
|
|
852
|
+
from tzero.tzero_sync import create_workspace_file
|
|
853
|
+
|
|
855
854
|
if rules is None:
|
|
856
855
|
rules = self.synthesize_rules()
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
# Mevcut dosya varsa ve overwrite false ise atla
|
|
864
|
-
if os.path.isfile(abs_path) and not overwrite:
|
|
865
|
-
continue
|
|
866
|
-
|
|
867
|
-
with open(abs_path, "w", encoding="utf-8") as fp:
|
|
868
|
-
fp.write(content)
|
|
869
|
-
written_files.append(rel_path.replace("\\", "/"))
|
|
870
|
-
|
|
871
|
-
return written_files
|
|
856
|
+
return [
|
|
857
|
+
path.replace("\\", "/")
|
|
858
|
+
for path, content in rules.items()
|
|
859
|
+
if create_workspace_file(self.workspace_root, path, content)
|
|
860
|
+
]
|
|
872
861
|
|
|
873
862
|
def run_swarm_audit(self, profile: Optional[WorkspaceProfile] = None) -> Dict[str, Any]:
|
|
874
863
|
"""
|
|
@@ -922,7 +911,7 @@ class WorkspaceOrchestrator:
|
|
|
922
911
|
rules = self.synthesize_rules(profile)
|
|
923
912
|
applied_files: List[str] = []
|
|
924
913
|
if auto_apply_rules:
|
|
925
|
-
applied_files = self.apply_governance_rules(rules
|
|
914
|
+
applied_files = self.apply_governance_rules(rules)
|
|
926
915
|
|
|
927
916
|
# 2. PBFT Sürü Denetimi
|
|
928
917
|
swarm_result: Optional[Dict[str, Any]] = None
|
package/src/tzero/tzero_lsp.py
CHANGED