Rendering markdown & diagrams...
   1  # NeuralOS Distributed Grid — System Architecture
   2  
   3  **Author**: Chief Architect Shubham  
   4  **Primary Nodes**: 
   5  - **Master Brain**: Apple Silicon M4 (16 GB Unified Memory, Metal GPU)
   6  - **Tactical Body**: Dell Inspiron 3521 (`dell-ss`, Ubuntu 26.04 LTS, 7.1 GB RAM)
   7  
   8  ---
   9  
  10  ## 1. High-Level Architecture
  11  
  12  ```
  13     [ Chief Architect Shubham ]
  14                 │
  15                 ▼ (Telegram @nova_38_bot)
  16  ┌────────────────────────────────────────────────────────┐
  17  │                   DELL NODE-01 (dell-ss)               │
  18  │                                                        │
  19  │   ┌────────────────────────────────────────────────┐   │
  20  │   │ PicoClaw Edge Gateway (:18790)                 │   │
  21  │   └───────────────────────┬────────────────────────┘   │
  22  │                           │ HTTP /v1                   │
  23  │   ┌───────────────────────▼────────────────────────┐   │
  24  │   │ Laya System 1 Intent Gateway (:18792)          │   │
  25  │   │  • 0.5ms Non-Autoregressive Classifier        │   │
  26  │   │  • Deterministic Edge Action Dispatcher        │   │
  27  │   │  • Output Bypass Formatter (Zero LLM delay)    │   │
  28  │   └──┬─────────────┬──────────────┬──────────────┬─┘   │
  29  │      │             │              │              │     │
  30  │      ▼             ▼              ▼              ▼     │
  31  │ [web-search] [torrent-search] [deep-search] [graph-rag]│
  32  │  (DDG/Tor)    (Cinemeta/Tor)   (Multi-Tor)   (NetworkX)│
  33  │      │             │              │              │     │
  34  │      └─────────────┴──────┬───────┴──────────────┘     │
  35  │                           │                            │
  36  │              Tor SOCKS5 Proxy (:9050)                  │
  37  └───────────────────────────┼────────────────────────────┘
  38                              │ Conversational Turn /
  39                              │ 768-dim Embeddings
  40                              ▼ (SSH Reverse Tunnel :11434)
  41  ┌────────────────────────────────────────────────────────┐
  42  │               APPLE SILICON M4 (Master Brain)          │
  43  │                                                        │
  44  │   • Ollama Inference Server (:11434)                   │
  45  │   • Granite 3.2 2B Abliterated (Metal GPU @ 161 tok/s) │
  46  │   • EmbeddingGemma-2 (768-dim Multimodal Vector Space) │
  47  └────────────────────────────────────────────────────────┘
  48  ```
  49  
  50  ---
  51  
  52  ## 2. Core Operational Components
  53  
  54  1. **Laya Gateway (`:18792`)**:
  55     - Written in lightweight Python (< 2MB RAM).
  56     - Classifies user intent in 0.5ms.
  57     - Bypasses autoregressive LLM output formatting on bash commands.
  58  
  59  2. **Unified Graph RAG & Gemma-2 Vector Space**:
  60     - In-memory `NetworkX` directed multi-graph for multi-hop relational discovery.
  61     - Persistent SQLite DB at `/var/neural_memory/data/graph_rag.db`.
  62     - 768-dim vector embeddings generated via `embeddinggemma-2`.
  63     - 138 initial nodes (98 AI research skills, 6 agent roles, torrents, preferences).
  64  
  65  3. **Anonymous Web & Torrent Search**:
  66     - `web-search`: DuckDuckGo Lite queried over Tor (`127.0.0.1:9050`).
  67     - `torrent-search`: Cinemeta IMDb resolution + Torrentio aggregator over Tor.
  68     - `deep-search`: Multi-tracker scraper (ThePirateBay API, Torrentio, YTS).
  69  
  70  4. **Media Streaming Stack**:
  71     - TorrServer on port `:8090`.
  72     - Stremio Catalog Addon on port `:7000`.
  73