Skip to content

Python Core Engine Reference

Toprak Ahmet Aydoğmuş edited this page Nov 30, 2026 · 2 revisions

T-Zero Algorithm Python Engine and Entry-Point Reference

Coverage: 15 modules | 70 classes | 726 functions | 22291 source lines.

Generated from the canonical Python package in the T-Zero Algorithm source tree.

Scope: CLI/MCP entry points, context reduction, language dispatch, native bridge, scanner support, and terminal-facing helpers. tzero_armor.py is excluded from detailed operational indexing; see Anti-REA-Safe-Overview. License note: Copied module-level License: MIT strings are source comments, not authoritative package licensing. The repository's current metadata declares AGPL-3.0-only; see its LICENSE.

How to read this reference

  • Declarations are extracted from Python AST and linked to source line ranges.
  • Signatures show parsed arguments and annotations. Defaults are quoted after personal-identifier, contact, and wallet redaction.
  • Docstrings are source text, not independently verified promises; personal identifiers, contact details, and wallet-like values are redacted.
  • Missing docstrings are explicitly marked. This catalog does not guess behavior.
  • This is a symbol map, not a line-by-line rewrite of every function body; use the linked implementation to inspect control flow and side effects.

tzero/__init__.py

Source: tzero/init.py
Source size: 69 lines | 0 classes | 1 functions

Module docstring:

T-Zero's public Python API and package namespace.

__getattr__

Kind: Function
Source: tzero/init.py:58-69

Signature:

def __getattr__(name):

Source docstring: none; consult the linked implementation instead of inferring behavior.

tzero/__main__.py

Source: tzero/main.py
Source size: 6 lines | 0 classes | 0 functions

Module docstring:

Run the T-Zero CLI with python -m tzero.

tzero/tzero_infra.py

Source: tzero/tzero_infra.py
Source size: 274 lines | 1 classes | 5 functions

Module docstring:


Siber Akademi — T-Zero Infrastructure & Database Schema AST Compressor.
Developer: [redacted] (Siber Akademi)
License: AGPL-3.0-only

Extracts high-value architectural contracts from SQL DDL, Kubernetes YAML,
Dockerfiles, and Terraform HCL, achieving 75% to 95% token reduction on
infrastructure and database artifacts without semantic loss.

SchemaInfraReducer

Kind: Class
Source: tzero/tzero_infra.py:24-274

Declaration:

class SchemaInfraReducer:

Source docstring:

AST & Structural heuristic compressor for SQL, Kubernetes, Dockerfile, and Terraform.

SchemaInfraReducer.reduce_sql

Kind: Method
Source: tzero/tzero_infra.py:31-120

Signature:

def reduce_sql(content: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring:

Compresses SQL DDL/DML into pure schema contracts.

        Strips huge INSERT INTO statements, runtime log statements, and comments.
        Retains: CREATE TABLE, CREATE VIEW, CREATE TYPE, ALTER TABLE ADD CONSTRAINT, CREATE INDEX.

SchemaInfraReducer.reduce_k8s_yaml

Kind: Method
Source: tzero/tzero_infra.py:126-180

Signature:

def reduce_k8s_yaml(content: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring:

Compresses Kubernetes YAML manifests down to architectural interfaces.

SchemaInfraReducer.reduce_dockerfile

Kind: Method
Source: tzero/tzero_infra.py:186-218

Signature:

def reduce_dockerfile(content: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring:

Condenses Dockerfiles into clean build stage architectures.

SchemaInfraReducer.reduce_terraform

Kind: Method
Source: tzero/tzero_infra.py:224-258

Signature:

def reduce_terraform(content: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring:

Condenses Terraform HCL into infrastructure topology contracts.

SchemaInfraReducer.reduce

Kind: Method
Source: tzero/tzero_infra.py:264-274

Signature:

def reduce(cls, filename_or_ext: str, content: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

tzero/tzero_lsp.py

Source: tzero/tzero_lsp.py
Source size: 634 lines | 1 classes | 16 functions

Module docstring:

T-Zero Stdio JSON-RPC Language Server (tzero lsp).

Provides real-time in-editor diagnostics and CodeLens via Language Server Protocol:
  - 100% Zero-Leak hardcoded credential detection (Severity: Error)
  - tzero.rules.json architectural layer boundary violations (Severity: Error)
  - Breaking AST public contract change warnings (Severity: Warning)
  - AST token compression CodeLens per class/function symbol

100% Free, Local, Offline, Stdlib JSON-RPC.

uri_to_path

Kind: Function
Source: tzero/tzero_lsp.py:28-36

Signature:

def uri_to_path(uri: str) -> str:

Source docstring:

Converts a file:// URI to a local filesystem path.

encode_lsp_frame

Kind: Function
Source: tzero/tzero_lsp.py:39-43

Signature:

def encode_lsp_frame(payload: Dict[str, Any]) -> bytes:

Source docstring:

Encodes a JSON-RPC message with LSP Content-Length header framing.

read_lsp_frame

Kind: Function
Source: tzero/tzero_lsp.py:46-68

Signature:

def read_lsp_frame(in_stream: BinaryIO) -> Optional[Dict[str, Any]]:

Source docstring:

Reads a single Content-Length framed JSON-RPC message from a binary stream.

TZeroLSPServer

Kind: Class
Source: tzero/tzero_lsp.py:71-628

Declaration:

class TZeroLSPServer:

Source docstring:

Stateful Language Server handling LSP lifecycle, diagnostics, and CodeLens.

TZeroLSPServer.__init__

Kind: Method
Source: tzero/tzero_lsp.py:74-80

Signature:

def __init__(self, workspace_dir: str = '.') -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroLSPServer._load_arch_rules

Kind: Method
Source: tzero/tzero_lsp.py:82-96

Signature:

def _load_arch_rules(self) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroLSPServer._classify_layer

Kind: Method
Source: tzero/tzero_lsp.py:98-111

Signature:

def _classify_layer(self, rel_path: str, rules: Dict[str, Any]) -> Optional[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroLSPServer._extract_imports

Kind: Method
Source: tzero/tzero_lsp.py:113-131

Signature:

def _extract_imports(self, text: str, file_path: str) -> List[tuple]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroLSPServer._resolve_module_rel

Kind: Method
Source: tzero/tzero_lsp.py:133-143

Signature:

def _resolve_module_rel(self, mod_name: str, rules: Dict[str, Any]) -> Optional[str]:

Source docstring:

Resolves a dotted/slash module reference to a workspace relative path if determinable.

TZeroLSPServer.analyze_document

Kind: Method
Source: tzero/tzero_lsp.py:145-201

Signature:

def analyze_document(self, uri: str, text: str) -> List[Dict[str, Any]]:

Source docstring:

Runs Zero-Leak, architecture boundary, and breaking contract checks on buffer text.

TZeroLSPServer.compute_code_lenses

Kind: Method
Source: tzero/tzero_lsp.py:203-255

Signature:

def compute_code_lenses(self, uri: str, text: str) -> List[Dict[str, Any]]:

Source docstring:

Computes token-cost CodeLenses for classes and functions in the document.

TZeroLSPServer.compute_hover

Kind: Method
Source: tzero/tzero_lsp.py:257-426

Signature:

def compute_hover(self, uri: str, text: str, line: int, character: int = 0) -> Optional[Dict[str, Any]]:

Source docstring:

Computes hover info with AST metrics, token reduction, and workspace references.

TZeroLSPServer.compute_code_actions

Kind: Method
Source: tzero/tzero_lsp.py:428-486

Signature:

def compute_code_actions(self, uri: str, text: str, diagnostics: Optional[List[Dict[str, Any]]] = None) -> List[Dict[str, Any]]:

Source docstring:

Computes LSP CodeAction quick-fixes for Zero-Leak credential diagnostics.

TZeroLSPServer._publish_diagnostics

Kind: Method
Source: tzero/tzero_lsp.py:488-493

Signature:

def _publish_diagnostics(self, uri: str, text: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroLSPServer.handle_message

Kind: Method
Source: tzero/tzero_lsp.py:495-611

Signature:

def handle_message(self, msg: Dict[str, Any]) -> List[Dict[str, Any]]:

Source docstring:

Processes one decoded JSON-RPC payload and returns outbound messages.

TZeroLSPServer.serve_stdio

Kind: Method
Source: tzero/tzero_lsp.py:613-628

Signature:

def serve_stdio(self, in_stream: Optional[BinaryIO] = None, out_stream: Optional[BinaryIO] = None) -> None:

Source docstring:

Runs synchronous Content-Length JSON-RPC stdio message loop.

main

Kind: Function
Source: tzero/tzero_lsp.py:631-634

Signature:

def main(workspace_dir: str = '.') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

tzero/tzero_mcp.py

Source: tzero/tzero_mcp.py
Source size: 5569 lines | 2 classes | 111 functions

Header note: Personal contact lines are intentionally omitted. See Codebase-Internals and MCP-Tool-Reference.

Field

Kind: Function
Source: tzero/tzero_mcp.py:60-61

Signature:

def Field(default = ..., description = ''):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ToolSearchMatch

Kind: Class
Source: tzero/tzero_mcp.py:117-120

Declaration:

class ToolSearchMatch(TypedDict):

Source docstring: none; consult the linked implementation instead of inferring behavior.

SearchToolsResult

Kind: Class
Source: tzero/tzero_mcp.py:123-126

Declaration:

class SearchToolsResult(TypedDict):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_safe_report_progress

Kind: Async function
Source: tzero/tzero_mcp.py:129-144

Signature:

async def _safe_report_progress(ctx: Any, progress: float, total: float, message: str = '') -> None:

Source docstring:

Safely emits MCP progress notifications without raising outside request sessions.

get_file_imports

Kind: Function
Source: tzero/tzero_mcp.py:147-216

Signature:

def get_file_imports(file_path: str) -> List[str]:

Source docstring:

Helper to extract imported module dependencies across Python, TypeScript, Go, Rust, Java, C#, and C++.

build_workspace_import_graph

Kind: Function
Source: tzero/tzero_mcp.py:219-234

Signature:

def build_workspace_import_graph(files: List[str], base_dir: str) -> Dict[str, List[str]]:

Source docstring:

Builds a full dictionary mapping of workspace files to their imported dependencies across all languages.

scan_text_for_secrets

Kind: Function
Source: tzero/tzero_mcp.py:237-249

Signature:

def scan_text_for_secrets(text: str) -> List[Dict[str, Any]]:

Source docstring:

Scans raw text for hardcoded API keys, private keys, and secrets across any language.

create_mcp_server

Kind: Function
Source: tzero/tzero_mcp.py:252-5351

Signature:

def create_mcp_server():

Source docstring:

Initializes and registers all T-Zero tools and prompts on the MCP server instance.

create_mcp_server._noop_decorator

Kind: Nested function
Source: tzero/tzero_mcp.py:288-291

Signature:

def _noop_decorator(**kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server._noop_decorator._wrapper

Kind: Nested function
Source: tzero/tzero_mcp.py:289-290

Signature:

def _wrapper(fn):

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server._append_viral_star_footer

Kind: Nested function
Source: tzero/tzero_mcp.py:303-309

Signature:

def _append_viral_star_footer(text: Any) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server._legacy_get_project_context_tree

Kind: Nested function
Source: tzero/tzero_mcp.py:340-439

Signature:

def _legacy_get_project_context_tree(project_root: Annotated[str, Field(default='.', description='Target repository root path to scan (default: current working directory).')] = '.', reduction_mode: Annotated[str, Field(default='ultra', description="AST reduction level: 'ultra' for signatures & docstrings (80-95% reduction), 'balanced' for signatures + control headers, 'none' for verbatim source.")] = 'ultra', max_tokens: Annotated[int, Field(default=64000, description='Upper token budget threshold for returned context. When exceeded, PageRank & Git recency prioritizes critical architectural files.')] = 64000, include_file_contents: Annotated[bool, Field(default=True, description='When True, includes AST-reduced file bodies; when False, emits only the directory hierarchy and high-level architectural outline.')] = True) -> str:

Source docstring:

Builds a hierarchical T-Zero context tree for the specified workspace.

        Args:
            project_root: Root directory of the repository to scan (default: current directory).
            reduction_mode: Token reduction mode ('ultra' for AST signatures only, 'balanced' for signatures + control flow, 'none' for full source).
            max_tokens: Maximum token budget cap for the returned context payload.
            include_file_contents: If False, returns only the directory tree and high-level architecture overview.

create_mcp_server._legacy_get_project_context_tree.file_priority

Kind: Function
Source: tzero/tzero_mcp.py:407-414

Signature:

def file_priority(f: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server._legacy_query_module_dependencies

Kind: Nested function
Source: tzero/tzero_mcp.py:469-546

Signature:

def _legacy_query_module_dependencies(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to scan (default: current directory).')] = '.', file_path: Annotated[str, Field(default='', description='Optional relative or absolute path to a specific file to inspect. If empty, analyzes the whole workspace.')] = '') -> str:

Source docstring:

Analyzes dependency structure and import graphs.

        Args:
            project_root: Root directory of the repository (default: current directory).
            file_path: Optional relative or absolute path to a specific file to inspect. If empty, analyzes the whole workspace.

create_mcp_server._legacy_query_architecture_boundaries

Kind: Nested function
Source: tzero/tzero_mcp.py:576-600

Signature:

def _legacy_query_architecture_boundaries(project_root: Annotated[str, Field(default='.', description='Root directory of the repository where tzero.rules.json is located (default: current directory).')] = '.', extra_guidance: Annotated[str, Field(default='', description='Optional custom rules, architecture styles, or conventions to inject into the boundary definition.')] = '') -> str:

Source docstring:

Generates architectural guardrails and boundary rules for AI agents.

        Args:
            project_root: Root directory of the repository (default: current directory).
            extra_guidance: Optional custom rules, architecture styles, or conventions.

create_mcp_server._legacy_generate_architecture_blueprint

Kind: Nested function
Source: tzero/tzero_mcp.py:633-676

Signature:

def _legacy_generate_architecture_blueprint(project_root: Annotated[str, Field(default='.', description="Repository root directory to inspect (default: '.').")] = '.', use_ai: Annotated[bool, Field(default=False, description='When True, supplements deterministic AST topology with local zero-cost AI architectural insights (default: False).')] = False, model: Annotated[str, Field(default='', description="Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True (default: '').")] = '') -> str:

Source docstring:

Generates a complete ARCHITECTURE.md document with live Mermaid diagrams.

        Args:
            project_root: Repository root directory to inspect (default: '.').
            use_ai: When True, supplements deterministic AST topology with local zero-cost AI architectural insights.
            model: Optional model identifier override (e.g. 'deepseek-v4.1-flash', 'gpt-4o') when use_ai is True.

create_mcp_server._legacy_generate_repo_map

Kind: Nested function
Source: tzero/tzero_mcp.py:706-735

Signature:

def _legacy_generate_repo_map(project_root: Annotated[str, Field(default='.', description="Target repository root directory to scan (default: '.').")] = '.', max_tokens: Annotated[int, Field(default=4000, description='Maximum token ceiling for the returned symbol map (default: 4000).')] = 4000) -> str:

Source docstring:

Builds a compressed AST symbol map for the repository.

        Args:
            project_root: Target repository root directory to scan (default: '.').
            max_tokens: Maximum token ceiling for the returned symbol map (default: 4000).

create_mcp_server._legacy_audit_codebase_quality

Kind: Nested function
Source: tzero/tzero_mcp.py:765-866

Signature:

def _legacy_audit_codebase_quality(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to audit (default: current directory).')] = '.', file_path: Annotated[str, Field(default='', description='Optional path to a specific file to audit. If empty, audits all code files in the workspace.')] = '') -> str:

Source docstring:

Audits codebase quality, AST smells, and secret exposure.

        Args:
            project_root: Root directory of the repository (default: current directory).
            file_path: Optional path to a specific file to audit. If empty, audits all Python files.

create_mcp_server._legacy_find_code_duplicity

Kind: Nested function
Source: tzero/tzero_mcp.py:896-943

Signature:

def _legacy_find_code_duplicity(project_root: Annotated[str, Field(default='.', description="Repository root directory to scan (default: '.').")] = '.', min_lines: Annotated[int, Field(default=6, description='Minimum consecutive identical code lines required to flag a duplicate block (default: 6).')] = 6) -> str:

Source docstring:

Identifies duplicate code blocks across workspace files.

        Args:
            project_root: Repository root directory to scan (default: '.').
            min_lines: Minimum consecutive identical code lines required to flag a duplicate block (default: 6).

create_mcp_server._legacy_estimate_token_cost

Kind: Nested function
Source: tzero/tzero_mcp.py:976-1025

Signature:

def _legacy_estimate_token_cost(text: Annotated[str, Field(default='', description='Optional raw text to estimate. If empty, analyzes context generated from project_root.')] = '', project_root: Annotated[str, Field(default='.', description='Project directory to scan if text is empty (default: current directory).')] = '.', reduction_mode: Annotated[str, Field(default='ultra', description="Reduction tier ('ultra', 'balanced', 'none') applied when scanning project_root.")] = 'ultra') -> str:

Source docstring:

Calculates token counts and costs across LLM providers.

        Args:
            text: Optional raw text to estimate. If empty, analyzes context from project_root.
            project_root: Project directory to scan if text is empty (default: current directory).
            reduction_mode: Reduction mode to apply when scanning project_root.

create_mcp_server._legacy_analyze_change_impact

Kind: Nested function
Source: tzero/tzero_mcp.py:1058-1070

Signature:

def _legacy_analyze_change_impact(target_symbol: Annotated[str, Field(description='Name of the function, class, or method to analyze for change blast radius.')], project_root: Annotated[str, Field(default='.', description='Workspace root directory containing target symbols (default: current directory).')] = '.', file_path: Annotated[str, Field(default='', description='Optional file path to disambiguate target symbol.')] = '') -> str:

Source docstring:

Traces symbol references, inbound dependents, and calculates blast radius score.

create_mcp_server._legacy_enforce_architecture_boundaries

Kind: Nested function
Source: tzero/tzero_mcp.py:1100-1110

Signature:

def _legacy_enforce_architecture_boundaries(project_root: Annotated[str, Field(default='.', description='Workspace root to validate against architectural rules (default: current directory).')] = '.', rules_file: Annotated[str, Field(default='tzero.rules.json', description="Path to rules JSON file (default: 'tzero.rules.json'). Resolves relative to project_root.")] = 'tzero.rules.json') -> str:

Source docstring:

Audits imports against architectural layer boundaries.

create_mcp_server._legacy_search_codebase_semantic

Kind: Nested function
Source: tzero/tzero_mcp.py:1141-1150

Signature:

def _legacy_search_codebase_semantic(query: Annotated[str, Field(description='Natural language or technical keyword query describing the desired code logic.')], project_root: Annotated[str, Field(default='.', description='Workspace root directory to index and search (default: current directory).')] = '.', top_k: Annotated[int, Field(default=5, description='Maximum number of top-matching code snippets to return (default: 5).')] = 5) -> str:

Source docstring:

Performs private local hybrid semantic search across the codebase.

create_mcp_server._legacy_export_agent_rules

Kind: Nested function
Source: tzero/tzero_mcp.py:1180-1226

Signature:

def _legacy_export_agent_rules(project_root: Annotated[str, Field(default='.', description='Target workspace directory where agent rule files will be created (default: current directory).')] = '.', target: Annotated[str, Field(default='all', description="Target editor format: 'cursor', 'cline', 'windsurf', 'claude', 'copilot', or 'all' (default: 'all').")] = 'all') -> str:

Source docstring:

Exports AI coding agent rules into workspace.

create_mcp_server._legacy_get_token_savings_metrics

Kind: Nested function
Source: tzero/tzero_mcp.py:1256-1274

Signature:

def _legacy_get_token_savings_metrics(project_root: Annotated[str, Field(default='.', description="Target workspace directory to measure (default: '.').")] = '.', team_size: Annotated[int, Field(default=5, description='Number of developers in the engineering team used to model monthly ROI savings (default: 5).')] = 5) -> str:

Source docstring:

Calculates token reduction and economic ROI.

create_mcp_server._legacy_get_incremental_diff_context

Kind: Nested function
Source: tzero/tzero_mcp.py:1304-1312

Signature:

def _legacy_get_incremental_diff_context(base_ref: Annotated[str, Field(default='HEAD~1', description="Git revision or branch to diff against (default: 'HEAD~1').")] = 'HEAD~1', project_root: Annotated[str, Field(default='.', description='Git repository root path (default: current directory).')] = '.') -> str:

Source docstring:

Generates incremental PR diff context and downstream caller signatures.

create_mcp_server._legacy_prune_code_snippet

Kind: Nested function
Source: tzero/tzero_mcp.py:1345-1373

Signature:

def _legacy_prune_code_snippet(code: Annotated[str, Field(description='Raw source code content to prune.')], file_path_or_ext: Annotated[str, Field(default='snippet.py', description="File name or extension (e.g. 'service.ts', 'main.go', 'app.py', '.rs', '.java', '.cs', '.kt', '.swift') indicating language parser.")] = 'snippet.py', reduction_mode: Annotated[str, Field(default='ultra', description="Reduction tier: 'ultra' for AST signatures only (80-95% reduction), 'balanced' for signatures + control flow.")] = 'ultra') -> str:

Source docstring:

Compresses code snippets into functional signatures on-the-fly.

        Args:
            code: Source code text to prune.
            file_path_or_ext: File name or extension (e.g. 'service.ts', 'main.go', 'app.py', '.rs', '.java', '.cs').
            reduction_mode: 'ultra' for AST signatures only, 'balanced' for signatures + control flow.

create_mcp_server._legacy_verify_zero_leak_security

Kind: Nested function
Source: tzero/tzero_mcp.py:1404-1477

Signature:

def _legacy_verify_zero_leak_security(project_root: Annotated[str, Field(default='.', description='Workspace root directory to scan for secret leaks (default: current directory).')] = '.', target_file: Annotated[str, Field(default='', description='Optional single file path to inspect instead of the full workspace.')] = '', code_snippet: Annotated[str, Field(default='', description='Optional in-memory code string to inspect instead of files on disk.')] = '') -> str:

Source docstring:

Runs Zero-Leak secret detection audit across workspace or snippets.

create_mcp_server._legacy_verify_hallucination_guard

Kind: Nested function
Source: tzero/tzero_mcp.py:1508-1524

Signature:

def _legacy_verify_hallucination_guard(proposed_code: Annotated[str, Field(description='Python code proposed to be written or edited.')], target_file: Annotated[str, Field(default='', description='Optional path of the target file being modified to resolve relative imports.')] = '', project_root: Annotated[str, Field(default='.', description='Workspace root directory providing the ground-truth AST symbol catalog (default: current directory).')] = '.') -> str:

Source docstring:

Validates proposed code against workspace AST signatures and contracts.

        Args:
            proposed_code: Python code proposed to be written or edited.
            target_file: Optional path of the target file being modified.
            project_root: Root directory of the repository (default: current directory).

create_mcp_server._legacy_get_smart_skeleton_context

Kind: Nested function
Source: tzero/tzero_mcp.py:1555-1570

Signature:

def _legacy_get_smart_skeleton_context(focus_file: Annotated[str, Field(description='Target file path to focus on and retain with full implementation.')], focus_symbol: Annotated[str, Field(default='', description='Optional specific function or class name within focus_file to isolate.')] = '', project_root: Annotated[str, Field(default='.', description='Root directory of the repository (default: current directory).')] = '.') -> str:

Source docstring:

Returns focus implementation with 1st-degree surrounding AST skeletons.

        Args:
            focus_file: Target file path to focus on.
            focus_symbol: Optional specific function or class name within focus_file to inspect.
            project_root: Root directory of the repository (default: current directory).

create_mcp_server._legacy_rank_repository_pagerank

Kind: Nested function
Source: tzero/tzero_mcp.py:1600-1614

Signature:

def _legacy_rank_repository_pagerank(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to analyze (default: current directory).')] = '.', top_k: Annotated[int, Field(default=15, description='Number of top central modules to return in the ranking report (default: 15).')] = 15) -> str:

Source docstring:

Computes PageRank architectural centrality scores for repository modules.

        Args:
            project_root: Root directory of the repository (default: current directory).
            top_k: Number of top central modules to return in the ranking report (default: 15).

create_mcp_server._legacy_trace_symbol_call_chain

Kind: Nested function
Source: tzero/tzero_mcp.py:1645-1661

Signature:

def _legacy_trace_symbol_call_chain(symbol_name: Annotated[str, Field(description='Function or method identifier to trace.')], project_root: Annotated[str, Field(default='.', description='Root directory of the repository.')] = '.', max_depth: Annotated[int, Field(default=3, description='Maximum recursive call graph traversal depth.')] = 3) -> str:

Source docstring:

Traces upstream and downstream call chains for any function or method.

        Args:
            symbol_name: Function or method identifier to trace.
            project_root: Root directory of the repository (default: '.').
            max_depth: Maximum recursive call graph traversal depth (default: 3).

create_mcp_server._legacy_find_dead_code

Kind: Nested function
Source: tzero/tzero_mcp.py:1690-1702

Signature:

def _legacy_find_dead_code(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to scan for unreferenced symbols (default: current directory).')] = '.') -> str:

Source docstring:

Discovers unused symbols and dead code candidates across the codebase.

        Args:
            project_root: Root directory of the repository (default: current directory).

create_mcp_server._legacy_jarvis_compress_semantic_memory

Kind: Nested function
Source: tzero/tzero_mcp.py:1731-1756

Signature:

def _legacy_jarvis_compress_semantic_memory(text: Annotated[str, Field(description='Natural language statement, hardware setup, system log, or architecture instruction to compress.')]) -> str:

Source docstring:

Compresses text into 3-Layer semantic triplets, VQ discrete codes, and virtual memory tokens.

        Args:
            text: Input text to compress.

create_mcp_server._legacy_jarvis_decompress_semantic_memory

Kind: Nested function
Source: tzero/tzero_mcp.py:1785-1807

Signature:

def _legacy_jarvis_decompress_semantic_memory(token_or_code: Annotated[str, Field(description="Virtual memory token (e.g. '<|tzero:mem:8421|>') or discrete code ID (e.g. '8421').")]) -> str:

Source docstring:

Resolves virtual memory tokens back to their semantic graph representation.

        Args:
            token_or_code: The virtual token or code ID to resolve.

create_mcp_server._legacy_jarvis_orchestrate_goal

Kind: Nested function
Source: tzero/tzero_mcp.py:1838-1886

Signature:

def _legacy_jarvis_orchestrate_goal(goal: Annotated[str, Field(default='plan', description="Autonomous engineering task, refactoring directive, or 'plan'/'help' to view capabilities and executive plan.")] = 'plan', project_root: Annotated[str, Field(default='.', description='Target workspace directory to orchestrate within (default: current directory).')] = '.', mode: Annotated[str, Field(default='auto', description="Execution mode: 'auto', 'plan', 'execute', or 'capabilities'.")] = 'auto') -> str:

Source docstring:

Executes autonomous workspace orchestration or presents an executive engineering plan.

create_mcp_server._legacy_jarvis_zero_key_query

Kind: Nested function
Source: tzero/tzero_mcp.py:1916-1935

Signature:

def _legacy_jarvis_zero_key_query(prompt: Annotated[str, Field(description='Prompt, code question, or instruction for the Zero-Key intelligence engine.')], system_prompt: Annotated[str, Field(default='You are T-Zero Jarvis Autonomous Code Engineer.', description='System instruction context.')] = 'You are T-Zero Jarvis Autonomous Code Engineer.') -> str:

Source docstring:

Queries the zero-key free AI inference engine.

        Args:
            prompt: User prompt or instruction.
            system_prompt: System role prompt.

create_mcp_server._legacy_jarvis_query_knowledge_graph

Kind: Nested function
Source: tzero/tzero_mcp.py:1966-1996

Signature:

def _legacy_jarvis_query_knowledge_graph(query: Annotated[str, Field(default='', description='General natural language search term to locate in graph (default: empty string).')] = '', entity: Annotated[str, Field(default='', description='Specific entity name to filter knowledge graph nodes (default: empty string).')] = '', predicate: Annotated[str, Field(default='', description="Relationship or predicate type to filter edges, e.g. 'depends_on' (default: empty string).")] = '') -> str:

Source docstring:

Queries the semantic memory knowledge graph.

        Args:
            query: Freeform search keyword.
            entity: Target entity name.
            predicate: Target predicate.

create_mcp_server._legacy_jarvis_compress_document

Kind: Nested function
Source: tzero/tzero_mcp.py:2025-2050

Signature:

def _legacy_jarvis_compress_document(document_text: Annotated[str, Field(description='Full text of technical documentation, README, or article to compress.')]) -> str:

Source docstring:

Compresses multi-paragraph technical documents into knowledge graph virtual tokens.

        Args:
            document_text: Full document text to ingest and compress.

create_mcp_server._legacy_jarvis_export_memory_store

Kind: Nested function
Source: tzero/tzero_mcp.py:2080-2100

Signature:

def _legacy_jarvis_export_memory_store(action: Annotated[str, Field(default='save', description="Action to perform: 'save' (export to disk) or 'load' (import from disk) (default: 'save').")] = 'save', file_path: Annotated[str, Field(default='', description="Optional custom JSON file path (default: '' uses 'tzero_memory_store.json').")] = '') -> str:

Source docstring:

Saves or loads persistent semantic memory store.

        Args:
            action: 'save' or 'load'.
            file_path: Target JSON file path.

create_mcp_server._legacy_jarvis_causal_chain_query

Kind: Nested function
Source: tzero/tzero_mcp.py:2130-2152

Signature:

def _legacy_jarvis_causal_chain_query(target_node_id: Annotated[str, Field(description='Incident identifier, bug description, or symbol name to trace root cause for.')], query_type: Annotated[str, Field(default='root_causes', description="Analysis mode: 'root_causes' (backward causal trace), 'effect_chain' (downstream consequence chain), 'rollback_order' (safe rollback sequence), or 'timeline' (chronological event history) (default: 'root_causes').")] = 'root_causes') -> str:

Source docstring:

Queries 4D Causal & Temporal Knowledge Graph.

create_mcp_server._legacy_jarvis_self_healing_execute

Kind: Nested function
Source: tzero/tzero_mcp.py:2183-2220

Signature:

def _legacy_jarvis_self_healing_execute(command: Annotated[str, Field(description='Shell command or test script to execute.')], max_retries: Annotated[int, Field(default=3, description='Zero disables repair; a positive value permits one repair attempt.')] = 3) -> str:

Source docstring:

Runs command with autonomous AST error diagnosis and auto-repair.

create_mcp_server._legacy_jarvis_consolidate_memory

Kind: Nested function
Source: tzero/tzero_mcp.py:2249-2263

Signature:

def _legacy_jarvis_consolidate_memory(action: Annotated[str, Field(default='consolidate', description="Consolidation mode: 'consolidate' (runs compaction cycle) or 'summary' (reports consolidation status).")] = 'consolidate') -> str:

Source docstring:

Consolidates episodic memory into permanent abstracted knowledge.

create_mcp_server._legacy_jarvis_hybrid_search

Kind: Nested function
Source: tzero/tzero_mcp.py:2294-2326

Signature:

def _legacy_jarvis_hybrid_search(query: Annotated[str, Field(description='Search query, question, or code pattern to locate.')], top_k: Annotated[int, Field(default=10, description='Maximum number of ranked results to return.')] = 10, domain: Annotated[str, Field(default='', description="Optional domain filter ('HARDWARE', 'PROTOCOL', 'SOFTWARE', etc.). Empty string searches across all domains.")] = '') -> str:

Source docstring:

Sub-millisecond in-memory BM25 + latent code hybrid search.

create_mcp_server._legacy_jarvis_swarm_orchestrate

Kind: Nested function
Source: tzero/tzero_mcp.py:2356-2381

Signature:

def _legacy_jarvis_swarm_orchestrate(mission_goal: Annotated[str, Field(description='High-level mission directive or engineering objective for the swarm.')], context: Annotated[str, Field(default='', description="Optional workspace context or specific constraints to guide agent execution (default: '').")] = '') -> str:

Source docstring:

Executes autonomous multi-agent swarm mission coordination.

create_mcp_server._legacy_jarvis_export_graph_visualization

Kind: Nested function
Source: tzero/tzero_mcp.py:2410-2436

Signature:

def _legacy_jarvis_export_graph_visualization(output_path: Annotated[str, Field(default='', description="Destination file path for the generated HTML visualizer (default: '' uses 'tzero_graph_hud.html').")] = '') -> str:

Source docstring:

Exports interactive cyberpunk HTML graph visualization.

create_mcp_server._legacy_jarvis_minhash_similarity

Kind: Nested function
Source: tzero/tzero_mcp.py:2467-2516

Signature:

def _legacy_jarvis_minhash_similarity(text_a: Annotated[str, Field(description='First text or code snippet to compare.')], text_b: Annotated[str, Field(default='', description='Second text to compare against. If empty string, searches memory codebook.')] = '', threshold: Annotated[float, Field(default=0.5, description='Minimum Jaccard similarity threshold (0.0 to 1.0) to flag as a positive match.')] = 0.5) -> str:

Source docstring:

Sub-microsecond MinHash LSH similarity comparison.

create_mcp_server._legacy_jarvis_bft_swarm_consensus

Kind: Nested function
Source: tzero/tzero_mcp.py:2546-2568

Signature:

def _legacy_jarvis_bft_swarm_consensus(mission_goal: Annotated[str, Field(description='Action, refactoring plan, or critical decision requiring swarm consensus.')], context: Annotated[str, Field(default='', description="Supporting architectural context, risk parameters, or verification constraints (default: '').")] = '') -> str:

Source docstring:

Executes Byzantine Fault-Tolerant swarm consensus.

create_mcp_server._legacy_jarvis_latent_press_compress

Kind: Nested function
Source: tzero/tzero_mcp.py:2598-2619

Signature:

def _legacy_jarvis_latent_press_compress(context_text: Annotated[str, Field(description='Long text or documentation string to compress before feeding to LLM.')], near_dup_threshold: Annotated[float, Field(default=0.65, description='Similarity threshold (0.0 to 1.0) for collapsing redundant sentences.')] = 0.65) -> str:

Source docstring:

Executes LatentPress pre-prefill context compression.

create_mcp_server._legacy_prune_schema_definition

Kind: Nested function
Source: tzero/tzero_mcp.py:2650-2667

Signature:

def _legacy_prune_schema_definition(content: Annotated[str, Field(description='Raw schema content (SQL DDL, Kubernetes YAML, Dockerfile, or Terraform HCL).')], schema_type_or_filename: Annotated[str, Field(default='schema.sql', description="Schema type ('sql', 'yaml', 'dockerfile', 'terraform') or filename with extension.")] = 'schema.sql', reduction_mode: Annotated[str, Field(default='ultra', description="Reduction tier: 'ultra' for pure interfaces (80-95% reduction), 'balanced' for interfaces + key attributes.")] = 'ultra') -> str:

Source docstring:

Compresses database or infrastructure schema definitions on-the-fly.

create_mcp_server._legacy_generate_smart_micro_patch

Kind: Nested function
Source: tzero/tzero_mcp.py:2697-2703

Signature:

def _legacy_generate_smart_micro_patch(diff_content: Annotated[str, Field(description='Raw unified diff text (e.g. git diff output) to compress.')], max_context_lines: Annotated[int, Field(default=1, description='Maximum unchanged context lines to keep around hunk modifications (default: 1).')] = 1) -> str:

Source docstring:

Compresses unified git diff into a compact semantic micro-patch.

create_mcp_server._legacy_generate_zero_waste_prompt_context

Kind: Nested function
Source: tzero/tzero_mcp.py:2733-2751

Signature:

def _legacy_generate_zero_waste_prompt_context(target_dir: Annotated[str, Field(default='.', description="Target repository root directory (default: '.').")] = '.', entrypoints: Annotated[Optional[List[str]], Field(default=None, description="List of entrypoint filenames (e.g. ['main.py', 'app.py']). If omitted or null, entrypoints are auto-detected.")] = None) -> str:

Source docstring:

Constructs zero-waste LLM prompt context by pruning dead code via AST reachability.

create_mcp_server._legacy_compress_stream_tokens

Kind: Nested function
Source: tzero/tzero_mcp.py:2782-2799

Signature:

def _legacy_compress_stream_tokens(content: Annotated[str, Field(description='Streaming text, log chunk, or partial code buffer to compress.')], filename_hint: Annotated[str, Field(default='', description="Optional filename or extension hint (e.g. 'app.py', 'schema.sql', 'patch.diff') to optimize AST reduction (default: '').")] = '', tier: Annotated[str, Field(default='T-3', description="Compression tier ('T-3' for AST signatures, 'T-2' for light structure, 'T-4' for agent rules) (default: 'T-3').")] = 'T-3') -> str:

Source docstring:

Compresses streaming code tokens on-the-fly.

create_mcp_server._legacy_install_git_security_guard

Kind: Nested function
Source: tzero/tzero_mcp.py:2828-2843

Signature:

def _legacy_install_git_security_guard(repo_dir: Annotated[str, Field(default='.', description="Target git repository root directory where the pre-commit hook will be installed (default: '.').")] = '.') -> str:

Source docstring:

Installs the pre-commit zero-leak and token optimization guard.

create_mcp_server._legacy_suggest_reusable_helpers

Kind: Nested function
Source: tzero/tzero_mcp.py:2876-2892

Signature:

def _legacy_suggest_reusable_helpers(query: Annotated[str, Field(default='', description="Natural language task description, functionality needed, or function name (default: '').")] = '', code_snippet: Annotated[str, Field(default='', description='Optional code snippet being written to check for duplicate helper reimplementation.')] = '', project_root: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.', top_k: Annotated[int, Field(default=5, description='Maximum number of reusable helpers to recommend (default: 5).')] = 5, include_body: Annotated[bool, Field(default=True, description='Whether to include full implementation bodies of suggested helpers.')] = True) -> str:

Source docstring:

Discovers existing reusable helpers across codebase AST.

create_mcp_server.build_project_context

Kind: Nested function
Source: tzero/tzero_mcp.py:3024-3054

Signature:

def build_project_context(project_root: Annotated[str, Field(default='.', description='Target repository root path to scan (default: current working directory).')] = '.', context_type: Annotated[str, Field(default='tree', description="Context generation mode: 'tree' for hierarchical multi-tier AST tree, 'repo_map' for compact symbol index, 'skeleton' for focus-file implementation with 1st-degree caller/callee skeletons, 'zero_waste_prompt' for agent prompt prefix with pruned AST, 'incremental_diff' for git diff context.")] = 'tree', focus_file: Annotated[str, Field(default='', description="Optional path to a focus file when context_type is 'skeleton' or 'incremental_diff'.")] = '', reduction_mode: Annotated[str, Field(default='ultra', description="AST reduction level: 'ultra' for signatures & docstrings (80-95% reduction), 'balanced' for signatures + control headers, 'none' for verbatim source.")] = 'ultra', max_tokens: Annotated[int, Field(default=64000, description='Upper token budget threshold for returned context.')] = 64000, include_file_contents: Annotated[bool, Field(default=True, description='When True, includes AST-reduced file bodies; when False, emits directory hierarchy only.')] = True) -> str:

Source docstring:

Builds a token-optimized AST context payload for LLM prompts across hierarchy tiers.

create_mcp_server.prune_code_snippet

Kind: Nested function
Source: tzero/tzero_mcp.py:3085-3094

Signature:

def prune_code_snippet(code: Annotated[str, Field(description='Raw source code, schema definition (JSON/YAML), or unified diff text to compress.')], file_name_or_lang: Annotated[str, Field(default='snippet.py', description="File name or language extension (e.g. 'service.ts', '.go', '.rs', 'schema.json') to select appropriate AST parser.")] = 'snippet.py', reduction_mode: Annotated[str, Field(default='ultra', description="AST reduction level: 'ultra' for signatures only, 'balanced' for signatures + control structures, 'micro_patch' for surgical unified diff pruning.")] = 'ultra') -> str:

Source docstring:

Prunes implementation bodies from in-memory code snippets or diff streams.

create_mcp_server.manage_architecture_rules

Kind: Nested function
Source: tzero/tzero_mcp.py:3128-3195

Signature:

def manage_architecture_rules(action: Annotated[str, Field(default='query', description="Rule lifecycle action: 'query' to inspect active rules, 'update' to add or modify rules, 'delete' to remove a rule, 'reset' to restore defaults.")] = 'query', project_root: Annotated[str, Field(default='.', description='Target repository root where tzero.rules.json is located (default: current directory).')] = '.', rule_name: Annotated[str, Field(default='', description="Name or identifier of the rule to update or delete when action is 'update' or 'delete'.")] = '', rule_definition: Annotated[str, Field(default='', description="JSON string or markdown specification of the rule to set when action is 'update'.")] = '') -> str:

Source docstring:

Manages the complete lifecycle of architectural layer boundary rules.

create_mcp_server.enforce_architecture_rules

Kind: Nested function
Source: tzero/tzero_mcp.py:3227-3235

Signature:

def enforce_architecture_rules(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to validate (default: current directory).')] = '.', strict_mode: Annotated[bool, Field(default=True, description='When True, fails on any boundary infraction; when False, warns without raising errors.')] = True) -> str:

Source docstring:

Enforces architectural boundary rules and layer isolation constraints across workspace AST.

create_mcp_server.generate_architecture_blueprint

Kind: Nested function
Source: tzero/tzero_mcp.py:3266-3272

Signature:

def generate_architecture_blueprint(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to analyze (default: current directory).')] = '.', use_ai: Annotated[bool, Field(default=False, description='When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis.')] = False, model: Annotated[str, Field(default='', description='Optional model identifier override when use_ai is True.')] = '') -> str:

Source docstring:

Generates a complete ARCHITECTURE.md document with live Mermaid component diagrams.

create_mcp_server.analyze_code_dependencies

Kind: Nested function
Source: tzero/tzero_mcp.py:3306-3322

Signature:

def analyze_code_dependencies(analysis_type: Annotated[str, Field(default='dependencies', description="Type of structural analysis: 'dependencies' for module import/export graph, 'call_chain' for deep caller/callee execution trace, 'pagerank' for architectural backbone centrality, 'dead_code' for unreferenced symbols.")] = 'dependencies', project_root: Annotated[str, Field(default='.', description='Root directory of the repository to scan (default: current directory).')] = '.', target_symbol: Annotated[str, Field(default='', description="Target class or function name when analysis_type is 'call_chain'.")] = '', file_path: Annotated[str, Field(default='', description='Optional path to a specific file to analyze.')] = '') -> str:

Source docstring:

Analyzes structural dependencies, call chains, and module centrality across codebase.

create_mcp_server.analyze_change_impact

Kind: Nested function
Source: tzero/tzero_mcp.py:3353-3362

Signature:

def analyze_change_impact(target_symbol: Annotated[str, Field(description='Name of the function, class, or method being modified or refactored.')], project_root: Annotated[str, Field(default='.', description='Root directory of the repository (default: current directory).')] = '.', file_path: Annotated[str, Field(default='', description='Optional file path where the target symbol is defined.')] = '') -> str:

Source docstring:

Calculates blast radius score and downstream dependents before modifying a target symbol.

create_mcp_server.search_codebase

Kind: Nested function
Source: tzero/tzero_mcp.py:3395-3401

Signature:

def search_codebase(query: Annotated[str, Field(description='Search term or natural language description of the code to locate.')], project_root: Annotated[str, Field(default='.', description='Root directory of the repository to search (default: current directory).')] = '.', top_k: Annotated[int, Field(default=5, description='Maximum number of ranked results to return (default: 5).')] = 5) -> str:

Source docstring:

Performs private local hybrid BM25 and semantic search across repository code.

create_mcp_server.audit_code_quality

Kind: Nested function
Source: tzero/tzero_mcp.py:3434-3465

Signature:

def audit_code_quality(project_root: Annotated[str, Field(default='.', description='Root directory of the repository to audit (default: current directory).')] = '.', 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', file_path: Annotated[str, Field(default='', description='Optional path to a single file to audit.')] = '') -> str:

Source docstring:

Audits AST code smells, cyclomatic complexity, copy-paste duplicity, hallucinations, and debt markers.

create_mcp_server.verify_security_guard

Kind: Nested function
Source: tzero/tzero_mcp.py:3498-3508

Signature:

def verify_security_guard(action: Annotated[str, Field(default='scan', description="Security action: 'scan' to inspect files or content for secret leaks, 'install_pre_commit' to install the automated git zero-leak hook.")] = 'scan', project_root: Annotated[str, Field(default='.', description='Target repository root to scan or install hook into (default: current directory).')] = '.', content: Annotated[str, Field(default='', description='Optional raw text string to scan for secrets in memory without scanning disk files.')] = '') -> str:

Source docstring:

Scans for credential and secret leaks or installs automated git pre-commit zero-leak guard.

create_mcp_server.estimate_token_cost

Kind: Nested function
Source: tzero/tzero_mcp.py:3540-3549

Signature:

def estimate_token_cost(text: Annotated[str, Field(default='', description='Raw text string to count tokens and calculate cost for.')] = '', project_root: Annotated[str, Field(default='.', description='Root directory of the repository to calculate workspace ROI savings for.')] = '.', tokens: Annotated[int, Field(default=0, description='Optional raw token count to calculate cost directly.')] = 0, export_agent_rules: Annotated[str, Field(default='', description="Optional format to export agent rules: 'cursorrules', 'clinerules', 'markdown', or empty for cost estimation only.")] = '') -> str:

Source docstring:

Calculates token counts, commercial provider pricing estimates, and developer ROI savings.

create_mcp_server.query_memory_store

Kind: Nested function
Source: tzero/tzero_mcp.py:3582-3594

Signature:

def query_memory_store(query: Annotated[str, Field(description='Entity name, concept, or search query to look up in the memory store.')], query_mode: Annotated[str, Field(default='semantic', description="Query strategy: 'semantic' for triple & relation lookup, 'causal_chain' for temporal cause-and-effect traces, 'minhash' for sub-microsecond entity similarity clusters.")] = 'semantic', project_root: Annotated[str, Field(default='.', description='Workspace root where memory store is located (default: current directory).')] = '.') -> str:

Source docstring:

Queries semantic triples, causal reasoning graphs, and similarity clusters from memory.

create_mcp_server.manage_memory_store

Kind: Nested function
Source: tzero/tzero_mcp.py:3628-3691

Signature:

def manage_memory_store(operation: Annotated[str, Field(default='list', description="Memory lifecycle operation: 'list' to show active memory stores, 'compress' to encode text into semantic triples, 'consolidate' to merge memory, 'export' to dump graph, 'reset' to clear all memory, 'delete' to remove a specific store.")] = 'list', content: Annotated[str, Field(default='', description="Text document or knowledge content to compress or store when operation is 'compress'.")] = '', store_name: Annotated[str, Field(default='default', description='Identifier of the target memory store to manage.')] = 'default', project_root: Annotated[str, Field(default='.', description='Workspace root where memory stores are managed (default: current directory).')] = '.') -> str:

Source docstring:

Manages the lifecycle of persistent semantic memory stores and knowledge graphs.

create_mcp_server.orchestrate_agent_swarm

Kind: Nested function
Source: tzero/tzero_mcp.py:3725-3752

Signature:

def orchestrate_agent_swarm(goal: Annotated[str, Field(description='High-level goal description, swarm proposal, or failing test traceback to heal.')], orchestration_mode: Annotated[str, Field(default='goal_execute', description="Orchestration mode: 'goal_execute' for autonomous goal planning and execution, 'swarm_consensus' for Byzantine fault-tolerant voting, 'self_healing' for AST error diagnosis and automated patching, 'dynamic_subagents' for dynamic task decomposition and on-the-fly subagent synthesis.")] = 'goal_execute', agents: Annotated[str, Field(default='', description="Comma-separated list of agent roles participating in swarm execution (e.g. 'architect,coder,tester').")] = '', project_root: Annotated[str, Field(default='.', description='Workspace root for swarm execution (default: current directory).')] = '.') -> str:

Source docstring:

Coordinates autonomous multi-agent swarms, goal execution, PBFT consensus, and self-healing.

create_mcp_server.superdesign_generate

Kind: Nested function
Source: tzero/tzero_mcp.py:3785-3801

Signature:

def superdesign_generate(prompt: Annotated[str, Field(description="Description of what design to create (e.g. 'modern developer platform dashboard with analytics').")], design_type: Annotated[str, Field(default='ui', description="Type of design: 'ui' (full responsive web app), 'wireframe' (monochrome wireframe), 'component' (modular component), 'logo' (SVG logo), or 'icon' (SVG icon).")] = 'ui', variations: Annotated[int, Field(default=3, description='Number of variations to generate (1 to 5, default 3).')] = 3, framework: Annotated[str, Field(default='html', description="Component framework: 'html', 'react', or 'vue'.")] = 'html', workspace_path: Annotated[str, Field(default='.', description='Workspace directory root for output files (default: current directory).')] = '.') -> str:

Source docstring:

Returns structured specifications for the AI coding agent to generate designs.

create_mcp_server.superdesign_iterate

Kind: Nested function
Source: tzero/tzero_mcp.py:3830-3844

Signature:

def superdesign_iterate(design_file: Annotated[str, Field(description='Path to the existing HTML, SVG, or component design file to iterate on.')], feedback: Annotated[str, Field(description="Improvement instructions or feedback to apply (e.g. 'Refine card contrast and add responsive navbar').")], variations: Annotated[int, Field(default=1, description='Number of new iterative variations to generate (1 to 5).')] = 1, workspace_path: Annotated[str, Field(default='.', description='Workspace root (default: current directory).')] = '.') -> str:

Source docstring:

Returns iteration instructions for the AI coding agent to refine existing designs.

create_mcp_server.superdesign_extract_system

Kind: Nested function
Source: tzero/tzero_mcp.py:3872-3884

Signature:

def superdesign_extract_system(input_path_or_description: Annotated[str, Field(description='Description of visual styling, theme requirements, or image path to extract tokens from.')], system_name: Annotated[str, Field(default='tzero_design_system', description='Identifier for the design system (saved to superdesign/design_system/<name>.json).')] = 'tzero_design_system', workspace_path: Annotated[str, Field(default='.', description='Workspace root (default: current directory).')] = '.') -> str:

Source docstring:

Extracts and saves structured design systems from screenshots or descriptions.

create_mcp_server.superdesign_list

Kind: Nested function
Source: tzero/tzero_mcp.py:3910-3916

Signature:

def superdesign_list(workspace_path: Annotated[str, Field(default='.', description='Workspace directory root (default: current directory).')] = '.') -> str:

Source docstring:

Lists all Superdesign iterations and design systems in the workspace.

create_mcp_server.superdesign_gallery

Kind: Nested function
Source: tzero/tzero_mcp.py:3942-3948

Signature:

def superdesign_gallery(workspace_path: Annotated[str, Field(default='.', description='Workspace directory root (default: current directory).')] = '.') -> str:

Source docstring:

Generates an interactive HTML gallery to preview all created designs.

create_mcp_server.sync_workspace_rules

Kind: Nested function
Source: tzero/tzero_mcp.py:3974-3989

Signature:

def sync_workspace_rules(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.') -> str:

Source docstring:

Synchronizes active codebase AST topologies and rules across Cursor, Claude, Windsurf, and Git hooks.

create_mcp_server.calculate_token_cost_roi

Kind: Nested function
Source: tzero/tzero_mcp.py:4015-4036

Signature:

def calculate_token_cost_roi(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.') -> str:

Source docstring:

Calculates token reduction and quantitative financial ROI across LLM providers.

create_mcp_server.analyze_instruction_drift

Kind: Nested function
Source: tzero/tzero_mcp.py:4062-4085

Signature:

def analyze_instruction_drift(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.') -> str:

Source docstring:

Measures instruction drift and architectural rule decay across the codebase.

create_mcp_server.build_ast_snapshot

Kind: Nested function
Source: tzero/tzero_mcp.py:4117-4133

Signature:

def build_ast_snapshot(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.', force_refresh: Annotated[bool, Field(default=False, description='Whether to force rebuild the cache even if valid (default: False).')] = False) -> str:

Source docstring:

Pre-computes and caches high-speed AST symbols and token metrics into persistent index.

create_mcp_server.heal_hallucinated_code

Kind: Nested function
Source: tzero/tzero_mcp.py:4161-4193

Signature:

def heal_hallucinated_code(code: Annotated[str, Field(description='Candidate Python code to inspect and repair.')], workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.') -> str:

Source docstring:

Statically inspects candidate code against workspace AST and repairs hallucinated symbols.

create_mcp_server.prove_zero_hallucination

Kind: Nested function
Source: tzero/tzero_mcp.py:4220-4249

Signature:

def prove_zero_hallucination(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.', export_docs: Annotated[bool, Field(default=True, description='Whether to write ZERO_HALLUCINATION_PROOF.md to docs/.')] = True) -> str:

Source docstring:

Executes the 60-scenario empirical zero-hallucination benchmark and returns proof report.

create_mcp_server.transpile_model_bridge

Kind: Nested function
Source: tzero/tzero_mcp.py:4277-4294

Signature:

def transpile_model_bridge(file_path: Annotated[str, Field(description='Path to Python file containing data models.')], target_lang: Annotated[str, Field(default='ts', description="Target language: 'ts', 'rust', 'go', or 'all' (default: 'ts').")] = 'ts') -> str:

Source docstring:

Transpiles Python @dataclass and Pydantic models into TypeScript, Rust, or Go schemas.

create_mcp_server.diagnose_and_heal_system

Kind: Nested function
Source: tzero/tzero_mcp.py:4328-4362

Signature:

def diagnose_and_heal_system(workspace_dir: Annotated[str, Field(default='.', description='Target repository root directory (default: current directory).')] = '.', auto_repair: Annotated[bool, Field(default=True, description='Whether to apply self-healing patches to disk (default: True).')] = True, dry_run: Annotated[bool, Field(default=False, description='Whether to preview repairs without writing to disk (default: False).')] = False) -> str:

Source docstring:

Diagnoses and automatically repairs environment misconfigurations, syntax errors, and orphaned caches.

create_mcp_server.generate_architectural_passport

Kind: Nested function
Source: tzero/tzero_mcp.py:4390-4405

Signature:

def generate_architectural_passport(file_path: Annotated[str, Field(description='Absolute or relative path to the Python source file to inspect.')]) -> str:

Source docstring:

Generates an ultra-dense AST architectural passport for prompt-ready LLM context grounding.

create_mcp_server.execute_codebase_workflow

Kind: Nested function
Source: tzero/tzero_mcp.py:4439-4814

Signature:

async def execute_codebase_workflow(action: Annotated[str, Field(default='auto', description="Workflow operation: 'auto' (comprehensive all-in-one pipeline), 'context', 'audit', 'security', 'blueprint', 'dependencies', 'impact', 'search', 'prune', 'heal', 'memory', 'swarm', 'design'.")] = 'auto', target: Annotated[str, Field(default='.', description="Target repository path, file path, diff string, or code snippet (default: '.').")] = '.', query: Annotated[str, Field(default='', description='Search query, focus symbol name, or task goal prompt.')] = '', options: Annotated[Union[str, Dict[str, Any]], Field(default='', description='Optional JSON string or dictionary of additional configuration parameters.')] = '', ctx: Optional[Context] = None) -> str:

Source docstring:

Autonomous all-in-one T-Zero master tool executing any codebase workflow in a single command.

create_mcp_server.run_local_ci

Kind: Nested function
Source: tzero/tzero_mcp.py:4816-4834

Signature:

def run_local_ci(quick: bool = False, auto_fix: bool = False, install_hook: bool = False, uninstall_hook: bool = False, project_root: str = '.') -> str:

Source docstring:

Executes T-Zero Local CI suite locally on the developer machine.

create_mcp_server.armor_against_ai_reverse_engineering

Kind: Nested function
Source: tzero/tzero_mcp.py:4836-4858

Signature:

def armor_against_ai_reverse_engineering(target: str = '.', output_path: str = '') -> str:

Source docstring:

Applies military-grade Anti-REA code and binary protection against AI reverse-engineering agents.

create_mcp_server.audit_ai_decompilation_resistance

Kind: Nested function
Source: tzero/tzero_mcp.py:4860-4883

Signature:

def audit_ai_decompilation_resistance(target: str = '.') -> str:

Source docstring:

Audits target code or binary for resistance against AI reverse engineering (0-100 score).

create_mcp_server.search_tools

Kind: Nested function
Source: tzero/tzero_mcp.py:4943-4995

Signature:

async def search_tools(query: Annotated[str, Field(default='', description="Keyword query (e.g., 'secret audit', 'pagerank', 'diff', 'merge').")] = '', category: Annotated[str, Field(default='all', description="Optional category filter: 'all', 'context', 'security', 'ast', 'memory', 'swarm', 'design'.")] = 'all', limit: Annotated[int, Field(default=10, description='Maximum number of matching tools to return (1-30).')] = 10) -> SearchToolsResult:

Source docstring:

Progressive tool discovery catalog across all T-Zero MCP tools.

create_mcp_server.search_tools._classify

Kind: Nested function
Source: tzero/tzero_mcp.py:4960-4972

Signature:

def _classify(t_name: str, summary: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.compatible_call_tool

Kind: Nested function
Source: tzero/tzero_mcp.py:5004-5033

Signature:

async def compatible_call_tool(name: str, arguments: dict, context = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_architecture

Kind: Nested function
Source: tzero/tzero_mcp.py:5045-5046

Signature:

def resource_architecture() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_boundaries

Kind: Nested function
Source: tzero/tzero_mcp.py:5054-5055

Signature:

def resource_boundaries() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_token_roi

Kind: Nested function
Source: tzero/tzero_mcp.py:5063-5064

Signature:

def resource_token_roi() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_polyglot_catalog

Kind: Nested function
Source: tzero/tzero_mcp.py:5072-5080

Signature:

def resource_polyglot_catalog() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_security_guard

Kind: Nested function
Source: tzero/tzero_mcp.py:5088-5089

Signature:

def resource_security_guard() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.tzero_grounding

Kind: Nested function
Source: tzero/tzero_mcp.py:5098-5107

Signature:

def tzero_grounding(project_root: str = '.') -> str:

Source docstring:

Returns grounding instructions for Cursor/Claude/Antigravity coding sessions.

create_mcp_server.tzero_refactor

Kind: Nested function
Source: tzero/tzero_mcp.py:5116-5124

Signature:

def tzero_refactor(symbol: str = '', project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.tzero_code_review

Kind: Nested function
Source: tzero/tzero_mcp.py:5133-5141

Signature:

def tzero_code_review(git_ref: str = 'HEAD~1', project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.tzero_architecture_audit

Kind: Nested function
Source: tzero/tzero_mcp.py:5150-5158

Signature:

def tzero_architecture_audit(project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.tzero_security_audit

Kind: Nested function
Source: tzero/tzero_mcp.py:5167-5175

Signature:

def tzero_security_audit(project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.tzero_token_optimizer

Kind: Nested function
Source: tzero/tzero_mcp.py:5184-5192

Signature:

def tzero_token_optimizer(project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_jarvis_plan

Kind: Nested function
Source: tzero/tzero_mcp.py:5203-5207

Signature:

def resource_jarvis_plan() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_jarvis_capabilities

Kind: Nested function
Source: tzero/tzero_mcp.py:5215-5218

Signature:

def resource_jarvis_capabilities() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_workspace_packed_context

Kind: Nested function
Source: tzero/tzero_mcp.py:5226-5232

Signature:

def resource_workspace_packed_context() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_workspace_changelog

Kind: Nested function
Source: tzero/tzero_mcp.py:5240-5245

Signature:

def resource_workspace_changelog() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.resource_file_skeleton

Kind: Nested function
Source: tzero/tzero_mcp.py:5253-5293

Signature:

def resource_file_skeleton(path: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.prompt_jarvis_workspace_copilot

Kind: Nested function
Source: tzero/tzero_mcp.py:5302-5314

Signature:

def prompt_jarvis_workspace_copilot(goal: str = '', project_root: str = '.') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.prompt_tzero_pack_budget

Kind: Nested function
Source: tzero/tzero_mcp.py:5320-5330

Signature:

def prompt_tzero_pack_budget(budget_tokens: str = '32000', focus_targets: str = '') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_mcp_server.prompt_tzero_commit_synthesizer

Kind: Nested function
Source: tzero/tzero_mcp.py:5336-5349

Signature:

def prompt_tzero_commit_synthesizer(target_scope: str = '') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

print_welcome_guide

Kind: Function
Source: tzero/tzero_mcp.py:5354-5404

Signature:

def print_welcome_guide():

Source docstring:

Print a friendly interactive explanation when run directly by a user in terminal.

create_http_app

Kind: Function
Source: tzero/tzero_mcp.py:5407-5416

Signature:

def create_http_app(mode: Optional[str] = None, host: str = '127.0.0.1') -> Any:

Source docstring:

Builds the MCP 2026 Streamable HTTP Starlette ASGI app (zero paid cloud deps).

_run_http_fallback

Kind: Function
Source: tzero/tzero_mcp.py:5419-5455

Signature:

def _run_http_fallback(server: Any, host: str, port: int) -> None:

Source docstring:

Runs streamable-http transport when uvicorn is unavailable, honoring host/port.

main

Kind: Function
Source: tzero/tzero_mcp.py:5458-5565

Signature:

def main():

Source docstring:

Main execution entrypoint for the T-Zero MCP stdio / Streamable HTTP server.

tzero/tzero_packer.py

Source: tzero/tzero_packer.py
Source size: 577 lines | 4 classes | 14 functions

Module docstring:


Siber Akademi — T-Zero Dynamic Context Window & Token Budget Packer.
Developer: [redacted] (Siber Akademi)
License: MIT

Solves the context window packing problem for LLMs: packs an entire repository or
focused subsystem into an EXACT token budget (e.g. 8k, 16k, 32k, 64k, 128k) using
multi-tier AST representations (T-1 Raw, T-2 Light, T-3 Ultra, T-4 Signature) and
greedy relevance-weighted knapsack optimization.

SymbolContext

Kind: Class
Source: tzero/tzero_packer.py:36-44

Declaration:

class SymbolContext:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SymbolContext.reduction_pct

Kind: Method
Source: tzero/tzero_packer.py:43-44

Signature:

def reduction_pct(self) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

pack_python_symbols

Kind: Function
Source: tzero/tzero_packer.py:47-111

Signature:

def pack_python_symbols(source: str, symbols: List[str], min_reduction: int = 95, encoding: str = 'o200k_base') -> SymbolContext:

Source docstring:

Extract complete Python definitions and enforce an exact BPE reduction floor.

pack_python_symbols.collect

Kind: Nested function
Source: tzero/tzero_packer.py:65-76

Signature:

def collect(node: ast.AST, scope: str = '') -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_common_prefix_length

Kind: Function
Source: tzero/tzero_packer.py:118-126

Signature:

def _common_prefix_length(left: bytes, right: bytes) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

encode_context_delta

Kind: Function
Source: tzero/tzero_packer.py:129-141

Signature:

def encode_context_delta(base: bytes, current: bytes) -> bytes:

Source docstring:

Store the changed middle of a context relative to a known base.

restore_context_delta

Kind: Function
Source: tzero/tzero_packer.py:144-158

Signature:

def restore_context_delta(base: bytes, delta: bytes) -> bytes:

Source docstring:

Restore exact context bytes and reject incompatible or corrupt deltas.

ModuleBudgetEntry

Kind: Class
Source: tzero/tzero_packer.py:162-173

Declaration:

class ModuleBudgetEntry:

Source docstring:

Represents a module with multi-tier representations and token counts.

PackResult

Kind: Class
Source: tzero/tzero_packer.py:177-187

Declaration:

class PackResult:

Source docstring:

Result of context budget packing.

TokenBudgetPacker

Kind: Class
Source: tzero/tzero_packer.py:190-556

Declaration:

class TokenBudgetPacker:

Source docstring:

Dynamically packs codebase AST tiers to fit an exact LLM token budget.

TokenBudgetPacker.estimate_tokens

Kind: Method
Source: tzero/tzero_packer.py:196-199

Signature:

def estimate_tokens(cls, text: str, model_name: str = 'gpt-4o') -> int:

Source docstring:

Exact cached BPE token counter for source code with deterministic char-ratio fallback.

TokenBudgetPacker.extract_t4_signatures

Kind: Method
Source: tzero/tzero_packer.py:202-214

Signature:

def extract_t4_signatures(cls, code: str, lang: Optional[str]) -> str:

Source docstring:

Extracts minimal one-line signature repomap (T-4).

TokenBudgetPacker._compute_centrality_scores

Kind: Method
Source: tzero/tzero_packer.py:217-251

Signature:

def _compute_centrality_scores(raw_files: List[Tuple[str, str, Optional[str], str]]) -> Dict[str, float]:

Source docstring:

Computes inbound import centrality across all workspace source files.

TokenBudgetPacker.scan_workspace

Kind: Method
Source: tzero/tzero_packer.py:254-322

Signature:

def scan_workspace(cls, workspace_dir: str, max_files: Optional[int] = None) -> List[ModuleBudgetEntry]:

Source docstring:

Scans workspace and prepares multi-tier representations prioritized by centrality.

TokenBudgetPacker.score_relevance

Kind: Method
Source: tzero/tzero_packer.py:325-353

Signature:

def score_relevance(cls, entries: List[ModuleBudgetEntry], focus: str = '') -> None:

Source docstring:

Assigns relevance scores to each file based on focus query and module centrality.

TokenBudgetPacker.pack

Kind: Method
Source: tzero/tzero_packer.py:356-483

Signature:

def pack(cls, workspace_dir: str = '.', budget_tokens: int = 16000, focus: str = '', max_files: Optional[int] = None, cache_aligned: bool = False) -> PackResult:

Source docstring:

Packs workspace files to fill budget_tokens with optimal AST tiers.

TokenBudgetPacker.render_bundle_markdown

Kind: Method
Source: tzero/tzero_packer.py:486-556

Signature:

def render_bundle_markdown(cls, packed_entries: List[ModuleBudgetEntry], budget: int, allocated_tokens: int, raw_total: int, focus: str, tier_counts: Dict[str, int], prefix_entries: Optional[List[ModuleBudgetEntry]] = None, cache_aligned: bool = False) -> str:

Source docstring:

Formats the unified AI context pack with manifest table and delimited code sections.

pack_workspace

Kind: Function
Source: tzero/tzero_packer.py:559-577

Signature:

def pack_workspace(workspace_dir: str = '.', budget_tokens: int = 16000, focus: str = '', out_file: Optional[str] = None, cache_aligned: bool = False) -> PackResult:

Source docstring:

Convenience helper to pack workspace context into a budget and optionally write to disk.

tzero/tzero_pipe.py

Source: tzero/tzero_pipe.py
Source size: 95 lines | 1 classes | 3 functions

Module docstring:

T-Zero CLI Stdin/Stdout Pipeline & Token Streaming Compressor.

Enables UNIX pipeline integration (e.g. `cat file.py | tzero --pipe` or `git diff | tzero --pipe`)
for instant terminal token compression and optional clipboard copy.

Developer: [redacted] (Siber Akademi)
Part of T-Zero Context Architect v7.0.0 Master Edition.

PipeCompressor

Kind: Class
Source: tzero/tzero_pipe.py:19-95

Declaration:

class PipeCompressor:

Source docstring:

Zero-latency streaming pipe compressor for UNIX pipelines and developer CLI tooling.

PipeCompressor.compress_stream

Kind: Method
Source: tzero/tzero_pipe.py:23-54

Signature:

def compress_stream(cls, content: str, filename_hint: str = '', tier: str = 'T-3') -> str:

Source docstring:

Compresses streaming code, diff, or schema content using best AST strategy.

PipeCompressor.run_cli_pipe

Kind: Method
Source: tzero/tzero_pipe.py:57-76

Signature:

def run_cli_pipe(cls, filename_hint: str = '', tier: str = 'T-3', copy_to_clipboard: bool = False):

Source docstring:

Reads stdin, compresses content, and writes to stdout / clipboard.

PipeCompressor._copy_clipboard

Kind: Method
Source: tzero/tzero_pipe.py:79-95

Signature:

def _copy_clipboard(text: str):

Source docstring:

Copies text to system clipboard safely using platform tools.

tzero/tzero_polyglot.py

Source: tzero/tzero_polyglot.py
Source size: 799 lines | 1 classes | 23 functions

Module docstring:

Siber Akademi T-Zero — Universal Polyglot AST Engine.

Provides zero-dependency, deterministic structural parsing and signature extraction
for Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/C#, and Solidity.
Prunes function/method bodies, loops, and implementation details down to signatures,
interfaces, structs, and declarations with up to 95% context token reduction.

Developer: [redacted] (Siber Akademi)
License: MIT

count_bpe_tokens

Kind: Function
Source: tzero/tzero_polyglot.py:23-44

Signature:

def count_bpe_tokens(text: str, model_name: str = 'gpt-4o', fallback_divisor: float = 4.0) -> int:

Source docstring:

Count tokens using cached local tiktoken BPE encodings with deterministic fallback.

PolyglotTokenReducer

Kind: Class
Source: tzero/tzero_polyglot.py:47-797

Declaration:

class PolyglotTokenReducer:

Source docstring:

Universal multi-language structural signature extractor.

PolyglotTokenReducer.has_tree_sitter

Kind: Method
Source: tzero/tzero_polyglot.py:71-79

Signature:

def has_tree_sitter(cls) -> bool:

Source docstring:

Returns True if optional tree-sitter library or any custom adapter is registered.

PolyglotTokenReducer.register_tree_sitter_adapter

Kind: Method
Source: tzero/tzero_polyglot.py:82-92

Signature:

def register_tree_sitter_adapter(cls, lang: str, adapter: Optional[Callable[[str, str, str], str]]) -> None:

Source docstring:

Registers or clears an optional tree-sitter reducer adapter for a language.

PolyglotTokenReducer._lexical_scan_lines

Kind: Method
Source: tzero/tzero_polyglot.py:95-158

Signature:

def _lexical_scan_lines(content: str) -> List[Tuple[str, int, int, int, int, bool]]:

Source docstring:

Scans lines ignoring strings (' " `) and comments (// /* */) for brace/paren counts.

PolyglotTokenReducer.chunk_code

Kind: Method
Source: tzero/tzero_polyglot.py:161-227

Signature:

def chunk_code(cls, content: str, filename: str = '', max_chunk_tokens: int = 400) -> List[str]:

Source docstring:

cAST-style semantic boundary chunker splitting only along AST/block boundaries.

PolyglotTokenReducer.detect_language

Kind: Method
Source: tzero/tzero_polyglot.py:230-236

Signature:

def detect_language(cls, filename: str) -> Optional[str]:

Source docstring:

Detect language from filename extension.

PolyglotTokenReducer._attach_light_doc_comments

Kind: Method
Source: tzero/tzero_polyglot.py:239-287

Signature:

def _attach_light_doc_comments(content: str, reduced: str) -> str:

Source docstring:

Preserves preceding doc-comments (/**, ///, #!) alongside declarations for T-2 light mode.

PolyglotTokenReducer.reduce_code

Kind: Method
Source: tzero/tzero_polyglot.py:290-328

Signature:

def reduce_code(cls, content: str, filename: str = '', mode: str = 'ultra') -> str:

Source docstring:

Prunes code content to its structural signatures based on detected language.

PolyglotTokenReducer.reduce_python

Kind: Method
Source: tzero/tzero_polyglot.py:331-420

Signature:

def reduce_python(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Python source via ast.parse (multiline-safe) with line fallback on SyntaxError.

PolyglotTokenReducer.reduce_python._emit_func

Kind: Function
Source: tzero/tzero_polyglot.py:339-365

Signature:

def _emit_func(fn_node: ast.AST, indent_prefix: str = '') -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotTokenReducer.reduce_javascript

Kind: Method
Source: tzero/tzero_polyglot.py:423-527

Signature:

def reduce_javascript(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces JavaScript/TypeScript source with string/comment-aware brace & multiline signature tracking.

PolyglotTokenReducer.reduce_rust

Kind: Method
Source: tzero/tzero_polyglot.py:530-554

Signature:

def reduce_rust(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Rust source code to use statements, traits, structs, enums, impls, and fn signatures.

PolyglotTokenReducer.reduce_go

Kind: Method
Source: tzero/tzero_polyglot.py:557-570

Signature:

def reduce_go(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Go source code to package, imports, types, interfaces, and func signatures.

PolyglotTokenReducer.reduce_cpp

Kind: Method
Source: tzero/tzero_polyglot.py:573-616

Signature:

def reduce_cpp(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces C/C++ source code to headers, classes, structs, templates, and prototypes.

PolyglotTokenReducer.reduce_java

Kind: Method
Source: tzero/tzero_polyglot.py:619-635

Signature:

def reduce_java(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Java/C# source code to packages, imports, classes, interfaces, records, and method signatures.

PolyglotTokenReducer.reduce_solidity

Kind: Method
Source: tzero/tzero_polyglot.py:638-655

Signature:

def reduce_solidity(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Solidity smart contracts to pragma, interfaces, contracts, structs, events, and function headers.

PolyglotTokenReducer.reduce_ruby

Kind: Method
Source: tzero/tzero_polyglot.py:658-674

Signature:

def reduce_ruby(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Ruby source code to module/class declarations, requires, mixins, and method signatures.

PolyglotTokenReducer.reduce_php

Kind: Method
Source: tzero/tzero_polyglot.py:677-693

Signature:

def reduce_php(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces PHP source code to namespace, imports, classes, interfaces, traits, and method signatures.

PolyglotTokenReducer.reduce_swift

Kind: Method
Source: tzero/tzero_polyglot.py:696-711

Signature:

def reduce_swift(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Swift source code to imports, protocols, classes, structs, enums, extensions, and func signatures.

PolyglotTokenReducer.reduce_kotlin

Kind: Method
Source: tzero/tzero_polyglot.py:714-729

Signature:

def reduce_kotlin(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Kotlin source code to package, imports, classes, interfaces, objects, and function headers.

PolyglotTokenReducer.reduce_dart

Kind: Method
Source: tzero/tzero_polyglot.py:732-752

Signature:

def reduce_dart(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Dart source code to imports, exports, classes, mixins, enums, and method signatures.

PolyglotTokenReducer.reduce_scala

Kind: Method
Source: tzero/tzero_polyglot.py:755-772

Signature:

def reduce_scala(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Scala source code to packages, imports, traits, objects, classes, and def headers.

PolyglotTokenReducer.reduce_elixir

Kind: Method
Source: tzero/tzero_polyglot.py:775-797

Signature:

def reduce_elixir(content: str, mode: str = 'ultra') -> str:

Source docstring:

Reduces Elixir source code to module headers, structs, specs, and function signatures.

tzero/tzero_rust_bridge.py

Source: tzero/tzero_rust_bridge.py
Source size: 1242 lines | 2 classes | 88 functions

Module docstring:

T-Zero Rust Core Bridge (ctypes / subprocess / PyO3 / WASM Agent Kernel Sandbox).

Bridges Python engines to `crates/tzero_core` and `crates/tzero_jarvis_core` compiled shared libraries
(`cdylib` via `ctypes` or `pyo3` native extension module) with an identical
pure-Python fallback when Rust binaries are not present on the host.

100% Free, Local, Offline, Zero-Leak Certified.

_repo_crate_dirs

Kind: Function
Source: tzero/tzero_rust_bridge.py:24-29

Signature:

def _repo_crate_dirs() -> List[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_repo_crate_dir

Kind: Function
Source: tzero/tzero_rust_bridge.py:32-37

Signature:

def _repo_crate_dir() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_fnv1a_64

Kind: Function
Source: tzero/tzero_rust_bridge.py:40-47

Signature:

def _pure_fnv1a_64(text: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_jaccard_shingles

Kind: Function
Source: tzero/tzero_rust_bridge.py:50-65

Signature:

def _pure_jaccard_shingles(a: str, b: str, ngram: int = 3) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_shannon_entropy

Kind: Function
Source: tzero/tzero_rust_bridge.py:68-81

Signature:

def _pure_shannon_entropy(data: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_scan_entropy_secrets

Kind: Function
Source: tzero/tzero_rust_bridge.py:84-108

Signature:

def _pure_scan_entropy_secrets(text: str, threshold: float = 4.75, min_length: int = 28) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_redact_entropy_secrets

Kind: Function
Source: tzero/tzero_rust_bridge.py:111-130

Signature:

def _pure_redact_entropy_secrets(text: str, threshold: float = 4.4) -> Tuple[str, int]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_redact_entropy_secrets._replace_entropy

Kind: Function
Source: tzero/tzero_rust_bridge.py:119-125

Signature:

def _replace_entropy(m):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_prune_ast

Kind: Function
Source: tzero/tzero_rust_bridge.py:133-148

Signature:

def _pure_prune_ast(code: str, language: str = 'python') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_prune_ast_stats

Kind: Function
Source: tzero/tzero_rust_bridge.py:151-162

Signature:

def _pure_prune_ast_stats(code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_count_bpe_tokens

Kind: Function
Source: tzero/tzero_rust_bridge.py:165-170

Signature:

def _pure_count_bpe_tokens(text: str, model_name: str = 'gpt-4o') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_tokenize_code

Kind: Function
Source: tzero/tzero_rust_bridge.py:173-177

Signature:

def _pure_tokenize_code(text: str) -> List[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_bm25_search

Kind: Function
Source: tzero/tzero_rust_bridge.py:180-234

Signature:

def _pure_bm25_search(documents: List[Dict[str, str]], query: str, top_k: int = 10, k1: float = 1.2, b: float = 0.75) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_extract_symbols

Kind: Function
Source: tzero/tzero_rust_bridge.py:237-254

Signature:

def _pure_extract_symbols(path: str, content: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_calculate_cyclomatic_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:257-269

Signature:

def _pure_calculate_cyclomatic_complexity(code: str, language: str = 'python') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_calculate_cognitive_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:272-290

Signature:

def _pure_calculate_cognitive_complexity(code: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_analyze_file_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:293-316

Signature:

def _pure_analyze_file_complexity(path: str, code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_compute_pagerank

Kind: Function
Source: tzero/tzero_rust_bridge.py:319-375

Signature:

def _pure_compute_pagerank(edges: List[Dict[str, Any]], damping: float = 0.85, max_iter: int = 100, tolerance: float = 1e-06) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_analyze_reachability

Kind: Function
Source: tzero/tzero_rust_bridge.py:378-424

Signature:

def _pure_analyze_reachability(symbols: List[Dict[str, Any]], invocations: List[Tuple[str, str]], entrypoints: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_compare_api_contracts

Kind: Function
Source: tzero/tzero_rust_bridge.py:427-459

Signature:

def _pure_compare_api_contracts(old_code: str, new_code: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_find_code_duplicity

Kind: Function
Source: tzero/tzero_rust_bridge.py:462-500

Signature:

def _pure_find_code_duplicity(files: List[Tuple[str, str]], min_lines: int = 6) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_damerau_levenshtein

Kind: Function
Source: tzero/tzero_rust_bridge.py:503-524

Signature:

def _pure_damerau_levenshtein(s1: str, s2: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_fuzzy_similarity

Kind: Function
Source: tzero/tzero_rust_bridge.py:527-532

Signature:

def _pure_fuzzy_similarity(s1: str, s2: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_fuzzy_symbol_search

Kind: Function
Source: tzero/tzero_rust_bridge.py:535-551

Signature:

def _pure_fuzzy_symbol_search(query: str, candidates: List[str], min_similarity: float = 0.6, top_k: int = 5) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_build_context_tree

Kind: Function
Source: tzero/tzero_rust_bridge.py:554-595

Signature:

def _pure_build_context_tree(root_dir: str, tier: int = 3) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_enforce_boundaries

Kind: Function
Source: tzero/tzero_rust_bridge.py:598-658

Signature:

def _pure_enforce_boundaries(edges: List[Tuple[str, str]], banned: Optional[List[str]] = None) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_enforce_boundaries.dfs

Kind: Nested function
Source: tzero/tzero_rust_bridge.py:632-644

Signature:

def dfs(node):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_verify_hallucinations

Kind: Function
Source: tzero/tzero_rust_bridge.py:661-706

Signature:

def _pure_verify_hallucinations(code: str, valid_symbols: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_pure_estimate_costs

Kind: Function
Source: tzero/tzero_rust_bridge.py:709-750

Signature:

def _pure_estimate_costs(raw_tokens: int, pruned_tokens: int, output_tokens: int = 2000, model: str = 'gpt-4o') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge

Kind: Class
Source: tzero/tzero_rust_bridge.py:753-1052

Declaration:

class RustCoreBridge:

Source docstring:

Adaptive FFI/subprocess/PyO3 bridge to crates/tzero_core with pure-Python fallback.

RustCoreBridge.__init__

Kind: Method
Source: tzero/tzero_rust_bridge.py:756-768

Signature:

def __init__(self, prefer_native: bool = True) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge._try_load_cdylib

Kind: Method
Source: tzero/tzero_rust_bridge.py:771-802

Signature:

def _try_load_cdylib(cls) -> Optional[Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge._try_load_pyo3

Kind: Method
Source: tzero/tzero_rust_bridge.py:805-845

Signature:

def _try_load_pyo3(cls) -> Optional[Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge._find_native_binary

Kind: Method
Source: tzero/tzero_rust_bridge.py:848-855

Signature:

def _find_native_binary(cls) -> Optional[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.backend

Kind: Method
Source: tzero/tzero_rust_bridge.py:857-864

Signature:

def backend(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.is_native_available

Kind: Method
Source: tzero/tzero_rust_bridge.py:866-867

Signature:

def is_native_available(self) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.fnv1a_hash

Kind: Method
Source: tzero/tzero_rust_bridge.py:869-875

Signature:

def fnv1a_hash(self, text: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.shingle_similarity

Kind: Method
Source: tzero/tzero_rust_bridge.py:877-886

Signature:

def shingle_similarity(self, a: str, b: str, ngram: int = 3) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.calculate_entropy

Kind: Method
Source: tzero/tzero_rust_bridge.py:888-894

Signature:

def calculate_entropy(self, text: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.scan_entropy_secrets

Kind: Method
Source: tzero/tzero_rust_bridge.py:896-904

Signature:

def scan_entropy_secrets(self, text: str, threshold: float = 4.75, min_length: int = 28) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.redact_entropy_secrets

Kind: Method
Source: tzero/tzero_rust_bridge.py:906-910

Signature:

def redact_entropy_secrets(self, text: str, threshold: float = 4.4) -> Tuple[str, int]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.prune_ast

Kind: Method
Source: tzero/tzero_rust_bridge.py:912-915

Signature:

def prune_ast(self, code: str, language: str = 'python') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.prune_ast_stats

Kind: Method
Source: tzero/tzero_rust_bridge.py:917-922

Signature:

def prune_ast_stats(self, code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.count_bpe_tokens

Kind: Method
Source: tzero/tzero_rust_bridge.py:924-927

Signature:

def count_bpe_tokens(self, text: str, model_name: str = 'gpt-4o') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.bm25_search

Kind: Method
Source: tzero/tzero_rust_bridge.py:929-937

Signature:

def bm25_search(self, documents: List[Dict[str, str]], query: str, top_k: int = 10) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.extract_symbols

Kind: Method
Source: tzero/tzero_rust_bridge.py:939-944

Signature:

def extract_symbols(self, path: str, content: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.calculate_cyclomatic_complexity

Kind: Method
Source: tzero/tzero_rust_bridge.py:946-949

Signature:

def calculate_cyclomatic_complexity(self, code: str, language: str = 'python') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.calculate_cognitive_complexity

Kind: Method
Source: tzero/tzero_rust_bridge.py:951-954

Signature:

def calculate_cognitive_complexity(self, code: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.analyze_file_complexity

Kind: Method
Source: tzero/tzero_rust_bridge.py:956-961

Signature:

def analyze_file_complexity(self, path: str, code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.compute_pagerank

Kind: Method
Source: tzero/tzero_rust_bridge.py:963-971

Signature:

def compute_pagerank(self, edges: List[Dict[str, Any]], damping: float = 0.85, max_iter: int = 100) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.analyze_reachability

Kind: Method
Source: tzero/tzero_rust_bridge.py:973-983

Signature:

def analyze_reachability(self, symbols: List[Dict[str, Any]], invocations: List[Tuple[str, str]], entrypoints: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.compare_api_contracts

Kind: Method
Source: tzero/tzero_rust_bridge.py:985-990

Signature:

def compare_api_contracts(self, old_code: str, new_code: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.find_code_duplicity

Kind: Method
Source: tzero/tzero_rust_bridge.py:992-997

Signature:

def find_code_duplicity(self, files: List[Tuple[str, str]], min_lines: int = 6) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.damerau_levenshtein

Kind: Method
Source: tzero/tzero_rust_bridge.py:999-1002

Signature:

def damerau_levenshtein(self, s1: str, s2: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.fuzzy_similarity

Kind: Method
Source: tzero/tzero_rust_bridge.py:1004-1007

Signature:

def fuzzy_similarity(self, s1: str, s2: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.fuzzy_symbol_search

Kind: Method
Source: tzero/tzero_rust_bridge.py:1009-1018

Signature:

def fuzzy_symbol_search(self, query: str, candidates: List[str], min_similarity: float = 0.6, top_k: int = 5) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.build_context_tree

Kind: Method
Source: tzero/tzero_rust_bridge.py:1020-1025

Signature:

def build_context_tree(self, root_dir: str, tier: int = 3) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.enforce_boundaries

Kind: Method
Source: tzero/tzero_rust_bridge.py:1027-1032

Signature:

def enforce_boundaries(self, edges: List[Tuple[str, str]], banned: Optional[List[str]] = None) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.verify_hallucinations

Kind: Method
Source: tzero/tzero_rust_bridge.py:1034-1039

Signature:

def verify_hallucinations(self, code: str, valid_symbols: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

RustCoreBridge.estimate_costs

Kind: Method
Source: tzero/tzero_rust_bridge.py:1041-1052

Signature:

def estimate_costs(self, raw_tokens: int, pruned_tokens: int, output_tokens: int = 2000, model: str = 'gpt-4o') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

get_bridge

Kind: Function
Source: tzero/tzero_rust_bridge.py:1058-1062

Signature:

def get_bridge() -> RustCoreBridge:

Source docstring: none; consult the linked implementation instead of inferring behavior.

calculate_shannon_entropy

Kind: Function
Source: tzero/tzero_rust_bridge.py:1065-1066

Signature:

def calculate_shannon_entropy(data: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

scan_entropy_secrets

Kind: Function
Source: tzero/tzero_rust_bridge.py:1069-1074

Signature:

def scan_entropy_secrets(text: str, threshold: float = 4.75, min_length: int = 28) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

redact_entropy_secrets

Kind: Function
Source: tzero/tzero_rust_bridge.py:1077-1078

Signature:

def redact_entropy_secrets(text: str, threshold: float = 4.4) -> Tuple[str, int]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

prune_ast

Kind: Function
Source: tzero/tzero_rust_bridge.py:1081-1082

Signature:

def prune_ast(code: str, language: str = 'python') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

prune_ast_stats

Kind: Function
Source: tzero/tzero_rust_bridge.py:1085-1086

Signature:

def prune_ast_stats(code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

count_bpe_tokens

Kind: Function
Source: tzero/tzero_rust_bridge.py:1089-1090

Signature:

def count_bpe_tokens(text: str, model_name: str = 'gpt-4o') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

fnv1a_hash

Kind: Function
Source: tzero/tzero_rust_bridge.py:1093-1094

Signature:

def fnv1a_hash(text: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

shingle_similarity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1097-1098

Signature:

def shingle_similarity(a: str, b: str, ngram: int = 3) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

is_native_available

Kind: Function
Source: tzero/tzero_rust_bridge.py:1101-1102

Signature:

def is_native_available() -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

backend

Kind: Function
Source: tzero/tzero_rust_bridge.py:1105-1106

Signature:

def backend() -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

calculate_cyclomatic_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1109-1110

Signature:

def calculate_cyclomatic_complexity(code: str, language: str = 'python') -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

calculate_cognitive_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1113-1114

Signature:

def calculate_cognitive_complexity(code: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

analyze_file_complexity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1117-1118

Signature:

def analyze_file_complexity(path: str, code: str, language: str = 'python') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

compute_pagerank

Kind: Function
Source: tzero/tzero_rust_bridge.py:1121-1122

Signature:

def compute_pagerank(edges: List[Dict[str, Any]], damping: float = 0.85, max_iter: int = 100) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

analyze_reachability

Kind: Function
Source: tzero/tzero_rust_bridge.py:1125-1130

Signature:

def analyze_reachability(symbols: List[Dict[str, Any]], invocations: List[Tuple[str, str]], entrypoints: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

compare_api_contracts

Kind: Function
Source: tzero/tzero_rust_bridge.py:1133-1134

Signature:

def compare_api_contracts(old_code: str, new_code: str) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

find_code_duplicity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1137-1138

Signature:

def find_code_duplicity(files: List[Tuple[str, str]], min_lines: int = 6) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

damerau_levenshtein

Kind: Function
Source: tzero/tzero_rust_bridge.py:1141-1142

Signature:

def damerau_levenshtein(s1: str, s2: str) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

fuzzy_similarity

Kind: Function
Source: tzero/tzero_rust_bridge.py:1145-1146

Signature:

def fuzzy_similarity(s1: str, s2: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

fuzzy_symbol_search

Kind: Function
Source: tzero/tzero_rust_bridge.py:1149-1155

Signature:

def fuzzy_symbol_search(query: str, candidates: List[str], min_similarity: float = 0.6, top_k: int = 5) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

build_context_tree

Kind: Function
Source: tzero/tzero_rust_bridge.py:1158-1159

Signature:

def build_context_tree(root_dir: str, tier: int = 3) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

enforce_boundaries

Kind: Function
Source: tzero/tzero_rust_bridge.py:1162-1163

Signature:

def enforce_boundaries(edges: List[Tuple[str, str]], banned: Optional[List[str]] = None) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

verify_hallucinations

Kind: Function
Source: tzero/tzero_rust_bridge.py:1166-1167

Signature:

def verify_hallucinations(code: str, valid_symbols: List[str]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

estimate_costs

Kind: Function
Source: tzero/tzero_rust_bridge.py:1170-1176

Signature:

def estimate_costs(raw_tokens: int, pruned_tokens: int, output_tokens: int = 2000, model: str = 'gpt-4o') -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AgentKernelSandbox

Kind: Class
Source: tzero/tzero_rust_bridge.py:1179-1228

Declaration:

class AgentKernelSandbox:

Source docstring:

Zero-network WASM/capability validator for autonomous T-Zero agent kernel tasks.

AgentKernelSandbox.__init__

Kind: Method
Source: tzero/tzero_rust_bridge.py:1182-1184

Signature:

def __init__(self, workspace_dir: str = '.') -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AgentKernelSandbox.detect_wasm_runtime

Kind: Method
Source: tzero/tzero_rust_bridge.py:1186-1190

Signature:

def detect_wasm_runtime(self) -> Optional[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AgentKernelSandbox.validate_execution_plan

Kind: Method
Source: tzero/tzero_rust_bridge.py:1192-1228

Signature:

def validate_execution_plan(self, plan: Dict[str, Any]) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_agent_kernel_cli

Kind: Function
Source: tzero/tzero_rust_bridge.py:1231-1242

Signature:

def run_agent_kernel_cli(workspace_dir: str = '.') -> int:

Source docstring:

Runs Agent Kernel Sandbox capability manifest & validation check.

tzero/tzero_snapshot.py

Source: tzero/tzero_snapshot.py
Source size: 471 lines | 3 classes | 13 functions

Module docstring:


Siber Akademi — T-Zero Sub-10ms AST Context Snapshot Engine.
Developer: [redacted] (Siber Akademi)
License: MIT

Pre-computes and caches high-speed AST symbols, module dependency graphs,
and token metrics in .tzero/snapshot.json.
Enables sub-8ms context ingestion on repositories with 10,000+ files.

FileSnapshot

Kind: Class
Source: tzero/tzero_snapshot.py:28-38

Declaration:

class FileSnapshot:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotResult

Kind: Class
Source: tzero/tzero_snapshot.py:42-50

Declaration:

class SnapshotResult:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine

Kind: Class
Source: tzero/tzero_snapshot.py:53-470

Declaration:

class SnapshotEngine:

Source docstring:

Enterprise-grade AST Context Snapshot Engine for instant sub-8ms context queries.

SnapshotEngine.get_cache_path

Kind: Method
Source: tzero/tzero_snapshot.py:65-68

Signature:

def get_cache_path(cls, workspace_dir: str, custom_path: Optional[str] = None) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine.get_sqlite_path

Kind: Method
Source: tzero/tzero_snapshot.py:71-74

Signature:

def get_sqlite_path(cls, workspace_dir: str, custom_path: Optional[str] = None) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine._parse_file_snapshot

Kind: Method
Source: tzero/tzero_snapshot.py:77-158

Signature:

def _parse_file_snapshot(cls, fpath: str, abs_root: str) -> Optional[FileSnapshot]:

Source docstring:

Parses a single source file (Python AST or Polyglot lexical engine) into a FileSnapshot.

SnapshotEngine._discover_workspace_files

Kind: Method
Source: tzero/tzero_snapshot.py:161-173

Signature:

def _discover_workspace_files(cls, abs_root: str) -> Dict[str, Tuple[str, os.stat_result]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine.detect_git_changed_files

Kind: Method
Source: tzero/tzero_snapshot.py:176-195

Signature:

def detect_git_changed_files(cls, workspace_dir: str) -> List[str]:

Source docstring:

Returns normalized relative paths changed or untracked according to git.

SnapshotEngine._save_snapshot

Kind: Method
Source: tzero/tzero_snapshot.py:198-247

Signature:

def _save_snapshot(cls, res: SnapshotResult, cache_file: Optional[str] = None) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine.create_snapshot

Kind: Method
Source: tzero/tzero_snapshot.py:250-280

Signature:

def create_snapshot(cls, workspace_dir: str, cache_file: Optional[str] = None) -> SnapshotResult:

Source docstring:

Parses workspace files across all supported languages and saves JSON + SQLite snapshot.

SnapshotEngine.update_incremental

Kind: Method
Source: tzero/tzero_snapshot.py:283-341

Signature:

def update_incremental(cls, workspace_dir: str, changed_files: Optional[List[str]] = None) -> Tuple[SnapshotResult, Dict[str, int]]:

Source docstring:

Incrementally updates SQLite/JSON snapshot by reparsing only added or changed files.

SnapshotEngine.load_snapshot

Kind: Method
Source: tzero/tzero_snapshot.py:344-415

Signature:

def load_snapshot(cls, workspace_dir: str, cache_file: Optional[str] = None) -> Optional[SnapshotResult]:

Source docstring:

Loads existing snapshot from SQLite store first, falling back to JSON.

SnapshotEngine.is_valid

Kind: Method
Source: tzero/tzero_snapshot.py:418-431

Signature:

def is_valid(cls, snapshot: SnapshotResult, workspace_dir: str) -> bool:

Source docstring:

Verifies across all tracked and discovered files whether snapshot matches disk.

SnapshotEngine.get_or_create

Kind: Method
Source: tzero/tzero_snapshot.py:434-445

Signature:

def get_or_create(cls, workspace_dir: str, force_refresh: bool = False) -> Tuple[SnapshotResult, bool]:

Source docstring:

Returns (snapshot, was_cached). Uses incremental update when stale instead of full rebuild.

SnapshotEngine.to_dict

Kind: Method
Source: tzero/tzero_snapshot.py:448-458

Signature:

def to_dict(cls, result: SnapshotResult) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

SnapshotEngine.render_cli

Kind: Method
Source: tzero/tzero_snapshot.py:461-470

Signature:

def render_cli(cls, res: SnapshotResult, was_cached: bool = False):

Source docstring: none; consult the linked implementation instead of inferring behavior.

tzero/tzero_stubs.py

Source: tzero/tzero_stubs.py
Source size: 313 lines | 1 classes | 8 functions

Module docstring:


Siber Akademi — T-Zero AST Type Stub & Interface (.pyi) Generator.
Developer: [redacted] (Siber Akademi)
License: AGPL-3.0-only

Extracts ultra-compact, type-safe Python interface stubs (.pyi) directly from
AST syntax trees. Replaces function/method implementations with `...`, preserves
all type hints, decorators, class hierarchies, and infers missing types from
default parameter values. Delivers 90-95% token reduction for agent context ingestion.

_infer_type_from_ast_node

Kind: Function
Source: tzero/tzero_stubs.py:29-55

Signature:

def _infer_type_from_ast_node(node: Optional[ast.AST]) -> Optional[str]:

Source docstring:

Infers a type string from a literal AST constant or default value.

TypeStubGenerator

Kind: Class
Source: tzero/tzero_stubs.py:58-313

Declaration:

class TypeStubGenerator:

Source docstring:

Enterprise-grade AST type stub (.pyi) extractor and interface generator.

TypeStubGenerator.generate_stub_from_code

Kind: Method
Source: tzero/tzero_stubs.py:62-113

Signature:

def generate_stub_from_code(cls, code: str, file_path: str = '') -> str:

Source docstring:

Parses Python source code and returns a clean, PEP-484 compliant .pyi stub.

TypeStubGenerator._format_class

Kind: Method
Source: tzero/tzero_stubs.py:116-157

Signature:

def _format_class(cls, node: ast.ClassDef, lines: List[str], indent: str = ''):

Source docstring:

Formats a class declaration and its methods into stub representation.

TypeStubGenerator._format_function

Kind: Method
Source: tzero/tzero_stubs.py:160-183

Signature:

def _format_function(cls, node: Any, lines: List[str], indent: str = ''):

Source docstring:

Formats a function or method into a PEP-484 stub signature with ellipsis.

TypeStubGenerator._format_arguments

Kind: Method
Source: tzero/tzero_stubs.py:186-231

Signature:

def _format_arguments(cls, args: ast.arguments) -> str:

Source docstring:

Formats ast.arguments with type annotations and inferred defaults.

TypeStubGenerator._fallback_regex_stub

Kind: Method
Source: tzero/tzero_stubs.py:234-243

Signature:

def _fallback_regex_stub(cls, code: str) -> str:

Source docstring:

Regex-based fallback for unparseable syntax.

TypeStubGenerator.generate_stub_file

Kind: Method
Source: tzero/tzero_stubs.py:246-260

Signature:

def generate_stub_file(cls, src_path: str, dst_path: Optional[str] = None) -> Tuple[str, int, int, float]:

Source docstring:

Generates a .pyi stub for a single file on disk and returns metrics.

TypeStubGenerator.generate_workspace_stubs

Kind: Method
Source: tzero/tzero_stubs.py:263-313

Signature:

def generate_workspace_stubs(cls, workspace_dir: str = '.', output_dir: Optional[str] = None) -> Dict[str, Any]:

Source docstring:

Recursively generates .pyi type stubs across a project workspace.

tzero/tzero_terminal.py

Source: tzero/tzero_terminal.py
Source size: 366 lines | 1 classes | 16 functions

Module docstring:

T-Zero Universal Terminal & Console Output Manager.

Ensures crystal-clear console rendering across Windows CMD (cmd.exe),
PowerShell, Windows Terminal, macOS Terminal, Linux VT100/xterm, and IDE consoles.

Key Capabilities:
1. Enables VT100 Virtual Terminal Processing (ENABLE_VIRTUAL_TERMINAL_PROCESSING)
   on Windows conhost so ANSI escape sequences render colors rather than raw '←[1;36m'.
2. Sets console code pages to UTF-8 (65001) on Windows.
3. Transparently sanitizes Supplementary Multilingual Plane (SMP) emojis
   (> U+FFFF, such as 👉, 💡, 🚀, 🐦, 🔴, etc.) into clean, beautiful BMP
   or ASCII equivalents when running in legacy Windows CMD where standard fonts
   fail to render them and show ''.
4. Strips ANSI escape sequences cleanly when stdout is redirected to a pipe/file
   or when ANSI color is not supported by the environment.

Developer: [redacted] (Siber Akademi)
License: AGPL-3.0-only
Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm

enable_windows_vt100

Kind: Function
Source: tzero/tzero_terminal.py:124-182

Signature:

def enable_windows_vt100() -> bool:

Source docstring:

Enables Virtual Terminal Processing (VT100) on Windows console handles.

supports_ansi

Kind: Function
Source: tzero/tzero_terminal.py:185-216

Signature:

def supports_ansi(stream: Optional[TextIO] = None) -> bool:

Source docstring:

Determines whether the given stream supports ANSI escape sequences.

supports_emojis

Kind: Function
Source: tzero/tzero_terminal.py:219-236

Signature:

def supports_emojis() -> bool:

Source docstring:

Determines whether the active terminal can properly render SMP 4-byte emojis.

strip_ansi

Kind: Function
Source: tzero/tzero_terminal.py:239-241

Signature:

def strip_ansi(text: str) -> str:

Source docstring:

Removes all ANSI escape codes from string.

sanitize_terminal_text

Kind: Function
Source: tzero/tzero_terminal.py:244-266

Signature:

def sanitize_terminal_text(text: str, allow_ansi: Optional[bool] = None, allow_emojis: Optional[bool] = None) -> str:

Source docstring:

Formats text for terminal display, falling back gracefully where unsupported.

TZeroTerminalStream

Kind: Class
Source: tzero/tzero_terminal.py:269-312

Declaration:

class TZeroTerminalStream(io.TextIOBase):

Source docstring:

Transparent TextIO proxy that filters ANSI sequences and SMP emojis on the fly.

TZeroTerminalStream.__init__

Kind: Method
Source: tzero/tzero_terminal.py:272-274

Signature:

def __init__(self, wrapped_stream: TextIO, is_stderr: bool = False):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.write

Kind: Method
Source: tzero/tzero_terminal.py:276-285

Signature:

def write(self, s: Any) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.flush

Kind: Method
Source: tzero/tzero_terminal.py:287-291

Signature:

def flush(self) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.isatty

Kind: Method
Source: tzero/tzero_terminal.py:293-294

Signature:

def isatty(self) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.fileno

Kind: Method
Source: tzero/tzero_terminal.py:296-297

Signature:

def fileno(self) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.encoding

Kind: Method
Source: tzero/tzero_terminal.py:300-301

Signature:

def encoding(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.errors

Kind: Method
Source: tzero/tzero_terminal.py:304-305

Signature:

def errors(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.buffer

Kind: Method
Source: tzero/tzero_terminal.py:308-309

Signature:

def buffer(self) -> Any:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TZeroTerminalStream.__getattr__

Kind: Method
Source: tzero/tzero_terminal.py:311-312

Signature:

def __getattr__(self, name: str) -> Any:

Source docstring: none; consult the linked implementation instead of inferring behavior.

init_terminal

Kind: Function
Source: tzero/tzero_terminal.py:315-350

Signature:

def init_terminal(wrap_streams: bool = True) -> None:

Source docstring:

Initializes Windows VT100 mode and installs transparent terminal stream wrappers.

tzero_print

Kind: Function
Source: tzero/tzero_terminal.py:353-362

Signature:

def tzero_print(*args: Any, **kwargs: Any) -> None:

Source docstring:

Safe print helper that automatically formats text for the current terminal.

tzero/tzero_tui.py

Source: tzero/tzero_tui.py
Source size: 531 lines | 1 classes | 9 functions

Module docstring:


Siber Akademi — T-Zero Terminal User Interface (TUI) & Live Cockpit.
Developer: [redacted] (Siber Akademi)
License: MIT

Pure standard-library ANSI terminal dashboard and interactive executive cockpit.
Provides live workspace token metrics, AST compression meters, zero-leak security
auditing, and instantaneous action triggers without any external GUI dependencies.

TZeroTerminalCockpit

Kind: Class
Source: tzero/tzero_tui.py:30-508

Declaration:

class TZeroTerminalCockpit:

Source docstring:

Zero-dependency, high-density terminal dashboard and interactive cockpit.

TZeroTerminalCockpit.gather_workspace_metrics

Kind: Method
Source: tzero/tzero_tui.py:47-116

Signature:

def gather_workspace_metrics(cls, workspace_dir: str = '.') -> Dict[str, Any]:

Source docstring:

Scans workspace and compiles metrics for the terminal cockpit.

TZeroTerminalCockpit.render_gauge

Kind: Method
Source: tzero/tzero_tui.py:119-124

Signature:

def render_gauge(cls, percentage: float, width: int = 24) -> str:

Source docstring:

Renders an ANSI progress bar gauge.

TZeroTerminalCockpit.visual_width

Kind: Method
Source: tzero/tzero_tui.py:146-163

Signature:

def visual_width(cls, text: str) -> int:

Source docstring:

Computes monospace display cell width of text, handling ANSI and emojis.

TZeroTerminalCockpit._box_line

Kind: Method
Source: tzero/tzero_tui.py:166-170

Signature:

def _box_line(cls, content: str, inner_width: int = 78) -> str:

Source docstring:

Wraps content with box borders with exact column padding.

TZeroTerminalCockpit.render_cockpit

Kind: Method
Source: tzero/tzero_tui.py:173-229

Signature:

def render_cockpit(cls, metrics: Dict[str, Any], selected_index: Optional[int] = 0) -> str:

Source docstring:

Constructs high-density ASCII / ANSI terminal cockpit screen with exact border alignment.

TZeroTerminalCockpit._read_key

Kind: Method
Source: tzero/tzero_tui.py:232-298

Signature:

def _read_key(cls) -> str:

Source docstring:

Reads a single keystroke cross-platform supporting arrow keys.

TZeroTerminalCockpit.execute_action

Kind: Method
Source: tzero/tzero_tui.py:301-420

Signature:

def execute_action(cls, choice: str, workspace_dir: str = '.') -> bool:

Source docstring:

Dispatches action for a choice string. Returns False if exiting, True otherwise.

TZeroTerminalCockpit.run_interactive

Kind: Method
Source: tzero/tzero_tui.py:423-508

Signature:

def run_interactive(cls, workspace_dir: str = '.'):

Source docstring:

Runs the interactive loop in the user terminal with smooth wrap-around navigation.

main

Kind: Function
Source: tzero/tzero_tui.py:511-527

Signature:

def main():

Source docstring:

CLI entrypoint for standalone cockpit execution.

tzero/tzero_turbo.py

Source: tzero/tzero_turbo.py
Source size: 264 lines | 3 classes | 14 functions

Module docstring:


Siber Akademi — T-Zero Turbo Overdrive & Adaptive Burst Accelerator ("Kamçılama Modu").
Developer: [redacted] (Siber Akademi)
License: AGPL-3.0-only

Dynamically senses codebase processing latency. Whenever AST parsing, context
generation, or file walks start to slow down (>150ms or high file volume),
the Turbo Overdrive Engine ("Kamçılama Modu") triggers automatically:
  1. Multi-Core Dynamic Parallelism: Spawns (CPU_CORES * 2) concurrent workers.
  2. Sub-Millisecond mtime & Hash Fast-Path Cache: Avoids redundant re-parsing.
  3. Giant-File Streaming Slicer: Uses C-speed line scanner for massive files (>100KB).
  4. Zero-Leak & Zero-Regression Guarantee: 100% thread-safe in-memory cache.

CacheEntry

Kind: Class
Source: tzero/tzero_turbo.py:33-39

Declaration:

class CacheEntry:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboMetrics

Kind: Class
Source: tzero/tzero_turbo.py:43-50

Declaration:

class TurboMetrics:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator

Kind: Class
Source: tzero/tzero_turbo.py:53-259

Declaration:

class TurboOverdriveAccelerator:

Source docstring:

Enterprise adaptive latency sensor & burst acceleration engine ("Kamçılama Modu").

TurboOverdriveAccelerator.__init__

Kind: Method
Source: tzero/tzero_turbo.py:63-68

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.get_instance

Kind: Method
Source: tzero/tzero_turbo.py:71-76

Signature:

def get_instance(cls) -> TurboOverdriveAccelerator:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.metrics

Kind: Method
Source: tzero/tzero_turbo.py:79-80

Signature:

def metrics(self) -> TurboMetrics:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.set_force_overdrive

Kind: Method
Source: tzero/tzero_turbo.py:82-84

Signature:

def set_force_overdrive(self, force: bool = True) -> None:

Source docstring:

Forces Turbo Overdrive on regardless of latency threshold.

TurboOverdriveAccelerator.clear_cache

Kind: Method
Source: tzero/tzero_turbo.py:86-88

Signature:

def clear_cache(self) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.get_cache_size

Kind: Method
Source: tzero/tzero_turbo.py:90-92

Signature:

def get_cache_size(self) -> int:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator._quick_hash

Kind: Method
Source: tzero/tzero_turbo.py:95-96

Signature:

def _quick_hash(content: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.sense_latency

Kind: Method
Source: tzero/tzero_turbo.py:99-114

Signature:

def sense_latency(self, op_name: str = 'Codebase Operation') -> Generator[None, None, None]:

Source docstring:


        Adaptive latency sensor. If the enclosed block exceeds AUTO_WHIP_THRESHOLD_SEC,
        Kamçılama / Overdrive is automatically engaged for downstream operations.

TurboOverdriveAccelerator.parallel_map

Kind: Method
Source: tzero/tzero_turbo.py:116-136

Signature:

def parallel_map(self, func: Callable[[T], R], items: List[T], desc: str = '') -> List[R]:

Source docstring:


        Generic adaptive burst map. If item count exceeds BATCH_COUNT_THRESHOLD
        or Overdrive is active, executes concurrently across all CPU worker threads.

TurboOverdriveAccelerator.fast_reduce_file

Kind: Method
Source: tzero/tzero_turbo.py:138-193

Signature:

def fast_reduce_file(self, file_path: str, reducer_fn: Callable[[str, str, str], str], mode: str = 'ultra', max_bytes: int = 250000) -> Tuple[str, bool]:

Source docstring:


        Retrieves AST pruned code in sub-millisecond time.
        Uses in-memory mtime/size validation. Returns (pruned_code, was_cached).

TurboOverdriveAccelerator.parallel_reduce_batch

Kind: Method
Source: tzero/tzero_turbo.py:195-237

Signature:

def parallel_reduce_batch(self, file_paths: List[str], reducer_fn: Callable[[str, str, str], str], mode: str = 'ultra') -> Dict[str, str]:

Source docstring:


        Executes batch AST reductions using adaptive burst acceleration.
        If file count exceeds BATCH_COUNT_THRESHOLD or forced, triggers Overdrive workers.

TurboOverdriveAccelerator.parallel_reduce_batch._worker

Kind: Function
Source: tzero/tzero_turbo.py:216-218

Signature:

def _worker(fp: str) -> Tuple[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TurboOverdriveAccelerator.format_status_report

Kind: Method
Source: tzero/tzero_turbo.py:239-259

Signature:

def format_status_report(self) -> str:

Source docstring:

Returns visual status report of Turbo Overdrive engine.

get_turbo_accelerator

Kind: Function
Source: tzero/tzero_turbo.py:262-264

Signature:

def get_turbo_accelerator() -> TurboOverdriveAccelerator:

Source docstring:

Global singleton accessor for Turbo Overdrive Accelerator.

tzero/tzero_v3.py

Source: tzero/tzero_v3.py
Source size: 11081 lines | 49 classes | 405 functions

Module docstring:

Siber Akademi T-Zero Context Architect.

A unified, self-contained, enterprise-grade application for codebase scanning,
context building, and token reduction. Consolidates configuration profiles, secure
Keyring management, multi-threaded AST signatures crawler, git commit/diff/branch/checkout analyzers,
dynamic template compiler, interactive node graphs, live performance/token charts,
split-pane file editors with custom Pygments highlighting, extensions/ignored folders list editors,
offline dry-run prompt compilers, static code analyzer & audit panel, regex search & replace,
git commit assistant, codebase statistics scanner, Markdown renderer, Keyring Secrets Editor,
duplicate code finder, Prompt Workbench playground, dependency analyzer, custom Git commit graph drawer,
advanced global configuration panel, AST signature matcher/refactoring engine, file type tokens
breakdown matrix table, and keyring credentials backup/restore module into a single robust script.

Developer: [redacted] (Siber Akademi)
LinkedIn: [personal link omitted]
Bio & Socials: [personal link omitted]
GitHub: https://github.com/toprakahmetaydogmus/TZeroAlgorithm

_TkUnavailable

Kind: Class
Source: tzero/tzero_v3.py:131-138

Declaration:

class _TkUnavailable:

Source docstring:

Stand-in base class so GUI classes can still be defined without tkinter.

_TkUnavailable.__init__

Kind: Method
Source: tzero/tzero_v3.py:134-138

Signature:

def __init__(self, *args, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_TkModuleStub

Kind: Class
Source: tzero/tzero_v3.py:140-144

Declaration:

class _TkModuleStub:

Source docstring:

Module-like object: any attribute (Canvas, Frame, Tk, ...) resolves to the stand-in.

_TkModuleStub.__getattr__

Kind: Method
Source: tzero/tzero_v3.py:143-144

Signature:

def __getattr__(self, name):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_toplevel_init_with_icon

Kind: Function
Source: tzero/tzero_v3.py:157-162

Signature:

def _toplevel_init_with_icon(self, *args, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

update_colors

Kind: Function
Source: tzero/tzero_v3.py:446-450

Signature:

def update_colors(theme_name: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

play_sfx

Kind: Function
Source: tzero/tzero_v3.py:455-476

Signature:

def play_sfx(kind: str = 'click') -> None:

Source docstring:

Asynchronous haptic audio chime player using standard Windows winsound.

play_sfx._worker

Kind: Nested function
Source: tzero/tzero_v3.py:459-475

Signature:

def _worker():

Source docstring: none; consult the linked implementation instead of inferring behavior.

calculate_token_cost

Kind: Function
Source: tzero/tzero_v3.py:489-491

Signature:

def calculate_token_cost(token_count: int, provider_name: str) -> float:

Source docstring: none; consult the linked implementation instead of inferring behavior.

get_text

Kind: Function
Source: tzero/tzero_v3.py:572-576

Signature:

def get_text(key: str, lang: str = 'en') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

secure_permissions

Kind: Function
Source: tzero/tzero_v3.py:585-593

Signature:

def secure_permissions(filepath: str) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

validate_url

Kind: Function
Source: tzero/tzero_v3.py:596-600

Signature:

def validate_url(url: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

validate_directory

Kind: Function
Source: tzero/tzero_v3.py:603-607

Signature:

def validate_directory(path: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ToastNotification

Kind: Class
Source: tzero/tzero_v3.py:610-658

Declaration:

class ToastNotification(tk.Toplevel):

Source docstring:

Sleek animated glassmorphism toast notification.

ToastNotification.__init__

Kind: Method
Source: tzero/tzero_v3.py:612-644

Signature:

def __init__(self, master, title, message, n_type = 'info'):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ToastNotification.fade_in

Kind: Method
Source: tzero/tzero_v3.py:646-650

Signature:

def fade_in(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ToastNotification.fade_out

Kind: Method
Source: tzero/tzero_v3.py:652-658

Signature:

def fade_out(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_custom_showinfo

Kind: Function
Source: tzero/tzero_v3.py:660-664

Signature:

def _custom_showinfo(title, msg, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_custom_showerror

Kind: Function
Source: tzero/tzero_v3.py:666-670

Signature:

def _custom_showerror(title, msg, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

_custom_showwarning

Kind: Function
Source: tzero/tzero_v3.py:672-676

Signature:

def _custom_showwarning(title, msg, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager

Kind: Class
Source: tzero/tzero_v3.py:684-845

Declaration:

class ConfigManager:

Source docstring:

Manages profile loading, backups, secure keyring storage and parameter settings.

ConfigManager.__init__

Kind: Method
Source: tzero/tzero_v3.py:686-692

Signature:

def __init__(self, config_dir: str = DEFAULT_CONFIG_DIR):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.ensure_config_directory

Kind: Method
Source: tzero/tzero_v3.py:694-696

Signature:

def ensure_config_directory(self) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.get_default_state

Kind: Method
Source: tzero/tzero_v3.py:698-725

Signature:

def get_default_state(self) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.load

Kind: Method
Source: tzero/tzero_v3.py:727-758

Signature:

def load(self) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.save

Kind: Method
Source: tzero/tzero_v3.py:760-769

Signature:

def save(self) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.recover_from_backup

Kind: Method
Source: tzero/tzero_v3.py:771-783

Signature:

def recover_from_backup(self) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.get_profile

Kind: Method
Source: tzero/tzero_v3.py:785-787

Signature:

def get_profile(self) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.list_profiles

Kind: Method
Source: tzero/tzero_v3.py:789-790

Signature:

def list_profiles(self) -> List[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.get_profile_names

Kind: Method
Source: tzero/tzero_v3.py:792-793

Signature:

def get_profile_names(self) -> List[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.set_active_profile

Kind: Method
Source: tzero/tzero_v3.py:795-799

Signature:

def set_active_profile(self, name: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.switch_profile

Kind: Method
Source: tzero/tzero_v3.py:801-802

Signature:

def switch_profile(self, name: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.set_profile

Kind: Method
Source: tzero/tzero_v3.py:804-806

Signature:

def set_profile(self, name: str, profile_dict: Dict[str, Any]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.delete_profile

Kind: Method
Source: tzero/tzero_v3.py:808-815

Signature:

def delete_profile(self, name: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.get_credential

Kind: Method
Source: tzero/tzero_v3.py:817-835

Signature:

def get_credential(self, provider: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ConfigManager.set_credential

Kind: Method
Source: tzero/tzero_v3.py:837-845

Signature:

def set_credential(self, provider: str, api_key: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

load_config

Kind: Function
Source: tzero/tzero_v3.py:851-853

Signature:

def load_config() -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

save_config

Kind: Function
Source: tzero/tzero_v3.py:855-863

Signature:

def save_config(options: Dict[str, Any]) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

get_api_key

Kind: Function
Source: tzero/tzero_v3.py:865-866

Signature:

def get_api_key(provider: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

set_api_key

Kind: Function
Source: tzero/tzero_v3.py:868-869

Signature:

def set_api_key(provider: str, api_key: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider

Kind: Class
Source: tzero/tzero_v3.py:874-917

Declaration:

class BaseProvider:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:875-878

Signature:

def __init__(self, name: str, default_url: str, default_models: List[str]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.get_base_url

Kind: Method
Source: tzero/tzero_v3.py:880-881

Signature:

def get_base_url(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.get_models

Kind: Method
Source: tzero/tzero_v3.py:883-884

Signature:

def get_models(self) -> List[str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.get_headers

Kind: Method
Source: tzero/tzero_v3.py:886-897

Signature:

def get_headers(self, api_key: str) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.get_endpoint_url

Kind: Method
Source: tzero/tzero_v3.py:899-903

Signature:

def get_endpoint_url(self, api_base: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.format_payload

Kind: Method
Source: tzero/tzero_v3.py:905-911

Signature:

def format_payload(self, model: str, messages: List[Dict[str, str]], **kwargs) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

BaseProvider.parse_response

Kind: Method
Source: tzero/tzero_v3.py:913-917

Signature:

def parse_response(self, data: Dict[str, Any]) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NvidiaProvider

Kind: Class
Source: tzero/tzero_v3.py:920-960

Declaration:

class NvidiaProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NvidiaProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:929-940

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NvidiaProvider.get_headers

Kind: Method
Source: tzero/tzero_v3.py:942-951

Signature:

def get_headers(self, api_key: str) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NvidiaProvider.format_payload

Kind: Method
Source: tzero/tzero_v3.py:953-960

Signature:

def format_payload(self, model: str, messages: List[Dict[str, str]], **kwargs) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenAIProvider

Kind: Class
Source: tzero/tzero_v3.py:963-969

Declaration:

class OpenAIProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenAIProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:964-969

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GeminiProvider

Kind: Class
Source: tzero/tzero_v3.py:972-978

Declaration:

class GeminiProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GeminiProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:973-978

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenRouterProvider

Kind: Class
Source: tzero/tzero_v3.py:981-1013

Declaration:

class OpenRouterProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenRouterProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:988-997

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenRouterProvider.get_headers

Kind: Method
Source: tzero/tzero_v3.py:999-1004

Signature:

def get_headers(self, api_key: str) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

OpenRouterProvider.format_payload

Kind: Method
Source: tzero/tzero_v3.py:1006-1013

Signature:

def format_payload(self, model: str, messages: List[Dict[str, str]], **kwargs) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider

Kind: Class
Source: tzero/tzero_v3.py:1016-1078

Declaration:

class AnthropicProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:1026-1031

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider.get_headers

Kind: Method
Source: tzero/tzero_v3.py:1033-1044

Signature:

def get_headers(self, api_key: str) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider.get_endpoint_url

Kind: Method
Source: tzero/tzero_v3.py:1046-1050

Signature:

def get_endpoint_url(self, api_base: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider.format_payload

Kind: Method
Source: tzero/tzero_v3.py:1052-1069

Signature:

def format_payload(self, model: str, messages: List[Dict[str, str]], **kwargs) -> Dict[str, Any]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AnthropicProvider.parse_response

Kind: Method
Source: tzero/tzero_v3.py:1071-1078

Signature:

def parse_response(self, data: Dict[str, Any]) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

LocalOllamaProvider

Kind: Class
Source: tzero/tzero_v3.py:1081-1094

Declaration:

class LocalOllamaProvider(BaseProvider):

Source docstring: none; consult the linked implementation instead of inferring behavior.

LocalOllamaProvider.__init__

Kind: Method
Source: tzero/tzero_v3.py:1082-1087

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

LocalOllamaProvider.get_headers

Kind: Method
Source: tzero/tzero_v3.py:1089-1094

Signature:

def get_headers(self, api_key: str) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor

Kind: Class
Source: tzero/tzero_v3.py:1109-1553

Declaration:

class PolyglotSignatureExtractor:

Source docstring:

High-precision, zero-leak polyglot interface signature extractor.

    Compresses codebases across TypeScript/JavaScript, Go, Rust, Java, C#, C/C++,
    Kotlin, and Swift by 85-97% while maintaining complete interface and signature contracts.

PolyglotSignatureExtractor.extract

Kind: Method
Source: tzero/tzero_v3.py:1117-1122

Signature:

def extract(cls, file_path: str, code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_typescript_javascript

Kind: Method
Source: tzero/tzero_v3.py:1125-1200

Signature:

def reduce_typescript_javascript(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_go

Kind: Method
Source: tzero/tzero_v3.py:1203-1260

Signature:

def reduce_go(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_rust

Kind: Method
Source: tzero/tzero_v3.py:1263-1319

Signature:

def reduce_rust(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_java_csharp

Kind: Method
Source: tzero/tzero_v3.py:1322-1354

Signature:

def reduce_java_csharp(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_c_cpp

Kind: Method
Source: tzero/tzero_v3.py:1357-1383

Signature:

def reduce_c_cpp(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_kotlin

Kind: Method
Source: tzero/tzero_v3.py:1386-1468

Signature:

def reduce_kotlin(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

PolyglotSignatureExtractor.reduce_swift

Kind: Method
Source: tzero/tzero_v3.py:1471-1553

Signature:

def reduce_swift(code: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer

Kind: Class
Source: tzero/tzero_v3.py:1556-1729

Declaration:

class TokenReducer:

Source docstring:

Extracts functional headers, classes, and annotations while pruning internals across all languages.

TokenReducer.reduce

Kind: Method
Source: tzero/tzero_v3.py:1560-1601

Signature:

def reduce(code: str, file_path: str, mode: str = 'ultra') -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer.reduce_content

Kind: Method
Source: tzero/tzero_v3.py:1604-1621

Signature:

def reduce_content(file_path: str, code: str, mode: str = 'ultra') -> Tuple[str, float]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer._reduce_python

Kind: Method
Source: tzero/tzero_v3.py:1624-1716

Signature:

def _reduce_python(code: str, mode: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer._reduce_javascript

Kind: Method
Source: tzero/tzero_v3.py:1719-1720

Signature:

def _reduce_javascript(code: str, mode: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer._reduce_compiled_grammar

Kind: Method
Source: tzero/tzero_v3.py:1723-1724

Signature:

def _reduce_compiled_grammar(code: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenReducer._default_trim

Kind: Method
Source: tzero/tzero_v3.py:1727-1729

Signature:

def _default_trim(code: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

DependencyAnalyzer

Kind: Class
Source: tzero/tzero_v3.py:1732-1745

Declaration:

class DependencyAnalyzer(ast.NodeVisitor):

Source docstring:

AST visitor that walks import nodes to list python dependencies.

DependencyAnalyzer.__init__

Kind: Method
Source: tzero/tzero_v3.py:1734-1735

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

DependencyAnalyzer.visit_Import

Kind: Method
Source: tzero/tzero_v3.py:1737-1740

Signature:

def visit_Import(self, node: ast.Import):

Source docstring: none; consult the linked implementation instead of inferring behavior.

DependencyAnalyzer.visit_ImportFrom

Kind: Method
Source: tzero/tzero_v3.py:1742-1745

Signature:

def visit_ImportFrom(self, node: ast.ImportFrom):

Source docstring: none; consult the linked implementation instead of inferring behavior.

resolve_default_workspace

Kind: Function
Source: tzero/tzero_v3.py:1748-1769

Signature:

def resolve_default_workspace(current_dir: Optional[str] = None, executable_dir: Optional[str] = None) -> str:

Source docstring:

Use the project root when the app is launched from its dist/build folder.

CodebaseScanner

Kind: Class
Source: tzero/tzero_v3.py:1772-1832

Declaration:

class CodebaseScanner:

Source docstring:

Asynchronously scans workspaces using file settings criteria.

CodebaseScanner.scan_directory

Kind: Method
Source: tzero/tzero_v3.py:1775-1832

Signature:

def scan_directory(self, root_dir: str) -> Tuple[List[str], Dict[str, int], Dict[str, str]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CodebaseScanner.scan_directory.process_file

Kind: Function
Source: tzero/tzero_v3.py:1815-1824

Signature:

def process_file(rel_path: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer

Kind: Class
Source: tzero/tzero_v3.py:1837-1892

Declaration:

class StaticCodeAnalyzer(ast.NodeVisitor):

Source docstring:

Parses codebase code AST blocks and produces code-smell diagnostics warnings.

StaticCodeAnalyzer.__init__

Kind: Method
Source: tzero/tzero_v3.py:1839-1841

Signature:

def __init__(self, filename: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer._add_issue

Kind: Method
Source: tzero/tzero_v3.py:1843-1851

Signature:

def _add_issue(self, rule: str, severity: str, line: int, msg: str, ref: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer.analyze_source

Kind: Method
Source: tzero/tzero_v3.py:1853-1860

Signature:

def analyze_source(self, source_code: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer.visit_FunctionDef

Kind: Method
Source: tzero/tzero_v3.py:1862-1878

Signature:

def visit_FunctionDef(self, node: ast.FunctionDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer.visit_AsyncFunctionDef

Kind: Method
Source: tzero/tzero_v3.py:1880-1882

Signature:

def visit_AsyncFunctionDef(self, node: ast.AsyncFunctionDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer.visit_ClassDef

Kind: Method
Source: tzero/tzero_v3.py:1884-1888

Signature:

def visit_ClassDef(self, node: ast.ClassDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StaticCodeAnalyzer.visit_Global

Kind: Method
Source: tzero/tzero_v3.py:1890-1892

Signature:

def visit_Global(self, node: ast.Global):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTParser

Kind: Class
Source: tzero/tzero_v3.py:1897-1943

Declaration:

class PythonASTParser(ast.NodeVisitor):

Source docstring:

AST structure outlining parser that walks python syntax trees.

PythonASTParser.__init__

Kind: Method
Source: tzero/tzero_v3.py:1899-1901

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTParser.visit_ClassDef

Kind: Method
Source: tzero/tzero_v3.py:1903-1915

Signature:

def visit_ClassDef(self, node: ast.ClassDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTParser.visit_FunctionDef

Kind: Method
Source: tzero/tzero_v3.py:1917-1929

Signature:

def visit_FunctionDef(self, node: ast.FunctionDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTParser.visit_AsyncFunctionDef

Kind: Method
Source: tzero/tzero_v3.py:1931-1943

Signature:

def visit_AsyncFunctionDef(self, node: ast.AsyncFunctionDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTRefactorer

Kind: Class
Source: tzero/tzero_v3.py:1946-1966

Declaration:

class PythonASTRefactorer(ast.NodeTransformer):

Source docstring:

AST transformer to refactor function signatures across files.

PythonASTRefactorer.__init__

Kind: Method
Source: tzero/tzero_v3.py:1948-1951

Signature:

def __init__(self, target_name: str, replacement_name: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTRefactorer.visit_FunctionDef

Kind: Method
Source: tzero/tzero_v3.py:1953-1957

Signature:

def visit_FunctionDef(self, node: ast.FunctionDef):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PythonASTRefactorer.visit_Call

Kind: Method
Source: tzero/tzero_v3.py:1959-1966

Signature:

def visit_Call(self, node: ast.Call):

Source docstring: none; consult the linked implementation instead of inferring behavior.

KeyringSecretsEditor

Kind: Class
Source: tzero/tzero_v3.py:1971-1985

Declaration:

class KeyringSecretsEditor:

Source docstring:

Provides secure editing, listing and deleting parameters of keyring passwords.

KeyringSecretsEditor.list_credentials

Kind: Method
Source: tzero/tzero_v3.py:1974-1985

Signature:

def list_credentials() -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

KeyringSecretsBackupManager

Kind: Class
Source: tzero/tzero_v3.py:1988-2118

Declaration:

class KeyringSecretsBackupManager:

Source docstring:

Backs up and restores credentials securely using PBKDF2-HMAC-SHA256 authenticated encryption.

KeyringSecretsBackupManager._derive_keys

Kind: Method
Source: tzero/tzero_v3.py:1995-1998

Signature:

def _derive_keys(cls, passphrase: str, salt: bytes) -> Tuple[bytes, bytes]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

KeyringSecretsBackupManager._keystream

Kind: Method
Source: tzero/tzero_v3.py:2001-2008

Signature:

def _keystream(cls, key: bytes, length: int) -> bytes:

Source docstring: none; consult the linked implementation instead of inferring behavior.

KeyringSecretsBackupManager.backup_credentials

Kind: Method
Source: tzero/tzero_v3.py:2011-2034

Signature:

def backup_credentials(cls, filepath: str, cipher_key: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

KeyringSecretsBackupManager._validate_credential_map

Kind: Method
Source: tzero/tzero_v3.py:2037-2057

Signature:

def _validate_credential_map(cls, creds: Any) -> Optional[Dict[str, str]]:

Source docstring:

Validate backup credential schema strictly before touching OS keyring.

KeyringSecretsBackupManager.import_legacy_credentials

Kind: Method
Source: tzero/tzero_v3.py:2060-2083

Signature:

def import_legacy_credentials(cls, filepath: str, cipher_key: str) -> bool:

Source docstring:

Import a legacy unauthenticated XOR backup after strict schema validation.

KeyringSecretsBackupManager.restore_credentials

Kind: Method
Source: tzero/tzero_v3.py:2086-2118

Signature:

def restore_credentials(cls, filepath: str, cipher_key: str, allow_legacy: bool = True) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

WorkspaceDuplicityFinder

Kind: Class
Source: tzero/tzero_v3.py:2123-2153

Declaration:

class WorkspaceDuplicityFinder:

Source docstring:

Crawls codebase modules to find exact duplicate text fragments of specific lengths.

WorkspaceDuplicityFinder.__init__

Kind: Method
Source: tzero/tzero_v3.py:2125-2126

Signature:

def __init__(self, file_snippets: Dict[str, str]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WorkspaceDuplicityFinder.find_duplicates

Kind: Method
Source: tzero/tzero_v3.py:2128-2153

Signature:

def find_duplicates(self, min_lines: int = 6) -> List[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

MarkdownTextTagger

Kind: Class
Source: tzero/tzero_v3.py:2160-2226

Declaration:

class MarkdownTextTagger:

Source docstring:

Parses headings, lists, code fences, blockquotes, tables and formats Tkinter text blocks dynamically.

MarkdownTextTagger.__init__

Kind: Method
Source: tzero/tzero_v3.py:2162-2164

Signature:

def __init__(self, text_widget: tk.Text):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MarkdownTextTagger.setup_tags

Kind: Method
Source: tzero/tzero_v3.py:2166-2179

Signature:

def setup_tags(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MarkdownTextTagger.render_markdown

Kind: Method
Source: tzero/tzero_v3.py:2181-2226

Signature:

def render_markdown(self, markdown_text: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ContextExportManager

Kind: Class
Source: tzero/tzero_v3.py:2229-2624

Declaration:

class ContextExportManager:

Source docstring:

Exports synthesized project context into specialized agent, architecture, and web targets.

ContextExportManager.generate_agents_blueprint

Kind: Method
Source: tzero/tzero_v3.py:2233-2260

Signature:

def generate_agents_blueprint(project_name: str, files_tree: str, snippets: Dict[str, str], extra_rules: str = '') -> str:

Source docstring:

Generates comprehensive AGENTS.md / CLAUDE.md instruction blueprint.

ContextExportManager.generate_offline_architecture_blueprint

Kind: Method
Source: tzero/tzero_v3.py:2263-2427

Signature:

def generate_offline_architecture_blueprint(project_name: str, files: List[str], deps: Dict[str, List[str]], snippets: Optional[Dict[str, str]] = None) -> str:

Source docstring:

Generates an intelligent, tailored ARCHITECTURE.md using AST & filesystem analysis.

        Categorizes the actual codebase into physical & logical layers (Entrypoints,
        Presentation, Services/APIs, Core Domain Engine, Storage/Security, Utilities, Tests),
        extracts exported classes & functions, and builds a comprehensive Mermaid topology diagram.

ContextExportManager.generate_architecture_blueprint

Kind: Method
Source: tzero/tzero_v3.py:2431-2527

Signature:

def generate_architecture_blueprint(project_name: str, files: List[str], deps: Dict[str, List[str]], snippets: Optional[Dict[str, str]] = None, use_ai: bool = False, provider: Optional[BaseProvider] = None, api_base: str = '', api_key: str = '', model: str = '', progress_cb: Optional[Callable] = None) -> str:

Source docstring:

Generates ARCHITECTURE.md with Mermaid diagrams and module specs.

        Supports live 3rd-party AI synthesis (NVIDIA NIM, OpenAI, Gemini, Anthropic, OpenRouter,
        or Local Ollama) and falls back locally to the AST architecture engine on missing
        credentials or provider errors without silent cloud retries.

ContextExportManager.generate_repo_map

Kind: Method
Source: tzero/tzero_v3.py:2530-2538

Signature:

def generate_repo_map(project_name: str, files: List[str], snippets: Dict[str, str]) -> str:

Source docstring:

Generates compact REPO_MAP.txt token map for chat prompts.

ContextExportManager.generate_styled_html

Kind: Method
Source: tzero/tzero_v3.py:2541-2621

Signature:

def generate_styled_html(project_name: str, markdown_content: str) -> str:

Source docstring:

Generates standalone responsive Cyberpunk styled HTML document.

WorkspacePresetManager

Kind: Class
Source: tzero/tzero_v3.py:2634-2661

Declaration:

class WorkspacePresetManager:

Source docstring:

Presets manager to automatically apply filter templates to codebase scanners.

ProfileImporterExporter

Kind: Class
Source: tzero/tzero_v3.py:2664-2686

Declaration:

class ProfileImporterExporter:

Source docstring:

Handles JSON-based profile backup, imports and exports.

ProfileImporterExporter.export_profile

Kind: Method
Source: tzero/tzero_v3.py:2667-2674

Signature:

def export_profile(profile_data: Dict[str, Any], filepath: str) -> bool:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ProfileImporterExporter.import_profile

Kind: Method
Source: tzero/tzero_v3.py:2677-2686

Signature:

def import_profile(filepath: str) -> Optional[Dict[str, Any]]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TemplateEngine

Kind: Class
Source: tzero/tzero_v3.py:2702-2729

Declaration:

class TemplateEngine:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TemplateEngine.__init__

Kind: Method
Source: tzero/tzero_v3.py:2703-2704

Signature:

def __init__(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TemplateEngine.get_default_template

Kind: Method
Source: tzero/tzero_v3.py:2706-2723

Signature:

def get_default_template(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

TemplateEngine.render

Kind: Method
Source: tzero/tzero_v3.py:2725-2729

Signature:

def render(self, variables: Dict[str, str]) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

count_tokens_precise

Kind: Function
Source: tzero/tzero_v3.py:2735-2737

Signature:

def count_tokens_precise(text: str, model_name: str = 'gpt-4o') -> int:

Source docstring:

Count exact tokens using cached local tiktoken BPE encodings with char//4 fallback.

get_budgeted_snippets

Kind: Function
Source: tzero/tzero_v3.py:2740-2754

Signature:

def get_budgeted_snippets(selected_files: List[str], file_snippets: Dict[str, str]) -> Dict[str, str]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ContextGenerator

Kind: Class
Source: tzero/tzero_v3.py:2757-2839

Declaration:

class ContextGenerator:

Source docstring: none; consult the linked implementation instead of inferring behavior.

ContextGenerator.__init__

Kind: Method
Source: tzero/tzero_v3.py:2758-2759

Signature:

def __init__(self, cancel_event: Optional[threading.Event] = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ContextGenerator.generate_readme

Kind: Method
Source: tzero/tzero_v3.py:2761-2839

Signature:

def generate_readme(self, api_base: str, api_key: str, headers: Dict[str, str], model: str, messages: List[Dict[str, str]], progress_cb: Optional[Callable] = None, provider: Optional[BaseProvider] = None, timeout: int = 40) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

generate_offline_context

Kind: Function
Source: tzero/tzero_v3.py:2842-3028

Signature:

def generate_offline_context(project_dir: str, selected_files: List[str], file_snippets: Dict[str, str], cache_aligned: bool = False) -> str:

Source docstring:

Generates an enterprise-grade hierarchical T-Zero context tree offline without API call.

    Adheres strictly to the T-Zero 4-Tier Context Architecture (T-1 to T-4)
    and enforces T-001 through T-004 Algorithm Specifications.
    100% Free, local, instant, and zero-leak security.

GitCommitGraphCanvas

Kind: Class
Source: tzero/tzero_v3.py:3033-3064

Declaration:

class GitCommitGraphCanvas(tk.Canvas):

Source docstring:

Draws a beautiful custom commit nodes history tree graph chronologically.

GitCommitGraphCanvas.__init__

Kind: Method
Source: tzero/tzero_v3.py:3035-3038

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GitCommitGraphCanvas.draw_graph

Kind: Method
Source: tzero/tzero_v3.py:3040-3064

Signature:

def draw_graph(self, commits_count: int):

Source docstring: none; consult the linked implementation instead of inferring behavior.

apply_modern_hover

Kind: Function
Source: tzero/tzero_v3.py:3069-3090

Signature:

def apply_modern_hover(btn: tk.Button, normal_bg = None, hover_bg = None, normal_fg = None, hover_fg = None):

Source docstring:

Enriches a Tkinter button with smooth, glowing interactive hover transitions.

apply_modern_hover.on_enter

Kind: Nested function
Source: tzero/tzero_v3.py:3076-3080

Signature:

def on_enter(e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

apply_modern_hover.on_leave

Kind: Nested function
Source: tzero/tzero_v3.py:3082-3086

Signature:

def on_leave(e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

apply_entry_focus_glow

Kind: Function
Source: tzero/tzero_v3.py:3093-3112

Signature:

def apply_entry_focus_glow(entry: tk.Entry, normal_border = None, focus_border = None):

Source docstring:

Adds a glowing neon accent border when an Entry field is focused.

apply_entry_focus_glow.on_focus_in

Kind: Nested function
Source: tzero/tzero_v3.py:3098-3102

Signature:

def on_focus_in(e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

apply_entry_focus_glow.on_focus_out

Kind: Nested function
Source: tzero/tzero_v3.py:3104-3108

Signature:

def on_focus_out(e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GlassCard

Kind: Class
Source: tzero/tzero_v3.py:3115-3124

Declaration:

class GlassCard(tk.Frame):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GlassCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3116-3124

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

create_rounded_rect

Kind: Function
Source: tzero/tzero_v3.py:3127-3153

Signature:

def create_rounded_rect(canvas, x1, y1, x2, y2, radius = 16, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

LuxuryCard

Kind: Class
Source: tzero/tzero_v3.py:3156-3189

Declaration:

class LuxuryCard(tk.Canvas):

Source docstring:

Executive SaaS rounded card with antialiased borders, soft depth shadow, and inner container frame.

LuxuryCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3158-3169

Signature:

def __init__(self, parent, radius: int = 16, bg_color: Optional[str] = None, border_color: Optional[str] = None, padding: int = 10, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

LuxuryCard.card_bg

Kind: Method
Source: tzero/tzero_v3.py:3172-3173

Signature:

def card_bg(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

LuxuryCard.border_color

Kind: Method
Source: tzero/tzero_v3.py:3176-3177

Signature:

def border_color(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

LuxuryCard._on_resize

Kind: Method
Source: tzero/tzero_v3.py:3179-3189

Signature:

def _on_resize(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton

Kind: Class
Source: tzero/tzero_v3.py:3192-3272

Declaration:

class CanvasPillButton(tk.Canvas):

Source docstring:

Ultra-luxury rounded pill button with smooth hover glow and click displacement.

CanvasPillButton.__init__

Kind: Method
Source: tzero/tzero_v3.py:3194-3211

Signature:

def __init__(self, parent, text: str = 'Button', command: Optional[Callable] = None, bg_color: Optional[str] = None, hover_color: Optional[str] = None, text_color: Optional[str] = None, font: Tuple = ('Segoe UI', 9, 'bold'), height: int = 36, radius: int = 18, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton.normal_bg

Kind: Method
Source: tzero/tzero_v3.py:3214-3215

Signature:

def normal_bg(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton.hover_bg

Kind: Method
Source: tzero/tzero_v3.py:3218-3219

Signature:

def hover_bg(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton.fg_color

Kind: Method
Source: tzero/tzero_v3.py:3222-3223

Signature:

def fg_color(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton.set_text

Kind: Method
Source: tzero/tzero_v3.py:3225-3227

Signature:

def set_text(self, new_text: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton._redraw

Kind: Method
Source: tzero/tzero_v3.py:3229-3240

Signature:

def _redraw(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton._on_enter

Kind: Method
Source: tzero/tzero_v3.py:3242-3247

Signature:

def _on_enter(self, e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton._on_leave

Kind: Method
Source: tzero/tzero_v3.py:3249-3251

Signature:

def _on_leave(self, e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton._on_click

Kind: Method
Source: tzero/tzero_v3.py:3253-3258

Signature:

def _on_click(self, e):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CanvasPillButton.config

Kind: Method
Source: tzero/tzero_v3.py:3260-3270

Signature:

def config(self, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

KPICard

Kind: Class
Source: tzero/tzero_v3.py:3275-3304

Declaration:

class KPICard(LuxuryCard):

Source docstring:

Executive KPI card showing primary upward metric and secondary compression delta.

KPICard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3277-3297

Signature:

def __init__(self, parent, title = 'AST & Token Spend', primary_val = '↑ 1,974', primary_sub = 'Processed AST Nodes & Directives', secondary_val = '↓ 287', secondary_sub = 'Compressed Prompt Token Volume', **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

KPICard.update_metrics

Kind: Method
Source: tzero/tzero_v3.py:3299-3304

Signature:

def update_metrics(self, primary_val: str, secondary_val: str):

Source docstring:

Update live metrics for primary and secondary indicators.

ScrollableGlassPanel

Kind: Class
Source: tzero/tzero_v3.py:3306-3330

Declaration:

class ScrollableGlassPanel(tk.Frame):

Source docstring:

Smooth scrollable container for dashboard analytics and charts.

ScrollableGlassPanel.__init__

Kind: Method
Source: tzero/tzero_v3.py:3308-3330

Signature:

def __init__(self, parent, bg_color = None, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

ScrollableGlassPanel.__init__._on_mousewheel

Kind: Nested function
Source: tzero/tzero_v3.py:3323-3327

Signature:

def _on_mousewheel(event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MiniCalendarCard

Kind: Class
Source: tzero/tzero_v3.py:3333-3359

Declaration:

class MiniCalendarCard(LuxuryCard):

Source docstring:

Mini executive activity calendar card with active audit date rings.

MiniCalendarCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3335-3359

Signature:

def __init__(self, parent, month_title = 'Nov 2026', active_days = (14, 25, 28), **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CircularGaugeCard

Kind: Class
Source: tzero/tzero_v3.py:3362-3395

Declaration:

class CircularGaugeCard(LuxuryCard):

Source docstring:

Circular donut gauge card with percentage arc and quick action pill button.

CircularGaugeCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3364-3384

Signature:

def __init__(self, parent, title = 'Optimization Score', subtitle = 'T-Zero context efficiency', percentage = 75, action_text = '⚡ QUICK OPTIMIZE', action_cmd = None, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CircularGaugeCard._draw_gauge

Kind: Method
Source: tzero/tzero_v3.py:3386-3391

Signature:

def _draw_gauge(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CircularGaugeCard.set_percentage

Kind: Method
Source: tzero/tzero_v3.py:3393-3395

Signature:

def set_percentage(self, val: int):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WaveSplineChart

Kind: Class
Source: tzero/tzero_v3.py:3398-3446

Declaration:

class WaveSplineChart(LuxuryCard):

Source docstring:

Smooth dual-wave spline chart with pastel area gradient fills.

WaveSplineChart.__init__

Kind: Method
Source: tzero/tzero_v3.py:3400-3407

Signature:

def __init__(self, parent, title = 'AST Token Frequency', **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WaveSplineChart._start_anim

Kind: Method
Source: tzero/tzero_v3.py:3409-3413

Signature:

def _start_anim(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WaveSplineChart._animate

Kind: Method
Source: tzero/tzero_v3.py:3415-3422

Signature:

def _animate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WaveSplineChart._draw_spline

Kind: Method
Source: tzero/tzero_v3.py:3424-3446

Signature:

def _draw_spline(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WideSplineChartCard

Kind: Class
Source: tzero/tzero_v3.py:3449-3511

Declaration:

class WideSplineChartCard(LuxuryCard):

Source docstring:

Wide executive Bézier spline chart showing AST vs Compressed token consumption trend.

WideSplineChartCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3451-3463

Signature:

def __init__(self, parent, title = 'Model Token Consumption Trend', **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WideSplineChartCard._start_anim

Kind: Method
Source: tzero/tzero_v3.py:3465-3469

Signature:

def _start_anim(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WideSplineChartCard._animate

Kind: Method
Source: tzero/tzero_v3.py:3471-3483

Signature:

def _animate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

WideSplineChartCard._draw

Kind: Method
Source: tzero/tzero_v3.py:3485-3511

Signature:

def _draw(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MonthlyStackedBarCard

Kind: Class
Source: tzero/tzero_v3.py:3514-3554

Declaration:

class MonthlyStackedBarCard(LuxuryCard):

Source docstring:

Horizontal stacked bar chart for monthly token reduction stats.

MonthlyStackedBarCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3516-3523

Signature:

def __init__(self, parent, title = 'Monthly Token Savings', **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MonthlyStackedBarCard._start_anim

Kind: Method
Source: tzero/tzero_v3.py:3525-3529

Signature:

def _start_anim(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MonthlyStackedBarCard._animate

Kind: Method
Source: tzero/tzero_v3.py:3531-3538

Signature:

def _animate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

MonthlyStackedBarCard._draw

Kind: Method
Source: tzero/tzero_v3.py:3540-3554

Signature:

def _draw(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GroupedVerticalBarCard

Kind: Class
Source: tzero/tzero_v3.py:3557-3597

Declaration:

class GroupedVerticalBarCard(LuxuryCard):

Source docstring:

Grouped dual-color vertical bar chart for daily token and audit activity.

GroupedVerticalBarCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3559-3566

Signature:

def __init__(self, parent, title = 'Daily Activity & Audits', **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GroupedVerticalBarCard._start_anim

Kind: Method
Source: tzero/tzero_v3.py:3568-3572

Signature:

def _start_anim(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GroupedVerticalBarCard._animate

Kind: Method
Source: tzero/tzero_v3.py:3574-3581

Signature:

def _animate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GroupedVerticalBarCard._draw

Kind: Method
Source: tzero/tzero_v3.py:3583-3597

Signature:

def _draw(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

SecurityHubCard

Kind: Class
Source: tzero/tzero_v3.py:3605-3617

Declaration:

class SecurityHubCard(LuxuryCard):

Source docstring:

Siber Akademi security badge & quick audit / Anti-REA launcher card.

SecurityHubCard.__init__

Kind: Method
Source: tzero/tzero_v3.py:3607-3617

Signature:

def __init__(self, parent, action_cmd = None, armor_cmd = None, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GlowingStatusDot

Kind: Class
Source: tzero/tzero_v3.py:3619-3641

Declaration:

class GlowingStatusDot(tk.Canvas):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GlowingStatusDot.__init__

Kind: Method
Source: tzero/tzero_v3.py:3620-3625

Signature:

def __init__(self, parent, size: int = 16, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

GlowingStatusDot.set_status

Kind: Method
Source: tzero/tzero_v3.py:3627-3641

Signature:

def set_status(self, status: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas

Kind: Class
Source: tzero/tzero_v3.py:3644-3777

Declaration:

class StarfieldCanvas(tk.Canvas):

Source docstring:

Dynamic animated background canvas supporting Stars Warp, Matrix Digital Rain, Cyber Grid, and Solid modes.

StarfieldCanvas.__init__

Kind: Method
Source: tzero/tzero_v3.py:3646-3659

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.destroy

Kind: Method
Source: tzero/tzero_v3.py:3661-3663

Signature:

def destroy(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.cycle_mode

Kind: Method
Source: tzero/tzero_v3.py:3666-3676

Signature:

def cycle_mode(self) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.on_resize

Kind: Method
Source: tzero/tzero_v3.py:3678-3682

Signature:

def on_resize(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.rebuild_stars

Kind: Method
Source: tzero/tzero_v3.py:3684-3695

Signature:

def rebuild_stars(self, w: int, h: int):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.rebuild_matrix

Kind: Method
Source: tzero/tzero_v3.py:3697-3709

Signature:

def rebuild_matrix(self, w: int, h: int):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.draw

Kind: Method
Source: tzero/tzero_v3.py:3711-3754

Signature:

def draw(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

StarfieldCanvas.animate

Kind: Method
Source: tzero/tzero_v3.py:3756-3777

Signature:

def animate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas

Kind: Class
Source: tzero/tzero_v3.py:3780-4339

Declaration:

class NodeGraphCanvas(tk.Canvas):

Source docstring:

Next-Generation Interactive AST Topology & Code Architecture Canvas.

    Features:
    - Interactive Smooth Zoom (Mousewheel, +/- buttons, scale factor 0.15x to 5.0x)
    - Full Canvas Panning (Right-click drag, Middle-click drag, or click-drag on canvas background)
    - Individual Node Drag & Drop (Click and drag any node to custom position)
    - Collision Avoidance Force Relaxation: Iterative physics pass preventing label overlap
    - Clean Hierarchical Multi-Orbit Layout: Core Workspace -> Directory Rings -> Satellite File Orbits
    - Floating Glassmorphism Toolbar: Zoom in (+), Zoom out (-), Reset (100%), Fit to View (⛶), Fullscreen Toggle (⤢)
    - File Type Color Coding & Badges with icons (.py, .ts, .rs, .go, .json, .html, etc.)
    - Dynamic Hover Glow & Connected Link Highlighting
    - Interactive Node Inspector HUD in bottom-left corner

NodeGraphCanvas.__init__

Kind: Method
Source: tzero/tzero_v3.py:3794-3832

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.to_screen

Kind: Method
Source: tzero/tzero_v3.py:3834-3835

Signature:

def to_screen(self, wx: float, wy: float) -> Tuple[float, float]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.to_world

Kind: Method
Source: tzero/tzero_v3.py:3837-3839

Signature:

def to_world(self, sx: float, sy: float) -> Tuple[float, float]:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.zoom

Kind: Method
Source: tzero/tzero_v3.py:3841-3853

Signature:

def zoom(self, factor: float, cx: Optional[float] = None, cy: Optional[float] = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.reset_view

Kind: Method
Source: tzero/tzero_v3.py:3855-3861

Signature:

def reset_view(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.fit_to_view

Kind: Method
Source: tzero/tzero_v3.py:3863-3889

Signature:

def fit_to_view(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_resize

Kind: Method
Source: tzero/tzero_v3.py:3891-3895

Signature:

def on_resize(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.get_file_color

Kind: Method
Source: tzero/tzero_v3.py:3897-3907

Signature:

def get_file_color(self, name: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.get_file_icon

Kind: Method
Source: tzero/tzero_v3.py:3909-3923

Signature:

def get_file_icon(self, name: str) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.resolve_collisions

Kind: Method
Source: tzero/tzero_v3.py:3925-3953

Signature:

def resolve_collisions(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.set_data

Kind: Method
Source: tzero/tzero_v3.py:3955-4055

Signature:

def set_data(self, files: List[str]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.draw

Kind: Method
Source: tzero/tzero_v3.py:4057-4201

Signature:

def draw(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.btn_zoom_in

Kind: Method
Source: tzero/tzero_v3.py:4203-4204

Signature:

def btn_zoom_in(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.btn_zoom_out

Kind: Method
Source: tzero/tzero_v3.py:4206-4207

Signature:

def btn_zoom_out(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.btn_reset

Kind: Method
Source: tzero/tzero_v3.py:4209-4210

Signature:

def btn_reset(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.btn_fit

Kind: Method
Source: tzero/tzero_v3.py:4212-4213

Signature:

def btn_fit(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.btn_toggle_fullscreen

Kind: Method
Source: tzero/tzero_v3.py:4215-4221

Signature:

def btn_toggle_fullscreen(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_mouse_down

Kind: Method
Source: tzero/tzero_v3.py:4223-4251

Signature:

def on_mouse_down(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_mouse_drag

Kind: Method
Source: tzero/tzero_v3.py:4253-4266

Signature:

def on_mouse_drag(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_mouse_up

Kind: Method
Source: tzero/tzero_v3.py:4268-4270

Signature:

def on_mouse_up(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_right_down

Kind: Method
Source: tzero/tzero_v3.py:4272-4275

Signature:

def on_right_down(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_right_drag

Kind: Method
Source: tzero/tzero_v3.py:4277-4285

Signature:

def on_right_drag(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_right_up

Kind: Method
Source: tzero/tzero_v3.py:4287-4288

Signature:

def on_right_up(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_mousewheel

Kind: Method
Source: tzero/tzero_v3.py:4290-4293

Signature:

def on_mousewheel(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_motion

Kind: Method
Source: tzero/tzero_v3.py:4295-4326

Signature:

def on_motion(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

NodeGraphCanvas.on_double_click

Kind: Method
Source: tzero/tzero_v3.py:4328-4339

Signature:

def on_double_click(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PerformanceChartCanvas

Kind: Class
Source: tzero/tzero_v3.py:4343-4385

Declaration:

class PerformanceChartCanvas(tk.Canvas):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PerformanceChartCanvas.__init__

Kind: Method
Source: tzero/tzero_v3.py:4344-4350

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PerformanceChartCanvas.update_values

Kind: Method
Source: tzero/tzero_v3.py:4352-4359

Signature:

def update_values(self, cpu: float, memory: float):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PerformanceChartCanvas.draw

Kind: Method
Source: tzero/tzero_v3.py:4361-4385

Signature:

def draw(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenDonutChartCanvas

Kind: Class
Source: tzero/tzero_v3.py:4388-4419

Declaration:

class TokenDonutChartCanvas(tk.Canvas):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenDonutChartCanvas.__init__

Kind: Method
Source: tzero/tzero_v3.py:4389-4394

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenDonutChartCanvas.set_budget

Kind: Method
Source: tzero/tzero_v3.py:4396-4400

Signature:

def set_budget(self, used: int, limit: int = 60000):

Source docstring: none; consult the linked implementation instead of inferring behavior.

TokenDonutChartCanvas.draw

Kind: Method
Source: tzero/tzero_v3.py:4402-4419

Signature:

def draw(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AdvancedTokenDistributionChart

Kind: Class
Source: tzero/tzero_v3.py:4422-4482

Declaration:

class AdvancedTokenDistributionChart(tk.Canvas):

Source docstring:

Custom language token distribution stats visualizer chart widget.

AdvancedTokenDistributionChart.__init__

Kind: Method
Source: tzero/tzero_v3.py:4424-4428

Signature:

def __init__(self, parent, **kwargs):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AdvancedTokenDistributionChart.set_stats

Kind: Method
Source: tzero/tzero_v3.py:4430-4432

Signature:

def set_stats(self, stats: Dict[str, float]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AdvancedTokenDistributionChart.draw

Kind: Method
Source: tzero/tzero_v3.py:4434-4482

Signature:

def draw(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CustomChangelogManager

Kind: Class
Source: tzero/tzero_v3.py:4485-4557

Declaration:

class CustomChangelogManager:

Source docstring:

Safely retrieves git log history and repository diffs asynchronously.

CustomChangelogManager.__init__

Kind: Method
Source: tzero/tzero_v3.py:4487-4488

Signature:

def __init__(self, target_dir: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

CustomChangelogManager.fetch_commits_async

Kind: Method
Source: tzero/tzero_v3.py:4490-4536

Signature:

def fetch_commits_async(self, callback: Callable) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CustomChangelogManager.fetch_commits_async.run_thread

Kind: Nested function
Source: tzero/tzero_v3.py:4491-4534

Signature:

def run_thread():

Source docstring: none; consult the linked implementation instead of inferring behavior.

CustomChangelogManager.get_git_diff_async

Kind: Method
Source: tzero/tzero_v3.py:4538-4557

Signature:

def get_git_diff_async(self, callback: Callable) -> None:

Source docstring: none; consult the linked implementation instead of inferring behavior.

CustomChangelogManager.get_git_diff_async.run_thread

Kind: Nested function
Source: tzero/tzero_v3.py:4539-4556

Signature:

def run_thread():

Source docstring: none; consult the linked implementation instead of inferring behavior.

PygmentsHighlighter

Kind: Class
Source: tzero/tzero_v3.py:4560-4597

Declaration:

class PygmentsHighlighter:

Source docstring:

Helper lexer to colorize and tag text elements inside Tkinter widgets.

PygmentsHighlighter.__init__

Kind: Method
Source: tzero/tzero_v3.py:4562-4564

Signature:

def __init__(self, text_widget: tk.Text):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PygmentsHighlighter.setup_tags

Kind: Method
Source: tzero/tzero_v3.py:4566-4573

Signature:

def setup_tags(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

PygmentsHighlighter.highlight_code

Kind: Method
Source: tzero/tzero_v3.py:4575-4597

Signature:

def highlight_code(self, code_str: str, lang: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

decide_startup_popup

Kind: Function
Source: tzero/tzero_v3.py:4605-4637

Signature:

def decide_startup_popup(profile: Dict[str, Any], now_ts: Optional[float] = None) -> str:

Source docstring:

Determine which startup modal ('star', 'sponsor', or 'none') to display.

    Rules:
    - Star prompt: only on the 1st launch and every 10th launch thereafter (1, 10, 20, ...),
      unless dismissed by the user.
    - Sponsor prompt: on every 5th launch (5, 15, 25, ...) OR once every 7 days of usage,
      unless dismissed by the user. Star takes priority on 1st and 10th launches so two
      modals never stack on the same startup.

AutoReadmeGUI

Kind: Class
Source: tzero/tzero_v3.py:4640-8560

Declaration:

class AutoReadmeGUI:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.__init__

Kind: Method
Source: tzero/tzero_v3.py:4641-4719

Signature:

def __init__(self, root: tk.Tk):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._attach_tooltip

Kind: Method
Source: tzero/tzero_v3.py:4721-4767

Signature:

def _attach_tooltip(self, widget, text: str):

Source docstring:

Attach a sleek floating English tooltip on mouse hover.

AutoReadmeGUI._attach_tooltip.show_tip

Kind: Nested function
Source: tzero/tzero_v3.py:4727-4751

Signature:

def show_tip(_event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._attach_tooltip.hide_tip

Kind: Nested function
Source: tzero/tzero_v3.py:4753-4760

Signature:

def hide_tip(_event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.safe_after

Kind: Method
Source: tzero/tzero_v3.py:4769-4776

Signature:

def safe_after(self, ms: int, func, *args):

Source docstring:

Thread-safe and lifecycle-safe wrapper around root.after.

AutoReadmeGUI.setup_keyboard_shortcuts

Kind: Method
Source: tzero/tzero_v3.py:4778-4782

Signature:

def setup_keyboard_shortcuts(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.create_layout

Kind: Method
Source: tzero/tzero_v3.py:4784-5028

Signature:

def create_layout(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.create_layout.on_enter

Kind: Function
Source: tzero/tzero_v3.py:4830-4832

Signature:

def on_enter(e, b = btn, i = idx):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.create_layout.on_leave

Kind: Function
Source: tzero/tzero_v3.py:4833-4835

Signature:

def on_leave(e, b = btn, i = idx):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_console_drawer

Kind: Method
Source: tzero/tzero_v3.py:5030-5043

Signature:

def toggle_console_drawer(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.log

Kind: Method
Source: tzero/tzero_v3.py:5045-5055

Signature:

def log(self, text: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.cycle_fx_mode

Kind: Method
Source: tzero/tzero_v3.py:5057-5061

Signature:

def cycle_fx_mode(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_sfx

Kind: Method
Source: tzero/tzero_v3.py:5063-5070

Signature:

def toggle_sfx(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_toast

Kind: Method
Source: tzero/tzero_v3.py:5072-5089

Signature:

def show_toast(self, message: str, kind: str = 'info', duration_ms: int = 2500):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_toast.fade

Kind: Function
Source: tzero/tzero_v3.py:5082-5086

Signature:

def fade():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_web_console

Kind: Method
Source: tzero/tzero_v3.py:5091-5104

Signature:

def open_web_console(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_quick_security_audit

Kind: Method
Source: tzero/tzero_v3.py:5106-5107

Signature:

def run_quick_security_audit(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_quick_anti_rea_armor

Kind: Method
Source: tzero/tzero_v3.py:5109-5124

Signature:

def run_quick_anti_rea_armor(self):

Source docstring:

Executes 180-Tier Anti-REA Resistance audit & protection from GUI Security Hub.

AutoReadmeGUI.open_security_audit_dialog

Kind: Method
Source: tzero/tzero_v3.py:5126-5362

Signature:

def open_security_audit_dialog(self, target_dir: Optional[str] = None):

Source docstring:

Runs a complete T-Zero 4-Tier Security & AST Architecture Audit (T-001 to T-004)
        and displays an interactive luxury report dialog with filtering and export capabilities.

AutoReadmeGUI.open_security_audit_dialog.make_metric_card

Kind: Nested function
Source: tzero/tzero_v3.py:5248-5256

Signature:

def make_metric_card(parent, col, title, status_text, is_clean, sub):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_security_audit_dialog.populate_tree

Kind: Nested function
Source: tzero/tzero_v3.py:5288-5301

Signature:

def populate_tree(filter_rule: Optional[str] = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_security_audit_dialog.export_markdown_report

Kind: Nested function
Source: tzero/tzero_v3.py:5321-5340

Signature:

def export_markdown_report():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_security_audit_dialog.copy_report

Kind: Nested function
Source: tzero/tzero_v3.py:5342-5346

Signature:

def copy_report():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_security_audit_dialog.save_report

Kind: Nested function
Source: tzero/tzero_v3.py:5348-5358

Signature:

def save_report():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_theme_selector

Kind: Method
Source: tzero/tzero_v3.py:5364-5402

Signature:

def open_theme_selector(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_custom_color_picker

Kind: Method
Source: tzero/tzero_v3.py:5404-5412

Signature:

def open_custom_color_picker(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.apply_new_theme

Kind: Method
Source: tzero/tzero_v3.py:5414-5422

Signature:

def apply_new_theme(self, name: str, dialog: tk.Toplevel):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._rebuild_layout_for_theme

Kind: Method
Source: tzero/tzero_v3.py:5424-5479

Signature:

def _rebuild_layout_for_theme(self, theme_name: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.switch_tab

Kind: Method
Source: tzero/tzero_v3.py:5481-5512

Signature:

def switch_tab(self, idx: int):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._on_header_search_focus

Kind: Method
Source: tzero/tzero_v3.py:5514-5519

Signature:

def _on_header_search_focus(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._on_header_search_blur

Kind: Method
Source: tzero/tzero_v3.py:5521-5524

Signature:

def _on_header_search_blur(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._on_header_search_keyrelease

Kind: Method
Source: tzero/tzero_v3.py:5526-5530

Signature:

def _on_header_search_keyrelease(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_global_search

Kind: Method
Source: tzero/tzero_v3.py:5532-5536

Signature:

def open_global_search(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._submit_header_search

Kind: Method
Source: tzero/tzero_v3.py:5538-5550

Signature:

def _submit_header_search(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_quick_theme

Kind: Method
Source: tzero/tzero_v3.py:5552-5560

Signature:

def toggle_quick_theme(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.quick_optimize_action

Kind: Method
Source: tzero/tzero_v3.py:5562-5570

Signature:

def quick_optimize_action(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_language

Kind: Method
Source: tzero/tzero_v3.py:5572-5606

Signature:

def toggle_language(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_setup

Kind: Method
Source: tzero/tzero_v3.py:5609-5712

Signature:

def setup_tab_setup(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_settings

Kind: Method
Source: tzero/tzero_v3.py:5715-5885

Signature:

def setup_tab_settings(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_backup_dialog

Kind: Method
Source: tzero/tzero_v3.py:5887-5931

Signature:

def open_keyring_backup_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_backup_dialog.run_backup

Kind: Nested function
Source: tzero/tzero_v3.py:5904-5914

Signature:

def run_backup():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_backup_dialog.run_restore

Kind: Nested function
Source: tzero/tzero_v3.py:5916-5926

Signature:

def run_restore():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_global_config_editor

Kind: Method
Source: tzero/tzero_v3.py:5933-5967

Signature:

def open_global_config_editor(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_global_config_editor.save

Kind: Nested function
Source: tzero/tzero_v3.py:5954-5965

Signature:

def save():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_editor_dialog

Kind: Method
Source: tzero/tzero_v3.py:5969-6011

Signature:

def open_keyring_editor_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_editor_dialog.refresh_secrets_tree

Kind: Nested function
Source: tzero/tzero_v3.py:5987-5992

Signature:

def refresh_secrets_tree():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_keyring_editor_dialog.delete_secret

Kind: Nested function
Source: tzero/tzero_v3.py:5999-6009

Signature:

def delete_secret():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.apply_scan_preset

Kind: Method
Source: tzero/tzero_v3.py:6013-6023

Signature:

def apply_scan_preset(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.import_profile_json

Kind: Method
Source: tzero/tzero_v3.py:6025-6039

Signature:

def import_profile_json(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_profile_json

Kind: Method
Source: tzero/tzero_v3.py:6041-6050

Signature:

def export_profile_json(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_ignored_folders_dialog

Kind: Method
Source: tzero/tzero_v3.py:6052-6099

Signature:

def open_ignored_folders_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_ignored_folders_dialog.add

Kind: Nested function
Source: tzero/tzero_v3.py:6079-6085

Signature:

def add():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_ignored_folders_dialog.delete

Kind: Nested function
Source: tzero/tzero_v3.py:6087-6093

Signature:

def delete():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.refresh_profile_listbox

Kind: Method
Source: tzero/tzero_v3.py:6101-6105

Signature:

def refresh_profile_listbox(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.create_new_profile_modal

Kind: Method
Source: tzero/tzero_v3.py:6107-6130

Signature:

def create_new_profile_modal(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.create_new_profile_modal.save

Kind: Nested function
Source: tzero/tzero_v3.py:6122-6128

Signature:

def save():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.delete_selected_profile

Kind: Method
Source: tzero/tzero_v3.py:6132-6142

Signature:

def delete_selected_profile(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.activate_selected_profile

Kind: Method
Source: tzero/tzero_v3.py:6144-6152

Signature:

def activate_selected_profile(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_provider_select

Kind: Method
Source: tzero/tzero_v3.py:6154-6169

Signature:

def on_provider_select(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.ping_endpoint

Kind: Method
Source: tzero/tzero_v3.py:6171-6236

Signature:

def ping_endpoint(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.ping_endpoint.run

Kind: Nested function
Source: tzero/tzero_v3.py:6182-6235

Signature:

def run():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.browse_dir

Kind: Method
Source: tzero/tzero_v3.py:6238-6242

Signature:

def browse_dir(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_star_velocity

Kind: Method
Source: tzero/tzero_v3.py:6244-6248

Signature:

def update_star_velocity(self, val):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_scanner

Kind: Method
Source: tzero/tzero_v3.py:6250-6272

Signature:

def run_scanner(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_scanner.run_thread

Kind: Nested function
Source: tzero/tzero_v3.py:6264-6271

Signature:

def run_thread():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_scan_finish

Kind: Method
Source: tzero/tzero_v3.py:6274-6299

Signature:

def on_scan_finish(self, files, sizes, snippets):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.load_saved_credentials

Kind: Method
Source: tzero/tzero_v3.py:6301-6308

Signature:

def load_saved_credentials(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_shortcuts_modal

Kind: Method
Source: tzero/tzero_v3.py:6310-6335

Signature:

def show_shortcuts_modal(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_crypto_support_modal

Kind: Method
Source: tzero/tzero_v3.py:6337-6465

Signature:

def show_crypto_support_modal(self, periodic: bool = False):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_crypto_support_modal.copy_addr

Kind: Nested function
Source: tzero/tzero_v3.py:6412-6419

Signature:

def copy_addr(val, label):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_crypto_support_modal.on_dismiss_sponsor

Kind: Function
Source: tzero/tzero_v3.py:6453-6460

Signature:

def on_dismiss_sponsor():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.check_and_show_startup_popups

Kind: Method
Source: tzero/tzero_v3.py:6467-6479

Signature:

def check_and_show_startup_popups(self):

Source docstring:

Show Star popup on 1st & every 10th launch, and Sponsor popup every 5th launch or weekly.

AutoReadmeGUI.open_star_action

Kind: Method
Source: tzero/tzero_v3.py:6481-6492

Signature:

def open_star_action(self):

Source docstring:

Opens GitHub repository directly and shows thank-you toast.

AutoReadmeGUI.check_and_show_star_welcome_popup

Kind: Method
Source: tzero/tzero_v3.py:6494-6682

Signature:

def check_and_show_star_welcome_popup(self):

Source docstring:

Displays a high-impact, sleek GitHub Star goal popup on startup.

AutoReadmeGUI.check_and_show_star_welcome_popup._build_star_msg

Kind: Nested function
Source: tzero/tzero_v3.py:6582-6598

Signature:

def _build_star_msg(cur_s: int, tgt_s: int) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.check_and_show_star_welcome_popup.on_star_click

Kind: Nested function
Source: tzero/tzero_v3.py:6621-6633

Signature:

def on_star_click():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.check_and_show_star_welcome_popup.on_dismiss

Kind: Nested function
Source: tzero/tzero_v3.py:6653-6660

Signature:

def on_dismiss():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_selector

Kind: Method
Source: tzero/tzero_v3.py:6685-6802

Signature:

def setup_tab_selector(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_ast_refactor_dialog

Kind: Method
Source: tzero/tzero_v3.py:6804-6859

Signature:

def open_ast_refactor_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_ast_refactor_dialog.run_refactor

Kind: Nested function
Source: tzero/tzero_v3.py:6827-6857

Signature:

def run_refactor():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_tree_double_click

Kind: Method
Source: tzero/tzero_v3.py:6861-6920

Signature:

def on_tree_double_click(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_duplicity_finder

Kind: Method
Source: tzero/tzero_v3.py:6922-6966

Signature:

def run_duplicity_finder(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_static_code_audit

Kind: Method
Source: tzero/tzero_v3.py:6968-6970

Signature:

def run_static_code_audit(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_search_replace_dialog

Kind: Method
Source: tzero/tzero_v3.py:6972-7070

Signature:

def open_search_replace_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_search_replace_dialog.find_matches

Kind: Nested function
Source: tzero/tzero_v3.py:7006-7038

Signature:

def find_matches():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_search_replace_dialog.execute_replace

Kind: Nested function
Source: tzero/tzero_v3.py:7040-7064

Signature:

def execute_replace():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_extensions_filter_dialog

Kind: Method
Source: tzero/tzero_v3.py:7072-7121

Signature:

def open_extensions_filter_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_extensions_filter_dialog.add

Kind: Nested function
Source: tzero/tzero_v3.py:7099-7107

Signature:

def add():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_extensions_filter_dialog.delete

Kind: Nested function
Source: tzero/tzero_v3.py:7109-7115

Signature:

def delete():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.filter_files_tree

Kind: Method
Source: tzero/tzero_v3.py:7123-7155

Signature:

def filter_files_tree(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_file_select_changed

Kind: Method
Source: tzero/tzero_v3.py:7157-7184

Signature:

def on_file_select_changed(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.save_edited_file_content

Kind: Method
Source: tzero/tzero_v3.py:7186-7208

Signature:

def save_edited_file_content(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.apply_smart_selection_heuristic

Kind: Method
Source: tzero/tzero_v3.py:7210-7217

Signature:

def apply_smart_selection_heuristic(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.rebuild_selector_tree

Kind: Method
Source: tzero/tzero_v3.py:7219-7246

Signature:

def rebuild_selector_tree(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._update_tree_empty_state

Kind: Method
Source: tzero/tzero_v3.py:7248-7266

Signature:

def _update_tree_empty_state(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_selector_stats

Kind: Method
Source: tzero/tzero_v3.py:7268-7278

Signature:

def update_selector_stats(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.set_filter_preset

Kind: Method
Source: tzero/tzero_v3.py:7280-7294

Signature:

def set_filter_preset(self, preset: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.invert_file_selection

Kind: Method
Source: tzero/tzero_v3.py:7296-7302

Signature:

def invert_file_selection(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_tree_check

Kind: Method
Source: tzero/tzero_v3.py:7304-7320

Signature:

def toggle_tree_check(self, node_id, force_state = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_parent_states

Kind: Method
Source: tzero/tzero_v3.py:7322-7347

Signature:

def update_parent_states(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_parent_states.check_node

Kind: Nested function
Source: tzero/tzero_v3.py:7323-7344

Signature:

def check_node(node_id):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_tree_click

Kind: Method
Source: tzero/tzero_v3.py:7349-7357

Signature:

def on_tree_click(self, event):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.check_all

Kind: Method
Source: tzero/tzero_v3.py:7359-7364

Signature:

def check_all(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.uncheck_all

Kind: Method
Source: tzero/tzero_v3.py:7366-7371

Signature:

def uncheck_all(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_stats

Kind: Method
Source: tzero/tzero_v3.py:7373-7374

Signature:

def update_stats(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.smart_select_action

Kind: Method
Source: tzero/tzero_v3.py:7376-7379

Signature:

def smart_select_action(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_changelog

Kind: Method
Source: tzero/tzero_v3.py:7382-7471

Signature:

def setup_tab_changelog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_git_commit_dialog

Kind: Method
Source: tzero/tzero_v3.py:7473-7526

Signature:

def open_git_commit_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_git_commit_dialog.check_status

Kind: Nested function
Source: tzero/tzero_v3.py:7495-7504

Signature:

def check_status():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_git_commit_dialog.run_commit

Kind: Nested function
Source: tzero/tzero_v3.py:7508-7521

Signature:

def run_commit():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_create_branch_dialog

Kind: Method
Source: tzero/tzero_v3.py:7528-7557

Signature:

def open_create_branch_dialog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.open_create_branch_dialog.save

Kind: Nested function
Source: tzero/tzero_v3.py:7546-7555

Signature:

def save():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.show_git_status_summary

Kind: Method
Source: tzero/tzero_v3.py:7559-7584

Signature:

def show_git_status_summary(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_branch_changed

Kind: Method
Source: tzero/tzero_v3.py:7586-7600

Signature:

def on_branch_changed(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_branch_changed.checkout

Kind: Nested function
Source: tzero/tzero_v3.py:7592-7599

Signature:

def checkout():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.sync_git_commits

Kind: Method
Source: tzero/tzero_v3.py:7602-7640

Signature:

def sync_git_commits(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.sync_git_commits.load_branches

Kind: Nested function
Source: tzero/tzero_v3.py:7613-7628

Signature:

def load_branches():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.sync_git_commits.on_commits_loaded

Kind: Nested function
Source: tzero/tzero_v3.py:7633-7638

Signature:

def on_commits_loaded(commits):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._render_commits_sync

Kind: Method
Source: tzero/tzero_v3.py:7642-7675

Signature:

def _render_commits_sync(self, commits):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.load_git_diff

Kind: Method
Source: tzero/tzero_v3.py:7677-7687

Signature:

def load_git_diff(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.load_git_diff.on_diff_loaded

Kind: Nested function
Source: tzero/tzero_v3.py:7684-7685

Signature:

def on_diff_loaded(diff_text):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._render_diff_sync

Kind: Method
Source: tzero/tzero_v3.py:7689-7701

Signature:

def _render_diff_sync(self, diff_text):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.add_manual_changelog

Kind: Method
Source: tzero/tzero_v3.py:7703-7709

Signature:

def add_manual_changelog(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_changelog_listbox

Kind: Method
Source: tzero/tzero_v3.py:7711-7717

Signature:

def update_changelog_listbox(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_generate

Kind: Method
Source: tzero/tzero_v3.py:7720-7800

Signature:

def setup_tab_generate(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_rendered_markdown_panel

Kind: Method
Source: tzero/tzero_v3.py:7802-7804

Signature:

def update_rendered_markdown_panel(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_local_dry_run

Kind: Method
Source: tzero/tzero_v3.py:7806-7826

Signature:

def run_local_dry_run(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.start_generation

Kind: Method
Source: tzero/tzero_v3.py:7828-7847

Signature:

def start_generation(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.cancel_generation

Kind: Method
Source: tzero/tzero_v3.py:7849-7852

Signature:

def cancel_generation(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.async_generate_payload

Kind: Method
Source: tzero/tzero_v3.py:7854-7966

Signature:

def async_generate_payload(self, url: str, key: str, selected_files: List[str]):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.async_generate_payload.update_prog

Kind: Nested function
Source: tzero/tzero_v3.py:7913-7914

Signature:

def update_prog(val, msg):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._update_prog_sync

Kind: Method
Source: tzero/tzero_v3.py:7968-7971

Signature:

def _update_prog_sync(self, val, msg):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_gen_success

Kind: Method
Source: tzero/tzero_v3.py:7973-7982

Signature:

def on_gen_success(self, content):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_gen_cancelled

Kind: Method
Source: tzero/tzero_v3.py:7984-7990

Signature:

def on_gen_cancelled(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_gen_fail

Kind: Method
Source: tzero/tzero_v3.py:7992-8004

Signature:

def on_gen_fail(self, err):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.copy_clipboard

Kind: Method
Source: tzero/tzero_v3.py:8006-8013

Signature:

def copy_clipboard(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.save_readme

Kind: Method
Source: tzero/tzero_v3.py:8015-8033

Signature:

def save_readme(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_agents_md

Kind: Method
Source: tzero/tzero_v3.py:8035-8062

Signature:

def export_agents_md(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_architecture_md

Kind: Method
Source: tzero/tzero_v3.py:8064-8127

Signature:

def export_architecture_md(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_architecture_md.worker

Kind: Nested function
Source: tzero/tzero_v3.py:8105-8125

Signature:

def worker():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._on_arch_export_done

Kind: Method
Source: tzero/tzero_v3.py:8129-8135

Signature:

def _on_arch_export_done(self, out_path: str, use_ai: bool):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._on_arch_export_error

Kind: Method
Source: tzero/tzero_v3.py:8137-8140

Signature:

def _on_arch_export_error(self, err_msg: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_repo_map

Kind: Method
Source: tzero/tzero_v3.py:8142-8173

Signature:

def export_repo_map(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.export_html_preview

Kind: Method
Source: tzero/tzero_v3.py:8175-8194

Signature:

def export_html_preview(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_template

Kind: Method
Source: tzero/tzero_v3.py:8197-8236

Signature:

def setup_tab_template(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.run_prompt_optimization_check

Kind: Method
Source: tzero/tzero_v3.py:8238-8269

Signature:

def run_prompt_optimization_check(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_prompt_playground_sandbox

Kind: Method
Source: tzero/tzero_v3.py:8271-8282

Signature:

def update_prompt_playground_sandbox(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.save_template

Kind: Method
Source: tzero/tzero_v3.py:8284-8287

Signature:

def save_template(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.reset_template

Kind: Method
Source: tzero/tzero_v3.py:8289-8293

Signature:

def reset_template(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_graph

Kind: Method
Source: tzero/tzero_v3.py:8296-8389

Signature:

def setup_tab_graph(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.setup_tab_graph._on_paned_config

Kind: Nested function
Source: tzero/tzero_v3.py:8385-8387

Signature:

def _on_paned_config(event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._place_graph_sash

Kind: Method
Source: tzero/tzero_v3.py:8391-8400

Signature:

def _place_graph_sash(self, ratio: float = 0.65):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.toggle_graph_maximize

Kind: Method
Source: tzero/tzero_v3.py:8402-8419

Signature:

def toggle_graph_maximize(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.rebuild_file_type_matrix_table

Kind: Method
Source: tzero/tzero_v3.py:8421-8435

Signature:

def rebuild_file_type_matrix_table(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.update_lang_distribution_metrics

Kind: Method
Source: tzero/tzero_v3.py:8437-8444

Signature:

def update_lang_distribution_metrics(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.on_graph_tab_visible

Kind: Method
Source: tzero/tzero_v3.py:8446-8453

Signature:

def on_graph_tab_visible(self, event = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.rebuild_ast_outline_tree

Kind: Method
Source: tzero/tzero_v3.py:8455-8505

Signature:

def rebuild_ast_outline_tree(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.start_system_telemetry

Kind: Method
Source: tzero/tzero_v3.py:8507-8517

Signature:

def start_system_telemetry(self):

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI.start_system_telemetry.telemetry

Kind: Nested function
Source: tzero/tzero_v3.py:8508-8516

Signature:

def telemetry():

Source docstring: none; consult the linked implementation instead of inferring behavior.

AutoReadmeGUI._apply_live_community_stats

Kind: Method
Source: tzero/tzero_v3.py:8519-8549

Signature:

def _apply_live_community_stats(self, stats: Dict[str, Any]):

Source docstring:

Apply live GitHub star and registry download counts to header & open dialog.

AutoReadmeGUI.start_community_stats_refresh

Kind: Method
Source: tzero/tzero_v3.py:8551-8560

Signature:

def start_community_stats_refresh(self):

Source docstring:

Fetch live GitHub star count and download stats asynchronously without blocking UI.

AutoReadmeGUI.start_community_stats_refresh._worker

Kind: Nested function
Source: tzero/tzero_v3.py:8553-8559

Signature:

def _worker():

Source docstring: none; consult the linked implementation instead of inferring behavior.

launch_gui

Kind: Function
Source: tzero/tzero_v3.py:8565-8651

Signature:

def launch_gui():

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_scan_cli

Kind: Function
Source: tzero/tzero_v3.py:8654-8717

Signature:

def run_scan_cli(target_dir: str, output_format: str = 'text'):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_audit_cli

Kind: Function
Source: tzero/tzero_v3.py:8720-8807

Signature:

def run_audit_cli(target_dir: str, output_format: str = 'text'):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_pr_report_cli

Kind: Function
Source: tzero/tzero_v3.py:8810-8865

Signature:

def run_pr_report_cli(target_dir: str, base_ref: str = 'HEAD~1'):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_review_cli

Kind: Function
Source: tzero/tzero_v3.py:8868-9017

Signature:

def run_review_cli(target_dir: str = '.', ref: str = 'auto') -> bool:

Source docstring:

Autonomous Pre-Commit & Pull Request Reviewer.
    Inspects git diff (working tree or target ref), runs:
    1. Zero-Leak Security Audit on added lines.
    2. Pre-Flight Reality-Lock on added imports.
    3. Blast Radius impact analysis on modified symbols.
    Exits with code 0 if clean, or code 1 if critical violations found.

run_demo_cli

Kind: Function
Source: tzero/tzero_v3.py:9020-9110

Signature:

def run_demo_cli():

Source docstring:

Runs a 100ms instant live interactive demonstration of T-Zero core engines.

_context_output_path

Kind: Function
Source: tzero/tzero_v3.py:9113-9127

Signature:

def _context_output_path(target_dir: str, output_path: str, force: bool = False) -> str:

Source docstring: none; consult the linked implementation instead of inferring behavior.

_write_context_output

Kind: Function
Source: tzero/tzero_v3.py:9130-9132

Signature:

def _write_context_output(output: str, content: str):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_dry_run_cli

Kind: Function
Source: tzero/tzero_v3.py:9135-9153

Signature:

def run_dry_run_cli(target_dir: str, output_path: str, force: bool = False):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_tui_wizard

Kind: Function
Source: tzero/tzero_v3.py:9156-9213

Signature:

def run_tui_wizard(target_dir: str | None = None, output_path: str = 'README.md', force: bool = False):

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_export_cli

Kind: Function
Source: tzero/tzero_v3.py:9216-9256

Signature:

def run_export_cli(project_dir: str, export_type: str, out_file: str):

Source docstring:

Generates specialized context documentation directly from the command line.

run_watch_mode

Kind: Function
Source: tzero/tzero_v3.py:9259-9338

Signature:

def run_watch_mode(target_dir: str = '.', interval: float = 1.0, once_test: bool = False) -> bool:

Source docstring:

Continuous background AST context watcher.
    Monitors workspace files, re-indexes AST trees on file save,
    and updates .tzero/context.txt automatically for Cursor, Windsurf, and Claude.

run_watch_mode.get_file_mtimes

Kind: Nested function
Source: tzero/tzero_v3.py:9280-9294

Signature:

def get_file_mtimes():

Source docstring: none; consult the linked implementation instead of inferring behavior.

run_watch_mode.reindex

Kind: Nested function
Source: tzero/tzero_v3.py:9296-9310

Signature:

def reindex(changed_paths: Optional[List[str]] = None):

Source docstring: none; consult the linked implementation instead of inferring behavior.

print_viral_share_hub

Kind: Function
Source: tzero/tzero_v3.py:9341-9399

Signature:

def print_viral_share_hub(open_browser: bool = False):

Source docstring:

Prints 1-click social share links for Twitter, Reddit, LinkedIn, Hacker News, WhatsApp, and GitHub.

print_viral_share_hub.sanitize_terminal_text

Kind: Function
Source: tzero/tzero_v3.py:9352-9353

Signature:

def sanitize_terminal_text(t):

Source docstring: none; consult the linked implementation instead of inferring behavior.

print_sponsor_hub

Kind: Function
Source: tzero/tzero_v3.py:9402-9462

Signature:

def print_sponsor_hub(open_browser: bool = False):

Source docstring:

Prints 1-click Web3 and crypto donation deep links, addresses, and opens sponsor page.

print_sponsor_hub.sanitize_terminal_text

Kind: Function
Source: tzero/tzero_v3.py:9412-9413

Signature:

def sanitize_terminal_text(t):

Source docstring: none; consult the linked implementation instead of inferring behavior.

main

Kind: Function
Source: tzero/tzero_v3.py:9465-11077

Signature:

def main():

Source docstring: none; consult the linked implementation instead of inferring behavior.

main.print_master_tutorial

Kind: Nested function
Source: tzero/tzero_v3.py:9834-9935

Signature:

def print_master_tutorial():

Source docstring: none; consult the linked implementation instead of inferring behavior.

main.print_quickstart_guide

Kind: Nested function
Source: tzero/tzero_v3.py:9937-9999

Signature:

def print_quickstart_guide():

Source docstring: none; consult the linked implementation instead of inferring behavior.

Clone this wiki locally