interplane.Get Omega
Read in your language

mobhub

Decentralized model and agent weights distribution network

Brought by drakestapleton

branch main Branches Tags History

mobhub / README.md

98 lines · 3703 bytes Raw Blame History Source

MobHub

Ultra-high-performance native Rust and Mojo rewrite of the MobHub faction operations engine for Torn City.

Replaces the legacy Node.js/Next.js implementation with compiled native binaries, embedded SQLite persistence, and sub-millisecond execution.

Architectural Highlights

Installation and Build

Prerequisites

Compilation

cargo build --release

Compiled binary will be available at target/release/mobhub.

CLI Usage

System Diagnostics

./target/release/mobhub doctor

TPM Vault Verification

./target/release/mobhub test-vault

Calculate War Payout

./target/release/mobhub payout --cache 349499999 --model flat_rate

Calculate Faction Valuation

./target/release/mobhub valuation --respect 100000 --rate 180284 --armory 50000000 --cash 25000000

Simulate Gym Training Session

./target/release/mobhub gym --stat strength --start-stat 1000000 --happy 5000 --energy 1000 --dots 7.3

Reconcile Money Log Disbursements

./target/release/mobhub reconcile --news-file news.json --register-file register.json

Run HTTP Service & Embedded Dashboard

./target/release/mobhub serve --port 3000 --db-path mobhub.db --faction-id 50645

API Endpoints

MethodPathDescription
GET/healthSystem health check
GET/statusTPM vault status and runtime telemetry
POST/api/payout/computeRun deterministic war payout calculation
POST/api/payout/export-csvExport payout register as CSV
POST/api/valuation/computeCalculate faction valuation breakdown
POST/api/gym/simulateSimulate gym session via Mojo/Rust engine
POST/api/reconcile/parseParse raw Torn news to disbursements
POST/api/reconcile/matchMatch disbursements to payout register rows
GET/api/disbursementsList stored disbursements
POST/api/disbursementsStore disbursements into SQLite
GET/api/warsList archived wars from SQLite
POST/api/warsRecord or import war
GET/api/balancesList member vault balances
GET/Embedded web management dashboard

Test Verification

Run all unit and integration tests:

cargo test --verbose

All calculations are tested against real faction ground truth data and reference gym formula values.

License

MIT OR Apache-2.0