tzero-mcp 12.3.6 → 12.3.7

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.
@@ -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.6
5
+ Version: 12.3.7
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.6 Master Edition.
15
+ Part of T-Zero Context Architect v12.3.7 Master Edition.
16
16
  """
17
17
 
18
18
  import hashlib
@@ -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.6")
758
+ parser.add_argument("--version", "-v", action="version", version="%(prog)s 12.3.7")
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.6 Master Edition.
16
+ Part of T-Zero Context Architect v12.3.7 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.6",
1059
+ "version": "12.3.7",
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 &bull; v12.3.6</div>
460
+ <div class="brand-sub" id="headerBrandSub">Enterprise AST Context Architect &bull; v12.3.7</div>
461
461
  </div>
462
462
  </div>
463
463
  <div class="header-actions">
@@ -770,6 +770,7 @@ impl SwarmCluster {
770
770
  <button class="btn-superdesign suite-tab-btn" onclick="switchSuiteTab('federation', this)">Federation</button>
771
771
  <button class="btn-superdesign suite-tab-btn" onclick="switchSuiteTab('hooks', this)">Hooks Guard</button>
772
772
  <button class="btn-superdesign suite-tab-btn" onclick="switchSuiteTab('scip', this)">SCIP Graph</button>
773
+ <button class="btn-superdesign suite-tab-btn" onclick="switchSuiteTab('agency', this)">🤖 Agency (448+)</button>
773
774
  </div>
774
775
  <div id="tab-debt" class="suite-pane" style="display:block;">
775
776
  <div style="display:flex; gap:10px; align-items:center; flex-wrap:wrap;">
@@ -844,13 +845,24 @@ x = 2
844
845
  <button class="btn-run" onclick="runSuiteApi('/api/scip/summary', 'POST', {path: document.getElementById('scipPath').value})">Inspect SCIP / LSIF Summary</button>
845
846
  </div>
846
847
  </div>
848
+ <div id="tab-agency" class="suite-pane" style="display:none;">
849
+ <div style="display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px;">
850
+ <input id="agencyGoal" value="Analyze project structure and synthesize tailored README" placeholder="Mission goal (EN or TR)" style="flex:2; min-width:220px; padding:8px 12px; background:var(--bg-canvas); color:var(--text-main); border:1px solid var(--border); border-radius:6px; font-family:var(--font-code);" />
851
+ <input id="agencyBlueprint" value="auto" placeholder="Blueprint ID (e.g. auto or mcp-server/launch-viral)" style="flex:1; min-width:180px; padding:8px 12px; background:var(--bg-canvas); color:var(--text-main); border:1px solid var(--border); border-radius:6px; font-family:var(--font-code);" />
852
+ </div>
853
+ <div style="display:flex; gap:10px; align-items:center; flex-wrap:wrap;">
854
+ <button class="btn-run" onclick="runSuiteApi('/api/agency/catalog', 'GET')">Browse 448 Blueprints & Skills</button>
855
+ <button class="btn-run" onclick="runSuiteApi('/api/agency/readme', 'POST', {blueprint_id: document.getElementById('agencyBlueprint').value})">Generate Agency README</button>
856
+ <button class="btn-run" onclick="runSuiteApi('/api/agency/run', 'POST', {goal: document.getElementById('agencyGoal').value, blueprint_id: document.getElementById('agencyBlueprint').value})">Run Multi-Agent Squad</button>
857
+ </div>
858
+ </div>
847
859
  <pre id="suiteResult" style="margin-top:14px; padding:14px; background:var(--bg-canvas); border:1px solid var(--border); border-radius:8px; font-family:var(--font-code); font-size:12px; color:var(--sky); max-height:260px; overflow:auto;">Select an Enterprise Suite tab and execute a local AST operation.</pre>
848
860
  </div>
849
861
  </section>
850
862
  </main>
851
863
 
852
864
  <footer>
853
- <span id="footerBrand">T-Zero Context Architect v12.3.6</span> &bull; Developer: Toprak Ahmet Aydoğmuş &bull; Siber Akademi
865
+ <span id="footerBrand">T-Zero Context Architect v12.3.7</span> &bull; Developer: Toprak Ahmet Aydoğmuş &bull; Siber Akademi
854
866
  </footer>
855
867
 
856
868
  <script>
@@ -1481,7 +1493,7 @@ def compute_live_dashboard_stats(workspace_dir: str = ".") -> Dict[str, Any]:
1481
1493
  if cached is not None and (now - _DASHBOARD_STATS_CACHE["ts"]) < 60.0:
1482
1494
  return cached
1483
1495
 
1484
- version = "12.3.6"
1496
+ version = "12.3.7"
1485
1497
  tools_count = 57
1486
1498
  try:
1487
1499
  from tzero import tzero_mcp
@@ -1662,6 +1674,18 @@ class DashboardRequestHandler(http.server.BaseHTTPRequestHandler):
1662
1674
  except Exception as e:
1663
1675
  resp = {"success": False, "error": str(e)}
1664
1676
  self._send_json(resp)
1677
+ elif parsed.path == "/api/agency/catalog":
1678
+ try:
1679
+ from tzero.tzero_agency import TZeroAgency
1680
+ resp = {
1681
+ "success": True,
1682
+ **TZeroAgency.catalog_summary(),
1683
+ "skills": TZeroAgency.list_skills(),
1684
+ "subagent_templates": TZeroAgency.list_templates(),
1685
+ }
1686
+ except Exception as e:
1687
+ resp = {"success": False, "error": str(e)}
1688
+ self._send_json(resp)
1665
1689
  elif parsed.path == "/api/cost/cockpit":
1666
1690
  try:
1667
1691
  from tzero.tzero_cost import TokenCostCalculator
@@ -1965,6 +1989,29 @@ class DashboardRequestHandler(http.server.BaseHTTPRequestHandler):
1965
1989
  except Exception as e:
1966
1990
  resp = {"success": False, "error": str(e)}
1967
1991
  self._send_json(resp)
1992
+ elif parsed.path == "/api/agency/readme":
1993
+ try:
1994
+ from tzero.tzero_agency import TZeroAgency
1995
+ payload = self._read_json_body()
1996
+ target_p = self._resolve_safe_api_path(payload.get("path", "."))
1997
+ bp_id = str(payload.get("blueprint_id") or "auto")
1998
+ res = TZeroAgency.generate_readme(project_dir=target_p, blueprint_id=bp_id)
1999
+ resp = {"success": True, **res}
2000
+ except Exception as e:
2001
+ resp = {"success": False, "error": str(e)}
2002
+ self._send_json(resp)
2003
+ elif parsed.path == "/api/agency/run":
2004
+ try:
2005
+ from tzero.tzero_agency import TZeroAgency
2006
+ payload = self._read_json_body()
2007
+ target_p = self._resolve_safe_api_path(payload.get("path", "."))
2008
+ goal = str(payload.get("goal") or "")
2009
+ bp_id = str(payload.get("blueprint_id") or "auto")
2010
+ res = TZeroAgency.run(goal=goal, project_dir=target_p, blueprint_id=bp_id)
2011
+ resp = {"success": True, **res.to_dict()}
2012
+ except Exception as e:
2013
+ resp = {"success": False, "error": str(e)}
2014
+ self._send_json(resp)
1968
2015
  else:
1969
2016
  self.send_response(404)
1970
2017
  self.end_headers()
@@ -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.6 Master Edition.
16
+ Part of T-Zero Context Architect v12.3.7 Master Edition.
17
17
  """
18
18
 
19
19
  import ast
@@ -6,7 +6,7 @@ delivering maximum semantic grounding to LLMs (Claude, GPT, Gemini, DeepSeek) wi
6
6
  up to 95% token savings compared to raw file ingestion.
7
7
 
8
8
  Author: Toprak Ahmet Aydogmus (Siber Akademi)
9
- Version: 12.3.6
9
+ Version: 12.3.7
10
10
  """
11
11
 
12
12
  import ast
@@ -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.6 Master Edition.
14
+ Part of T-Zero Context Architect v12.3.7 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.6",
211
+ version="12.3.7",
212
212
  created_at=time.time(),
213
213
  symbols=all_sigs,
214
214
  total_symbols=len(all_sigs),
@@ -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
6
+ License: MIT | Version: 12.3.7
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.
@@ -513,7 +513,7 @@ class TZeroLSPServer:
513
513
  "hoverProvider": True,
514
514
  "codeActionProvider": True,
515
515
  },
516
- "serverInfo": {"name": "tzero-lsp", "version": "12.3.6"},
516
+ "serverInfo": {"name": "tzero-lsp", "version": "12.3.7"},
517
517
  },
518
518
  }]
519
519
 
@@ -33,7 +33,7 @@ import ast
33
33
  import inspect
34
34
  import logging
35
35
 
36
- SERVER_VERSION = "12.3.6"
36
+ SERVER_VERSION = "12.3.7"
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
@@ -3632,6 +3632,10 @@ def create_mcp_server():
3632
3632
  ) -> str:
3633
3633
  """Coordinates autonomous multi-agent swarms, goal execution, PBFT consensus, and self-healing."""
3634
3634
  o_mode = (orchestration_mode or "goal_execute").lower().strip()
3635
+ if o_mode in ("agency", "agency_squad", "squad"):
3636
+ from tzero.tzero_agency import TZeroAgency
3637
+ res = TZeroAgency.run(goal=goal, project_dir=project_root, generate_readme_flag=True)
3638
+ return res.summary_markdown
3635
3639
  if o_mode in ("dynamic_subagents", "dynamic", "subagents", "swarm_dynamic"):
3636
3640
  from tzero.tzero_subagent_engine import get_autonomous_swarm_coordinator
3637
3641
  coord = get_autonomous_swarm_coordinator(workspace_root=project_root)
@@ -4681,6 +4685,24 @@ def create_mcp_server():
4681
4685
  return json.dumps(get_summary(workspace_dir=target_dir), indent=2)
4682
4686
  return render_report(workspace_dir=target_dir)
4683
4687
 
4688
+ elif act in ("agency", "agency_run", "agency_readme", "agency_skills", "agency_templates", "agency_export", "agency_catalog"):
4689
+ from tzero.tzero_agency import TZeroAgency
4690
+ target_dir = target if os.path.isdir(target) else "."
4691
+ if act == "agency_catalog":
4692
+ return json.dumps(TZeroAgency.catalog_summary(), indent=2)
4693
+ if act == "agency_skills":
4694
+ return json.dumps({"skills": TZeroAgency.list_skills(query=query)}, indent=2, ensure_ascii=False)
4695
+ if act == "agency_templates":
4696
+ return json.dumps({"templates": TZeroAgency.list_templates(query=query)}, indent=2, ensure_ascii=False)
4697
+ if act == "agency_export":
4698
+ return json.dumps(TZeroAgency.export_pack(project_dir=target_dir, goal=query), indent=2, ensure_ascii=False)
4699
+ if act == "agency_readme":
4700
+ bp = opts.get("blueprint_id", query or "auto")
4701
+ res = TZeroAgency.generate_readme(project_dir=target_dir, blueprint_id=bp)
4702
+ return res["markdown"]
4703
+ res = TZeroAgency.run(goal=query, project_dir=target_dir, blueprint_id=opts.get("blueprint_id", "auto"), export_pack=bool(opts.get("export", False)))
4704
+ return res.summary_markdown
4705
+
4684
4706
  # Fallback to general dispatch
4685
4707
  handler = _CANONICAL_DISPATCH.get(act) or _LEGACY_DISPATCH.get(act)
4686
4708
  if handler:
@@ -4719,7 +4741,30 @@ def create_mcp_server():
4719
4741
  + "\n".join([f"- [{'PASS' if s.passed else 'FAIL'}] **{s.name}** ({s.duration:.2f}s): {s.output or s.error}" for s in report.steps])
4720
4742
  )
4721
4743
 
4744
+ def agency_orchestrate(goal: str = "", project_root: str = ".", export_pack: bool = False) -> str:
4745
+ """Analyze repository structure + goal, run tailored multi-agent squad & skills, and synthesize README."""
4746
+ from tzero.tzero_agency import TZeroAgency
4747
+ return TZeroAgency.run(goal=goal, project_dir=project_root, export_pack=export_pack).summary_markdown
4748
+
4749
+ def agency_generate_readme(project_root: str = ".", blueprint_id: str = "auto") -> str:
4750
+ """Generate repo-grounded README from 448 T-Zero Agency domain x style blueprints."""
4751
+ from tzero.tzero_agency import TZeroAgency
4752
+ return TZeroAgency.generate_readme(project_dir=project_root, blueprint_id=blueprint_id)["markdown"]
4753
+
4754
+ def agency_list_catalog(query: str = "") -> str:
4755
+ """List T-Zero Agency 448 README blueprints, 24 skills, and 16 subagent templates."""
4756
+ from tzero.tzero_agency import TZeroAgency
4757
+ return json.dumps({
4758
+ "summary": TZeroAgency.catalog_summary(),
4759
+ "matching_blueprints": TZeroAgency.list_readmes(query=query)[:25],
4760
+ "skills": TZeroAgency.list_skills(query=query),
4761
+ "subagent_templates": TZeroAgency.list_templates(query=query),
4762
+ }, indent=2, ensure_ascii=False)
4763
+
4722
4764
  # Register canonical mappings
4765
+ _CANONICAL_DISPATCH['agency_orchestrate'] = agency_orchestrate
4766
+ _CANONICAL_DISPATCH['agency_generate_readme'] = agency_generate_readme
4767
+ _CANONICAL_DISPATCH['agency_list_catalog'] = agency_list_catalog
4723
4768
  _CANONICAL_DISPATCH['execute_codebase_workflow'] = execute_codebase_workflow
4724
4769
  _CANONICAL_DISPATCH['run_codebase_autopilot'] = execute_codebase_workflow
4725
4770
  _CANONICAL_DISPATCH['build_project_context'] = build_project_context
@@ -4920,6 +4965,32 @@ def create_mcp_server():
4920
4965
  def resource_security_guard() -> str:
4921
4966
  return verify_zero_leak_security(project_root=".")
4922
4967
 
4968
+ @server.resource(
4969
+ "tzero://agency/catalog",
4970
+ name="T-Zero Agency 448 README Blueprints & Subagent Catalog",
4971
+ description="Summary of all 448 README blueprints, 24 built-in skills, and 16 subagent templates",
4972
+ mime_type="application/json"
4973
+ )
4974
+ def resource_agency_catalog() -> str:
4975
+ from tzero.tzero_agency import TZeroAgency
4976
+ return json.dumps({
4977
+ "summary": TZeroAgency.catalog_summary(),
4978
+ "skills": TZeroAgency.list_skills(),
4979
+ "subagent_templates": TZeroAgency.list_templates(),
4980
+ }, indent=2, ensure_ascii=False)
4981
+
4982
+ @server.prompt(
4983
+ name="tzero_agency",
4984
+ description="Guides task-aware multi-agent squad assembly, skill selection, and 448-blueprint README generation."
4985
+ )
4986
+ def tzero_agency_prompt(goal: str = "Analyze workspace and generate tailored README", project_root: str = ".") -> str:
4987
+ return (
4988
+ f"Run T-Zero Agency for '{goal}' in '{project_root}':\n"
4989
+ f"1. Call `execute_codebase_workflow(action='agency', target='{project_root}', query='{goal}')` to profile the workspace and run the matched subagent squad + skills.\n"
4990
+ f"2. Call `execute_codebase_workflow(action='agency_readme', target='{project_root}', query='auto')` to synthesize a repo-grounded README from 448 domain x style blueprints.\n"
4991
+ f"3. Call `execute_codebase_workflow(action='agency_export', target='{project_root}')` to export ready-to-use `.tzero/agency/` skills and subagent manifests."
4992
+ )
4993
+
4923
4994
  # -------------------------------------------------------------------------
4924
4995
  # PROMPT: tzero_grounding
4925
4996
  # -------------------------------------------------------------------------
@@ -37,7 +37,7 @@ AUTHOR = "Toprak Ahmet Aydoğmuş"
37
37
  ORGANIZATION = "Siber Akademi"
38
38
  PYPI_PKG = "tzero-mcp"
39
39
  NPM_PKG = "tzero-mcp"
40
- CANONICAL_VERSION = "v12.3.6"
40
+ CANONICAL_VERSION = "v12.3.7"
41
41
 
42
42
 
43
43
  def get_current_version() -> str:
@@ -75,7 +75,7 @@ class TaskEvaluationResult:
75
75
 
76
76
  @dataclass
77
77
  class TaskBenchmarkReport:
78
- version: str = "12.3.6"
78
+ version: str = "12.3.7"
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.6)")
468
+ lines.append(" T-ZERO TASK-COMPLETION & BPE TOKENIZER BENCHMARK REPORT (v12.3.7)")
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.6"
21
+ CURRENT_VERSION = "12.3.7"
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/"
@@ -179,7 +179,7 @@ class TZeroTerminalCockpit:
179
179
  box_bottom = f"{c.CYAN}╚{'═' * 78}╝{c.RESET}"
180
180
 
181
181
  lines.append(box_top)
182
- lines.append(cls._box_line(f" {c.BOLD}{c.BRIGHT_CYAN}⚡ SİBER AKADEMİ — T-ZERO CONTEXT ARCHITECT & LIVE COCKPIT v12.3.6{c.RESET}"))
182
+ lines.append(cls._box_line(f" {c.BOLD}{c.BRIGHT_CYAN}⚡ SİBER AKADEMİ — T-ZERO CONTEXT ARCHITECT & LIVE COCKPIT v12.3.7{c.RESET}"))
183
183
  lines.append(cls._box_line(f" {c.DIM}Local AST Analysis | Optional Network Services{c.RESET}"))
184
184
  lines.append(box_mid)
185
185
 
@@ -324,7 +324,7 @@ class TZeroTerminalCockpit:
324
324
  elif choice == "4":
325
325
  from tzero.tzero_commit import LocalSemanticCommitSynthesizer
326
326
  print(f"\n{cls.YELLOW}[Synthesizing Release CHANGELOG]...{cls.RESET}")
327
- entry = LocalSemanticCommitSynthesizer.generate_changelog_entry(version="v12.3.6", repo_dir=workspace_dir)
327
+ entry = LocalSemanticCommitSynthesizer.generate_changelog_entry(version="v12.3.7", repo_dir=workspace_dir)
328
328
  print(f"\n{cls.BRIGHT_CYAN}{entry}{cls.RESET}\n")
329
329
  input("Press Enter to return to cockpit...")
330
330
  elif choice == "5":