Metadata-Version: 2.4
Name: rt-interceptor
Version: 0.0.1
Summary: The ultimate low-overhead runtime hypervisor: Debugger + Logger + Profiler inside CPython engine
Author-email: To_ri239 <iliaiva2015@yandex.ru>
License-Expression: Apache-2.0
Keywords: egg,bacon,sausage,tomatoes,debugger,profiler,logging
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: System :: Logging
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: absl-py>=2.1.0
Requires-Dist: itsdangerous>=2.2.0
Requires-Dist: python-socketio>=5.11.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: regex>=2024.5.15
Requires-Dist: PyQt6>=6.5.0
Dynamic: license-file

# 🛸 rt-interceptor (Production-Grade Runtime Hypervisor)

> **The Ultimate Low-Overhead Diagnostic Toolchain: Fusing Live Debugging, Telemetry rt-interceptoring, and Nanosecond-Precision Profiling inside the CPython Core Engine.**

[![Python Version](https://img.shields.io/badge/Python-3.12-blue.svg)](https://www.python.org/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/license/apache-2-0/)
[![Build: Production](https://img.shields.io/badge/Build-Production-orange.svg)](https://pypi.org/)

**rt-interceptor** is an autonomous, high-performance systems-programming hybrid engineered to diagnose...

---

## 🧬 System Architecture & Infrastructure

The framework integrates industry-leading backend utilities to ensure high speed, thread isolation, and absolute crash integrity:

```text
   [ CPython Runtime Exception Triggered ]
                     │
     [ Core Hypervisor Interception Layer ]
                     │
    ┌────────────────┴────────────────┐
    │                                 │
[ Vectorized Text Engine ]   [ Hardware-Accelerated UI ]
- NumPy Matrix Formatter     - PyQt6 Event Loop Engine
- ASCII Tree Generator       - High-DPI Quad-Frame Mapper
    │                                 │
    └────────────────┬────────────────┘
                     │
 [ Secure Cryptographic Telemetry Pipeline ]
 - Pure Python Recursive PyTree Object Mapping (O(1))
 - HMAC-SHA1 Digital Payload Signing
 - OS-Level DBM Fault-Tolerant Cache Storage
```

*   **CPython Core Frame Traversal (`collections`, `itertools`)** — Executes upward and downward call-stack layout exploration with strict O(1) time complexity and zero memory allocation side-effects.
*   **Vectorized Layout Engine (`NumPy`)** — Bypasses native Python string loops completely. Employs vectorized array transformations to dynamically calculate precise terminal widths and align ASCII table boundaries pixel-for-pixel.
*   **High-Performance UI Layout (`PyQt6>=6.5.0`)** — Establishes a hardware-accelerated, High-DPI responsive debugger interface running a dedicated C++ event loop within the recovered address space.
*   **Zero-Dependency PyTree Mapping** — Implements a custom, ultra-fast recursive object mapping pipeline on pure Python for rapid ANSI escape sequence removal and dictionary structural flattening.
*   **Cryptographic Vault (`itsdangerous`)** — Protects outbound diagnostics by signing payloads with custom HMAC-SHA1 digital footprints and automated 24-hour quantum key rotation cycles.
*   **Fault-Tolerant Cache Store (`dbm`)** — Implements an OS-level native binary key-value caching layer. If network sockets drop, diagnostics are immediately sealed to the local storage disk and re-sent automatically upon reconnection.

---

## 🛠️ Workspace Framework: CLI vs GUI

The toolkit is completely self-contained and exposes two distinct diagnostic control modalities:

### 1. Interactive CLI Mode (Laser Stack-Frame Navigation)
When a fatal exception is encountered, the hypervisor suspends the execution thread and opens an interactive, LLDB-inspired control shell directly within the crash epicenter (`last_tb.tb_next`):
*   `>>> data` — Instantly inspects local variable metrics within the crashed scope.
*   `>>> [rt-interceptorer settings] to ClassName` — Fires a stack-frame tracking scan upward to execute an atomic scope jump directly into a targeted class or method context.
*   `>>> [rt-interceptorer settings] set param level as 'DEBUG'` — Mutates active attributes of the live `rt-interceptorer` object instance directly in RAM during the incident.
*   `>>> [rt-interceptorer settings] out function_name` — Traces the tracking frame down the call stack, returning smoothly to the root of the error.

### 2. GUI Mode (Quad-Frame Memory Isolation Workspace)
Deploys a multi-tier graphical debugger console driven by native Qt6 widgets. It intercepts the execution state and populates four isolated, deep memory inspection views:
*   `🚀 Upper Launcher` — Maps host ecosystem startup operations (`test.py`) up to the package entry point boundary.
*   `🏠 Main Process` — Isolates pure user sandbox variables, filtering out third-party global module noise automatically.
*   `🛡️ Root Process` — Monitors internal hypervisor code frames running inside the package log directory.
*   `⚙️ System Environment` — Reflects live interpreter runtime metadata (nanosecond performance timestamps, active loops, and frame counters).

---

## 🚀 Installation & Quick Start

### Package Deployment
```bash
pip install rt-interceptor
```

### Script Execution via Google Abseil CLI
Inject the monitoring hook globally by invoking the command block inside your terminal or PowerShell:

```powershell
# Launch the armored terminal debugger console (CLI Mode)
rt-interceptor --level=critical --target_file=app.py --shell=false

# Deploy the hardware-accelerated Quad-Frame GUI (GUI Mode)
rt-interceptor --level=critical --target_file=app.py --shell=true
```

---

## 🧠 Production Implementation Model (`app.py`)

The automated injection routine optimizes memory by executing a byte-level pre-warming sequence for all dependent workspace files (via `linecache.cache`) before executing the isolated runtime sandbox `__exec_sandbox__`:

```python
import sys
import interceptor

# Inject the runtime instrumentation block at the application headspace
interceptor.global_logging(level='CRITICAL', file=sys.stderr, auto_reset=True, shell=False)

class Core:
    def __init__(self, value: int) -> None:
        self.value = value

    def process_data(self) -> float:
        return trigger_panic_func(self.value)

def trigger_panic_func(data: int) -> float:
    # Epicenter of the core runtime explosion
    return data / 0

core = Core(value=42)
core.process_data()
```

### Vectorized Terminal Output Matrix:
```text
[INFO][2026-10-02 17:40:18.446]: global rt-interceptoring started in file: test
[INFO][2026-10-02 17:40:18.446571]: rt-interceptorer started with params: 
	level = CRITICAL
	recursive = False
	auto_reset = True.
The param 'file' is written at the end of the log
[INFO][2026-10-02 17:40:18.446621]: Settings reset

🚨 [KERNEL PANIC REPL] System frozen at the crash epicenter. Local variables are accessible:
>>> 
```

---

## 📜 License, Liability & Brand Protection

**Copyright (c) 2026 To_ri239.**

Distributed under the **Apache License 2.0**.

*Usage Authorization Constraints:* You are granted full rights to modify, repackage, and embed this hypervisor toolchain within any closed, open, or enterprise commercial infrastructures under the **strict, mandatory condition that the original name of the Lead Architect, To_ri239, remains completely unedited, visible, and intact across all codebase distributions, headers, and package metadata.**
