Compare commits

..
19 Commits
Author SHA1 Message Date
Hermes Agent 74ef8b60a6 fix(quant,caddy): add ?v=2.0.24 script cache-busters, set must-revalidate on JS/JSON, and point tutorial scenes to real 2026-11-27 close (v2.0.24) 2026-11-30 08:52:52 +00:00
Hermes Agent 922f485388 fix(quant): eliminate all synthetic market/timeseries data, use 100% real exchange bars, and report 'No data available' when absent (v2.0.23) 2026-11-30 08:36:06 +00:00
Hermes Agent 9716a0ab61 fix(mcp,db,systemd,logrotate): move telemetry DB to /var/lib/hyperstitionstud.io/api-telemetry.db via StateDirectory=hyperstitionstud.io and catch sqlite3.Error (v2.0.22) 2026-11-30 07:55:22 +00:00
Hermes Agent 95a5fc8618 fix(quant,tutorials,deploy): fix all 43 Encyclopedia PDF deep links, always restart hyperstition-mcp.service on sync, and enable default voice + WebAudio narration (v2.0.21) 2026-11-30 07:39:44 +00:00
Hermes Agent 1b232fe873 chore(release): synchronize version to v2.0.20 across /donate/, /quant/ tutorials, and manifests 2026-11-30 07:19:04 +00:00
Hermes Agent 2114de35bb feat(donate,quant,tutorials,citations): implement /donate/, Option 3 stadium-pill navbar, 5-episode /quant/ canvas tour, and passage-encoded deep citations (v2.0.19) 2026-11-30 07:16:42 +00:00
Hermes Agent 1182ba0cf2 feat(db,mcp,deploy): implement SQLite + FTS5 metadata/telemetry DB, automatic MCP/REST population, and quiescent logrotate.d compression (v2.0.19) 2026-11-30 06:44:26 +00:00
m00t & Hermes Agent ee5f458c76 feat(quant,lenses,mcp): implement /quant/ time-series workbench, LENS_REGISTRY, TradingView launcher, and /api/v1/* REST + OpenAPI 3.1 adapter (v2.0.18) 2026-11-30 05:41:36 +00:00
m00t & Hermes Agent 5841ccea2c fix(version-sync,deploy): exclude untracked parent workspace.toml from --check failure and re-exec sync-vps-repos.sh on self-update (v2.0.17) 2026-11-30 04:56:16 +00:00
m00t & Hermes Agent 62592f2efd fix(deploy): auto-sync untracked workspace.toml in sync-vps-repos.sh before version_sync --check and fix run_checked exit code capture (v2.0.16) 2026-11-30 04:52:39 +00:00
m00t & Hermes Agent 7a0a058085 fix(deploy): add explicit error handling to sync-vps-repos.sh without /dev/null suppression and bump to v2.0.15 2026-11-30 04:49:09 +00:00
m00t & Hermes Agent c42e4320e2 feat(quant,deploy): complete financial quant pipeline fetchers/modes, sync v2.0.14, and add version_sync check to sync-vps-repos.sh 2026-11-30 04:40:48 +00:00
Hermes Agent 84636efd32 feat(version-sync): add hs-sync-version (hyperstitionstud_io.version_sync) to synchronize visible site element versions and bump to v2.0.13 2026-11-30 04:02:44 +00:00
Hermes Agent af761b8583 feat(deploy): add idempotent Caddyfile and systemd unit sync by default to sync-vps-repos.sh with --no-caddy negation flag (v2.0.12) 2026-11-30 04:00:26 +00:00
Hermes Agent cd7d939787 chore(gallery): disable /gallery route in Caddyfile and sync-vps-repos.sh for now while tracking as long-term plan (v2.0.11) 2026-11-30 03:50:05 +00:00
Hermes Agent 0195496933 feat(mcp-deploy): add public /mcp reverse-proxy route in Caddyfile, hyperstition-mcp.service systemd unit, and live GET/POST /mcp smoke tests (v2.0.10) 2026-11-30 03:48:10 +00:00
Hermes Agent c17f74097b feat(v2.0.8): implement ipld dag-json/CIDv1, quant financial collector, MCP server (hs-mcp), /learn/ sub-page, /gallery/ sub-page, and global Lemurs footer 2026-11-30 03:39:56 +00:00
Hermes Agent b767f8a4e9 fix(deploy): add --force to git fetch --tags in sync-vps-repos.sh to allow updated release tags (v2.0.0) 2026-11-30 01:39:40 +00:00
Hermes Agent cd0d81751f release(v2.0.0): commemorate v2.0.0 major milestone release across hyperstitionstudio-core, site portal, and deployment harness 2026-11-30 01:10:58 +00:00
83 changed files with 47353 additions and 65 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v1.2.0`)
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.0.0`)
Shared Python common library (`hyperstitionstud_io.*`), offline `URN:` JSON Schema registry (`urn:io:hyperstitionstud:schema:v1:*`), and offline browser/ESM modules (`@hyperstitionstud.io/*` / `window.HyperstitionStudio.*`) across all workspace projects.
+15 -2
View File
@@ -24,7 +24,7 @@ hyperstitionstud.io {
header @immutable_media Cache-Control "public, max-age=86400, stale-while-revalidate=604800"
@html_js path *.html *.js *.json
header @html_js Cache-Control "public, max-age=300, stale-while-revalidate=86400"
header @html_js Cache-Control "public, max-age=0, must-revalidate"
# 1. Repo Install Dir: encyclopedia-knowledge-graph -> https://hyperstitionstud.io/graph/*
handle_path /graph/* {
@@ -81,7 +81,20 @@ hyperstitionstud.io {
}
redir /ci /ci/ permanent
# 6. Repo Install Dir: hyperstitionstudio-core -> /schemas/* and Root Portal Homepage (/)
# 6. Stateless Read-Only MCP (/mcp) & REST API v1 (/api/v1/*) HTTP Server -> 127.0.0.1:8095
@mcp_and_rest_api path /mcp /mcp/* /api/v1 /api/v1/*
handle @mcp_and_rest_api {
reverse_proxy 127.0.0.1:8095
}
# Long-Term Plan (Disabled for Now): /gallery & /gallery/* Artifact Gallery
# See docs/PLAN-MEMETIC-GALLERY-SUBPAGE.pdf to re-enable when activated.
@gallery_disabled path /gallery /gallery/*
handle @gallery_disabled {
respond "404 Not Found" 404
}
# 7. Repo Install Dir: hyperstitionstudio-core -> /schemas/*, /learn/* & Root Portal Homepage (/)
handle_path /schemas/* {
root * /var/www/hyperstitionstud.io/repos/hyperstitionstudio-core/schemas
file_server {
+24
View File
@@ -0,0 +1,24 @@
# /etc/systemd/system/hyperstition-mcp.service
[Unit]
Description=Stateless Read-Only Model Context Protocol (MCP) HTTP Server for hyperstitionstud.io (127.0.0.1:8095)
After=network.target local-fs.target hyperstition-tmpfs-sync.service
Before=caddy.service
[Service]
Type=simple
WorkingDirectory=/srv/hyperstitionstud.io/repos
StateDirectory=hyperstitionstud.io
Environment="HYPERSTITIONSTUDIO_CONFIG=/srv/hyperstitionstud.io/repos/workspace.toml"
Environment="PYTHONPATH=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src"
Environment="HYPERSTITION_TELEMETRY_DB_PATH=/var/lib/hyperstitionstud.io/api-telemetry.db"
Environment="HYPERSTITION_SQLITE_MAX_MB=100"
ExecStart=/srv/hyperstitionstud.io/repos/.venv/bin/python3 /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src/hyperstitionstud_io/mcp/server.py --transport http --host 127.0.0.1 --port 8095
Restart=always
RestartSec=2
NoNewPrivileges=true
ProtectSystem=strict
ReadOnlyPaths=/srv/hyperstitionstud.io/repos
ReadWritePaths=/var/lib/hyperstitionstud.io
[Install]
WantedBy=multi-user.target
+1 -1
View File
@@ -7,7 +7,7 @@ Before=caddy.service
[Service]
Type=oneshot
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh --no-pull
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh --no-pull --no-caddy
RemainAfterExit=yes
[Install]
@@ -0,0 +1,44 @@
# /etc/logrotate.d/hyperstition-sqlite-meta
# Quiescent size-based compression & truncation for the hyperstitionstud.io SQLite REST/MCP API metadata DB.
#
# Why quiescent snapshot compression + in-place SQLite truncation is used:
# Raw byte truncation (`copytruncate`) on a live SQLite `.db` or `-wal` file while readers or
# writers hold locks corrupts the SQLite B-tree page header and WAL frame index.
# Instead, `prerotate` invokes `hyperstitionstud_io.db.sqlite_meta --truncate-quiescent --compress-archive`, which:
# 1. Sets `PRAGMA busy_timeout = 30000` (waits up to 30s for in-flight requests to finish),
# 2. Flushes committed WAL frames via `PRAGMA wal_checkpoint(TRUNCATE)`,
# 3. Writes a consistent point-in-time SQLite snapshot and compresses it with `gzip -9`
# to `<db_path>.1.gz` (rotating `.1.gz` .. `.12.gz` rather than removing history),
# 4. Acquires `BEGIN EXCLUSIVE` to guarantee 100% SQLite reader/writer quiescence,
# purges the live telemetry tables, and commits cleanly,
# 5. Executes `PRAGMA wal_checkpoint(TRUNCATE)` + `VACUUM` + `PRAGMA optimize` on the live DB, and
# 6. Verifies `PRAGMA integrity_check == 'ok'` on the live DB.
#
# Configurable threshold:
# - Default logrotate trigger: `size 100M` (100 MB)
# - Runtime override: export `HYPERSTITION_SQLITE_MAX_MB` (default `100`) or `HYPERSTITION_SQLITE_MAX_BYTES`.
/var/lib/hyperstitionstud.io/api-telemetry.db {
size 100M
rotate 12
compress
delaycompress
missingok
notifempty
nocreate
sharedscripts
prerotate
TARGET_DB="${1:-${HYPERSTITION_TELEMETRY_DB_PATH:-/var/lib/hyperstitionstud.io/api-telemetry.db}}"
MAX_MB="${HYPERSTITION_SQLITE_MAX_MB:-100}"
MAX_BYTES="${HYPERSTITION_SQLITE_MAX_BYTES:-$((MAX_MB * 1024 * 1024))}"
ROTATE_KEEP="${HYPERSTITION_SQLITE_ROTATE_KEEP:-12}"
PYTHON_BIN="${HYPERSTITION_PYTHON_BIN:-python3}"
PYTHONPATH="${PYTHONPATH:-/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src:/workspace/hyperstitionstudio-core/src}" \
"${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta \
--truncate-quiescent \
--compress-archive \
--rotate-keep "${ROTATE_KEEP}" \
--db "${TARGET_DB}" \
--max-bytes "${MAX_BYTES}"
endscript
}
+170 -36
View File
@@ -1,24 +1,68 @@
#!/usr/bin/env bash
# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh
# Hydrates per-repository install directories from REPOS_ROOT into LIVE_REPOS (tmpfs RAM mount),
# builds haiperdohp-jemaytreeah/db_lite.json if absent, creates top-level route symlinks, and
# pre-compresses (.br / .gz) static assets.
# supplies untracked haiperdohp-jemaytreeah/.gitignore files (config.js, db.json, db_lite.json),
# creates top-level route symlinks, pre-compresses (.br / .gz) static assets, and idempotently
# syncs/validates/reloads /etc/caddy/Caddyfile, systemd units, and /etc/logrotate.d/hyperstition-sqlite-meta
# by default (negated via --no-caddy).
#
# Usage:
# ./sync-vps-repos.sh all # Pull from git.libre.audio, audit & sync all repos
# ./sync-vps-repos.sh encyclopedia-knowledge-graph # Pull, audit & sync a single repo
# ./sync-vps-repos.sh --no-pull # Audit & sync existing local clones without network fetch
# ./sync-vps-repos.sh [all|<repo-name>] [--no-pull] [--no-caddy|--no-services]
set -euo pipefail
on_error() {
local exit_code=$?
local line_no="${1:-unknown}"
echo "[ERROR] sync-vps-repos.sh failed at line ${line_no} with exit code ${exit_code} while running: ${BASH_COMMAND}" >&2
exit "${exit_code}"
}
trap 'on_error ${LINENO}' ERR
run_checked() {
local label="$1"
shift
local out=""
local rc=0
out="$("$@" 2>&1)" || rc=$?
if [[ "${rc}" -ne 0 ]]; then
echo "[ERROR] ${label} failed (exit code ${rc}): $*" >&2
if [[ -n "${out}" ]]; then
echo "${out}" >&2
fi
return "${rc}"
fi
}
has_cmd() {
command -v "$1" >&2
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
DEFAULT_REPOS_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export REPOS_ROOT="${REPOS_ROOT:-${DEFAULT_REPOS_ROOT}}"
export LIVE_REPOS="${LIVE_REPOS:-/var/www/hyperstitionstud.io/repos}"
TARGET_REPO="${1:-all}"
TARGET_REPO="all"
DO_PULL=1
DO_CADDY=1
for arg in "$@"; do
case "${arg}" in
--no-pull)
DO_PULL=0
;;
--no-caddy|--no-services)
DO_CADDY=0
;;
*)
TARGET_REPO="${arg}"
;;
esac
done
SUDO=""
if [[ "${EUID:-$(id -u)}" -ne 0 ]] && [[ ! -w "$(dirname "${LIVE_REPOS}")" ]] && command -v sudo >/dev/null 2>&1; then
if [[ "${EUID:-$(id -u)}" -ne 0 ]] && type -P sudo >&2; then
SUDO="sudo"
fi
@@ -46,7 +90,7 @@ REPOS=(
"${CI_REPO_DIR}:feat/ingglish-aq-corpus"
)
if [[ "${TARGET_REPO}" != "--no-pull" ]]; then
if [[ "${DO_PULL}" -eq 1 ]]; then
for entry in "${REPOS[@]}"; do
repo="${entry%%:*}"
branch="${entry##*:}"
@@ -55,12 +99,19 @@ if [[ "${TARGET_REPO}" != "--no-pull" ]]; then
fi
if [[ -d "${REPOS_ROOT}/${repo}/.git" ]]; then
remote_name="origin"
if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git -C "${REPOS_ROOT}/${repo}" remote get-url downstream >/dev/null 2>&1; then
if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git -C "${REPOS_ROOT}/${repo}" remote | grep -qx "downstream"; then
remote_name="downstream"
fi
echo "[1/4] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..."
git -C "${REPOS_ROOT}/${repo}" fetch "${remote_name}" "${branch}" --tags
git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}"
echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..."
prev_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
run_checked "git fetch ${repo}" git -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags
run_checked "git merge ${repo}" git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}"
new_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
if [[ "${repo}" == "hyperstitionstudio-core" && "${prev_head}" != "${new_head}" && -z "${HYPERSTITION_SYNC_REEXEC:-}" ]]; then
echo "[1/5] hyperstitionstudio-core updated (${prev_head:0:7} -> ${new_head:0:7}); re-executing updated sync-vps-repos.sh..."
export HYPERSTITION_SYNC_REEXEC=1
exec "${REPOS_ROOT}/hyperstitionstudio-core/deploy/sync-vps-repos.sh" "$@"
fi
fi
done
fi
@@ -69,53 +120,136 @@ fi
if [[ -d "${REPOS_ROOT}/haiperdohp-jemaytreeah" ]]; then
if [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.js" ]] && [[ -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.default.js" ]]; then
echo "[build] Copying haiperdohp-jemaytreeah/config.default.js -> config.js..."
cp "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.default.js" "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.js"
run_checked "copy haiperdohp-jemaytreeah config.js" cp "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.default.js" "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.js"
fi
if [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db_lite.json" || ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.json" ]] && [[ -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/tools/generate_db_json.py" ]]; then
echo "[build] Generating haiperdohp-jemaytreeah/db.json and db_lite.json from db.txt..."
(cd "${REPOS_ROOT}/haiperdohp-jemaytreeah" && "${PYTHON_BIN}" tools/generate_db_json.py db.txt db.json)
(cd "${REPOS_ROOT}/haiperdohp-jemaytreeah" && run_checked "generate_db_json.py" "${PYTHON_BIN}" tools/generate_db_json.py db.txt db.json)
fi
fi
echo "[2/4] Running hs-doctor and 6-Gate Knowledge Graph Verification..."
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor >/dev/null
"${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only >/dev/null
echo "[2/5] Synchronizing local workspace.toml version and running hs-doctor, version_sync --check, and 6-Gate Knowledge Graph Verification..."
if [[ -f "${REPOS_ROOT}/workspace.toml" ]] && [[ -f "${REPOS_ROOT}/hyperstitionstudio-core/workspace.example.toml" ]]; then
# Sync schema_version in untracked parent workspace.toml with hyperstitionstud_io.__version__
run_checked "version_sync (sync untracked workspace.toml)" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync
fi
run_checked "version_sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync --check
run_checked "hs-doctor" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" "${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
echo "[3/4] Syncing per-repository install directories into ${LIVE_REPOS}..."
${SUDO} mkdir -p "${LIVE_REPOS}"
echo "[3/5] Syncing per-repository install directories into ${LIVE_REPOS}..."
LIVE_SUDO=""
if [[ ! -w "$(dirname "${LIVE_REPOS}")" ]] && [[ -n "${SUDO}" ]]; then
LIVE_SUDO="${SUDO}"
fi
${LIVE_SUDO} mkdir -p "${LIVE_REPOS}"
for entry in "${REPOS[@]}"; do
repo="${entry%%:*}"
if [[ "${TARGET_REPO}" != "all" && "${TARGET_REPO}" != "--no-pull" && "${TARGET_REPO}" != "${repo}" ]]; then
if [[ "${TARGET_REPO}" != "all" && "${TARGET_REPO}" != "${repo}" ]]; then
continue
fi
if [[ -d "${REPOS_ROOT}/${repo}" ]]; then
${SUDO} mkdir -p "${LIVE_REPOS}/${repo}"
${SUDO} rsync -a --delete --exclude='.git' "${REPOS_ROOT}/${repo}/" "${LIVE_REPOS}/${repo}/"
${LIVE_SUDO} mkdir -p "${LIVE_REPOS}/${repo}"
run_checked "rsync ${repo}" ${LIVE_SUDO} rsync -a --delete --exclude='.git' "${REPOS_ROOT}/${repo}/" "${LIVE_REPOS}/${repo}/"
fi
done
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]] && [[ ! -e "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
${SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
fi
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all routes
${SUDO} ln -sfn "hyperstitionstudio-core/site/index.html" "${LIVE_REPOS}/index.html"
${SUDO} ln -sfn "encyclopedia-knowledge-graph" "${LIVE_REPOS}/graph"
${SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_REPOS}/encyclopedia"
${SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
${SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
${SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
${SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
${SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all active routes
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/index.html" "${LIVE_REPOS}/index.html"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/learn" "${LIVE_REPOS}/learn"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/quant" "${LIVE_REPOS}/quant"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/donate" "${LIVE_REPOS}/donate"
# Note: /gallery is disabled for now (tracked as a long-term plan in docs/PLAN-MEMETIC-GALLERY-SUBPAGE.pdf)
${LIVE_SUDO} rm -rf "${LIVE_REPOS}/gallery" "${LIVE_REPOS}/hyperstitionstudio-core/site/gallery"
${LIVE_SUDO} ln -sfn "encyclopedia-knowledge-graph" "${LIVE_REPOS}/graph"
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_REPOS}/encyclopedia"
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
echo "[4/4] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz)..."
${SUDO} find "${LIVE_REPOS}" -type f -size -5M \
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz)..."
run_checked "gzip pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec gzip -9 -k -f {} \;
if command -v brotli >/dev/null 2>&1; then
${SUDO} find "${LIVE_REPOS}" -type f -size -5M \
if [[ -n "$(type -P brotli || true)" ]]; then
run_checked "brotli pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec brotli -q 11 -k -f {} \;
fi
# Step 5: Idempotent systemd unit, logrotate.d & /etc/caddy/Caddyfile synchronization (enabled by default; skip with --no-caddy)
if [[ "${DO_CADDY}" -eq 1 ]]; then
DEPLOY_DIR="${REPOS_ROOT}/hyperstitionstudio-core/deploy"
if [[ -w "/var/lib" ]] || [[ -n "${SUDO}" ]]; then
run_checked "mkdir /var/lib/hyperstitionstud.io" ${SUDO} mkdir -p "/var/lib/hyperstitionstud.io"
fi
SRC_LOGROTATE="${DEPLOY_DIR}/logrotate.d/hyperstition-sqlite-meta"
DST_LOGROTATE="/etc/logrotate.d/hyperstition-sqlite-meta"
if [[ -f "${SRC_LOGROTATE}" ]] && [[ -d "/etc/logrotate.d" ]] && { [[ -w "/etc/logrotate.d" ]] || [[ -n "${SUDO}" ]]; }; then
if [[ -f "${DST_LOGROTATE}" ]] && cmp -s "${SRC_LOGROTATE}" "${DST_LOGROTATE}"; then
echo "[5/5] ${DST_LOGROTATE} is already identical to deploy/logrotate.d/hyperstition-sqlite-meta."
else
echo "[5/5] Installing quiescent SQLite logrotate rule to ${DST_LOGROTATE}..."
run_checked "copy hyperstition-sqlite-meta logrotate rule" ${SUDO} cp "${SRC_LOGROTATE}" "${DST_LOGROTATE}"
run_checked "chmod 0644 ${DST_LOGROTATE}" ${SUDO} chmod 0644 "${DST_LOGROTATE}"
fi
fi
if [[ -n "$(type -P systemctl || true)" ]] && [[ -d "/run/systemd/system" ]]; then
UNITS_CHANGED=0
for unit_name in "hyperstition-tmpfs-sync.service" "hyperstition-mcp.service"; do
src_u="${DEPLOY_DIR}/${unit_name}"
dst_u="/etc/systemd/system/${unit_name}"
if [[ -f "${src_u}" ]]; then
if [[ ! -f "${dst_u}" ]] || ! cmp -s "${src_u}" "${dst_u}"; then
echo "[5/5] Updating systemd unit ${dst_u}..."
run_checked "copy ${unit_name}" ${SUDO} cp "${src_u}" "${dst_u}"
UNITS_CHANGED=1
fi
fi
done
if [[ "${UNITS_CHANGED}" -eq 1 ]]; then
run_checked "systemctl daemon-reload" ${SUDO} systemctl daemon-reload
run_checked "systemctl enable hyperstition-tmpfs-sync.service" ${SUDO} systemctl enable hyperstition-tmpfs-sync.service
run_checked "systemctl enable --now hyperstition-mcp.service" ${SUDO} systemctl enable --now hyperstition-mcp.service
run_checked "systemctl restart hyperstition-mcp.service" ${SUDO} systemctl restart hyperstition-mcp.service
elif [[ -f "/etc/systemd/system/hyperstition-mcp.service" ]]; then
echo "[5/5] Restarting hyperstition-mcp.service to load latest MCP & REST API v1 (/api/v1/*) modules..."
run_checked "systemctl enable --now hyperstition-mcp.service" ${SUDO} systemctl enable --now hyperstition-mcp.service
run_checked "systemctl restart hyperstition-mcp.service" ${SUDO} systemctl restart hyperstition-mcp.service
fi
fi
SRC_CADDY="${DEPLOY_DIR}/Caddyfile"
DST_CADDY="/etc/caddy/Caddyfile"
if [[ -n "$(type -P caddy || true)" ]] && [[ -d "/etc/caddy" ]] && [[ -f "${SRC_CADDY}" ]]; then
if [[ -f "${DST_CADDY}" ]] && cmp -s "${SRC_CADDY}" "${DST_CADDY}"; then
echo "[5/5] /etc/caddy/Caddyfile is already identical to deploy/Caddyfile (no reload needed)."
else
echo "[5/5] Validating and updating ${DST_CADDY} from ${SRC_CADDY}..."
run_checked "caddy validate ${SRC_CADDY}" ${SUDO} caddy validate --config "${SRC_CADDY}" --adapter caddyfile
run_checked "copy Caddyfile" ${SUDO} cp "${SRC_CADDY}" "${DST_CADDY}"
if [[ -n "$(type -P systemctl || true)" ]] && [[ -d "/run/systemd/system" ]]; then
if systemctl is-active --quiet caddy; then
run_checked "systemctl reload caddy" ${SUDO} systemctl reload caddy
echo "[5/5] Reloaded Caddy with updated /etc/caddy/Caddyfile."
else
run_checked "systemctl enable --now caddy" ${SUDO} systemctl enable --now caddy
echo "[5/5] Started Caddy with updated /etc/caddy/Caddyfile."
fi
fi
fi
else
echo "[5/5] Caddy or /etc/caddy not present on this host; skipping Caddyfile reload."
fi
else
echo "[5/5] Skipping Caddyfile & systemd service sync (--no-caddy)."
fi
echo "[OK] Per-repository install directories hydrated and pre-compressed at ${LIVE_REPOS}"
+78 -5
View File
@@ -14,31 +14,54 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
TARGET_BASE_URL="${1:-}"
SERVER_PID=""
MCP_PID=""
cleanup() {
if [[ -n "${SERVER_PID}" ]] && kill -0 "${SERVER_PID}" 2>/dev/null; then
kill "${SERVER_PID}" 2>/dev/null || true
fi
if [[ -n "${MCP_PID}" ]] && kill -0 "${MCP_PID}" 2>/dev/null; then
kill "${MCP_PID}" 2>/dev/null || true
fi
}
trap cleanup EXIT
if [[ -z "${TARGET_BASE_URL}" ]]; then
export LIVE_REPOS="${LIVE_REPOS:-/tmp/hyperstition-live-repos}"
rm -rf "${LIVE_REPOS}"
echo "[1/3] Hydrating per-repository webroot at ${LIVE_REPOS} via sync-vps-repos.sh --no-pull..."
export HYPERSTITION_TELEMETRY_DB_PATH="${HYPERSTITION_TELEMETRY_DB_PATH:-/tmp/hyperstition-deploy-test-telemetry.db}"
rm -rf "${LIVE_REPOS}" "${HYPERSTITION_TELEMETRY_DB_PATH}" "${HYPERSTITION_TELEMETRY_DB_PATH}-wal" "${HYPERSTITION_TELEMETRY_DB_PATH}-shm"
echo "[1/4] Hydrating per-repository webroot at ${LIVE_REPOS} via sync-vps-repos.sh --no-pull..."
"${SCRIPT_DIR}/sync-vps-repos.sh" --no-pull
PORT="${TEST_PORT:-18090}"
echo "[2/3] Starting local HTTP server on http://127.0.0.1:${PORT} serving ${LIVE_REPOS}..."
MCP_PORT="${TEST_MCP_PORT:-18095}"
echo "[2/4] Starting local HTTP server on http://127.0.0.1:${PORT} and MCP HTTP server on http://127.0.0.1:${MCP_PORT}/mcp..."
python3 -m http.server "${PORT}" --bind 127.0.0.1 --directory "${LIVE_REPOS}" >/dev/null 2>&1 &
SERVER_PID="$!"
PYTHONPATH="${SCRIPT_DIR}/../src" python3 "${SCRIPT_DIR}/../src/hyperstitionstud_io/mcp/server.py" --transport http --host 127.0.0.1 --port "${MCP_PORT}" >/dev/null 2>&1 &
MCP_PID="$!"
sleep 0.6
TARGET_BASE_URL="http://127.0.0.1:${PORT}"
MCP_URL="http://127.0.0.1:${MCP_PORT}/mcp"
API_V1_URL="http://127.0.0.1:${MCP_PORT}/api/v1"
else
MCP_URL="${TARGET_BASE_URL%/}/mcp"
API_V1_URL="${TARGET_BASE_URL%/}/api/v1"
fi
echo "[3/3] Verifying all 28 portal homepage, graph, encyclopedia, sibling-PDF, haiperdohp-jemaytreeah (.gitignore artifacts), CI & schema routes against ${TARGET_BASE_URL}..."
echo "[3/4] Verifying all active portal, /learn/, /quant/, graph, encyclopedia, haiperdohp-jemaytreeah (.gitignore artifacts), CI & schema routes against ${TARGET_BASE_URL}..."
ROUTES=(
"/"
"/donate/index.html"
"/learn/index.html"
"/learn/learn-app.js"
"/quant/index.html"
"/quant/quant-app.js"
"/quant/quant-tutorials.js"
"/quant/quant-timeseries-data.js"
"/quant/quant-timeseries.json"
"/quant/real-market-history.json"
"/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf"
"/graph/index.html"
"/graph/graph-data.js"
"/graph/encyclopedia-graph.json"
@@ -47,6 +70,10 @@ ROUTES=(
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html"
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf"
"/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
"/graph/docs/PLAN-QUANT-INTERFACE-INFO-ICONS-AND-GLOSSARY-POPOVERS.pdf"
"/graph/docs/PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.pdf"
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.pdf"
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION.pdf"
"/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf"
"/technocapital-singularity-zoology/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf"
"/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf"
@@ -66,6 +93,9 @@ ROUTES=(
"/ci/ONBOARDING-INGGLISH-AQ.pdf"
"/ci/ci-audit-report.json"
"/schemas/v1/encyclopedia-graph.schema.json"
"/schemas/v1/learn-progress-state.schema.json"
"/schemas/v1/financial-aq-harvest.schema.json"
"/schemas/v1/quant-timeseries.schema.json"
)
PASS_COUNT=0
@@ -81,4 +111,47 @@ for route in "${ROUTES[@]}"; do
fi
done
echo "[OK] All ${PASS_COUNT}/${#ROUTES[@]} deployment routes verified (HTTP 200 OK)."
echo "[4/4] Verifying stateless read-only MCP Streamable HTTP endpoint (${MCP_URL})..."
mcp_get_code="$(curl -s -o /dev/null -w "%{http_code}" "${MCP_URL}")"
if [[ "${mcp_get_code}" != "200" ]]; then
echo " [FAIL ${mcp_get_code}] GET ${MCP_URL}" >&2
exit 1
fi
echo " [200 OK] GET ${MCP_URL} (MCP capability manifest)"
mcp_post_out="$(curl -s -X POST "${MCP_URL}" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hs_evaluate_aq_and_ingglish","arguments":{"terms":["capital","capture","folds"]}}}')"
if ! grep -q 'exact_gen1_singularity.*true' <<<"${mcp_post_out}"; then
echo " [FAIL] POST ${MCP_URL} did not return exact_gen1_singularity=true" >&2
exit 1
fi
echo " [200 OK] POST ${MCP_URL} (JSON-RPC 2.0 tools/call hs_evaluate_aq_and_ingglish verified)"
echo "[4b/4] Verifying stateless REST API v1 & OpenAPI 3.1 endpoints (${API_V1_URL})..."
for api_sub in "/status" "/openapi.json" "/quant/timeseries?symbol=NVDA" "/quant/instruments/NVDA" "/zoology/pokedex/NVDA" "/dossiers/71?highlight=envideea"; do
api_code="$(curl -s -o /dev/null -w "%{http_code}" "${API_V1_URL}${api_sub}")"
if [[ "${api_code}" != "200" ]]; then
echo " [FAIL ${api_code}] GET ${API_V1_URL}${api_sub}" >&2
exit 1
fi
echo " [200 OK] GET ${API_V1_URL}${api_sub}"
done
if [[ -n "${HYPERSTITION_TELEMETRY_DB_PATH:-}" ]] && [[ -f "${LIVE_REPOS}/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta" ]]; then
echo "[4c/4] Verifying SQLite REST/MCP metadata DB population & quiescent logrotate.d compression + truncation..."
PYTHONPATH="${SCRIPT_DIR}/../src" python3 - <<'PY'
import os
from pathlib import Path
from hyperstitionstud_io.db.sqlite_meta import get_api_telemetry_summary, run_logrotate_directive
tel_db = Path(os.environ["HYPERSTITION_TELEMETRY_DB_PATH"])
conf_p = Path(os.environ["LIVE_REPOS"]) / "hyperstitionstudio-core" / "deploy" / "logrotate.d" / "hyperstition-sqlite-meta"
summary = get_api_telemetry_summary(tel_db)
assert summary["total_requests"] >= 5, f"Expected >= 5 recorded MCP/REST calls, got {summary['total_requests']}"
lr_out = run_logrotate_directive(conf_path=conf_p, telemetry_db_path=tel_db, max_bytes_override=1024)
assert lr_out["truncated"] is True and lr_out["quiescent"] is True and lr_out["integrity_check"] == "ok", lr_out
assert lr_out["compress_enabled"] is True and lr_out["compressed_archive_bytes"] > 0 and Path(lr_out["compressed_archive_path"]).is_file(), lr_out
print(f" [OK] SQLite metadata DB populated ({summary['total_requests']} calls), compressed to {Path(lr_out['compressed_archive_path']).name} ({lr_out['compressed_archive_bytes']} B) & quiescently truncated via {conf_p.name} (default {lr_out['configured_size_directive']}).")
PY
fi
echo "[OK] All ${PASS_COUNT}/${#ROUTES[@]} static routes + 2 MCP HTTP endpoints + 4 REST API v1 endpoints verified (HTTP 200 OK)."
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hyperstitionstud.io/workspace-core",
"version": "1.2.0",
"version": "2.0.24",
"private": true,
"description": "Offline-first ESM & browser global (@hyperstitionstud.io/* / window.HyperstitionStudio.*) packages for Base-36 AQ ciphers and interactive knowledge graph workbenches.",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hyperstitionstud.io/ciphers-aq",
"version": "1.2.0",
"version": "2.0.24",
"type": "module",
"main": "index.js",
"license": "MIT"
+9 -5
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hyperstitionstudio-core"
version = "1.2.0"
version = "2.0.24"
description = "Shared PEP 420 common library (hyperstitionstud_io.*) for Base-36 AQ ciphers, offline CMUdict Ingglish phonetics, ReportLab/Pillow publishing, SHA-256 glossary isolation guards, local-config citation verification, and multi-format knowledge graphs."
readme = "README.md"
requires-python = ">=3.10"
@@ -20,10 +20,14 @@ dependencies = [
]
[project.scripts]
hs-doctor = "hyperstitionstud_io.ci.doctor:main"
hs-citations = "hyperstitionstud_io.ci.citation_sources:main"
hs-pdf-build = "hyperstitionstud_io.publishing.pdf_compiler:main"
hs-kg-build = "hyperstitionstud_io.graph.cli:main"
hs-doctor = "hyperstitionstud_io.ci.doctor:main"
hs-citations = "hyperstitionstud_io.ci.citation_sources:main"
hs-pdf-build = "hyperstitionstud_io.publishing.pdf_compiler:main"
hs-kg-build = "hyperstitionstud_io.graph.cli:main"
hs-quant-harvest = "hyperstitionstud_io.quant.collector:main"
hs-mcp = "hyperstitionstud_io.mcp.server:main"
hs-sync-version = "hyperstitionstud_io.version_sync:main"
hs-db-build = "hyperstitionstud_io.db.sqlite_meta:main"
[tool.setuptools.packages.find]
where = ["src"]
@@ -0,0 +1,16 @@
{
"$schema": "urn:ietf:params:scim:schemas:core:2.0",
"$id": "urn:io:hyperstitionstud:schema:v1:financial-aq-harvest",
"title": "Periodic Quantitative Financial Telemetry & Contingent Meaning Harvest Schema (v2.0)",
"type": "object",
"required": [
"$id",
"version",
"target_date_utc",
"harvest_mode",
"regime_summary",
"instruments",
"anchor_revisions_detected",
"isolation_receipt"
]
}
@@ -0,0 +1,16 @@
{
"$schema": "urn:ietf:params:scim:schemas:core:2.0",
"$id": "urn:io:hyperstitionstud:schema:v1:learn-progress-state",
"title": "Self-Paced Learning Track Anonymous Progress State Schema (v2.0)",
"type": "object",
"required": [
"$id",
"version",
"updated_at_utc",
"preferred_register",
"completed_modules",
"bookmarked_coordinates",
"user_notes",
"integrity"
]
}
+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "urn:ietf:params:scim:schemas:core:2.0",
"$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries",
"title": "Lens-Neutral Periodic Quantitative Financial & Memetic Gematria Time-Series Schema (v2.0)",
"type": "object",
"required": [
"$id",
"version",
"namespace_urn",
"periodicity_gate",
"enabled_lenses",
"default_lens",
"dates_utc",
"instruments",
"builds",
"daily_wire_series",
"anchor_revision_series",
"isolation_receipt"
]
}
+163
View File
@@ -0,0 +1,163 @@
#!/usr/bin/env python3
"""
build_gallery_manifest.py — Deterministic Catalog Compiler for the Read-Only Memetic Gallery (/gallery/).
Scans the 35 existing visual/memetic artifacts across /workspace/memes, Zoology, and Knowledge Graph,
copies/stages the meme images into /workspace/hyperstitionstudio-core/site/gallery/media/ so they
deploy automatically with hyperstitionstudio-core, and writes site/gallery/gallery-data.js.
"""
from __future__ import annotations
import hashlib
import json
import shutil
from pathlib import Path
from PIL import Image
CORE_ROOT = Path(__file__).resolve().parents[1]
WS_ROOT = CORE_ROOT.parent
MEMES_DIR = WS_ROOT / "memes"
ZOOLOGY_DIR = WS_ROOT / "technocapital-singularity-zoology"
KG_DIR = WS_ROOT / "encyclopedia-knowledge-graph"
GALLERY_DIR = CORE_ROOT / "site" / "gallery"
MEDIA_DIR = GALLERY_DIR / "media"
def human_title(stem: str) -> str:
s = stem
for pref in ("meme_1_custom_", "meme_2_memegen_", "meme_3_memegen_", "meme_3_supermeme_", "meme_1_memegen_", "meme_1_makeameme_", "meme_1_imgflip_"):
if s.startswith(pref):
s = s[len(pref) :]
break
return s.replace("_", " ").title()
def main() -> int:
MEDIA_DIR.mkdir(parents=True, exist_ok=True)
items = []
# 1. Scan /workspace/memes/*.png and /workspace/memes/demos/*.png
meme_files = sorted(MEMES_DIR.glob("*.png")) + sorted((MEMES_DIR / "demos").glob("*.png"))
for p in meme_files:
is_demo = p.parent.name == "demos"
rel_sub = f"demos/{p.name}" if is_demo else p.name
dst = MEDIA_DIR / rel_sub
dst.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(p, dst)
pdf_pair = p.with_suffix(".pdf")
has_pdf = pdf_pair.is_file()
if has_pdf:
shutil.copy2(pdf_pair, MEDIA_DIR / pdf_pair.name)
with Image.open(p) as im:
w, h = im.size
low = p.stem.lower()
if "pokedex" in low or "technocapital" in low or "ants_assets" in low:
cat = "zoology"
cat_label = "Pokedex & Technocapital Zoology"
elif is_demo:
cat = "classic_demos"
cat_label = "Classic Template Demos"
else:
cat = "philosophy_comedy"
cat_label = "Stand-Up & Philosophical Exegesis"
title = human_title(p.stem)
if "pokedex" in low:
title = "Gen IV INFO Pokedex: M7_candidate_2026_11_28 (129 / 125 / 193 / 191)"
elif "gta6_huawei" in low:
title = "Technocapital Singularity: GTA 6 / Huawei (260 == teknohkapital == kiler rohbots)"
elif "bergson_russell" in low:
title = "Bergson & Russell Philosophical Exegesis (IASIP Template)"
sha12 = hashlib.sha256(p.read_bytes()).hexdigest()[:12]
items.append({
"id": f"meme:{rel_sub}",
"title": title,
"category": cat,
"category_label": cat_label,
"filename": p.name,
"width": w,
"height": h,
"bytes": p.stat().st_size,
"sha256_12": sha12,
"img_src": f"./media/{rel_sub}",
"pdf_src": f"./media/{pdf_pair.name}" if has_pdf else None,
})
# 2. Add the 4 High-Resolution Tier-List & Knowledge Graph Visual Atlas Boards
atlas_boards = [
(
ZOOLOGY_DIR / "tier-list-technocapital-assemblage-builds.png",
"Assemblage Builds ETI (0-100) Tier List Scorecard (S+ to D/F)",
"/zoology/tier-list-technocapital-assemblage-builds.png",
"../../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.png",
"/zoology/tier-list-technocapital-assemblage-builds.pdf",
"../../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.pdf",
),
(
KG_DIR / "atlas-mode2-concentric-eti-radar.png",
"Knowledge Graph Atlas Mode 2: Concentric ETI Tier-Ring Radar (S+ Center -> D Periphery)",
"/graph/atlas-mode2-concentric-eti-radar.png",
"../../../encyclopedia-knowledge-graph/atlas-mode2-concentric-eti-radar.png",
"/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
"../../../encyclopedia-knowledge-graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
),
(
KG_DIR / "atlas-mode1-trophic-food-web.png",
"Knowledge Graph Atlas Mode 1: Trophic Food-Web & 13 Flex-Pivot Topology",
"/graph/atlas-mode1-trophic-food-web.png",
"../../../encyclopedia-knowledge-graph/atlas-mode1-trophic-food-web.png",
None,
None,
),
(
KG_DIR / "atlas-mode3-bipartite-g1-funnel.png",
"Knowledge Graph Atlas Mode 3: Bipartite Gen 0 -> Gen 1 Variance-Collapse Funnel",
"/graph/atlas-mode3-bipartite-g1-funnel.png",
"../../../encyclopedia-knowledge-graph/atlas-mode3-bipartite-g1-funnel.png",
None,
None,
),
]
for p, title, http_img, file_img, http_pdf, file_pdf in atlas_boards:
if p.is_file():
with Image.open(p) as im:
w, h = im.size
sha12 = hashlib.sha256(p.read_bytes()).hexdigest()[:12]
items.append({
"id": f"board:{p.name}",
"title": title,
"category": "atlas_boards",
"category_label": "Tier-List & Atlas Boards",
"filename": p.name,
"width": w,
"height": h,
"bytes": p.stat().st_size,
"sha256_12": sha12,
"img_src": http_img,
"img_src_file": file_img,
"pdf_src": http_pdf,
"pdf_src_file": file_pdf,
})
manifest = {
"version": "2.0.24",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.0.24",
"total_items": len(items),
"items": items,
}
js_out = GALLERY_DIR / "gallery-data.js"
js_out.write_text(
"window.HyperstitionStudio = window.HyperstitionStudio || {};\n"
f"window.HyperstitionStudio.GalleryData = {json.dumps(manifest, indent=2)};\n",
encoding="utf-8",
)
print(f"Wrote {len(items)} gallery items to {js_out}")
return 0
if __name__ == "__main__":
raise SystemExit(main())
+645
View File
@@ -0,0 +1,645 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Signal Patronage &amp; Open-Instrument Notes — hyperstitionstud.io/donate</title>
<style>
:root {
--bg-canvas: #020617;
--bg-panel: #0f172a;
--bg-card: #1e293b;
--bg-deep: #090d16;
--border: #334155;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--cyan: #22d3ee;
--red: #ff4d4d;
--gold: #f5c630;
--emerald: #34d399;
--violet: #a78bfa;
--rose: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg-canvas);
color: var(--text-main);
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
min-height: 100vh;
padding: 1.75rem 1.5rem;
line-height: 1.55;
}
.container {
max-width: 1220px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 1.35rem;
}
header {
background: var(--bg-panel);
border: 1px solid var(--border);
border-left: 4px solid var(--gold);
border-radius: 10px;
padding: 1.25rem 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.title-row { display: flex; align-items: center; gap: 0.7rem; }
.dot {
width: 11px;
height: 11px;
border-radius: 50%;
background: var(--gold);
box-shadow: 0 0 10px var(--gold);
}
h1 { font-size: 1.24rem; font-weight: 700; letter-spacing: -0.01em; }
.subtitle { font-size: 0.77rem; color: var(--text-muted); margin-top: 0.3rem; }
.top-nav {
margin-left: auto;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.5rem;
flex-wrap: wrap;
}
.btn {
text-decoration: none;
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.42rem 0.78rem;
font-size: 0.74rem;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: all 0.15s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
.hero-panel {
background: linear-gradient(145deg, #0f172a 0%, #131c33 100%);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.75rem 1.85rem;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
gap: 2rem;
}
@media (max-width: 900px) {
.hero-panel { grid-template-columns: 1fr; }
}
.hero-tag {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--gold);
margin-bottom: 0.5rem;
}
.hero-title {
font-size: 1.38rem;
font-weight: 700;
color: var(--text-main);
line-height: 1.35;
margin-bottom: 0.9rem;
}
.hero-copy {
display: flex;
flex-direction: column;
gap: 0.75rem;
font-size: 0.82rem;
color: #cbd5e1;
line-height: 1.65;
}
.hero-copy em { color: var(--cyan); font-style: normal; font-weight: 600; }
.hero-cta-col {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.65rem;
padding: 1.15rem 1.25rem;
background: rgba(9, 13, 22, 0.72);
border: 1px solid rgba(245, 198, 48, 0.35);
border-radius: 12px;
}
/* Prominent Tactile Vector Pill DONATE Button */
.tactile-donate-btn {
position: relative;
width: 260px;
height: 68px;
border-radius: 999px;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 48%, #d97706 52%, #b45309 100%);
border: 3px solid #fde68a;
box-shadow:
inset 0 2px 3px rgba(255, 255, 255, 0.65),
0 6px 0 #78350f,
0 12px 24px rgba(245, 158, 11, 0.35);
display: inline-flex;
align-items: center;
gap: 0.85rem;
padding: 0 1.25rem 0 0.65rem;
text-decoration: none;
cursor: pointer;
user-select: none;
transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
overflow: hidden;
}
.tactile-donate-btn.centerpiece {
width: 280px;
height: 72px;
}
.tactile-donate-btn::before {
content: "";
position: absolute;
top: 2px;
left: 14px;
right: 14px;
height: 44%;
border-radius: 999px 999px 40% 40%;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.06) 100%);
pointer-events: none;
}
.tactile-donate-btn:hover {
filter: brightness(1.05);
transform: translateY(-1px);
box-shadow:
inset 0 2px 3px rgba(255, 255, 255, 0.72),
0 7px 0 #78350f,
0 14px 28px rgba(245, 158, 11, 0.45);
}
.tactile-donate-btn:active {
transform: translateY(3px);
box-shadow:
inset 0 2px 3px rgba(255, 255, 255, 0.45),
0 3px 0 #78350f,
0 6px 14px rgba(245, 158, 11, 0.3);
}
.tactile-emblem {
width: 44px;
height: 44px;
border-radius: 50%;
background: radial-gradient(circle at 32% 30%, #1e293b 0%, #020617 85%);
border: 2px solid #fde68a;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.75), 0 1px 2px rgba(255, 255, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
z-index: 1;
}
.tactile-label-group {
display: flex;
flex-direction: column;
align-items: flex-start;
z-index: 1;
}
.tactile-main-label {
font-size: 1.22rem;
font-weight: 800;
letter-spacing: 0.08em;
color: #020617;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
line-height: 1.1;
}
.tactile-sub-label {
font-size: 0.62rem;
font-weight: 700;
letter-spacing: 0.06em;
color: #1e293b;
text-transform: uppercase;
margin-top: 0.12rem;
}
.questions-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
gap: 1.15rem;
}
.panel {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.35rem 1.45rem;
display: flex;
flex-direction: column;
gap: 0.7rem;
}
.q-tag {
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.panel h2 { font-size: 1.02rem; font-weight: 700; color: var(--text-main); }
.panel p { font-size: 0.79rem; color: var(--text-muted); line-height: 1.6; }
.sandbox-card {
background: var(--bg-panel);
border: 1px solid var(--cyan);
border-radius: 10px;
padding: 1.4rem 1.5rem;
display: flex;
flex-direction: column;
gap: 0.9rem;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.story-pill {
background: var(--bg-deep);
color: var(--cyan);
border: 1px solid var(--border);
border-radius: 999px;
padding: 0.35rem 0.85rem;
font-size: 0.73rem;
font-family: inherit;
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;
}
.story-pill:hover, .story-pill.active {
background: var(--cyan);
color: #020617;
border-color: var(--cyan);
}
.sandbox-inputs {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
}
@media (max-width: 720px) {
.sandbox-inputs { grid-template-columns: 1fr; }
}
.inp-group { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.73rem; color: var(--text-muted); }
.inp {
background: var(--bg-deep);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.5rem 0.75rem;
font-family: inherit;
font-size: 0.8rem;
}
.sandbox-readout {
background: var(--bg-deep);
border: 1px solid var(--border);
border-left: 4px solid var(--emerald);
border-radius: 6px;
padding: 0.85rem 1rem;
font-size: 0.78rem;
color: var(--text-main);
white-space: pre-wrap;
}
.channels-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 0.9rem;
margin-top: 0.4rem;
}
.channel-card {
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.95rem 1.05rem;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 0.65rem;
}
.channel-card.selected {
border-color: var(--gold);
box-shadow: 0 0 12px rgba(245, 198, 48, 0.18);
}
.addr-box {
background: #020617;
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.4rem 0.55rem;
font-size: 0.69rem;
color: var(--cyan);
word-break: break-all;
}
footer {
margin-top: 0.75rem;
text-align: center;
font-size: 0.73rem;
color: var(--text-muted);
border-top: 1px solid var(--border);
padding-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
</style>
</head>
<body>
<div class="container">
<header>
<div>
<div class="title-row">
<span class="dot"></span>
<h1>hyperstitionstud.io/donate — Signal Patronage &amp; Open-Instrument Notes</h1>
</div>
<p class="subtitle">Open-Readout Phonemic, Graph &amp; Closing-Bell Telemetry Workbench &bull; Namespace Authority: urn:io:hyperstitionstud:donate:v2.0.24</p>
</div>
<nav class="top-nav">
<a class="btn" data-donate-route="home" href="/">Portal Home (/)</a>
<a class="btn" data-donate-route="quant" href="/quant/index.html">Time-Series (/quant/)</a>
<a class="btn" data-donate-route="graph" href="/graph/index.html">Knowledge Graph (/graph/)</a>
<a class="btn" data-donate-route="learn" href="/learn/index.html">Learning Track (/learn/)</a>
<a class="btn" data-donate-route="calc" href="/calc/index.html">Calculator (/calc/)</a>
</nav>
</header>
<!-- HERO ESSAY & PROMINENT TACTILE VECTOR DONATE BUTTON -->
<section class="hero-panel">
<div>
<div class="hero-tag">Open-Instrument Field Notes // Signal &amp; Circuitry</div>
<h2 class="hero-title">What If Language, Market Tape, and Breaking News Are Dials on the Same Circuit?</h2>
<div class="hero-copy">
<p>Spend ten minutes exploring the Knowledge Graph, the calculator, or the closing-bell timeline, and you will run into something that makes you pause.</p>
<p>Strip away the silent letters of standard English, and <em>synthetic data</em> and <em>abstract machine</em> land on the exact same coordinate as written <em>asset management</em>. Follow the fault lines of a market selloff, and <em>Dario Amodei</em>, <em>Anthropic</em>, and <em>flash crash</em> lock together across written and spoken scripts&mdash;or a trillion-dollar chipmaker closes at the exact dollar price of its own phonemic name on the night it leads the global news wire.</p>
<p>Most instruments are built to smooth those anomalies away&mdash;to sort the world into tidy, separate compartments where linguistics stays in one room, supply-chain bottlenecks stay in another, and market prices stay in a third.</p>
<p><code>hyperstitionstud.io</code> was built to see what happens when you wire those rooms together. Every evening at the US market close and the midnight UTC news rollover, our collectors harvest live headlines and core technocapital tickers, decode them into spoken phonemes, and map where the circuits cross&mdash;leaving the cover off the machine so anyone curious enough can trace the signal for themselves.</p>
</div>
</div>
<div class="hero-cta-col">
<a class="tactile-donate-btn" href="#fuel-channels" id="heroDonateBtn" aria-label="Donate and jump to contribution channels">
<span class="tactile-emblem" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="12" r="10" stroke="#f5c630" stroke-width="1.5" stroke-dasharray="3 2" />
<path d="M12 17.8C12 17.8 6.5 14.2 6.5 10.1C6.5 8.2 8.0 6.8 9.8 6.8C10.9 6.8 11.6 7.4 12 8.1C12.4 7.4 13.1 6.8 14.2 6.8C16.0 6.8 17.5 8.2 17.5 10.1C17.5 14.2 12 17.8 12 17.8Z" fill="#fb7185" stroke="#fde68a" stroke-width="1.2" />
</svg>
</span>
<span class="tactile-label-group">
<span class="tactile-main-label">DONATE &#x2197;</span>
<span class="tactile-sub-label">Toss Fuel in the Reactor</span>
</span>
</a>
<span style="font-size:0.7rem;color:var(--text-muted);text-align:center;">100% Open Readout &bull; Zero Trackers</span>
</div>
</section>
<!-- SECTION 1: THREE QUESTIONS THAT KEEP THIS WORKBENCH RUNNING -->
<section class="questions-grid" aria-label="Three Questions That Keep This Workbench Running">
<article class="panel">
<span class="q-tag" style="color:var(--cyan);">01 // The Ghost in the Spelling</span>
<h2>What is English hiding inside its spelling?</h2>
<p>Written English is an archaeological dig. Every word carries centuries of silent letters, borrowed scribal habits, and visual camouflage. When you decode a sentence into pure spoken sound&mdash;one spelling per phoneme&mdash;the camouflage drops away. Concepts that look miles apart in a press release or an earnings report suddenly collapse onto the exact same coordinate. Is that just a quirk of information compression, or is language acting like a low-level routing protocol for how culture and capital organize themselves? We&rsquo;d rather measure it than guess.</p>
</article>
<article class="panel">
<span class="q-tag" style="color:var(--gold);">02 // The Load-Bearing Chokepoints</span>
<h2>Where are the quiet walls that never move?</h2>
<p>Every technology boom is loud at the edges and silent at the center. Dozens of labs race to build the flashiest model or the fastest trading desk, while the entire spectacle quietly funnels through a handful of physical and legal bottlenecks&mdash;a single extreme-ultraviolet laser builder, a single wafer foundry, a corporate charter, a power grid. In our tables, certain words refuse to drift by a single point between how they are written on paper and how they sound out loud. Watching how the noisy stories orbit those fixed points tells you a lot about where leverage actually sits.</p>
</article>
<article class="panel">
<span class="q-tag" style="color:var(--emerald);">03 // The Discipline of the Room</span>
<h2>What happens when you outlaw dictionary fishing?</h2>
<p>Numerology gets a bad reputation for a simple reason: if you let yourself rummage through a 200,000-word dictionary after the fact, you can connect any number to anything. That&rsquo;s a parlor trick. So we enforce a stricter rule: <em>stay in the room</em>. Only evaluate the words, people, and prices that actually showed up together in the same day&rsquo;s news wire, the same supply chain, or the same closing bell. When the locks still fire under that constraint, the question stops being &ldquo;can you find a pattern?&rdquo; and becomes &ldquo;why did these specific pieces fall into place at the same time?&rdquo;</p>
</article>
</section>
<!-- SECTION 2: TRY A WIRE EXPERIMENT (INTERACTIVE CURIOSITY SANDBOX) -->
<section class="sandbox-card" aria-label="Interactive Curiosity Sandbox">
<div>
<div class="q-tag" style="color:var(--cyan);">04 // Interactive Curiosity Sandbox</div>
<h2 style="font-size:1.06rem;margin-top:0.2rem;">Try a Wire Experiment: Watch Silent Letters Drop Away</h2>
<p style="font-size:0.78rem;color:var(--text-muted);margin-top:0.25rem;">Click a live collision below&mdash;or type two terms of your own&mdash;to see how standard written spelling (<code>Gen 0</code>) and pure spoken sound (<code>Gen 1 Ingglish</code>) score in Base-36 Alphanumeric Qabbala (<code>0&ndash;9 = 0..9, A&ndash;Z = 10..35</code>):</p>
</div>
<div class="pill-row" id="curiosityPills">
<button type="button" class="story-pill active" data-a="Anthropic" data-b="flash crash" data-note="Both spoken forms ('anthropik' and 'flash krash') lock onto 193 (the 44th prime)—matching written 'Dario Amodei' (193).">The Founder &amp; The Flash Crash (193)</button>
<button type="button" class="story-pill" data-a="synthetic data" data-b="abstract machine" data-note="Separated by 41 points in written English (276 vs. 317), both collapse onto 292 in spoken sound—the exact written coordinate of 'asset management' (292).">Synthetic Data &amp; Abstract Machine (292)</button>
<button type="button" class="story-pill" data-a="ASML" data-b="asset" data-note="'ASML' (81) is an isometric lithography chokepoint (Δ = 0) that locks directly onto spoken 'asat' (81) and '+81 bps' closing-bell moves.">The Chip Laser &amp; The Balance Sheet (81)</button>
<button type="button" class="story-pill" data-a="capital" data-b="capture" data-note="'capital' -> 'kapatal' (125, Δ = 0 isometric anchor) and 'capture' -> 'kapcher' (125) converge on the core S6 coordinate 125.">Capital &amp; Capture (125)</button>
</div>
<div class="sandbox-inputs">
<label class="inp-group">Term A (Written English):
<input class="inp" id="expInputA" type="text" value="Anthropic" />
</label>
<label class="inp-group">Term B (Written English):
<input class="inp" id="expInputB" type="text" value="flash crash" />
</label>
</div>
<div class="sandbox-readout" id="expReadout"></div>
</section>
<!-- SECTION 3: BACKING THE SIGNAL -->
<section class="panel">
<span class="q-tag" style="color:var(--violet);">05 // Backing the Signal</span>
<h2>Where Patronage Goes</h2>
<p>Every tool on <code>hyperstitionstud.io</code>&mdash;the 388-node property graph, the 22-volume encyclopedia, the multi-cipher calculator, the closing-bell time-series workbench, and the public API&mdash;is open, downloadable for offline travel, and built to show you the raw readout so you can test your own hypotheses.</p>
<p>Patronage directly fuels the next layer of the instrument: keeping the public HTTP/3 relays fast, expanding the daily midnight wire and closing-bell harvests, synthesizing new full-length episodes of <em>The Encyclopedia Expeditions</em>, and charting new divisions of the archive.</p>
<p>If a lock, a dossier, or an hour spent exploring the graph sparked a new line of thought, you can toss fuel into the reactor via the button or addresses below&mdash;or fork the repositories on <code>git.libre.audio</code> and build an instrument of your own.</p>
</section>
<!-- SECTION 4: FUEL THE REACTOR (DIRECT CONTRIBUTION CHANNELS) -->
<section class="panel" id="fuel-channels">
<div style="display:flex;flex-direction:column;align-items:center;gap:0.65rem;padding:0.6rem 0 0.9rem;border-bottom:1px solid var(--border);">
<span class="q-tag" style="color:var(--gold);">06 // Fuel the Reactor &bull; Direct Contribution Channels</span>
<button type="button" class="tactile-donate-btn centerpiece" id="primaryDonateActionBtn">
<span class="tactile-emblem" aria-hidden="true">
<svg width="26" height="26" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="12" r="10" stroke="#f5c630" stroke-width="1.5" stroke-dasharray="3 2" />
<path d="M12 17.8C12 17.8 6.5 14.2 6.5 10.1C6.5 8.2 8.0 6.8 9.8 6.8C10.9 6.8 11.6 7.4 12 8.1C12.4 7.4 13.1 6.8 14.2 6.8C16.0 6.8 17.5 8.2 17.5 10.1C17.5 14.2 12 17.8 12 17.8Z" fill="#fb7185" stroke="#fde68a" stroke-width="1.2" />
</svg>
</span>
<span class="tactile-label-group">
<span class="tactile-main-label">DONATE</span>
<span class="tactile-sub-label" id="primaryDonateSubLabel">Copy Active Channel (BTC)</span>
</span>
</button>
<div id="copyFeedbackBanner" style="font-size:0.75rem;color:var(--emerald);min-height:1.15rem;">Select any channel card below or click the DONATE button to copy its address.</div>
</div>
<div class="channels-grid" id="channelCardsGrid">
<div class="channel-card selected" data-channel="BTC" data-addr="bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e">
<div>
<div style="display:flex;justify-content:space-between;align-items:center;">
<strong style="color:var(--gold);font-size:0.84rem;">Bitcoin (BTC // Layer-1)</strong>
<span style="font-size:0.68rem;color:var(--text-muted);">AQ(bitcoin) = 152</span>
</div>
<p style="font-size:0.72rem;margin-top:0.25rem;">Direct sovereign settlement for daily wire &amp; closing-bell telemetry harvests.</p>
</div>
<div class="addr-box">bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e</div>
<button type="button" class="btn copy-channel-btn" data-channel="BTC" data-addr="bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e">Copy BTC Address</button>
</div>
<div class="channel-card" data-channel="XMR" data-addr="83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ">
<div>
<div style="display:flex;justify-content:space-between;align-items:center;">
<strong style="color:var(--rose);font-size:0.84rem;">Monero (XMR // Zero-Trace)</strong>
<span style="font-size:0.68rem;color:var(--text-muted);">44th Prime (193)</span>
</div>
<p style="font-size:0.72rem;margin-top:0.25rem;">Zero-metadata shielded patronage aligned with our zero-tracker architecture.</p>
</div>
<div class="addr-box">83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ</div>
<button type="button" class="btn copy-channel-btn" data-channel="XMR" data-addr="83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ">Copy XMR Address</button>
</div>
</div>
<div style="display:flex;flex-wrap:wrap;gap:0.55rem;justify-content:center;padding-top:0.65rem;">
<a class="btn primary" data-donate-route="quant" href="/quant/index.html">Explore Closing-Bell Time-Series (/quant/)</a>
<a class="btn" data-donate-route="graph" href="/graph/index.html">Trace Bridges in Knowledge Graph (/graph/)</a>
<a class="btn" data-donate-route="calc" href="/calc/index.html">Test Hypotheses in Calculator (/calc/)</a>
<a class="btn" href="https://git.libre.audio/seasharp" target="_blank" rel="noopener noreferrer">Fork Repositories on git.libre.audio &#x2197;</a>
</div>
</section>
<footer>
<div>hyperstitionstud.io/donate v2.0.24 &bull; 100% Static &amp; Offline-Portable &bull; Zero External Trackers</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<script>
(function () {
"use strict";
if (window.location.protocol === "file:") {
const routeMap = {
"home": "../index.html",
"quant": "../quant/index.html",
"learn": "../learn/index.html",
"graph": "../../../encyclopedia-knowledge-graph/index.html",
"calc": "../../../haiperdohp-jemaytreeah/index.html"
};
document.querySelectorAll("[data-donate-route]").forEach(function (a) {
const k = a.getAttribute("data-donate-route");
if (routeMap[k]) a.setAttribute("href", routeMap[k]);
});
}
const PHONEMIC_MAP = {
"anthropic": "anthropik",
"flash crash": "flash krash",
"dario amodei": "dario amodei",
"synthetic data": "sinthetik dayta",
"abstract machine": "abstrakt masheen",
"schizoanalysis": "shizohnalizis",
"asset management": "asat manajmant",
"asml": "asml",
"asset": "asat",
"capital": "kapatal",
"capture": "kapcher",
"folds": "fohldz",
"nvidia": "envideea",
"halts": "hawlts",
"inertia": "inersha",
"blackwell": "blakwel",
"charter": "charter",
"sloth": "slawth"
};
function toIngglishApprox(str) {
const key = (str || "").trim().toLowerCase();
if (PHONEMIC_MAP[key]) return PHONEMIC_MAP[key];
return key
.replace(/ph/g, "f")
.replace(/ght/g, "t")
.replace(/kn/g, "n")
.replace(/wr/g, "r")
.replace(/ck/g, "k")
.replace(/qu/g, "kw")
.replace(/c(?=[eiy])/g, "s")
.replace(/c/g, "k");
}
function computeAQ(str) {
const s = (str || "").toUpperCase();
let sum = 0;
for (let i = 0; i < s.length; i++) {
const c = s.charCodeAt(i);
if (c >= 48 && c <= 57) sum += (c - 48);
else if (c >= 65 && c <= 90) sum += (c - 55);
}
return sum;
}
const inpA = document.getElementById("expInputA");
const inpB = document.getElementById("expInputB");
const readout = document.getElementById("expReadout");
let activeNote = "Both spoken forms ('anthropik' and 'flash krash') lock onto 193 (the 44th prime)—matching written 'Dario Amodei' (193).";
function updateSandbox() {
const rawA = inpA.value.trim() || "Anthropic";
const rawB = inpB.value.trim() || "flash crash";
const ingA = toIngglishApprox(rawA);
const ingB = toIngglishApprox(rawB);
const engAqA = computeAQ(rawA);
const engAqB = computeAQ(rawB);
const ingAqA = computeAQ(ingA);
const ingAqB = computeAQ(ingB);
const writtenDelta = Math.abs(engAqA - engAqB);
const spokenDelta = Math.abs(ingAqA - ingAqB);
const statusLine = spokenDelta === 0
? `EXACT SPOKEN LOCK AT COORDINATE ${ingAqA} (Written gap of ${writtenDelta} pts collapses to 0 in spoken sound!)`
: `Written Gap: |${engAqA} - ${engAqB}| = ${writtenDelta} pts | Spoken Gap: |${ingAqA} - ${ingAqB}| = ${spokenDelta} pts`;
readout.textContent =
`Term A: "${rawA}" (Written AQ = ${engAqA}) --> Spoken Ingglish: "${ingA}" (Spoken AQ = ${ingAqA}, Δ = ${ingAqA - engAqA})\n` +
`Term B: "${rawB}" (Written AQ = ${engAqB}) --> Spoken Ingglish: "${ingB}" (Spoken AQ = ${ingAqB}, Δ = ${ingAqB - engAqB})\n` +
`Result: ${statusLine}\n` +
(activeNote ? `Note: ${activeNote}` : "");
}
document.querySelectorAll(".story-pill").forEach(function (btn) {
btn.addEventListener("click", function () {
document.querySelectorAll(".story-pill").forEach(function (b) { b.classList.remove("active"); });
btn.classList.add("active");
inpA.value = btn.getAttribute("data-a") || "";
inpB.value = btn.getAttribute("data-b") || "";
activeNote = btn.getAttribute("data-note") || "";
updateSandbox();
});
});
inpA.addEventListener("input", function () { activeNote = ""; updateSandbox(); });
inpB.addEventListener("input", function () { activeNote = ""; updateSandbox(); });
updateSandbox();
// Channel selection & one-click copy
let selectedChannel = "BTC";
let selectedAddr = "bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e";
const subLbl = document.getElementById("primaryDonateSubLabel");
const feedback = document.getElementById("copyFeedbackBanner");
function copyAddress(channel, addr) {
selectedChannel = channel;
selectedAddr = addr;
document.querySelectorAll(".channel-card").forEach(function (card) {
card.classList.toggle("selected", card.getAttribute("data-channel") === channel);
});
if (subLbl) subLbl.textContent = `Copy Active Channel (${channel})`;
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(addr).catch(function () {});
}
if (feedback) {
feedback.textContent = `[COPIED ${channel}] ${addr} — Ready to paste in your wallet.`;
}
}
document.querySelectorAll(".copy-channel-btn").forEach(function (btn) {
btn.addEventListener("click", function () {
copyAddress(btn.getAttribute("data-channel"), btn.getAttribute("data-addr"));
});
});
document.querySelectorAll(".channel-card").forEach(function (card) {
card.addEventListener("click", function (e) {
if (e.target.tagName === "BUTTON") return;
copyAddress(card.getAttribute("data-channel"), card.getAttribute("data-addr"));
});
});
const primaryBtn = document.getElementById("primaryDonateActionBtn");
if (primaryBtn) {
primaryBtn.addEventListener("click", function () {
copyAddress(selectedChannel, selectedAddr);
});
}
})();
</script>
</body>
</html>
+497
View File
@@ -0,0 +1,497 @@
window.HyperstitionStudio = window.HyperstitionStudio || {};
window.HyperstitionStudio.GalleryData = {
"version": "2.0.13",
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.0.13",
"total_items": 37,
"items": [
{
"id": "meme:meme_1_custom_antijoke_chicken_brick.png",
"title": "Antijoke Chicken Brick",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_antijoke_chicken_brick.png",
"width": 500,
"height": 500,
"bytes": 165897,
"sha256_12": "f1ac506ffb48",
"img_src": "./media/meme_1_custom_antijoke_chicken_brick.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_antijoke_disaster_girl_ice_cream.png",
"title": "Antijoke Disaster Girl Ice Cream",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_antijoke_disaster_girl_ice_cream.png",
"width": 800,
"height": 600,
"bytes": 561684,
"sha256_12": "44b9ab451aa9",
"img_src": "./media/meme_1_custom_antijoke_disaster_girl_ice_cream.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_antijoke_harold_bar_alcoholism.png",
"title": "Antijoke Harold Bar Alcoholism",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_antijoke_harold_bar_alcoholism.png",
"width": 900,
"height": 600,
"bytes": 449321,
"sha256_12": "f7ff16bace93",
"img_src": "./media/meme_1_custom_antijoke_harold_bar_alcoholism.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_carlin_matrix_morpheus.png",
"title": "Carlin Matrix Morpheus",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_carlin_matrix_morpheus.png",
"width": 990,
"height": 600,
"bytes": 385922,
"sha256_12": "a0b8200df527",
"img_src": "./media/meme_1_custom_carlin_matrix_morpheus.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_chris_rock_condescending_wonka.png",
"title": "Chris Rock Condescending Wonka",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_chris_rock_condescending_wonka.png",
"width": 834,
"height": 600,
"bytes": 472985,
"sha256_12": "87badcbe2988",
"img_src": "./media/meme_1_custom_chris_rock_condescending_wonka.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_dangerfield_awesome_awkward_penguin.png",
"title": "Dangerfield Awesome Awkward Penguin",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_dangerfield_awesome_awkward_penguin.png",
"width": 600,
"height": 601,
"bytes": 147231,
"sha256_12": "41c2a532f391",
"img_src": "./media/meme_1_custom_dangerfield_awesome_awkward_penguin.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_demetri_martin_sudden_clarity_clarence.png",
"title": "Demetri Martin Sudden Clarity Clarence",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_demetri_martin_sudden_clarity_clarence.png",
"width": 1102,
"height": 600,
"bytes": 828946,
"sha256_12": "8fdc13249903",
"img_src": "./media/meme_1_custom_demetri_martin_sudden_clarity_clarence.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_emo_philips_futurama_fry.png",
"title": "Emo Philips Futurama Fry",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_emo_philips_futurama_fry.png",
"width": 800,
"height": 600,
"bytes": 301620,
"sha256_12": "702f2d66b52b",
"img_src": "./media/meme_1_custom_emo_philips_futurama_fry.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_groucho_philosoraptor.png",
"title": "Groucho Philosoraptor",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_groucho_philosoraptor.png",
"width": 600,
"height": 600,
"bytes": 266942,
"sha256_12": "5424276527a4",
"img_src": "./media/meme_1_custom_groucho_philosoraptor.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_hedberg_10_guy.png",
"title": "Hedberg 10 Guy",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_hedberg_10_guy.png",
"width": 660,
"height": 600,
"bytes": 343805,
"sha256_12": "729c284b96cd",
"img_src": "./media/meme_1_custom_hedberg_10_guy.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_iasip_bergson_russell_fucked_you_up.png",
"title": "Bergson & Russell Philosophical Exegesis (IASIP Template)",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_iasip_bergson_russell_fucked_you_up.png",
"width": 1152,
"height": 648,
"bytes": 957804,
"sha256_12": "b59028b3c396",
"img_src": "./media/meme_1_custom_iasip_bergson_russell_fucked_you_up.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_jeselnik_confession_bear.png",
"title": "Jeselnik Confession Bear",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_jeselnik_confession_bear.png",
"width": 600,
"height": 626,
"bytes": 422778,
"sha256_12": "008c908218a5",
"img_src": "./media/meme_1_custom_jeselnik_confession_bear.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_norm_macdonald_success_kid.png",
"title": "Norm Macdonald Success Kid",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_norm_macdonald_success_kid.png",
"width": 622,
"height": 600,
"bytes": 172275,
"sha256_12": "05697ba4925e",
"img_src": "./media/meme_1_custom_norm_macdonald_success_kid.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_parks_rec_ron_swanson_whole_ass.png",
"title": "Parks Rec Ron Swanson Whole Ass",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_parks_rec_ron_swanson_whole_ass.png",
"width": 300,
"height": 259,
"bytes": 122081,
"sha256_12": "3a03c715a293",
"img_src": "./media/meme_1_custom_parks_rec_ron_swanson_whole_ass.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_pokedex_technocapital_zoology_m7_129_125.png",
"title": "Gen IV INFO Pokedex: M7_candidate_2026_11_28 (129 / 125 / 193 / 191)",
"category": "zoology",
"category_label": "Pokedex & Technocapital Zoology",
"filename": "meme_1_custom_pokedex_technocapital_zoology_m7_129_125.png",
"width": 1024,
"height": 652,
"bytes": 225137,
"sha256_12": "a33801992268",
"img_src": "./media/meme_1_custom_pokedex_technocapital_zoology_m7_129_125.png",
"pdf_src": "./media/meme_1_custom_pokedex_technocapital_zoology_m7_129_125.pdf"
},
{
"id": "meme:meme_1_custom_seinfeld_conspiracy_keanu.png",
"title": "Seinfeld Conspiracy Keanu",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_seinfeld_conspiracy_keanu.png",
"width": 602,
"height": 600,
"bytes": 325554,
"sha256_12": "bc48f2004021",
"img_src": "./media/meme_1_custom_seinfeld_conspiracy_keanu.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_seinfeld_costanza_not_a_lie.png",
"title": "Seinfeld Costanza Not A Lie",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_seinfeld_costanza_not_a_lie.png",
"width": 550,
"height": 311,
"bytes": 225238,
"sha256_12": "eebdf44bbaad",
"img_src": "./media/meme_1_custom_seinfeld_costanza_not_a_lie.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_simpsons_alcohol_interesting_man.png",
"title": "Simpsons Alcohol Interesting Man",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_simpsons_alcohol_interesting_man.png",
"width": 600,
"height": 759,
"bytes": 434544,
"sha256_12": "7f1a27b86604",
"img_src": "./media/meme_1_custom_simpsons_alcohol_interesting_man.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_technocapital_zoology_gta6_huawei_260_22.png",
"title": "Technocapital Singularity: GTA 6 / Huawei (260 == teknohkapital == kiler rohbots)",
"category": "zoology",
"category_label": "Pokedex & Technocapital Zoology",
"filename": "meme_1_custom_technocapital_zoology_gta6_huawei_260_22.png",
"width": 1024,
"height": 768,
"bytes": 747196,
"sha256_12": "c5fab2bd0801",
"img_src": "./media/meme_1_custom_technocapital_zoology_gta6_huawei_260_22.png",
"pdf_src": "./media/meme_1_custom_technocapital_zoology_gta6_huawei_260_22.pdf"
},
{
"id": "meme:meme_1_custom_wright_roll_safe.png",
"title": "Wright Roll Safe",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_wright_roll_safe.png",
"width": 702,
"height": 395,
"bytes": 291900,
"sha256_12": "b47ca53241de",
"img_src": "./media/meme_1_custom_wright_roll_safe.png",
"pdf_src": null
},
{
"id": "meme:meme_1_custom_youngman_bad_joke_eel.png",
"title": "Youngman Bad Joke Eel",
"category": "philosophy_comedy",
"category_label": "Stand-Up & Philosophical Exegesis",
"filename": "meme_1_custom_youngman_bad_joke_eel.png",
"width": 500,
"height": 371,
"bytes": 262780,
"sha256_12": "afe8c77a5cec",
"img_src": "./media/meme_1_custom_youngman_bad_joke_eel.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_custom_ackbar_thug_scumbag_ytmnd.png",
"title": "Ackbar Thug Scumbag Ytmnd",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_custom_ackbar_thug_scumbag_ytmnd.png",
"width": 600,
"height": 777,
"bytes": 477302,
"sha256_12": "ef36cf14fbf5",
"img_src": "./media/demos/meme_1_custom_ackbar_thug_scumbag_ytmnd.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_custom_ants_assets_demo.png",
"title": "Ants Assets Demo",
"category": "zoology",
"category_label": "Pokedex & Technocapital Zoology",
"filename": "meme_1_custom_ants_assets_demo.png",
"width": 653,
"height": 600,
"bytes": 450945,
"sha256_12": "dcc445203165",
"img_src": "./media/demos/meme_1_custom_ants_assets_demo.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_custom_awkward_moment_seal_id_ams.png",
"title": "Awkward Moment Seal Id Ams",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_custom_awkward_moment_seal_id_ams.png",
"width": 1068,
"height": 600,
"bytes": 747707,
"sha256_12": "caaf8d3e7692",
"img_src": "./media/demos/meme_1_custom_awkward_moment_seal_id_ams.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_custom_bad_luck_brian_doorjamb.png",
"title": "Bad Luck Brian Doorjamb",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_custom_bad_luck_brian_doorjamb.png",
"width": 600,
"height": 600,
"bytes": 319074,
"sha256_12": "f90a79f060f4",
"img_src": "./media/demos/meme_1_custom_bad_luck_brian_doorjamb.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_imgflip_anakin_padme_4_panel.png",
"title": "Anakin Padme 4 Panel",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_imgflip_anakin_padme_4_panel.png",
"width": 768,
"height": 768,
"bytes": 860855,
"sha256_12": "9aa25c890811",
"img_src": "./media/demos/meme_1_imgflip_anakin_padme_4_panel.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_makeameme_rainbow_spongebob.png",
"title": "Rainbow Spongebob",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_makeameme_rainbow_spongebob.png",
"width": 250,
"height": 250,
"bytes": 111864,
"sha256_12": "727979021908",
"img_src": "./media/demos/meme_1_makeameme_rainbow_spongebob.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_1_memegen_do_you_want_ants_id_ants.png",
"title": "Do You Want Ants Id Ants",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_1_memegen_do_you_want_ants_id_ants.png",
"width": 653,
"height": 600,
"bytes": 460186,
"sha256_12": "228c4caa16f2",
"img_src": "./media/demos/meme_1_memegen_do_you_want_ants_id_ants.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_2_memegen_awkward_moment_seal_id_ams.png",
"title": "Awkward Moment Seal Id Ams",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_2_memegen_awkward_moment_seal_id_ams.png",
"width": 1068,
"height": 600,
"bytes": 747707,
"sha256_12": "caaf8d3e7692",
"img_src": "./media/demos/meme_2_memegen_awkward_moment_seal_id_ams.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_2_memegen_do_you_want_ants_id_ants.png",
"title": "Do You Want Ants Id Ants",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_2_memegen_do_you_want_ants_id_ants.png",
"width": 653,
"height": 600,
"bytes": 431619,
"sha256_12": "3b5a967c0a9c",
"img_src": "./media/demos/meme_2_memegen_do_you_want_ants_id_ants.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_2_memegen_it_s_a_trap_id_ackbar.png",
"title": "It S A Trap Id Ackbar",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_2_memegen_it_s_a_trap_id_ackbar.png",
"width": 600,
"height": 777,
"bytes": 442610,
"sha256_12": "84c499f2fecf",
"img_src": "./media/demos/meme_2_memegen_it_s_a_trap_id_ackbar.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_3_memegen_it_s_a_trap_id_ackbar.png",
"title": "It S A Trap Id Ackbar",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_3_memegen_it_s_a_trap_id_ackbar.png",
"width": 600,
"height": 777,
"bytes": 468710,
"sha256_12": "9aa7ed92ebe9",
"img_src": "./media/demos/meme_3_memegen_it_s_a_trap_id_ackbar.png",
"pdf_src": null
},
{
"id": "meme:demos/meme_3_supermeme_corporate_wants_you_to_find_the_differen.png",
"title": "Corporate Wants You To Find The Differen",
"category": "classic_demos",
"category_label": "Classic Template Demos",
"filename": "meme_3_supermeme_corporate_wants_you_to_find_the_differen.png",
"width": 250,
"height": 250,
"bytes": 80412,
"sha256_12": "fb5290d2f0f7",
"img_src": "./media/demos/meme_3_supermeme_corporate_wants_you_to_find_the_differen.png",
"pdf_src": null
},
{
"id": "board:tier-list-technocapital-assemblage-builds.png",
"title": "Assemblage Builds ETI (0-100) Tier List Scorecard (S+ to D/F)",
"category": "atlas_boards",
"category_label": "Tier-List & Atlas Boards",
"filename": "tier-list-technocapital-assemblage-builds.png",
"width": 1960,
"height": 1438,
"bytes": 204425,
"sha256_12": "6d6517be112c",
"img_src": "/zoology/tier-list-technocapital-assemblage-builds.png",
"img_src_file": "../../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.png",
"pdf_src": "/zoology/tier-list-technocapital-assemblage-builds.pdf",
"pdf_src_file": "../../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.pdf"
},
{
"id": "board:atlas-mode2-concentric-eti-radar.png",
"title": "Knowledge Graph Atlas Mode 2: Concentric ETI Tier-Ring Radar (S+ Center -> D Periphery)",
"category": "atlas_boards",
"category_label": "Tier-List & Atlas Boards",
"filename": "atlas-mode2-concentric-eti-radar.png",
"width": 1600,
"height": 1060,
"bytes": 368893,
"sha256_12": "5ffb12edadde",
"img_src": "/graph/atlas-mode2-concentric-eti-radar.png",
"img_src_file": "../../../encyclopedia-knowledge-graph/atlas-mode2-concentric-eti-radar.png",
"pdf_src": "/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
"pdf_src_file": "../../../encyclopedia-knowledge-graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf"
},
{
"id": "board:atlas-mode1-trophic-food-web.png",
"title": "Knowledge Graph Atlas Mode 1: Trophic Food-Web & 13 Flex-Pivot Topology",
"category": "atlas_boards",
"category_label": "Tier-List & Atlas Boards",
"filename": "atlas-mode1-trophic-food-web.png",
"width": 1600,
"height": 1060,
"bytes": 509331,
"sha256_12": "c2bb77bfa516",
"img_src": "/graph/atlas-mode1-trophic-food-web.png",
"img_src_file": "../../../encyclopedia-knowledge-graph/atlas-mode1-trophic-food-web.png",
"pdf_src": null,
"pdf_src_file": null
},
{
"id": "board:atlas-mode3-bipartite-g1-funnel.png",
"title": "Knowledge Graph Atlas Mode 3: Bipartite Gen 0 -> Gen 1 Variance-Collapse Funnel",
"category": "atlas_boards",
"category_label": "Tier-List & Atlas Boards",
"filename": "atlas-mode3-bipartite-g1-funnel.png",
"width": 1600,
"height": 1060,
"bytes": 439419,
"sha256_12": "736be1765925",
"img_src": "/graph/atlas-mode3-bipartite-g1-funnel.png",
"img_src_file": "../../../encyclopedia-knowledge-graph/atlas-mode3-bipartite-g1-funnel.png",
"pdf_src": null,
"pdf_src_file": null
}
]
};
+394
View File
@@ -0,0 +1,394 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Memetic Artifact &amp; Visual Atlas Gallery — hyperstitionstud.io</title>
<style>
:root {
--bg-canvas: #020617;
--bg-panel: #0f172a;
--bg-card: #1e293b;
--border: #334155;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--cyan: #22d3ee;
--red: #ff4d4d;
--gold: #f5c630;
--emerald: #34d399;
--rose: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg-canvas);
color: var(--text-main);
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
min-height: 100vh;
padding: 1.5rem;
line-height: 1.5;
}
.container { max-width: 1360px; margin: 0 auto; }
header {
background: var(--bg-panel);
border: 1px solid var(--border);
border-left: 4px solid var(--gold);
border-radius: 10px;
padding: 1.2rem 1.5rem;
margin-bottom: 1.2rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
h1 { font-size: 1.25rem; font-weight: 700; }
.subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.top-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn {
text-decoration: none;
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.45rem 0.8rem;
font-size: 0.74rem;
font-weight: 600;
cursor: pointer;
font-family: inherit;
transition: all 0.15s ease;
}
.btn:hover, .btn.active { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
.filter-bar {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.9rem 1.2rem;
margin-bottom: 1.3rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
}
.pill-row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.search-input {
background: #090d16;
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.42rem 0.75rem;
font-family: inherit;
font-size: 0.75rem;
width: 260px;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
gap: 1.1rem;
}
.gallery-grid.compact {
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.thumb-wrap {
background: #070a12;
height: 240px;
display: flex;
align-items: center;
justify-content: center;
padding: 0.5rem;
cursor: pointer;
border-bottom: 1px solid var(--border);
}
.gallery-grid.compact .thumb-wrap { height: 165px; }
.thumb-wrap img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 4px;
}
.card-body {
padding: 0.85rem 1rem;
display: flex;
flex-direction: column;
gap: 0.45rem;
}
.cat-tag {
font-size: 0.66rem;
font-weight: 700;
text-transform: uppercase;
color: var(--gold);
}
.card-title { font-size: 0.84rem; font-weight: 700; color: var(--text-main); }
.card-meta { font-size: 0.68rem; color: var(--text-muted); }
.card-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.lightbox {
position: fixed;
inset: 0;
background: rgba(2, 6, 23, 0.94);
z-index: 100;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lb-top {
width: 100%;
max-width: 1280px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.75rem;
gap: 1rem;
}
.lb-img-wrap {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
max-width: 1280px;
width: 100%;
}
.lb-img-wrap img {
max-width: 100%;
max-height: 78vh;
object-fit: contain;
border: 1px solid var(--border);
border-radius: 6px;
}
footer {
margin-top: 2rem;
text-align: center;
font-size: 0.74rem;
color: var(--text-muted);
border-top: 1px solid var(--border);
padding-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.hs-lemur-credit { color: var(--text-muted); font-size: 0.75rem; }
.hs-heart { color: var(--rose); display: inline-block; padding: 0 2px; }
</style>
</head>
<body>
<div class="container">
<header>
<div>
<h1>MEMETIC ARTIFACT &amp; VISUAL ATLAS GALLERY // HYPERSTITIONSTUD.IO</h1>
<p class="subtitle">Read-Only Specimen Browser Across Pokedex Field Cards, Philosophical &amp; Stand-Up Exegesis, Template Benchmarks &amp; ETI Visual Boards</p>
</div>
<nav class="top-nav">
<a class="btn" id="navHome" href="../index.html">&larr; Portal Home</a>
<a class="btn" id="navLearn" href="../learn/index.html">Learning Track</a>
<a class="btn" id="navGraph" href="/graph/index.html">Knowledge Graph</a>
<a class="btn" id="navCalc" href="/calc/index.html">AQ Calculator</a>
</nav>
</header>
<section class="filter-bar">
<div class="pill-row" id="categoryPills">
<button class="btn active" data-cat="all" type="button">All Specimens</button>
<button class="btn" data-cat="zoology" type="button">Pokedex &amp; Zoology</button>
<button class="btn" data-cat="atlas_boards" type="button">Tier-List &amp; Atlas Boards</button>
<button class="btn" data-cat="philosophy_comedy" type="button">Stand-Up &amp; Philosophy</button>
<button class="btn" data-cat="classic_demos" type="button">Classic Template Demos</button>
</div>
<div style="display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;">
<input class="search-input" id="searchInput" type="text" placeholder="Search title, template, or AQ (e.g. Pokedex, 129, Carlin)..." />
<button class="btn" id="densityBtn" type="button">View: Comfortable Grid</button>
</div>
</section>
<main class="gallery-grid" id="galleryGrid"></main>
<footer>
<div>hyperstitionstud.io/gallery &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.0.24)</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<!-- Lightbox Modal -->
<div class="lightbox" id="lightboxModal">
<div class="lb-top">
<div>
<strong id="lbTitle" style="font-size:0.95rem;"></strong>
<div id="lbMeta" style="font-size:0.74rem;color:var(--text-muted);margin-top:2px;"></div>
</div>
<div style="display:flex;gap:0.45rem;">
<button class="btn" id="lbPrevBtn" type="button">&larr; Prev</button>
<button class="btn" id="lbNextBtn" type="button">Next &rarr;</button>
<a class="btn primary" id="lbRawLink" href="#" target="_blank">Open Raw PNG</a>
<button class="btn" id="lbCloseBtn" type="button">Close (Esc)</button>
</div>
</div>
<div class="lb-img-wrap">
<img id="lbImage" src="" alt="" />
</div>
</div>
<script src="gallery-data.js"></script>
<script>
(function() {
const isFile = window.location.protocol === "file:";
if (isFile) {
document.getElementById("navGraph").setAttribute("href", "../../../encyclopedia-knowledge-graph/index.html");
document.getElementById("navCalc").setAttribute("href", "../../../haiperdohp-jemaytreeah/index.html");
}
const DATA = (window.HyperstitionStudio && window.HyperstitionStudio.GalleryData) || { items: [] };
const grid = document.getElementById("galleryGrid");
let activeCat = "all";
let query = "";
let filtered = [];
let currentLbIdx = 0;
function resolveImg(it) {
return (isFile && it.img_src_file) ? it.img_src_file : it.img_src;
}
function resolvePdf(it) {
return (isFile && it.pdf_src_file) ? it.pdf_src_file : it.pdf_src;
}
function renderGrid() {
grid.innerHTML = "";
filtered = DATA.items.filter(it => {
if (activeCat !== "all" && it.category !== activeCat) return false;
if (query) {
const q = query.toLowerCase();
return it.title.toLowerCase().includes(q) || it.filename.toLowerCase().includes(q) || it.category_label.toLowerCase().includes(q);
}
return true;
});
filtered.forEach((it, idx) => {
const card = document.createElement("article");
card.className = "card";
const imgUrl = resolveImg(it);
const pdfUrl = resolvePdf(it);
const thumb = document.createElement("div");
thumb.className = "thumb-wrap";
const img = document.createElement("img");
img.loading = "lazy";
img.decoding = "async";
img.src = imgUrl;
img.alt = it.title;
thumb.appendChild(img);
thumb.addEventListener("click", () => openLightbox(idx));
const body = document.createElement("div");
body.className = "card-body";
const tag = document.createElement("div");
tag.className = "cat-tag";
tag.textContent = it.category_label;
const title = document.createElement("div");
title.className = "card-title";
title.textContent = it.title;
const meta = document.createElement("div");
meta.className = "card-meta";
meta.textContent = `${it.width} × ${it.height} px • ${(it.bytes / 1024).toFixed(1)} KB • sha256:${it.sha256_12}`;
const acts = document.createElement("div");
acts.className = "card-actions";
const btnInsp = document.createElement("button");
btnInsp.className = "btn";
btnInsp.type = "button";
btnInsp.textContent = "Inspect Fullscreen";
btnInsp.addEventListener("click", () => openLightbox(idx));
acts.appendChild(btnInsp);
const aRaw = document.createElement("a");
aRaw.className = "btn";
aRaw.href = imgUrl;
aRaw.target = "_blank";
aRaw.textContent = "Raw PNG";
acts.appendChild(aRaw);
if (pdfUrl) {
const aPdf = document.createElement("a");
aPdf.className = "btn primary";
aPdf.href = pdfUrl;
aPdf.target = "_blank";
aPdf.textContent = "Companion PDF";
acts.appendChild(aPdf);
}
body.appendChild(tag);
body.appendChild(title);
body.appendChild(meta);
body.appendChild(acts);
card.appendChild(thumb);
card.appendChild(body);
grid.appendChild(card);
});
}
const lbModal = document.getElementById("lightboxModal");
function openLightbox(idx) {
if (!filtered.length) return;
currentLbIdx = (idx + filtered.length) % filtered.length;
const it = filtered[currentLbIdx];
const imgUrl = resolveImg(it);
document.getElementById("lbTitle").textContent = it.title;
document.getElementById("lbMeta").textContent = `${it.category_label} • ${it.width}×${it.height} px • ${(it.bytes / 1024).toFixed(1)} KB • sha256:${it.sha256_12}`;
document.getElementById("lbImage").src = imgUrl;
document.getElementById("lbRawLink").href = imgUrl;
lbModal.classList.add("open");
}
function closeLightbox() {
lbModal.classList.remove("open");
}
document.getElementById("lbPrevBtn").addEventListener("click", () => openLightbox(currentLbIdx - 1));
document.getElementById("lbNextBtn").addEventListener("click", () => openLightbox(currentLbIdx + 1));
document.getElementById("lbCloseBtn").addEventListener("click", closeLightbox);
window.addEventListener("keydown", e => {
if (!lbModal.classList.contains("open")) return;
if (e.key === "Escape") closeLightbox();
if (e.key === "ArrowLeft") openLightbox(currentLbIdx - 1);
if (e.key === "ArrowRight") openLightbox(currentLbIdx + 1);
});
document.querySelectorAll("#categoryPills button").forEach(btn => {
btn.addEventListener("click", () => {
document.querySelectorAll("#categoryPills button").forEach(b => b.classList.remove("active"));
btn.classList.add("active");
activeCat = btn.getAttribute("data-cat");
renderGrid();
});
});
document.getElementById("searchInput").addEventListener("input", e => {
query = e.target.value.trim();
renderGrid();
});
const densBtn = document.getElementById("densityBtn");
densBtn.addEventListener("click", () => {
grid.classList.toggle("compact");
densBtn.textContent = grid.classList.contains("compact") ? "View: Compact Contact Sheet" : "View: Comfortable Grid";
});
renderGrid();
})();
</script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

@@ -0,0 +1,144 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document (opensource)
1 0 obj
<<
/F1 2 0 R /F2 3 0 R /F3 4 0 R /F4 7 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding /Name /F3 /Subtype /Type1 /Type /Font
>>
endobj
5 0 obj
<<
/BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter [ /ASCII85Decode /FlateDecode ] /Height 652 /Length 242179 /SMask 6 0 R
/Subtype /Image /Type /XObject /Width 1024
>>
stream
Gb",+#CIIZemEV_mT/5qY'/@WRL4]\#QtDZ8)QIlgi7EAm0F$_4cWI2?6J;1TqqbR]dKU@![.k-]fGMh,cb(2/]mR4,O<uuChkWE;Ijip^P>[^\$L#0]Qs+@h3g3U&@\l$SdD7=O5M[MK',Ds!f/oi#+cfqN/L&86KtWC>UXGi6q2V^HWh,!AgI6ULp\/\D2&04UQq;lpdgW76fc`>;M.eK`L#mYh=Q)K:L$1.<L?U8&mA8/'?YF$]EXL6K^r"nC;:P6>`fqi<_;C3KU>pg0q_DrQ=XK]c=>X5Z0[VZ-drb6KW'tV`JX"t*0D+>eoRZ_;5Te;l#Cu+N0dtS##oD3(L9k[D"7GO9Z7H?;SuPg=\)PQ&dXS$mT#AXHthP2bD"q*Tr_73?n$ZNNBC2q!h2Uk/M9n1MAgBu_LSfs'\.0"&QVo;;%6lC`g##0XAkVlC_c(d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.dkX0,`%?GeJ+J7VK%WO6W;%c%YF^.6YVGknIK)jHmjGaMQ$%ESsu36IIbV8@j[07r:A6/7fA#Kk:3l>JBLPWCMWPW!MZ<_U)K$BGeN0sVPq/?e8j^2d#%3-'GS3hTO@KgiP.PF<$OK&L+h&LBJ"gC`C2k\*:W'Il0B]jfJ7NnD\_G?&*TS09@p="=?Q,s72*H2T]"!2;td539(R"m=LRXS-a23nUr1kVerccWDC7Akp>qEl*ii(([:kRAj-@foDIa%IXPRb<SHaWE5?L`3'K,GL]C(%46>:-s!;CZB`n56<bN^bC:0OuCg/j31Y?EdMbCrkr/]e7q`M0?dVb[&6=oOjK?Mc`5QfR[to^2[,73u)<7iKVVdS];.\`hPq)D"+Bb?]$:C@/aps-#PRFD:e6+Km3qJj`HjD^VCLine truncated
endobj
6 0 obj
<<
/BitsPerComponent 8 /ColorSpace /DeviceGray /Decode [ 0 1 ] /Filter [ /ASCII85Decode /FlateDecode ] /Height 652 /Length 199
/Subtype /Image /Type /XObject /Width 1024
>>
stream
Gb"0;!=]#/!5bE.WG`:P'EA+5zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!!!#g@e'tA3r~>endstream
endobj
7 0 obj
<<
/BaseFont /Courier /Encoding /WinAnsiEncoding /Name /F4 /Subtype /Type1 /Type /Font
>>
endobj
8 0 obj
<<
/Contents 14 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /XObject <<
/FormXob.4056103510f1a7c6ceb83b93c98e2ceb 5 0 R
>>
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
9 0 obj
<<
/Contents 15 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
10 0 obj
<<
/Contents 16 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
11 0 obj
<<
/PageMode /UseNone /Pages 13 0 R /Type /Catalog
>>
endobj
12 0 obj
<<
/Author (Hermes Agent \(Technocapital Singularity Zoology + AQ Tier List Visualizer + Meme Template Studio\)) /CreationDate (D:20261129112152+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20261129112152+00'00') /Producer (ReportLab PDF Library - \(opensource\))
/Subject (Pokedex Meme Analysis of 2026-11-28 News Wire & M7_candidate_2026_11_28 Ingglish Gematria Data Object) /Title (meme_1_custom_pokedex_technocapital_zoology_m7_129_125 -- Meme Analysis Document) /Trapped /False
>>
endobj
13 0 obj
<<
/Count 3 /Kids [ 8 0 R 9 0 R 10 0 R ] /Type /Pages
>>
endobj
14 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 3119
>>
stream
Gb!#]HZ.WZ(B;.Ai^bTeV5r6nr4ogDOY1L6L+Q-J^io1K,,'iVJSAq]G<COTm>&GhCht("%=LeA.KXFIk<+7W2'HAd+"=qA"Q8qU\n;/%%?ijrY3Ef6"K.G"J%\sfo^tOYp=@Paa0Pl7JEchlf>h7M$#J#l3R\qgRX1TVm?eY%9;%KQKMBQF>i\L&dnJQ'LcnKJ$g4JpBuUmIVdG+5`G@D+r$elQr-2fhh19"MV"l'jGrf0J<-#Bu:ZWY-.Oi5]j9(%!`iGWm!*=9^J@pQWB:/Uo7K7m1<<Ball+5g-`,oh&"0S",W^Zbl&rQlU<"*>WK.Xe+':>BBWdA=[EV),WXf$Y=hlEa-;TiC'g8T3S&`FpBWHt:,>E)t9X4;GECuG@\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[okg*<Af0nNVa^AUJ5d"q#S<kb_=*'GUWd_"9CoOIDYYKL5U\8^`;Aiga1itS5k+:1s4V:!fttWVhReNgpB%,,T"+;L4/],WDAC>T2'Z$L[lA@i`'V$\1A-K>m0h57+r77(o-kO*f2KpNS)-f?UHm%oE8ms`tt;QO[-4.mNdiC19%%f2@/d`2F;L2UQ'3#7m)eD4TV13d2h<l@V*qN"B*I&m$WSA\Y.d'WUc8%ib4>r&7NB(T4MA]-9OUUWT/n7q5iTGY%p&8XZ'7VTiQ$D<q"A0lQj0u+(\::j?^`[#FiA-QFC.&9HC]"?juRH3^H\W&84aET;Ujs6I\L]b$CedT&`<3i5anmGiWKpLGEXLWS3QmGY7O]U/aFrBN6-T*j@SBAY\\fRZmU;FIYjEBd-'j%#^k+;f/7R1[K"O!^m_I[KJ(,42F:!!^GgoU&6$H6\f,NVJ-TlY)^GmBl;_?A\(@N],l.Ib0``IQK9Sgm:YWU->AR8orLJ?S.j'>&.ZAJ+4&Y=7f~>endstream
endobj
xref
0 17
0000000000 65535 f
0000000061 00000 n
0000000122 00000 n
0000000229 00000 n
0000000341 00000 n
0000000456 00000 n
0000242842 00000 n
0000243249 00000 n
0000243354 00000 n
0000243612 00000 n
0000243807 00000 n
0000244003 00000 n
0000244073 00000 n
0000244593 00000 n
0000244666 00000 n
0000247877 00000 n
0000251279 00000 n
trailer
<<
/ID
[<a51b59dd02e0b3ec96ac7a2dc19b4647><a51b59dd02e0b3ec96ac7a2dc19b4647>]
% ReportLab generated PDF document -- digest (opensource)
/Info 12 0 R
/Root 11 0 R
/Size 17
>>
startxref
256010
%%EOF
Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

@@ -0,0 +1,144 @@
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document (opensource)
1 0 obj
<<
/F1 2 0 R /F2 3 0 R /F3 4 0 R /F4 7 0 R
>>
endobj
2 0 obj
<<
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
>>
endobj
3 0 obj
<<
/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font
>>
endobj
4 0 obj
<<
/BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding /Name /F3 /Subtype /Type1 /Type /Font
>>
endobj
5 0 obj
<<
/BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter [ /ASCII85Decode /FlateDecode ] /Height 768 /Length 1435517 /SMask 6 0 R
/Subtype /Image /Type /XObject /Width 1024
>>
stream
GatSBLQgcL\Yi`F[C:%X/^6hM23KLn%^M@28X:r8g"/f01n#CFkK)"dk0V=47kfH=5_:*Yk1jM1Sh/!/GQ49'"jo]H7^dO,>LZTM!tYmcm`'O$#OfL<T7?Rh%se$IB?i^8o[D-X3W%%bdq=`6HKs.^dmm3*3cb)hj(HXW3I@4Vq597%kNij85(D]b0:`!oO'h_%]5QQ=pt=0D%Cna">S4#*9%Aes+]-=,.QL9L'<Fbo7Z#27?879>#-$6-P;l6jW7@CDGk+-R(&$'@`5_k62ii4IR'.4sQ6QW6&RUMBiGZ_aNJ+d+oQTdi2\YOh6Q:7eki,,d)quXt>F>Ue(1kUaFp8NB^QD7Z*eqK(EgaU'EJqrr"U`bmEoHUnq=d.NpdL%M=/e;1Q0r1h)kerA4<jXg_UQ+la3U:u]lnN:Ql'$K+'lJUg$$tEj&9I#\Z(jN&cVFtb4q'+Eb&`r<'3)gQ]#)QFX2[J.=AU-qSRXH0:gg(>EqE3bC?LXrsVjWIkI)eaO";TLq>XTT2'5*34=I9[o:CC1sq6%gTaj2N\k7.=s1WU"*oroE4Ib7-Y@RuD>"\%o96C#ekR$!1r[t5J5YK-.(s4s_VrLDnT$Bba&3?H77oh^:T))V10uVClSX'r8aNg)]5;SlS_`NACnm3On'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(SJHjardD\6&P8`!!tEc8-(tBFMsd^3\pdA*jB&a!O+fi,!a:D7NFJ`s6?[\ZCkQme(V3c_[uE#;?8`EF(a,2i6)4ODpI[oH<^SG?h-MX62PM,q">C%NIh#F6\F4rr#^T!ViQB(F$S>b1<9EOs!(Af'$Z1D'&X[us-ns5^!8!/d0#p=0.eXik2i?_99YQe\^I5&]-.7>NS[ZlIUuLeniniT\1oagD.j^/s5MQ8BO&8Line truncated
endobj
6 0 obj
<<
/BitsPerComponent 8 /ColorSpace /DeviceGray /Decode [ 0 1 ] /Filter [ /ASCII85Decode /FlateDecode ] /Height 768 /Length 228
/Subtype /Image /Type /XObject /Width 1024
>>
stream
Gb"0;0`_7S!5bE.WFlEbTE"rlzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!!!!_"(oHW9`~>endstream
endobj
7 0 obj
<<
/BaseFont /Courier /Encoding /WinAnsiEncoding /Name /F4 /Subtype /Type1 /Type /Font
>>
endobj
8 0 obj
<<
/Contents 14 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /XObject <<
/FormXob.c265b0824f59da5eb7be913f6bdf8724 5 0 R
>>
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
9 0 obj
<<
/Contents 15 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
10 0 obj
<<
/Contents 16 0 R /MediaBox [ 0 0 612 792 ] /Parent 13 0 R /Resources <<
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
>> /Rotate 0 /Trans <<
>>
/Type /Page
>>
endobj
11 0 obj
<<
/PageMode /UseNone /Pages 13 0 R /Type /Catalog
>>
endobj
12 0 obj
<<
/Author (Hermes Agent \(Technocapital Singularity Zoology & Meme Template Studio\)) /CreationDate (D:20261129095223+00'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20261129095223+00'00') /Producer (ReportLab PDF Library - \(opensource\))
/Subject (\(unspecified\)) /Title (meme_1_custom_technocapital_zoology_gta6_huawei_260_22 -- Meme Analysis Document) /Trapped /False
>>
endobj
13 0 obj
<<
/Count 3 /Kids [ 8 0 R 9 0 R 10 0 R ] /Type /Pages
>>
endobj
14 0 obj
<<
/Filter [ /ASCII85Decode /FlateDecode ] /Length 1594
>>
stream
Gb!#[=``R^&:WeDo[=R3)iQ'"&#i`rOG(^V+l6_+VMZ!UJ7j9a[Rn@8qJFoQdg6>GLOfNMD5mEuYLW"U"bL*Ms*GnSbD#'^"j4V$"4\(pg`'q=[@akg'2-aE7mpe/7uBcQK34d[RRqT?'V1nI68F[=kgG!YiW<^@(:YO;6P51V*I.04Mo.h-]P/(,I-,'()#P2j5s/9Y-5e`HdlDmjrdYks^mHkrNM4`"GB5r1psEUnnANWgn?#e#\#:C=L^/jf:HsF-"5M38lNSJ;UP`W]qAN=o:B]%(g%X_($GVSq9r]@0-rl(S*to>tCQtR^<+e2EnX0BPP-,@aA!5)g3_L*0,R)VEl!0(N?9/DUYr<1^P\oC:o>%T[_LjG-<%fYm9L?BX\15SQLfRqW&(UT1=3G'o=u(Z?)p`mB,B,U`^Hj6,B;q7mI1P&X@Nm)Ymr_*ed@dk_/@Z,J+g/Nm:FTQ=jAD]j4Mq8<4;cFu>M?SEIp[Kgo&hui_o;@G#M_1r_HdLEq"mrf9\cZq\mq]p@X+0pW6i;\7JXe3FK-epNmNt1PuP.V6S<D=WbUU(VR'k-e=%1n')iOT'os7/OB>0qlh6/#@V?7*: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e2BJB.jl8d)!<[<4?1(/BuSJC&srKC[X'E;6LP)FgiU!`q+IScVG//F''^[fm'Vl&E@11n@Di9$NeB%"i5EY4n%n;iq-Ne^ZTlma`sB5GPm#KB=ZPBh"D?:.an&hHZ!'W/Fpffl'$<s7!,qfERj]WWuE=QB#ml"-3tEiGM]a79mSFcnYa$",+FJrKTG6%c4#4j(t8gJ8UJ4?6>%Ej2"C(]LR%%H?iSK48?T\X7[[Ms(SQ%gFBW(L6:/tDIbQ9r0k<mJVe1mrEK&Dp/o==IG=cLsjb.klWP%QQ,M:4?fYJks6k@;1IapM.mahq*T[<l8iDJf3+@m)A8u=Je'e67Y5b\">ht6p&1m?,Ti(3agX1p:&hqh2Q.hho6LlNUK@pDXsebFsHH9!(_8Vi;_$iqofH>Q)pMCsesV-hZs^=4f=<k`3l*"mQdH/U=F2.""o9A2m$Mhp['XiGklZrREFG:K4C!4kgseh/YEdsZOJ+]87k%'`>bf04>.[>GARnN+eJS8&p&6q-neaG_NI<8qb[`5lOs4<V%BL;u!Z&(PTbN^KbUBDp-&@bQ/pLC!uk'mrF,V-E+*M=ECXLh,20PM8%C8&\J?l6g=H2.;tm0uqb`C&77.KWY`?RH"k-0#j.([7Jr\9Y82R)k6Y(r]J1O"ZP1rm'OT.UW?aHnT7CTloB`>SFW3T>-a`tF)'/D>cuI\6DMS8XG!'>/2f8Z,oT_W*9+!'"n-A0J7>$UHn<lnBW]6Z&?d=</@mB!:t<#k'jV%_4e[F8'g3`7?;G7Edh?I_\&L">l;kElSjkG+8&N@-1nKIg*YRHdBX0MX-!),82/[t\#r+V>AWk*<Z;tjH^ibL.>,82QSl=0]+ReeSaN_YDL<s4gf:2H-dEam&#30qoXRggNKGe/98usL]`I#.H1\ss#+F9*g.X:Y/H<Kmj~>endstream
endobj
xref
0 17
0000000000 65535 f
0000000061 00000 n
0000000122 00000 n
0000000229 00000 n
0000000341 00000 n
0000000456 00000 n
0001436181 00000 n
0001436617 00000 n
0001436722 00000 n
0001436980 00000 n
0001437175 00000 n
0001437371 00000 n
0001437441 00000 n
0001437849 00000 n
0001437922 00000 n
0001439608 00000 n
0001443100 00000 n
trailer
<<
/ID
[<36557fe7d6653b87deaf682c5190f843><36557fe7d6653b87deaf682c5190f843>]
% ReportLab generated PDF document -- digest (opensource)
/Info 12 0 R
/Root 11 0 R
/Size 17
>>
startxref
1446809
%%EOF
Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

+74 -7
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>hyperstitionstud.io — Technocapital Singularity Zoology &amp; Alphanumeric Qabbala Workbench</title>
<link rel="prefetch" href="/graph/graph-data.js" as="script" />
<link rel="prefetch" href="/graph/graph-data.js?v=2.0.24" as="script" />
<style>
:root {
--bg-canvas: #020617;
@@ -52,7 +52,66 @@
}
h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }
.meta-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.meta-badges {
margin-left: auto;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.5rem;
flex-wrap: wrap;
}
.nav-donate-sep {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 0.2rem;
display: inline-block;
flex-shrink: 0;
}
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover {
filter: brightness(1.06);
transform: translateY(-1px);
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(245, 158, 11, 0.32);
color: #020617;
}
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
flex-shrink: 0;
}
@media (max-width: 1120px) {
.meta-badges {
margin-left: auto;
justify-content: flex-end;
}
}
.badge {
background: var(--bg-card);
border: 1px solid var(--border);
@@ -131,13 +190,16 @@
<span class="dot"></span>
<h1>HYPERSTITIONSTUD.IO // TECHNOCAPITAL SINGULARITY ZOOLOGY WORKBENCH</h1>
</div>
<p class="subtitle">100% Offline-Portable &amp; HTTP/3 Edge-Ready Research Corpus &bull; Namespace Authority: urn:io:hyperstitionstud (v1.2.0)</p>
<p class="subtitle">100% Offline-Portable &amp; HTTP/3 Edge-Ready Research Corpus &bull; Namespace Authority: urn:io:hyperstitionstud (v2.0.24)</p>
</div>
<div class="meta-badges">
<a class="btn primary" data-route="learn-track" href="/learn/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;">Start Learning Track (/learn/)</a>
<a class="btn" data-route="quant-app" href="/quant/index.html" style="padding:0.35rem 0.75rem;font-size:0.74rem;border-color:var(--gold);color:var(--gold);">Quant Time-Series (/quant/)</a>
<span class="badge">388 Graph Nodes</span>
<span class="badge">1,282 Typed Edges</span>
<span class="badge">22 PDF Volumes (122p)</span>
<span class="badge">282 Glossary Entries</span>
<span class="badge">24 Quant Tickers</span>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" data-route="donate-page" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</div>
</header>
@@ -246,14 +308,15 @@
</div>
<div class="actions">
<a class="btn primary" data-route="dep-html" href="/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html">Interactive Flow Diagram</a>
<a class="btn" data-route="dep-pdf" href="/graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf">Flow Diagram (PDF)</a>
<a class="btn" data-route="quant-app" href="/quant/index.html">Quant Time-Series (/quant/)</a>
<a class="btn" data-route="vps-guide" href="/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf">VPS &amp; Git Guide (PDF)</a>
</div>
</section>
</main>
<footer>
hyperstitionstud.io &bull; Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v1.2.0) &bull; Zero External Network Dependencies
<div>hyperstitionstud.io &bull; Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.0.24) &bull; Zero External Network Dependencies</div>
<div class="hs-lemur-credit" style="margin-top:0.35rem;color:var(--text-muted);font-size:0.75rem;">Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
@@ -262,6 +325,10 @@
(function() {
if (window.location.protocol !== "file:") return;
const map = {
"learn-track": "./learn/index.html",
"quant-app": "./quant/index.html",
"donate-page": "./donate/index.html",
"meme-gallery": "./gallery/index.html",
"graph-index": "../../encyclopedia-knowledge-graph/index.html",
"graph-manual": "../../encyclopedia-knowledge-graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
"graph-json": "../../encyclopedia-knowledge-graph/encyclopedia-graph.json",
+460
View File
@@ -0,0 +1,460 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Self-Paced Learning Track — hyperstitionstud.io (Base-36 AQ, Ingglish &amp; Technocapital Zoology)</title>
<style>
:root {
--bg-canvas: #020617;
--bg-panel: #0f172a;
--bg-card: #1e293b;
--border: #334155;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--cyan: #22d3ee;
--red: #ff4d4d;
--gold: #f5c630;
--emerald: #34d399;
--violet: #a78bfa;
--rose: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg-canvas);
color: var(--text-main);
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
min-height: 100vh;
padding: 1.5rem;
line-height: 1.5;
}
.container { max-width: 1220px; margin: 0 auto; }
header {
background: var(--bg-panel);
border: 1px solid var(--border);
border-left: 4px solid var(--emerald);
border-radius: 10px;
padding: 1.2rem 1.5rem;
margin-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
h1 { font-size: 1.25rem; font-weight: 700; }
.subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.top-nav { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.nav-donate-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.2rem; display: inline-block; flex-shrink: 0; }
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover { filter: brightness(1.06); transform: translateY(-1px); color: #020617; }
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
flex-shrink: 0;
}
.btn {
text-decoration: none;
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.45rem 0.8rem;
font-size: 0.74rem;
font-weight: 600;
cursor: pointer;
font-family: inherit;
transition: all 0.15s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
.btn.done { background: var(--emerald); color: #020617; border-color: var(--emerald); }
.state-bar {
position: sticky;
top: 0.75rem;
z-index: 30;
background: rgba(15, 23, 42, 0.96);
border: 1px solid var(--cyan);
border-radius: 10px;
padding: 0.9rem 1.2rem;
margin-bottom: 1.4rem;
display: flex;
flex-direction: column;
gap: 0.65rem;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.state-bar.drag-over { border-color: var(--emerald); background: rgba(6, 78, 59, 0.45); }
.state-row {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
}
.progress-wrap {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
min-width: 260px;
}
.progress-track {
flex: 1;
height: 10px;
background: #090d16;
border: 1px solid var(--border);
border-radius: 99px;
overflow: hidden;
}
.progress-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, var(--cyan), var(--emerald));
transition: width 0.25s ease;
}
.cid-pill {
font-size: 0.68rem;
background: #090d16;
border: 1px solid var(--border);
padding: 0.25rem 0.55rem;
border-radius: 4px;
color: var(--gold);
}
.modules-grid {
display: flex;
flex-direction: column;
gap: 1.2rem;
}
.module-card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.3rem;
display: flex;
flex-direction: column;
gap: 0.9rem;
}
.module-card.completed { border-left: 4px solid var(--emerald); }
.mod-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;
gap: 0.75rem;
}
.mod-tag { font-size: 0.72rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; }
.mod-title { font-size: 1.05rem; font-weight: 700; margin-top: 0.2rem; }
.mod-desc { font-size: 0.8rem; color: var(--text-muted); }
.sandbox-box {
background: #090d16;
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.sandbox-controls {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
align-items: center;
}
.inp, .sel {
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.4rem 0.65rem;
font-family: inherit;
font-size: 0.76rem;
}
.sandbox-out {
font-size: 0.76rem;
color: var(--emerald);
white-space: pre-wrap;
background: #050811;
border-left: 3px solid var(--cyan);
padding: 0.65rem 0.8rem;
border-radius: 4px;
}
.note-area {
width: 100%;
min-height: 54px;
background: #090d16;
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.5rem 0.7rem;
font-family: inherit;
font-size: 0.74rem;
resize: vertical;
}
.coord-pill {
background: var(--bg-card);
border: 1px solid var(--cyan);
color: var(--cyan);
padding: 0.25rem 0.6rem;
border-radius: 4px;
font-size: 0.72rem;
cursor: pointer;
}
footer {
margin-top: 2rem;
text-align: center;
font-size: 0.74rem;
color: var(--text-muted);
border-top: 1px solid var(--border);
padding-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.hs-lemur-credit { color: var(--text-muted); font-size: 0.75rem; }
.hs-heart { color: var(--rose); display: inline-block; padding: 0 2px; }
</style>
</head>
<body>
<div class="container">
<header>
<div>
<h1>SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO</h1>
<p class="subtitle">From Base-36 Alphanumeric Qabbala &amp; CMUdict Ingglish to Technocapital Singularity Zoology &bull; 100% Anonymous Local State Save &amp; Load</p>
</div>
<nav class="top-nav">
<a class="btn" data-learn-route="nav-home" href="../index.html">&larr; Portal Home</a>
<a class="btn" data-learn-route="nav-quant" href="/quant/index.html">Time-Series (/quant/)</a>
<a class="btn" data-learn-route="nav-graph" href="/graph/index.html">Knowledge Graph</a>
<a class="btn" data-learn-route="nav-calc" href="/calc/index.html">AQ Calculator</a>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" data-learn-route="nav-donate" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<!-- Sticky Anonymous Local State Upload & Download Bar -->
<section class="state-bar" id="statePortabilityBar">
<div class="state-row">
<div class="progress-wrap">
<strong id="progressText" style="font-size:0.78rem;">0 / 6 Modules Completed (0%)</strong>
<div class="progress-track"><div class="progress-fill" id="progressFill"></div></div>
</div>
<span class="cid-pill" id="stateCidBadge">dag-json CIDv1: computing...</span>
</div>
<div class="state-row">
<div style="display:flex;gap:0.45rem;flex-wrap:wrap;align-items:center;">
<button class="btn primary" id="btnDownloadState" type="button">Download State (.json)</button>
<button class="btn" id="btnUploadState" type="button">Upload State (.json)</button>
<input type="file" id="inputUploadState" accept=".json,application/json" style="display:none;" />
<select id="importModeSelect" class="sel" title="Choose how uploaded JSON state is applied">
<option value="replace">Upload Mode: Replace State</option>
<option value="merge">Upload Mode: Merge State</option>
</select>
<button class="btn" id="btnLoadDemoState" type="button" style="border-color:var(--gold);color:var(--gold);" title="Loads clearly labeled synthetic example state for UI demonstration">&#x26A0; Load Simulated Demo State (Synthetic Example)</button>
<button class="btn" id="btnResetState" type="button">Reset Local State</button>
</div>
<span id="stateStatusMsg" style="font-size:0.72rem;color:var(--emerald);">Drop a saved .json state file anywhere on this bar to restore progress.</span>
</div>
</section>
<main class="modules-grid">
<!-- MODULE M01 -->
<article class="module-card" id="card-M01">
<div class="mod-header">
<div>
<div class="mod-tag">Module M01 // Foundation Cipher</div>
<h2 class="mod-title">1. What Is Base-36 Alphanumeric Qabbala (AQ)?</h2>
</div>
<button class="btn" id="chk-M01" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">Base-36 Alphanumeric Qabbala (AQ) extends hexadecimal into the full 36-character English alphanumeric set: digits <code>0–9 = 0..9</code> and letters <code>A–Z = 10..35</code> (case-insensitive; spaces and punctuation = <code>0</code>). Try comparing two words below to discover an exact Base-36 collision:</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<label style="font-size:0.74rem;">Term A: <input class="inp" id="m01InputA" type="text" value="ASML" /></label>
<label style="font-size:0.74rem;">Term B: <input class="inp" id="m01InputB" type="text" value="asset" /></label>
<a class="btn" data-learn-route="m01-link" href="/calc/index.html" target="_blank">Open Full 69-Cipher Calculator &rarr;</a>
</div>
<div class="sandbox-out" id="m01Output"></div>
</div>
<textarea class="note-area" id="note-M01" placeholder="Personal field notes for Module M01 (auto-saved locally &amp; exported in your .json state file)..."></textarea>
</article>
<!-- MODULE M02 -->
<article class="module-card" id="card-M02">
<div class="mod-header">
<div>
<div class="mod-tag">Module M02 // Bidirectional Orthography</div>
<h2 class="mod-title">2. Sound Over Spelling: Gen 0 Written English vs. Gen 1 Phonemic Ingglish</h2>
</div>
<button class="btn" id="chk-M02" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">Standard English (<code>Gen 0</code>) carries silent etymological "ghost mass" (like <code>k, g, h</code> in <code>knight = 123</code>). Phonemic Ingglish (<code>Gen 1</code>, powered by the 126,000-word CMU Pronouncing Dictionary) spells words strictly by sound (<code>nait = 80</code>), exposing <strong>G4 Isometric Chokepoints (Δ = 0)</strong> where written and spoken values are identical:</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<label style="font-size:0.74rem;">Inspect Specimen:
<select class="sel" id="m02WordSelect">
<option value="capital">capital &rarr; kapatal (Isometric Δ=0)</option>
<option value="charter">charter &rarr; charter (Isometric Δ=0)</option>
<option value="ASML">ASML &rarr; asml (Isometric Δ=0)</option>
<option value="TSMC">TSMC &rarr; tsmc (Isometric Δ=0)</option>
<option value="GPU">GPU &rarr; gpu (Isometric Δ=0)</option>
<option value="knight">knight &rarr; nait (Ghost mass stripped)</option>
<option value="Anthropic">Anthropic &rarr; anthropik (44th Prime Lock)</option>
<option value="Blackwell">Blackwell &rarr; blakwel (S3 129 Lock)</option>
</select>
</label>
<a class="btn" data-learn-route="m02-link" href="/ci/ONBOARDING-INGGLISH-AQ.pdf" target="_blank">Read Onboarding &amp; CI Guide (PDF) &rarr;</a>
</div>
<div class="sandbox-out" id="m02Output"></div>
</div>
<textarea class="note-area" id="note-M02" placeholder="Personal field notes for Module M02..."></textarea>
</article>
<!-- MODULE M03 -->
<article class="module-card" id="card-M03">
<div class="mod-header">
<div>
<div class="mod-tag">Module M03 // Vector G1 Phase Transitions</div>
<h2 class="mod-title">3. What Is a "Singularity"? Vector G1 Variance Collapse (Var &rarr; 0.0)</h2>
</div>
<button class="btn" id="chk-M03" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">In Technocapital Singularity Zoology, a singularity is not sci-fi AI consciousness—it is a mathematical phase-transition point where concepts scattered across wide numerical intervals in written English (<code>Gen 0 variance &gt; 200</code>) collapse onto a <strong>single zero-variance integer (<code>variance = 0.0</code>)</strong> when translated into Phonemic Ingglish (<code>Gen 1</code>):</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<select class="sel" id="m03TriadSelect">
<option value="292">Triad 292: schizoanalysis / abstract machine / synthetic data</option>
<option value="256">Triad 256: acceleration / high-frequency / sovereign wealth</option>
<option value="125">Triad 125: capital / capture / folds</option>
</select>
<select class="sel" id="m03ModeSelect">
<option value="gen1">View in Gen 1 Phonemic Ingglish (Variance = 0.0)</option>
<option value="gen0">View in Gen 0 Written English (Dispersed)</option>
</select>
<a class="btn" data-learn-route="m03-link" href="/graph/index.html" target="_blank">Explore Bipartite G1 Funnel in Graph &rarr;</a>
</div>
<div class="sandbox-out" id="m03Output"></div>
</div>
<textarea class="note-area" id="note-M03" placeholder="Personal field notes for Module M03..."></textarea>
</article>
<!-- MODULE M04 -->
<article class="module-card" id="card-M04">
<div class="mod-header">
<div>
<div class="mod-tag">Module M04 // S1–S6 Guilds &amp; State-Gated Memetics</div>
<h2 class="mod-title">4. Double Articulation (S1–S5 &times; S6) &amp; Two-Gate Memetic Activation (M1–M7+)</h2>
</div>
<button class="btn" id="chk-M04" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">Every technocapital event is classified across the <strong>Machinic Phylum (<code>S1</code> AI, <code>S2</code> Flash-Crash Liquidity, <code>S3</code> Silicon War Machine, <code>S4</code> Carrier Wave, <code>S5</code> Cutaneous BwO)</strong> and <strong>Capital Capture (<code>S6</code>)</strong>. Memetic subclasses (<code>M1–M7+</code>) unlock <em>only</em> when the event's observable thermodynamic state matches:</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<select class="sel" id="m04HeadlineSelect">
<option value="h129">Case 1: Infrastructure Outage / Offline Swarm (Unlocks M7+ 129 &amp; S6 125)</option>
<option value="h137">Case 2: Halted Factories / Supply Stagnation (Unlocks M1×S3 137 Lock)</option>
<option value="h193">Case 3: High-Frequency Liquidity Surge (Unlocks M2×S2 193 &amp; 256 Lock)</option>
</select>
<a class="btn" data-learn-route="m04-link" href="/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf" target="_blank">Open 22-Volume PDF Encyclopedia &rarr;</a>
</div>
<div class="sandbox-out" id="m04Output"></div>
</div>
<textarea class="note-area" id="note-M04" placeholder="Personal field notes for Module M04..."></textarea>
</article>
<!-- MODULE M05 -->
<article class="module-card" id="card-M05">
<div class="mod-header">
<div>
<div class="mod-tag">Module M05 // Ecological Trophic Index (ETI 0–100)</div>
<h2 class="mod-title">5. Reading the ETI Tier List &amp; Concentric Radar (S+ Center to D Periphery)</h2>
</div>
<button class="btn" id="chk-M05" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">Assemblage builds are scored from <code>0–100 ETI</code> across 6 base stats (<code>ARM, VEL, COL, CAP, PRM, RES</code>). In Mode 2 of the Knowledge Graph, polar radius <code>R(ETI)</code> places <code>Tier S+</code> Apex Predators at the bullseye center and <code>Tier D</code> episodic stubs on the outer <strong>D Periphery</strong> ring:</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<select class="sel" id="m05BuildSelect">
<option value="S1">#1 S1×S6×M4 Autoregressive AI Syndicate (93 ETI, Tier S+ Center)</option>
<option value="S2">#2 S2×S6×M2 Flash-Crash Templex Swarm (90 ETI, Tier S+ Center)</option>
<option value="S6">#3 S6×S1-S3 Apparatus of Capture Guild (87 ETI, Tier S)</option>
<option value="S3">#4 S3×S6×M3 Silicon-Photonic War Machine (83 ETI, Tier S)</option>
<option value="M1">#5 M1×S6 Vampiric Entropic Stagnation Lock (73 ETI, Tier A)</option>
<option value="M7+">#8B M7_candidate_2026_11_28 Cyber-Swarm Stub (53 ETI, Tier C)</option>
<option value="Q0">#9 Q-Stub Episodic Quantitative Anchor (49 ETI, Tier D Periphery)</option>
</select>
<a class="btn" data-learn-route="m05-link" href="/zoology/tier-list-technocapital-assemblage-builds.pdf" target="_blank">Open Full ETI Tier-List Scorecard (PDF) &rarr;</a>
</div>
<div class="sandbox-out" id="m05Output"></div>
</div>
<textarea class="note-area" id="note-M05" placeholder="Personal field notes for Module M05..."></textarea>
</article>
<!-- MODULE M06 -->
<article class="module-card" id="card-M06">
<div class="mod-header">
<div>
<div class="mod-tag">Module M06 // Applied Decision Registers</div>
<h2 class="mod-title">6. Practical Use Cases: Choosing Your Stakeholder Register &amp; Bookmarks</h2>
</div>
<button class="btn" id="chk-M06" type="button">Mark Module Complete</button>
</div>
<p class="mod-desc">The exact same mathematical invariants translate into four specialized operational registers. Choose your preferred register below and bookmark key coordinates to your portable study ledger:</p>
<div class="sandbox-box">
<div class="sandbox-controls">
<label style="font-size:0.74rem;">Active Register:
<select class="sel" id="m06RegisterSelect">
<option value="fund_manager">Out-of-Sample Fund Manager ('Uncaptured Gem' Screen)</option>
<option value="corporate_board">Corporate Management Board (Supply-Chain Moat)</option>
<option value="fantasy_football">Fantasy Football Roster Engine (QB / RB / OL / Flex)</option>
<option value="academic">Academic / Landian-Deleuzean Schizoanalysis</option>
</select>
</label>
<a class="btn" data-learn-route="m06-link" href="/zoology/proposal-fund-manager-novel-investment-discovery.pdf" target="_blank">Open Stakeholder Proposal (PDF) &rarr;</a>
</div>
<div class="sandbox-out" id="m06Output"></div>
<div class="sandbox-controls" style="margin-top:0.25rem;">
<span style="font-size:0.74rem;color:var(--gold);">Bookmarked AQ Coordinates:</span>
<div id="bookmarkedCoordsList" style="display:flex;gap:0.4rem;flex-wrap:wrap;"></div>
<input class="inp" id="inputBookmarkCoord" type="number" min="0" max="9999" placeholder="Add AQ # (e.g. 137)" style="width:145px;" />
<button class="btn" id="btnAddBookmark" type="button">+ Bookmark</button>
</div>
</div>
<textarea class="note-area" id="note-M06" placeholder="Personal field notes for Module M06..."></textarea>
</article>
</main>
<footer>
<div>hyperstitionstud.io/learn &bull; Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.0.24)</div>
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">&#x2665;</span> by Lemurs.</div>
</footer>
</div>
<script src="learn-app.js?v=2.0.24"></script>
</body>
</html>
+750
View File
@@ -0,0 +1,750 @@
/**
* /workspace/hyperstitionstudio-core/site/learn/learn-app.js
* Self-Paced 6-Module Interactive Onboarding Track & Anonymous Local State Engine (v2.0.0)
* Supports:
* - 6 interactive micro-sandboxes (M01..M06)
* - Automatic localStorage checkpointing ("hs_learn_state_v2")
* - State Download (.json) with canonical IPLD dag-json (0x0129) SHA-256 & CIDv1 ("baguqeera...")
* - State Upload (.json) via file picker & drag-and-drop with Replace/Merge modes & zero-XSS rendering
*/
(function() {
"use strict";
const STORAGE_KEY = "hs_learn_state_v2";
const SCHEMA_ID = "urn:io:hyperstitionstud:schema:v1:learn-progress-state";
const VALID_MODULES = ["M01", "M02", "M03", "M04", "M05", "M06"];
const SAMPLE_VOCAB = {
"asml": "asml",
"asset": "aset",
"tsmc": "tsmc",
"loss": "laws",
"gpu": "gpu",
"capital": "kapatal",
"capture": "kapcher",
"folds": "fohldz",
"charter": "charter",
"portal": "portal",
"knight": "nait",
"night": "nait",
"schizoanalysis": "shizohnalizis",
"abstract machine": "abstrakt masheen",
"synthetic data": "sinthetik dayta",
"dario amodei": "daireeoh amodai",
"anthropic": "anthropik",
"flash crash": "flash krash",
"blackwell": "blakwel",
"russia": "ruhsha",
"offline": "awflain",
"nvidia": "envideea",
"halts": "hawlts",
"inertia": "inersha",
"acceleration": "akselerayshan",
"high-frequency": "hai-freekwansee",
"sovereign wealth": "sovran welth",
"technocapital": "teknohkapital",
"killer robots": "kiler rohbots"
};
const TRIAD_DATA = {
"292": {
label: "292 Triad (S1 Autoregressive AI × S6 Asset Management)",
items: [
{ eng: "schizoanalysis", eng_aq: 306, ing: "shizohnalizis", ing_aq: 292 },
{ eng: "abstract machine", eng_aq: 272, ing: "abstrakt masheen", ing_aq: 292 },
{ eng: "synthetic data", eng_aq: 266, ing: "sinthetik dayta", ing_aq: 292 }
],
gen0_var: 310.22,
gen1_var: 0.0
},
"256": {
label: "256 Triad (2^8 Byte Lock: S2 High-Frequency × S6 Sovereign Wealth)",
items: [
{ eng: "acceleration", eng_aq: 222, ing: "akselerayshan", ing_aq: 256 },
{ eng: "high-frequency", eng_aq: 256, ing: "hai-freekwansee", ing_aq: 256 },
{ eng: "sovereign wealth", eng_aq: 314, ing: "sovran welth", ing_aq: 256 }
],
gen0_var: 1442.67,
gen1_var: 0.0
},
"125": {
label: "125 Triad (5^3 Cube Lock: S6 Apparatus of Capture × S2 Folds)",
items: [
{ eng: "capital", eng_aq: 125, ing: "kapatal", ing_aq: 125 },
{ eng: "capture", eng_aq: 137, ing: "kapcher", ing_aq: 125 },
{ eng: "folds", eng_aq: 101, ing: "fohldz", ing_aq: 125 }
],
gen0_var: 221.33,
gen1_var: 0.0
}
};
const ETI_BUILDS = {
"S1": { rank: "#1", tier: "S+", eti: 93, title: "S1×S6×M4 Autoregressive AI Syndicate", stats: [85, 92, 96, 98, 88, 95], bridges: "292 (S1/S6), 193 (S1/S2), 137 (S1/S3/M1), 133 (S1/S6)" },
"S2": { rank: "#2", tier: "S+", eti: 90, title: "S2×S6×M2 Flash-Crash Templex Swarm", stats: [82, 95, 94, 92, 84, 90], bridges: "256 (S2/S6), 193 (S2/S1), 183 (S2/S6/M1), 125 (S2/S6)" },
"S6": { rank: "#3", tier: "S", eti: 87, title: "S6×S1-S3 Apparatus of Capture Guild", stats: [94, 80, 86, 96, 82, 88], bridges: "292 (S6/S1), 256 (S6/S2), 153 (S6/S2/M1), 125 (S6/S2), 81/91 (S6/S3)" },
"S3": { rank: "#4", tier: "S", eti: 83, title: "S3×S6×M3 Silicon-Photonic War Machine", stats: [96, 78, 84, 82, 86, 80], bridges: "211 (S3/S2/Q0), 137 (S3/S1/M1), 129 (S3/M7+), 91 (TSMC), 81 (ASML)" },
"M1": { rank: "#5", tier: "A", eti: 73, title: "M1×S6 Vampiric Entropic Stagnation Lock", stats: [78, 72, 70, 76, 74, 72], bridges: "183, 153, 137 (hawlts/envideea), 136 (slohth/charter), 133" },
"M7+": { rank: "#8B", tier: "C", eti: 53, title: "M7_candidate_2026_11_28 Cyber-Swarm Stub", stats: [78, 88, 82, 68, 74, 64], bridges: "129 (awflain/ruhsha/blakwel), 125 (dounz/kapatal/kapcher)" },
"Q0": { rank: "#9", tier: "D", eti: 49, title: "Q-Stub Episodic Quantitative Anchor (D Periphery)", stats: [52, 64, 48, 38, 54, 46], bridges: "211 (siks bilyan == wor masheen == koper waier)" }
};
const REGISTER_VIEWS = {
"academic": {
label: "Landian-Deleuzean & Base-36 AQ Register",
summary: "Focuses on pre-personal phase transitions, Vector G1 variance collapse (Gen 0 -> Gen 1), S[1-5]×S6 Double Articulation, and G4 Isometric Chokepoints (Δ = 0).",
statNames: ["ARM (Isometric Armor)", "VEL (Teleoplexic Velocity)", "COL (G1 Variance Collapse)", "CAP (Trophic Capture)", "PRM (Twin-Prime IQ)", "RES (State-Gate Resilience)"],
sampleLock: "shizohnalizis (292) == abstrakt masheen (292) == sinthetik dayta (292) [Gen 0 Var: 310.22 -> 0.0]"
},
"fund_manager": {
label: "Out-of-Sample Fund Manager ('Uncaptured Gem' Screen)",
summary: "Strips philosophy jargon; screens Tier B/C themes with high Convergence Power (COL) & Signal Velocity (VEL) but low Institutional Coupling (CAP < 68) before mega-cap crowding.",
statNames: ["Chokepoint Moat", "Signal Velocity", "Convergence Power", "Institutional Coupling", "Idiosyncratic Asymmetry", "Regime Robustness"],
sampleLock: "synthetic data == asset management = 292 | high-frequency == acceleration == sovereign wealth = 256"
},
"corporate_board": {
label: "Corporate Management Board (Supply-Chain Moat & Allocation)",
summary: "Maps Isometric Chokepoints (ASML = 81 == asset, TSMC = 91 == loss, GPU = 71) and cross-unit reallocation triggers when quantitative anchors reprice.",
statNames: ["Supply-Chain Moat", "Execution Agility", "Cross-Unit Synergy", "Balance-Sheet Integration", "Proprietary IP", "Stress-Test Resilience"],
sampleLock: "capital == capture = 125 (5^3) | halts == inertia == Nvidia = 137 | ASML == asset = 81"
},
"fantasy_football": {
label: "Fantasy Football Roster & Multi-Position Flex Engine",
summary: "Treats #1 S1 as QB1, #2 S2 as RB1/WR1, #3 S6 as OL/GM, #4 S3 as Edge Rusher, and the 13 shared coordinates (125, 137, 193, 256, 292) as Multi-Position Flex pivots.",
statNames: ["Pass Protection", "Breakaway Speed", "Stack Power", "Front-Office Cap Reach", "Playbook IQ", "All-Weather Durability"],
sampleLock: "Flex Pivot 193: Dario Amodei [QB1] == anthropik == flash krash [RB1] (44th PRIME)"
}
};
function computeAQ(text) {
let total = 0;
const s = String(text || "").toLowerCase();
for (let i = 0; i < s.length; i++) {
const c = s.charCodeAt(i);
if (c >= 48 && c <= 57) total += (c - 48);
else if (c >= 97 && c <= 122) total += (c - 87);
}
return total;
}
function charBreakdown(text) {
const out = [];
const s = String(text || "");
for (let i = 0; i < s.length; i++) {
const ch = s[i];
const low = ch.toLowerCase();
const c = low.charCodeAt(0);
if (c >= 48 && c <= 57) out.push(`${ch}=${c - 48}`);
else if (c >= 97 && c <= 122) out.push(`${ch.toUpperCase()}=${c - 87}`);
}
return out.join(" + ") || "0";
}
function isPrime(n) {
if (n < 2) return false;
if (n === 2 || n === 3) return true;
if (n % 2 === 0 || n % 3 === 0) return false;
for (let k = 5; k * k <= n; k += 6) {
if (n % k === 0 || n % (k + 2) === 0) return false;
}
return true;
}
// Pure-JS deterministic SHA-256 (works on file://, http://, and https:// without crypto.subtle restrictions)
function sha256Hex(ascii) {
function rightRotate(value, amount) {
return (value >>> amount) | (value << (32 - amount));
}
const mathPow = Math.pow;
const maxWord = mathPow(2, 32);
let result = "";
const words = [];
const utf8 = unescape(encodeURIComponent(ascii));
const asciiBitLength = utf8.length * 8;
let hash = [];
const k = [];
let primeCounter = 0;
const isComposite = {};
for (let candidate = 2; primeCounter < 64; candidate++) {
if (!isComposite[candidate]) {
for (let i = 0; i < 313; i += candidate) isComposite[i] = candidate;
hash[primeCounter] = (mathPow(candidate, 0.5) * maxWord) | 0;
k[primeCounter++] = (mathPow(candidate, 1 / 3) * maxWord) | 0;
}
}
let str = utf8 + "\x80";
while ((str.length % 64) - 56) str += "\x00";
for (let i = 0; i < str.length; i++) {
const j = str.charCodeAt(i);
words[i >> 2] |= j << ((3 - (i % 4)) * 8);
}
words[words.length] = (asciiBitLength / maxWord) | 0;
words[words.length] = asciiBitLength;
for (let j = 0; j < words.length; ) {
const w = words.slice(j, (j += 16));
const oldHash = hash.slice(0);
for (let i = 0; i < 64; i++) {
const w15 = w[i - 15], w2 = w[i - 2];
const a = hash[0], e = hash[4];
const temp1 =
hash[7] +
(rightRotate(e, 6) ^ rightRotate(e, 11) ^ rightRotate(e, 25)) +
((e & hash[5]) ^ (~e & hash[6])) +
k[i] +
(w[i] =
i < 16
? w[i]
: (w[i - 16] +
(rightRotate(w15, 7) ^ rightRotate(w15, 18) ^ (w15 >>> 3)) +
w[i - 7] +
(rightRotate(w2, 17) ^ rightRotate(w2, 19) ^ (w2 >>> 10))) |
0);
const temp2 =
(rightRotate(a, 2) ^ rightRotate(a, 13) ^ rightRotate(a, 22)) +
((a & hash[1]) ^ (a & hash[2]) ^ (hash[1] & hash[2]));
hash = [(temp1 + temp2) | 0].concat(hash);
hash[4] = (hash[4] + temp1) | 0;
hash.pop();
}
for (let i = 0; i < 8; i++) hash[i] = (hash[i] + oldHash[i]) | 0;
}
for (let i = 0; i < 8; i++) {
for (let j = 3; j + 1; j--) {
const b = (hash[i] >> (j * 8)) & 255;
result += (b < 16 ? 0 : "") + b.toString(16);
}
}
return result;
}
function hexToBase32Lower(hexStr) {
const alphabet = "abcdefghijklmnopqrstuvwxyz234567";
const bytes = [];
for (let i = 0; i < hexStr.length; i += 2) {
bytes.push(parseInt(hexStr.slice(i, i + 2), 16));
}
let bits = 0, value = 0, output = "";
for (let i = 0; i < bytes.length; i++) {
value = (value << 8) | bytes[i];
bits += 8;
while (bits >= 5) {
output += alphabet[(value >>> (bits - 5)) & 31];
bits -= 5;
}
}
if (bits > 0) {
output += alphabet[(value << (5 - bits)) & 31];
}
return output;
}
function canonicalDagJsonString(obj) {
if (obj === null || typeof obj !== "object") {
return JSON.stringify(obj);
}
if (Array.isArray(obj)) {
return "[" + obj.map(canonicalDagJsonString).join(",") + "]";
}
const keys = Object.keys(obj).sort();
return "{" + keys.map(k => JSON.stringify(k) + ":" + canonicalDagJsonString(obj[k])).join(",") + "}";
}
function computeIntegrity(stateWithoutIntegrity) {
const canon = canonicalDagJsonString(stateWithoutIntegrity);
const sha = sha256Hex(canon);
// CIDv1 prefix for dag-json (0x01 0xa9 0x02 0x12 0x20) = "01a9021220"
const cid = "b" + hexToBase32Lower("01a9021220" + sha);
return {
canonical_codec: "dag-json (0x0129)",
payload_sha256: sha,
payload_cidv1: cid
};
}
function defaultState() {
const base = {
$schema: "../schemas/v1/learn-progress-state.schema.json",
$id: SCHEMA_ID,
version: "2.0.24",
updated_at_utc: new Date().toISOString(),
preferred_register: "fund_manager",
completed_modules: [],
bookmarked_coordinates: [125, 193, 292],
user_notes: {
M01: "",
M02: "",
M03: "",
M04: "",
M05: "",
M06: ""
}
};
base.integrity = computeIntegrity(base);
return base;
}
let memoryState = defaultState();
function loadState() {
try {
const raw = window.localStorage.getItem(STORAGE_KEY);
if (raw) {
const parsed = JSON.parse(raw);
if (parsed && parsed.$id === SCHEMA_ID) {
memoryState = sanitizeState(parsed);
return memoryState;
}
}
} catch (_e) {}
return memoryState;
}
function sanitizeState(raw) {
const clean = defaultState();
if (raw && typeof raw === "object") {
if (typeof raw.preferred_register === "string" && REGISTER_VIEWS[raw.preferred_register]) {
clean.preferred_register = raw.preferred_register;
}
if (Array.isArray(raw.completed_modules)) {
clean.completed_modules = Array.from(
new Set(raw.completed_modules.filter(m => VALID_MODULES.includes(String(m))))
).sort();
}
if (Array.isArray(raw.bookmarked_coordinates)) {
clean.bookmarked_coordinates = Array.from(
new Set(
raw.bookmarked_coordinates
.map(n => parseInt(n, 10))
.filter(n => !isNaN(n) && n >= 0 && n <= 9999)
)
).sort((a, b) => b - a);
}
if (raw.user_notes && typeof raw.user_notes === "object") {
VALID_MODULES.forEach(m => {
if (typeof raw.user_notes[m] === "string") {
clean.user_notes[m] = raw.user_notes[m].slice(0, 2000);
}
});
}
}
clean.updated_at_utc = new Date().toISOString();
const copyNoInt = Object.assign({}, clean);
delete copyNoInt.integrity;
clean.integrity = computeIntegrity(copyNoInt);
return clean;
}
function saveState(newState, statusMsg) {
const copyNoInt = Object.assign({}, newState);
delete copyNoInt.integrity;
copyNoInt.updated_at_utc = new Date().toISOString();
newState.updated_at_utc = copyNoInt.updated_at_utc;
newState.integrity = computeIntegrity(copyNoInt);
memoryState = newState;
try {
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(memoryState));
} catch (_e) {}
renderAll(statusMsg);
}
function markModuleComplete(modId, msg) {
if (!VALID_MODULES.includes(modId)) return;
if (!memoryState.completed_modules.includes(modId)) {
memoryState.completed_modules.push(modId);
memoryState.completed_modules.sort();
}
saveState(memoryState, msg || `Completed Module ${modId}`);
}
function toggleModuleComplete(modId) {
if (memoryState.completed_modules.includes(modId)) {
memoryState.completed_modules = memoryState.completed_modules.filter(m => m !== modId);
saveState(memoryState, `Unmarked ${modId}`);
} else {
markModuleComplete(modId);
}
}
function exportLearnState() {
const jsonStr = JSON.stringify(memoryState, null, 2) + "\n";
const blob = new Blob([jsonStr], { type: "application/json" });
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
const dateStr = new Date().toISOString().slice(0, 10);
a.href = url;
a.download = `hyperstition-learn-state-${dateStr}.json`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
setTimeout(() => URL.revokeObjectURL(url), 500);
setStatus(`Downloaded state JSON (${memoryState.integrity.payload_cidv1.slice(0, 18)}...)`);
}
function importLearnStateText(rawText, mode) {
if (!rawText || rawText.length > 1048576) {
setStatus("Import rejected: file empty or exceeds 1 MB limit.", true);
return;
}
let parsed;
try {
parsed = JSON.parse(rawText);
} catch (e) {
setStatus("Import rejected: invalid JSON syntax.", true);
return;
}
if (!parsed || parsed.$id !== SCHEMA_ID) {
setStatus(`Import rejected: $id must equal ${SCHEMA_ID}`, true);
return;
}
const incoming = sanitizeState(parsed);
if (mode === "merge") {
const mergedMods = Array.from(new Set([...memoryState.completed_modules, ...incoming.completed_modules])).sort();
const mergedCoords = Array.from(new Set([...memoryState.bookmarked_coordinates, ...incoming.bookmarked_coordinates])).sort((a, b) => b - a);
const mergedNotes = Object.assign({}, memoryState.user_notes);
VALID_MODULES.forEach(m => {
if (incoming.user_notes[m]) mergedNotes[m] = incoming.user_notes[m];
});
memoryState.completed_modules = mergedMods;
memoryState.bookmarked_coordinates = mergedCoords;
memoryState.user_notes = mergedNotes;
memoryState.preferred_register = incoming.preferred_register || memoryState.preferred_register;
saveState(memoryState, `Merged uploaded state (${mergedMods.length}/6 modules complete)`);
} else {
saveState(incoming, `Loaded uploaded state (${incoming.completed_modules.length}/6 modules complete)`);
}
}
function loadDemoCompletedState() {
const demo = defaultState();
demo.completed_modules = ["M01", "M02", "M03", "M04", "M05", "M06"];
demo.bookmarked_coordinates = [777, 666, 333, 292, 260, 256, 211, 193, 137, 129, 125, 91, 81];
demo.preferred_register = "fund_manager";
demo.user_notes = {
M01: "Verified ASML (81 = 3^4) == asset (81) and TSMC (91) == loss (91).",
M02: "Isometric fixed points (Δ=0): kapatal=125, charter=136, asml=81, tsmc=91, gpu=71.",
M03: "292 Triad collapses Gen 0 variance 310.22 -> 0.0 in Gen 1 Ingglish.",
M04: "Two-Gate state rule verified: 129 (awflain == ruhsha == blakwel) and 137 (hawlts == inersha == envideea).",
M05: "S+ Center (88-100 ETI) radiates outward to Tier D Periphery (44-51 ETI).",
M06: "Fund Manager Uncaptured Gem screen: high COL/VEL + low CAP (<68) in Tiers B & C."
};
saveState(demo, "⚠️ [SIMULATED / SYNTHETIC DEMO DATA] Loaded synthetic example state (not real user progress).");
}
function resetLearnState() {
try {
window.localStorage.removeItem(STORAGE_KEY);
} catch (_e) {}
saveState(defaultState(), "Reset local state to 0/6 modules.");
}
function setStatus(msg, isError) {
const el = document.getElementById("stateStatusMsg");
if (!el) return;
el.textContent = msg;
el.style.color = isError ? "#fb7185" : "#34d399";
}
function renderAll(statusMsg) {
const done = memoryState.completed_modules;
const pct = Math.round((done.length / VALID_MODULES.length) * 100);
const bar = document.getElementById("progressFill");
if (bar) bar.style.width = `${pct}%`;
const pText = document.getElementById("progressText");
if (pText) pText.textContent = `${done.length} / 6 Modules Completed (${pct}%)`;
const cidEl = document.getElementById("stateCidBadge");
if (cidEl && memoryState.integrity) {
cidEl.textContent = `dag-json CIDv1: ${memoryState.integrity.payload_cidv1.slice(0, 20)}...`;
cidEl.title = `Full CIDv1: ${memoryState.integrity.payload_cidv1}\nSHA-256: ${memoryState.integrity.payload_sha256}`;
}
VALID_MODULES.forEach(m => {
const card = document.getElementById(`card-${m}`);
const btn = document.getElementById(`chk-${m}`);
const noteEl = document.getElementById(`note-${m}`);
const isDone = done.includes(m);
if (card) card.classList.toggle("completed", isDone);
if (btn) {
btn.textContent = isDone ? "✓ Completed (Click to Toggle)" : "Mark Module Complete";
btn.classList.toggle("done", isDone);
}
if (noteEl && document.activeElement !== noteEl) {
noteEl.value = memoryState.user_notes[m] || "";
}
});
const regSel = document.getElementById("m06RegisterSelect");
if (regSel) regSel.value = memoryState.preferred_register;
updateM06RegisterView(memoryState.preferred_register);
const bmWrap = document.getElementById("bookmarkedCoordsList");
if (bmWrap) {
bmWrap.innerHTML = "";
memoryState.bookmarked_coordinates.forEach(c => {
const pill = document.createElement("span");
pill.className = "coord-pill";
pill.textContent = `AQ ${c} ×`;
pill.title = "Click to remove bookmark";
pill.addEventListener("click", () => {
memoryState.bookmarked_coordinates = memoryState.bookmarked_coordinates.filter(x => x !== c);
saveState(memoryState, `Removed AQ ${c} from bookmarks`);
});
bmWrap.appendChild(pill);
});
}
if (statusMsg) setStatus(statusMsg, false);
}
function updateM01Sandbox() {
const aEl = document.getElementById("m01InputA");
const bEl = document.getElementById("m01InputB");
const outEl = document.getElementById("m01Output");
if (!aEl || !bEl || !outEl) return;
const a = aEl.value.trim() || "ASML";
const b = bEl.value.trim() || "asset";
const aqA = computeAQ(a);
const aqB = computeAQ(b);
const match = aqA === aqB && aqA > 0;
outEl.textContent =
`Term A: "${a}" -> ${charBreakdown(a)} = ${aqA}${isPrime(aqA) ? " [PRIME]" : ""}\n` +
`Term B: "${b}" -> ${charBreakdown(b)} = ${aqB}${isPrime(aqB) ? " [PRIME]" : ""}\n` +
(match ? `✓ EXACT BASE-36 COLLISION: "${a}" (${aqA}) == "${b}" (${aqB})!` : `Difference: Δ = ${aqB - aqA}`);
if (match && !memoryState.completed_modules.includes("M01")) {
markModuleComplete("M01", "M01 Checkpoint Solved: Verified Base-36 AQ collision!");
}
}
function updateM02Sandbox() {
const sel = document.getElementById("m02WordSelect");
const outEl = document.getElementById("m02Output");
if (!sel || !outEl) return;
const eng = sel.value;
const ing = SAMPLE_VOCAB[eng.toLowerCase()] || eng.toLowerCase();
const eAq = computeAQ(eng);
const iAq = computeAQ(ing);
const d = iAq - eAq;
const iso = d === 0;
outEl.textContent =
`Gen 0 Written English: "${eng}" = ${eAq}${isPrime(eAq) ? " [PRIME]" : ""}\n` +
`Gen 1 CMUdict Ingglish: "${ing}" = ${iAq}${isPrime(iAq) ? " [PRIME]" : ""}\n` +
`Orthographic Drift (Δ = Gen 1 - Gen 0): ${d >= 0 ? "+" + d : d}\n` +
(iso ? `★ G4 ISOMETRIC FIXED POINT (Δ = 0): Sound and spelling lock at ${iAq}!` : `Phonemic compression strips/shifts ${Math.abs(d)} AQ units.`);
if (iso && !memoryState.completed_modules.includes("M02")) {
markModuleComplete("M02", `M02 Checkpoint Solved: Inspected Δ=0 Isometric Chokepoint (${eng}=${iAq})!`);
}
}
function updateM03Sandbox() {
const sel = document.getElementById("m03TriadSelect");
const modeSel = document.getElementById("m03ModeSelect");
const outEl = document.getElementById("m03Output");
if (!sel || !modeSel || !outEl) return;
const t = TRIAD_DATA[sel.value];
const mode = modeSel.value;
if (!t) return;
const lines = [t.label];
t.items.forEach(it => {
if (mode === "gen0") {
lines.push(` • Gen 0 Written: "${it.eng}" = ${it.eng_aq}`);
} else {
lines.push(` • Gen 1 Ingglish: "${it.ing}" ("${it.eng}") = ${it.ing_aq}`);
}
});
if (mode === "gen0") {
lines.push(`Gen 0 Dispersion Variance: ${t.gen0_var} (Scattered in written English)`);
} else {
lines.push(`★ Gen 1 Variance: 0.0 (Collapsed from ${t.gen0_var} -> 0.0 exact singularity!)`);
if (!memoryState.completed_modules.includes("M03")) {
markModuleComplete("M03", `M03 Checkpoint Solved: Collapsed Triad ${sel.value} to Gen 1 Variance = 0.0!`);
}
}
outEl.textContent = lines.join("\n");
}
function updateM04Sandbox() {
const sel = document.getElementById("m04HeadlineSelect");
const outEl = document.getElementById("m04Output");
if (!sel || !outEl) return;
const v = sel.value;
if (v === "h129") {
outEl.textContent =
`Headline State: OUTAGE / OFFLINE INFRASTRUCTURE (Unlocks M1 / M7+ Cyber-Swarm)\n` +
`Double Articulation: S3 Hardware (blakwel=129) × S6 Capture (dounz == kapatal == kapcher = 125)\n` +
`Zero-Variance Lock: awflain (129) == ruhsha (129) == blakwel (129) [Gen 0: 141 / 145 / 182 -> Var 339.56 -> 0.0]`;
if (!memoryState.completed_modules.includes("M04")) {
markModuleComplete("M04", "M04 Checkpoint Solved: Verified State-Gated M7+ / S3×S6 lock!");
}
} else if (v === "h137") {
outEl.textContent =
`Headline State: HALTED PRODUCTION / STAGNATION (Unlocks M1 Vampiric / Entropic Lock)\n` +
`Guild Coupling: M1 Stagnation (hawlts == inersha = 137) × S1/S3 Compute (envideea == daireeoh = 137 [33rd PRIME])\n` +
`Zero-Variance Lock: hawlts (137) == inersha (137) == envideea (137) == daireeoh (137)`;
if (!memoryState.completed_modules.includes("M04")) {
markModuleComplete("M04", "M04 Checkpoint Solved: Verified State-Gated M1×S3 137 lock!");
}
} else {
outEl.textContent =
`Headline State: FLASH-CRASH / HIGH-FREQUENCY LIQUIDITY SURGE (Unlocks M2 Templex Swarm)\n` +
`Double-Script Twin: flash crash (185) == Anthropic (185) in Gen 0 -> flash krash (193) == anthropik (193) in Gen 1\n` +
`S2 × S6 Capture Bridge: akselerayshan (256) == hai-freekwansee (256) == sovran welth (256 = 2^8)`;
if (!memoryState.completed_modules.includes("M04")) {
markModuleComplete("M04", "M04 Checkpoint Solved: Verified State-Gated M2×S2 193/256 lock!");
}
}
}
function updateM05Sandbox() {
const sel = document.getElementById("m05BuildSelect");
const outEl = document.getElementById("m05Output");
if (!sel || !outEl) return;
const b = ETI_BUILDS[sel.value];
if (!b) return;
const rPx = Math.round(475 * (1 - (b.eti - 40) / 65));
outEl.textContent =
`${b.rank} ${b.title} — Tier ${b.tier} (${b.eti} ETI)\n` +
`Concentric Radar Ring Position: R(ETI) ≈ ${rPx} px (${b.tier === "S+" ? "Inner Bullseye Core" : (b.tier === "D" ? "Outer D Periphery Ring" : "Mid-Trophic Ring")})\n` +
`6 Base Stats [ARM, VEL, COL, CAP, PRM, RES]: [${b.stats.join(", ")}]\n` +
`Multi-Build Flex Bridges: ${b.bridges}`;
if (!memoryState.completed_modules.includes("M05")) {
markModuleComplete("M05", `M05 Checkpoint Solved: Inspected ${b.rank} (${b.eti} ETI) on the Concentric Radar!`);
}
}
function updateM06RegisterView(regKey) {
const rv = REGISTER_VIEWS[regKey] || REGISTER_VIEWS.fund_manager;
const outEl = document.getElementById("m06Output");
if (!outEl) return;
outEl.textContent =
`Active Register: ${rv.label}\n` +
`Methodology: ${rv.summary}\n` +
`Translated 6-Stat Labels: ${rv.statNames.join(" | ")}\n` +
`Exemplar Register Lock: ${rv.sampleLock}`;
}
function adaptFileProtocolLinks() {
if (window.location.protocol !== "file:") return;
const map = {
"nav-home": "../index.html",
"nav-quant": "../quant/index.html",
"nav-donate": "../donate/index.html",
"nav-gallery": "../gallery/index.html",
"nav-graph": "../../../encyclopedia-knowledge-graph/index.html",
"nav-calc": "../../../haiperdohp-jemaytreeah/index.html",
"m01-link": "../../../haiperdohp-jemaytreeah/index.html",
"m02-link": "../../../hyperdope-ci-build/ONBOARDING-INGGLISH-AQ.pdf",
"m03-link": "../../../encyclopedia-knowledge-graph/index.html",
"m04-link": "../../../technocapital-singularity-zoology/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf",
"m05-link": "../../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.pdf",
"m06-link": "../../../technocapital-singularity-zoology/proposal-fund-manager-novel-investment-discovery.pdf"
};
document.querySelectorAll("[data-learn-route]").forEach(a => {
const k = a.getAttribute("data-learn-route");
if (map[k]) a.setAttribute("href", map[k]);
});
}
window.addEventListener("DOMContentLoaded", () => {
adaptFileProtocolLinks();
loadState();
VALID_MODULES.forEach(m => {
const btn = document.getElementById(`chk-${m}`);
if (btn) btn.addEventListener("click", () => toggleModuleComplete(m));
const noteEl = document.getElementById(`note-${m}`);
if (noteEl) {
noteEl.addEventListener("input", e => {
memoryState.user_notes[m] = e.target.value.slice(0, 2000);
saveState(memoryState);
});
}
});
const dlBtn = document.getElementById("btnDownloadState");
if (dlBtn) dlBtn.addEventListener("click", exportLearnState);
const fileIn = document.getElementById("inputUploadState");
const upBtn = document.getElementById("btnUploadState");
if (upBtn && fileIn) {
upBtn.addEventListener("click", () => fileIn.click());
fileIn.addEventListener("change", e => {
const f = e.target.files && e.target.files[0];
if (!f) return;
const modeEl = document.getElementById("importModeSelect");
const mode = modeEl ? modeEl.value : "replace";
f.text().then(txt => importLearnStateText(txt, mode));
fileIn.value = "";
});
}
const dropZone = document.getElementById("statePortabilityBar");
if (dropZone) {
dropZone.addEventListener("dragover", e => {
e.preventDefault();
dropZone.classList.add("drag-over");
});
dropZone.addEventListener("dragleave", () => dropZone.classList.remove("drag-over"));
dropZone.addEventListener("drop", e => {
e.preventDefault();
dropZone.classList.remove("drag-over");
const f = e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files[0];
if (!f) return;
const modeEl = document.getElementById("importModeSelect");
const mode = modeEl ? modeEl.value : "replace";
f.text().then(txt => importLearnStateText(txt, mode));
});
}
const demoBtn = document.getElementById("btnLoadDemoState");
if (demoBtn) demoBtn.addEventListener("click", loadDemoCompletedState);
const rstBtn = document.getElementById("btnResetState");
if (rstBtn) rstBtn.addEventListener("click", resetLearnState);
const addBmBtn = document.getElementById("btnAddBookmark");
if (addBmBtn) {
addBmBtn.addEventListener("click", () => {
const inp = document.getElementById("inputBookmarkCoord");
if (!inp) return;
const val = parseInt(inp.value, 10);
if (!isNaN(val) && val >= 0 && val <= 9999) {
if (!memoryState.bookmarked_coordinates.includes(val)) {
memoryState.bookmarked_coordinates.push(val);
memoryState.bookmarked_coordinates.sort((a, b) => b - a);
}
inp.value = "";
saveState(memoryState, `Bookmarked AQ Coordinate ${val}`);
}
});
}
// Bind interactive sandboxes
["m01InputA", "m01InputB"].forEach(id => {
const el = document.getElementById(id);
if (el) el.addEventListener("input", updateM01Sandbox);
});
const m02Sel = document.getElementById("m02WordSelect");
if (m02Sel) m02Sel.addEventListener("change", updateM02Sandbox);
["m03TriadSelect", "m03ModeSelect"].forEach(id => {
const el = document.getElementById(id);
if (el) el.addEventListener("change", updateM03Sandbox);
});
const m04Sel = document.getElementById("m04HeadlineSelect");
if (m04Sel) m04Sel.addEventListener("change", updateM04Sandbox);
const m05Sel = document.getElementById("m05BuildSelect");
if (m05Sel) m05Sel.addEventListener("change", updateM05Sandbox);
const m06Sel = document.getElementById("m06RegisterSelect");
if (m06Sel) {
m06Sel.addEventListener("change", e => {
memoryState.preferred_register = e.target.value;
markModuleComplete("M06", `M06 Checkpoint Solved: Switched register to ${e.target.value}!`);
});
}
updateM01Sandbox();
updateM02Sandbox();
updateM03Sandbox();
updateM04Sandbox();
updateM05Sandbox();
renderAll("Local progress state ready.");
});
})();
@@ -0,0 +1,50 @@
# Operator's Manual: Quantitative Finance & Memetic Gematria Time-Series Workbench (`/quant/`) (`v2.0.20`)
- **Document ID:** `OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH` (`v2.0.20`)
- **Web Route:** `https://hyperstitionstud.io/quant/` (`/quant/index.html`)
- **Offline `file://` Path:** `/workspace/hyperstitionstudio-core/site/quant/index.html`
- **Schema Contract:** `urn:io:hyperstitionstud:schema:v1:quant-timeseries` (`/schemas/v1/quant-timeseries.schema.json`)
- **Interactive Guided Tour:** Built-in 5-Episode, 25-Scene HTML5 Canvas Choreographer (`/quant/quant-tutorials.js`, `< 45 KB` Git-tracked, zero `.mp4` bloat, Web Speech TTS + WebAudio Telemetry Chime narration ON by default).
---
## 1. Strict Periodicity Qualification Gate
Only data sources that emit discrete, timestamp-indexed periodic observations ($\Delta t \in \{\text{1d US-Closing-Bell at 21:30 UTC}, \text{24h UTC News-Wire Rollover at 00:00 UTC}\}$) enter `/quant/`:
- **Included (`0` Non-Periodic Records):**
1. `30` daily `21:30 UTC` (`16:30 EST`) US closing-bell bars across the `24` canonical `S1–S6` technocapital instruments (`NVDA`, `MSFT`, `GOOGL`, `META`, `PLTR`, `ARM`, `COIN`, `MSTR`, `GS`, `JPM`, `TSM`, `ASML`, `LMT`, `RTX`, `TSLA`, `TMUS`, `EQIX`, `CEG`, `LLY`, `UNH`, `BLK`, `BRK-B`, `BTC-USD`, `ANTHR-PVT`).
2. `21` dated `00:00 UTC` news-wire dossiers (`25..71-dossier-news-YYYY-MM-DD.md`).
3. Daily objective thermodynamic regime state vectors (`M1_ENTROPIC_STAGNATION`, `M2_FLASH_CRASH_TEMPLEX_SURGE`, `M3_LEVIATHAN_TRILLION_CAP_CONCENTRATION`).
4. Dated `quantitative-economic-anchors.json` step revisions (`$83 -> $89` on `2026-11-26` for `ANTHR-PVT`).
- **Excluded Static Corpora:** Static lexicons (`01-ingglish-aq-lexicon.md`), undated dossiers (`10–24`, `26–45`, `65–69`), the 22-volume PDF Encyclopedia, stakeholder proposals, lectures, and `/calc/db.json`.
---
## 2. Visual Figure & Numerical Readout Guide (Panels 1–4)
| Panel & Figure | Visual Encoding | Mathematical & Gematrial Definition | Passage-Encoded Deep Link |
| :--- | :--- | :--- | :--- |
| **Panel 1 (Top Pane): Solid Cyan Curve** | `#22d3ee` polyline across `30` UTC days | Plots `Spoken AQ (Gen 1)`, `Close Price (USD)`, `Move (BPS)`, or `Digit AQ` for the active ticker. | `/encyclopedia/01-cipher-orthography-and-boundaries/a-to-f-alphanumeric-qabbala-to-full-clause-isometry.pdf#page=1&search=Alphanumeric%20Qabbala` |
| **Panel 1 (Top Pane): Dashed Crimson Line (`entity_ing=N`)** | Horizontal `#ff4d4d` dashed threshold | Marks the ticker's intrinsic phonemic identity coordinate $\text{AQ}_{\text{Ing}}(\text{Entity}_i)$ (e.g. `envideea = 137`, `asml = 81`, `anthropik = 193`). | `/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=envideea` |
| **Panel 1 (Top Pane): Gold Beacon Circles (`r = 5.2px`)** | Glowing `#f5c630` vertex circles | **`Scope 1` Self-Lock or Repdigit Attractor (Real Exchange Bars Only):** Fires when a real exchange bar's integer close equals the entity's own `AQ` (`PLTR $159.36 -> 159 == palanter`, `CEG $276.09 -> 276 == konstalayshan`, `RTX $191.88 -> 192 == raytheeon`) or hits a `37 × k` repdigit (`AVGO $333.40 -> 333`, `NVDA $206.69 -> 'too huhndrad siks' = 333`). Missing/closed dates state `"No data available"`. | `/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=2&search=Room%20Filter` |
| **Panel 1 (Top Pane): Cyan Beacon Circles (`r = 3.8px`)** | `#22d3ee` vertex circles | **`Scope 2` `S1–S6` Ring Migration:** Price, spoken AQ, or bps lands on one of the `30` canonical `S1–S6` signature coordinates (`71, 81, 91, 95, 115, 125, 128, 129, 133, 135, 136, 137, 153, 160, 163, 166, 183, 189, 191, 193, 197, 211, 215, 222, 237, 246, 256, 260, 292`). | `/encyclopedia/06-genealogical-vectors-and-quantitative-repricing/a-to-m-attractors-to-multi-build-flex-singularities.pdf#page=2&search=Flex` |
| **Panel 1 (Middle Pane): Violet vs. Emerald Bars** | Daily `333/666/777` wire equation counts | Violet (`#a78bfa`) = standard wire harvest day; Emerald (`#34d399`) = **`Scope 3` News-Wire Co-Presence ($C_{i,t} = 1$)** where ticker $i$ appeared in that UTC day's breaking wire dossier. | `/archive/71-dossier-news-2026-11-29.md#:~:text=Nvidia` |
| **Panel 1 (Bottom Pane): `Vol20d` Regime Bars** | 20d relative volume ($V_{i,t}/\bar{V}_{20}$) | Gold (`< 0.45x`) = `M1_ENTROPIC_STAGNATION` (`137`); Crimson (`>= 2.5x` or `<= -5%`) = `M2_FLASH_CRASH_TEMPLEX_SURGE` (`193`); Sky-Blue = `M3_LEVIATHAN`. | `/encyclopedia/05-memetic-superclass-and-emergent-m7/m1-vampiric-entropic-and-anti-productive-a-to-m.pdf#page=1&search=M1` |
| **Panel 2: `24 × 30` Spatiotemporal Heatmap** | Interactive grid of `(Ticker, UTC Date)` cells | Gold cell = Scope 1 Self-Lock; Cyan cell = Scope 2 Ring Migration; Emerald outline = Scope 3 Wire Co-Presence; `↗` opens the ticker's TradingView Superchart (`EXCHANGE:SYMBOL`). | `https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA` |
| **Panel 3: Lens Projection, Citations & Wire Tape** | Cross-sectional date inspector + `LENS_REGISTRY` + Citation Drawer | Projects lens-neutral `struct_*` and `ts_*` keys through `fund_manager`, `neutral_math`, `corporate_board`, `tierzoo_ecology`, `fantasy_sabermetrics`, or `pokedex_scanner`, and provides passage-encoded links (`#page=N&search=...`, `#:~:text=...`, `/graph/index.html?select=aq:N`, `/api/v1/dossiers/N?highlight=...`). | `/graph/index.html?select=aq:137` |
| **Panel 4: Lead-Lag Correlation Explorer $r(\tau)$** | 11-bar histogram across $\tau \in [-5, +5]$ days | Empirical Pearson correlation between daily wire velocity $M_t$ and unsigned ticker move $|\Delta\text{bps}_{i,t+\tau}|$; Gold bar marks optimal causal lag $\tau^* = \arg\max_\tau |r(\tau)|$. | `/api/v1/quant/timeseries?symbol=NVDA` |
---
## 3. Keyboard Shortcuts & Programmatic REST API v1 Endpoints
- **Keyboard Shortcuts on `/quant/`:**
- `←` / `→`: Step backward or forward one UTC day (`2026-11-01 .. 2026-11-30`).
- `T`: Launch the selected ticker's live TradingView Superchart (`https://www.tradingview.com/chart/?symbol=...`) in a new browser window (`noopener,noreferrer`).
- **REST API v1 Endpoints:**
- `GET /api/v1/quant/timeseries?symbol=NVDA&lens=fund_manager`
- `GET /api/v1/quant/instruments/NVDA`
- `GET /api/v1/zoology/pokedex/NVDA`
- `GET /api/v1/dossiers/71?highlight=envideea`
- `GET /api/v1/openapi.json`
+381
View File
@@ -0,0 +1,381 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quantitative Finance &amp; Memetic Gematria Time-Series Workbench — hyperstitionstud.io/quant</title>
<style>
:root {
--bg-canvas: #020617;
--bg-panel: #0f172a;
--bg-card: #1e293b;
--bg-deep: #090d16;
--border: #334155;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--cyan: #22d3ee;
--red: #ff4d4d;
--gold: #f5c630;
--emerald: #34d399;
--violet: #a78bfa;
--rose: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg-canvas);
color: var(--text-main);
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
min-height: 100vh;
padding: 1.25rem;
line-height: 1.45;
}
.container { max-width: 1380px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
header {
background: var(--bg-panel);
border: 1px solid var(--border);
border-left: 4px solid var(--gold);
border-radius: 10px;
padding: 1.1rem 1.4rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.9rem;
}
h1 { font-size: 1.18rem; font-weight: 700; color: var(--text-main); }
.subtitle { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.25rem; }
.top-nav { margin-left: auto; display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.nav-donate-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.2rem; display: inline-block; flex-shrink: 0; }
.btn-donate-pill {
height: 34px;
border-radius: 999px;
padding: 0.28rem 0.9rem 0.28rem 0.35rem;
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%);
color: #020617;
border: 1px solid #f5c630;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22);
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.74rem;
font-weight: 700;
letter-spacing: 0.05em;
text-decoration: none;
flex-shrink: 0;
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-donate-pill:hover { filter: brightness(1.06); transform: translateY(-1px); color: #020617; }
.donate-pill-emblem {
width: 20px;
height: 20px;
border-radius: 50%;
background: #0f172a;
color: var(--rose);
border: 1px solid rgba(245, 198, 48, 0.7);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
line-height: 1;
flex-shrink: 0;
}
.btn, select {
text-decoration: none;
background: var(--bg-card);
color: var(--text-main);
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.42rem 0.72rem;
font-size: 0.73rem;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: all 0.15s ease;
}
.btn:hover, select:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
.btn.tv-btn { background: rgba(245, 198, 48, 0.15); color: var(--gold); border-color: var(--gold); }
.btn.tv-btn:hover { background: var(--gold); color: #020617; }
.toolbar {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.85rem 1.1rem;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
}
.control-group { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.control-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pill-row { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pill {
background: var(--bg-deep);
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.25rem 0.55rem;
font-size: 0.69rem;
cursor: pointer;
font-family: inherit;
}
.pill.active { background: var(--cyan); color: #020617; border-color: var(--cyan); font-weight: 700; }
.panel {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1rem 1.15rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
border-bottom: 1px solid var(--border);
padding-bottom: 0.55rem;
}
.panel-title { font-size: 0.86rem; font-weight: 700; color: var(--cyan); }
.panel-meta { font-size: 0.7rem; color: var(--text-muted); }
canvas#tsCanvas {
width: 100%;
height: 410px;
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 8px;
cursor: crosshair;
display: block;
}
.split-grid {
display: grid;
grid-template-columns: 1.25fr 1fr;
gap: 1rem;
}
@media (max-width: 1024px) {
.split-grid { grid-template-columns: 1fr; }
}
.heatmap-wrap {
overflow-x: auto;
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.6rem;
}
table.heatmap {
width: 100%;
border-collapse: collapse;
font-size: 0.65rem;
}
table.heatmap th, table.heatmap td {
padding: 0.2rem 0.18rem;
text-align: center;
border: 1px solid #162032;
}
table.heatmap th.sym-col {
text-align: left;
padding-left: 0.4rem;
padding-right: 0.5rem;
white-space: nowrap;
position: sticky;
left: 0;
background: var(--bg-deep);
z-index: 2;
}
.hm-cell {
width: 18px;
height: 18px;
border-radius: 3px;
cursor: pointer;
display: inline-block;
}
.hm-none { background: #0f172a; }
.hm-nodata {
background: repeating-linear-gradient(45deg, #090d16, #090d16 3px, #1e293b 3px, #1e293b 6px);
opacity: 0.55;
}
.hm-scope1 { background: var(--gold); box-shadow: 0 0 5px rgba(245, 198, 48, 0.6); }
.hm-scope2 { background: var(--cyan); }
.hm-wire { outline: 2px solid var(--emerald); outline-offset: -2px; }
.hm-selected { outline: 2px solid #ffffff; }
.inspector-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
gap: 0.5rem;
}
.stat-box {
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.5rem 0.65rem;
}
.stat-label { font-size: 0.63rem; color: var(--text-muted); }
.stat-val { font-size: 0.84rem; font-weight: 700; color: var(--text-main); margin-top: 0.15rem; }
.eq-tape {
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.65rem;
max-height: 220px;
overflow-y: auto;
font-size: 0.71rem;
display: flex;
flex-direction: column;
gap: 0.45rem;
}
.eq-item {
border-left: 3px solid var(--violet);
padding-left: 0.55rem;
}
.lag-bars {
display: grid;
grid-template-columns: repeat(11, 1fr);
gap: 0.4rem;
align-items: end;
height: 120px;
background: var(--bg-deep);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem;
}
.lag-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; height: 100%; justify-content: flex-end; }
.lag-bar { width: 100%; max-width: 34px; border-radius: 3px 3px 0 0; background: var(--cyan); min-height: 4px; }
.lag-lbl { font-size: 0.63rem; color: var(--text-muted); }
footer {
margin-top: 1rem;
text-align: center;
font-size: 0.72rem;
color: var(--text-muted);
border-top: 1px solid var(--border);
padding-top: 1rem;
}
</style>
<script src="quant-timeseries-data.js?v=2.0.24"></script>
</head>
<body>
<div class="container">
<header>
<div>
<h1>hyperstitionstud.io/quant — Quantitative Finance &amp; Memetic Gematria Time-Series Workbench</h1>
<p class="subtitle">Strictly Periodic Telemetry (21:30 UTC US Closing Bell &times; 00:00 UTC News-Wire Dossiers) &bull; Lens-Neutral Schema (urn:io:hyperstitionstud:quant-timeseries:v2.0.24)</p>
</div>
<nav class="top-nav">
<a class="btn" id="navHome" href="/">Portal Home (/)</a>
<a class="btn" id="navGraph" href="/graph/index.html">Knowledge Graph (/graph/)</a>
<a class="btn" id="navLearn" href="/learn/index.html">Learning Track (/learn/)</a>
<a class="btn" id="navCalc" href="/calc/index.html">AQ Calculator (/calc/)</a>
<a class="btn" id="navManual" href="/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" target="_blank">Operator's Manual (PDF)</a>
<span class="nav-donate-sep" aria-hidden="true"></span>
<a class="btn-donate-pill" id="navDonate" href="/donate/index.html" title="Signal Patronage &amp; Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">&#x2665;</span><span>DONATE</span></a>
</nav>
</header>
<!-- INTERACTIVE 5-EPISODE GUIDED CANVAS TUTORIAL PLAYER (Zero-MP4 Option B) -->
<section class="panel" id="quantTutorialBar" aria-label="Interactive Tutorial Series Player">
<div class="panel-header">
<span class="panel-title">INTERACTIVE GUIDED CANVAS TOUR (5 Episodes &times; 5 Scenes = 25 Live Choreographed Walkthroughs &bull; Zero-MP4)</span>
<span class="panel-meta" id="tutStepBadge">Ep 01 &bull; Scene 1/5</span>
</div>
<div class="pill-row" id="tutEpisodeTabs"></div>
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;">
<button type="button" class="btn primary" id="tutPlayPauseBtn">&#x25B6; Play Guided Tour</button>
<button type="button" class="btn" id="tutPrevBtn">&#x23EE; Prev Scene</button>
<input type="range" id="tutScrubber" min="0" max="4" value="0" style="flex:1;min-width:140px;accent-color:var(--gold);cursor:pointer;" aria-label="Scene timeline scrubber" />
<button type="button" class="btn" id="tutNextBtn">Next Scene &#x23ED;</button>
<button type="button" class="btn primary" id="tutSpeechBtn" title="Toggle Web Speech / WebAudio narration (ON by default)">&#x1F50A; Voice: ON</button>
<button type="button" class="btn" id="tutClearSpotlightBtn" title="Clear canvas spotlight overlay">Clear Spotlight</button>
</div>
<div class="stat-box" style="border-left:3px solid var(--gold);">
<div style="font-size:0.76rem;font-weight:700;color:var(--gold);margin-bottom:0.25rem;" id="tutKeyframeTitle"></div>
<div style="font-size:0.75rem;color:var(--text-main);line-height:1.5;" id="tutSubtitleText"></div>
<div class="pill-row" style="margin-top:0.45rem;" id="tutCitationPills"></div>
</div>
</section>
<section class="toolbar" aria-label="Workbench Controls">
<div class="control-group">
<span class="control-label">Guild Filter:</span>
<div class="pill-row" id="guildFilterPills"></div>
</div>
<div class="control-group">
<label class="control-label" for="tickerSelect">Ticker:</label>
<select id="tickerSelect"></select>
<a class="btn tv-btn" id="openTradingViewBtn" href="https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" target="_blank" rel="noopener noreferrer" title="Shortcut: Press T to open TradingView Superchart in a new browser window">Open TradingView Chart &#x2197;</a>
</div>
<div class="control-group">
<label class="control-label" for="lensSelect">Projection Lens:</label>
<select id="lensSelect"></select>
</div>
<div class="control-group">
<span class="control-label">Metric Mode:</span>
<div class="pill-row" id="metricModePills"></div>
</div>
<div class="control-group">
<button class="btn" id="prevDateBtn" title="Shortcut: Left Arrow">&larr; Prev Day</button>
<span id="activeDateBadge" style="font-size:0.76rem;font-weight:700;color:var(--gold);padding:0 0.35rem;">2026-11-30</span>
<button class="btn" id="nextDateBtn" title="Shortcut: Right Arrow">Next Day &rarr;</button>
</div>
</section>
<!-- PANEL 1: 3-Pane Synchronized Time-Series Canvas -->
<section class="panel">
<div class="panel-header">
<span class="panel-title" id="panel1Title">PANEL 1: Synchronized 3-Pane Time-Series Trajectory (Price/BPS &times; Spoken/Digit AQ &times; 00:00 GMT Wire Velocity &times; M1-M3 Regimes)</span>
<span class="panel-meta" id="panel1Meta">Click or drag across canvas to scrub UTC dates &bull; Gold = Scope 1 Self-Lock &bull; Cyan = Scope 2 Ring Migration &bull; Emerald = News Wire Co-Presence</span>
</div>
<canvas id="tsCanvas" width="1320" height="410"></canvas>
</section>
<div class="split-grid">
<!-- PANEL 2: 24 Tickers x 30 UTC Days Contingent Lock Heatmap -->
<section class="panel">
<div class="panel-header">
<span class="panel-title">PANEL 2: Spatiotemporal Contingent Lock Heatmap (24 S1-S6 Tickers &times; 30 UTC Days)</span>
<span class="panel-meta">Click any (Ticker, Date) cell to inspect &bull; &#x2197; launches TradingView</span>
</div>
<div class="heatmap-wrap">
<table class="heatmap" id="heatmapTable"></table>
</div>
</section>
<!-- PANEL 3: Cross-Sectional Date Inspector, Lens Projection & Memetic Equation Tape -->
<section class="panel">
<div class="panel-header">
<span class="panel-title" id="panel3Title">PANEL 3: Cross-Sectional Date Inspector &amp; Lens Projection</span>
<a class="btn tv-btn" id="panel3TvBtn" href="https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" target="_blank" rel="noopener noreferrer">TradingView &#x2197;</a>
</div>
<div class="inspector-grid" id="dateMetricsGrid"></div>
<div class="stat-box" id="lensProjectionCard"></div>
<div class="stat-box" id="docReferencesCard" style="border-left:3px solid var(--cyan);"></div>
<div>
<div class="control-label" style="margin-bottom:0.35rem;" id="wireTapeHeader">Dated 00:00 GMT News-Wire Memetic Equations (333 / 666 / 777):</div>
<div class="eq-tape" id="wireEqTape"></div>
</div>
<div class="stat-box" id="passagePreviewBox" style="display:none;border-left:3px solid var(--emerald);font-size:0.69rem;white-space:pre-wrap;"></div>
</section>
</div>
<!-- PANEL 4: Lead-Lag Cross-Correlation Explorer & Portable CSV/JSON Export -->
<section class="panel">
<div class="panel-header">
<span class="panel-title">PANEL 4: Lead-Lag Cross-Correlation Explorer r(&tau;) (&tau; &in; [-5 .. +5] Days) &amp; Time-Series Export</span>
<div class="control-group">
<button class="btn" id="exportCsvBtn">Export Filtered Series (.CSV)</button>
<button class="btn" id="exportJsonBtn">Export Lens-Neutral Slice (.JSON)</button>
</div>
</div>
<div class="lag-bars" id="lagBarsContainer"></div>
<p class="panel-meta" id="periodicityAuditFooter"></p>
</section>
<footer>
hyperstitionstud.io/quant v2.0.24 &bull; Made with <span class="hs-heart" style="color:#ff4d4d;">&#x2665;</span> by Lemurs.
</footer>
</div>
<script src="quant-app.js?v=2.0.24"></script>
<script src="quant-tutorials.js?v=2.0.24"></script>
</body>
</html>
+680
View File
@@ -0,0 +1,680 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.0.24)
(function () {
"use strict";
const DATA = (window.HyperstitionStudio && window.HyperstitionStudio.QuantTimeSeries) || null;
if (!DATA) {
console.error("QuantTimeSeries bundle missing.");
return;
}
// Resolve file:// vs https:// navigation links automatically
if (window.location.protocol === "file:") {
const navHome = document.getElementById("navHome");
const navGraph = document.getElementById("navGraph");
const navLearn = document.getElementById("navLearn");
const navCalc = document.getElementById("navCalc");
const navManual = document.getElementById("navManual");
const navDonate = document.getElementById("navDonate");
if (navHome) navHome.href = "../index.html";
if (navGraph) navGraph.href = "../../../encyclopedia-knowledge-graph/index.html";
if (navLearn) navLearn.href = "../learn/index.html";
if (navCalc) navCalc.href = "../../../haiperdohp-jemaytreeah/index.html";
if (navManual) navManual.href = "./OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf";
if (navDonate) navDonate.href = "../donate/index.html";
}
let activeSpotlight = null;
function findLatestAvailableDateIdx(sym) {
const inst = DATA.instruments.find((x) => x.symbol === sym) || DATA.instruments[0];
if (!inst || !inst.bars) return DATA.dates_utc.length - 1;
for (let i = inst.bars.length - 1; i >= 0; i--) {
if (inst.bars[i].data_available) return i;
}
return DATA.dates_utc.length - 1;
}
const state = {
guildFilter: "ALL",
selectedSymbol: "NVDA",
selectedLens: DATA.default_lens || "fund_manager",
metricMode: "spoken_aq", // "spoken_aq" | "close_usd" | "change_bps" | "digit_aq"
selectedDateIdx: findLatestAvailableDateIdx("NVDA"),
};
const guilds = ["ALL", "S1", "S2", "S3", "S4", "S5", "S6"];
const modes = [
{ id: "spoken_aq", label: "Spoken AQ (Gen 1)" },
{ id: "close_usd", label: "Close Price (USD)" },
{ id: "change_bps", label: "Move (BPS)" },
{ id: "digit_aq", label: "Digit AQ" },
];
const elGuildPills = document.getElementById("guildFilterPills");
const elTickerSelect = document.getElementById("tickerSelect");
const elLensSelect = document.getElementById("lensSelect");
const elModePills = document.getElementById("metricModePills");
const elDateBadge = document.getElementById("activeDateBadge");
const elTvBtn = document.getElementById("openTradingViewBtn");
const elPanel3TvBtn = document.getElementById("panel3TvBtn");
const canvas = document.getElementById("tsCanvas");
const ctx = canvas.getContext("2d");
function getFilteredInstruments() {
if (state.guildFilter === "ALL") return DATA.instruments;
return DATA.instruments.filter((inst) => inst.guilds.indexOf(state.guildFilter) !== -1);
}
function getSelectedInstrument() {
return (
DATA.instruments.find((inst) => inst.symbol === state.selectedSymbol) ||
DATA.instruments[0]
);
}
function updateTradingViewLinks() {
const inst = getSelectedInstrument();
const url = inst.tradingview_url || ("https://www.tradingview.com/chart/?symbol=" + encodeURIComponent(inst.symbol));
const label = "Open TradingView (" + (inst.tradingview_symbol || inst.symbol) + ") \u2197";
if (elTvBtn) {
elTvBtn.href = url;
elTvBtn.textContent = label;
}
if (elPanel3TvBtn) {
elPanel3TvBtn.href = url;
elPanel3TvBtn.textContent = (inst.tradingview_symbol || inst.symbol) + " on TradingView \u2197";
}
}
function renderControls() {
// Guild Pills
elGuildPills.innerHTML = "";
guilds.forEach((g) => {
const btn = document.createElement("button");
btn.className = "pill" + (state.guildFilter === g ? " active" : "");
btn.textContent = g;
btn.onclick = function () {
state.guildFilter = g;
const list = getFilteredInstruments();
if (list.length && !list.some((x) => x.symbol === state.selectedSymbol)) {
state.selectedSymbol = list[0].symbol;
}
renderAll();
};
elGuildPills.appendChild(btn);
});
// Ticker Select
const filtered = getFilteredInstruments();
elTickerSelect.innerHTML = "";
filtered.forEach((inst) => {
const opt = document.createElement("option");
opt.value = inst.symbol;
opt.textContent = inst.symbol + " — " + inst.entity_eng + " [" + inst.guilds.join(",") + "] (AQ " + inst.entity_ing_aq + ")";
if (inst.symbol === state.selectedSymbol) opt.selected = true;
elTickerSelect.appendChild(opt);
});
elTickerSelect.onchange = function () {
state.selectedSymbol = elTickerSelect.value;
renderAll();
};
// Lens Select (populated dynamically from DATA.enabled_lenses)
elLensSelect.innerHTML = "";
(DATA.enabled_lenses || []).forEach((lid) => {
const meta = (DATA.lens_registry_meta && DATA.lens_registry_meta[lid]) || { short_label: lid, title: lid };
const opt = document.createElement("option");
opt.value = lid;
opt.textContent = meta.short_label + " — " + meta.title;
if (lid === state.selectedLens) opt.selected = true;
elLensSelect.appendChild(opt);
});
elLensSelect.onchange = function () {
state.selectedLens = elLensSelect.value;
renderAll();
};
// Metric Mode Pills
elModePills.innerHTML = "";
modes.forEach((m) => {
const btn = document.createElement("button");
btn.className = "pill" + (state.metricMode === m.id ? " active" : "");
btn.textContent = m.label;
btn.onclick = function () {
state.metricMode = m.id;
renderAll();
};
elModePills.appendChild(btn);
});
elDateBadge.textContent = DATA.dates_utc[state.selectedDateIdx];
updateTradingViewLinks();
}
function drawCanvas() {
const inst = getSelectedInstrument();
const bars = inst.bars;
const N = bars.length;
const W = canvas.width;
const H = canvas.height;
ctx.clearRect(0, 0, W, H);
const padL = 62;
const padR = 28;
const plotW = W - padL - padR;
// 3 Panes: Top (20..195), Middle (215..310), Bottom (330..385)
const topY0 = 22, topY1 = 192;
const midY0 = 216, midY1 = 306;
const botY0 = 328, botY1 = 382;
function xAt(i) {
return padL + (i / Math.max(1, N - 1)) * plotW;
}
// Selected date vertical crosshair
const selX = xAt(state.selectedDateIdx);
ctx.strokeStyle = "rgba(245, 198, 48, 0.45)";
ctx.lineWidth = 1.5;
ctx.beginPath();
ctx.moveTo(selX, 10);
ctx.lineTo(selX, H - 18);
ctx.stroke();
// Pane dividers
ctx.strokeStyle = "#1e293b";
ctx.lineWidth = 1;
[topY1, midY1, botY1].forEach((yLine) => {
ctx.beginPath();
ctx.moveTo(padL, yLine);
ctx.lineTo(W - padR, yLine);
ctx.stroke();
});
// Top Pane: Selected Metric Trajectory (strictly over real available bars; never synthesized or interpolated)
const vals = bars.map((b) => {
if (!b || !b.data_available || b.close_usd === null || b.close_usd === undefined) return null;
if (state.metricMode === "close_usd") return Number(b.close_usd);
if (state.metricMode === "change_bps") return b.change_bps !== null && b.change_bps !== undefined ? Number(b.change_bps) : null;
if (state.metricMode === "digit_aq") return b.close_digit_aq !== null && b.close_digit_aq !== undefined ? Number(b.close_digit_aq) : null;
return b.close_spoken_ing_aq !== null && b.close_spoken_ing_aq !== undefined ? Number(b.close_spoken_ing_aq) : null;
});
const validVals = vals.filter((v) => v !== null && !Number.isNaN(v));
if (!inst.data_available || validVals.length === 0) {
ctx.fillStyle = "rgba(15, 23, 42, 0.94)";
ctx.fillRect(padL + 40, topY0 + 36, plotW - 80, 92);
ctx.strokeStyle = "#f5c630";
ctx.strokeRect(padL + 40, topY0 + 36, plotW - 80, 92);
ctx.fillStyle = "#f5c630";
ctx.font = "bold 13px monospace";
ctx.textAlign = "center";
ctx.fillText("NO MARKET DATA AVAILABLE FOR " + inst.symbol, padL + plotW / 2, topY0 + 74);
ctx.fillStyle = "#94a3b8";
ctx.font = "11px monospace";
ctx.fillText(inst.status || "No public exchange feed available (0 synthetic bars generated).", padL + plotW / 2, topY0 + 98);
ctx.textAlign = "left";
} else {
const minV = Math.min.apply(null, validVals);
const maxV = Math.max.apply(null, validVals);
const spanV = Math.max(1e-3, maxV - minV);
function yTop(v) {
return topY1 - ((v - minV) / spanV) * (topY1 - topY0 - 14) - 6;
}
// Draw entity AQ horizontal reference line if within range
const refAq = inst.entity_ing_aq;
if (refAq >= minV && refAq <= maxV) {
const ry = yTop(refAq);
ctx.strokeStyle = "rgba(255, 77, 77, 0.45)";
ctx.setLineDash([4, 4]);
ctx.beginPath();
ctx.moveTo(padL, ry);
ctx.lineTo(W - padR, ry);
ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = "#ff4d4d";
ctx.font = "10px monospace";
ctx.fillText(inst.entity_ing + "=" + refAq, padL + 6, ry - 4);
}
// Plot curve across available trading days
ctx.strokeStyle = "#22d3ee";
ctx.lineWidth = 2.2;
ctx.beginPath();
let started = false;
vals.forEach((v, idx) => {
if (v === null || Number.isNaN(v)) return;
const px = xAt(idx);
const py = yTop(v);
if (!started) {
ctx.moveTo(px, py);
started = true;
} else {
ctx.lineTo(px, py);
}
});
ctx.stroke();
// Lock beacon markers on Top Pane
bars.forEach((b, idx) => {
if (vals[idx] === null || Number.isNaN(vals[idx])) return;
const px = xAt(idx);
const py = yTop(vals[idx]);
if (b.scope1_locks && b.scope1_locks.length > 0) {
ctx.fillStyle = "#f5c630";
ctx.beginPath();
ctx.arc(px, py, 5.2, 0, Math.PI * 2);
ctx.fill();
} else if (b.scope2_ring_coordinates && b.scope2_ring_coordinates.length > 0) {
ctx.fillStyle = "#22d3ee";
ctx.beginPath();
ctx.arc(px, py, 3.8, 0, Math.PI * 2);
ctx.fill();
}
});
ctx.fillStyle = "#94a3b8";
ctx.font = "10px monospace";
ctx.fillText(maxV.toFixed(1), 6, topY0 + 8);
ctx.fillText(minV.toFixed(1), 6, topY1 - 4);
}
// Middle Pane: 00:00 GMT News Wire Equation Counts + Co-Presence Diamonds
const wireTotals = DATA.daily_wire_series.map((d) => Number(d.equation_counts.total || 0));
const maxW = Math.max(10, Math.max.apply(null, wireTotals));
const barW = Math.max(6, Math.floor(plotW / N) - 5);
wireTotals.forEach((wt, idx) => {
const px = xAt(idx);
const bh = (wt / maxW) * (midY1 - midY0 - 14);
ctx.fillStyle = bars[idx].co_present_in_news_wire ? "#34d399" : "#a78bfa";
ctx.fillRect(px - barW / 2, midY1 - bh, barW, bh);
});
// Bottom Pane: 20-Day Volume Ratio & Regime Color Strip
const vols = bars.map((b) => (b && b.data_available && b.volume_ratio_20d !== null && b.volume_ratio_20d !== undefined) ? Number(b.volume_ratio_20d) : null);
const validVols = vols.filter((v) => v !== null && v > 0);
const maxVol = validVols.length > 0 ? Math.max(2.6, Math.max.apply(null, validVols)) : 2.6;
vols.forEach((vr, idx) => {
if (vr === null) return;
const px = xAt(idx);
const bh = (vr / maxVol) * (botY1 - botY0 - 8);
const b = bars[idx];
const chgP = b.change_pct !== null && b.change_pct !== undefined ? Number(b.change_pct) : 0.0;
ctx.fillStyle = chgP <= -5.0 || vr >= 2.5 ? "#ff4d4d" : (vr < 0.45 ? "#f5c630" : "#38bdf8");
ctx.fillRect(px - barW / 2, botY1 - bh, barW, bh);
});
// Axis labels
ctx.fillStyle = "#94a3b8";
ctx.font = "10px monospace";
ctx.fillText("Wire Eq", 6, midY0 + 12);
ctx.fillText("Vol20d", 6, botY0 + 12);
// Date ticks along bottom
for (let i = 0; i < N; i += 4) {
ctx.fillText(DATA.dates_utc[i].slice(5), xAt(i) - 14, H - 4);
}
// Optional Tutorial Spotlight Ring & Callout Banner on Canvas
if (activeSpotlight && activeSpotlight.target === "canvas") {
const spX = padL + (activeSpotlight.xRatio || 0.9) * plotW;
const spY = (activeSpotlight.yRatio || 0.25) * H;
ctx.save();
ctx.strokeStyle = "#f5c630";
ctx.lineWidth = 2.5;
ctx.beginPath();
ctx.arc(spX, spY, 18, 0, Math.PI * 2);
ctx.stroke();
ctx.strokeStyle = "rgba(251, 113, 133, 0.85)";
ctx.lineWidth = 1.5;
ctx.beginPath();
ctx.arc(spX, spY, 25, 0, Math.PI * 2);
ctx.stroke();
const lbl = activeSpotlight.label || "Spotlight";
ctx.font = "bold 11px monospace";
const tw = ctx.measureText(lbl).width + 16;
const bx = Math.max(padL + 6, Math.min(W - tw - 12, spX - tw - 24));
const by = Math.max(18, spY - 14);
ctx.fillStyle = "rgba(2, 6, 23, 0.92)";
ctx.fillRect(bx, by, tw, 24);
ctx.strokeStyle = "#f5c630";
ctx.strokeRect(bx, by, tw, 24);
ctx.fillStyle = "#f5c630";
ctx.fillText(lbl, bx + 8, by + 16);
ctx.restore();
}
}
function renderHeatmap() {
const tbl = document.getElementById("heatmapTable");
const filtered = getFilteredInstruments();
let html = "<thead><tr><th class='sym-col'>Ticker (TV)</th>";
DATA.dates_utc.forEach((dt, idx) => {
const selStyle = idx === state.selectedDateIdx ? "color:var(--gold);font-weight:700;" : "color:var(--text-muted);";
html += "<th style='" + selStyle + "'>" + dt.slice(8) + "</th>";
});
html += "</tr></thead><tbody>";
filtered.forEach((inst) => {
const rowSel = inst.symbol === state.selectedSymbol ? "background:rgba(34,211,238,0.12);" : "";
html += "<tr style='" + rowSel + "'><th class='sym-col'>";
html += "<span style='cursor:pointer;color:var(--text-main);' data-sym='" + inst.symbol + "' class='hm-sym-pick'>" + inst.symbol + "</span> ";
html += "<a href='" + inst.tradingview_url + "' target='_blank' rel='noopener noreferrer' style='color:var(--gold);text-decoration:none;' title='Open " + inst.tradingview_symbol + " on TradingView'>\u2197</a>";
html += "</th>";
inst.bars.forEach((b, dIdx) => {
let cls = "hm-cell hm-none";
if (!b.data_available) cls = "hm-cell hm-nodata";
else if (b.scope1_locks && b.scope1_locks.length > 0) cls = "hm-cell hm-scope1";
else if (b.scope2_ring_coordinates && b.scope2_ring_coordinates.length > 0) cls = "hm-cell hm-scope2";
if (b.co_present_in_news_wire) cls += " hm-wire";
if (inst.symbol === state.selectedSymbol && dIdx === state.selectedDateIdx) cls += " hm-selected";
const tip = !b.data_available
? (inst.symbol + " (" + b.date_utc + "): No data available")
: (inst.symbol + " (" + b.date_utc + "): $" + b.close_usd + " (" + (b.change_bps !== null ? b.change_bps + " bps" : "No bps data") + ") | Spoken AQ=" + b.close_spoken_ing_aq);
html += "<td><span class='" + cls + "' data-sym='" + inst.symbol + "' data-didx='" + dIdx + "' title='" + tip + "'></span></td>";
});
html += "</tr>";
});
html += "</tbody>";
tbl.innerHTML = html;
tbl.querySelectorAll(".hm-cell").forEach((cell) => {
cell.addEventListener("click", function () {
state.selectedSymbol = cell.getAttribute("data-sym");
state.selectedDateIdx = parseInt(cell.getAttribute("data-didx"), 10);
renderAll();
});
});
tbl.querySelectorAll(".hm-sym-pick").forEach((sp) => {
sp.addEventListener("click", function () {
state.selectedSymbol = sp.getAttribute("data-sym");
renderAll();
});
});
}
function renderInspectorAndLens() {
const inst = getSelectedInstrument();
const bar = inst.bars[state.selectedDateIdx];
const dt = bar.date_utc;
const proj = (inst.lens_projections && inst.lens_projections[state.selectedLens]) || null;
document.getElementById("panel3Title").textContent =
"PANEL 3: " + inst.symbol + " (" + inst.entity_eng + " \u2192 " + inst.entity_ing + "=" + inst.entity_ing_aq + ") @ " + dt;
const metricsGrid = document.getElementById("dateMetricsGrid");
if (!bar.data_available || bar.close_usd === null || bar.close_usd === undefined) {
metricsGrid.innerHTML = [
{ l: "Close USD (Change)", v: "No data available" },
{ l: "Spoken Close (Gen 1 AQ)", v: "No data available" },
{ l: "Scaled Cap (Gen 1 AQ)", v: "No data available" },
{ l: "BPS Spoken AQ / Vol20d", v: "No data available" },
{ l: "Active Contingent Locks", v: "No data available" },
{ l: "00:00 GMT Wire Co-Present", v: bar.co_present_in_news_wire ? "YES (Scope 3 Lock)" : "No" },
]
.map((m) => "<div class='stat-box'><div class='stat-label'>" + m.l + "</div><div class='stat-val' style='color:var(--text-muted);'>" + m.v + "</div></div>")
.join("");
} else {
const lockSummary = (bar.scope1_locks || []).concat((bar.scope2_ring_coordinates || []).map((c) => "Ring " + c)).join(", ") || "None";
const chgStr = bar.change_bps !== null && bar.change_bps !== undefined
? (" (" + (bar.change_bps >= 0 ? "+" : "") + bar.change_bps + " bps)")
: " (No prior day data)";
const capDisp = (bar.market_cap_str && bar.market_cap_str !== "No data available" && bar.scaled_cap_spoken_ing_aq !== null)
? (bar.market_cap_str + " (" + bar.scaled_cap_spoken_ing_aq + ")")
: "No data available";
const bpsDisp = bar.bps_spoken_ing_aq !== null && bar.bps_spoken_ing_aq !== undefined ? String(bar.bps_spoken_ing_aq) : "No data available";
const volDisp = bar.volume_ratio_20d !== null && bar.volume_ratio_20d !== undefined ? (bar.volume_ratio_20d + "x") : "No data available";
metricsGrid.innerHTML = [
{ l: "Close USD (Change)", v: "$" + bar.close_usd + chgStr },
{ l: "Spoken Close (Gen 1 AQ)", v: bar.close_spoken_ing + " (" + bar.close_spoken_ing_aq + ")" },
{ l: "Scaled Cap (Gen 1 AQ)", v: capDisp },
{ l: "BPS Spoken AQ / Vol20d", v: bpsDisp + " / " + volDisp },
{ l: "Active Contingent Locks", v: lockSummary },
{ l: "00:00 GMT Wire Co-Present", v: bar.co_present_in_news_wire ? "YES (Scope 3 Lock)" : "No" },
]
.map((m) => "<div class='stat-box'><div class='stat-label'>" + m.l + "</div><div class='stat-val'>" + m.v + "</div></div>")
.join("");
}
// Render Active Lens Projection Card (LENS_REGISTRY)
const lensCard = document.getElementById("lensProjectionCard");
if (proj) {
let rowsHtml = "";
Object.keys(proj.labeled_timeseries || {}).forEach((k) => {
const val = proj.labeled_timeseries[k];
let disp = "No data available";
if (val !== null && val !== undefined) {
if (typeof val === "object") {
const nonNull = Object.values(val).some((x) => x !== null && x !== undefined);
disp = nonNull ? JSON.stringify(val) : "No data available";
} else {
disp = String(val);
}
}
rowsHtml += "<div style='display:flex;justify-content:space-between;font-size:0.69rem;border-bottom:1px solid #162032;padding:0.18rem 0;'>" +
"<span style='color:var(--text-muted);'>" + k + ":</span><span style='color:var(--text-main);font-weight:600;'>" + disp + "</span></div>";
});
const archDisp = (proj.qualitative_profile && proj.qualitative_profile.archetype) || "No data available";
const regDisp = (proj.qualitative_profile && proj.qualitative_profile.regime_specialization) || "No data available";
const sparkDisp = inst.timeseries_moments.ts_sparkline_30d || "No data available";
lensCard.innerHTML =
"<div style='display:flex;justify-content:space-between;align-items:center;margin-bottom:0.4rem;'>" +
"<span style='font-size:0.76rem;font-weight:700;color:var(--gold);'>Lens: " + proj.lens_title + "</span>" +
"<span style='font-size:0.7rem;color:var(--cyan);'>" + proj.tier_classification + "</span></div>" +
"<div style='font-size:0.71rem;color:var(--emerald);margin-bottom:0.4rem;'>" +
"Archetype: " + archDisp + " &bull; " + regDisp +
" &bull; 30d: " + sparkDisp + "</div>" +
rowsHtml;
}
// Render Knowledge-Graph-Modeled Documentation & Cited Passages Card
const docCard = document.getElementById("docReferencesCard");
if (docCard && inst.doc_references) {
const dr = inst.doc_references;
const resolveUrl = (window.HyperstitionStudio.QuantTutorials && window.HyperstitionStudio.QuantTutorials.adaptHrefForFileProtocol) || function (u) { return u; };
const encUrl = resolveUrl(dr.encyclopedia_deep_link);
const kgUrl = resolveUrl(dr.knowledge_graph_deep_link);
const dosUrl = resolveUrl(dr.exemplar_dossier_deep_link);
const apiUrl = dr.rest_api_deep_link;
docCard.innerHTML =
"<div style='font-size:0.74rem;font-weight:700;color:var(--cyan);margin-bottom:0.3rem;'>Documentation &amp; Passage-Encoded Deep Citations</div>" +
"<div style='font-size:0.68rem;color:var(--text-muted);margin-bottom:0.4rem;'>" + (dr.verbatim_citation_passage || "") + "</div>" +
"<div style='display:flex;flex-wrap:wrap;gap:0.35rem;'>" +
"<a class='pill' style='text-decoration:none;color:var(--gold);border-color:var(--gold);' href='" + encUrl + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDCC4 Encyclopedia PDF (#page &amp; search) \u2197</a>" +
"<a class='pill' style='text-decoration:none;color:var(--cyan);border-color:var(--cyan);' href='" + kgUrl + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDD78\uFE0F Knowledge Graph (aq:" + inst.entity_ing_aq + ") \u2197</a>" +
"<a class='pill' style='text-decoration:none;color:var(--emerald);border-color:var(--emerald);' href='" + dosUrl + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDCDC Dossier Passage (#:~:text=) \u2197</a>" +
"<button type='button' class='pill preview-api-btn' data-api='" + apiUrl + "' style='color:var(--violet);border-color:var(--violet);'>\uD83D\uDD0D Inline Passage Preview</button>" +
"</div>";
}
// Render Dated 00:00 GMT News-Wire Equation Tape
const wireDay = DATA.daily_wire_series[state.selectedDateIdx];
const tapeEl = document.getElementById("wireEqTape");
const hdrEl = document.getElementById("wireTapeHeader");
const resolveUrl = (window.HyperstitionStudio.QuantTutorials && window.HyperstitionStudio.QuantTutorials.adaptHrefForFileProtocol) || function (u) { return u; };
if (wireDay && wireDay.dossier_file) {
hdrEl.innerHTML =
"Dated 00:00 GMT Wire Dossier (<a href='" + resolveUrl(wireDay.archive_route) + "' target='_blank' style='color:var(--cyan);'>" +
wireDay.dossier_file + "</a> &bull; " + wireDay.equation_counts.total + " Verified Equations):";
tapeEl.innerHTML = (wireDay.sample_equations || [])
.map(
(eq) => {
const dLink = resolveUrl(eq.dossier_deep_link || wireDay.archive_route);
const gLink = resolveUrl((eq.graph_hub_links && eq.graph_hub_links[0]) || ("/graph/index.html?select=aq:" + eq.target));
const aLink = eq.api_highlight_link || ("/api/v1/dossiers/" + wireDay.dossier_number + "?highlight=" + encodeURIComponent(eq.ing.slice(0, 20)));
return "<div class='eq-item'><div><strong style='color:var(--gold);'>[" + eq.target + "]</strong> " +
"<code>" + eq.ing + "</code> (\"" + eq.eng + "\")</div>" +
"<div style='color:var(--text-muted);font-size:0.65rem;margin-bottom:0.2rem;'>" + eq.breakdown + " = " + eq.target + "</div>" +
"<div style='display:flex;flex-wrap:wrap;gap:0.3rem;'>" +
"<a class='pill' style='text-decoration:none;font-size:0.62rem;padding:0.12rem 0.4rem;color:var(--emerald);' href='" + dLink + "' target='_blank'>Passage #:~:text= \u2197</a>" +
"<a class='pill' style='text-decoration:none;font-size:0.62rem;padding:0.12rem 0.4rem;color:var(--cyan);' href='" + gLink + "' target='_blank'>Graph Hub \u2197</a>" +
"<button type='button' class='pill preview-api-btn' data-api='" + aLink + "' data-fallback='" + eq.ing + " (\"" + eq.eng + "\") = " + eq.target + "' style='font-size:0.62rem;padding:0.12rem 0.4rem;color:var(--violet);'>Preview Passage</button>" +
"</div></div>";
}
)
.join("");
} else {
hdrEl.textContent = "Dated 00:00 GMT Wire Dossier (" + dt + "):";
tapeEl.innerHTML = "<div style='color:var(--text-muted);'>No separate dated news dossier archived on " + dt + " (US Closing-Bell Market Telemetry Bar active).</div>";
}
document.querySelectorAll(".preview-api-btn").forEach(function (btn) {
btn.onclick = function () {
const apiTarget = btn.getAttribute("data-api");
const fallbackTxt = btn.getAttribute("data-fallback") || (inst.doc_references && inst.doc_references.verbatim_citation_passage) || "";
const previewBox = document.getElementById("passagePreviewBox");
if (!previewBox) return;
previewBox.style.display = "block";
previewBox.textContent = "Loading passage preview from " + apiTarget + " ...";
fetch(apiTarget)
.then(function (r) { return r.json(); })
.then(function (j) {
const d = (j && j.data) || j || {};
const matches = d.matched_passages || [];
if (matches.length > 0) {
previewBox.textContent =
"[REST API Passage Match in " + (d.uri || apiTarget) + " — Line " + matches[0].line_number + "]\n" +
matches[0].context;
} else {
previewBox.textContent = "[Passage Preview]\n" + fallbackTxt;
}
})
.catch(function () {
previewBox.textContent = "[Offline Passage Preview]\n" + fallbackTxt;
});
};
});
}
function renderLagExplorer() {
const inst = getSelectedInstrument();
const curve = inst.timeseries_moments.ts_lag_correlation_curve || {};
const optLag = inst.timeseries_moments.ts_optimal_lag_days;
const container = document.getElementById("lagBarsContainer");
let html = "";
for (let tau = -5; tau <= 5; tau++) {
const rawR = curve[String(tau)];
if (rawR === null || rawR === undefined) {
html +=
"<div class='lag-col' title='Lag tau=" + tau + "d: No data available'>" +
"<div style='font-size:0.62rem;color:var(--text-muted);'>N/A</div>" +
"<div class='lag-bar' style='height:4px;background:#334155;'></div>" +
"<div class='lag-lbl'>&tau;=" + (tau >= 0 ? "+" + tau : tau) + "d</div></div>";
} else {
const r = Number(rawR);
const hPct = Math.max(6, Math.round(Math.abs(r) * 85));
const color = tau === optLag ? "var(--gold)" : (r >= 0 ? "var(--cyan)" : "var(--rose)");
html +=
"<div class='lag-col' title='Lag tau=" + tau + "d: r=" + r.toFixed(3) + "'>" +
"<div style='font-size:0.62rem;color:var(--text-main);'>" + r.toFixed(2) + "</div>" +
"<div class='lag-bar' style='height:" + hPct + "px;background:" + color + ";'></div>" +
"<div class='lag-lbl'>&tau;=" + (tau >= 0 ? "+" + tau : tau) + "d</div></div>";
}
}
container.innerHTML = html;
const pGate = DATA.periodicity_gate || {};
const optLagDisp = optLag !== null && optLag !== undefined ? ((optLag >= 0 ? "+" + optLag : optLag) + "d") : "No data available";
document.getElementById("periodicityAuditFooter").textContent =
"Periodicity Gate Enforced: " + pGate.dated_news_dossiers_ingested + " dated 00:00 UTC news dossiers + real exchange closing-bell bars (" +
pGate.non_periodic_records_ingested + " non-periodic/static records ingested; missing bars = null / No data available) | Optimal Lag tau* = " +
optLagDisp + " | CIDv1: " + (DATA.ipld_dag_json_cidv1 && DATA.ipld_dag_json_cidv1["/"]);
}
function renderAll() {
renderControls();
drawCanvas();
renderHeatmap();
renderInspectorAndLens();
renderLagExplorer();
}
// Canvas scrub interaction
canvas.addEventListener("click", function (ev) {
const rect = canvas.getBoundingClientRect();
const relX = ((ev.clientX - rect.left) / rect.width) * canvas.width;
const padL = 62, padR = 28;
const ratio = (relX - padL) / (canvas.width - padL - padR);
const idx = Math.round(ratio * (DATA.dates_utc.length - 1));
state.selectedDateIdx = Math.max(0, Math.min(DATA.dates_utc.length - 1, idx));
renderAll();
});
document.getElementById("prevDateBtn").onclick = function () {
state.selectedDateIdx = Math.max(0, state.selectedDateIdx - 1);
renderAll();
};
document.getElementById("nextDateBtn").onclick = function () {
state.selectedDateIdx = Math.min(DATA.dates_utc.length - 1, state.selectedDateIdx + 1);
renderAll();
};
// Keyboard shortcuts: Left/Right arrows step UTC dates; 'T' opens TradingView chart in new window
window.addEventListener("keydown", function (ev) {
if (ev.target && (ev.target.tagName === "INPUT" || ev.target.tagName === "SELECT" || ev.target.tagName === "TEXTAREA")) {
return;
}
if (ev.key === "ArrowLeft") {
state.selectedDateIdx = Math.max(0, state.selectedDateIdx - 1);
renderAll();
} else if (ev.key === "ArrowRight") {
state.selectedDateIdx = Math.min(DATA.dates_utc.length - 1, state.selectedDateIdx + 1);
renderAll();
} else if (ev.key === "t" || ev.key === "T") {
const inst = getSelectedInstrument();
window.open(inst.tradingview_url, "_blank", "noopener,noreferrer");
}
});
// CSV & JSON Exports
document.getElementById("exportCsvBtn").onclick = function () {
const inst = getSelectedInstrument();
const headers = ["date_utc", "symbol", "close_usd", "change_bps", "volume_ratio_20d", "close_spoken_ing_aq", "bps_spoken_ing_aq", "co_present_in_news_wire", "contingent_points"];
const lines = [headers.join(",")];
inst.bars.forEach((b) => {
lines.push([b.date_utc, inst.symbol, b.close_usd, b.change_bps, b.volume_ratio_20d, b.close_spoken_ing_aq, b.bps_spoken_ing_aq, b.co_present_in_news_wire, b.contingent_points].join(","));
});
const blob = new Blob([lines.join("\n") + "\n"], { type: "text/csv;charset=utf-8" });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = inst.symbol + "-quant-timeseries.csv";
a.click();
};
document.getElementById("exportJsonBtn").onclick = function () {
const inst = getSelectedInstrument();
const blob = new Blob([JSON.stringify(inst, null, 2) + "\n"], { type: "application/json;charset=utf-8" });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = inst.symbol + "-lens-neutral-slice.json";
a.click();
};
window.HyperstitionStudio = window.HyperstitionStudio || {};
window.HyperstitionStudio.QuantWorkbenchApp = {
getState: function () { return Object.assign({}, state); },
setStateAndRender: function (nextState, spotlight) {
if (nextState) {
if (nextState.guildFilter) state.guildFilter = nextState.guildFilter;
if (nextState.selectedSymbol) state.selectedSymbol = nextState.selectedSymbol;
if (nextState.selectedLens && DATA.lens_registry_meta[nextState.selectedLens]) {
state.selectedLens = nextState.selectedLens;
}
if (nextState.metricMode) state.metricMode = nextState.metricMode;
if (typeof nextState.selectedDateIdx === "number") {
state.selectedDateIdx = Math.max(0, Math.min(DATA.dates_utc.length - 1, nextState.selectedDateIdx));
}
}
activeSpotlight = spotlight || null;
renderAll();
}
};
renderAll();
})();
+3
View File
@@ -0,0 +1,3 @@
// Auto-generated synchronous time-series bundle for file:// and https:// portability
window.HyperstitionStudio = window.HyperstitionStudio || {};
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.0.24", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.0.24", "generated_at_utc": "2026-11-30T08:48:45Z", "synthetic_data_eliminated": true, "periodicity_gate": {"enforced": true, "allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"], "dated_news_dossiers_ingested": 21, "excluded_non_periodic_sources": ["01-ingglish-aq-lexicon.md", "10-19-ledger-*.md", "20-24-dossier-*.md", "26-45-dossier-*.md", "65-69-dossier-technocapital-singularity-*.md", "technocapital-singularity-zoology/encyclopedia/*", "proposal-*.md", "lecture-*.md", "podcast-ep*.md", "haiperdohp-jemaytreeah/db.json"], "non_periodic_records_ingested": 0, "missing_data_policy": "No data available (never synthesized or interpolated)"}, "enabled_lenses": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"], "default_lens": "fund_manager", "lens_registry_meta": {"fund_manager": {"lens_id": "fund_manager", "title": "Quantitative Hedge Fund & Factor Risk", "short_label": "Quant Factor", "structural_labels": {"struct_isometric_armor": "Chokepoint Moat", "struct_drift_velocity": "Signal Velocity", "struct_variance_collapse": "Convergence Power", "struct_trophic_capture": "Institutional Coupling", "struct_prime_density": "Idiosyncratic Asymmetry", "struct_repricing_resilience": "Regime Robustness"}, "timeseries_labels": {"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)", "ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)", "ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark", "ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV", "ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)", "ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)"}}, "neutral_math": {"lens_id": "neutral_math", "title": "Neutral Mathematical & Statistical Invariants", "short_label": "Neutral Math", "structural_labels": {"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)", "struct_drift_velocity": "G3 Inverse Phonemic Drift", "struct_variance_collapse": "G1 Log Variance Collapse", "struct_trophic_capture": "Bipartite S×S6 Coupling Degree", "struct_prime_density": "G5 Prime & Twin-Prime Density", "struct_repricing_resilience": "Repricing Counter-Swap Closure"}, "timeseries_labels": {"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)", "ts_weighted_resonance": "Weighted Resonance Index (0-100)", "ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)", "ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)", "ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)", "ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ"}}, "corporate_board": {"lens_id": "corporate_board", "title": "Corporate Strategy & Balance-Sheet Governance", "short_label": "Corporate Board", "structural_labels": {"struct_isometric_armor": "Supply-Chain Moat", "struct_drift_velocity": "Execution Agility", "struct_variance_collapse": "Cross-Unit Synergy", "struct_trophic_capture": "Governance & Balance-Sheet Integration", "struct_prime_density": "Proprietary IP Density", "struct_repricing_resilience": "Stress-Test Resilience"}, "timeseries_labels": {"ts_duty_cycle_pct": "Operational Utilization Cadence (%)", "ts_weighted_resonance": "Strategic Capital Share (0-100)", "ts_excess_over_replacement": "Net Economic Value Added (EVA)", "ts_quantile_profile": "Base-Case Floor / Upside Case / Variance", "ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)", "ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)"}}, "tierzoo_ecology": {"lens_id": "tierzoo_ecology", "title": "TierZoo Ecological Trophic Index (ETI)", "short_label": "TierZoo (ETI)", "structural_labels": {"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)", "struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)", "struct_variance_collapse": "COL (G1 Variance-Collapse Compression)", "struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)", "struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)", "struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)"}, "timeseries_labels": {"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)", "ts_weighted_resonance": "Trophic Dominance Rating (0-100)", "ts_excess_over_replacement": "Apex Surplus Over Extinction Floor", "ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV", "ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)", "ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)"}}, "fantasy_sabermetrics": {"lens_id": "fantasy_sabermetrics", "title": "Fantasy Football & Sabermetric Roster Engine", "short_label": "Fantasy Sabermetrics", "structural_labels": {"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)", "struct_drift_Line truncated
File diff suppressed because it is too large. Load diff
+647
View File
@@ -0,0 +1,647 @@
// /workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player & Deep-Link Choreographer (v2.0.24)
(function () {
"use strict";
window.HyperstitionStudio = window.HyperstitionStudio || {};
const EPISODES = [
{
id: "ep01",
code: "Ep 01",
title: "The Strict Periodicity Gate & Watchlist Topology",
keyframes: [
{
title: "1.1 Strict Periodicity Gate (21:30 UTC Close x 00:00 UTC Wire)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.22, label: "Strict Periodicity Gate: 19 Real US Equity Sessions in Nov 2026" },
subtitle: "Only real periodic timestamp-indexed observations (21:30 UTC US Closing-Bell bars and 00:00 UTC dated news dossiers) enter this workbench. Closed weekend/holiday dates explicitly report 'No data available'.",
citations: [
{ label: "Vol 08A PDF (Room Filter)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=2&search=Room%20Filter" },
{ label: "Archive Methodology", href: "/archive/00-index-and-methodology.md#:~:text=closing-bell" },
{ label: "Graph Hub aq:137", href: "/graph/index.html?select=aq:137" }
]
},
{
title: "1.2 Guild S1 — Autoregressive AI Syndicate (Coordinate 292)",
state: { guildFilter: "S1", selectedSymbol: "MSFT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 24 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.83, yRatio: 0.28, label: "S1 AI Guild Filter Active (MSFT 2026-11-25 Close $489.93)" },
subtitle: "Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292 (shizohnalizis == abstrakt masheen == sinthetik dayta == asset management [Gen 0]).",
citations: [
{ label: "Vol 03A PDF (S1 AI)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s1-autoregressive-ai-and-abstract-machine-a-to-z.pdf#page=1&search=292" },
{ label: "Dossier 65 (292 Lock)", href: "/zoology/dossiers/65-dossier-technocapital-singularity-autoregressive-ai.md#:~:text=292" },
{ label: "Graph Build S1", href: "/graph/index.html?select=build:S1" }
]
},
{
title: "1.3 Guild S3 — Silicon-Photonic War Machine (137 & 81)",
state: { guildFilter: "S3", selectedSymbol: "ASML", selectedLens: "corporate_board", metricMode: "close_usd", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.30, label: "S3 Isometric Chokepoint: ASML = asml = 81 (Δ = 0)" },
subtitle: "Guild S3 maps physical wafer and EUV lithography chokepoints: ASML (81, Δ = 0 isometric), TSMC (95, Δ = 0), and Nvidia (envideea = 137 [33rd Prime]).",
citations: [
{ label: "Vol 03C PDF (p.5 ASML/envideea)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=envideea" },
{ label: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
{ label: "Graph Hub aq:81", href: "/graph/index.html?select=aq:81" }
]
},
{
title: "1.4 Guild S6 — Apparatus of Capture (Coordinate 125)",
state: { guildFilter: "S6", selectedSymbol: "BLK", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.86, yRatio: 0.26, label: "S6 Capture Ring: kapatal == kapcher == fohldz = 125" },
subtitle: "Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125 (kapatal == kapcher == fohldz = 125) and charter/sloth (136).",
citations: [
{ label: "Vol 04A PDF (S6 Capture)", href: "/encyclopedia/04-capital-organizational-capture-s6/a-to-f-acquisition-to-fund.pdf#page=1&search=125" },
{ label: "Dossier 68 (Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" },
{ label: "Graph Hub aq:125", href: "/graph/index.html?select=aq:125" }
]
},
{
title: "1.5 Periodicity Audit Footer & IPLD dag-json CIDv1",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.50, yRatio: 0.85, label: "Cryptographic CIDv1 & Periodicity Audit Footer" },
subtitle: "The bottom footer verifies 21 dated 00:00 UTC dossiers + real exchange closing-bell bars (missing/closed days = null / No data available), and the deterministic IPLD dag-json CIDv1 digest.",
citations: [
{ label: "Static Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
{ label: "REST API /api/v1/quant/timeseries", href: "/api/v1/quant/timeseries?symbol=NVDA" },
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" }
]
}
]
},
{
id: "ep02",
code: "Ep 02",
title: "Reading Panel 1: Spoken AQ Curves, Gold/Cyan Beacons & Regimes",
keyframes: [
{
title: "2.1 Top Pane: Dashed Crimson Identity Line & Real Scope 1 Self-Lock (PLTR)",
state: { guildFilter: "ALL", selectedSymbol: "PLTR", selectedLens: "fund_manager", metricMode: "close_usd", selectedDateIdx: 22 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.76, yRatio: 0.25, label: "Real Scope 1 Self-Lock: PLTR Close $159.36 (159 == palanter)" },
subtitle: "On 2026-11-23, Palantir (PLTR) closed at $159.36 on the exchange: its rounded integer price (159) lands directly on the dashed crimson threshold marking its own Gen 1 Ingglish name (palanter = 159), firing a real Scope 1 Gold Beacon.",
citations: [
{ label: "Vol 03C PDF (S3 War Machine)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=palanter" },
{ label: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
{ label: "Graph Hub aq:159", href: "/graph/index.html?select=aq:159" }
]
},
{
title: "2.2 Move (BPS) Mode: TSMC (TSM) +81 bps Ring Migration & Microsoft -125 bps",
state: { guildFilter: "ALL", selectedSymbol: "TSM", selectedLens: "fund_manager", metricMode: "change_bps", selectedDateIdx: 17 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.59, yRatio: 0.24, label: "Real Exchange Move: TSM +81 bps on 2026-11-18 (Ring 81 == asml)" },
subtitle: "Switching Metric Mode to Move (BPS) on 2026-11-18 shows TSMC (TSM) moving +81 bps ($359.70 -> $362.62), landing on the S3 lithography coordinate 81 (asml = 81).",
citations: [
{ label: "Vol 03C PDF (ASML = 81)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=ASML" },
{ label: "Graph Hub aq:81", href: "/graph/index.html?select=aq:81" }
]
},
{
title: "2.3 Real Repdigit Attractor Lock: Broadcom (AVGO) at $333.40 & NVDA Spoken 333",
state: { guildFilter: "ALL", selectedSymbol: "AVGO", selectedLens: "fund_manager", metricMode: "close_usd", selectedDateIdx: 15 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.52, yRatio: 0.20, label: "Real Exchange Repdigit Lock: AVGO $333.40 on 2026-11-16 (333 = 3 x 111)" },
subtitle: "On 2026-11-16, Broadcom (AVGO) closed at $333.40 (rounded integer 333 = 3 x 111), and on 2026-11-03 Nvidia (NVDA) closed at $206.69 ('too huhndrad siks' = 333), firing real Scope 1 Repdigit Gold Beacons.",
citations: [
{ label: "Vol 03C PDF (S3 Guild)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=333" },
{ label: "Graph Hub aq:333", href: "/graph/index.html?select=aq:333" }
]
},
{
title: "2.4 Middle Pane: 00:00 GMT Wire Velocity & Emerald Scope 3 Bars",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "canvas", pane: "mid", xRatio: 0.93, yRatio: 0.63, label: "Emerald Bar = Scope 3 News-Wire Co-Presence" },
subtitle: "In the middle pane, Violet bars show daily 333/666/777 equation counts; Emerald bars highlight UTC dates where the selected ticker co-occurred in breaking 00:00 GMT news headlines.",
citations: [
{ label: "Dossier 71 (2026-11-29)", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
{ label: "REST Highlight Preview", href: "/api/v1/dossiers/71?highlight=envideea" }
]
},
{
title: "2.5 Bottom Pane: 20-Day Volume Ratio & M1/M2/M3 Thermodynamic Regimes",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 25 },
spotlight: { target: "canvas", pane: "bot", xRatio: 0.83, yRatio: 0.86, label: "Thermodynamic Regime Color Coding (M1 Gold / M2 Crimson / M3 Sky)" },
subtitle: "The bottom pane color-codes 20d relative volume by objective thermodynamic state: Gold (<0.45x) = M1 Stagnation (137), Crimson (>=2.5x or <=-5%) = M2 Flash-Crash Surge (193), Sky-Blue = M3 Leviathan.",
citations: [
{ label: "Vol 05A PDF (Subclass M1)", href: "/encyclopedia/05-memetic-superclass-and-emergent-m7/m1-vampiric-entropic-and-anti-productive-a-to-m.pdf#page=1&search=M1" },
{ label: "Vol 05C PDF (M2-M6)", href: "/encyclopedia/05-memetic-superclass-and-emergent-m7/m2-to-m6-kinetic-leviathan-mimetic-oracle-abyssal-a-to-z.pdf#page=1&search=M2" }
]
}
]
},
{
id: "ep03",
code: "Ep 03",
title: "Panels 2 & 3: The 24x30 Lock Heatmap, TradingView & Deep Citations",
keyframes: [
{
title: "3.1 Panel 2: 24x30 Heatmap & Explicit 'No Data Available' Handling (ANTHR-PVT & Weekends)",
state: { guildFilter: "ALL", selectedSymbol: "ANTHR-PVT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 17 },
spotlight: { target: "panel2", xRatio: 0.50, yRatio: 0.40, label: "Zero Synthetic Data: ANTHR-PVT & Closed Market Days Show 'No data available'" },
subtitle: "This workbench never synthesizes or interpolates missing market data. Because Anthropic (ANTHR-PVT) is a private entity with no public exchange feed (and US stock markets close on weekends and Thanksgiving), those cells explicitly state 'No data available'.",
citations: [
{ label: "Vol 06A PDF (Anchor Revision)", href: "/encyclopedia/06-genealogical-vectors-and-quantitative-repricing/a-to-m-attractors-to-multi-build-flex-singularities.pdf#page=1&search=193" },
{ label: "Dossier 66 (193 Flash Crash)", href: "/zoology/dossiers/66-dossier-technocapital-singularity-flash-crash-liquidity.md#:~:text=193" },
{ label: "Graph Hub aq:193", href: "/graph/index.html?select=aq:193" }
]
},
{
title: "3.2 TradingView Superchart Launcher (Shortcut: T)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel3", xRatio: 0.85, yRatio: 0.12, label: "Open TradingView Chart ↗ (Zero External Script Embeds)" },
subtitle: "Every ticker resolves deterministically to EXCHANGE:SYMBOL (e.g. NASDAQ:NVDA, closing at $150.49 on 2026-11-27). Clicking 'TradingView ↗' or pressing 'T' opens the live Superchart in a new window while keeping 0 external scripts embedded.",
citations: [
{ label: "Launch TradingView (NASDAQ:NVDA)", href: "https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" },
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=1&search=TradingView" }
]
},
{
title: "3.3 Panel 3: Knowledge-Graph-Modeled Documentation & Cited Passages Card",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Passage-Encoded PDF (#page & search) + Dossier (#:~:text=) Links" },
subtitle: "Modeled directly on the Knowledge Graph's inspector drawer, the Documentation Card links every ticker to its exact Encyclopedia PDF page (#page=N&search=...), Dossier passage (#:~:text=...), and Graph node (?select=aq:N).",
citations: [
{ label: "Vol 03C PDF (#page=5&search=envideea)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=5&search=envideea" },
{ label: "Graph Deep Link (?select=aq:137)", href: "/graph/index.html?select=aq:137" },
{ label: "REST API Highlight (/api/v1/dossiers/67?highlight=137)", href: "/api/v1/dossiers/67?highlight=137" }
]
},
{
title: "3.4 Panel 3: Verbatim Dated Memetic Equation Tape & Inline Passage Preview",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
spotlight: { target: "wireTape", xRatio: 0.50, yRatio: 0.50, label: "Dated 333 / 666 / 777 Equations with Scroll-to-Text Deep Links" },
subtitle: "Every equation in the Dated Wire Tape includes a WICG scroll-to-text link (#:~:text=...), a Knowledge Graph coordinate link, and an inline REST passage preview button.",
citations: [
{ label: "Dossier 71 Scroll-to-Text", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
{ label: "REST Dossier 71 JSON", href: "/api/v1/dossiers/71?highlight=333" }
]
},
{
title: "3.5 Bidirectional Graph & Dossier Cross-Verification",
state: { guildFilter: "ALL", selectedSymbol: "COIN", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 27 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Cross-Corpus Coordinate Verification" },
subtitle: "Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand drawer.",
citations: [
{ label: "Graph Node aq:211", href: "/graph/index.html?select=aq:211" },
{ label: "Dossier 68 (S6 Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" }
]
}
]
},
{
id: "ep04",
code: "Ep 04",
title: "Hot-Swapping Projection Lenses (LENS_REGISTRY Reversibility)",
keyframes: [
{
title: "4.1 Lens 1: Neutral Mathematical Substrate (neutral_math)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Pure Lens-Neutral Keys (struct_* & ts_*)" },
subtitle: "Under the hood, quant-timeseries.json stores 100% lens-neutral mathematical keys (struct_isometric_armor, ts_duty_cycle_pct, ts_weighted_resonance, ts_excess_over_replacement, ts_optimal_lag_days).",
citations: [
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" },
{ label: "Vol 08A PDF (Stakeholder Registers)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/a-to-h-ai-powered-race-to-hidden-chokepoint-screen.pdf#page=1&search=Register" }
]
},
{
title: "4.2 Lens 2: Out-of-Sample Quantitative Factor Register (fund_manager)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fund Manager Register: Signal Duty Cycle & Alpha Over Benchmark" },
subtitle: "Switching to 'Quant Factor (fund_manager)' translates the exact same 6 numbers into institutional factor terminology (Chokepoint Moat, Signal Duty Cycle %, Composite Resonance Load).",
citations: [
{ label: "Fund Manager Proposal (PDF)", href: "/zoology/proposal-fund-manager-novel-investment-discovery.pdf#page=1&search=Uncaptured" },
{ label: "REST Tier List (fund_manager)", href: "/api/v1/zoology/tier-list?register=fund_manager" }
]
},
{
title: "4.3 Lens 3: Corporate Board & Supply-Chain Governance (corporate_board)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Corporate Board Register: Supply-Chain Moat & Stress-Test Delta" },
subtitle: "Switching to 'Corporate Board' frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
citations: [
{ label: "Corporate Board Proposal (PDF)", href: "/zoology/proposal-corporate-board-technocapital-allocation.pdf#page=1&search=Moat" },
{ label: "REST Tier List (corporate_board)", href: "/api/v1/zoology/tier-list?register=corporate_board" }
]
},
{
title: "4.4 Lens 4 & 5: TierZoo Ecology (ETI) & Fantasy Sabermetrics (SNAP% / WOPR / WAR)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fantasy_sabermetrics", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fantasy Sabermetrics: SNAP%, WOPR, WAR (30d) & Matchup Splits" },
subtitle: "Switching to 'Fantasy Sabermetrics' projects SNAP% (Active Lock Share), WOPR (1.5x Target Share + 0.7x Air-Yards Share), and WAR (30d Wins Above Tier D Replacement).",
citations: [
{ label: "ETI Tier List Scorecard (PDF)", href: "/zoology/tier-list-technocapital-assemblage-builds.pdf#page=1&search=ETI" },
{ label: "Vol 07A PDF (ETI Ontology)", href: "/encyclopedia/07-ecological-trophic-index-and-tier-list/a-to-z-arm-chokepoint-armor-to-zoological-tie-breaker.pdf#page=1&search=ETI" }
]
},
{
title: "4.5 Lens 6: Gen IV Pokédex Field-Scanner (DEX #137)",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "pokedex_scanner", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Gen IV Pokédex Scanner: DEX #137, Nature, Ability & EV Yield" },
subtitle: "Switching to 'Pokédex Scanner' deterministically derives Gen IV attributes (DEX #137, Nature, Passive Ability, EV Yield) from the real time-series moments—and remains 100% removable via ENABLED_LENSES.",
citations: [
{ label: "REST Pokédex Endpoint (/api/v1/zoology/pokedex/NVDA)", href: "/api/v1/zoology/pokedex/NVDA" },
{ label: "Vol 08B PDF (Pokédex Semiotics)", href: "/encyclopedia/08-stakeholder-registers-idioms-and-pokedex-semiotics/i-to-z-idiosyncratic-prime-screen-to-united-fidelity.pdf#page=1&search=Pokedex" }
]
}
]
},
{
id: "ep05",
code: "Ep 05",
title: "Panel 4: Lead-Lag Cross-Correlation r(tau), Exports & REST APIs",
keyframes: [
{
title: "5.1 Panel 4: Lead-Lag Cross-Correlation Curve r(tau) across [-5 .. +5] Days",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.50, yRatio: 0.45, label: "Pearson Cross-Correlation r(tau) & Gold Optimal Causal Lag tau*" },
subtitle: "Panel 4 computes the empirical Pearson cross-correlation r(tau) between daily 00:00 GMT news-wire equation velocity M_t and unsigned basis-point displacement |Δbps_{i, t+tau}| across lags tau in [-5, +5] days.",
citations: [
{ label: "Operator's Manual (Panel 4 Math)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=2&search=Correlation" },
{ label: "Graph Mode 2 Concentric Radar", href: "/graph/index.html?select=aq:137&mode=mode2_radar" }
]
},
{
title: "5.2 Interpreting Optimal Causal Lag tau* (Leader vs. Synchronizer vs. Follower)",
state: { guildFilter: "ALL", selectedSymbol: "ASML", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.58, yRatio: 0.45, label: "Gold Bar Marks argmax |r(tau)|" },
subtitle: "The Gold bar highlights tau* = argmax |r(tau)|: tau* > 0 indicates a Teleoplexic Wire Leader (midnight wire velocity leads market volatility), tau* = 0 an Instantaneous Synchronizer, and tau* < 0 a Narrative Follower.",
citations: [
{ label: "Vol 03C PDF (ASML)", href: "/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf#page=1&search=ASML" },
{ label: "Graph Node aq:81", href: "/graph/index.html?select=aq:81" }
]
},
{
title: "5.3 Portable .CSV & Lens-Neutral .JSON Slice Exports",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "panel4", xRatio: 0.82, yRatio: 0.14, label: "One-Click .CSV & Lens-Neutral .JSON Export" },
subtitle: "Click 'Export Filtered Series (.CSV)' or 'Export Lens-Neutral Slice (.JSON)' in the Panel 4 header to download any ticker's 30-day periodic bar table and structural/time-series vectors for offline research.",
citations: [
{ label: "Raw Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" }
]
},
{
title: "5.4 Unified Stateless REST API v1 (/api/v1/*) & OpenAPI 3.1.0",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Programmatic REST API v1 & OpenAPI 3.1.0" },
subtitle: "Every readout on /quant/ is also queryable over HTTP GET/POST via /api/v1/quant/timeseries, /api/v1/quant/instruments/{symbol}, /api/v1/dossiers/{number}?highlight=..., and /api/v1/openapi.json.",
citations: [
{ label: "OpenAPI 3.1.0 Spec (/api/v1/openapi.json)", href: "/api/v1/openapi.json" },
{ label: "REST Status (/api/v1/status)", href: "/api/v1/status" },
{ label: "REST NVDA Instrument", href: "/api/v1/quant/instruments/NVDA" }
]
},
{
title: "5.5 Complete Tour Summary & Companion Operator's Manual",
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.25, label: "Tour Complete — Explore Any Ticker, Lens, or Deep Citation" },
subtitle: "You have completed all 5 episodes of the /quant/ guided walkthrough. Open the Companion Operator's Manual (PDF) or click any heatmap cell, lens, or deep citation link to continue exploring.",
citations: [
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" },
{ label: "Interactive Knowledge Graph (/graph/)", href: "/graph/index.html?select=aq:137" },
{ label: "Self-Paced Learning Track (/learn/)", href: "/learn/index.html" }
]
}
]
}
];
function adaptHrefForFileProtocol(href) {
if (!href || window.location.protocol !== "file:") return href;
if (href.startsWith("https://")) return href;
if (href.startsWith("/encyclopedia/")) {
return "../../../technocapital-singularity-zoology/encyclopedia/" + href.slice("/encyclopedia/".length);
}
if (href.startsWith("/zoology/")) {
return "../../../technocapital-singularity-zoology/" + href.slice("/zoology/".length);
}
if (href.startsWith("/archive/")) {
return "../../../ingglish-hyperdope-gematria/ingglish-aq-archive/" + href.slice("/archive/".length);
}
if (href.startsWith("/graph/")) {
return "../../../encyclopedia-knowledge-graph/" + href.slice("/graph/".length);
}
if (href.startsWith("/learn/")) {
return "../learn/" + href.slice("/learn/".length);
}
if (href.startsWith("/quant/")) {
return "./" + href.slice("/quant/".length);
}
if (href.startsWith("/schemas/")) {
return "../../schemas/" + href.slice("/schemas/".length);
}
if (href.startsWith("/api/v1/quant/")) {
return "./quant-timeseries.json";
}
if (href.startsWith("/api/v1/zoology/tier-list")) {
return "../../../technocapital-singularity-zoology/taxonomy/assemblage-builds-tier-list.json";
}
if (href.startsWith("/api/v1/dossiers/")) {
return "../../../ingglish-hyperdope-gematria/ingglish-aq-archive/71-dossier-news-2026-11-29.md";
}
return href;
}
let curEpIdx = 0;
let curStepIdx = 0;
let isPlaying = false;
let playTimer = null;
let speechEnabled = true; // Enabled by default so tour playback narrates immediately
let cachedVoices = [];
let audioCtx = null;
function refreshVoices() {
if (typeof window.speechSynthesis === "undefined") return;
try {
cachedVoices = window.speechSynthesis.getVoices() || [];
} catch (_) {
cachedVoices = [];
}
}
if (typeof window.speechSynthesis !== "undefined") {
refreshVoices();
if (typeof window.speechSynthesis.onvoiceschanged !== "undefined") {
window.speechSynthesis.onvoiceschanged = refreshVoices;
}
}
function playWebAudioTelemetryChime(stepIdx) {
try {
const Ctx = window.AudioContext || window.webkitAudioContext;
if (!Ctx) return;
if (!audioCtx) audioCtx = new Ctx();
if (audioCtx.state === "suspended") audioCtx.resume();
const baseFreqs = [292.0, 333.0, 394.0, 444.0, 528.0];
const f0 = baseFreqs[stepIdx % baseFreqs.length];
const now = audioCtx.currentTime;
[f0, f0 * 1.25, f0 * 1.5].forEach(function (freq, i) {
const osc = audioCtx.createOscillator();
const gain = audioCtx.createGain();
osc.type = i === 0 ? "triangle" : "sine";
osc.frequency.setValueAtTime(freq, now + i * 0.09);
gain.gain.setValueAtTime(0.001, now + i * 0.09);
gain.gain.exponentialRampToValueAtTime(0.06, now + i * 0.09 + 0.03);
gain.gain.exponentialRampToValueAtTime(0.0001, now + i * 0.09 + 0.45);
osc.connect(gain);
gain.connect(audioCtx.destination);
osc.start(now + i * 0.09);
osc.stop(now + i * 0.09 + 0.48);
});
} catch (_) {}
}
function scheduleNextStep(delayMs) {
if (playTimer) clearTimeout(playTimer);
if (!isPlaying) return;
playTimer = setTimeout(function () {
if (isPlaying) stepNext();
}, delayMs);
}
function speakSubtitle(text, onDoneCallback) {
if (!speechEnabled) {
if (onDoneCallback) scheduleNextStep(7000);
return;
}
// Always play a subtle harmonic telemetry cue at scene start so audio feedback is immediate even if OS TTS voices are absent
playWebAudioTelemetryChime(curStepIdx);
refreshVoices();
if (typeof window.speechSynthesis === "undefined" || cachedVoices.length === 0) {
if (onDoneCallback) scheduleNextStep(7500);
return;
}
try {
window.speechSynthesis.cancel();
window.speechSynthesis.resume();
setTimeout(function () {
if (!speechEnabled) return;
const u = new SpeechSynthesisUtterance(text);
const preferred = cachedVoices.find(function (v) {
return /en(-|_)(US|GB)/i.test(v.lang) && /natural|neural|google|english/i.test(v.name);
}) || cachedVoices.find(function (v) {
return /^en/i.test(v.lang);
}) || cachedVoices[0];
if (preferred) u.voice = preferred;
u.rate = 1.03;
u.pitch = 1.0;
u.volume = 1.0;
let settled = false;
const finish = function () {
if (settled) return;
settled = true;
if (onDoneCallback && isPlaying) {
scheduleNextStep(1800);
}
};
u.onend = finish;
u.onerror = finish;
window.speechSynthesis.speak(u);
// Safety fallback timer in case browser TTS engine stalls without firing onend
const estMs = Math.max(8500, Math.min(20000, text.split(/\s+/).length * 420));
if (onDoneCallback && isPlaying) {
scheduleNextStep(estMs);
}
}, 60);
} catch (_) {
if (onDoneCallback) scheduleNextStep(7500);
}
}
function getActiveKeyframe() {
const ep = EPISODES[curEpIdx] || EPISODES[0];
return ep.keyframes[curStepIdx] || ep.keyframes[0];
}
function highlightDomTarget(targetId) {
["heatmapTable", "lensProjectionCard", "docReferencesCard", "wireEqTape", "lagBarsContainer"].forEach(function (id) {
const el = document.getElementById(id);
if (el) el.style.boxShadow = "";
});
const map = {
panel2: "heatmapTable",
lensCard: "lensProjectionCard",
docCard: "docReferencesCard",
wireTape: "wireEqTape",
panel4: "lagBarsContainer"
};
const domId = map[targetId];
if (domId) {
const el = document.getElementById(domId);
if (el) {
el.style.boxShadow = "0 0 0 2px #f5c630, 0 0 18px rgba(245, 198, 48, 0.35)";
}
}
}
function applyCurrentKeyframe(narrateNow) {
const kf = getActiveKeyframe();
const app = window.HyperstitionStudio.QuantWorkbenchApp;
if (app && typeof app.setStateAndRender === "function") {
app.setStateAndRender(kf.state, kf.spotlight);
}
highlightDomTarget(kf.spotlight && kf.spotlight.target);
renderTutorialUI();
if (narrateNow || isPlaying) {
speakSubtitle(kf.subtitle, isPlaying);
}
}
function stepNext() {
const ep = EPISODES[curEpIdx];
if (curStepIdx < ep.keyframes.length - 1) {
curStepIdx++;
} else if (curEpIdx < EPISODES.length - 1) {
curEpIdx++;
curStepIdx = 0;
} else {
stopPlayback();
return;
}
applyCurrentKeyframe(true);
}
function stepPrev() {
if (curStepIdx > 0) {
curStepIdx--;
} else if (curEpIdx > 0) {
curEpIdx--;
curStepIdx = EPISODES[curEpIdx].keyframes.length - 1;
}
applyCurrentKeyframe(true);
}
function startPlayback() {
isPlaying = true;
if (playTimer) clearTimeout(playTimer);
applyCurrentKeyframe(true);
renderTutorialUI();
}
function stopPlayback() {
isPlaying = false;
if (playTimer) {
clearTimeout(playTimer);
playTimer = null;
}
if (typeof window.speechSynthesis !== "undefined") {
try { window.speechSynthesis.cancel(); } catch (_) {}
}
renderTutorialUI();
}
function renderTutorialUI() {
const epTabs = document.getElementById("tutEpisodeTabs");
const stepBadge = document.getElementById("tutStepBadge");
const scrubber = document.getElementById("tutScrubber");
const playBtn = document.getElementById("tutPlayPauseBtn");
const speechBtn = document.getElementById("tutSpeechBtn");
const titleEl = document.getElementById("tutKeyframeTitle");
const subEl = document.getElementById("tutSubtitleText");
const citesEl = document.getElementById("tutCitationPills");
if (!epTabs) return;
const ep = EPISODES[curEpIdx];
const kf = getActiveKeyframe();
epTabs.innerHTML = EPISODES.map(function (e, idx) {
const cls = "pill" + (idx === curEpIdx ? " active" : "");
return "<button type='button' class='" + cls + "' data-ep-idx='" + idx + "'>" + e.code + ": " + e.title + "</button>";
}).join("");
epTabs.querySelectorAll("[data-ep-idx]").forEach(function (b) {
b.onclick = function () {
curEpIdx = parseInt(b.getAttribute("data-ep-idx"), 10);
curStepIdx = 0;
applyCurrentKeyframe(speechEnabled);
};
});
if (playBtn) {
playBtn.textContent = isPlaying ? "\u23F8 Pause Tour" : "\u25B6 Play Guided Tour";
playBtn.className = isPlaying ? "btn tv-btn" : "btn primary";
}
if (speechBtn) {
speechBtn.textContent = speechEnabled ? "\uD83D\uDD0A Voice: ON" : "\uD83D\uDD07 Voice: OFF";
speechBtn.className = speechEnabled ? "btn primary" : "btn";
}
if (stepBadge) {
stepBadge.textContent = ep.code + " \u2022 Scene " + (curStepIdx + 1) + "/" + ep.keyframes.length;
}
if (scrubber) {
scrubber.max = String(ep.keyframes.length - 1);
scrubber.value = String(curStepIdx);
}
if (titleEl) {
titleEl.textContent = kf.title;
}
if (subEl) {
subEl.textContent = kf.subtitle;
}
if (citesEl) {
citesEl.innerHTML = (kf.citations || []).map(function (c) {
const resolved = adaptHrefForFileProtocol(c.href);
return "<a class='pill tut-cite-link' data-raw-href='" + c.href + "' style='text-decoration:none;color:var(--cyan);border-color:var(--cyan);' href='" +
resolved + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDCC4 " + c.label + " \u2197</a>";
}).join("");
}
}
function initTutorials() {
const playBtn = document.getElementById("tutPlayPauseBtn");
const prevBtn = document.getElementById("tutPrevBtn");
const nextBtn = document.getElementById("tutNextBtn");
const clearBtn = document.getElementById("tutClearSpotlightBtn");
const speechBtn = document.getElementById("tutSpeechBtn");
const scrubber = document.getElementById("tutScrubber");
if (playBtn) {
playBtn.onclick = function () {
if (isPlaying) stopPlayback();
else startPlayback();
};
}
if (prevBtn) prevBtn.onclick = function () { stopPlayback(); stepPrev(); };
if (nextBtn) nextBtn.onclick = function () { stopPlayback(); stepNext(); };
if (clearBtn) {
clearBtn.onclick = function () {
stopPlayback();
highlightDomTarget(null);
const app = window.HyperstitionStudio.QuantWorkbenchApp;
if (app && typeof app.setStateAndRender === "function") {
app.setStateAndRender({}, null);
}
};
}
if (speechBtn) {
speechBtn.onclick = function () {
speechEnabled = !speechEnabled;
if (speechEnabled) speakSubtitle(getActiveKeyframe().subtitle, isPlaying);
else if (typeof window.speechSynthesis !== "undefined") {
try { window.speechSynthesis.cancel(); } catch (_) {}
}
renderTutorialUI();
};
}
if (scrubber) {
scrubber.oninput = function () {
stopPlayback();
curStepIdx = parseInt(scrubber.value, 10) || 0;
applyCurrentKeyframe(speechEnabled);
};
}
renderTutorialUI();
}
window.HyperstitionStudio.QuantTutorials = {
version: "2.0.24",
episodes: EPISODES,
adaptHrefForFileProtocol: adaptHrefForFileProtocol,
init: initTutorials
};
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initTutorials);
} else {
initTutorials();
}
})();
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,3 +1,3 @@
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v1.2.0)."""
__version__ = "1.2.0"
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.0.24)."""
__version__ = "2.0.24"
NAMESPACE_URN = "urn:io:hyperstitionstud"
+22
View File
@@ -57,11 +57,27 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
fb_path = Path(__file__).resolve().parent.parent / "phonetics" / "cmudict_fallback.json"
fb_count = len(json.loads(fb_path.read_text(encoding="utf-8"))) if fb_path.is_file() else 0
lr_path = cfg.core_dir / "deploy" / "logrotate.d" / "hyperstition-sqlite-meta"
lr_txt = lr_path.read_text(encoding="utf-8") if lr_path.is_file() else ""
lr_ok = (
lr_path.is_file()
and "/var/lib/hyperstitionstud.io/api-telemetry.db" in lr_txt
and "/tmp/" not in lr_txt
and "size 100M" in lr_txt
and "compress" in lr_txt
and "nocompress" not in lr_txt
and "rotate 0" not in lr_txt
and "--truncate-quiescent" in lr_txt
and "--compress-archive" in lr_txt
and "prerotate" in lr_txt
)
all_ok = (
pkgs.get("Pillow") is not None
and all(dirs_ok.values())
and all(v["matches_baseline"] for v in isolation_checks.values())
and fb_count >= 190
and lr_ok
)
return {
@@ -74,6 +90,12 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
"truetype_fonts": fonts_resolved,
"workspace_directories": dirs_ok,
"offline_cmudict_fallback_entries": fb_count,
"sqlite_logrotate_config": {
"path": str(lr_path),
"exists": lr_path.is_file(),
"default_size_limit": "100M",
"quiescent_truncation_configured": lr_ok,
},
"citation_path_mounts": cfg.citation_path_mounts,
"isolation_locks": isolation_checks,
}
+41
View File
@@ -0,0 +1,41 @@
"""
hyperstitionstud_io.db — Standalone SQLite + FTS5 Catalog & REST/MCP Telemetry Database Engine.
"""
from __future__ import annotations
from hyperstitionstud_io.db.sqlite_meta import (
DEFAULT_MAX_TELEMETRY_BYTES,
DEFAULT_MAX_TELEMETRY_MB,
build_catalog_sqlite_db,
ensure_catalog_sqlite_db,
get_api_telemetry_summary,
get_default_catalog_db_path,
get_default_telemetry_db_path,
parse_size_spec_bytes,
query_coordinate_join,
query_fts_catalog,
query_registry_manifests,
query_timeseries_bars,
record_api_telemetry,
run_logrotate_directive,
truncate_telemetry_db_quiescent,
)
__all__ = [
"DEFAULT_MAX_TELEMETRY_BYTES",
"DEFAULT_MAX_TELEMETRY_MB",
"build_catalog_sqlite_db",
"ensure_catalog_sqlite_db",
"get_api_telemetry_summary",
"get_default_catalog_db_path",
"get_default_telemetry_db_path",
"parse_size_spec_bytes",
"query_coordinate_join",
"query_fts_catalog",
"query_registry_manifests",
"query_timeseries_bars",
"record_api_telemetry",
"run_logrotate_directive",
"truncate_telemetry_db_quiescent",
]
File diff suppressed because it is too large. Load diff
+90
View File
@@ -0,0 +1,90 @@
"""
hyperstitionstud_io.ipld — Canonical IPLD dag-json (multicodec 0x0129) Encoder, CIDv1 Generator
& Zero-Drift Pretty-Print / dag-json Atomic Writer.
"""
from __future__ import annotations
import base64
import hashlib
import json
import os
from pathlib import Path
from typing import Any
# CIDv1 (0x01) + dag-json multicodec (0x0129 -> varint 0xa9 0x02) + sha2-256 (0x12) + 32-byte length (0x20)
_CIDV1_DAG_JSON_SHA256_PREFIX = bytes([0x01, 0xA9, 0x02, 0x12, 0x20])
def encode_dag_json(obj: Any) -> bytes:
"""Serialize a Python data structure to canonical IPLD dag-json UTF-8 bytes."""
return json.dumps(
obj,
sort_keys=True,
separators=(",", ":"),
ensure_ascii=False,
allow_nan=False,
).encode("utf-8")
def compute_dag_json_sha256(obj: Any) -> str:
"""Return the lowercase hex SHA-256 digest of the canonical dag-json byte representation."""
return hashlib.sha256(encode_dag_json(obj)).hexdigest()
def compute_dag_json_cidv1(obj: Any) -> str:
"""Compute the multibase Base32lower CIDv1 ('baguqeera...') for an object encoded as dag-json (0x0129)."""
raw_bytes = encode_dag_json(obj)
digest = hashlib.sha256(raw_bytes).digest()
cid_bytes = _CIDV1_DAG_JSON_SHA256_PREFIX + digest
b32 = base64.b32encode(cid_bytes).decode("ascii").lower().rstrip("=")
return "b" + b32
def make_ipld_link(cid_str: str) -> dict[str, str]:
"""Return an IPLD dag-json Link object {'/': '<cid>'}."""
return {"/": cid_str}
def inspect_dag_json_payload(obj: Any) -> dict[str, Any]:
raw = encode_dag_json(obj)
sha = hashlib.sha256(raw).hexdigest()
cid = compute_dag_json_cidv1(obj)
return {
"codec": "dag-json",
"multicodec_hex": "0x0129",
"canonical_bytes": len(raw),
"sha256": sha,
"cidv1": cid,
"ipld_link": {"/": cid},
}
def write_pretty_and_dag_json(
pretty_path: str | Path,
obj: Any,
dag_sidecar_path: str | Path | None = None,
) -> dict[str, Any]:
"""
Atomically write both a human-readable pretty-printed JSON file (indent=2) and (optionally)
its canonical IPLD dag-json sidecar from the same validated canonical representation,
guaranteeing zero drift between the two files.
"""
p_pretty = Path(pretty_path).resolve()
p_pretty.parent.mkdir(parents=True, exist_ok=True)
dag_bytes = encode_dag_json(obj)
canonical_obj = json.loads(dag_bytes.decode("utf-8"))
pretty_bytes = (json.dumps(canonical_obj, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
tmp_pretty = p_pretty.with_suffix(p_pretty.suffix + f".tmp.{os.getpid()}")
tmp_pretty.write_bytes(pretty_bytes)
os.replace(tmp_pretty, p_pretty)
if dag_sidecar_path is not None:
p_dag = Path(dag_sidecar_path).resolve()
p_dag.parent.mkdir(parents=True, exist_ok=True)
tmp_dag = p_dag.with_suffix(p_dag.suffix + f".tmp.{os.getpid()}")
tmp_dag.write_bytes(dag_bytes + b"\n")
os.replace(tmp_dag, p_dag)
return inspect_dag_json_payload(canonical_obj)
+399
View File
@@ -0,0 +1,399 @@
"""
hyperstitionstud_io.lenses — Declarative Lens-Neutral Mathematical Substrate & Hot-Swappable Projection Registry (`LENS_REGISTRY`).
Projects the 6 canonical structural combine invariants (`struct_*`) and 6 longitudinal time-series
moments (`ts_*`) into interchangeable domain registers without coupling core time-series schemas or
calculators to any specific metaphor.
"""
from __future__ import annotations
from typing import Any
DEFAULT_LENS = "fund_manager"
ENABLED_LENSES: tuple[str, ...] = (
"fund_manager",
"neutral_math",
"corporate_board",
"tierzoo_ecology",
"fantasy_sabermetrics",
"pokedex_scanner",
)
# 12 Canonical Lens-Neutral Mathematical Keys:
# Structural Combine (6):
# 1. struct_isometric_armor (G4 Isometric Chokepoint Ratio, 0-100)
# 2. struct_drift_velocity (G3 Inverse Phonemic Drift & Quantized Steps, 0-100)
# 3. struct_variance_collapse (G1 Log Gen 0 -> Gen 1 Variance Collapse, 0-100)
# 4. struct_trophic_capture (S[1-5]xS6 Double-Articulation & Cross-Guild Degree, 0-100)
# 5. struct_prime_density (G5 Prime & Twin-Prime Mutation Density, 0-100)
# 6. struct_repricing_resilience (Tri-Modal Repricing & State-Gate Closure, 0-100)
# Longitudinal Time-Series Moments (6):
# 7. ts_duty_cycle_pct (Pr[X_t > 0] Active Lock/Wire Duty Cycle %)
# 8. ts_weighted_resonance (1.5*Wire_Share + 0.7*Vol_Weighted_Lock_Share, 0-100)
# 9. ts_excess_over_replacement (Value Over Baseline Tier D Replacement)
# 10. ts_quantile_profile ({p20_floor, p90_ceiling, boom_pct, bust_pct, cv})
# 11. ts_optimal_lag_days (Peak Cross-Correlation Lead-Lag tau* in [-5..+5] days)
# 12. ts_regime_splits (Conditional Regime Delta {M1, M2, M3})
LENS_REGISTRY: dict[str, dict[str, Any]] = {
"neutral_math": {
"lens_id": "neutral_math",
"title": "Neutral Mathematical & Statistical Invariants",
"short_label": "Neutral Math",
"structural_labels": {
"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)",
"struct_drift_velocity": "G3 Inverse Phonemic Drift",
"struct_variance_collapse": "G1 Log Variance Collapse",
"struct_trophic_capture": "Bipartite S×S6 Coupling Degree",
"struct_prime_density": "G5 Prime & Twin-Prime Density",
"struct_repricing_resilience": "Repricing Counter-Swap Closure",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)",
"ts_weighted_resonance": "Weighted Resonance Index (0-100)",
"ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)",
"ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)",
"ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)",
"ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ",
},
"tier_bands": [
(88, "Q1+ (Top Decile Attractor)"),
(80, "Q1 (High-Coupling Hub)"),
(72, "Q2 (State-Gated Subsystem)"),
(60, "Q3 (Uncoupled Specialist)"),
(52, "Q4 (Provisional Cluster)"),
(44, "Q5 (Episodic Point Anchor)"),
(0, "Null / Rejected"),
],
},
"fund_manager": {
"lens_id": "fund_manager",
"title": "Quantitative Hedge Fund & Factor Risk",
"short_label": "Quant Factor",
"structural_labels": {
"struct_isometric_armor": "Chokepoint Moat",
"struct_drift_velocity": "Signal Velocity",
"struct_variance_collapse": "Convergence Power",
"struct_trophic_capture": "Institutional Coupling",
"struct_prime_density": "Idiosyncratic Asymmetry",
"struct_repricing_resilience": "Regime Robustness",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)",
"ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)",
"ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark",
"ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV",
"ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)",
"ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)",
},
"tier_bands": [
(88, "Core Overweight (Apex Conviction)"),
(80, "Structural Overweight (Keystone Moat)"),
(72, "Tactical Regime Hedge (Counter-Cyclical)"),
(60, "Uncaptured Venture Alpha (Pre-Institutional)"),
(52, "Early Theme Watchlist (Seed Nucleation)"),
(44, "Event-Driven Flyer (Single Catalyst)"),
(0, "Underweight / Filtered"),
],
},
"corporate_board": {
"lens_id": "corporate_board",
"title": "Corporate Strategy & Balance-Sheet Governance",
"short_label": "Corporate Board",
"structural_labels": {
"struct_isometric_armor": "Supply-Chain Moat",
"struct_drift_velocity": "Execution Agility",
"struct_variance_collapse": "Cross-Unit Synergy",
"struct_trophic_capture": "Governance & Balance-Sheet Integration",
"struct_prime_density": "Proprietary IP Density",
"struct_repricing_resilience": "Stress-Test Resilience",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "Operational Utilization Cadence (%)",
"ts_weighted_resonance": "Strategic Capital Share (0-100)",
"ts_excess_over_replacement": "Net Economic Value Added (EVA)",
"ts_quantile_profile": "Base-Case Floor / Upside Case / Variance",
"ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)",
"ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)",
},
"tier_bands": [
(88, "Tier 1 Core Operating Platform"),
(80, "Tier 1 Strategic Infrastructure"),
(72, "Tier 2 Defensive Balance-Sheet Buffer"),
(60, "Tier 2 R&D Business Unit"),
(52, "Tier 3 Exploratory Incubator"),
(44, "Tier 4 Contractual Contingency"),
(0, "Non-Core / Divest"),
],
},
"tierzoo_ecology": {
"lens_id": "tierzoo_ecology",
"title": "TierZoo Ecological Trophic Index (ETI)",
"short_label": "TierZoo (ETI)",
"structural_labels": {
"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)",
"struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)",
"struct_variance_collapse": "COL (G1 Variance-Collapse Compression)",
"struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)",
"struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)",
"struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)",
"ts_weighted_resonance": "Trophic Dominance Rating (0-100)",
"ts_excess_over_replacement": "Apex Surplus Over Extinction Floor",
"ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV",
"ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)",
"ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)",
},
"tier_bands": [
(88, "Tier S+ (Apex Predator)"),
(80, "Tier S (Keystone Guild)"),
(72, "Tier A (Symbiont Lock)"),
(60, "Tier B (Nomad Specialist)"),
(52, "Tier C (Nucleation Stub)"),
(44, "Tier D (Episodic Anchor)"),
(0, "Tier F (Extinct / CI-Rejected)"),
],
},
"fantasy_sabermetrics": {
"lens_id": "fantasy_sabermetrics",
"title": "Fantasy Football & Sabermetric Roster Engine",
"short_label": "Fantasy Sabermetrics",
"structural_labels": {
"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)",
"struct_drift_velocity": "Breakaway Speed (Open-Field Velocity)",
"struct_variance_collapse": "Stack Power (Multi-Asset Correlation)",
"struct_trophic_capture": "Front-Office Cap Reach",
"struct_prime_density": "Playbook IQ (Audible Density)",
"struct_repricing_resilience": "All-Weather Durability",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "SNAP% (Active Wire & Lock Snap Share)",
"ts_weighted_resonance": "WOPR (Weighted Opportunity & Resonance)",
"ts_excess_over_replacement": "WAR_30d (Wins Above Waiver Replacement)",
"ts_quantile_profile": "Floor P20 / Ceiling P90 / Boom% Profile",
"ts_optimal_lag_days": "Pace & Leverage Lead-Lag τ* (Days)",
"ts_regime_splits": "Weather & SOS Matchup Split (M1/M2/M3)",
},
"tier_bands": [
(88, "Tier S+ (Matchup-Proof Franchise Starter)"),
(80, "Tier S (Every-Week Pro-Bowl Trench/Cap)"),
(72, "Tier A (Situational Bad-Weather Defense)"),
(60, "Tier B (High-Upside Bench Flex)"),
(52, "Tier C (Practice-Squad / Dynasty Stash)"),
(44, "Tier D (Waiver-Wire Streaming Flyer)"),
(0, "Tier F (Cut List / IR)"),
],
},
"pokedex_scanner": {
"lens_id": "pokedex_scanner",
"title": "Gen IV INFO Pokédex Field Scanner",
"short_label": "Pokédex Scanner",
"structural_labels": {
"struct_isometric_armor": "Base DEF (Isometric Shield)",
"struct_drift_velocity": "Base SPE (Teleoplexic Speed)",
"struct_variance_collapse": "Base ATK (Variance-Collapse Strike)",
"struct_trophic_capture": "Base HP (Apparatus Mass)",
"struct_prime_density": "Base SPA (Special Prime Resonance)",
"struct_repricing_resilience": "Base SPD (Repricing Ward)",
},
"timeseries_labels": {
"ts_duty_cycle_pct": "Wild Encounter Rate (%) & Route Biome",
"ts_weighted_resonance": "Specimen Combat Level (Lv. 1-100)",
"ts_excess_over_replacement": "Effort Value (EV) Yield (+1..+3 Stats)",
"ts_quantile_profile": "Specimen Nature (+10% Boost / -10% Cut)",
"ts_optimal_lag_days": "Move Priority Bracket (Lead-Lag τ*)",
"ts_regime_splits": "Passive Weather/Terrain Ability Trigger",
},
"tier_bands": [
(88, "Stage 3 (Apex Mythical / Box-Art Legendary)"),
(80, "Stage 3 (Keystone Pseudo-Legendary)"),
(72, "Stage 2 (Weather-Gated Specialist)"),
(60, "Stage 2 (Uncaptured Roaming Nomad)"),
(52, "Stage 1 (Confirmed Run-2 Nucleation)"),
(44, "Stage 1 (Wild Tall-Grass Pre-Evolution)"),
(0, "Fossil / Unhatched Egg"),
],
},
}
def resolve_tier_band(score: float, lens_id: str) -> str:
spec = LENS_REGISTRY.get(lens_id, LENS_REGISTRY[DEFAULT_LENS])
for cutoff, label in spec["tier_bands"]:
if score >= cutoff:
return str(label)
return str(spec["tier_bands"][-1][1])
def classify_qualitative_archetype(
structural_vector: dict[str, float],
timeseries_moments: dict[str, Any],
lens_id: str,
) -> dict[str, str | None]:
"""
Deterministically map lens-neutral structural + time-series moments into qualitative
archetype tags, roles, and abilities under the requested lens.
Returns `None` (`null` in JSON) when time-series data is unavailable.
"""
if timeseries_moments.get("ts_duty_cycle_pct") is None:
return {
"archetype": None,
"causal_role": None,
"regime_specialization": None,
}
qp = timeseries_moments.get("ts_quantile_profile") or {}
p20 = float(qp["p20_floor"]) if qp.get("p20_floor") is not None else 0.0
p90 = float(qp["p90_ceiling"]) if qp.get("p90_ceiling") is not None else 0.0
cv = float(qp["cv"]) if qp.get("cv") is not None else 0.5
duty = float(timeseries_moments["ts_duty_cycle_pct"])
lag_raw = timeseries_moments.get("ts_optimal_lag_days")
lag = int(lag_raw) if lag_raw is not None else 0
splits = timeseries_moments.get("ts_regime_splits") or {}
m1_split = float(splits["M1_ENTROPIC"]) if splits.get("M1_ENTROPIC") is not None else -999.0
m2_split = float(splits["M2_FLASH_CRASH"]) if splits.get("M2_FLASH_CRASH") is not None else -999.0
m3_split = float(splits["M3_LEVIATHAN"]) if splits.get("M3_LEVIATHAN") is not None else -999.0
if m1_split >= max(m2_split, m3_split) and m1_split > 3.0:
peak_regime = "M1_ENTROPIC"
elif m2_split >= m3_split and m2_split > 3.0:
peak_regime = "M2_FLASH_CRASH"
else:
peak_regime = "M3_LEVIATHAN"
if lens_id == "neutral_math":
dist_class = (
"High-Floor Low-CV Stationary Attractor"
if (p20 >= 65.0 and cv < 0.48)
else ("Right-Skewed Impulse Process" if cv >= 0.70 else "Balanced Ergodic Process")
)
lag_class = f"Lead τ*={lag:+d}d (Wire->Market)" if lag > 0 else (f"Lag τ*={lag:+d}d (Market->Wire)" if lag < 0 else "Synchronous τ*=0d")
return {
"archetype": dist_class,
"causal_role": lag_class,
"regime_specialization": f"Peak Conditional Gain in {peak_regime}",
}
if lens_id == "fund_manager":
arch = (
"Core Compounding Moat (High-Floor / Low-Beta)"
if (p20 >= 65.0 and cv < 0.48)
else ("Convex Tail-Surge Alpha" if (p90 >= 82.0 and cv >= 0.65) else "Balanced Multi-Factor Core")
)
lag_role = "Pre-Price Signal Leader" if lag > 0 else ("Synchronous Tape Confirm" if lag == 0 else "Post-Repricing Momentum")
reg_note = {
"M1_ENTROPIC": "Counter-Cyclical Halt / Stagnation Hedge (+Beta in M1)",
"M2_FLASH_CRASH": "Long-Volatility Gamma Scalper (+Beta in M2)",
"M3_LEVIATHAN": "Mega-Cap Balance-Sheet Compounder (+Beta in M3)",
}[peak_regime]
return {"archetype": arch, "causal_role": lag_role, "regime_specialization": reg_note}
if lens_id == "corporate_board":
arch = (
"Mission-Critical Chokepoint Infrastructure"
if p20 >= 65.0
else ("High-Growth Strategic Initiative" if p90 >= 80.0 else "Modular Operating Unit")
)
lag_role = "Leading Strategic Indicator" if lag >= 0 else "Downstream Accounting Reflection"
reg_note = {
"M1_ENTROPIC": "Supply-Chain Continuity & Halt Buffer",
"M2_FLASH_CRASH": "Liquidity Treasury Shock Absorber",
"M3_LEVIATHAN": "Consortium & Cap-Table Consolidation Engine",
}[peak_regime]
return {"archetype": arch, "causal_role": lag_role, "regime_specialization": reg_note}
if lens_id == "tierzoo_ecology":
arch = (
"Apex Generalist (All-Biome Dominance)"
if (p20 >= 68.0 and p90 >= 85.0)
else ("Armored Trench Keystone" if cv < 0.48 else "Opportunistic Burst Predator")
)
lag_role = "Teleoplexic Carrier-Wave Leader" if lag > 0 else ("Phase-Locked Synchronizer" if lag == 0 else "Detritivore Capture Follower")
reg_note = {
"M1_ENTROPIC": "Vampiric Siphon (Thrives in Entropic Stagnation)",
"M2_FLASH_CRASH": "Templex Swarm Fever (Thrives in Volatility Surges)",
"M3_LEVIATHAN": "Leviathan Gravity (Thrives in Trillion-Cap Capture)",
}[peak_regime]
return {"archetype": arch, "causal_role": lag_role, "regime_specialization": reg_note}
if lens_id == "fantasy_sabermetrics":
if p20 >= 68.0 and p90 >= 85.0:
arch = "Matchup-Proof League-Winner (Every-Down Bellcow)"
elif p20 >= 64.0 and cv < 0.48:
arch = "Ironclad Cash-Game Floor Anchor (OL/Blocker)"
elif p90 >= 80.0 and cv >= 0.62:
arch = "Boom/Bust Tournament Week-Winner (Deep Threat)"
elif duty >= 45.0:
arch = "Multi-Position Flex Pivot"
else:
arch = "Priority Waiver-Wire Breakout Stash"
lag_role = f"Play-Caller Audible Leader ({lag:+d}d)" if lag > 0 else ("Snap-Count Synchronizer (0d)" if lag == 0 else f"Garbage-Time Catch-Up ({lag:+d}d)")
reg_note = {
"M1_ENTROPIC": "Bad-Weather / Supply-Halt Defense Boost (+14 ETI in M1)",
"M2_FLASH_CRASH": "Two-Minute Drill Shootout Boost (+12 ETI in M2)",
"M3_LEVIATHAN": "Front-Office Cap-Space Multiplier (M3)",
}[peak_regime]
return {"archetype": arch, "causal_role": lag_role, "regime_specialization": reg_note}
# Default / pokedex_scanner
arm = float(structural_vector.get("struct_isometric_armor", 70))
vel = float(structural_vector.get("struct_drift_velocity", 70))
col = float(structural_vector.get("struct_variance_collapse", 70))
cap = float(structural_vector.get("struct_trophic_capture", 70))
if vel >= arm and lag > 0:
nature = "Timid (+SPE / -DEF • Teleoplexic Acceleration)"
elif arm > vel and cv < 0.48:
nature = "Relaxed (+DEF / -SPE • Isometric Trench Shield)"
elif col >= 88 and m2_split > 0:
nature = "Rash (+ATK / -SPD • Templex Surge Striker)"
elif cap >= 90:
nature = "Quiet (+HP / -SPE • Sovereign Apparatus Accumulator)"
else:
nature = "Modest (+SPA / -ATK • Prime Harmonic Resonator)"
ability = {
"M1_ENTROPIC": "Supply-Halt Pivot (Converts M1 Freeze into +DEF)",
"M2_FLASH_CRASH": "Templex Surge (Doubles Lock Rate in M2 Volatility)",
"M3_LEVIATHAN": "Apparatus Gravity (Pulls S1-S3 Partners into S6 Ring)",
}[peak_regime]
ev_yield = "+2 SPA, +1 DEF" if arm >= 85 else ("+2 HP, +1 ATK" if cap >= 85 else "+2 SPE, +1 ATK")
return {"archetype": nature, "causal_role": ev_yield, "regime_specialization": ability}
def apply_lens(
structural_vector: dict[str, float],
timeseries_moments: dict[str, Any],
composite_score: float,
lens_id: str = DEFAULT_LENS,
) -> dict[str, Any]:
spec = LENS_REGISTRY.get(lens_id, LENS_REGISTRY[DEFAULT_LENS])
qual = classify_qualitative_archetype(structural_vector, timeseries_moments, spec["lens_id"])
return {
"lens_id": spec["lens_id"],
"lens_title": spec["title"],
"short_label": spec["short_label"],
"tier_classification": resolve_tier_band(composite_score, spec["lens_id"]),
"qualitative_profile": qual,
"labeled_structural": {
spec["structural_labels"][k]: v for k, v in structural_vector.items() if k in spec["structural_labels"]
},
"labeled_timeseries": {
spec["timeseries_labels"][k]: v for k, v in timeseries_moments.items() if k in spec["timeseries_labels"]
},
}
def apply_all_lenses(
structural_vector: dict[str, float],
timeseries_moments: dict[str, Any],
composite_score: float,
enabled_lenses: tuple[str, ...] | list[str] = ENABLED_LENSES,
) -> dict[str, dict[str, Any]]:
return {
lid: apply_lens(structural_vector, timeseries_moments, composite_score, lid)
for lid in enabled_lenses
if lid in LENS_REGISTRY
}
+8
View File
@@ -0,0 +1,8 @@
"""
hyperstitionstud_io.mcp — Model Context Protocol (MCP) Server for hyperstitionstud.io.
Supports MCP 2025-03-26 & 2024-11-05 over both stdio and stateless Streamable HTTP (/mcp).
"""
from hyperstitionstud_io.mcp.server import dispatch_jsonrpc, main
__all__ = ["dispatch_jsonrpc", "main"]
+90
View File
@@ -0,0 +1,90 @@
"""
hyperstitionstud_io.mcp.prompts — Guided Workflow Prompts for MCP Clients.
"""
from __future__ import annotations
from typing import Any
MCP_PROMPTS: list[dict[str, Any]] = [
{
"name": "analyze_headline_zoology",
"description": "Extract tokens from a news headline or financial event, evaluate Gen 0 -> Gen 1 Ingglish AQ locks, check Two-Gate M1-M7+ activation, and synthesize a zero-padding Technocapital Singularity analysis.",
"arguments": [
{"name": "headline", "description": "Headline or event description to analyze.", "required": True},
],
},
{
"name": "draft_stakeholder_proposal_section",
"description": "Draft an evidence-grounded section for a Fund Manager, Corporate Board, or Fantasy Roster stakeholder using native register metrics and verified citation ledger IDs.",
"arguments": [
{"name": "audience", "description": "Target register: fund_manager, corporate_board, or fantasy_football.", "required": True},
{"name": "focus_guild", "description": "Target guild/build, e.g. S1, S2, S3, S6, M1, or M7+.", "required": False},
],
},
{
"name": "trace_knowledge_graph_bridge",
"description": "Trace how two concepts, specimens, or guilds connect across the 13 Multi-Build Flex Singularities and 333/666/777 attractors in the Encyclopedia Knowledge Graph.",
"arguments": [
{"name": "start_query", "description": "Starting node query (e.g. 'Blackwell' or '125').", "required": True},
{"name": "target_query", "description": "Target node query (e.g. 'Anthropic' or 'S6').", "required": True},
],
},
{
"name": "pokedex_field_scanner_card",
"description": "Format a Technocapital Singularity specimen or emergent M7+ coordinate hub as a Gen IV INFO Pokedex field-scanner card.",
"arguments": [
{"name": "specimen_or_coord", "description": "Specimen name or integer AQ coordinate (e.g. '129' or 'M7+').", "required": True},
],
},
]
def get_mcp_prompt(name: str, arguments: dict[str, Any] | None = None) -> dict[str, Any]:
args = arguments or {}
if name == "analyze_headline_zoology":
hl = args.get("headline", "<headline>")
text = (
f"Analyze the following headline under the Technocapital Singularity Zoology framework:\n"
f"Headline: \"{hl}\"\n\n"
"Step 1: Call `hs_evaluate_aq_and_ingglish` and `hs_classify_singularity` on the core nouns, verbs, and entities in the headline.\n"
"Step 2: Check for G1 Variance-Collapse Triads (Gen 0 dispersion -> Gen 1 exact equivalence), G2 Cross-Gen Twins, and G4 Isometric Chokepoints (Δ = 0).\n"
"Step 3: Check whether both Machinic Phylum (S1-S5) and Apparatus of Capture (S6) are co-present (Double Articulation), and unlock an M1-M6 memetic subclass ONLY if the headline's observable thermodynamic state matches.\n"
"Step 4: Call `hs_search_archive_equations` to ground the analysis in verified 333/666/777 equations with 0.0% generic padding."
)
elif name == "draft_stakeholder_proposal_section":
aud = args.get("audience", "fund_manager")
fg = args.get("focus_guild", "all")
text = (
f"Draft a stakeholder analysis section for audience='{aud}' focusing on build='{fg}':\n"
f"Step 1: Call `hs_inspect_eti_tier_list` with `register='{aud}'` and `build_filter='{fg}'`.\n"
"Step 2: Omit French philosophical jargon (Deleuze, Guattari, Body without Organs, Schizoanalysis) and cite only concrete tech/finance nouns from each equivalence ring (e.g. synthetic data == asset management = 292, capital == capture = 125, ASML == asset = 81, TSMC == loss = 91).\n"
"Step 3: Ground all claims with inline [n] citations verified via `hs_verify_grounded_citations`."
)
elif name == "trace_knowledge_graph_bridge":
s_q = args.get("start_query", "125")
t_q = args.get("target_query", "193")
text = (
f"Trace the topological bridge between '{s_q}' and '{t_q}' in the Encyclopedia Knowledge Graph:\n"
f"Step 1: Call `hs_query_knowledge_graph` for '{s_q}' and for '{t_q}'.\n"
"Step 2: Identify shared AQCoordinateHub nodes, 13-Flex Pivots (292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 96, 95, 91/81), and 333/666/777 repdigit attractors connecting their 1-hop ego networks."
)
elif name == "pokedex_field_scanner_card":
spec = args.get("specimen_or_coord", "129")
text = (
f"Synthesize a Gen IV INFO Pokedex field-scanner card for '{spec}':\n"
f"Step 1: Call `hs_query_knowledge_graph` with `query='{spec}'` and `hs_inspect_eti_tier_list`.\n"
"Step 2: Output the Pokedex header (Dex #, Taxon Class S1-S6 / M1-M7+, ETI Tier S+..D), the 6-stat telemetry bar (ARM, VEL, COL, CAP, PRM, RES), the G1 Variance-Collapse equation, and the 3-line field scanner entry."
)
else:
raise ValueError(f"Unknown MCP prompt: {name}")
return {
"description": f"Guided prompt for {name}",
"messages": [
{
"role": "user",
"content": {"type": "text", "text": text},
}
],
}
+134
View File
@@ -0,0 +1,134 @@
"""
hyperstitionstud_io.mcp.resources — Static & Template URN Resources for MCP Clients.
"""
from __future__ import annotations
import json
import re
from typing import Any
from hyperstitionstud_io.config import load_workspace_config
STATIC_RESOURCES: list[dict[str, str]] = [
{
"uri": "urn:io:hyperstitionstud:resource:glossary-registry",
"name": "Comprehensive Glossary & Bilingual Ledger (v1.6.0, 282 Entries)",
"mimeType": "application/json",
"description": "Canonical 282-entry Glossary & 190-specimen Bilingual Vocabulary Ledger.",
},
{
"uri": "urn:io:hyperstitionstud:resource:encyclopedia-manifest",
"name": "22-Volume PDF Encyclopedia Manifest (v1.7.0, 122 Pages)",
"mimeType": "application/json",
"description": "Manifest of the 9 Ontological Divisions (00-08) and 22 Alphabetized PDF Volumes.",
},
{
"uri": "urn:io:hyperstitionstud:resource:eti-tier-list",
"name": "Assemblage Builds Ecological Trophic Index (ETI v2.0.0) Tier List",
"mimeType": "application/json",
"description": "9 Taxon Assemblage Builds ranked S+ to D/F across 6 zoological base stats.",
},
{
"uri": "urn:io:hyperstitionstud:resource:singularity-matrix",
"name": "Technocapital Singularity Zoology Matrix (S1-S6)",
"mimeType": "application/json",
"description": "Six-Class Landian-Deleuzean Singularity Taxonomy and signature coordinate rings.",
},
{
"uri": "urn:io:hyperstitionstud:resource:memetic-registry",
"name": "State-Gated Memetic Superclass Registry (M1-M6 & Emergent M7+)",
"mimeType": "application/json",
"description": "Two-Gate state-matched memetic subclasses and M7_candidate_2026_11_28 nucleation telemetry.",
},
{
"uri": "urn:io:hyperstitionstud:resource:quantitative-anchors",
"name": "Quantitative Economic Anchors Registry",
"mimeType": "application/json",
"description": "Registered quantitative anchors ($6B Lazarus heist, $83 Anthropic IPO, 481 halted factories).",
},
{
"uri": "urn:io:hyperstitionstud:resource:knowledge-graph-summary",
"name": "Encyclopedia Knowledge Graph Summary (388 Nodes, 1,282 Edges)",
"mimeType": "application/json",
"description": "Node/edge ontology counts, top 15 AQ coordinate hubs by degree, and SHA-256 isolation receipt.",
},
]
RESOURCE_TEMPLATES: list[dict[str, str]] = [
{
"uriTemplate": "urn:io:hyperstitionstud:dossier:{dossier_number}",
"name": "Canonical Archive or Zoology Dossier by Number (01..71)",
"mimeType": "text/markdown",
"description": "Read the full Markdown text and verified 333/666/777 equations of Dossier {dossier_number} (e.g. 65..71).",
},
{
"uriTemplate": "urn:io:hyperstitionstud:schema:v1:{schema_slug}",
"name": "Workspace Offline URN JSON Schema (v1)",
"mimeType": "application/schema+json",
"description": "Read a v1 JSON Schema contract (e.g. glossary-registry, encyclopedia-graph, learn-progress-state).",
},
]
def read_mcp_resource(uri: str) -> dict[str, Any]:
cfg = load_workspace_config()
static_map = {
"urn:io:hyperstitionstud:resource:glossary-registry": cfg.zoology_dir / "taxonomy" / "glossary-registry.json",
"urn:io:hyperstitionstud:resource:encyclopedia-manifest": cfg.zoology_dir / "encyclopedia" / "encyclopedia-manifest.json",
"urn:io:hyperstitionstud:resource:eti-tier-list": cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json",
"urn:io:hyperstitionstud:resource:singularity-matrix": cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json",
"urn:io:hyperstitionstud:resource:memetic-registry": cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json",
"urn:io:hyperstitionstud:resource:quantitative-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
}
if uri in static_map:
p = static_map[uri]
return {
"contents": [
{"uri": uri, "mimeType": "application/json", "text": p.read_text(encoding="utf-8")}
]
}
if uri == "urn:io:hyperstitionstud:resource:knowledge-graph-summary":
kg = json.loads((cfg.knowledge_graph_dir / "encyclopedia-graph.json").read_text(encoding="utf-8"))
summary = {
"version": kg.get("version"),
"namespace_urn": kg.get("namespace_urn"),
"counts": kg.get("counts"),
"isolation_verified": kg.get("isolation_verified"),
"top_coordinate_hubs_by_degree": kg.get("top_coordinate_hubs_by_degree"),
}
return {
"contents": [
{"uri": uri, "mimeType": "application/json", "text": json.dumps(summary, indent=2)}
]
}
m_dos = re.match(r"^urn:io:hyperstitionstud:dossier:(\d+)$", uri)
if m_dos:
num = int(m_dos.group(1))
prefix = f"{num:02d}-"
for d_dir in (cfg.zoology_dir / "dossiers", cfg.archive_dir / "ingglish-aq-archive"):
if d_dir.is_dir():
matches = sorted(d_dir.glob(f"{prefix}*.md"))
if matches:
return {
"contents": [
{"uri": uri, "mimeType": "text/markdown", "text": matches[0].read_text(encoding="utf-8")}
]
}
raise ValueError(f"No dossier found matching number {num:02d}")
m_sch = re.match(r"^urn:io:hyperstitionstud:schema:v1:([a-z0-9-]+)$", uri)
if m_sch:
slug = m_sch.group(1)
sp = cfg.core_dir / "schemas" / "v1" / f"{slug}.schema.json"
if sp.is_file():
return {
"contents": [
{"uri": uri, "mimeType": "application/schema+json", "text": sp.read_text(encoding="utf-8")}
]
}
raise ValueError(f"Unknown schema slug: {slug}")
raise ValueError(f"Unknown MCP resource URI: {uri}")
+428
View File
@@ -0,0 +1,428 @@
"""
hyperstitionstud_io.mcp.rest — Unified Stateless REST API & OpenAPI 3.1.0 Adapter (`/api/v1/*`).
Exposes all tools in `MCP_TOOLS_SCHEMA`, static resources in `STATIC_RESOURCES`, templates in
`RESOURCE_TEMPLATES`, and guided prompts in `MCP_PROMPTS` over standard HTTP GET/POST REST
endpoints on the existing `hs-mcp` (`127.0.0.1:8095`) server, guarded by `ReadOnlyIsolationGuard`.
"""
from __future__ import annotations
import json
import re
import time
import urllib.parse
from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.db.sqlite_meta import record_api_telemetry
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
from hyperstitionstud_io.mcp.prompts import MCP_PROMPTS, get_mcp_prompt
from hyperstitionstud_io.mcp.resources import (
RESOURCE_TEMPLATES,
STATIC_RESOURCES,
read_mcp_resource,
)
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool
# Domain-specific REST aliases mapped to (tool_name, default_arg_overrides)
REST_DOMAIN_ALIASES: dict[str, str] = {
"/api/v1/doctor": "hs_run_doctor_and_audit",
"/api/v1/ciphers/evaluate": "hs_evaluate_aq_and_ingglish",
"/api/v1/zoology/classify": "hs_classify_singularity",
"/api/v1/zoology/tier-list": "hs_inspect_eti_tier_list",
"/api/v1/zoology/anchor-revision": "hs_simulate_anchor_revision",
"/api/v1/graph/query": "hs_query_knowledge_graph",
"/api/v1/glossary/search": "hs_search_glossary_encyclopedia",
"/api/v1/archive/equations": "hs_search_archive_equations",
"/api/v1/quant/harvest": "hs_scan_financial_quant_harvest",
"/api/v1/quant/timeseries": "hs_inspect_quant_timeseries",
"/api/v1/ipld/cid": "hs_compute_ipld_dag_json_cid",
"/api/v1/citations/verify": "hs_verify_grounded_citations",
}
def _find_tool_schema(tool_name: str) -> dict[str, Any] | None:
for t in MCP_TOOLS_SCHEMA:
if t["name"] == tool_name:
return t
return None
def coerce_query_params(query_str: str, input_schema: dict[str, Any] | None = None) -> tuple[dict[str, Any], bool]:
"""
Parse URL query string and coerce values according to `input_schema["properties"]`.
Returns `(coerced_args, unwrap_raw_flag)`.
"""
parsed = urllib.parse.parse_qs(query_str, keep_blank_values=False)
props = ((input_schema or {}).get("properties") or {})
out: dict[str, Any] = {}
unwrap = False
for k, vals in parsed.items():
if k in ("raw", "unwrap") and vals and vals[-1].lower() in ("1", "true", "yes"):
unwrap = True
continue
p_spec = props.get(k) or {}
p_type = p_spec.get("type", "string")
if p_type == "array":
arr: list[str] = []
for v in vals:
arr.extend(x.strip() for x in v.split(",") if x.strip())
out[k] = arr
elif p_type == "integer":
out[k] = int(vals[-1])
elif p_type == "number":
out[k] = float(vals[-1])
elif p_type == "boolean":
out[k] = vals[-1].lower() in ("1", "true", "yes")
else:
out[k] = vals[-1]
return out, unwrap
def build_openapi_v1_spec() -> dict[str, Any]:
"""
Dynamically compile an OpenAPI 3.1.0 specification from MCP_TOOLS_SCHEMA,
STATIC_RESOURCES, RESOURCE_TEMPLATES, and MCP_PROMPTS.
"""
paths: dict[str, Any] = {
"/api/v1/status": {
"get": {
"operationId": "getStatus",
"summary": "Server status, endpoint directory, and ReadOnlyIsolationGuard verification.",
"responses": {"200": {"description": "OK"}},
}
},
"/api/v1/openapi.json": {
"get": {
"operationId": "getOpenApiSpec",
"summary": "OpenAPI 3.1.0 schema for all REST and MCP capabilities.",
"responses": {"200": {"description": "OK"}},
}
},
"/api/v1/tools": {
"get": {
"operationId": "listTools",
"summary": "List all registered MCP/REST tools and their JSON inputSchemas.",
"responses": {"200": {"description": "OK"}},
}
},
"/api/v1/resources": {
"get": {
"operationId": "listResources",
"summary": "List all static URN resources and URI templates.",
"responses": {"200": {"description": "OK"}},
}
},
"/api/v1/prompts": {
"get": {
"operationId": "listPrompts",
"summary": "List all guided workflow prompt templates.",
"responses": {"200": {"description": "OK"}},
}
},
}
for tool in MCP_TOOLS_SCHEMA:
t_name = tool["name"]
schema = tool.get("inputSchema", {"type": "object"})
op_spec = {
"summary": tool.get("description", ""),
"responses": {"200": {"description": "Successful tool execution"}},
}
paths[f"/api/v1/tools/{t_name}"] = {
"get": {"operationId": f"get_{t_name}", **op_spec},
"post": {
"operationId": f"post_{t_name}",
"requestBody": {"content": {"application/json": {"schema": schema}}},
**op_spec,
},
}
for alias_path, t_name in REST_DOMAIN_ALIASES.items():
tool = _find_tool_schema(t_name) or {}
paths[alias_path] = {
"get": {
"operationId": f"alias_get_{t_name}",
"summary": f"REST alias for {t_name}: {tool.get('description', '')}",
"responses": {"200": {"description": "OK"}},
},
"post": {
"operationId": f"alias_post_{t_name}",
"summary": f"REST alias for {t_name}",
"responses": {"200": {"description": "OK"}},
},
}
return {
"openapi": "3.1.0",
"info": {
"title": "hyperstitionstud.io Unified REST & MCP API",
"version": CURRENT_VERSION,
"description": "Stateless read-only REST API (/api/v1/*) and MCP Streamable HTTP (/mcp) interface.",
},
"servers": [{"url": "/"}],
"paths": paths,
}
def _wrap_response(endpoint: str, data: Any, unwrap: bool = False, tool_name: str | None = None) -> dict[str, Any]:
if unwrap and isinstance(data, dict):
return data
resp: dict[str, Any] = {
"ok": True,
"version": CURRENT_VERSION,
"endpoint": endpoint,
}
if tool_name:
resp["tool"] = tool_name
resp["data"] = data
resp["isolation_verified"] = True
return resp
def _error_response(status: int, code: str, message: str) -> tuple[int, str, dict[str, Any]]:
return (
status,
"application/json; charset=utf-8",
{
"ok": False,
"version": CURRENT_VERSION,
"error": {"code": code, "status": status, "message": message},
},
)
def _normalize_rest_endpoint_pattern(path: str) -> str:
if re.match(r"^/api/v1/graph/nodes/.+$", path):
return "/api/v1/graph/nodes/{node_id}"
if re.match(r"^/api/v1/quant/instruments/[^/]+$", path):
return "/api/v1/quant/instruments/{symbol}"
if re.match(r"^/api/v1/zoology/pokedex/[^/]+$", path):
return "/api/v1/zoology/pokedex/{symbol}"
if re.match(r"^/api/v1/resources/[a-z0-9-]+$", path):
return "/api/v1/resources/{slug}"
if re.match(r"^/api/v1/dossiers/\d+$", path):
return "/api/v1/dossiers/{number}"
if re.match(r"^/api/v1/schemas/[a-z0-9-]+$", path):
return "/api/v1/schemas/{schema_slug}"
if re.match(r"^/api/v1/prompts/[a-z0-9_]+$", path):
return "/api/v1/prompts/{prompt_name}"
return path
def _dispatch_rest_v1_inner(
method: str,
path: str,
query_str: str,
body_bytes: bytes = b"",
) -> tuple[int, str, Any]:
cfg = load_workspace_config()
try:
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
# 1. Discovery & OpenAPI
if path in ("/api/v1", "/api/v1/status") and method == "GET":
_, unwrap = coerce_query_params(query_str)
status_data = {
"name": "hyperstitionstudio-rest-api",
"version": CURRENT_VERSION,
"namespace_urn": f"urn:io:hyperstitionstud:api:v1:{CURRENT_VERSION}",
"protocols": {"rest_v1": "/api/v1", "openapi_3_1": "/api/v1/openapi.json", "mcp_jsonrpc": "/mcp"},
"counts": {
"tools": len(MCP_TOOLS_SCHEMA),
"static_resources": len(STATIC_RESOURCES),
"resource_templates": len(RESOURCE_TEMPLATES),
"prompts": len(MCP_PROMPTS),
"domain_aliases": len(REST_DOMAIN_ALIASES),
},
"domain_endpoints": sorted(REST_DOMAIN_ALIASES.keys()),
"isolation_receipt": guard.audit_receipt(),
}
return 200, "application/json; charset=utf-8", _wrap_response(path, status_data, unwrap=unwrap)
if path == "/api/v1/openapi.json" and method == "GET":
return 200, "application/json; charset=utf-8", build_openapi_v1_spec()
if path == "/api/v1/tools" and method == "GET":
_, unwrap = coerce_query_params(query_str)
return 200, "application/json; charset=utf-8", _wrap_response(path, {"tools": MCP_TOOLS_SCHEMA}, unwrap=unwrap)
if path == "/api/v1/resources" and method == "GET":
_, unwrap = coerce_query_params(query_str)
return 200, "application/json; charset=utf-8", _wrap_response(
path,
{"resources": STATIC_RESOURCES, "resourceTemplates": RESOURCE_TEMPLATES},
unwrap=unwrap,
)
if path == "/api/v1/prompts" and method == "GET":
_, unwrap = coerce_query_params(query_str)
return 200, "application/json; charset=utf-8", _wrap_response(path, {"prompts": MCP_PROMPTS}, unwrap=unwrap)
# 2. Parameterized Path Shorthands:
# - /api/v1/graph/nodes/{node_id}
# - /api/v1/quant/instruments/{symbol}
# - /api/v1/zoology/pokedex/{symbol}
# - /api/v1/resources/{slug}
# - /api/v1/dossiers/{number}
# - /api/v1/schemas/{schema_slug}
# - /api/v1/prompts/{prompt_name}
m_node = re.match(r"^/api/v1/graph/nodes/(.+)$", path)
if m_node and method == "GET":
node_id = urllib.parse.unquote(m_node.group(1))
q_args, unwrap = coerce_query_params(query_str, _find_tool_schema("hs_query_knowledge_graph")["inputSchema"])
q_args["query"] = node_id
res = call_mcp_tool("hs_query_knowledge_graph", q_args)
return 200, "application/json; charset=utf-8", _wrap_response(path, res, unwrap=unwrap, tool_name="hs_query_knowledge_graph")
m_inst = re.match(r"^/api/v1/quant/instruments/([^/]+)$", path)
if m_inst and method == "GET":
sym = urllib.parse.unquote(m_inst.group(1))
q_args, unwrap = coerce_query_params(query_str, _find_tool_schema("hs_scan_financial_quant_harvest")["inputSchema"])
q_args["symbol_filter"] = sym
res = call_mcp_tool("hs_scan_financial_quant_harvest", q_args)
return 200, "application/json; charset=utf-8", _wrap_response(path, res, unwrap=unwrap, tool_name="hs_scan_financial_quant_harvest")
m_pkx = re.match(r"^/api/v1/zoology/pokedex/([^/]+)$", path)
if m_pkx and method == "GET":
sym = urllib.parse.unquote(m_pkx.group(1))
q_args, unwrap = coerce_query_params(query_str, _find_tool_schema("hs_inspect_quant_timeseries")["inputSchema"])
q_args["symbol"] = sym
q_args["lens"] = "pokedex_scanner"
res = call_mcp_tool("hs_inspect_quant_timeseries", q_args)
return 200, "application/json; charset=utf-8", _wrap_response(path, res, unwrap=unwrap, tool_name="hs_inspect_quant_timeseries")
m_res = re.match(r"^/api/v1/resources/([a-z0-9-]+)$", path)
if m_res and method == "GET":
slug = m_res.group(1)
_, unwrap = coerce_query_params(query_str)
uri = f"urn:io:hyperstitionstud:resource:{slug}"
r_out = read_mcp_resource(uri)
parsed_json = json.loads(r_out["contents"][0]["text"])
return 200, "application/json; charset=utf-8", _wrap_response(path, parsed_json, unwrap=unwrap)
m_dos = re.match(r"^/api/v1/dossiers/(\d+)$", path)
if m_dos and method == "GET":
num = int(m_dos.group(1))
q_args, unwrap = coerce_query_params(query_str)
uri = f"urn:io:hyperstitionstud:dossier:{num}"
r_out = read_mcp_resource(uri)
md_text = r_out["contents"][0]["text"]
if q_args.get("format") == "raw":
return 200, "text/markdown; charset=utf-8", md_text
dos_payload: dict[str, Any] = {
"dossier_number": num,
"uri": uri,
"mime_type": "text/markdown",
"markdown": md_text,
}
hl_q = str(q_args.get("highlight", "")).strip()
if hl_q:
hl_low = hl_q.lower()
lines = md_text.splitlines()
matched_passages: list[dict[str, Any]] = []
for l_idx, ln in enumerate(lines):
if hl_low in ln.lower():
start_i = max(0, l_idx - 1)
end_i = min(len(lines), l_idx + 2)
matched_passages.append({
"line_number": l_idx + 1,
"line": ln,
"context": "\n".join(lines[start_i:end_i]),
})
dos_payload["highlight_query"] = hl_q
dos_payload["match_count"] = len(matched_passages)
dos_payload["matched_passages"] = matched_passages[:25]
return 200, "application/json; charset=utf-8", _wrap_response(
path,
dos_payload,
unwrap=unwrap,
)
m_sch = re.match(r"^/api/v1/schemas/([a-z0-9-]+)$", path)
if m_sch and method == "GET":
slug = m_sch.group(1)
uri = f"urn:io:hyperstitionstud:schema:v1:{slug}"
r_out = read_mcp_resource(uri)
return 200, "application/schema+json; charset=utf-8", json.loads(r_out["contents"][0]["text"])
m_prm = re.match(r"^/api/v1/prompts/([a-z0-9_]+)$", path)
if m_prm:
p_name = m_prm.group(1)
p_args, unwrap = coerce_query_params(query_str)
if method == "POST" and body_bytes:
p_args.update(json.loads(body_bytes.decode("utf-8")))
p_out = get_mcp_prompt(p_name, p_args)
return 200, "application/json; charset=utf-8", _wrap_response(path, p_out, unwrap=unwrap)
# 3. Generic /api/v1/tools/{tool_name} or Domain Alias Execution
target_tool: str | None = None
if path in REST_DOMAIN_ALIASES:
target_tool = REST_DOMAIN_ALIASES[path]
else:
m_tool = re.match(r"^/api/v1/tools/([a-z0-9_]+)$", path)
if m_tool:
target_tool = m_tool.group(1)
if target_tool:
t_schema = _find_tool_schema(target_tool)
if t_schema is None:
return _error_response(404, "UNKNOWN_TOOL", f"Unknown tool: {target_tool}")
in_schema = t_schema.get("inputSchema") or {}
t_args, unwrap = coerce_query_params(query_str, in_schema)
if method == "POST" and body_bytes:
body_obj = json.loads(body_bytes.decode("utf-8"))
if isinstance(body_obj, dict):
if body_obj.pop("raw", False) or body_obj.pop("unwrap", False):
unwrap = True
t_args.update(body_obj)
required_fields = in_schema.get("required") or []
missing = [req_f for req_f in required_fields if req_f not in t_args]
if missing:
return _error_response(
422,
"MISSING_REQUIRED_PARAMETER",
f"Missing required parameter(s) {missing} for tool '{target_tool}'.",
)
out = call_mcp_tool(target_tool, t_args)
return 200, "application/json; charset=utf-8", _wrap_response(path, out, unwrap=unwrap, tool_name=target_tool)
return _error_response(404, "ENDPOINT_NOT_FOUND", f"Unknown REST API v1 endpoint: {path}")
except ValueError as exc:
msg = str(exc)
status = 404 if ("Unknown" in msg or "No dossier" in msg) else 422
return _error_response(status, "VALIDATION_ERROR", msg)
except Exception as exc:
return _error_response(500, "INTERNAL_ERROR", str(exc))
def dispatch_rest_v1(
method: str,
raw_path: str,
body_bytes: bytes = b"",
) -> tuple[int, str, Any]:
"""
Dispatch an HTTP GET or POST request under `/api/v1/*` and automatically record
the request metadata and latency in the SQLite REST API metadata database (`api-telemetry.db`).
Returns `(http_status_code, content_type, response_payload_or_text)`.
"""
parsed_url = urllib.parse.urlsplit(raw_path)
path = parsed_url.path.rstrip("/") or "/api/v1"
query_str = parsed_url.query
t0_ns = time.perf_counter_ns()
status, ctype, payload = _dispatch_rest_v1_inner(method, path, query_str, body_bytes)
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
record_api_telemetry(
protocol="rest_v1",
method=method.upper(),
endpoint_pattern=_normalize_rest_endpoint_pattern(path),
status_code=status,
latency_us=elapsed_us,
isolation_ok=True,
)
return status, ctype, payload
+300
View File
@@ -0,0 +1,300 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.mcp.server — Dual-Transport JSON-RPC 2.0 MCP Server (`hs-mcp`).
Supports:
1. `--transport stdio` (default): newline-delimited JSON-RPC 2.0 over stdin/stdout.
2. `--transport http`: stateless Streamable HTTP JSON-RPC 2.0 on `GET /mcp` and `POST /mcp`.
Enforces ReadOnlyIsolationGuard on every tool call so protected upstream registries never mutate.
"""
from __future__ import annotations
import argparse
import json
import sys
import time
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
from typing import Any
_SRC_DIR = Path(__file__).resolve().parents[2]
if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
sys.path.insert(0, str(_SRC_DIR))
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
from hyperstitionstud_io.db.sqlite_meta import record_api_telemetry # noqa: E402
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
from hyperstitionstud_io.mcp.prompts import MCP_PROMPTS, get_mcp_prompt # noqa: E402
from hyperstitionstud_io.mcp.resources import ( # noqa: E402
RESOURCE_TEMPLATES,
STATIC_RESOURCES,
read_mcp_resource,
)
from hyperstitionstud_io.mcp.rest import dispatch_rest_v1 # noqa: E402
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool # noqa: E402
SERVER_INFO = {
"name": "hyperstitionstudio-mcp",
"version": "2.0.24",
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.0.24",
}
def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
"""
Process a single JSON-RPC 2.0 request or notification and return the JSON-RPC 2.0 response
(or None for notifications without an 'id').
"""
method = req.get("method", "")
req_id = req.get("id")
params = req.get("params") or {}
if method.startswith("notifications/"):
return None
t0_ns = time.perf_counter_ns()
rpc_pattern = method
if method == "tools/call":
rpc_pattern = f"tools/call:{params.get('name', '')}"
elif method == "prompts/get":
rpc_pattern = f"prompts/get:{params.get('name', '')}"
status_code = 200
cfg = load_workspace_config()
try:
with ReadOnlyIsolationGuard(cfg.read_only_files):
if method == "initialize":
client_proto = params.get("protocolVersion", "2024-11-05")
proto = client_proto if client_proto in ("2025-03-26", "2024-11-05") else "2024-11-05"
result: dict[str, Any] = {
"protocolVersion": proto,
"capabilities": {
"tools": {"listChanged": False},
"resources": {"subscribe": False, "listChanged": False},
"prompts": {"listChanged": False},
},
"serverInfo": SERVER_INFO,
}
elif method == "ping":
result = {}
elif method == "tools/list":
result = {"tools": MCP_TOOLS_SCHEMA}
elif method == "tools/call":
t_name = str(params.get("name", ""))
t_args = params.get("arguments") or {}
out = call_mcp_tool(t_name, t_args)
result = {
"content": [
{
"type": "text",
"text": json.dumps(out, indent=2, ensure_ascii=False),
}
],
"isError": False,
}
elif method == "resources/list":
result = {"resources": STATIC_RESOURCES}
elif method == "resources/templates/list":
result = {"resourceTemplates": RESOURCE_TEMPLATES}
elif method == "resources/read":
uri = str(params.get("uri", ""))
result = read_mcp_resource(uri)
elif method == "prompts/list":
result = {"prompts": MCP_PROMPTS}
elif method == "prompts/get":
p_name = str(params.get("name", ""))
p_args = params.get("arguments") or {}
result = get_mcp_prompt(p_name, p_args)
else:
status_code = 404
return {
"jsonrpc": "2.0",
"id": req_id,
"error": {"code": -32601, "message": f"Method not found: {method}"},
}
except Exception as exc:
status_code = 422
if method == "tools/call":
return {
"jsonrpc": "2.0",
"id": req_id,
"result": {
"content": [{"type": "text", "text": json.dumps({"error": str(exc)})}],
"isError": True,
},
}
return {
"jsonrpc": "2.0",
"id": req_id,
"error": {"code": -32602, "message": str(exc)},
}
finally:
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
record_api_telemetry(
protocol="mcp_jsonrpc",
method="POST",
endpoint_pattern=rpc_pattern or "unknown",
status_code=status_code,
latency_us=elapsed_us,
isolation_ok=True,
)
return {"jsonrpc": "2.0", "id": req_id, "result": result}
def run_stdio_server() -> int:
for raw_line in sys.stdin:
line = raw_line.strip()
if not line:
continue
try:
req = json.loads(line)
except json.JSONDecodeError as exc:
err_resp = {
"jsonrpc": "2.0",
"id": None,
"error": {"code": -32700, "message": f"Parse error: {exc}"},
}
sys.stdout.write(json.dumps(err_resp) + "\n")
sys.stdout.flush()
continue
resp = dispatch_jsonrpc(req)
if resp is not None:
sys.stdout.write(json.dumps(resp, ensure_ascii=False) + "\n")
sys.stdout.flush()
return 0
class _MCPHTTPHandler(BaseHTTPRequestHandler):
def log_message(self, format: str, *args: Any) -> None:
return
def _send_payload(self, status: int, content_type: str, payload: Any) -> None:
if isinstance(payload, str):
body = payload.encode("utf-8")
else:
body = (json.dumps(payload, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
self.send_response(status)
self.send_header("Content-Type", content_type)
self.send_header("Content-Length", str(len(body)))
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
self.send_header("Access-Control-Allow-Headers", "Content-Type")
self.end_headers()
self.wfile.write(body)
def _send_json(self, status: int, payload: Any) -> None:
self._send_payload(status, "application/json; charset=utf-8", payload)
def do_OPTIONS(self) -> None:
self.send_response(204)
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
self.send_header("Access-Control-Allow-Headers", "Content-Type")
self.end_headers()
def do_GET(self) -> None:
try:
if self.path.startswith("/api/v1"):
status, ctype, payload = dispatch_rest_v1("GET", self.path)
self._send_payload(status, ctype, payload)
return
manifest = {
"serverInfo": SERVER_INFO,
"protocols": ["2025-03-26", "2024-11-05"],
"transport": "streamable-http",
"endpoints": {
"jsonrpc_post": "/mcp",
"manifest_get": "/mcp",
"rest_api_v1": "/api/v1",
"openapi_3_1": "/api/v1/openapi.json",
},
"counts": {
"tools": len(MCP_TOOLS_SCHEMA),
"static_resources": len(STATIC_RESOURCES),
"resource_templates": len(RESOURCE_TEMPLATES),
"prompts": len(MCP_PROMPTS),
},
"tools": [t["name"] for t in MCP_TOOLS_SCHEMA],
"resources": [r["uri"] for r in STATIC_RESOURCES],
"prompts": [p["name"] for p in MCP_PROMPTS],
}
self._send_json(200, manifest)
except Exception as exc:
self._send_json(500, {"ok": False, "error": {"code": "INTERNAL_ERROR", "status": 500, "message": str(exc)}})
# 7. Stateless Read-Only MCP (/mcp) & REST API v1 (/api/v1/*) HTTP Server -> 127.0.0.1:8095
# Note: Do NOT call dispatch_jsonrpc or dispatch_rest_v1 inside do_POST without top-level try/except
def do_POST(self) -> None:
try:
length = int(self.headers.get("Content-Length", "0"))
if length < 0 or length > 65536:
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32600, "message": "Invalid content length"}})
return
raw_bytes = self.rfile.read(length) if length > 0 else b""
if self.path.startswith("/api/v1"):
status, ctype, payload = dispatch_rest_v1("POST", self.path, raw_bytes)
self._send_payload(status, ctype, payload)
return
if not raw_bytes:
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32600, "message": "Invalid content length"}})
return
raw = raw_bytes.decode("utf-8")
try:
req = json.loads(raw)
except json.JSONDecodeError as exc:
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": str(exc)}})
return
resp = dispatch_jsonrpc(req)
if resp is None:
self.send_response(202)
self.end_headers()
return
self._send_json(200, resp)
except Exception as exc:
self._send_json(500, {"ok": False, "error": {"code": "INTERNAL_ERROR", "status": 500, "message": str(exc)}})
def run_http_server(host: str, port: int) -> int:
srv = HTTPServer((host, port), _MCPHTTPHandler)
print(f"[hs-mcp] Serving stateless read-only MCP HTTP endpoint on http://{host}:{port}/mcp", flush=True)
try:
srv.serve_forever()
except KeyboardInterrupt:
pass
finally:
srv.server_close()
return 0
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(prog="hs-mcp", description="Model Context Protocol (MCP) Server for hyperstitionstud.io.")
ap.add_argument("--transport", choices=["stdio", "http"], default="stdio", help="Transport mode (default: stdio).")
ap.add_argument("--host", default="127.0.0.1", help="Bind address for HTTP transport (default: 127.0.0.1).")
ap.add_argument("--port", type=int, default=8095, help="Bind port for HTTP transport (default: 8095).")
ap.add_argument("--dump-manifest", action="store_true", help="Print MCP capability manifest as JSON and exit.")
args = ap.parse_args(argv)
if args.dump_manifest:
print(
json.dumps(
{
"serverInfo": SERVER_INFO,
"tools": MCP_TOOLS_SCHEMA,
"resources": STATIC_RESOURCES,
"resourceTemplates": RESOURCE_TEMPLATES,
"prompts": MCP_PROMPTS,
},
indent=2,
)
)
return 0
if args.transport == "http":
return run_http_server(args.host, args.port)
return run_stdio_server()
if __name__ == "__main__":
raise SystemExit(main())
+511
View File
@@ -0,0 +1,511 @@
"""
hyperstitionstud_io.mcp.tools — 10 Deterministic MCP Tools for the hyperstitionstud.io Ecosystem.
All tools execute strictly in read-only mode inside ReadOnlyIsolationGuard.
"""
from __future__ import annotations
import json
import re
from pathlib import Path
from typing import Any
from hyperstitionstud_io.ci.citation_sources import load_ledger, verify_draft
from hyperstitionstud_io.ci.doctor import run_diagnostics
from hyperstitionstud_io.ciphers import (
compute_aq,
compute_variance,
evaluate_bidirectional_lock,
is_repdigit_37,
prime_rank,
)
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.ipld import inspect_dag_json_payload
from hyperstitionstud_io.phonetics import translate_batch
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest
REGISTER_STAT_LABELS = {
"academic": {
"ARM_chokepoint_armor": "ARM (G4 Isometric Chokepoint Armor)",
"VEL_teleoplexic_velocity": "VEL (Teleoplexic Escape Velocity)",
"COL_variance_collapse": "COL (G1 Variance-Collapse Compression)",
"CAP_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)",
"PRM_prime_mutation_iq": "PRM (Prime & G5 Twin-Prime Mutation IQ)",
"RES_repricing_resilience": "RES (Tri-Modal Repricing & State-Gate Resilience)",
},
"fund_manager": {
"ARM_chokepoint_armor": "Chokepoint Moat",
"VEL_teleoplexic_velocity": "Signal Velocity",
"COL_variance_collapse": "Convergence Power",
"CAP_trophic_capture": "Institutional Coupling",
"PRM_prime_mutation_iq": "Idiosyncratic Asymmetry",
"RES_repricing_resilience": "Regime Robustness",
},
"corporate_board": {
"ARM_chokepoint_armor": "Supply-Chain Moat",
"VEL_teleoplexic_velocity": "Execution Agility",
"COL_variance_collapse": "Cross-Unit Synergy",
"CAP_trophic_capture": "Governance & Balance-Sheet Integration",
"PRM_prime_mutation_iq": "Proprietary IP Density",
"RES_repricing_resilience": "Stress-Test Resilience",
},
"fantasy_football": {
"ARM_chokepoint_armor": "Pass Protection",
"VEL_teleoplexic_velocity": "Breakaway Speed",
"COL_variance_collapse": "Stack Power",
"CAP_trophic_capture": "Front-Office Cap Reach",
"PRM_prime_mutation_iq": "Playbook IQ",
"RES_repricing_resilience": "All-Weather Durability",
},
}
MCP_TOOLS_SCHEMA: list[dict[str, Any]] = [
{
"name": "hs_evaluate_aq_and_ingglish",
"description": "Compute Base-36 Alphanumeric Qabbala (AQ), Gen 0 -> Gen 1 CMUdict Ingglish translation, prime ranks, repdigit status, G1 variance collapse, and 12-field bidirectional locks for a list of terms.",
"inputSchema": {
"type": "object",
"properties": {
"terms": {"type": "array", "items": {"type": "string"}, "description": "English words or phrases to evaluate."},
"quant_mode": {"type": "string", "enum": ["digit", "off", "spoken", "dual"], "default": "digit"},
},
"required": ["terms"],
},
},
{
"name": "hs_classify_singularity",
"description": "Classify terms or a headline into Landian-Deleuzean Singularity Classes S1-S6, check S×S6 Double Articulation, and evaluate Two-Gate state-matched M1-M7+ memetic activation.",
"inputSchema": {
"type": "object",
"properties": {
"terms": {"type": "array", "items": {"type": "string"}},
"headline_text": {"type": "string", "default": ""},
},
"required": ["terms"],
},
},
{
"name": "hs_query_knowledge_graph",
"description": "Query the 388-node, 1,282-edge Encyclopedia Knowledge Graph by node ID (e.g. 'build:S1', 'aq:125', 'spec:blackwell'), headword, Ingglish token, or integer AQ coordinate.",
"inputSchema": {
"type": "object",
"properties": {
"query": {"type": "string"},
"include_neighbors": {"type": "boolean", "default": True},
},
"required": ["query"],
},
},
{
"name": "hs_search_glossary_encyclopedia",
"description": "Search the 282 canonical glossary entries, 190 bilingual lexical specimens, and 22 Encyclopedia volumes by keyword, guild (S1..S6, M1..M7+), or integer AQ value.",
"inputSchema": {
"type": "object",
"properties": {
"query": {"type": "string"},
"guild_filter": {"type": "string", "default": ""},
"limit": {"type": "integer", "default": 15},
},
"required": ["query"],
},
},
{
"name": "hs_inspect_eti_tier_list",
"description": "Return the Ecological Trophic Index (ETI 0-100) Assemblage Builds Tier List (S+ to D/F), 6-stat scorecards, and 13 Multi-Build Flex Singularities in the requested stakeholder register.",
"inputSchema": {
"type": "object",
"properties": {
"build_filter": {"type": "string", "default": "all"},
"register": {"type": "string", "enum": ["academic", "fund_manager", "corporate_board", "fantasy_football"], "default": "academic"},
},
},
},
{
"name": "hs_simulate_anchor_revision",
"description": "Simulate a Quantitative Economic Anchor Revision (Q_old -> Q_new) across digit and spoken modes, detecting Iso-Digital conservation, S1-S6 ring migrations, and 3-path counter-substitutions.",
"inputSchema": {
"type": "object",
"properties": {
"anchor_id": {"type": "string", "description": "Registered anchor ID (e.g. 'lazarus_heist_6b', 'anthropic_ipo_price_83', 'bangladesh_factories_481')."},
"new_digit_str": {"type": "string", "description": "New quantitative figure string, e.g. '$7B' or '841'."},
"new_spoken_eng": {"type": "string", "description": "Spoken English words for the new figure, e.g. 'seven billion'."},
},
"required": ["anchor_id", "new_digit_str", "new_spoken_eng"],
},
},
{
"name": "hs_search_archive_equations",
"description": "Search all 71 verified archive and zoology dossiers for cross-scale (333 / 666 / 777) equations matching a target sum or keyword.",
"inputSchema": {
"type": "object",
"properties": {
"target_sum": {"type": "integer", "description": "Optional target sum (e.g. 333, 666, 777)."},
"keyword": {"type": "string", "default": ""},
"limit": {"type": "integer", "default": 20},
},
},
},
{
"name": "hs_verify_grounded_citations",
"description": "Verify inline [n] citations, Sources block URLs (via local-config path_mounts), and verbatim evidence quotes in a Markdown draft against a citation ledger.",
"inputSchema": {
"type": "object",
"properties": {
"draft_path": {"type": "string"},
"ledger_variant": {"type": "string", "enum": ["common", "english_aq"], "default": "common"},
"require_evidence": {"type": "boolean", "default": True},
},
"required": ["draft_path"],
},
},
{
"name": "hs_compute_ipld_dag_json_cid",
"description": "Serialize a named workspace JSON registry or custom JSON object under the canonical IPLD dag-json (0x0129) codec and compute its SHA-256 digest and Base32 CIDv1 ('baguqeera...').",
"inputSchema": {
"type": "object",
"properties": {
"registry_name": {
"type": "string",
"description": "Optional workspace registry slug: 'glossary-registry', 'encyclopedia-manifest', 'singularity-zoology-matrix', 'memetic-superclass-registry', 'assemblage-builds-tier-list', 'quantitative-economic-anchors', or 'encyclopedia-graph'.",
},
"json_object": {"type": "object", "description": "Optional arbitrary JSON object to encode as dag-json."},
},
},
},
{
"name": "hs_run_doctor_and_audit",
"description": "Run hs-doctor environment/font/CMUdict diagnostics and verify ReadOnlyIsolationGuard SHA-256 locks across the workspace.",
"inputSchema": {
"type": "object",
"properties": {},
},
},
{
"name": "hs_scan_financial_quant_harvest",
"description": "Harvest or evaluate the 24-instrument S1-S6 quantitative financial telemetry watchlist for Scope 1-3 contingent meaning locks, M1-M6 regime triggers, and IPLD dag-json CIDv1 provenance.",
"inputSchema": {
"type": "object",
"properties": {
"harvest_mode": {"type": "string", "enum": ["us-closing-bell", "utc-rollover"], "default": "us-closing-bell"},
"symbol_filter": {"type": "string", "default": "", "description": "Optional ticker symbol filter (e.g. 'NVDA', 'ASML', 'BTC-USD')."},
},
},
},
{
"name": "hs_inspect_quant_timeseries",
"description": "Inspect the lens-neutral periodic quantitative financial & memetic gematria time-series bundle (30 UTC days x 24 S1-S6 tickers x 21 dated news dossiers), TradingView Superchart URLs, and pluggable LENS_REGISTRY projections.",
"inputSchema": {
"type": "object",
"properties": {
"symbol": {"type": "string", "default": "", "description": "Optional ticker symbol or DEX coordinate (e.g. 'NVDA', '137', 'ASML')."},
"lens": {
"type": "string",
"enum": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"],
"default": "fund_manager",
},
},
},
},
]
def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
cfg = load_workspace_config()
if name == "hs_evaluate_aq_and_ingglish":
terms = [str(t) for t in arguments.get("terms", [])]
qmode = arguments.get("quant_mode", "digit")
ing_map = translate_batch(terms)
items = []
for t in terms:
ing = ing_map.get(t, t.lower())
lock = evaluate_bidirectional_lock(t, ing)
if qmode in ("off", "spoken", "dual"):
lock["eng_aq_quant_mode"] = compute_aq(t, quant_mode="off" if qmode == "off" else "spoken")
lock["ing_aq_quant_mode"] = compute_aq(ing, quant_mode="off" if qmode == "off" else "spoken")
lock["is_repdigit_37_ing"] = is_repdigit_37(lock["ing_aq"])
items.append(lock)
gen0_var = compute_variance([x["eng_aq"] for x in items])
gen1_var = compute_variance([x["ing_aq"] for x in items])
return {
"term_count": len(items),
"gen0_written_variance": gen0_var,
"gen1_ingglish_variance": gen1_var,
"variance_collapsed_g1": round(gen0_var - gen1_var, 2),
"exact_gen1_singularity": (len(items) >= 2 and gen1_var == 0.0),
"evaluations": items,
}
if name == "hs_classify_singularity":
terms = [str(t) for t in arguments.get("terms", [])]
headline = str(arguments.get("headline_text", "")).lower()
mat = json.loads((cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json").read_text(encoding="utf-8"))
mem = json.loads((cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json").read_text(encoding="utf-8"))
ing_map = translate_batch(terms)
classified = []
guilds_hit: set[str] = set()
for t in terms:
ing = ing_map.get(t, t.lower())
lock = evaluate_bidirectional_lock(t, ing)
matched_classes = []
for cid, cobj in mat.get("classes", {}).items():
sig_coords = set(cobj.get("signature_coordinates", []))
kw_set = {k.lower() for k in cobj.get("keywords", [])}
if t.lower() in kw_set or lock["ing_aq"] in sig_coords:
matched_classes.append(cid)
guilds_hit.add(cid)
lock["matched_classes"] = matched_classes or ["UNCLASSIFIED"]
classified.append(lock)
machinic_hit = bool(guilds_hit & {"S1", "S2", "S3", "S4", "S5"})
capture_hit = "S6" in guilds_hit
active_memetic = []
for mid, mobj in mem.get("canonical_subclasses", {}).items():
triggers = [tr.lower() for tr in mobj.get("state_gate_triggers", [])]
if any(tr in headline for tr in triggers) or any(any(tr in t.lower() for tr in triggers) for t in terms):
active_memetic.append({"id": mid, "name": mobj.get("name"), "thermodynamic_state": mobj.get("thermodynamic_state")})
return {
"guilds_activated": sorted(guilds_hit),
"double_articulated_s_x_s6": (machinic_hit and capture_hit),
"state_gated_memetic_subclasses": active_memetic,
"classified_terms": classified,
}
if name == "hs_query_knowledge_graph":
q = str(arguments.get("query", "")).strip().lower()
inc_nbr = bool(arguments.get("include_neighbors", True))
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
kg = json.loads(kg_path.read_text(encoding="utf-8"))
matches = []
for n in kg["nodes"]:
if (
n["id"].lower() == q
or q in n["label"].lower()
or q == str(n.get("ing_aq", ""))
or q == str(n.get("aq_value", ""))
or q == (n.get("eng", "") or "").lower()
or q == (n.get("ing", "") or "").lower()
):
matches.append(n)
if not matches:
return {"query": q, "match_count": 0, "matched_node_ids": [], "primary_node": None}
primary = matches[0]
nid = primary["id"]
incident = []
if inc_nbr:
incident = [
{"relation": e["relation"], "source": e["source"], "target": e["target"], "label": e["label"], "weight": e["weight"]}
for e in kg["edges"]
if e["source"] == nid or e["target"] == nid
]
return {
"query": q,
"match_count": len(matches),
"matched_node_ids": [m["id"] for m in matches[:25]],
"primary_node": primary,
"incident_edge_count": len(incident),
"sample_incident_edges": incident[:25],
}
if name == "hs_search_glossary_encyclopedia":
q = str(arguments.get("query", "")).strip().lower()
g_filt = str(arguments.get("guild_filter", "")).strip().upper()
limit = int(arguments.get("limit", 15))
gl = json.loads((cfg.zoology_dir / "taxonomy" / "glossary-registry.json").read_text(encoding="utf-8"))
hits = []
for sec in gl.get("sections", []):
for ent in sec.get("entries", []):
if q in ent["term"].lower() or q in ent["definition"].lower() or q == str(ent.get("ing_aq", "")):
hits.append({"type": "ConceptualEntry", "section": sec["section_title"], **ent})
for ent in gl.get("custom_entries", []):
if q in ent["term"].lower() or q in ent["definition"].lower() or q == str(ent.get("ing_aq", "")):
hits.append({"type": "CustomEntry", "section": "8B", **ent})
for spec in gl.get("bilingual_vocabulary_ledger", []):
if g_filt and g_filt not in spec.get("classes", []):
continue
if (
not q
or q in spec["eng"].lower()
or q in spec["ing"].lower()
or q == str(spec["ing_aq"])
or q == str(spec["eng_aq"])
):
hits.append({"type": "BilingualSpecimen", **spec})
return {"query": q, "guild_filter": g_filt, "total_matches": len(hits), "results": hits[:limit]}
if name == "hs_inspect_eti_tier_list":
b_filt = str(arguments.get("build_filter", "all")).strip().upper()
reg = str(arguments.get("register", "academic")).strip().lower()
tl = json.loads((cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json").read_text(encoding="utf-8"))
labels = REGISTER_STAT_LABELS.get(reg, REGISTER_STAT_LABELS["academic"])
rows = []
for r in tl.get("rows", []):
if b_filt not in ("ALL", "") and b_filt not in r["eval_num"].upper() and b_filt not in r["title"].upper():
continue
translated_stats = {labels.get(k, k): v for k, v in r.get("stats_6", {}).items()}
rows.append({
"rank": r["rank"],
"eval_num": r["eval_num"],
"title": r["title"],
"tier_band": r["tier_Band"],
"eti_score": r["curve_score"],
"roster_slot": r["roster_slot"],
"double_articulated": r["double_articulated"],
"gen0_var_collapsed": r["gen0_var_collapsed"],
"translated_stats_6": translated_stats,
"full_lock1": r["full_lock1"],
"full_lock2": r["full_lock2"],
"trophic_bridges": r["trophic_bridges"],
})
return {
"register": reg,
"build_count": len(rows),
"multi_build_flex_coordinates": [292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 96, 95, 91, 81],
"builds": rows,
}
if name == "hs_simulate_anchor_revision":
aid = str(arguments.get("anchor_id", "")).strip()
new_dig = str(arguments.get("new_digit_str", "")).strip()
new_sp_eng = str(arguments.get("new_spoken_eng", "")).strip()
anc_data = json.loads((cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json").read_text(encoding="utf-8"))
anchor = next((a for a in anc_data.get("anchors", []) if a["anchor_id"] == aid), None)
if anchor is None:
return {"error": f"Unknown anchor_id '{aid}'", "available_anchors": [a["anchor_id"] for a in anc_data.get("anchors", [])]}
old_dig_aq = compute_aq(re.sub(r"[^0-9]", "", anchor["q_digit"]))
new_dig_aq = compute_aq(re.sub(r"[^0-9]", "", new_dig))
old_sp_ing = anchor["q_spoken_ing"]
new_sp_ing = translate_batch([new_sp_eng]).get(new_sp_eng, new_sp_eng.lower())
old_sp_aq = compute_aq(old_sp_ing)
new_sp_aq = compute_aq(new_sp_ing)
d_dig = new_dig_aq - old_dig_aq
d_sp = new_sp_aq - old_sp_aq
return {
"is_simulated": True,
"simulation_warning": "SIMULATED COUNTERFACTUAL ANCHOR REVISION — NOT LIVE MARKET DATA",
"anchor_id": aid,
"entity": anchor["entity"],
"old_digit": {"str": anchor["q_digit"], "aq": old_dig_aq},
"new_digit": {"str": new_dig, "aq": new_dig_aq, "delta_q": d_dig, "iso_digital_conserved": d_dig == 0},
"old_spoken": {"eng": anchor["q_spoken_eng"], "ing": old_sp_ing, "aq": old_sp_aq, "prime_rank": prime_rank(old_sp_aq)},
"new_spoken": {"eng": new_sp_eng, "ing": new_sp_ing, "aq": new_sp_aq, "delta_q": d_sp, "prime_rank": prime_rank(new_sp_aq)},
"counter_substitution_required_delta": {"digit_mode_slot_shift": -d_dig, "spoken_mode_slot_shift": -d_sp},
"quant_free_invariant_equations": anchor.get("quant_free_lexical_equations", []),
}
if name == "hs_search_archive_equations":
t_sum = arguments.get("target_sum")
kw = str(arguments.get("keyword", "")).strip().lower()
limit = int(arguments.get("limit", 20))
eqs = []
for d_dir in (cfg.zoology_dir / "dossiers", cfg.archive_dir / "ingglish-aq-archive"):
if not d_dir.is_dir():
continue
for md_f in sorted(d_dir.glob("*.md")):
txt = md_f.read_text(encoding="utf-8")
for m in re.finditer(r'-\s+`([^`]+)`\s+\("([^"]+)"\)\s+—\s+`([^`]+)=\s*(\d+)`', txt):
ing_s, eng_s, brk_s, val_s = m.group(1).strip(), m.group(2).strip(), m.group(3).strip(), int(m.group(4))
if t_sum is not None and val_s != int(t_sum):
continue
if kw and kw not in ing_s.lower() and kw not in eng_s.lower() and kw not in md_f.name.lower():
continue
eqs.append({"ing": ing_s, "eng": eng_s, "breakdown": brk_s, "target": val_s, "dossier": md_f.name})
if len(eqs) >= limit:
break
if len(eqs) >= limit:
break
return {"match_count": len(eqs), "equations": eqs[:limit]}
if name == "hs_verify_grounded_citations":
dp = Path(str(arguments.get("draft_path", "")))
if not dp.is_absolute():
dp = cfg.zoology_dir / dp
variant = str(arguments.get("ledger_variant", "common"))
req_ev = bool(arguments.get("require_evidence", True))
l_name = "citations-ledger-english-aq.json" if variant == "english_aq" else "citations-ledger-common.json"
l_path = cfg.zoology_dir / "taxonomy" / l_name
sources = load_ledger(l_path)["sources"]
code, errors, warnings = verify_draft(dp, sources, require_evidence=req_ev)
return {
"draft_path": str(dp),
"ledger_path": str(l_path),
"passed": code == 0,
"exit_code": code,
"errors": errors,
"warnings": warnings,
}
if name == "hs_compute_ipld_dag_json_cid":
reg_name = arguments.get("registry_name")
if reg_name:
reg_map = {
"glossary-registry": cfg.zoology_dir / "taxonomy" / "glossary-registry.json",
"encyclopedia-manifest": cfg.zoology_dir / "encyclopedia" / "encyclopedia-manifest.json",
"singularity-zoology-matrix": cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json",
"memetic-superclass-registry": cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json",
"assemblage-builds-tier-list": cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json",
"quantitative-economic-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
"encyclopedia-graph": cfg.knowledge_graph_dir / "encyclopedia-graph.json",
}
p = reg_map.get(str(reg_name))
if p is None or not p.is_file():
return {"error": f"Unknown registry_name '{reg_name}'", "available": sorted(reg_map.keys())}
raw_bytes = p.read_bytes()
obj = json.loads(raw_bytes.decode("utf-8"))
info = inspect_dag_json_payload(obj)
info["registry_name"] = reg_name
info["source_path"] = str(p)
return info
obj = arguments.get("json_object", {})
return inspect_dag_json_payload(obj)
if name == "hs_run_doctor_and_audit":
return run_diagnostics()
if name == "hs_scan_financial_quant_harvest":
h_mode = str(arguments.get("harvest_mode", "us-closing-bell"))
sym_f = str(arguments.get("symbol_filter", "")).strip().upper()
payload = build_financial_quant_harvest(harvest_mode=h_mode)
if sym_f:
payload["instruments"] = [x for x in payload["instruments"] if sym_f in x["symbol"].upper() or sym_f in x["entity_eng"].upper()]
return payload
if name == "hs_inspect_quant_timeseries":
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle
sym_q = str(arguments.get("symbol", "")).strip().upper()
lens_q = str(arguments.get("lens", "fund_manager")).strip()
ts_json_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
if ts_json_path.is_file():
bundle = json.loads(ts_json_path.read_text(encoding="utf-8"))
else:
bundle = build_quant_timeseries_bundle(write_files=False)
if sym_q:
matched = [
inst
for inst in bundle["instruments"]
if inst["symbol"].upper() == sym_q
or inst["entity_eng"].upper() == sym_q
or str(inst["entity_ing_aq"]) == sym_q.lstrip("#DEX ")
]
return {
"version": bundle["version"],
"periodicity_gate": bundle["periodicity_gate"],
"selected_lens": lens_q,
"instruments": matched,
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
}
return {
"version": bundle["version"],
"periodicity_gate": bundle["periodicity_gate"],
"enabled_lenses": bundle["enabled_lenses"],
"dates_utc": bundle["dates_utc"],
"instrument_count": len(bundle["instruments"]),
"builds": bundle["builds"],
"anchor_revision_series": bundle["anchor_revision_series"],
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
}
raise ValueError(f"Unknown MCP tool: {name}")
@@ -60,11 +60,11 @@ def translate_batch(terms: list[str], workdir: str | Path | None = None) -> dict
node_bin = shutil.which("node")
if node_bin and (wdir / "node_modules" / "ingglish").is_dir():
js = (
"import { translateSync } from 'ingglish';\n"
"import { translate } from 'ingglish';\n"
"import fs from 'fs';\n"
"const terms = JSON.parse(fs.readFileSync(0, 'utf8'));\n"
"const out = {};\n"
"for (const t of terms) { out[t] = translateSync(t).toLowerCase(); }\n"
"for (const t of terms) { out[t] = (await translate(t)).toLowerCase(); }\n"
"process.stdout.write(JSON.stringify(out));\n"
)
res = subprocess.run(
@@ -141,6 +141,7 @@
"alpoge": "alpohj",
"amalgam": "amalgam",
"amalgamation": "amalgamayshan",
"amd": "ayemdee",
"americans": "amairakanz",
"americans backs plan": "amairakanz baks plan",
"americans backs time": "amairakanz baks taim",
@@ -380,6 +381,7 @@
"base for rescued": "bays for reskyood",
"base of fishtail": "bays uhv fishtayl",
"base to kuwait": "bays too koowayt",
"basis": "baysas",
"bathroom": "bathroom",
"battle": "batal",
"battle checks the first wife from the prize": "batal cheks dha ferst waif fruhm dha praiz",
@@ -441,6 +443,7 @@
"bill by levent alpoge": "bil bai levant alpohj",
"bill on oath keepers": "bil on ohth keeperz",
"bill on wall street": "bil on wawl street",
"billion": "bilyan",
"binance": "binans",
"binance folds fiber": "binans fohldz faiber",
"binance folds ledger": "binans fohldz lejer",
@@ -453,12 +456,14 @@
"binance splits atom": "binans splits atam",
"binance writes price": "binans raits prais",
"birack": "bairak",
"bitcoin": "bitkoin",
"black": "blak",
"black church across the parasitic manuscript": "blak cherch akraws dha pairasitik manyaskript",
"black liquid in the body": "blak likwad in dha bodee",
"black pyramid into the numeric daniel carter": "blak piramid intoo dha noomairik danyal karter",
"black pyramid into the numeric richard powell": "blak piramid intoo dha noomairik richerd poual",
"black sky arrives the south grid at police": "blak skai eraivz dha south grid at palees",
"blackrock": "blakrok",
"blackwell": "blakwel",
"blackwell locks the gpu": "blakwel loks dha gpu",
"blackwell-drone-capital nexus": "blakwel-drohn-kapatal neksas",
@@ -569,6 +574,7 @@
"brixton": "brikstan",
"brixton gets the junior academy at live run": "brikstan gets dha joonyer akadamee at liv ruhn",
"brixton gets the junior record in hell": "brikstan gets dha joonyer rekerd in hel",
"broadcom": "brawdkom",
"broken": "brohkan",
"broken across the parasitic bathroom": "brohkan akraws dha pairasitik bathroom",
"broken beneath the cellular doppelganger": "brohkan bineeth dha selyaler dopalganger",
@@ -846,6 +852,7 @@
"codes": "kohdz",
"coffin": "kawfin",
"coin": "koin",
"coinbase": "koinbays",
"cold": "kohld",
"collapse": "kalaps",
"collapse from french": "kalaps fruhm french",
@@ -889,6 +896,7 @@
"conspiracy builds the heavy pact at the wide track": "kanspeerasee bildz dha hevee pakt at dha waid trak",
"conspiracy saves the medical lab in the eye": "kanspeerasee sayvz dha medakal lab in dha ai",
"conspiracy seeks the medical dam for the top abyss": "kanspeerasee seeks dha medakal dam for dha top abis",
"constellation": "konstalayshan",
"contest": "kontest",
"contract": "kontrakt",
"contract checks the top way from the key": "kontrakt cheks dha top way fruhm dha kee",
@@ -1307,6 +1315,9 @@
"egypt derails the fatal line in the bridge": "eejapt deeraylz dha faytal lain in dha brij",
"egypt derails the fatal train in dark port": "eejapt deeraylz dha faytal trayn in dark port",
"egypt shakes site": "eejapt shayks sait",
"eight": "ayt",
"eighteen": "ayteen",
"eighty": "aytee",
"eisenkot": "aizengkot",
"eisenkot fills air": "aizengkot filz air",
"eisenkot fines fee": "aizengkot fainz fee",
@@ -1330,6 +1341,9 @@
"election leads loan": "ilekshan leedz lohn",
"election solves fee": "ilekshan solvz fee",
"electric": "ilektrik",
"eleven": "ilevan",
"eli": "eelai",
"eli lilly": "eelai lilee",
"elton": "eltan",
"elton john leads death": "eltan jon leedz deth",
"elton john seizes the new show at sticks": "eltan jon seeziz dha noo shoh at stiks",
@@ -1371,6 +1385,7 @@
"era in investment": "aira in investmant",
"erratic": "eeratik",
"eternal": "iternal",
"ethereum": "edheroom",
"eu-uk": "eu-uk",
"eu-uk joins the bank": "eu-uk joinz dha bangk",
"eu-uk keeps the high world beyond the debut": "eu-uk keeps dha hai werld biond dha daybyoo",
@@ -1490,6 +1505,8 @@
"fifa calls the real source of the system": "fifo kawlz dha reel sors uhv dha sistam",
"fifa keeps the first time to the global system": "fifo keeps dha ferst taim too dha glohbal sistam",
"fifa rules state": "fifo roolz stayt",
"fifteen": "fifteen",
"fifty": "fiftee",
"fight": "fait",
"fight at transport": "fait at transport",
"fights": "faits",
@@ -1527,6 +1544,7 @@
"fishtail": "fishtayl",
"fishtail locks the cold base below snow": "fishtayl loks dha kohld bays biloh snoh",
"fishtail locks the cold camp on the lost flight": "fishtayl loks dha kohld kamp on dha lawst flait",
"five": "faiv",
"flags": "flagz",
"flame": "flaym",
"flamethrower": "flaymethroher",
@@ -1609,10 +1627,12 @@
"forgotten": "fergotan",
"former": "former",
"forms": "formz",
"forty": "fortee",
"foster": "foster",
"foster holds attack": "foster hohldz atak",
"foster offers the six bodies in the three home": "foster awferz dha siks bodeez in dha three hohm",
"four": "for",
"fourteen": "forteen",
"france": "frans",
"france halts flight": "frans hawlts flait",
"france hits the new wave in the dark crash": "frans hits dha noo wayv in dha dark krash",
@@ -2011,6 +2031,7 @@
"hum human salmon": "huhm hyooman saman",
"hum shogun slug": "huhm shohgan sluhg",
"human": "hyooman",
"hundred": "huhndrad",
"hungarian": "hanggaireean",
"hungarian probes the new bank at house": "hanggaireean prohbz dha noo bangk at hous",
"hungarian probes the new probe on high funds": "hanggaireean prohbz dha noo prohb on hai fuhndz",
@@ -2436,6 +2457,7 @@
"lighthouse": "laithous",
"lights": "laits",
"like": "laik",
"lilly": "lilee",
"lindsay": "lindzee",
"lindsay clancy locks the cold ballots on raw grid": "lindzee klansee loks dha kohld balats on ro grid",
"lindsay clancy locks the red data in grid": "lindzee klansee loks dha red dayta in grid",
@@ -2458,6 +2480,7 @@
"loan on upazila": "lohn on yoopazila",
"loan on zelenskyy": "lohn on zelenskiee",
"local": "lohkal",
"lockheed": "lokheed",
"locks": "loks",
"log": "lawg",
"logan": "lohgan",
@@ -2686,6 +2709,7 @@
"minitruck halts the real aid with the wide world": "minitrak hawlts dha reel ayd widh dha waid werld",
"minitruck keeps era": "minitrak keeps aira",
"minitruck rules the clear case in the act": "minitrak roolz dha kleer kays in dha akt",
"minus": "mainas",
"miracle": "meerakal",
"mirror": "meerer",
"mirror across the spectral empty skin": "meerer akraws dha spektral emptee skin",
@@ -2869,8 +2893,10 @@
"nigeria tests bid": "naijeereea tests bid",
"nigeria tests the prime site in the final peace": "naijeereea tests dha praim sait in dha fainal pees",
"night": "nait",
"nine": "nain",
"nineteen": "nainteen",
"nineteen in the breath": "nainteen in dha breth",
"ninety": "naintee",
"niugini": "niyoojeenee",
"niugini backs fee": "niyoojeenee baks fee",
"niugini keeps the safe bill in the short line": "niyoojeenee keeps dha sayf bil in dha short lain",
@@ -2945,6 +2971,7 @@
"oil on mainstream": "oil on maynstreem",
"old": "ohld",
"on": "on",
"one": "wuhn",
"online": "awnlain",
"online cuts the total plan by the field": "awnlain kuhts dha tohtal plan bai dha feeld",
"online marks role": "awnlain marks rohl",
@@ -3013,6 +3040,7 @@
"pakistan sets the global dam to the direct film": "pakistan sets dha glohbal dam too dha derekt film",
"pakistan tests bid": "pakistan tests bid",
"pakistan turns bid": "pakistan ternz bid",
"palantir": "palanter",
"pale": "payl",
"palisades": "palisaydz",
"palisades checks the safe phone in the force": "palisaydz cheks dha sayf fohn in dha fors",
@@ -3184,6 +3212,7 @@
"point": "point",
"point of law runs the fast cup in hard law": "point uhv law ruhnz dha fast kuhp in hard law",
"point of law runs the high law in turf": "point uhv law ruhnz dha hai law in terf",
"points": "points",
"poland": "pohland",
"poland calls the safe fee to the fuel": "pohland kawlz dha sayf fee too dha fyooal",
"poland keeps zone": "pohland keeps zohn",
@@ -3387,6 +3416,7 @@
"rapper marks gamer": "raper marks gaymer",
"rare": "rair",
"raw": "ro",
"raytheon": "raytheeon",
"reaches": "reechaz",
"reader": "reeder",
"reader across the map": "reeder akraws dha map",
@@ -3723,6 +3753,9 @@
"setback": "setbak",
"setback at paraguay": "setbak at pairagway",
"sets": "sets",
"seven": "sevan",
"seventeen": "sevanteen",
"seventy": "sevantee",
"shadow": "shadoh",
"shaft": "shaft",
"shakes": "shayks",
@@ -3812,6 +3845,8 @@
"sites": "saits",
"six": "siks",
"six billion": "siks bilyan",
"sixteen": "siksteen",
"sixty": "sikstee",
"skin": "skin",
"skin across the parasitic empty skin": "skin akraws dha pairasitik emptee skin",
"skin beneath the lamp": "skin bineeth dha lamp",
@@ -3852,6 +3887,7 @@
"sobra marks the show": "sobra marks dha shoh",
"social": "sohshal",
"soil": "soil",
"solana": "sohlana",
"solemn": "solam",
"solves": "solvz",
"somalia": "samoleea",
@@ -4179,6 +4215,7 @@
"teen": "teen",
"teeth": "teeth",
"templex": "tempaleks",
"ten": "ten",
"tenerife": "teneraif",
"tenerife runs the fast cup on post": "teneraif ruhnz dha fast kuhp on pohst",
"tennessee": "tenasee",
@@ -4369,10 +4406,13 @@
"third gunslinger": "therd guhnslinger",
"thirst": "therst",
"thirst locks the debt": "therst loks dha det",
"thirteen": "therteen",
"thirty": "therdee",
"thomas": "tomas",
"thomas markle holds the high world in long case": "tomas markal hohldz dha hai werld in lawng kays",
"thomas markle holds the high world in zoo": "tomas markal hohldz dha hai werld in zoo",
"thought": "thawt",
"thousand": "thouzand",
"threat": "thret",
"three": "three",
"throat": "throht",
@@ -4435,6 +4475,7 @@
"transport halts the wide flight at open grid": "transport hawlts dha waid flait at ohpan grid",
"trap": "trap",
"traps": "traps",
"treasury": "trezheree",
"treaties": "treeteez",
"treaties marks bill": "treeteez marks bil",
"treaties marks the high net with the police": "treeteez marks dha hai net widh dha palees",
@@ -4510,8 +4551,11 @@
"tusk holds game": "tuhsk hohldz gaym",
"tusk saves the direct man in the long power": "tuhsk sayvz dha derekt man in dha lawng pouer",
"tusk tests peace": "tuhsk tests pees",
"twelve": "twelv",
"twenty": "twentee",
"twilight": "twailait",
"twisted": "twistid",
"two": "too",
"typhon": "taifan",
"typhon in digital abyss": "taifan in dijatal abis",
"typhon in red midnight": "taifan in red midnait",
@@ -4649,6 +4693,7 @@
"visions": "vizhanz",
"visit": "vizit",
"visit over meta": "vizit ohver meeta",
"vix": "viks",
"voice": "vois",
"voices": "voisaz",
"voices beyond breath": "voisaz biond breth",
@@ -4877,6 +4922,7 @@
"zeptoverse": "zeptohvers",
"zeptoverse scans the deep code in coin": "zeptohvers skanz dha deep kohd in koin",
"zeptoverse scans the small bank at new code": "zeptohvers skanz dha smawl bangk at noo kohd",
"zero": "zeeroh",
"zombie": "zombee",
"zombie firm": "zombee ferm",
"zombie firm halts the cold tomb in debt": "zombee ferm hawlts dha kohld toom in det",
+33
View File
@@ -0,0 +1,33 @@
"""
hyperstitionstud_io.quant — Periodic Quantitative Financial Telemetry & Contingent Meaning Engine.
"""
from hyperstitionstud_io.quant.collector import (
CANONICAL_WATCHLIST_24,
build_financial_quant_harvest,
fetch_live_watchlist,
main,
synthesize_quant_dossier_markdown,
)
from hyperstitionstud_io.quant.timeseries import (
EXCLUDED_NON_PERIODIC_SOURCES,
TRADINGVIEW_SYMBOL_MAP,
build_quant_timeseries_bundle,
compute_timeseries_moments,
derive_pokedex_specimen_profile,
resolve_tradingview_target,
)
__all__ = [
"CANONICAL_WATCHLIST_24",
"EXCLUDED_NON_PERIODIC_SOURCES",
"TRADINGVIEW_SYMBOL_MAP",
"build_financial_quant_harvest",
"build_quant_timeseries_bundle",
"compute_timeseries_moments",
"derive_pokedex_specimen_profile",
"fetch_live_watchlist",
"main",
"resolve_tradingview_target",
"synthesize_quant_dossier_markdown",
]
+762
View File
@@ -0,0 +1,762 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.quant.collector — Periodic Quantitative Financial Telemetry & Contingent Meaning Collector (`hs-quant-harvest`).
Strict Data Integrity Policy:
- Never synthesizes or hardcodes fake market prices, basis-point moves, or market caps.
- Uses only real market observations from Yahoo Finance v8, Stooq CSV, CoinGecko v3, or
the verified real exchange history cache (`site/quant/real-market-history.json`).
- Whenever market data is unavailable for an instrument (e.g. private entity `ANTHR-PVT`
or missing feed fields like `market_cap_str`), explicitly reports `"No data available"`
(`data_available = False`, numeric fields `None`).
"""
from __future__ import annotations
import argparse
import concurrent.futures
import csv
import datetime
import io
import json
import os
import sys
import time
import urllib.parse
import urllib.request
from pathlib import Path
from typing import Any
_SRC_DIR = Path(__file__).resolve().parents[2]
if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
sys.path.insert(0, str(_SRC_DIR))
from hyperstitionstud_io.ciphers import ( # noqa: E402
compute_aq,
expand_quant_spoken,
int_to_spoken_words,
is_repdigit_37,
prime_rank,
)
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
from hyperstitionstud_io.ipld import ( # noqa: E402
compute_dag_json_cidv1,
write_pretty_and_dag_json,
)
from hyperstitionstud_io.phonetics import translate_batch # noqa: E402
os.environ["TZ"] = "UTC"
if hasattr(time, "tzset"):
time.tzset()
NO_DATA_AVAILABLE = "No data available"
S1_S6_SIGNATURE_RINGS: dict[int, list[str]] = {
292: ["S1: shizohnalizis / abstrakt masheen / sinthetik dayta", "S6: asset management [Gen 0]"],
260: ["S3: teknohkapital / kiler rohbots"],
256: ["S2: akselerayshan / hai-freekwansee", "S6: sovran welth"],
246: ["S1: transformer [Iso]"],
237: ["S6: kansorsheeam [Iso]"],
222: ["S1: danyela amodai", "S6: enterpraiz"],
215: ["S3: jensan hwang / hohlee grayl"],
211: ["S3: wor masheen / koper waier", "S2/Q0: siks bilyan"],
197: ["S3: lathografee", "S6: monopoly [Gen 0]"],
193: ["S1: anthropik / Dario Amodei [Gen 0]", "S2: flash krash"],
191: ["S2: derivativ", "S6: lajistiks"],
189: ["S2: likwidatee / hangkerchif / imerjansee"],
183: ["S2: ruhnaway / tempaleks / laytansee", "S6: alakayshan"],
166: ["S2: order buk / noo flesh"],
163: ["S6: manopalee / masheenz"],
160: ["S6: kapasatee / truhst / rohbots / kriptoh / straiks"],
153: ["S6: aperatas / serplas", "S2: raizohm / reealatee [Iso]"],
137: ["S1: daireeoh", "S3: envideea", "M1: hawlts / inersha"],
136: ["S6: charter [Iso] / portal [Iso]", "M1: slohth"],
135: ["S1: dilooz / asemblaj / tenser"],
133: ["S1: wayts / sworm", "S6: ekwatee"],
129: ["S3: blakwel / ruhsha", "M7+: awflain"],
128: ["S3: nik land / masheen / serkat"],
125: ["S6: kapatal [Iso] / kapcher", "S2: fohldz / saires"],
115: ["S1: proof [Iso]"],
96: ["S1: klawd / failam / dayta"],
95: ["S2: lejer / faiber", "S5: flesh / huks"],
91: ["S3: tsmc [Iso] / laws"],
81: ["S3: asml [Iso]", "S6: aset"],
71: ["S3: gpu [Iso]"],
}
# Static watchlist metadata ONLY — zero hardcoded or synthesized prices/moves/caps.
CANONICAL_WATCHLIST_24: list[dict[str, Any]] = [
{"symbol": "NVDA", "entity_eng": "Nvidia", "guilds": ["S1", "S3"]},
{"symbol": "ASML", "entity_eng": "ASML", "guilds": ["S3", "S6"]},
{"symbol": "TSM", "entity_eng": "TSMC", "guilds": ["S3", "S6"]},
{"symbol": "ANTHR-PVT", "entity_eng": "Anthropic", "guilds": ["S1", "S2"]},
{"symbol": "MSFT", "entity_eng": "Microsoft", "guilds": ["S1", "S6"]},
{"symbol": "GOOGL", "entity_eng": "Alphabet", "guilds": ["S1", "S6"]},
{"symbol": "META", "entity_eng": "Meta", "guilds": ["S1", "S6"]},
{"symbol": "ORCL", "entity_eng": "Oracle", "guilds": ["S1", "S6"]},
{"symbol": "AVGO", "entity_eng": "Broadcom", "guilds": ["S3", "S6"]},
{"symbol": "ARM", "entity_eng": "Arm", "guilds": ["S3", "S1"]},
{"symbol": "AMD", "entity_eng": "AMD", "guilds": ["S3", "S1"]},
{"symbol": "PLTR", "entity_eng": "Palantir", "guilds": ["S3", "S6"]},
{"symbol": "LMT", "entity_eng": "Lockheed", "guilds": ["S3"]},
{"symbol": "RTX", "entity_eng": "Raytheon", "guilds": ["S3"]},
{"symbol": "HG=F", "entity_eng": "Copper", "guilds": ["S3", "S2"]},
{"symbol": "^VIX", "entity_eng": "VIX", "guilds": ["S2"]},
{"symbol": "BTC-USD", "entity_eng": "Bitcoin", "guilds": ["S2", "S6"]},
{"symbol": "ETH-USD", "entity_eng": "Ethereum", "guilds": ["S2"]},
{"symbol": "SOL-USD", "entity_eng": "Solana", "guilds": ["S2"]},
{"symbol": "COIN", "entity_eng": "Coinbase", "guilds": ["S2", "S6"]},
{"symbol": "CEG", "entity_eng": "Constellation", "guilds": ["S4", "S3"]},
{"symbol": "LLY", "entity_eng": "Eli Lilly", "guilds": ["S5", "S6"]},
{"symbol": "^TNX", "entity_eng": "Treasury", "guilds": ["S6", "S2"]},
{"symbol": "BLK", "entity_eng": "BlackRock", "guilds": ["S6"]},
]
_USER_AGENT = "Mozilla/5.0 (compatible; HyperstitionStudioQuantCollector/2.0; +urn:io:hyperstitionstud)"
_COINGECKO_MAP = {"BTC-USD": "bitcoin", "ETH-USD": "ethereum", "SOL-USD": "solana"}
_STOOQ_MAP = {
"NVDA": "nvda.us", "ASML": "asml.us", "TSM": "tsm.us", "MSFT": "msft.us",
"GOOGL": "googl.us", "META": "meta.us", "ORCL": "orcl.us", "AVGO": "avgo.us",
"ARM": "arm.us", "AMD": "amd.us", "PLTR": "pltr.us", "LMT": "lmt.us",
"RTX": "rtx.us", "COIN": "coin.us", "CEG": "ceg.us", "LLY": "lly.us", "BLK": "blk.us",
}
_EQ_CLOSURES_333: dict[int, list[str]] = {
71: [
"envideea (137) + fohldz (125) + gpu (71) = 333",
"daireeoh (137) + fohldz (125) + gpu (71) = 333",
],
81: [
"asml (81) + chaildz (126) + chaildz (126) = 333",
],
91: [
"tsmc (91) + fohldz (125) + tekst (117) = 333",
],
125: [
"envideea (137) + fohldz (125) + gpu (71) = 333",
],
137: [
"envideea (137) + fohldz (125) + gpu (71) = 333",
"daireeoh (137) + fohldz (125) + gpu (71) = 333",
],
163: [
"manopalee (163) + in (41) + blakwel (129) = 333",
],
191: [
"derivativ (191) + aiern (92) + tab (50) = 333",
"lajistiks (191) + aiern (92) + tab (50) = 333",
],
193: [
"anthropik (193) + koinbays (140) = 333",
"flash krash (193) + koinbays (140) = 333",
],
211: [
"lap (56) + for (66) + siks bilyan (211) = 333",
"lap (56) + for (66) + koper waier (211) = 333",
],
256: [
"akselerayshan (256) + in (41) + ai (36) = 333",
"sovran welth (256) + in (41) + ai (36) = 333",
],
292: [
"abstrakt masheen (292) + in (41) = 333",
"sinthetik dayta (292) + in (41) = 333",
],
}
def _fetch_yahoo_chart(symbol: str, timeout: float = 6.0) -> dict[str, Any] | None:
"""Source 1: Keyless Yahoo Finance v8 Chart JSON API (using actual prior trading day close)."""
if symbol == "ANTHR-PVT":
return None
enc_sym = urllib.parse.quote(symbol, safe="")
url = f"https://query1.finance.yahoo.com/v8/finance/chart/{enc_sym}?range=1mo&interval=1d"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT, "Accept": "application/json"})
with urllib.request.urlopen(req, timeout=timeout) as resp:
data = json.loads(resp.read().decode("utf-8"))
res_list = (data.get("chart") or {}).get("result") or []
if not res_list:
return None
ts_list = res_list[0].get("timestamp") or []
quotes = (((res_list[0].get("indicators") or {}).get("quote") or [{}])[0])
raw_closes = quotes.get("close") or []
raw_vols = quotes.get("volume") or []
valid_pairs = [
(ts_list[i], float(raw_closes[i]), float(raw_vols[i]) if i < len(raw_vols) and raw_vols[i] is not None else None)
for i in range(min(len(ts_list), len(raw_closes)))
if raw_closes[i] is not None
]
if not valid_pairs:
return None
last_ts, close_usd, last_vol = valid_pairs[-1]
if close_usd <= 0:
return None
obs_date = datetime.datetime.fromtimestamp(last_ts, datetime.timezone.utc).strftime("%Y-%m-%d")
prev_close = valid_pairs[-2][1] if len(valid_pairs) >= 2 else None
if prev_close and prev_close > 0:
chg_pct: float | None = round((close_usd - prev_close) / prev_close * 100.0, 2)
chg_bps: int | None = int(round(chg_pct * 100.0))
else:
chg_pct = None
chg_bps = None
vol_ratio: float | None = None
prior_vols = [x[2] for x in valid_pairs[:-1][-20:] if x[2] is not None and x[2] > 0]
if last_vol is not None and last_vol > 0 and prior_vols:
avg_v = sum(prior_vols) / len(prior_vols)
if avg_v > 0:
vol_ratio = round(last_vol / avg_v, 2)
return {
"observation_date_utc": obs_date,
"close_usd": round(close_usd, 2),
"change_pct": chg_pct,
"change_bps": chg_bps,
"volume_ratio_20d": vol_ratio,
"market_cap_str": None,
"feed_source": "yahoo_v8_json",
}
def _fetch_stooq_csv(symbol: str, timeout: float = 6.0) -> dict[str, Any] | None:
"""Source 2: Keyless Stooq Daily OHLCV CSV Fallback."""
stooq_sym = _STOOQ_MAP.get(symbol)
if not stooq_sym:
return None
url = f"https://stooq.com/q/d/l/?s={stooq_sym}&i=d"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT})
with urllib.request.urlopen(req, timeout=timeout) as resp:
text = resp.read().decode("utf-8", errors="replace")
rows = list(csv.DictReader(io.StringIO(text)))
if not rows or "Close" not in rows[-1] or rows[-1]["Close"] in ("", "N/D", None):
return None
close_usd = float(rows[-1]["Close"])
prev_close = float(rows[-2]["Close"]) if len(rows) >= 2 and rows[-2].get("Close") not in ("", "N/D", None) else None
chg_pct = round((close_usd - prev_close) / prev_close * 100.0, 2) if (prev_close and prev_close > 0) else None
chg_bps = int(round(chg_pct * 100.0)) if chg_pct is not None else None
vols = [float(r["Volume"]) for r in rows[-21:] if r.get("Volume") and r["Volume"].replace(".", "").isdigit()]
vol_ratio = None
if len(vols) >= 2:
avg_v = sum(vols[:-1]) / max(1, len(vols[:-1]))
if avg_v > 0:
vol_ratio = round(vols[-1] / avg_v, 2)
return {
"observation_date_utc": rows[-1].get("Date"),
"close_usd": round(close_usd, 2),
"change_pct": chg_pct,
"change_bps": chg_bps,
"volume_ratio_20d": vol_ratio,
"market_cap_str": None,
"feed_source": "stooq_csv",
}
def _fetch_coingecko_crypto(timeout: float = 6.0) -> dict[str, dict[str, Any]]:
"""Source 3: Keyless CoinGecko Public 24h Crypto & Liquidity JSON API."""
ids = ",".join(_COINGECKO_MAP.values())
url = f"https://api.coingecko.com/api/v3/simple/price?ids={ids}&vs_currencies=usd&include_24hr_change=true&include_market_cap=true"
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT, "Accept": "application/json"})
with urllib.request.urlopen(req, timeout=timeout) as resp:
data = json.loads(resp.read().decode("utf-8"))
out: dict[str, dict[str, Any]] = {}
for sym, cg_id in _COINGECKO_MAP.items():
if cg_id in data and "usd" in data[cg_id]:
c_usd = float(data[cg_id]["usd"])
chg_raw = data[cg_id].get("usd_24h_change")
chg_pct = round(float(chg_raw), 2) if chg_raw is not None else None
mcap = float(data[cg_id].get("usd_market_cap") or 0.0)
mcap_str = f"${mcap / 1e12:.2f}T" if mcap >= 1e12 else (f"${int(round(mcap / 1e9))}B" if mcap >= 1e9 else None)
out[sym] = {
"close_usd": round(c_usd, 2),
"change_pct": chg_pct,
"change_bps": int(round(chg_pct * 100.0)) if chg_pct is not None else None,
"market_cap_str": mcap_str,
"feed_source": "coingecko_v3_json",
}
return out
def _load_real_history_latest_bars() -> dict[str, dict[str, Any]]:
"""
Read the latest real exchange bar per symbol from `site/quant/real-market-history.json`
(populated strictly from real Yahoo Finance v8 / CoinGecko responses; never synthesized).
"""
cfg = load_workspace_config()
hist_path = cfg.core_dir / "site" / "quant" / "real-market-history.json"
if not hist_path.is_file():
return {}
try:
raw = json.loads(hist_path.read_text(encoding="utf-8"))
out: dict[str, dict[str, Any]] = {}
for sym, sym_obj in (raw.get("instruments") or {}).items():
bars_by_date = sym_obj.get("bars_by_date") or {}
if bars_by_date:
latest_dt = sorted(bars_by_date.keys())[-1]
bar = dict(bars_by_date[latest_dt])
bar["observation_date_utc"] = latest_dt
out[sym] = bar
return out
except Exception:
return {}
def fetch_live_watchlist(
base_watchlist: list[dict[str, Any]] | None = None,
timeout: float = 6.0,
allow_live_network: bool = True,
) -> list[dict[str, Any]]:
"""
Resolve real market observations for the 24 watchlist instruments.
Never invents or synthesizes missing data: if an instrument has no real exchange observation
(e.g. private company `ANTHR-PVT`), its numeric fields remain `None` and `status` is
`"No data available"`.
"""
watchlist = [dict(x) for x in (base_watchlist or CANONICAL_WATCHLIST_24)]
cached_latest = _load_real_history_latest_bars()
cg_quotes: dict[str, dict[str, Any]] = {}
if allow_live_network:
try:
cg_quotes = _fetch_coingecko_crypto(timeout=timeout)
except Exception:
cg_quotes = {}
def _resolve_one(item: dict[str, Any]) -> dict[str, Any]:
sym = item["symbol"]
merged = {
"symbol": sym,
"entity_eng": item["entity_eng"],
"guilds": list(item["guilds"]),
"data_available": False,
"status": NO_DATA_AVAILABLE,
"feed_source": None,
"observation_date_utc": None,
"close_usd": None,
"change_pct": None,
"change_bps": None,
"volume_ratio_20d": None,
"market_cap_str": None,
}
if sym == "ANTHR-PVT":
merged["status"] = "No data available (private entity — not publicly traded)"
return merged
if allow_live_network:
for fetcher in (_fetch_yahoo_chart, _fetch_stooq_csv):
try:
q = fetcher(sym, timeout=timeout)
if q and q.get("close_usd") is not None:
merged.update(q)
if sym in cg_quotes and cg_quotes[sym].get("market_cap_str"):
merged["market_cap_str"] = cg_quotes[sym]["market_cap_str"]
merged["data_available"] = True
merged["status"] = "ok"
return merged
except Exception:
continue
if sym in cg_quotes and cg_quotes[sym].get("close_usd") is not None:
merged.update(cg_quotes[sym])
merged["data_available"] = True
merged["status"] = "ok"
return merged
if sym in cached_latest and cached_latest[sym].get("close_usd") is not None:
merged.update(cached_latest[sym])
merged["data_available"] = True
merged["status"] = "ok"
return merged
return merged
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as pool:
return list(pool.map(_resolve_one, watchlist))
def build_financial_quant_harvest(
harvest_mode: str = "us-closing-bell",
snapshot_path: str | Path | None = None,
join_news_path: str | Path | None = None,
live_fetch: bool = False,
) -> dict[str, Any]:
cfg = load_workspace_config()
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
if snapshot_path and Path(snapshot_path).is_file():
raw_watchlist = json.loads(Path(snapshot_path).read_text(encoding="utf-8"))
else:
raw_watchlist = fetch_live_watchlist(
CANONICAL_WATCHLIST_24,
allow_live_network=bool(live_fetch),
)
phrases_to_translate: list[str] = []
for item in raw_watchlist:
phrases_to_translate.append(item["entity_eng"])
if item.get("close_usd") is not None:
close_int = int(round(float(item["close_usd"])))
phrases_to_translate.append(int_to_spoken_words(close_int))
if item.get("change_bps") is not None:
bps_abs = abs(int(item["change_bps"]))
phrases_to_translate.append(int_to_spoken_words(bps_abs))
mcap_raw = item.get("market_cap_str")
if mcap_raw and mcap_raw != NO_DATA_AVAILABLE:
phrases_to_translate.append(expand_quant_spoken(str(mcap_raw)))
ing_map = translate_batch(phrases_to_translate)
effective_news_path = Path(join_news_path) if join_news_path else (cfg.archive_dir / "news-aq-harvest-latest.json")
news_entities: dict[str, list[str]] = {}
if effective_news_path.is_file():
try:
news_obj = json.loads(effective_news_path.read_text(encoding="utf-8"))
headline_records: list[str] = []
for st in news_obj.get("stories", news_obj.get("headlines", [])):
if isinstance(st, dict):
hl = st.get("headline_eng") or st.get("title") or ""
if hl:
headline_records.append(str(hl))
for st in news_obj.get("twin_prime_headlines", []):
if isinstance(st, dict) and st.get("headline_eng"):
headline_records.append(str(st["headline_eng"]))
for _, group in (news_obj.get("shared_prime_attractors") or {}).items():
if isinstance(group, list):
for st in group:
if isinstance(st, dict) and st.get("headline_eng"):
headline_records.append(str(st["headline_eng"]))
for ent_item in news_obj.get("candidate_entities", []):
if isinstance(ent_item, dict) and ent_item.get("eng"):
headline_records.append(str(ent_item["eng"]))
for item in raw_watchlist:
sym = item["symbol"]
ent_low = item["entity_eng"].lower()
sym_clean = sym.split("-")[0].replace("^", "").replace("=F", "").lower()
matched_hls: list[str] = []
for hl in headline_records:
hl_low = hl.lower()
if ent_low in hl_low or (len(sym_clean) >= 3 and f" {sym_clean} " in f" {hl_low} "):
if hl not in matched_hls:
matched_hls.append(hl)
if matched_hls:
news_entities[sym] = matched_hls[:3]
except Exception:
news_entities = {}
instruments_out: list[dict[str, Any]] = []
active_memetic_states: set[str] = set()
emergent_m7_quant_triggers: list[dict[str, Any]] = []
vix_close_val: float | None = None
us10y_yield_val: float | None = None
for item in raw_watchlist:
sym = item["symbol"]
ent_eng = item["entity_eng"]
ent_ing = ing_map.get(ent_eng, ent_eng.lower())
ent_eng_aq = compute_aq(ent_eng)
ent_ing_aq = compute_aq(ent_ing)
co_present = sym in news_entities
has_price = item.get("close_usd") is not None
if not has_price:
instruments_out.append({
"symbol": sym,
"entity_eng": ent_eng,
"entity_ing": ent_ing,
"entity_eng_aq": ent_eng_aq,
"entity_ing_aq": ent_ing_aq,
"guilds": item["guilds"],
"data_available": False,
"status": item.get("status") or NO_DATA_AVAILABLE,
"feed_source": None,
"observation_date_utc": None,
"co_present_in_news_wire": co_present,
"metrics": {
"close_usd": None,
"change_pct": None,
"change_bps": None,
"volume_ratio_20d": None,
"market_cap_str": NO_DATA_AVAILABLE,
},
"quant_encodings": {
"status": NO_DATA_AVAILABLE,
"close_digit_aq": None,
"close_spoken_eng": NO_DATA_AVAILABLE,
"close_spoken_ing": NO_DATA_AVAILABLE,
"close_spoken_ing_aq": None,
"close_spoken_prime_rank": None,
"scaled_cap_spoken_eng": NO_DATA_AVAILABLE,
"scaled_cap_spoken_ing": NO_DATA_AVAILABLE,
"scaled_cap_spoken_ing_aq": None,
"bps_digit_aq": None,
"bps_spoken_eng": NO_DATA_AVAILABLE,
"bps_spoken_ing": NO_DATA_AVAILABLE,
"bps_spoken_ing_aq": None,
},
"contingent_locks": [],
})
continue
close_val = float(item["close_usd"])
if sym == "^VIX":
vix_close_val = close_val
elif sym == "^TNX":
us10y_yield_val = close_val
close_int = int(round(close_val))
close_sp_eng = int_to_spoken_words(close_int)
close_sp_ing = ing_map.get(close_sp_eng, close_sp_eng)
close_dig_aq = compute_aq(str(close_int))
close_sp_aq = compute_aq(close_sp_ing)
chg_bps_raw = item.get("change_bps")
chg_pct_raw = item.get("change_pct")
if chg_bps_raw is not None:
bps_abs: int | None = abs(int(chg_bps_raw))
bps_sp_eng = int_to_spoken_words(bps_abs)
bps_sp_ing = ing_map.get(bps_sp_eng, bps_sp_eng)
bps_dig_aq: int | None = compute_aq(str(bps_abs))
bps_sp_aq: int | None = compute_aq(bps_sp_ing)
else:
bps_abs = None
bps_sp_eng = NO_DATA_AVAILABLE
bps_sp_ing = NO_DATA_AVAILABLE
bps_dig_aq = None
bps_sp_aq = None
mcap_raw = item.get("market_cap_str")
if mcap_raw and mcap_raw != NO_DATA_AVAILABLE:
mcap_s = str(mcap_raw)
mcap_sp_eng = expand_quant_spoken(mcap_s)
mcap_sp_ing = ing_map.get(mcap_sp_eng, mcap_sp_eng)
mcap_sp_aq: int | None = compute_aq(mcap_sp_ing)
else:
mcap_s = NO_DATA_AVAILABLE
mcap_sp_eng = NO_DATA_AVAILABLE
mcap_sp_ing = NO_DATA_AVAILABLE
mcap_sp_aq = None
locks: list[dict[str, Any]] = []
if close_int == ent_ing_aq or close_int == ent_eng_aq:
locks.append({
"scope": "SCOPE1_INTRA_INSTRUMENT_SELF_LOCK",
"description": f"{sym} integer close (${close_int}) equals its own AQ coordinate ({ent_ing}={ent_ing_aq}).",
"verified_equations": list(_EQ_CLOSURES_333.get(close_int, [])),
})
if is_repdigit_37(close_sp_aq) or is_repdigit_37(close_int):
rep_val = close_sp_aq if is_repdigit_37(close_sp_aq) else close_int
locks.append({
"scope": "SCOPE1_SPOKEN_REPDIGIT_ATTRACTOR",
"description": f"{sym} close ${close_int} ('{close_sp_ing}') locks onto repdigit attractor {rep_val}.",
"verified_equations": [f"{close_sp_ing} = {close_sp_aq}"],
})
if bps_abs is not None and (bps_abs == ent_ing_aq or bps_abs == ent_eng_aq):
locks.append({
"scope": "SCOPE1_BPS_ISOMETRIC_SELF_LOCK",
"description": f"{sym} basis-point move ({bps_abs} bps) equals its own isometric AQ coordinate ({ent_ing}={ent_ing_aq}).",
"verified_equations": list(_EQ_CLOSURES_333.get(bps_abs, [])),
})
coord_checks: list[tuple[int, str]] = [
(close_int, "close_int"),
(close_sp_aq, "close_spoken_aq"),
]
if bps_abs is not None:
coord_checks.append((bps_abs, "change_bps"))
for coord_val, label_mode in coord_checks:
if coord_val in S1_S6_SIGNATURE_RINGS:
locks.append({
"scope": "SCOPE2_S1_S6_RING_MIGRATION",
"metric_mode": label_mode,
"coordinate": coord_val,
"ring_partners": S1_S6_SIGNATURE_RINGS[coord_val],
"verified_equations": list(_EQ_CLOSURES_333.get(coord_val, [])),
})
if coord_val == 129:
emergent_m7_quant_triggers.append({
"symbol": sym,
"coordinate": 129,
"metric_mode": label_mode,
"partners": S1_S6_SIGNATURE_RINGS[129],
})
vol_ratio = float(item["volume_ratio_20d"]) if item.get("volume_ratio_20d") is not None else None
chg_pct = float(chg_pct_raw) if chg_pct_raw is not None else None
if vol_ratio is not None and chg_pct is not None and vol_ratio < 0.45 and abs(chg_pct) < 0.10:
active_memetic_states.add("M1_ENTROPIC_STAGNATION")
if (chg_pct is not None and chg_pct <= -5.0) or (vol_ratio is not None and vol_ratio >= 2.5) or (sym == "^VIX" and close_int >= 25):
active_memetic_states.add("M2_FLASH_CRASH_TEMPLEX_SURGE")
if mcap_s.endswith("T"):
active_memetic_states.add("M3_LEVIATHAN_TRILLION_CAP_CONCENTRATION")
if co_present and locks:
locks.append({
"scope": "SCOPE3_NEWS_WIRE_CO_PRESENCE_LOCK",
"description": f"{sym} ({ent_eng}) co-occurs in the 00:00 GMT news wire while holding {len(locks)} active quantitative locks.",
"matched_headlines": news_entities[sym],
})
instruments_out.append({
"symbol": sym,
"entity_eng": ent_eng,
"entity_ing": ent_ing,
"entity_eng_aq": ent_eng_aq,
"entity_ing_aq": ent_ing_aq,
"guilds": item["guilds"],
"data_available": True,
"status": "ok",
"feed_source": item.get("feed_source") or "real_market_cache",
"observation_date_utc": item.get("observation_date_utc"),
"co_present_in_news_wire": co_present,
"metrics": {
"close_usd": close_val,
"change_pct": chg_pct,
"change_bps": int(chg_bps_raw) if chg_bps_raw is not None else None,
"volume_ratio_20d": vol_ratio,
"market_cap_str": mcap_s,
},
"quant_encodings": {
"status": "ok",
"close_digit_aq": close_dig_aq,
"close_spoken_eng": close_sp_eng,
"close_spoken_ing": close_sp_ing,
"close_spoken_ing_aq": close_sp_aq,
"close_spoken_prime_rank": prime_rank(close_sp_aq),
"scaled_cap_spoken_eng": mcap_sp_eng,
"scaled_cap_spoken_ing": mcap_sp_ing,
"scaled_cap_spoken_ing_aq": mcap_sp_aq,
"bps_digit_aq": bps_dig_aq,
"bps_spoken_eng": bps_sp_eng,
"bps_spoken_ing": bps_sp_ing,
"bps_spoken_ing_aq": bps_sp_aq,
},
"contingent_locks": locks,
})
receipt = guard.audit_receipt()
available_count = sum(1 for x in instruments_out if x.get("data_available"))
unavailable_syms = [x["symbol"] for x in instruments_out if not x.get("data_available")]
payload: dict[str, Any] = {
"$schema": "./schemas/v1/financial-aq-harvest.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:financial-aq-harvest",
"version": "2.0.24",
"target_date_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"),
"harvest_mode": harvest_mode,
"synthetic_data_eliminated": True,
"regime_summary": {
"instrument_count": len(instruments_out),
"instruments_with_data_count": available_count,
"instruments_without_data": unavailable_syms,
"total_contingent_locks": sum(len(x["contingent_locks"]) for x in instruments_out),
"vix_close": vix_close_val if vix_close_val is not None else NO_DATA_AVAILABLE,
"us10y_yield_pct": us10y_yield_val if us10y_yield_val is not None else NO_DATA_AVAILABLE,
"news_wire_co_present_symbols": sorted(news_entities.keys()),
"active_memetic_states": sorted(active_memetic_states),
"emergent_m7_quant_triggers": emergent_m7_quant_triggers,
},
"instruments": instruments_out,
"anchor_revisions_detected": [],
"isolation_receipt": receipt,
}
payload["ipld_dag_json_cidv1"] = {"/": compute_dag_json_cidv1(payload)}
return payload
def synthesize_quant_dossier_markdown(payload: dict[str, Any]) -> str:
"""Format a Markdown report strictly from real observed harvest data (stating 'No data available' when absent)."""
dt = payload["target_date_utc"]
mode = payload["harvest_mode"]
cid = payload["ipld_dag_json_cidv1"]["/"]
reg = payload["regime_summary"]
lines = [
f"# Dossier: Quantitative Financial Telemetry & Contingent Meaning (`{dt}` • `{mode}`)",
"",
f"- **Target Date (UTC):** `{dt}`",
f"- **Harvest Mode:** `{mode}`",
f"- **Instruments Audited:** `{reg['instrument_count']}` (`{reg.get('instruments_with_data_count', 0)}` with market data; `{', '.join(reg.get('instruments_without_data', [])) or 'none'}`: No data available)",
f"- **Total Contingent Locks:** `{reg['total_contingent_locks']}`",
f"- **Active Memetic States:** `{', '.join(reg['active_memetic_states']) or 'None'}`",
f"- **IPLD `dag-json` `CIDv1`:** `{cid}`",
"",
"## 1. Instrument Telemetry & Observed Locks",
"",
"| Symbol | Entity (`Gen 0 -> Gen 1`) | Close (USD) | Spoken Close (`Gen 1` AQ) | Change (bps) | Status / Active Contingent Locks |",
"| :--- | :--- | :---: | :--- | :---: | :--- |",
]
for inst in payload["instruments"]:
if not inst.get("data_available"):
lines.append(
f"| `{inst['symbol']}` | `{inst['entity_eng']} -> {inst['entity_ing']}` (`{inst['entity_eng_aq']}->{inst['entity_ing_aq']}`) | "
f"*{NO_DATA_AVAILABLE}* | *{NO_DATA_AVAILABLE}* | *{NO_DATA_AVAILABLE}* | {inst.get('status', NO_DATA_AVAILABLE)} |"
)
continue
q = inst["quant_encodings"]
lock_strs = "; ".join(
l.get("description") or f"{l['scope']} ({l.get('coordinate')} -> {', '.join(l.get('ring_partners', []))})"
for l in inst["contingent_locks"]
) or "No locks triggered"
bps_disp = inst["metrics"]["change_bps"] if inst["metrics"]["change_bps"] is not None else NO_DATA_AVAILABLE
lines.append(
f"| `{inst['symbol']}` | `{inst['entity_eng']} -> {inst['entity_ing']}` (`{inst['entity_eng_aq']}->{inst['entity_ing_aq']}`) | "
f"`${inst['metrics']['close_usd']}` | `{q['close_spoken_ing']}` (`{q['close_spoken_ing_aq']}`) | "
f"`{bps_disp}` | {lock_strs} |"
)
lines.append("")
return "\n".join(lines)
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(prog="hs-quant-harvest", description="Periodic Quantitative Financial Telemetry & Contingent Meaning Collector.")
ap.add_argument("--mode", choices=["us-closing-bell", "utc-rollover"], default="us-closing-bell")
ap.add_argument("--from-snapshot", default=None, help="Optional offline JSON snapshot file.")
ap.add_argument("--live", action="store_true", help="Attempt live keyless HTTP fetch (Yahoo v8 / Stooq CSV / CoinGecko).")
ap.add_argument("--join-news", default=None, help="Optional path to news-aq-harvest-latest.json.")
ap.add_argument("--write-dossier", default=None, help="Optional path to emit Markdown quant report.")
ap.add_argument("--out", default=None, help="Output JSON path (default: <archive_dir>/financial-aq-harvest-latest.json).")
args = ap.parse_args(argv)
cfg = load_workspace_config()
out_path = Path(args.out) if args.out else (cfg.archive_dir / "financial-aq-harvest-latest.json")
join_news = args.join_news or str(cfg.archive_dir / "news-aq-harvest-latest.json")
payload = build_financial_quant_harvest(
harvest_mode=args.mode,
snapshot_path=args.from_snapshot,
join_news_path=join_news,
live_fetch=args.live,
)
info = write_pretty_and_dag_json(out_path, payload)
if args.write_dossier:
d_path = Path(args.write_dossier)
d_path.parent.mkdir(parents=True, exist_ok=True)
d_path.write_text(synthesize_quant_dossier_markdown(payload), encoding="utf-8")
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle
ts_bundle = build_quant_timeseries_bundle(write_files=True)
print(
json.dumps(
{
"output_path": str(out_path),
"harvest_mode": payload["harvest_mode"],
"instrument_count": payload["regime_summary"]["instrument_count"],
"instruments_with_data_count": payload["regime_summary"]["instruments_with_data_count"],
"instruments_without_data": payload["regime_summary"]["instruments_without_data"],
"total_contingent_locks": payload["regime_summary"]["total_contingent_locks"],
"news_wire_co_present_symbols": payload["regime_summary"]["news_wire_co_present_symbols"],
"active_memetic_states": payload["regime_summary"]["active_memetic_states"],
"dag_json_cidv1": info["cidv1"],
"timeseries_cidv1": ts_bundle["ipld_dag_json_cidv1"]["/"],
"isolation_all_unchanged": payload["isolation_receipt"]["all_unchanged"],
},
indent=2,
)
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
+887
View File
@@ -0,0 +1,887 @@
"""
hyperstitionstud_io.quant.timeseries — Lens-Neutral Periodic Quantitative Financial & Memetic Gematria Time-Series Engine.
Enforces the Strict Periodicity Qualification Gate:
- Ingests ONLY timestamp-indexed periodic sources (`21:30 UTC` `us-closing-bell` market bars,
`00:00 UTC` `*-dossier-news-YYYY-MM-DD.md` wire harvests, daily `M1-M7+` regime vectors, and
dated `quantitative-economic-anchors.json` step revisions).
- Strictly excludes non-periodic/static corpora (`01-lexicon`, `10-19-ledgers`, undated dossiers
`20-24`, `26-45`, `65-69`, 22-volume Encyclopedia, proposals, lectures, podcasts, `db.json`).
- Persists 100% lens-neutral mathematical keys (`struct_*` & `ts_*`) and projects interpretive
registers (`fund_manager`, `neutral_math`, `corporate_board`, `tierzoo_ecology`,
`fantasy_sabermetrics`, `pokedex_scanner`) at runtime via `hyperstitionstud_io.lenses`.
"""
from __future__ import annotations
import datetime
import hashlib
import json
import math
import re
import urllib.parse
from pathlib import Path
from typing import Any
from hyperstitionstud_io import __version__ as CURRENT_VERSION
from hyperstitionstud_io.ciphers import (
compute_aq,
expand_quant_spoken,
int_to_spoken_words,
is_repdigit_37,
prime_rank,
)
from hyperstitionstud_io.config import load_workspace_config
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
from hyperstitionstud_io.ipld import compute_dag_json_cidv1, write_pretty_and_dag_json
from hyperstitionstud_io.lenses import DEFAULT_LENS, ENABLED_LENSES, LENS_REGISTRY, apply_all_lenses
from hyperstitionstud_io.phonetics import translate_batch
from hyperstitionstud_io.quant.collector import (
CANONICAL_WATCHLIST_24,
NO_DATA_AVAILABLE,
S1_S6_SIGNATURE_RINGS,
)
# Canonical TradingView Superchart Symbol & URL Resolver (Opened in new window; 0 external script embeds)
TRADINGVIEW_SYMBOL_MAP: dict[str, tuple[str, str]] = {
"NVDA": ("NASDAQ:NVDA", "https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA"),
"ASML": ("NASDAQ:ASML", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AASML"),
"TSM": ("NYSE:TSM", "https://www.tradingview.com/chart/?symbol=NYSE%3ATSM"),
"ANTHR-PVT": ("NASDAQ:GOOGL", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AGOOGL"),
"MSFT": ("NASDAQ:MSFT", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AMSFT"),
"GOOGL": ("NASDAQ:GOOGL", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AGOOGL"),
"META": ("NASDAQ:META", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AMETA"),
"ORCL": ("NYSE:ORCL", "https://www.tradingview.com/chart/?symbol=NYSE%3AORCL"),
"AVGO": ("NASDAQ:AVGO", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AAVGO"),
"ARM": ("NASDAQ:ARM", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AARM"),
"AMD": ("NASDAQ:AMD", "https://www.tradingview.com/chart/?symbol=NASDAQ%3AAMD"),
"PLTR": ("NASDAQ:PLTR", "https://www.tradingview.com/chart/?symbol=NASDAQ%3APLTR"),
"LMT": ("NYSE:LMT", "https://www.tradingview.com/chart/?symbol=NYSE%3ALMT"),
"RTX": ("NYSE:RTX", "https://www.tradingview.com/chart/?symbol=NYSE%3ARTX"),
"HG=F": ("COMEX:HG1!", "https://www.tradingview.com/chart/?symbol=COMEX%3AHG1%21"),
"^VIX": ("TVC:VIX", "https://www.tradingview.com/chart/?symbol=TVC%3AVIX"),
"BTC-USD": ("COINBASE:BTCUSD", "https://www.tradingview.com/chart/?symbol=COINBASE%3ABTCUSD"),
"ETH-USD": ("COINBASE:ETHUSD", "https://www.tradingview.com/chart/?symbol=COINBASE%3AETHUSD"),
"SOL-USD": ("COINBASE:SOLUSD", "https://www.tradingview.com/chart/?symbol=COINBASE%3ASOLUSD"),
"COIN": ("NASDAQ:COIN", "https://www.tradingview.com/chart/?symbol=NASDAQ%3ACOIN"),
"CEG": ("NASDAQ:CEG", "https://www.tradingview.com/chart/?symbol=NASDAQ%3ACEG"),
"LLY": ("NYSE:LLY", "https://www.tradingview.com/chart/?symbol=NYSE%3ALLY"),
"^TNX": ("TVC:US10Y", "https://www.tradingview.com/chart/?symbol=TVC%3AUS10Y"),
"BLK": ("NYSE:BLK", "https://www.tradingview.com/chart/?symbol=NYSE%3ABLK"),
}
EXCLUDED_NON_PERIODIC_SOURCES: list[str] = [
"01-ingglish-aq-lexicon.md",
"10-19-ledger-*.md",
"20-24-dossier-*.md",
"26-45-dossier-*.md",
"65-69-dossier-technocapital-singularity-*.md",
"technocapital-singularity-zoology/encyclopedia/*",
"proposal-*.md",
"lecture-*.md",
"podcast-ep*.md",
"haiperdohp-jemaytreeah/db.json",
]
_SPARK_BLOCKS = "▁▂▃▄▅▆▇█"
_DATED_NEWS_RE = re.compile(r"^(\d+)-dossier-news-(\d{4}-\d{2}-\d{2})\.md$")
_EQ_LINE_RE = re.compile(r"^-\s+`([^`]+)`\s+\(\"([^\"]+)\"\)\s+—\s+`([^`]+)=\s*(333|666|777)`")
GUILD_ENCYCLOPEDIA_VOLUME_MAP: dict[str, tuple[str, int, int, str]] = {
"S1": ("03-machinic-phylum-guilds-s1-to-s5/class-s1-autoregressive-ai-and-abstract-machine-a-to-z.pdf", 1, 65, "292"),
"S2": ("03-machinic-phylum-guilds-s1-to-s5/class-s2-flash-crash-and-templex-liquidity-a-to-z.pdf", 1, 66, "193"),
"S3": ("03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf", 5, 67, "137"),
"S4": ("03-machinic-phylum-guilds-s1-to-s5/class-s4-and-s5-nomad-carrier-wave-and-cutaneous-bwo-a-to-z.pdf", 1, 67, "211"),
"S5": ("03-machinic-phylum-guilds-s1-to-s5/class-s4-and-s5-nomad-carrier-wave-and-cutaneous-bwo-a-to-z.pdf", 3, 69, "777"),
"S6": ("04-capital-organizational-capture-s6/a-to-f-acquisition-to-fund.pdf", 1, 68, "125"),
}
def build_instrument_doc_references(
sym: str,
ent_eng: str,
ent_ing: str,
ent_ing_aq: int,
guilds: list[str],
) -> dict[str, Any]:
primary_g = guilds[0] if guilds else "S1"
vol_rel, pg_num, dos_num, fallback_q = GUILD_ENCYCLOPEDIA_VOLUME_MAP.get(
primary_g,
("03-machinic-phylum-guilds-s1-to-s5/class-s1-autoregressive-ai-and-abstract-machine-a-to-z.pdf", 1, 65, "292"),
)
dos_file_map = {
65: "65-dossier-technocapital-singularity-autoregressive-ai.md",
66: "66-dossier-technocapital-singularity-flash-crash-liquidity.md",
67: "67-dossier-technocapital-singularity-silicon-war-machine.md",
68: "68-dossier-technocapital-singularity-apparatus-of-capture.md",
69: "69-dossier-technocapital-singularity-vampiric-memetics.md",
}
dos_fname = dos_file_map.get(dos_num, "71-dossier-news-2026-11-29.md")
dos_prefix = "/zoology/dossiers" if dos_num in dos_file_map else "/archive"
q_enc = urllib.parse.quote(ent_ing)
return {
"encyclopedia_volume_rel": vol_rel,
"encyclopedia_deep_link": f"/encyclopedia/{vol_rel}#page={pg_num}&search={q_enc}",
"knowledge_graph_deep_link": f"/graph/index.html?select=aq:{ent_ing_aq}",
"exemplar_dossier_deep_link": f"{dos_prefix}/{dos_fname}#:~:text={urllib.parse.quote(fallback_q)}",
"rest_api_deep_link": f"/api/v1/dossiers/{dos_num}?highlight={urllib.parse.quote(fallback_q)}",
"verbatim_citation_passage": (
f"{sym} ({ent_eng} -> `{ent_ing}` = {ent_ing_aq}) indexed in Guilds [{', '.join(guilds)}] "
f"and Volume `{vol_rel.split('/')[-1]}` (p.{pg_num}, Dossier {dos_num})."
),
}
def resolve_tradingview_target(symbol: str) -> dict[str, str]:
tv_sym, tv_url = TRADINGVIEW_SYMBOL_MAP.get(
symbol.upper(),
(f"NASDAQ:{symbol.upper()}", f"https://www.tradingview.com/chart/?symbol={symbol.upper()}"),
)
return {"tradingview_symbol": tv_sym, "tradingview_url": tv_url}
def _make_sparkline(values: list[float | None]) -> str | None:
valid = [v for v in values if v is not None]
if not valid:
return None
lo, hi = min(valid), max(valid)
span = (hi - lo) if hi > lo else 1.0
out = []
for v in values:
if v is None:
out.append("·")
else:
idx = int(round((v - lo) / span * (len(_SPARK_BLOCKS) - 1)))
out.append(_SPARK_BLOCKS[max(0, min(len(_SPARK_BLOCKS) - 1, idx))])
return "".join(out)
def _pearson_corr(xs: list[float | None], ys: list[float | None]) -> float | None:
m = min(len(xs), len(ys))
pairs = [(float(xs[i]), float(ys[i])) for i in range(m) if xs[i] is not None and ys[i] is not None]
n = len(pairs)
if n < 3:
return None
mx = sum(p[0] for p in pairs) / n
my = sum(p[1] for p in pairs) / n
num = sum((p[0] - mx) * (p[1] - my) for p in pairs)
dx = math.sqrt(sum((p[0] - mx) ** 2 for p in pairs))
dy = math.sqrt(sum((p[1] - my) ** 2 for p in pairs))
if dx < 1e-9 or dy < 1e-9:
return None
return round(num / (dx * dy), 3)
def _extract_dated_news_dossiers(archive_dir: Path) -> dict[str, dict[str, Any]]:
"""
Scan ingglish-aq-archive strictly for periodic dated news dossiers (*-dossier-news-YYYY-MM-DD.md).
Asserts zero non-periodic files enter the returned map.
"""
dossiers_by_date: dict[str, dict[str, Any]] = {}
search_dir = archive_dir / "ingglish-aq-archive" if (archive_dir / "ingglish-aq-archive").is_dir() else archive_dir
if not search_dir.is_dir():
return dossiers_by_date
for p in sorted(search_dir.glob("*-dossier-news-*.md")):
m = _DATED_NEWS_RE.match(p.name)
if not m:
continue
dos_num, dt_str = int(m.group(1)), m.group(2)
txt = p.read_text(encoding="utf-8")
txt_low = txt.lower()
eqs: list[dict[str, Any]] = []
counts_by_target = {333: 0, 666: 0, 777: 0}
coords_hit: set[int] = set()
for line in txt.splitlines():
em = _EQ_LINE_RE.match(line.strip())
if em:
ing_p, eng_p, breakdown, tgt_s = em.group(1), em.group(2), em.group(3), int(em.group(4))
counts_by_target[tgt_s] = counts_by_target.get(tgt_s, 0) + 1
token_vals = [int(v) for v in re.findall(r"\((\d+)", breakdown)]
for tv in token_vals:
if tv in S1_S6_SIGNATURE_RINGS:
coords_hit.add(tv)
ring_hits = sorted(set(tv for tv in token_vals if tv in S1_S6_SIGNATURE_RINGS))
eqs.append({
"ing": ing_p,
"eng": eng_p,
"breakdown": breakdown.strip(),
"target": tgt_s,
"ring_coordinates": ring_hits,
"dossier_deep_link": f"/archive/{p.name}#:~:text={urllib.parse.quote(ing_p[:32])}",
"api_highlight_link": f"/api/v1/dossiers/{dos_num}?highlight={urllib.parse.quote(ing_p[:24])}",
"graph_hub_links": [f"/graph/index.html?select=aq:{c}" for c in ring_hits] + [f"/graph/index.html?select=aq:{tgt_s}"],
})
for c_ring in S1_S6_SIGNATURE_RINGS:
if f"`{c_ring}`" in txt or f"== {c_ring}" in txt or f"({c_ring})" in txt:
coords_hit.add(c_ring)
co_present_syms: list[str] = []
for item in CANONICAL_WATCHLIST_24:
sym = item["symbol"]
ent_low = item["entity_eng"].lower()
sym_clean = sym.split("-")[0].replace("^", "").replace("=F", "").lower()
if ent_low in txt_low or (len(sym_clean) >= 3 and f" {sym_clean} " in f" {txt_low} "):
co_present_syms.append(sym)
dossiers_by_date[dt_str] = {
"date_utc": dt_str,
"dossier_number": dos_num,
"dossier_file": p.name,
"archive_route": f"/archive/{p.name}",
"equation_counts": {
"eq_333": counts_by_target[333],
"eq_666": counts_by_target[666],
"eq_777": counts_by_target[777],
"total": len(eqs),
},
"active_ring_coordinates": sorted(coords_hit),
"co_present_symbols": sorted(co_present_syms),
"sample_equations": eqs[:12],
}
return dossiers_by_date
def _load_real_market_history_bars(cfg: Any) -> dict[str, dict[str, dict[str, Any]]]:
"""
Load real daily OHLCV bars from `site/quant/real-market-history.json`.
Never synthesizes or interpolates missing dates or private-entity prices:
any `(symbol, date_utc)` not present in the real exchange history returns `None`
and is reported as `"No data available"`.
"""
hist_path = cfg.core_dir / "site" / "quant" / "real-market-history.json"
if not hist_path.is_file():
return {}
try:
raw = json.loads(hist_path.read_text(encoding="utf-8"))
out: dict[str, dict[str, dict[str, Any]]] = {}
for sym, sym_obj in (raw.get("instruments") or {}).items():
out[sym] = dict(sym_obj.get("bars_by_date") or {})
return out
except Exception:
return {}
def compute_timeseries_moments(
daily_points: list[float | None],
active_flags: list[bool],
wire_shares: list[float | None],
cap_shares: list[float | None],
expected_null_locks: float | None,
observed_locks: int | None,
wire_vel_series: list[float | None],
abs_bps_series: list[float | None],
regime_series: list[set[str]],
baseline_replacement_pts: float = 18.0,
available_trading_days: int | None = None,
) -> dict[str, Any]:
"""
Compute the 6 canonical lens-neutral longitudinal time-series moments (`ts_*`).
Returns `None` (`null` in JSON) for unavailable metrics rather than defaulting to `0.0`.
"""
valid_pts = [float(p) for p in daily_points if p is not None]
avail_cnt = available_trading_days if available_trading_days is not None else len(valid_pts)
if avail_cnt <= 0 or not valid_pts:
return {
"ts_duty_cycle_pct": None,
"ts_weighted_resonance": None,
"ts_excess_over_null": None,
"ts_excess_over_replacement": None,
"ts_quantile_profile": {
"p20_floor": None,
"p90_ceiling": None,
"boom_pct": None,
"bust_pct": None,
"cv": None,
},
"ts_optimal_lag_days": None,
"ts_lag_correlation_curve": {str(tau): None for tau in range(-5, 6)},
"ts_regime_splits": {
"M1_ENTROPIC": None,
"M2_FLASH_CRASH": None,
"M3_LEVIATHAN": None,
},
"ts_sparkline_30d": None,
}
n_total = max(1, len(daily_points))
n_valid = max(1, len(valid_pts))
duty_pct = round(100.0 * sum(1 for f in active_flags if f) / n_valid, 1)
valid_wire = [float(w) for w in wire_shares if w is not None]
valid_cap = [float(c) for c in cap_shares if c is not None]
mean_wire_sh = sum(valid_wire) / len(valid_wire) if valid_wire else 0.0
mean_cap_sh = sum(valid_cap) / len(valid_cap) if valid_cap else 0.0
weighted_res = min(99.0, round(100.0 * (1.5 * mean_wire_sh + 0.7 * mean_cap_sh), 1))
loe = round((observed_locks or 0) - (expected_null_locks or 0.0), 2) if (observed_locks is not None and expected_null_locks is not None) else None
tot_pts = sum(valid_pts)
excess_over_repl = round((tot_pts - baseline_replacement_pts) / 6.5, 2)
sorted_pts = sorted(valid_pts)
p20_idx = min(n_valid - 1, max(0, int(0.20 * n_valid)))
p90_idx = min(n_valid - 1, max(0, int(0.90 * n_valid)))
mean_pt = tot_pts / n_valid
var_pt = sum((x - mean_pt) ** 2 for x in valid_pts) / n_valid
std_pt = math.sqrt(var_pt)
cv = round(std_pt / mean_pt, 2) if mean_pt > 0 else None
p20_norm = min(98.0, round(42.0 + 14.0 * sorted_pts[p20_idx], 1))
p90_norm = min(99.0, round(48.0 + 11.5 * sorted_pts[p90_idx], 1))
boom_pct = round(100.0 * sum(1 for x in valid_pts if x >= 3.5) / n_valid, 1)
bust_pct = round(100.0 * sum(1 for x in valid_pts if x <= 0.01) / n_valid, 1)
lag_corrs: dict[str, float | None] = {}
best_lag: int | None = None
best_abs_r = -1.0
for tau in range(-5, 6):
if tau >= 0:
xs = wire_vel_series[: n_total - tau]
ys = abs_bps_series[tau:]
else:
k = -tau
xs = wire_vel_series[k:]
ys = abs_bps_series[: n_total - k]
r_val = _pearson_corr(xs, ys)
lag_corrs[str(tau)] = r_val
if r_val is not None and abs(r_val) > best_abs_r:
best_abs_r = abs(r_val)
best_lag = tau
regime_splits: dict[str, float | None] = {}
for r_key, r_full in (
("M1_ENTROPIC", "M1_ENTROPIC_STAGNATION"),
("M2_FLASH_CRASH", "M2_FLASH_CRASH_TEMPLEX_SURGE"),
("M3_LEVIATHAN", "M3_LEVIATHAN_TRILLION_CAP_CONCENTRATION"),
):
sub_pts = [float(daily_points[i]) for i in range(n_total) if daily_points[i] is not None and r_full in regime_series[i]]
if sub_pts:
regime_splits[r_key] = round((sum(sub_pts) / len(sub_pts) - mean_pt) * 4.0, 1)
else:
regime_splits[r_key] = None
return {
"ts_duty_cycle_pct": duty_pct,
"ts_weighted_resonance": weighted_res,
"ts_excess_over_null": loe,
"ts_excess_over_replacement": excess_over_repl,
"ts_quantile_profile": {
"p20_floor": p20_norm,
"p90_ceiling": p90_norm,
"boom_pct": boom_pct,
"bust_pct": bust_pct,
"cv": cv,
},
"ts_optimal_lag_days": best_lag,
"ts_lag_correlation_curve": lag_corrs,
"ts_regime_splits": regime_splits,
"ts_sparkline_30d": _make_sparkline(daily_points),
}
def derive_pokedex_specimen_profile(
symbol: str,
inst_record: dict[str, Any],
) -> dict[str, Any]:
"""
Project a lens-neutral instrument record into a Gen IV INFO Pokedex specimen card.
Uses `None` (`null` in JSON) when time-series data is unavailable.
"""
sv = inst_record["structural_vector"]
tm = inst_record["timeseries_moments"]
proj = (inst_record.get("lens_projections") or {}).get("pokedex_scanner") or apply_all_lenses(
sv, tm, inst_record["composite_score"], ("pokedex_scanner",)
)["pokedex_scanner"]
qual = proj["qualitative_profile"]
duty_raw = tm.get("ts_duty_cycle_pct")
w_res_raw = tm.get("ts_weighted_resonance")
if duty_raw is None or w_res_raw is None:
level: int | None = None
rarity: str | None = None
else:
duty = float(duty_raw)
level = max(12, min(99, int(round(0.55 * inst_record["composite_score"] + 0.45 * float(w_res_raw)))))
rarity = (
"Common Keystone Encounter (21:30 UTC Closing Bell)"
if duty >= 60.0
else ("Uncommon Regime Encounter (00:00 UTC Rollover)" if duty >= 25.0 else "Legendary Roaming Anomaly (<5% Rate)")
)
return {
"dex_number": f"DEX #{inst_record['entity_ing_aq']:03d}",
"symbol": symbol,
"entity_eng": inst_record["entity_eng"],
"entity_ing": inst_record["entity_ing"],
"guilds": inst_record["guilds"],
"level": level,
"evolution_stage": proj["tier_classification"],
"nature": qual["archetype"],
"ability": qual["regime_specialization"],
"ev_yield": qual["causal_role"],
"encounter_rarity": rarity,
"base_stats_6": proj["labeled_structural"],
"timeseries_telemetry": proj["labeled_timeseries"],
"sparkline_30d": tm["ts_sparkline_30d"],
"tradingview_symbol": inst_record["tradingview_symbol"],
"tradingview_url": inst_record["tradingview_url"],
}
def build_quant_timeseries_bundle(
enabled_lenses: tuple[str, ...] | list[str] = ENABLED_LENSES,
write_files: bool = True,
) -> dict[str, Any]:
"""
Build the lens-neutral periodic time-series bundle across the 30-day November 2026 UTC calendar
(2026-11-01 .. 2026-11-30), cross-joining the 24 S1-S6 market tickers with the 21 dated
00:00 GMT news wire dossiers.
"""
cfg = load_workspace_config()
active_lenses = tuple(lid for lid in enabled_lenses if lid in LENS_REGISTRY)
if not active_lenses:
active_lenses = ("neutral_math",)
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
dated_dossiers = _extract_dated_news_dossiers(cfg.archive_dir)
real_history = _load_real_market_history_bars(cfg)
dates_utc = [f"2026-11-{d:02d}" for d in range(1, 31)]
num_days = len(dates_utc)
# Pre-collect all phrases needed for batch Ingglish translation from real observations only
raw_bars_by_sym: dict[str, list[dict[str, Any] | None]] = {}
phrases_to_translate: set[str] = set()
for item in CANONICAL_WATCHLIST_24:
sym = item["symbol"]
phrases_to_translate.add(item["entity_eng"])
sym_hist = real_history.get(sym) or {}
bars: list[dict[str, Any] | None] = []
for dt_s in dates_utc:
b = sym_hist.get(dt_s)
bars.append(b)
if b and b.get("close_usd") is not None:
phrases_to_translate.add(int_to_spoken_words(int(round(float(b["close_usd"])))))
if b and b.get("change_bps") is not None:
phrases_to_translate.add(int_to_spoken_words(abs(int(b["change_bps"]))))
if b and b.get("market_cap_str") and b["market_cap_str"] != NO_DATA_AVAILABLE:
phrases_to_translate.add(expand_quant_spoken(str(b["market_cap_str"])))
raw_bars_by_sym[sym] = bars
ing_map = translate_batch(sorted(phrases_to_translate))
# Build daily wire summary series (2026-11-01 .. 2026-11-30)
daily_wire_series: list[dict[str, Any]] = []
wire_vel_global: list[float | None] = []
for dt_s in dates_utc:
dos = dated_dossiers.get(dt_s)
if dos:
daily_wire_series.append(dos)
wire_vel_global.append(float(dos["equation_counts"]["total"]))
else:
daily_wire_series.append({
"date_utc": dt_s,
"dossier_number": None,
"dossier_file": None,
"archive_route": None,
"equation_counts": {"eq_333": None, "eq_666": None, "eq_777": None, "total": None},
"active_ring_coordinates": [],
"co_present_symbols": [],
"sample_equations": [],
})
wire_vel_global.append(None)
# Compute per-day regime states and total volume-weighted locked bps for WOPR share
daily_regimes: list[set[str]] = [set() for _ in range(num_days)]
daily_total_locked_displacement: list[float] = [0.0 for _ in range(num_days)]
per_sym_series: dict[str, list[dict[str, Any]]] = {}
for item in CANONICAL_WATCHLIST_24:
sym = item["symbol"]
ent_eng = item["entity_eng"]
ent_ing = ing_map.get(ent_eng, ent_eng.lower())
ent_eng_aq = compute_aq(ent_eng)
ent_ing_aq = compute_aq(ent_ing)
series_rows: list[dict[str, Any]] = []
for d_idx, dt_s in enumerate(dates_utc):
b = raw_bars_by_sym[sym][d_idx]
dos = dated_dossiers.get(dt_s)
co_present = bool(dos and sym in dos["co_present_symbols"])
if b is None or b.get("close_usd") is None:
series_rows.append({
"date_utc": dt_s,
"data_available": False,
"status": NO_DATA_AVAILABLE,
"feed_source": None,
"close_usd": None,
"change_pct": None,
"change_bps": None,
"volume_ratio_20d": None,
"market_cap_str": NO_DATA_AVAILABLE,
"close_digit_aq": None,
"close_spoken_ing": NO_DATA_AVAILABLE,
"close_spoken_ing_aq": None,
"scaled_cap_spoken_ing": NO_DATA_AVAILABLE,
"scaled_cap_spoken_ing_aq": None,
"bps_digit_aq": None,
"bps_spoken_ing": NO_DATA_AVAILABLE,
"bps_spoken_ing_aq": None,
"scope1_locks": [],
"scope2_ring_coordinates": [],
"co_present_in_news_wire": co_present,
"contingent_points": 1.0 if co_present else None,
"_locked_disp": None,
})
continue
close_val = float(b["close_usd"])
close_int = int(round(close_val))
close_sp_eng = int_to_spoken_words(close_int)
close_sp_ing = ing_map.get(close_sp_eng, close_sp_eng)
close_dig_aq = compute_aq(str(close_int))
close_sp_aq = compute_aq(close_sp_ing)
chg_bps_raw = b.get("change_bps")
chg_pct_raw = b.get("change_pct")
if chg_bps_raw is not None:
bps_abs: int | None = abs(int(chg_bps_raw))
bps_sp_eng = int_to_spoken_words(bps_abs)
bps_sp_ing = ing_map.get(bps_sp_eng, bps_sp_eng)
bps_dig_aq: int | None = compute_aq(str(bps_abs))
bps_sp_aq: int | None = compute_aq(bps_sp_ing)
else:
bps_abs = None
bps_sp_ing = NO_DATA_AVAILABLE
bps_dig_aq = None
bps_sp_aq = None
mcap_raw = b.get("market_cap_str")
if mcap_raw and mcap_raw != NO_DATA_AVAILABLE:
mcap_s = str(mcap_raw)
mcap_sp_eng = expand_quant_spoken(mcap_s)
mcap_sp_ing = ing_map.get(mcap_sp_eng, mcap_sp_eng)
mcap_sp_aq: int | None = compute_aq(mcap_sp_ing)
else:
mcap_s = NO_DATA_AVAILABLE
mcap_sp_ing = NO_DATA_AVAILABLE
mcap_sp_aq = None
vol_r_raw = b.get("volume_ratio_20d")
vol_r = float(vol_r_raw) if vol_r_raw is not None else None
chg_pct = float(chg_pct_raw) if chg_pct_raw is not None else None
scope1_locks: list[str] = []
scope2_coords: list[int] = []
if close_int == ent_ing_aq or close_int == ent_eng_aq:
scope1_locks.append(f"CLOSE_SELF_LOCK ({close_int}=={ent_ing})")
if is_repdigit_37(close_sp_aq) or is_repdigit_37(close_int):
scope1_locks.append(f"REPDIGIT_ATTRACTOR ({close_int if is_repdigit_37(close_int) else close_sp_aq})")
if bps_abs is not None and (bps_abs == ent_ing_aq or bps_abs == ent_eng_aq):
scope1_locks.append(f"BPS_SELF_LOCK ({bps_abs}=={ent_ing})")
cand_coords = [close_int, close_sp_aq]
if bps_abs is not None:
cand_coords.append(bps_abs)
for c_val in cand_coords:
if c_val in S1_S6_SIGNATURE_RINGS and c_val not in scope2_coords:
scope2_coords.append(c_val)
if vol_r is not None and chg_pct is not None and vol_r < 0.45 and abs(chg_pct) < 0.15:
daily_regimes[d_idx].add("M1_ENTROPIC_STAGNATION")
if (chg_pct is not None and chg_pct <= -5.0) or (vol_r is not None and vol_r >= 2.5) or (sym == "^VIX" and close_int >= 25):
daily_regimes[d_idx].add("M2_FLASH_CRASH_TEMPLEX_SURGE")
if mcap_s.endswith("T"):
daily_regimes[d_idx].add("M3_LEVIATHAN_TRILLION_CAP_CONCENTRATION")
pts = (
3.0 * len(scope1_locks)
+ 1.5 * len(scope2_coords)
+ (2.5 if (co_present and (scope1_locks or scope2_coords)) else (1.0 if co_present else 0.0))
)
locked_disp = ((bps_abs or 0) * (vol_r or 1.0)) if (scope1_locks or scope2_coords) else 0.0
daily_total_locked_displacement[d_idx] += locked_disp
series_rows.append({
"date_utc": dt_s,
"data_available": True,
"status": "ok",
"feed_source": b.get("feed_source") or "yahoo_v8_json",
"close_usd": close_val,
"change_pct": chg_pct,
"change_bps": int(chg_bps_raw) if chg_bps_raw is not None else None,
"volume_ratio_20d": vol_r,
"market_cap_str": mcap_s,
"close_digit_aq": close_dig_aq,
"close_spoken_ing": close_sp_ing,
"close_spoken_ing_aq": close_sp_aq,
"scaled_cap_spoken_ing": mcap_sp_ing,
"scaled_cap_spoken_ing_aq": mcap_sp_aq,
"bps_digit_aq": bps_dig_aq,
"bps_spoken_ing": bps_sp_ing,
"bps_spoken_ing_aq": bps_sp_aq,
"scope1_locks": scope1_locks,
"scope2_ring_coordinates": scope2_coords,
"co_present_in_news_wire": co_present,
"contingent_points": round(pts, 2),
"_locked_disp": locked_disp,
})
per_sym_series[sym] = series_rows
# Finalize per-instrument structural vectors, time-series moments, and lens projections
instruments_out: list[dict[str, Any]] = []
for item in CANONICAL_WATCHLIST_24:
sym = item["symbol"]
ent_eng = item["entity_eng"]
ent_ing = ing_map.get(ent_eng, ent_eng.lower())
ent_eng_aq = compute_aq(ent_eng)
ent_ing_aq = compute_aq(ent_ing)
s_rows = per_sym_series[sym]
avail_rows = [r for r in s_rows if r.get("data_available")]
daily_pts: list[float | None] = [float(r["contingent_points"]) if r.get("contingent_points") is not None else None for r in s_rows]
active_flags = [bool(r["scope1_locks"] or r["scope2_ring_coordinates"] or r["co_present_in_news_wire"]) for r in s_rows if r.get("data_available")]
abs_bps: list[float | None] = [float(abs(int(r["change_bps"]))) if r.get("change_bps") is not None else None for r in s_rows]
wire_shares: list[float | None] = []
cap_shares: list[float | None] = []
tot_locks = 0
for d_idx, r in enumerate(s_rows):
tot_locks += len(r["scope1_locks"]) + len(r["scope2_ring_coordinates"])
dos = dated_dossiers.get(dates_utc[d_idx])
if dos and dos["active_ring_coordinates"]:
hit = 1.0 if (ent_ing_aq in dos["active_ring_coordinates"] or sym in dos["co_present_symbols"]) else 0.0
wire_shares.append(hit / max(1, len(CANONICAL_WATCHLIST_24) * 0.35))
else:
wire_shares.append(None)
ld_val = r.pop("_locked_disp", None)
if ld_val is not None:
denom = max(1.0, daily_total_locked_displacement[d_idx])
cap_shares.append(float(ld_val) / denom)
else:
cap_shares.append(None)
is_iso = ent_eng_aq == ent_ing_aq
is_p_ing = prime_rank(ent_ing_aq) is not None
is_p_eng = prime_rank(ent_eng_aq) is not None
struct_vec = {
"struct_isometric_armor": 92.0 if is_iso else 76.0,
"struct_drift_velocity": max(55.0, min(98.0, 95.0 - abs(ent_ing_aq - ent_eng_aq) * 0.6)),
"struct_variance_collapse": 91.0 if ent_ing_aq in S1_S6_SIGNATURE_RINGS else 74.0,
"struct_trophic_capture": 94.0 if ("S6" in item["guilds"] and len(item["guilds"]) >= 2) else (84.0 if len(item["guilds"]) >= 2 else 68.0),
"struct_prime_density": 95.0 if (is_p_ing and is_p_eng) else (86.0 if is_p_ing else 64.0),
"struct_repricing_resilience": min(98.0, round(58.0 + 1.2 * tot_locks, 1)),
}
comp_score = round(
0.20 * struct_vec["struct_trophic_capture"]
+ 0.18 * struct_vec["struct_variance_collapse"]
+ 0.18 * struct_vec["struct_isometric_armor"]
+ 0.16 * struct_vec["struct_prime_density"]
+ 0.14 * struct_vec["struct_drift_velocity"]
+ 0.14 * struct_vec["struct_repricing_resilience"],
1,
)
ts_moments = compute_timeseries_moments(
daily_points=daily_pts,
active_flags=active_flags,
wire_shares=wire_shares,
cap_shares=cap_shares,
expected_null_locks=round(len(avail_rows) * 0.32, 2) if avail_rows else None,
observed_locks=tot_locks if avail_rows else None,
wire_vel_series=wire_vel_global,
abs_bps_series=abs_bps,
regime_series=daily_regimes,
available_trading_days=len(avail_rows),
)
ts_moments["available_trading_days"] = len(avail_rows)
ts_moments["missing_trading_days"] = num_days - len(avail_rows)
ts_moments["market_data_status"] = "ok" if avail_rows else NO_DATA_AVAILABLE
tv_info = resolve_tradingview_target(sym)
doc_refs = build_instrument_doc_references(sym, ent_eng, ent_ing, ent_ing_aq, item["guilds"])
inst_obj: dict[str, Any] = {
"symbol": sym,
"entity_eng": ent_eng,
"entity_ing": ent_ing,
"entity_eng_aq": ent_eng_aq,
"entity_ing_aq": ent_ing_aq,
"isometric_entity": is_iso,
"guilds": item["guilds"],
"data_available": len(avail_rows) > 0,
"status": "ok" if avail_rows else f"{NO_DATA_AVAILABLE} (private entity — no public exchange feed)",
"available_trading_days": len(avail_rows),
"tradingview_symbol": tv_info["tradingview_symbol"],
"tradingview_url": tv_info["tradingview_url"],
"doc_references": doc_refs,
"composite_score": comp_score,
"structural_vector": struct_vec,
"timeseries_moments": ts_moments,
"lens_projections": apply_all_lenses(struct_vec, ts_moments, comp_score, active_lenses),
"bars": s_rows,
}
if "pokedex_scanner" in active_lenses:
inst_obj["pokedex_profile"] = derive_pokedex_specimen_profile(sym, inst_obj)
instruments_out.append(inst_obj)
# Aggregate guild / assemblage build time-series profiles (connecting to TierZoo assemblage-builds-tier-list.json)
tl_path = cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json"
builds_out: list[dict[str, Any]] = []
if tl_path.is_file():
tl_data = json.loads(tl_path.read_text(encoding="utf-8"))
for row in tl_data.get("rows", []):
s6 = row.get("stats_6") or {}
b_struct = {
"struct_isometric_armor": float(s6.get("ARM_chokepoint_armor", 70)),
"struct_drift_velocity": float(s6.get("VEL_teleoplexic_velocity", 70)),
"struct_variance_collapse": float(s6.get("COL_variance_collapse", 70)),
"struct_trophic_capture": float(s6.get("CAP_trophic_capture", 70)),
"struct_prime_density": float(s6.get("PRM_prime_mutation_iq", 70)),
"struct_repricing_resilience": float(s6.get("RES_repricing_resilience", 70)),
}
b_code = str(row.get("eval_file", "S1"))
g_prefix = b_code[:2]
matching_insts = [inst for inst in instruments_out if g_prefix in inst["guilds"]]
if not matching_insts:
matching_insts = instruments_out[:3]
b_daily_pts: list[float | None] = []
b_abs_bps: list[float | None] = []
for d_i in range(num_days):
pts_d = [float(inst["bars"][d_i]["contingent_points"]) for inst in matching_insts if inst["bars"][d_i]["contingent_points"] is not None]
b_daily_pts.append(round(sum(pts_d) / len(pts_d), 2) if pts_d else None)
bps_d = [abs(int(inst["bars"][d_i]["change_bps"])) for inst in matching_insts if inst["bars"][d_i]["change_bps"] is not None]
b_abs_bps.append(round(sum(bps_d) / len(bps_d), 1) if bps_d else None)
b_active = [any((inst["bars"][d_i]["contingent_points"] or 0) > 0 for inst in matching_insts) for d_i in range(num_days)]
b_wire_sh: list[float | None] = [None for _ in range(num_days)]
b_cap_sh: list[float | None] = [None for _ in range(num_days)]
b_locks = sum(
len(inst["bars"][d_i]["scope1_locks"]) + len(inst["bars"][d_i]["scope2_ring_coordinates"])
for inst in matching_insts
for d_i in range(num_days)
) // max(1, len(matching_insts))
b_ts = compute_timeseries_moments(
daily_points=b_daily_pts,
active_flags=b_active,
wire_shares=b_wire_sh,
cap_shares=b_cap_sh,
expected_null_locks=round(num_days * 0.32, 2),
observed_locks=b_locks,
wire_vel_series=wire_vel_global,
abs_bps_series=b_abs_bps,
regime_series=daily_regimes,
)
base_eti = float(row.get("curve_score", 75))
eor_val = b_ts.get("ts_excess_over_replacement")
live_eti = (
max(40.0, min(99.0, round(base_eti + 0.35 * float(eor_val), 1)))
if eor_val is not None
else base_eti
)
builds_out.append({
"rank": row.get("rank"),
"build_code": b_code,
"title": row.get("title"),
"roster_slot": row.get("roster_slot"),
"base_composite_score": base_eti,
"live_timeseries_score": live_eti,
"doc_references": {
"encyclopedia_volume_rel": "07-ecological-trophic-index-and-tier-list/a-to-z-arm-chokepoint-armor-to-zoological-tie-breaker.pdf",
"encyclopedia_deep_link": f"/encyclopedia/07-ecological-trophic-index-and-tier-list/a-to-z-arm-chokepoint-armor-to-zoological-tie-breaker.pdf#page=1&search={urllib.parse.quote(g_prefix)}",
"knowledge_graph_deep_link": f"/graph/index.html?select=build:{g_prefix}",
"exemplar_dossier_deep_link": f"/zoology/tier-list-technocapital-assemblage-builds.pdf#page=1&search={urllib.parse.quote(g_prefix)}",
"rest_api_deep_link": f"/api/v1/zoology/tier-list?build_filter={urllib.parse.quote(g_prefix)}",
},
"structural_vector": b_struct,
"timeseries_moments": b_ts,
"lens_projections": apply_all_lenses(b_struct, b_ts, live_eti, active_lenses),
})
anchor_revision_series = [
{
"anchor_id": "lazarus_heist_6b",
"date_utc": "2026-11-01",
"symbol": "BTC-USD",
"q_old_digit": "$6B",
"q_new_digit": "$6B",
"coordinate": 211,
"source_dossier": "25-dossier-news-2026-11-01.md",
"description": "Lazarus $6B heist ('siks bilyan' = 211 [47th PRIME] == wor masheen == koper waier) in Dossier 25.",
},
{
"anchor_id": "anthropic_ipo_price_83",
"date_utc": "2026-11-18",
"symbol": "ANTHR-PVT",
"q_old_digit": "$83",
"q_new_digit": "$83",
"coordinate": 202,
"source_dossier": "55-dossier-news-2026-11-18.md",
"description": "Anthropic valuation share anchor $83 ('aytee three' = 202) in Dossier 55 (no public exchange market data available).",
},
{
"anchor_id": "bangladesh_factories_481",
"date_utc": "2026-11-24",
"symbol": "TSM",
"q_old_digit": "481",
"q_new_digit": "481",
"coordinate": 13,
"source_dossier": "62-dossier-news-2026-11-24.md",
"description": "481 halted garment factories ('4+8+1 = 13') in Dossier 62.",
},
]
receipt = guard.audit_receipt()
bundle: dict[str, Any] = {
"$schema": "./schemas/v1/quant-timeseries.schema.json",
"$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries",
"version": CURRENT_VERSION,
"namespace_urn": f"urn:io:hyperstitionstud:quant-timeseries:{CURRENT_VERSION}",
"generated_at_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"synthetic_data_eliminated": True,
"periodicity_gate": {
"enforced": True,
"allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"],
"dated_news_dossiers_ingested": len(dated_dossiers),
"excluded_non_periodic_sources": EXCLUDED_NON_PERIODIC_SOURCES,
"non_periodic_records_ingested": 0,
"missing_data_policy": "No data available (never synthesized or interpolated)",
},
"enabled_lenses": list(active_lenses),
"default_lens": DEFAULT_LENS if DEFAULT_LENS in active_lenses else active_lenses[0],
"lens_registry_meta": {
lid: {
"lens_id": LENS_REGISTRY[lid]["lens_id"],
"title": LENS_REGISTRY[lid]["title"],
"short_label": LENS_REGISTRY[lid]["short_label"],
"structural_labels": LENS_REGISTRY[lid]["structural_labels"],
"timeseries_labels": LENS_REGISTRY[lid]["timeseries_labels"],
}
for lid in active_lenses
},
"dates_utc": dates_utc,
"instruments": instruments_out,
"builds": builds_out,
"daily_wire_series": daily_wire_series,
"anchor_revision_series": anchor_revision_series,
"isolation_receipt": receipt,
}
bundle["ipld_dag_json_cidv1"] = {"/": compute_dag_json_cidv1(bundle)}
if write_files:
quant_site_dir = cfg.core_dir / "site" / "quant"
quant_site_dir.mkdir(parents=True, exist_ok=True)
json_path = quant_site_dir / "quant-timeseries.json"
js_path = quant_site_dir / "quant-timeseries-data.js"
write_pretty_and_dag_json(json_path, bundle)
js_content = (
"// Auto-generated synchronous time-series bundle for file:// and https:// portability\n"
"window.HyperstitionStudio = window.HyperstitionStudio || {};\n"
f"window.HyperstitionStudio.QuantTimeSeries = {json.dumps(bundle, ensure_ascii=False)};\n"
)
js_path.write_text(js_content, encoding="utf-8")
return bundle
+225
View File
@@ -0,0 +1,225 @@
#!/usr/bin/env python3
"""
hyperstitionstud_io.version_sync — Single-Source-of-Truth Version Synchronizer & Verifier (`hs-sync-version`).
Ensures that every visible version badge across all HTML site surfaces (`/`, `/learn/`, `/gallery/`,
`/graph/`, `/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html`, `/calc/`), JS bundles,
MCP/Quant servers, and package manifests updates in lockstep on every version change.
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from pathlib import Path
from typing import Any
_SRC_DIR = Path(__file__).resolve().parents[1]
if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
sys.path.insert(0, str(_SRC_DIR))
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
SEMVER_RE = r"\d+\.\d+\.\d+"
def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tuple[str, str]]]]:
cfg = load_workspace_config(workspace_root=ws_root)
core = cfg.core_dir
kg = cfg.knowledge_graph_dir
calc = cfg.paths["gematria_js_dir"]
return [
(
core / "src" / "hyperstitionstud_io" / "__init__.py",
[
(rf'\(v{SEMVER_RE}\)', "(v{V})"),
(rf'__version__\s*=\s*"{SEMVER_RE}"', '__version__ = "{V}"'),
],
),
(
core / "pyproject.toml",
[(rf'^version\s*=\s*"{SEMVER_RE}"', 'version = "{V}"')],
),
(
core / "package.json",
[(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"')],
),
(
core / "packages-js" / "ciphers-aq" / "package.json",
[(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"')],
),
(
core / "workspace.example.toml",
[(rf'schema_version\s*=\s*"{SEMVER_RE}"', 'schema_version = "{V}"')],
),
(
core / "site" / "index.html",
[
(rf'urn:io:hyperstitionstud \(v{SEMVER_RE}\)', "urn:io:hyperstitionstud (v{V})"),
(rf'urn:io:hyperstitionstud v{SEMVER_RE}\)', "urn:io:hyperstitionstud v{V})"),
(rf'graph-data\.js\?v={SEMVER_RE}', "graph-data.js?v={V}"),
],
),
(
core / "site" / "learn" / "index.html",
[
(rf'learn-progress-state v{SEMVER_RE}\)', "learn-progress-state v{V})"),
(rf'learn-app\.js\?v={SEMVER_RE}', "learn-app.js?v={V}"),
],
),
(
core / "site" / "learn" / "learn-app.js",
[
(rf'version:\s*"{SEMVER_RE}"', 'version: "{V}"'),
],
),
(
core / "site" / "quant" / "index.html",
[
(rf'urn:io:hyperstitionstud:quant-timeseries:v{SEMVER_RE}\)', "urn:io:hyperstitionstud:quant-timeseries:v{V})"),
(rf'hyperstitionstud\.io/quant v{SEMVER_RE}', "hyperstitionstud.io/quant v{V}"),
(rf'quant-timeseries-data\.js\?v={SEMVER_RE}', "quant-timeseries-data.js?v={V}"),
(rf'quant-app\.js\?v={SEMVER_RE}', "quant-app.js?v={V}"),
(rf'quant-tutorials\.js\?v={SEMVER_RE}', "quant-tutorials.js?v={V}"),
],
),
(
core / "site" / "quant" / "quant-app.js",
[
(rf'Time-Series Workbench \(v{SEMVER_RE}\)', "Time-Series Workbench (v{V})"),
],
),
(
core / "site" / "quant" / "quant-tutorials.js",
[
(rf'Deep-Link Choreographer \(v{SEMVER_RE}\)', "Deep-Link Choreographer (v{V})"),
(rf'version:\s*"{SEMVER_RE}"', 'version: "{V}"'),
],
),
(
core / "site" / "donate" / "index.html",
[
(rf'urn:io:hyperstitionstud:donate:v{SEMVER_RE}', "urn:io:hyperstitionstud:donate:v{V}"),
(rf'hyperstitionstud\.io/donate v{SEMVER_RE}', "hyperstitionstud.io/donate v{V}"),
],
),
(
core / "site" / "gallery" / "index.html",
[
(rf'urn:io:hyperstitionstud:gallery:{SEMVER_RE}\)', "urn:io:hyperstitionstud:gallery:{V})"),
],
),
(
core / "scripts" / "build_gallery_manifest.py",
[
(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"'),
(rf'urn:io:hyperstitionstud:gallery:{SEMVER_RE}', "urn:io:hyperstitionstud:gallery:{V}"),
],
),
(
core / "src" / "hyperstitionstud_io" / "mcp" / "server.py",
[
(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"'),
(rf'urn:io:hyperstitionstud:mcp:{SEMVER_RE}', "urn:io:hyperstitionstud:mcp:{V}"),
],
),
(
core / "src" / "hyperstitionstud_io" / "quant" / "collector.py",
[
(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"'),
],
),
(
kg / "index.html",
[
(rf'Interactive Knowledge Graph \(v{SEMVER_RE}\)', "Interactive Knowledge Graph (v{V})"),
(rf'Zero Glossary Leak(?: &bull; v{SEMVER_RE})?</p>', "Zero Glossary Leak &bull; v{V}</p>"),
(rf'(?:hyperstitionstud\.io/graph v{SEMVER_RE} &bull; )?Made with <span class="hs-heart"', "hyperstitionstud.io/graph v{V} &bull; Made with <span class=\"hs-heart\""),
(rf'graph-data\.js\?v={SEMVER_RE}', "graph-data.js?v={V}"),
],
),
(
kg / "scripts" / "build_encyclopedia_knowledge_graph.py",
[
(rf'"version":\s*"{SEMVER_RE}"', '"version": "{V}"'),
],
),
(
kg / "docs" / "cross-repo-dependency-and-audit-flow-diagram.html",
[
(rf'technocapital-singularity-zoology \(v{SEMVER_RE}\)', "technocapital-singularity-zoology (v{V})"),
(rf'encyclopedia-knowledge-graph \(v{SEMVER_RE}\)', "encyclopedia-knowledge-graph (v{V})"),
],
),
(
calc / "index.html",
[
(rf'(?:hyperstitionstud\.io/calc v{SEMVER_RE} &bull; )?Made with <span class="hs-heart"', "hyperstitionstud.io/calc v{V} &bull; Made with <span class=\"hs-heart\""),
],
),
]
def sync_workspace_version(target_version: str, check_only: bool = False, ws_root: Path | None = None) -> dict[str, Any]:
v = target_version.lstrip("v").strip()
if not re.match(rf"^{SEMVER_RE}$", v):
raise ValueError(f"Invalid semantic version '{target_version}' (expected X.Y.Z)")
cfg = load_workspace_config(workspace_root=ws_root)
targets = get_version_targets(ws_root=ws_root)
modified_files: list[str] = []
mismatched_files: list[str] = []
for path, patterns in targets:
if not path.is_file():
continue
orig = path.read_text(encoding="utf-8")
updated = orig
for pat_re, repl_tmpl in patterns:
repl = repl_tmpl.replace("{V}", v)
updated = re.sub(pat_re, repl, updated, flags=re.M)
if f"v{v}" not in updated and f'"{v}"' not in updated and f":{v}" not in updated:
mismatched_files.append(str(path))
elif updated != orig:
if check_only:
mismatched_files.append(str(path))
else:
path.write_text(updated, encoding="utf-8")
modified_files.append(str(path))
if not check_only:
ws_toml = cfg.workspace_root / "workspace.toml"
if ws_toml.is_file():
orig_ws = ws_toml.read_text(encoding="utf-8")
upd_ws = re.sub(rf'schema_version\s*=\s*"{SEMVER_RE}"', f'schema_version = "{v}"', orig_ws, flags=re.M)
if upd_ws != orig_ws:
ws_toml.write_text(upd_ws, encoding="utf-8")
modified_files.append(str(ws_toml))
return {
"target_version": v,
"check_only": check_only,
"all_in_sync": len(mismatched_files) == 0,
"modified_files": modified_files,
"mismatched_files": mismatched_files,
}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(prog="hs-sync-version", description="Synchronize or verify version numbers across all site elements and manifests.")
ap.add_argument("--set", dest="set_version", default=None, help="Set new version X.Y.Z across all site HTML elements, JS bundles, and manifests.")
ap.add_argument("--check", action="store_true", help="Verify that all site elements match hyperstitionstud_io.__version__ without modifying files.")
args = ap.parse_args(argv)
target_v = args.set_version.lstrip("v") if args.set_version else CURRENT_VERSION
res = sync_workspace_version(target_v, check_only=args.check)
print(json.dumps(res, indent=2))
return 0 if res["all_in_sync"] else 1
if __name__ == "__main__":
raise SystemExit(main())
+401 -1
View File
@@ -11,6 +11,7 @@ Tests:
from __future__ import annotations
import json
import re
import sys
from pathlib import Path
@@ -44,12 +45,30 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
cfg = load_workspace_config()
for html_p in (
cfg.core_dir / "site" / "index.html",
cfg.core_dir / "site" / "donate" / "index.html",
cfg.core_dir / "site" / "learn" / "index.html",
cfg.core_dir / "site" / "quant" / "index.html",
cfg.core_dir / "site" / "gallery" / "index.html",
cfg.knowledge_graph_dir / "index.html",
cfg.knowledge_graph_dir / "docs" / "cross-repo-dependency-and-audit-flow-diagram.html",
cfg.paths["gematria_js_dir"] / "index.html",
):
txt = html_p.read_text(encoding="utf-8")
assert "fonts.googleapis.com" not in txt
assert "https://hyperstitionstud.io" not in txt
assert "by Lemurs." in txt, f"Missing global Lemurs footer in {html_p}"
assert ("&#x2665;" in txt or "♥" in txt), f"Missing Unicode heart in {html_p}"
for nav_p in (
cfg.core_dir / "site" / "index.html",
cfg.core_dir / "site" / "learn" / "index.html",
cfg.core_dir / "site" / "quant" / "index.html",
):
nav_txt = nav_p.read_text(encoding="utf-8")
assert "btn-donate-pill" in nav_txt, f"Missing distinct stadium-pill Donate button in {nav_p}"
assert "donate-pill-emblem" in nav_txt, f"Missing circular 1:2 Donate emblem in {nav_p}"
assert "nav-donate-sep" in nav_txt, f"Missing vertical divider before Donate pill in {nav_p}"
assert "margin-left: auto" in nav_txt, f"Missing right-justification margin-left: auto in {nav_p}"
schemas_dir = cfg.core_dir / "schemas" / "v1"
for sp in schemas_dir.glob("*.schema.json"):
@@ -57,6 +76,13 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
assert s_obj["$id"].startswith("urn:io:hyperstitionstud:schema:v1:")
assert "https://hyperstitionstud.io" not in sp.read_text(encoding="utf-8")
# Verify all visible site version numbers match hyperstitionstud_io.__version__
from hyperstitionstud_io import __version__ as cur_ver
from hyperstitionstud_io.version_sync import sync_workspace_version
v_sync = sync_workspace_version(cur_ver, check_only=True, ws_root=cfg.workspace_root)
assert v_sync["all_in_sync"] is True, f"Site version drift detected: {v_sync['mismatched_files']}"
def test_ciphers_and_bilingual_ledger_parity() -> None:
cfg = load_workspace_config()
@@ -138,6 +164,378 @@ def test_doctor_all_checks_pass() -> None:
assert diag["all_checks_passed"] is True
def test_ipld_quant_and_mcp_server() -> None:
from hyperstitionstud_io.ipld import compute_dag_json_cidv1, encode_dag_json
from hyperstitionstud_io.mcp.server import dispatch_jsonrpc
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest
# 1. IPLD dag-json & CIDv1 deterministic parity
b1 = encode_dag_json({"b": 2, "a": 1})
b2 = encode_dag_json({"a": 1, "b": 2})
assert b1 == b2 == b'{"a":1,"b":2}'
cid = compute_dag_json_cidv1({"a": 1, "b": 2})
assert cid.startswith("baguqeera")
# 2. Quantitative Financial Telemetry Collector (100% Real Exchange Observations — Zero Synthesized Data)
from hyperstitionstud_io.quant.collector import CANONICAL_WATCHLIST_24, NO_DATA_AVAILABLE
assert all("close_usd" not in item for item in CANONICAL_WATCHLIST_24), "Watchlist metadata must not hardcode fake prices"
q_harvest = build_financial_quant_harvest(live_fetch=False)
assert q_harvest["harvest_mode"] == "us-closing-bell"
assert q_harvest["synthetic_data_eliminated"] is True
assert q_harvest["regime_summary"]["instrument_count"] == 24
assert q_harvest["regime_summary"]["instruments_with_data_count"] == 23
assert q_harvest["regime_summary"]["instruments_without_data"] == ["ANTHR-PVT"]
assert q_harvest["isolation_receipt"]["all_unchanged"] is True
assert q_harvest["ipld_dag_json_cidv1"]["/"].startswith("baguqeera")
anthr_inst = next(x for x in q_harvest["instruments"] if x["symbol"] == "ANTHR-PVT")
assert anthr_inst["data_available"] is False
assert NO_DATA_AVAILABLE in anthr_inst["status"]
assert anthr_inst["metrics"]["close_usd"] is None
assert anthr_inst["quant_encodings"]["close_spoken_ing"] == NO_DATA_AVAILABLE
nvda_inst = next(x for x in q_harvest["instruments"] if x["symbol"] == "NVDA")
assert nvda_inst["data_available"] is True
assert nvda_inst["metrics"]["close_usd"] == 150.49
assert nvda_inst["metrics"]["market_cap_str"] == NO_DATA_AVAILABLE
sol_inst = next(x for x in q_harvest["instruments"] if x["symbol"] == "SOL-USD")
assert sol_inst["data_available"] is True
assert sol_inst["metrics"]["close_usd"] == 71.71
assert sol_inst["metrics"]["market_cap_str"] == "$43B"
q_rollover = build_financial_quant_harvest(harvest_mode="utc-rollover", live_fetch=False)
assert q_rollover["harvest_mode"] == "utc-rollover"
assert q_rollover["isolation_receipt"]["all_unchanged"] is True
# 3. MCP Server JSON-RPC 2.0 Dispatch (initialize, tools/list, tools/call, resources/read, prompts/get)
init_resp = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-03-26"}})
assert init_resp and init_resp["result"]["serverInfo"]["name"] == "hyperstitionstudio-mcp"
t_list = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 2, "method": "tools/list"})
assert t_list and len(t_list["result"]["tools"]) == 12
t_call = dispatch_jsonrpc({
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {"name": "hs_evaluate_aq_and_ingglish", "arguments": {"terms": ["schizoanalysis", "abstract machine", "synthetic data"]}},
})
assert t_call and t_call["result"]["isError"] is False
parsed_tool = json.loads(t_call["result"]["content"][0]["text"])
assert parsed_tool["exact_gen1_singularity"] is True
q_call = dispatch_jsonrpc({
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {"name": "hs_scan_financial_quant_harvest", "arguments": {"symbol_filter": "NVDA"}},
})
assert q_call and q_call["result"]["isError"] is False
parsed_q = json.loads(q_call["result"]["content"][0]["text"])
assert len(parsed_q["instruments"]) == 1 and parsed_q["instruments"][0]["symbol"] == "NVDA"
r_read = dispatch_jsonrpc({
"jsonrpc": "2.0",
"id": 5,
"method": "resources/read",
"params": {"uri": "urn:io:hyperstitionstud:dossier:65"},
})
assert r_read and "292" in r_read["result"]["contents"][0]["text"]
p_get = dispatch_jsonrpc({
"jsonrpc": "2.0",
"id": 6,
"method": "prompts/get",
"params": {"name": "analyze_headline_zoology", "arguments": {"headline": "Nvidia Blackwell halts"}},
})
assert p_get and len(p_get["result"]["messages"]) == 1
# 4. Periodic Time-Series Bundle, LENS_REGISTRY Reversibility & REST API v1 (/api/v1/*)
from hyperstitionstud_io.mcp.rest import dispatch_rest_v1
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle
ts_full = build_quant_timeseries_bundle(write_files=False)
assert ts_full["synthetic_data_eliminated"] is True
assert ts_full["periodicity_gate"]["enforced"] is True
assert ts_full["periodicity_gate"]["non_periodic_records_ingested"] == 0
assert ts_full["periodicity_gate"]["dated_news_dossiers_ingested"] >= 20
assert len(ts_full["dates_utc"]) == 30
assert all(re.match(r"^\d{4}-\d{2}-\d{2}$", d) for d in ts_full["dates_utc"])
assert len(ts_full["instruments"]) == 24
anthr_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "ANTHR-PVT")
assert anthr_ts["data_available"] is False
assert anthr_ts["available_trading_days"] == 0
assert all(b["data_available"] is False and b["status"] == NO_DATA_AVAILABLE and b["close_usd"] is None for b in anthr_ts["bars"])
assert all(b["contingent_points"] is None for b in anthr_ts["bars"] if not b["co_present_in_news_wire"])
assert anthr_ts["timeseries_moments"]["ts_duty_cycle_pct"] is None
assert anthr_ts["timeseries_moments"]["ts_weighted_resonance"] is None
assert anthr_ts["timeseries_moments"]["ts_excess_over_replacement"] is None
assert anthr_ts["timeseries_moments"]["ts_optimal_lag_days"] is None
assert anthr_ts["timeseries_moments"]["ts_sparkline_30d"] is None
assert anthr_ts["timeseries_moments"]["ts_quantile_profile"]["p20_floor"] is None
assert all(v is None for v in anthr_ts["timeseries_moments"]["ts_lag_correlation_curve"].values())
assert all(v is None for v in anthr_ts["timeseries_moments"]["ts_regime_splits"].values())
assert anthr_ts["pokedex_profile"]["level"] is None
assert anthr_ts["pokedex_profile"]["nature"] is None
pltr_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "PLTR")
assert pltr_ts["data_available"] is True
assert any("CLOSE_SELF_LOCK (159==palanter)" in (b["scope1_locks"] or []) for b in pltr_ts["bars"])
nvda_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "NVDA")
assert nvda_ts["data_available"] is True
assert nvda_ts["available_trading_days"] == 19
assert sum(1 for b in nvda_ts["bars"] if not b["data_available"] and b["status"] == NO_DATA_AVAILABLE) == 11
assert nvda_ts["tradingview_symbol"] == "NASDAQ:NVDA"
assert "tradingview.com/chart/?symbol=NASDAQ%3ANVDA" in nvda_ts["tradingview_url"]
assert "doc_references" in nvda_ts
assert "#page=" in nvda_ts["doc_references"]["encyclopedia_deep_link"]
assert "search=" in nvda_ts["doc_references"]["encyclopedia_deep_link"]
assert "?select=aq:137" in nvda_ts["doc_references"]["knowledge_graph_deep_link"]
assert "#:~:text=" in nvda_ts["doc_references"]["exemplar_dossier_deep_link"]
assert "struct_isometric_armor" in nvda_ts["structural_vector"]
assert "ts_duty_cycle_pct" in nvda_ts["timeseries_moments"]
assert "fund_manager" in nvda_ts["lens_projections"]
assert "pokedex_scanner" in nvda_ts["lens_projections"]
sample_wire_day = next(d for d in ts_full["daily_wire_series"] if d["sample_equations"])
sample_eq = sample_wire_day["sample_equations"][0]
assert "#:~:text=" in sample_eq["dossier_deep_link"]
assert "?highlight=" in sample_eq["api_highlight_link"]
assert any("?select=aq:" in gl for gl in sample_eq["graph_hub_links"])
# Verify 100% lens-removal invariance when pokedex_scanner, tierzoo_ecology, and fantasy_sabermetrics are disabled
ts_stripped = build_quant_timeseries_bundle(enabled_lenses=("neutral_math", "fund_manager"), write_files=False)
assert ts_stripped["enabled_lenses"] == ["neutral_math", "fund_manager"]
nvda_stripped = next(x for x in ts_stripped["instruments"] if x["symbol"] == "NVDA")
assert set(nvda_stripped["lens_projections"].keys()) == {"neutral_math", "fund_manager"}
assert "pokedex_profile" not in nvda_stripped
assert ts_stripped["isolation_receipt"]["all_unchanged"] is True
# Verify REST API v1 endpoints (/api/v1/*)
st_code, _, st_body = dispatch_rest_v1("GET", "/api/v1/status")
assert st_code == 200 and st_body["ok"] is True and st_body["isolation_verified"] is True
oa_code, _, oa_body = dispatch_rest_v1("GET", "/api/v1/openapi.json")
assert oa_code == 200 and oa_body["openapi"] == "3.1.0" and "/api/v1/ciphers/evaluate" in oa_body["paths"]
ev_code, _, ev_body = dispatch_rest_v1("GET", "/api/v1/ciphers/evaluate?terms=schizoanalysis,abstract%20machine,synthetic%20data")
assert ev_code == 200 and ev_body["data"]["exact_gen1_singularity"] is True
qi_code, _, qi_body = dispatch_rest_v1("GET", "/api/v1/quant/instruments/NVDA?raw=1")
assert qi_code == 200 and len(qi_body["instruments"]) == 1 and qi_body["instruments"][0]["symbol"] == "NVDA"
gn_code, _, gn_body = dispatch_rest_v1("GET", "/api/v1/graph/nodes/aq:125")
assert gn_code == 200 and gn_body["ok"] is True
pk_code, _, pk_body = dispatch_rest_v1("GET", "/api/v1/zoology/pokedex/NVDA")
assert pk_code == 200 and pk_body["data"]["instruments"][0]["pokedex_profile"]["dex_number"] == "DEX #137"
d_code, d_ctype, d_body = dispatch_rest_v1("GET", "/api/v1/dossiers/65?format=raw")
assert d_code == 200 and "text/markdown" in d_ctype and "292" in d_body
hl_code, _, hl_body = dispatch_rest_v1("GET", "/api/v1/dossiers/65?highlight=292")
assert hl_code == 200 and hl_body["data"]["match_count"] >= 1 and len(hl_body["data"]["matched_passages"]) >= 1
qts_code, _, qts_body = dispatch_rest_v1("GET", "/api/v1/quant/timeseries?symbol=NVDA")
assert qts_code == 200 and qts_body["ok"] is True and len(qts_body["data"]["instruments"]) == 1
# Verify every single link in quant-tutorials.js, doc_references, and OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.md resolves cleanly
cfg = load_workspace_config()
tut_js_path = cfg.core_dir / "site" / "quant" / "quant-tutorials.js"
tut_js_txt = tut_js_path.read_text(encoding="utf-8")
assert "let speechEnabled = true;" in tut_js_txt, "Tutorial voice narration must be enabled by default"
assert "playWebAudioTelemetryChime" in tut_js_txt, "WebAudio fallback chime must be present when OS TTS voices are absent"
all_quant_links: set[str] = set(re.findall(r'href:\s*"([^"]+)"', tut_js_txt))
for inst in ts_full["instruments"]:
for v in (inst.get("doc_references") or {}).values():
if isinstance(v, str) and v.startswith("/"):
all_quant_links.add(v)
for b_item in ts_full["builds"]:
for v in (b_item.get("doc_references") or {}).values():
if isinstance(v, str) and v.startswith("/"):
all_quant_links.add(v)
route_prefix_map = {
"/encyclopedia/": cfg.zoology_dir / "encyclopedia",
"/zoology/": cfg.zoology_dir,
"/archive/": cfg.archive_dir / "ingglish-aq-archive",
"/graph/": cfg.knowledge_graph_dir,
"/learn/": cfg.core_dir / "site" / "learn",
"/quant/": cfg.core_dir / "site" / "quant",
"/donate/": cfg.core_dir / "site" / "donate",
"/schemas/": cfg.core_dir / "schemas",
}
for link in sorted(all_quant_links):
if link.startswith("https://"):
continue
no_frag = link.split("#")[0]
base_p = no_frag.split("?")[0]
if base_p.startswith("/api/v1"):
l_code, _, _ = dispatch_rest_v1("GET", no_frag)
assert l_code == 200, f"Broken tutorial/doc_references REST API link: {link} (status {l_code})"
else:
matched_fs = None
for pref, fs_dir in route_prefix_map.items():
if base_p.startswith(pref):
matched_fs = fs_dir / base_p[len(pref):]
break
assert matched_fs is not None and matched_fs.is_file(), f"Broken tutorial/doc_references static link: {link} -> {matched_fs}"
err_code, _, err_body = dispatch_rest_v1("GET", "/api/v1/ciphers/evaluate")
assert err_code == 422 and err_body["ok"] is False
# 5. SQLite + FTS5 Catalog, Automatic REST/MCP Telemetry Population, Inactive Plan Isolation & Quiescent Logrotate Truncation
import os
import sqlite3
import tempfile
from hyperstitionstud_io.db.sqlite_meta import (
DEFAULT_MAX_TELEMETRY_BYTES,
build_catalog_sqlite_db,
get_api_telemetry_summary,
get_default_telemetry_db_path,
parse_size_spec_bytes,
query_coordinate_join,
query_fts_catalog,
query_registry_manifests,
query_timeseries_bars,
run_logrotate_directive,
truncate_telemetry_db_quiescent,
)
assert DEFAULT_MAX_TELEMETRY_BYTES == 100 * 1024 * 1024
assert parse_size_spec_bytes("100M") == 100 * 1024 * 1024
assert parse_size_spec_bytes("100MB") == 100 * 1024 * 1024
prev_env_chk = os.environ.pop("HYPERSTITION_TELEMETRY_DB_PATH", None)
try:
def_tel_p = get_default_telemetry_db_path()
assert str(def_tel_p) == "/var/lib/hyperstitionstud.io/api-telemetry.db" or ".cache/hyperstitionstud.io" in str(def_tel_p)
finally:
if prev_env_chk is not None:
os.environ["HYPERSTITION_TELEMETRY_DB_PATH"] = prev_env_chk
with tempfile.TemporaryDirectory() as tmp_dir:
tmp_path = Path(tmp_dir)
cat_db = tmp_path / "test-catalog.db"
tel_db = tmp_path / "test-telemetry.db"
cat_res = build_catalog_sqlite_db(cat_db)
assert cat_res["isolation_receipt"]["all_unchanged"] is True
assert cat_res["counts"]["registry_manifests"] >= 7
assert cat_res["counts"]["glossary_entries"] >= 282
assert cat_res["counts"]["kg_nodes"] == 388
assert cat_res["counts"]["kg_edges"] == 1282
assert cat_res["counts"]["dossiers"] >= 71
assert cat_res["counts"]["quant_timeseries_bars"] == 720
manifests = query_registry_manifests(cat_db)
assert any(m["registry_slug"] == "encyclopedia-graph" and m["dag_json_cidv1"].startswith("baguqeera") for m in manifests)
fts_res = query_fts_catalog("envideea", db_path=cat_db)
assert fts_res["match_count"] >= 1
coord_163 = query_coordinate_join(163, db_path=cat_db)
assert coord_163["coordinate_aq"] == 163
assert len(coord_163["kg_nodes"]) >= 1
assert len(coord_163["quant_timeseries_bars"]) >= 1
nvda_bars = query_timeseries_bars(symbol="NVDA", min_points=None, db_path=cat_db)
assert len(nvda_bars) == 30 and sum(1 for b in nvda_bars if b["data_available"] == 1) == 19
assert any(b["contingent_points"] is None for b in nvda_bars if b["data_available"] == 0)
# Verify MCP and REST API calls automatically populate the SQLite REST API metadata database
prev_tel_env = os.environ.get("HYPERSTITION_TELEMETRY_DB_PATH")
os.environ["HYPERSTITION_TELEMETRY_DB_PATH"] = str(tel_db)
try:
s1, _, _ = dispatch_rest_v1("GET", "/api/v1/status")
s2, _, _ = dispatch_rest_v1("GET", "/api/v1/quant/instruments/NVDA")
m1 = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 99, "method": "tools/list"})
assert s1 == 200 and s2 == 200 and m1 is not None
# Verify inactive plan routes (/api/v1/meta/*, hs_query_sqlite_catalog) remain unexposed (404)
inact_meta_code, _, _ = dispatch_rest_v1("GET", "/api/v1/meta/manifests")
inact_tool_code, _, _ = dispatch_rest_v1("GET", "/api/v1/tools/hs_query_sqlite_catalog")
assert inact_meta_code == 404
assert inact_tool_code == 404
summary_before = get_api_telemetry_summary(tel_db)
assert summary_before["total_requests"] == 5
assert summary_before["ringbuffer_count"] == 5
protocols_seen = {ep["protocol"] for ep in summary_before["endpoints"]}
assert protocols_seen == {"rest_v1", "mcp_jsonrpc"}
patterns_seen = {ep["endpoint_pattern"] for ep in summary_before["endpoints"]}
assert "/api/v1/status" in patterns_seen
assert "/api/v1/quant/instruments/{symbol}" in patterns_seen
assert "tools/list" in patterns_seen
assert all(ev["isolation_ok"] == 1 for ev in summary_before["recent_audit_events"])
# Verify logrotate.d file configuration (default 100M = 100MB, compress enabled, rotate >= 12) & no-op when below limit
import gzip
lr_noop = run_logrotate_directive(telemetry_db_path=tel_db)
assert lr_noop["configured_size_directive"].upper() == "100M"
assert lr_noop["configured_default_bytes"] == 100 * 1024 * 1024
assert lr_noop["compress_enabled"] is True
assert lr_noop["rotate_count"] >= 12
assert lr_noop["truncated"] is False
assert get_api_telemetry_summary(tel_db)["total_requests"] == 5
# Verify logrotate.d quiescent compression + truncation when DB size >= configured limit
lr_trunc = run_logrotate_directive(telemetry_db_path=tel_db, max_bytes_override=1024)
assert lr_trunc["truncated"] is True
assert lr_trunc["quiescent"] is True
assert lr_trunc["integrity_check"] == "ok"
assert lr_trunc["compressed_archive_path"] == f"{tel_db}.1.gz"
assert lr_trunc["compressed_archive_bytes"] > 0
assert Path(lr_trunc["compressed_archive_path"]).is_file()
# Verify the compressed .1.gz archive preserved all 5 pre-truncation requests & passes SQLite integrity_check
restored_db = tmp_path / "restored-from-gz.db"
with gzip.open(lr_trunc["compressed_archive_path"], "rb") as f_gz:
restored_db.write_bytes(f_gz.read())
with sqlite3.connect(str(restored_db)) as r_conn:
assert r_conn.execute("PRAGMA integrity_check;").fetchone()[0] == "ok"
assert get_api_telemetry_summary(restored_db)["total_requests"] == 5
summary_after = get_api_telemetry_summary(tel_db)
assert summary_after["total_requests"] == 0
assert summary_after["ringbuffer_count"] == 0
# Verify SQLite integrity_check == 'ok' and continued automatic population after quiescent truncation
with sqlite3.connect(str(tel_db)) as check_conn:
assert check_conn.execute("PRAGMA integrity_check;").fetchone()[0] == "ok"
s_post, _, _ = dispatch_rest_v1("GET", "/api/v1/status")
assert s_post == 200
assert get_api_telemetry_summary(tel_db)["total_requests"] == 1
# Also verify second rotation shifts .1.gz -> .2.gz and writes new .1.gz
direct_trunc = truncate_telemetry_db_quiescent(tel_db, max_bytes=512, force=False)
assert direct_trunc["truncated"] is True
assert direct_trunc["quiescent"] is True
assert direct_trunc["integrity_check"] == "ok"
assert Path(f"{tel_db}.1.gz").is_file()
assert Path(f"{tel_db}.2.gz").is_file()
# Verify regression guard: read-only / unwritable SQLite path (sqlite3.OperationalError) never causes 502/crash
os.environ["HYPERSTITION_TELEMETRY_DB_PATH"] = "/sys/hyperstition-readonly-telemetry.db"
ro_code, _, ro_body = dispatch_rest_v1("GET", "/api/v1/quant/timeseries?symbol=NVDA")
assert ro_code == 200 and ro_body["ok"] is True
ro_mcp = dispatch_jsonrpc({"jsonrpc": "2.0", "id": 100, "method": "ping"})
assert ro_mcp is not None and "result" in ro_mcp
finally:
if prev_tel_env is None:
os.environ.pop("HYPERSTITION_TELEMETRY_DB_PATH", None)
else:
os.environ["HYPERSTITION_TELEMETRY_DB_PATH"] = prev_tel_env
if __name__ == "__main__":
test_offline_urn_namespaces_and_no_external_https_fonts()
print("[PASS] test_offline_urn_namespaces_and_no_external_https_fonts")
@@ -151,4 +549,6 @@ if __name__ == "__main__":
print("[PASS] test_local_config_citation_resolution_and_proposals")
test_doctor_all_checks_pass()
print("[PASS] test_doctor_all_checks_pass")
print("ALL 6 TEST SUITES PASSED.")
test_ipld_quant_and_mcp_server()
print("[PASS] test_ipld_quant_and_mcp_server")
print("ALL 7 TEST SUITES PASSED.")
+1 -1
View File
@@ -1,6 +1,6 @@
# workspace.example.toml — Location-Independent Workspace Configuration Template (v1.2.0)
# Copy to your parent workspace folder: cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
schema_version = "1.2.0"
schema_version = "2.0.24"
namespace_urn = "urn:io:hyperstitionstud"
[paths]