LOGOS-SPCW-Matroska / logos /logos_suite.py
GitHub Copilot
Protocol 45: Hex Dissolution & Suite Restoration
f94712a
import sys
import os
import time
# Ensure logos in path
# If running as script, parent dir needed
current_dir = os.path.dirname(os.path.abspath(__file__))
parent_dir = os.path.dirname(current_dir)
if parent_dir not in sys.path:
sys.path.insert(0, parent_dir)
def main_menu():
print("\n")
print("========================================")
print(" LOGOS STRATOS - MANIFOLD LAUNCHER ")
print("========================================")
print("1. Start Neural Router (Server)")
print("2. Launch MTL REPL (Interactive)")
print("3. Ingest File (Hex Dissolution)")
print("4. Exit")
print("========================================")
choice = input(">> Select Directive: ")
if choice == '1':
print(">> Igniting Neural Router...")
# Use subprocess to run module
os.system(f"{sys.executable} -m logos.server")
elif choice == '2':
print(">> Accessing Manifold REPL...")
try:
from logos.mtl.interpreter import MTLInterpreter
interpreter = MTLInterpreter()
print("MTL v33.0 Ready. (Type 'exit' to quit)")
while True:
code = input("mtl> ")
if code.lower() in ['exit', 'quit']: break
try:
res = interpreter.execute(code)
print(f"=> {res}")
except Exception as ex:
print(f"Error: {ex}")
except Exception as e:
print(f"REPL Error: {e}")
input("Press Enter...")
elif choice == '3':
print(">> [INGEST] Enter path to target file (Image/Video/Text):")
target_path = input(" >> Path: ").strip().strip('"')
try:
from logos.ingest.dissolution import DissolutionCore
core = DissolutionCore()
print(">> Engaging Dissolution Protocols...")
report = core.ingest_file(target_path)
print("\n" + "="*40)
print(f" [STATUS] {report['status']}")
print(f" [ATOMS] {report['total_atoms']}")
print(f" [HEAT] {report['average_heat']} (Avg GPF)")
print(f" [RESONANCE] {report['dominant_resonance']}")
print(f" [ENTROPY] {report['system_entropy']}")
print(f" [HEAD] {report['hex_preview']}...")
print("="*40 + "\n")
except Exception as e:
print(f"[!] DISSOLUTION FAILED: {e}")
input("Press Enter to stabilize...")
elif choice == '4':
sys.exit(0)
else:
pass # loop
if __name__ == "__main__":
while True:
try:
main_menu()
except KeyboardInterrupt:
sys.exit(0)