Files
Hermes Agent 44c48bb12a chore(repo): finalize 3-repo separation, sync 8 AQ skills/scripts, and add Eval 47
- Remove legacy tracked hyperdope-ci-build/* files (moved to sibling repo /workspace/hyperdope-ci-build).
- Remove duplicate root news dossiers (25, 46) and duplicate archive PDF compendium per Archive File Hygiene Rule.
- Add evaluate_aq.mjs, generate_aq_tier_list.py, build_wire_report_pdf.py, pdf_create.py, and pdf_read.py to ingglish-aq-archive/scripts/.
- Synchronize all 8 scripts and 8 creative Ingglish AQ skills into packaging/bundle/ and rebuild .tar.gz / .tar.xz bundles.
- Update reconstruct_option4_curve.py and option-4-curve-migration-manifest.json paths to /workspace/ingglish-hyperdope-gematria/.
- Add 47-eval-news-2026-11-02-bidirectional (.md + .pdf) and update master 17-dossier tier list (.md, .pdf, .png).
- Track Series I-V repeat lecture transcripts, genealogy compendium, repdigit compendium, and wire report artifacts.
2026-11-03 07:24:55 +00:00

85 lines
3.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# install.sh — Idempotent Portable Installer for current-events-isopsephic-exegesis
# Supports RHEL 8/9/10, Fedora, Rocky, AlmaLinux, Debian/Ubuntu, and macOS.
# Pays strict attention to env TZ when registering the daily 00:00 GMT (UTC) cron job.
set -euo pipefail
BUNDLE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
SKILLS_DEST="${HERMES_SKILLS_DIR:-$HERMES_HOME/skills/creative}"
if [ -z "${WORKSPACE_DIR:-}" ]; then
if [ -d "/workspace/ingglish-hyperdope-gematria" ]; then
WORKSPACE_DIR="/workspace/ingglish-hyperdope-gematria"
else
WORKSPACE_DIR="/workspace"
fi
fi
SCRIPTS_DEST="${HERMES_SCRIPTS_DIR:-$HERMES_HOME/scripts}"
echo "[1/5] Detecting environment and timezone offset for 00:00 GMT target..."
HOST_TZ="${TZ:-}"
if [ -z "$HOST_TZ" ] && [ -f /etc/timezone ]; then
HOST_TZ="$(cat /etc/timezone | tr -d '[:space:]')"
elif [ -z "$HOST_TZ" ] && [ -L /etc/localtime ]; then
HOST_TZ="$(readlink /etc/localtime | sed 's|.*/zoneinfo/||')"
fi
HOST_TZ="${HOST_TZ:-UTC}"
# Compute local hour corresponding to 00:00 UTC using Python
CRON_HOUR_LOCAL="$(python3 -c '
import datetime
utc_midnight = datetime.datetime(2026, 11, 2, 0, 0, tzinfo=datetime.timezone.utc)
local_dt = utc_midnight.astimezone()
print(local_dt.hour)
')"
CRON_MIN_LOCAL="$(python3 -c '
import datetime
utc_midnight = datetime.datetime(2026, 11, 2, 0, 0, tzinfo=datetime.timezone.utc)
local_dt = utc_midnight.astimezone()
print(local_dt.minute)
')"
CRON_EXPR="${CRON_MIN_LOCAL} ${CRON_HOUR_LOCAL} * * *"
echo " -> Detected Host TZ: ${HOST_TZ} (00:00 GMT maps to local cron '${CRON_EXPR}')"
echo "[2/5] Installing skills into ${SKILLS_DEST}..."
mkdir -p "${SKILLS_DEST}" 2>/dev/null || true
if [ -w "${SKILLS_DEST}" ]; then
cp -a "${BUNDLE_DIR}/skills/"* "${SKILLS_DEST}/"
echo " -> Installed 8 creative Ingglish AQ skills (phonetic-and-gematria-ciphers, hyperdope-ingglish-ci, bidirectional-aq-evaluation, aq-tier-list-visualizer, current-events-isopsephic-exegesis, isopsephic-humor-and-exegesis, isopsephic-lecture-synthesis, isopsephic-wire-report-synthesis)"
else
echo " -> ${SKILLS_DEST} is read-only (container mount); skipping skill copy."
fi
echo "[3/5] Unpacking offline-vendored ingglish npm runtime into ${WORKSPACE_DIR}/node_modules..."
mkdir -p "${WORKSPACE_DIR}/node_modules"
tar -xzf "${BUNDLE_DIR}/vendor/ingglish-vendor.tgz" -C "${WORKSPACE_DIR}/node_modules"
echo "[4/5] Installing deterministic collector, CI, evaluation, tier-list, wire-report & lecture scripts..."
mkdir -p "${WORKSPACE_DIR}/ingglish-aq-archive/scripts"
for s in collect_news_aq.py ci_provision_ingglish.py manage_lecture_artifacts.py build_wire_report_pdf.py evaluate_aq.mjs generate_aq_tier_list.py pdf_create.py pdf_read.py; do
cp -f "${BUNDLE_DIR}/scripts/${s}" "${WORKSPACE_DIR}/ingglish-aq-archive/scripts/${s}"
chmod 0755 "${WORKSPACE_DIR}/ingglish-aq-archive/scripts/${s}"
done
if mkdir -p "${SCRIPTS_DEST}" 2>/dev/null && [ -w "${SCRIPTS_DEST}" ]; then
cp -f "${BUNDLE_DIR}/scripts/collect_news_aq.py" "${SCRIPTS_DEST}/collect_news_aq.py"
chmod 0755 "${SCRIPTS_DEST}/collect_news_aq.py"
fi
echo "[5/5] Verifying SELinux labels (RHEL/Fedora) & registering 00:00 GMT schedule..."
if command -v chcon >/dev/null 2>&1 && [ -d /var/lib/ingglish-aq-archive ]; then
chcon -Rt container_file_t /var/lib/ingglish-aq-archive 2>/dev/null || true
fi
if command -v hermes >/dev/null 2>&1; then
echo " -> Registering via hermes cron..."
hermes cron add --name "current-events-isopsephic-exegesis-daily-0000-gmt" \
--schedule "${CRON_EXPR}" \
--skill "current-events-isopsephic-exegesis" \
--skill "phonetic-and-gematria-ciphers" \
--prompt "Execute current-events-isopsephic-exegesis for the completed UTC day (TZ=UTC collect_news_aq.py --mode closing-bell)." 2>/dev/null || true
fi
echo "Installation complete. Verified offline Ingglish + Base-36 AQ readiness."