Economy organ spec review: data flow corrections, toolchain decisions, typo fix

- M3 hub: predictions publish continuously to Marketplace via M2 (not trader-queried)
- M3 BoundedPrediction: three quality metrics (confidence, correctness, certainty)
- M5 traders: read predictions from Marketplace, mixed roster (LLM + bots)
- M7 SAE: monitors at Marketplace level (the only trader interface)
- M6 Conductor: clarified as LLM, not rule-based
- M4 wallets: one multi-chain wallet per trader, strictly 1:1
- M1 Marketplace: added query_predictions interface for traders
- M3d/M3e: Fortran 2018, gfortran, fpm, OpenBLAS, hand-rolled numerics
- M3b typo: "literao" -> "literal"
- SessionStart hook: added gfortran, fpm, Tcl, ECLiPSe Prolog, Zig, Foundry
- Stub fpm.toml for M3d (mev sims)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-17 09:19:38 +00:00
parent 1c2576fd93
commit 3bdf25509d
11 changed files with 195 additions and 59 deletions
+103 -5
View File
@@ -65,15 +65,113 @@ else
fi
fi
# ---------------------------------------------------------------------------
# Fortran 2018 (gfortran) + OpenBLAS (economy organ: M3d, M3e)
# ---------------------------------------------------------------------------
if command -v gfortran >/dev/null 2>&1; then
log "gfortran already present; skipping."
else
log "Installing gfortran libopenblas-dev via apt-get ..."
if ! sudo apt-get install -y gfortran libopenblas-dev; then
warn "apt-get install of gfortran/libopenblas-dev failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# fpm — Fortran Package Manager (economy organ: M3d, M3e)
# ---------------------------------------------------------------------------
if command -v fpm >/dev/null 2>&1; then
log "fpm already present; skipping."
else
log "Installing fpm ..."
FPM_URL="https://github.com/fortran-lang/fpm/releases/download/v0.10.1/fpm-0.10.1-linux-x86_64"
if curl -sSL -o /tmp/fpm "$FPM_URL"; then
sudo cp /tmp/fpm /usr/local/bin/fpm && sudo chmod +x /usr/local/bin/fpm
log "fpm installed to /usr/local/bin/fpm"
else
warn "fpm download failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# Tcl (economy organ: M3 sim hub)
# ---------------------------------------------------------------------------
if command -v tclsh >/dev/null 2>&1; then
log "tclsh already present; skipping."
else
log "Installing tcl via apt-get ..."
if ! sudo apt-get install -y tcl; then
warn "apt-get install of tcl failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# ECLiPSe Prolog (economy organ: M3b, M3f)
# ---------------------------------------------------------------------------
if command -v eclipse >/dev/null 2>&1 || [ -x /opt/eclipseclp/bin/x86_64_linux/eclipse ]; then
log "ECLiPSe Prolog already present; skipping."
else
log "Installing ECLiPSe Prolog ..."
ECLIPSE_URL="https://eclipseclp.org/Distribution/Current/7.1_13/x86_64_linux/eclipse_basic.tgz"
if curl -sSL -o /tmp/eclipse_basic.tgz "$ECLIPSE_URL"; then
if sudo mkdir -p /opt/eclipseclp && sudo tar -xzf /tmp/eclipse_basic.tgz -C /opt/eclipseclp; then
log "ECLiPSe installed to /opt/eclipseclp"
else
warn "ECLiPSe extraction failed; continuing."
fi
else
warn "ECLiPSe download failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# Zig (economy organ: M3g)
# ---------------------------------------------------------------------------
if command -v zig >/dev/null 2>&1; then
log "zig already present; skipping."
else
log "Installing Zig ..."
ZIG_URL="https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz"
if curl -sSL -o /tmp/zig.tar.xz "$ZIG_URL"; then
if sudo tar -xJf /tmp/zig.tar.xz -C /opt && sudo ln -sf /opt/zig-linux-x86_64-0.13.0/zig /usr/local/bin/zig; then
log "zig installed to /usr/local/bin/zig"
else
warn "Zig extraction/linking failed; continuing."
fi
else
warn "Zig download failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# Solidity / Foundry (economy organ: M3c)
# ---------------------------------------------------------------------------
if command -v forge >/dev/null 2>&1; then
log "forge (Foundry) already present; skipping."
else
log "Installing Foundry (forge, anvil) ..."
if curl -sSL https://foundry.paradigm.xyz | bash; then
if "$HOME/.foundry/bin/foundryup"; then
log "Foundry installed"
else
warn "foundryup failed; continuing."
fi
else
warn "Foundry install script failed; continuing."
fi
fi
# ---------------------------------------------------------------------------
# Ensure ponyc is on PATH for future shells.
# ---------------------------------------------------------------------------
PONY_PATH_LINE='export PATH=/root/.local/share/ponyup/bin:$PATH'
if [ -f "$HOME/.bashrc" ] && grep -qF "$PONY_PATH_LINE" "$HOME/.bashrc"; then
log "ponyup PATH line already in ~/.bashrc; skipping."
EXTRA_PATHS='/root/.local/share/ponyup/bin:/opt/eclipseclp/bin/x86_64_linux'
FOUNDRY_PATH="$HOME/.foundry/bin"
FULL_PATH_LINE="export PATH=$EXTRA_PATHS:$FOUNDRY_PATH:\$PATH"
if [ -f "$HOME/.bashrc" ] && grep -qF "eclipseclp" "$HOME/.bashrc"; then
log "Economy-organ PATH lines already in ~/.bashrc; skipping."
else
log "Appending ponyup PATH line to ~/.bashrc"
echo "$PONY_PATH_LINE" >> "$HOME/.bashrc" || warn "Could not append to ~/.bashrc; continuing."
log "Appending toolchain PATH lines to ~/.bashrc"
echo "$FULL_PATH_LINE" >> "$HOME/.bashrc" || warn "Could not append to ~/.bashrc; continuing."
fi
log "Done."