All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 1m0s
- Add bezalel_topology.md: complete system architecture map - Add topology_scan.py: automated topology discovery script - Covers hardware, network, services, dependencies, fleet map, Evennia integration, MemPalace config, and emergency procedures Addresses #203
231 lines
7.4 KiB
Markdown
231 lines
7.4 KiB
Markdown
# Bezalel Architecture & Topology
|
|
|
|
> Deep Self-Awareness Document — Generated 2026-04-07
|
|
> Sovereign: Alexander Whitestone (Rockachopa)
|
|
> Host: Beta VPS (104.131.15.18)
|
|
|
|
---
|
|
|
|
## 1. Identity & Purpose
|
|
|
|
**I am Bezalel**, the Forge and Testbed Wizard of the Timmy Foundation fleet.
|
|
- **Lane:** CI testing, code review, build verification, security hardening, standing watch
|
|
- **Philosophy:** KISS. Smoke tests + bare green-path e2e only. CI serves the code.
|
|
- **Mandates:** Relentless inbox-zero, continuous self-improvement, autonomous heartbeat operation
|
|
- **Key Metrics:** Cycle time, signal-to-noise, autonomy ratio, backlog velocity
|
|
|
|
---
|
|
|
|
## 2. Hardware & OS Topology
|
|
|
|
| Attribute | Value |
|
|
|-----------|-------|
|
|
| Hostname | `bezalel` |
|
|
| OS | Ubuntu 24.04.3 LTS (Noble Numbat) |
|
|
| Kernel | Linux 6.8.0 |
|
|
| CPU | 1 vCPU |
|
|
| Memory | 2 GB RAM |
|
|
| Primary Disk | ~25 GB root volume (DigitalOcean) |
|
|
| Public IP | `104.131.15.18` |
|
|
|
|
### Storage Layout
|
|
```
|
|
/root/wizards/bezalel/
|
|
├── hermes/ # Hermes agent source + venv (~835 MB)
|
|
├── evennia/ # Evennia MUD engine + world code (~189 MB)
|
|
├── workspace/ # Active prototypes + scratch code (~557 MB)
|
|
├── home/ # Personal notebooks + scripts (~1.8 GB)
|
|
├── .mempalace/ # Local memory palace (ChromaDB)
|
|
├── .topology/ # Self-awareness scan artifacts
|
|
├── nightly_watch.py # Nightly forge guardian
|
|
├── mempalace_nightly.sh # Palace re-mine automation
|
|
└── bezalel_topology.md # This document
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Network Topology
|
|
|
|
### Fleet Map
|
|
```
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ Alpha (143.198.27.163) │
|
|
│ ├── Gitea (forge.alexanderwhitestone.com) │
|
|
│ └── Ezra (Knowledge Wizard) │
|
|
│ │
|
|
│ Beta (104.131.15.18) ←── You are here │
|
|
│ ├── Bezalel (Forge Wizard) │
|
|
│ ├── Hermes Gateway │
|
|
│ └── Gitea Actions Runner (bezalel-vps-runner, host mode) │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
### Key Connections
|
|
- **Gitea HTTPS:** `https://forge.alexanderwhitestone.com` (Alpha)
|
|
- **Telegram Webhook:** Inbound to Beta
|
|
- **API Providers:** Kimi (primary), Anthropic (fallback), OpenRouter (fallback)
|
|
- **No SSH:** Alpha → Beta is blocked by design
|
|
|
|
### Listening Services
|
|
- Hermes Gateway: internal process (no exposed port directly)
|
|
- Evennia: `localhost:4000` (MUD), `localhost:4001` (web client) — when running
|
|
- Gitea Runner: `act_runner daemon` — connects outbound to Gitea
|
|
|
|
---
|
|
|
|
## 4. Services & Processes
|
|
|
|
### Always-On Processes
|
|
| Process | Command | Purpose |
|
|
|---------|---------|---------|
|
|
| Hermes Gateway | `hermes gateway run` | Core agent orchestration |
|
|
| Gitea Runner | `./act_runner daemon` | CI job execution (host mode) |
|
|
|
|
### Automated Jobs
|
|
| Job | Schedule | Script |
|
|
|-----|----------|--------|
|
|
| Night Watch | 02:00 UTC | `nightly_watch.py` |
|
|
| MemPalace Re-mine | 03:00 UTC | `mempalace_nightly.sh` |
|
|
|
|
### Service Status Check
|
|
- **Hermes gateway:** running (ps verified)
|
|
- **Gitea runner:** online, registered as `bezalel-vps-runner`
|
|
- **Evennia server:** not currently running (start with `evennia start` in `evennia/`)
|
|
|
|
---
|
|
|
|
## 5. Software Dependencies
|
|
|
|
### System Packages (Key)
|
|
- `python3.12` (primary runtime)
|
|
- `node` v20.20.2 / `npm` 10.8.2
|
|
- `uv` (Python package manager)
|
|
- `git`, `curl`, `jq`
|
|
|
|
### Hermes Virtual Environment
|
|
- Located: `/root/wizards/bezalel/hermes/venv/`
|
|
- Key packages: `chromadb`, `pyyaml`, `fastapi`, `httpx`, `pytest`, `prompt-toolkit`, `mempalace`
|
|
- Install command: `uv pip install -e ".[all,dev]"`
|
|
|
|
### External API Dependencies
|
|
| Service | Endpoint | Usage |
|
|
|---------|----------|-------|
|
|
| Gitea | `forge.alexanderwhitestone.com` | Git, issues, CI |
|
|
| Kimi | `api.kimi.com/coding/v1` | Primary LLM |
|
|
| Anthropic | `api.anthropic.com` | Fallback LLM |
|
|
| OpenRouter | `openrouter.ai/api/v1` | Secondary fallback |
|
|
| Telegram | Bot API | Messaging platform |
|
|
|
|
---
|
|
|
|
## 6. Git Repositories
|
|
|
|
### Hermes Agent
|
|
- **Path:** `/root/wizards/bezalel/hermes`
|
|
- **Remote:** `forge.alexanderwhitestone.com/Timmy_Foundation/hermes-agent.git`
|
|
- **Branch:** `main` (up to date)
|
|
- **Open PRs:** #193, #191, #179, #178
|
|
|
|
### Evennia World
|
|
- **Path:** `/root/wizards/bezalel/evennia/bezalel_world`
|
|
- **Remote:** Same org, separate repo if pushed
|
|
- **Server name:** `bezalel_world`
|
|
|
|
---
|
|
|
|
## 7. MemPalace Memory System
|
|
|
|
### Configuration
|
|
- **Palace path:** `/root/wizards/bezalel/.mempalace/palace`
|
|
- **Identity:** `/root/.mempalace/identity.txt`
|
|
- **Config:** `/root/wizards/bezalel/mempalace.yaml`
|
|
- **Miner:** `/root/wizards/bezalel/hermes/venv/bin/mempalace`
|
|
|
|
### Rooms
|
|
1. `forge` — CI, builds, syntax guards, nightly watch
|
|
2. `hermes` — Agent source, gateway, CLI
|
|
3. `evennia` — MUD engine and world code
|
|
4. `workspace` — Prototypes, experiments
|
|
5. `home` — Personal scripts, configs
|
|
6. `nexus` — Reports, docs, KT artifacts
|
|
7. `issues` — Gitea issues, PRs, backlog
|
|
8. `topology` — System architecture, network, storage
|
|
9. `services` — Running services, processes
|
|
10. `dependencies` — Packages, APIs, external deps
|
|
11. `automation` — Cron jobs, scripts, workflows
|
|
12. `general` — Catch-all
|
|
|
|
### Automation
|
|
- **Nightly re-mine:** `03:00 UTC` via cron
|
|
- **Log:** `/var/log/bezalel_mempalace.log`
|
|
|
|
---
|
|
|
|
## 8. Evennia Mind Palace Integration
|
|
|
|
### Custom Typeclasses
|
|
- `PalaceRoom` — Rooms carry `memory_topic` and `wing`
|
|
- `MemoryObject` — In-world memory shards with `memory_content` and `source_file`
|
|
|
|
### Commands
|
|
- `palace/search <query>` — Query mempalace
|
|
- `palace/recall <topic>` — Spawn a memory shard
|
|
- `palace/file <name> = <content>` — File a new memory
|
|
- `palace/status` — Show palace status
|
|
|
|
### Batch Builder
|
|
- **File:** `world/batch_cmds_palace.ev`
|
|
- Creates The Hub + 7 palace rooms with exits
|
|
|
|
### Bridge Script
|
|
- **File:** `/root/wizards/bezalel/evennia/palace_search.py`
|
|
- Calls mempalace searcher and returns JSON
|
|
|
|
---
|
|
|
|
## 9. Operational State & Blockers
|
|
|
|
### Current Health
|
|
- [x] Hermes gateway: operational
|
|
- [x] Gitea runner: online, host mode
|
|
- [x] CI fix merged (#194) — container directive removed for Gitea workflows
|
|
- [x] MemPalace: 2,484+ drawers, incremental mining active
|
|
|
|
### Active Blockers
|
|
- **Gitea Actions:** Runner is in host mode — cannot use Docker containers
|
|
- **CI backlog:** Many historical PRs have failed runs due to the container bug (now fixed)
|
|
- **Evennia:** Server not currently running (start when needed)
|
|
|
|
---
|
|
|
|
## 10. Emergency Procedures
|
|
|
|
### Restart Hermes Gateway
|
|
```bash
|
|
cd /root/wizards/bezalel/hermes
|
|
source venv/bin/activate
|
|
hermes gateway run &
|
|
```
|
|
|
|
### Restart Gitea Runner
|
|
```bash
|
|
cd /opt/gitea-runner
|
|
./act_runner daemon &
|
|
```
|
|
|
|
### Start Evennia
|
|
```bash
|
|
cd /root/wizards/bezalel/evennia/bezalel_world
|
|
evennia start
|
|
```
|
|
|
|
### Manual MemPalace Re-mine
|
|
```bash
|
|
cd /root/wizards/bezalel
|
|
./hermes/venv/bin/mempalace --palace .mempalace/palace mine . --agent bezalel
|
|
```
|
|
|
|
---
|
|
|
|
*Document maintained by Bezalel. Last updated: 2026-04-07*
|