tpt-meridian

Rust

Open-source Rust ecosystem for a post-monetary physical logistics OS — tracks energy, compute, materials, and healthcare as physical resources instead of money, governed by capability-based AI sandboxing, formally verified ethical invariants, and a multi-tier democratic architecture.

0 stars0 forks0 watchers

Languages

Rust99.5%Makefile0.3%Just0.2%
README

tpt-meridian

A post‑monetary, ecological operating system for physical logistics — simulated in Rust.

tpt‑meridian is an in‑memory prototype of a coordination system for a moneyless, resource‑based economy. It models how a citizen's need (proven without exposing medical data) flows through ecological accounting, democratic deliberation, an AI simulation oracle, a capability‑based microkernel, and finally physical execution (compute, energy, materials, medicine) — while five hard invariants (formally specified, unit‑tested, and Creusot‑annotated) guarantee the AI can never compute an illegal action.

It is a simulation/scaffold, not a deployment. Hardware and network boundaries (robotic arms, AMD SEV/Intel TDX enclaves, the compute mesh's real networking, BMS firmware) are represented as mocked traits/interfaces. The crate map follows the design spec (spec.txt, "Design Document & Architecture RFC v4.0").

Quick start

cargo run -p tpt-sim                 # full §12 dialysis-machine scenario
cargo run -p tpt-sim -- --scenario supporting
cargo run -p tpt-sim -- --scenario wellbeing
cargo run -p tpt-sim -- --scenario-file scenarios/dialysis.json

cargo test --workspace               # 137 tests
cargo clippy --workspace --all-targets -- -D warnings

Shortcuts are also available via make (make check test sim verify) or just.

Run a focused example:

cargo run -p tpt-sim --example zk_need
cargo run -p tpt-sim --example pdr_learn
cargo run -p tpt-sim --example cap_demo
cargo run -p tpt-sim --example pilot

Architecture (nine crates)

CrateResponsibility (spec §)
tpt-corePhysical units, matter lifecycle, ecological cost, planetary boundaries (§3)
tpt-sigilIdentity, ZK need‑proofs, democracy/PDRs, governance & audit (§4, §13)
tpt-plexusDecentralized AGI compute mesh, routing, enclaves (§5)
tpt-voltaAutomated microgrid OS, load‑shedding, peer sharing (§6)
tpt-voxelSpatial allocation, material passports, design‑for‑disassembly (§7)
tpt-helixDecentralized biological logistics, palliative protocol (§8)
tpt-gaiaEcological substrate, wellbeing multiplier, regeneration ledger, debt (§9)
tpt-kyberCapability microkernel, AI governance oracle, HITL (§10)
tpt-kanonFormal verification of the 5 invariants (§11)
tpt-simUnified harness wiring all crates together (§12, §15)

See ARCHITECTURE.md for the crate‑to‑spec mapping.

The five invariants (tpt-kanon, §11)

  1. Ecological debt — no new extraction while any ecological debt remains; the plan's cost must fit the cycle's regeneration capacity across carbon, habitat, and toxicity.
  2. Capability — an action is only executed within its capability's scope & resource limits.
  3. Human approval — an action requiring approval cannot run without a valid, signature‑verified approval.
  4. Priority — a Tier‑1 (life‑support / ecological repair) action must be non‑preemptable.
  5. Voting cap — no value cluster may exceed 20% of total voting power.

These predicates are checked before any execution. They are unit‑tested and property‑tested (proptest) in tpt-kanon, and annotated with Creusot #[requires]/#[ensures] contracts in tpt-kanon/src/creusot.rs. Running cargo creusot verify requires the nightly toolchain + cargo-creusot (see todo.md "deferred" items) and is not wired into CI.

Real vs. mocked

This is a research prototype. The table summarizes what is real logic vs. an explicit seam where a real backend plugs in (full list in todo.mdMocks, Placeholders & Illustrative Constants).

SubsystemStatus
Wellbeing multiplier, regeneration log‑weight, ecological‑debt gating, 20% cap redistribution, capability/scope checks, DfD enforcement, audit hash‑chainReal logic
VerifiableCredential commitment, MockBiologicalProver ZK, capability expiry, planetary‑boundary ceilingsMock / illustrative constants (replace with real crypto, zk‑SNARK, community‑governed values)
Robotic construction, SEV/TDX enclave, compute‑mesh drivers, microgrid device firmware, pharma ledgerNo‑op mocks (no real hardware/network)
Creusot proofsRecorded, not yet run (deferred toolchain)

License

Prototype / research use. (License TBD — see CONTRIBUTING.md.)