Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bf65d4dfa | ||
|
|
808882e0a6 | ||
|
|
0d4b2a5d27 | ||
|
|
70a69ef647 | ||
|
|
9b587d6351 | ||
|
|
d4b7502501 | ||
|
|
3945e3648a | ||
|
|
1e2968f84e | ||
|
|
d526ede701 | ||
|
|
fe33f7d8e8 | ||
|
|
91cf671000 | ||
|
|
52153e76f0 | ||
|
|
5eca430cce | ||
|
|
fe4cb38f0b | ||
|
|
a70b8614f1 | ||
|
|
643454fbae | ||
|
|
24d66f706e | ||
|
|
d20e76a000 | ||
|
|
531f69e65a | ||
|
|
25f61dac33 | ||
|
|
7a016a6fbc | ||
|
|
d95446fc6c | ||
|
|
fff43cca6d | ||
|
|
2242cf4ecb | ||
|
|
120956278f | ||
|
|
224ce62fab | ||
|
|
f1792478b6 | ||
|
|
2c05f8e708 | ||
|
|
3a09d97953 | ||
|
|
888e847d41 | ||
|
|
576ac40f25 | ||
|
|
cb146c38e7 | ||
|
|
2e9292322c | ||
|
|
51f4a59e26 | ||
|
|
5625e287f5 | ||
|
|
cea16a1b21 | ||
|
|
4d8526438b | ||
|
|
ab5c4f57a3 | ||
|
|
bacaa9d09c | ||
|
|
234ddcbb9b | ||
|
|
fa274045dd | ||
|
|
1d3c29a9a1 | ||
|
|
8ae738e40f | ||
|
|
b273fb9f51 | ||
|
|
70fa5ee8c2 | ||
|
|
872ea7a02e | ||
|
|
e0cf9d49b6 | ||
|
|
b1352e46e1 | ||
|
|
0462f0b7bd | ||
|
|
9ae3beb05a | ||
|
|
9378c594f9 | ||
|
|
32cd771707 | ||
|
|
fab275c7a4 | ||
|
|
4415c871e6 | ||
|
|
352f54f30a | ||
|
|
d3240b3bd1 | ||
|
|
6c8a5bdaae | ||
|
|
ad8e84da57 | ||
|
|
031b799cb1 | ||
|
|
cb11f5ce0b | ||
|
|
bfcf295886 | ||
|
|
f78cf47e00 | ||
|
|
6624209f2b | ||
|
|
6af5d32b15 | ||
|
|
14c467fa4f | ||
|
|
a066a0d03d | ||
|
|
cc73a57bd8 | ||
|
|
75e80f6a66 | ||
|
|
72fc095489 | ||
|
|
c7d0bbd007 | ||
|
|
e788f357ff | ||
|
|
f0aaae680f | ||
|
|
40460c1695 | ||
|
|
50efacaba5 | ||
|
|
6aeaf4bc6f | ||
|
|
694240efd1 | ||
|
|
6112e64b18 | ||
|
|
6042520547 | ||
|
|
36e9372776 | ||
|
|
0f64b38725 | ||
|
|
b465312e3d | ||
|
|
2a882853a9 | ||
|
|
8ea64c11c1 | ||
|
|
e599f34525 | ||
|
|
b9703cda5e | ||
|
|
54e7f8ff61 | ||
|
|
64825ffd75 | ||
|
|
c644dcfb65 | ||
|
|
36867a4ff8 | ||
|
|
055e215090 | ||
|
|
d91d36ca5e | ||
|
|
74ef8b60a6 |
No files matched your search
@@ -5,3 +5,5 @@ src/*.egg-info/
|
|||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
*.tmp
|
*.tmp
|
||||||
|
.cache/
|
||||||
|
site/quant/audio/
|
||||||
@@ -1,6 +1,14 @@
|
|||||||
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.0.0`)
|
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.17.1`)
|
||||||
|
|
||||||
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.
|
<!-- HS-COMMIT-STATUS:START -->
|
||||||
|
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
||||||
|
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
||||||
|
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s)
|
||||||
|
> - **Touched Files / Surfaces:** `deploy/push-all-to-git-libre-audio.sh`
|
||||||
|
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||||
|
<!-- HS-COMMIT-STATUS:END -->
|
||||||
|
|
||||||
|
Shared Python common library (`hyperstitionstud_io.*`), stateless read-only Model Context Protocol (`/mcp`) & OpenAPI 3.1 REST (`/api/v1/*`) server, SQLite FTS5 metadata catalog (`hs-db-build`), offline `URN:` JSON Schema registry (`urn:io:hyperstitionstud:schema:v1:*`), and Group 3 Stealth Basalt web workbenches (`/`, `/learn/`, `/quant/`, `/engineering/`, `/math/`, `/donate/`) with the 4-Ring Hardened Polyglot REPL (`Guile Scheme`, `TypeScript`, `Rust`) and Subtle Cybernetic Code Rain (`hs-matrix-coderain.js`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -10,7 +18,7 @@ Shared Python common library (`hyperstitionstud_io.*`), offline `URN:` JSON Sche
|
|||||||
# 1. Create a parent workspace folder anywhere on your machine
|
# 1. Create a parent workspace folder anywhere on your machine
|
||||||
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
|
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
|
||||||
|
|
||||||
# 2. Clone the peer repositories over public HTTPS (no SSH key required)
|
# 2. Clone the 6 peer repositories over public HTTPS (no SSH key required)
|
||||||
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
|
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
|
||||||
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
|
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
|
||||||
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
|
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
|
||||||
@@ -33,25 +41,39 @@ pip install --no-deps -e ./hyperstitionstudio-core
|
|||||||
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
|
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
|
||||||
hs-doctor
|
hs-doctor
|
||||||
|
|
||||||
# 5. Run the 6-suite verification test runner (stdlib-compatible, zero pytest dependency required)
|
# 5. Run the 7-suite verification test runner (including ProtectSystem=strict EROFS introspection)
|
||||||
python3 hyperstitionstudio-core/tests/test_core_suite.py
|
python3 hyperstitionstudio-core/tests/test_core_suite.py
|
||||||
|
|
||||||
# 6. Test the complete per-repository web deployment locally across all 22 HTTP routes
|
# 6. Test the complete per-repository web deployment locally across all 63 HTTP routes + MCP/REST + P1-P6 smoke gates
|
||||||
./hyperstitionstudio-core/deploy/test-first-deployment.sh
|
./hyperstitionstudio-core/deploy/test-first-deployment.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Key Features (`v1.2.0`)
|
## Key Architecture & Capabilities (`v2.17.1`)
|
||||||
|
|
||||||
1. **100% Offline & Location-Independent Architecture (Zero `https://` Network Calls, Zero `/workspace` Lock-In):**
|
1. **17 CLI Entrypoints (`pyproject.toml [project.scripts]`):**
|
||||||
- Python package root: `hyperstitionstud_io.{config,ciphers,phonetics,publishing,glossary,graph,ci,audio}`
|
- `hs-doctor`, `hs-citations`, `hs-pdf-build`, `hs-kg-build`, `hs-quant-harvest`, `hs-macro-harvest`, `hs-daily-brief`, `hs-ticker-card`, `hs-mcp`, `hs-db-build`, `hs-sync-version`, `hs-readme-sync`, `hs-archive-rotate`, `hs-public-smoke`, `hs-eng-docs`, `hs-math-docs`, and `hs-highlights`.
|
||||||
- Dynamic `__file__`-anchored `WORKSPACE_ROOT` discovery so sibling repositories work in any parent directory (`~/...`, `/tmp/...`, `/workspace/`).
|
2. **20 Stateless Read-Only MCP & OpenAPI 3.1 REST Tools + HTTP `ETag` (`304 Not Modified`) Caching:**
|
||||||
- Cross-OS TrueType font resolver (`hyperstitionstud_io.publishing.fonts`) supporting Debian/Ubuntu, Fedora/RHEL, Arch, Alpine, and macOS with built-in Pillow/ReportLab fallbacks.
|
- Exposes all cipher, phonetics, knowledge-graph, `ETI`, financial/macro time-series, Bayesian daily-brief, polyglot AST sandbox, SQLite FTS5 catalog, and IPLD `dag-json` `CIDv1` tools over `/mcp` and `/api/v1/*`.
|
||||||
- Offline JSON Schema `$id` URNs: `urn:io:hyperstitionstud:schema:v1:*` (`schemas/v1/*.schema.json`).
|
3. **Interactive Web Workbenches (`https://hyperstitionstud.io/`):**
|
||||||
- GraphML / GEXF XML namespace: `xmlns:hs="urn:io:hyperstitionstud:ns:kg:1.0"`.
|
- `/` (Portal Home), `/learn/` (6-Module Interactive Track), `/quant/` (3-Pane Closing-Bell & FRED Macro Time-Series + 25-Scene Guided Tour), `/engineering/` (`E0-E5` Software Engineering Hub), `/math/` (`M0-M5` Applied Mathematics Hub), and `/donate/` (Signal Patronage).
|
||||||
2. **Local-Configuration Citation URL Resolution (`[citations.path_mounts]` in `workspace.toml`):**
|
4. **4,943-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
|
||||||
- Resolves local dossier paths into remote citation URLs **only** when explicitly configured in local `workspace.toml`, falling back deterministically to the verified local filesystem path.
|
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline with zero network calls.
|
||||||
- Transparently rebases `/workspace/...` paths in existing `v1` citation ledgers onto the active `WORKSPACE_ROOT` when running outside `/workspace`.
|
5. **One-Shot `900×1260` Ticker Stats Cards (`.png` + `.json`) via cURL, CLI, Chatbot REST API & MCP:**
|
||||||
3. **4,897-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
|
```bash
|
||||||
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline without requiring Node.js or `--workdir`.
|
# (a) cURL quickstart (zero local dependencies; works against https://hyperstitionstud.io or http://127.0.0.1:8095):
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false" -o /tmp/NVDA-stats-card.json
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=true" | jq -r '.data.artifacts.png_base64' | base64 -d > /tmp/NVDA-stats-card.png
|
||||||
|
|
||||||
|
# (b) Direct CLI entrypoint (writes /tmp/hyperstition-cards/NVDA-stats-card.{png,json}):
|
||||||
|
hs-ticker-card --symbol NVDA --lens tierzoo_ecology --out-dir /tmp/hyperstition-cards
|
||||||
|
|
||||||
|
# (c) Chatbot OpenAPI 3.1 REST API client (GET or POST /api/v1/tools/hs_generate_ticker_stats_card):
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false" | jq .
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/zoology/pokedex/NVDA?include_card=true" | jq '.data.stats_card.card_identity'
|
||||||
|
|
||||||
|
# (d) MCP JSON-RPC 2.0 client (Streamable HTTP POST /mcp or hs-mcp --transport stdio):
|
||||||
|
curl -sS -X POST "https://hyperstitionstud.io/mcp" -H "Content-Type: application/json" \
|
||||||
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hs_generate_ticker_stats_card","arguments":{"symbol":"NVDA","lens":"tierzoo_ecology","include_base64_png":false}}}' | jq .
|
||||||
|
```
|
||||||
@@ -10,7 +10,26 @@ www.hyperstitionstud.io {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hyperstitionstud.io {
|
hyperstitionstud.io {
|
||||||
encode zstd gzip
|
@compressible not path *.gz *.br *.tgz *.xz *.zst *.zip *.woff2 *.png *.mp3 *.wav *.pdf
|
||||||
|
encode @compressible zstd gzip
|
||||||
|
|
||||||
|
# Zero-PII Route Counter Log (Strategy 3A — remote_ip, client_ip, Cookie, User-Agent, and Referer deleted)
|
||||||
|
log {
|
||||||
|
output file /var/log/caddy/hyperstition-access.json {
|
||||||
|
roll_size 50MiB
|
||||||
|
roll_keep 3
|
||||||
|
}
|
||||||
|
format filter {
|
||||||
|
wrap json
|
||||||
|
fields {
|
||||||
|
request>remote_ip delete
|
||||||
|
request>client_ip delete
|
||||||
|
request>headers>Cookie delete
|
||||||
|
request>headers>User-Agent delete
|
||||||
|
request>headers>Referer delete
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
Alt-Svc "h3=\":443\"; ma=2592000"
|
Alt-Svc "h3=\":443\"; ma=2592000"
|
||||||
@@ -20,11 +39,20 @@ hyperstitionstud.io {
|
|||||||
-Server
|
-Server
|
||||||
}
|
}
|
||||||
|
|
||||||
@immutable_media path *.pdf *.png *.mp3 *.graphml *.gexf *.canvas *.woff2
|
@immutable_media path *.pdf *.png *.mp3 *.wav *.graphml *.gexf *.canvas *.woff2
|
||||||
header @immutable_media Cache-Control "public, max-age=86400, stale-while-revalidate=604800"
|
header @immutable_media Cache-Control "public, max-age=86400, stale-while-revalidate=604800"
|
||||||
|
|
||||||
@html_js path *.html *.js *.json
|
@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"
|
||||||
|
|
||||||
|
# Strategy 1A (Plan #66): Mobile User-Agent & Client-Hint Detection
|
||||||
|
@mobile_ua {
|
||||||
|
header_regexp User-Agent "(?i)(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|windows phone|mobile)"
|
||||||
|
}
|
||||||
|
header @mobile_ua {
|
||||||
|
X-HS-Device-UI "mobile"
|
||||||
|
Set-Cookie "hs_device_hint=mobile; Path=/; SameSite=Lax"
|
||||||
|
}
|
||||||
|
|
||||||
# 1. Repo Install Dir: encyclopedia-knowledge-graph -> https://hyperstitionstud.io/graph/*
|
# 1. Repo Install Dir: encyclopedia-knowledge-graph -> https://hyperstitionstud.io/graph/*
|
||||||
handle_path /graph/* {
|
handle_path /graph/* {
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# /etc/cron.d/hyperstition-archive-rotate
|
||||||
|
# Installed by /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/sync-vps-repos.sh
|
||||||
|
# Runs daily at 00:20 UTC (19:20 EST — Window C, 20 minutes after 00:00 UTC rollover harvest).
|
||||||
|
# Rotates loose docs/archive/*.{md,pdf} pairs into completed-plans-archive.tar.gz and checks SQLite telemetry DB (100M).
|
||||||
|
SHELL=/bin/bash
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
TZ=UTC
|
||||||
|
|
||||||
|
20 0 * * * root /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-archive-rotation.sh >> /var/log/hyperstition-archive-rotate.log 2>&1
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hyperstition Studio Daily Cold-Archive & SQLite Telemetry Rotation (00:20 UTC)
|
||||||
|
After=network-online.target hyperstition-utc-rollover-harvest.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core
|
||||||
|
Environment="TZ=UTC"
|
||||||
|
Environment="PYTHONPATH=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src"
|
||||||
|
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-archive-rotation.sh
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daily 00:20 UTC Timer for Hyperstition Studio Cold-Archive & SQLite Rotation
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 00:20:00 UTC
|
||||||
|
Persistent=true
|
||||||
|
Unit=hyperstition-archive-rotate.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hyperstition Studio Pre-Market-Open (14:00 UTC) & US Closing-Bell (21:30 UTC) Financial & FRED Macro Harvest (Mon-Fri)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/srv/hyperstitionstud.io/repos
|
||||||
|
Environment="REPOS_ROOT=/srv/hyperstitionstud.io/repos"
|
||||||
|
Environment="LIVE_REPOS=/var/www/hyperstitionstud.io/repos"
|
||||||
|
Environment="PYTHONPATH=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src"
|
||||||
|
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-data-production.sh --window=auto
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Weekday 14:00 UTC (09:00 EST) & 21:30 UTC (16:30 EST) Timer for Hyperstition Studio Pre-Market & Closing-Bell Harvest
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Mon..Fri *-*-* 14:00:00 UTC
|
||||||
|
OnCalendar=Mon..Fri *-*-* 21:30:00 UTC
|
||||||
|
Persistent=true
|
||||||
|
RandomizedDelaySec=15
|
||||||
|
Unit=hyperstition-closing-bell-harvest.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@@ -16,9 +16,16 @@ ExecStart=/srv/hyperstitionstud.io/repos/.venv/bin/python3 /srv/hyperstitionstud
|
|||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
|
PrivateTmp=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHome=true
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictSUIDSGID=true
|
||||||
ReadOnlyPaths=/srv/hyperstitionstud.io/repos
|
ReadOnlyPaths=/srv/hyperstitionstud.io/repos
|
||||||
ReadWritePaths=/var/lib/hyperstitionstud.io
|
ReadWritePaths=/var/lib/hyperstitionstud.io /tmp
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hyperstition Studio Midnight 00:00 UTC Rollover Telemetry & Daily Brief Harvest
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/srv/hyperstitionstud.io/repos
|
||||||
|
Environment="REPOS_ROOT=/srv/hyperstitionstud.io/repos"
|
||||||
|
Environment="LIVE_REPOS=/var/www/hyperstitionstud.io/repos"
|
||||||
|
Environment="PYTHONPATH=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src"
|
||||||
|
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-data-production.sh --window=utc-rollover
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daily 00:00 UTC Timer for Hyperstition Studio Midnight Rollover Harvest
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 00:00:00 UTC
|
||||||
|
Persistent=true
|
||||||
|
RandomizedDelaySec=15
|
||||||
|
Unit=hyperstition-utc-rollover-harvest.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
/var/lib/hyperstitionstud.io/api-telemetry.db {
|
/var/lib/hyperstitionstud.io/api-telemetry.db {
|
||||||
size 100M
|
size 100M
|
||||||
rotate 12
|
rotate 12
|
||||||
compress
|
nocompress
|
||||||
delaycompress
|
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
nocreate
|
nocreate
|
||||||
|
|||||||
@@ -0,0 +1,317 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# /workspace/push-all-to-git-libre-audio.sh
|
||||||
|
# Release v2.17.1: Pre-push verification & topological push of all 6 repositories to git.libre.audio.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
on_error() {
|
||||||
|
local exit_code=$?
|
||||||
|
local line_no="${1:-unknown}"
|
||||||
|
echo "[ERROR] push-all-to-git-libre-audio.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
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_remote_url() {
|
||||||
|
local repo_dir="$1"
|
||||||
|
local remote_name="$2"
|
||||||
|
local target_url="$3"
|
||||||
|
if git -C "${repo_dir}" remote | grep -qx "${remote_name}"; then
|
||||||
|
run_checked "git remote set-url ${remote_name} (${repo_dir})" git -C "${repo_dir}" remote set-url "${remote_name}" "${target_url}"
|
||||||
|
else
|
||||||
|
run_checked "git remote add ${remote_name} (${repo_dir})" git -C "${repo_dir}" remote add "${remote_name}" "${target_url}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
SCRIPT_PATH="${BASH_SOURCE[0]:-$0}"
|
||||||
|
DEFAULT_WS_DIR="$(cd "$(dirname "${SCRIPT_PATH}")" && pwd)"
|
||||||
|
if [[ ! -d "${DEFAULT_WS_DIR}/hyperstitionstudio-core/src" ]] && [[ -d "/workspace/hyperstitionstudio-core/src" ]]; then
|
||||||
|
DEFAULT_WS_DIR="/workspace"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export WORKSPACE_DIR="${WORKSPACE_DIR:-${DEFAULT_WS_DIR}}"
|
||||||
|
export PYTHONPATH="${WORKSPACE_DIR}/hyperstitionstudio-core/src${PYTHONPATH:+:${PYTHONPATH}}"
|
||||||
|
export HYPERSTITIONSTUDIO_CONFIG="${HYPERSTITIONSTUDIO_CONFIG:-${WORKSPACE_DIR}/workspace.toml}"
|
||||||
|
FORGE_SSH="${FORGE_SSH:-ssh://git@git.libre.audio:2222/seasharp}"
|
||||||
|
|
||||||
|
EXEGESIS_HOST="${EXEGESIS_HOST:-}"
|
||||||
|
EXEGESIS_UNINSTALL=0
|
||||||
|
SKIP_EXEGESIS_DEPLOY=0
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--exegesis-host=*)
|
||||||
|
EXEGESIS_HOST="${1#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--exegesis-host)
|
||||||
|
if [[ $# -lt 2 ]] || [[ -z "${2:-}" ]]; then
|
||||||
|
echo "[ERROR] --exegesis-host requires a <user@host> argument." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
EXEGESIS_HOST="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--exegesis-uninstall)
|
||||||
|
EXEGESIS_UNINSTALL=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--skip-exegesis-deploy)
|
||||||
|
SKIP_EXEGESIS_DEPLOY=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
echo "Usage: $0 [--exegesis-host=<user@host>] [--exegesis-uninstall] [--skip-exegesis-deploy]"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "[ERROR] Unknown option: $1" >&2
|
||||||
|
echo "Usage: $0 [--exegesis-host=<user@host>] [--exegesis-uninstall] [--skip-exegesis-deploy]" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "${EXEGESIS_UNINSTALL}" -eq 1 ]]; then
|
||||||
|
if [[ -z "${EXEGESIS_HOST}" ]] && [[ -t 0 ]]; then
|
||||||
|
read -r -p "Enter target Fedora 41 host (user@host) to uninstall ingglish-isopsephic-exegesis: " EXEGESIS_HOST || EXEGESIS_HOST=""
|
||||||
|
fi
|
||||||
|
if [[ -z "${EXEGESIS_HOST}" ]]; then
|
||||||
|
echo "[ERROR] --exegesis-uninstall requires --exegesis-host=<user@host>." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
echo "[uninstall] Verifying SSH connectivity to ${EXEGESIS_HOST}..."
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" true
|
||||||
|
echo "[uninstall] Uninstalling ingglish-isopsephic-exegesis on ${EXEGESIS_HOST}..."
|
||||||
|
if [[ -t 0 ]]; then
|
||||||
|
ssh -t "${EXEGESIS_HOST}" sudo rpm -e ingglish-isopsephic-exegesis
|
||||||
|
else
|
||||||
|
ssh "${EXEGESIS_HOST}" sudo rpm -e ingglish-isopsephic-exegesis
|
||||||
|
fi
|
||||||
|
echo "[OK] Cleanly uninstalled ingglish-isopsephic-exegesis from ${EXEGESIS_HOST}."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[info] WORKSPACE_DIR=${WORKSPACE_DIR}"
|
||||||
|
echo "[info] PYTHONPATH=${PYTHONPATH}"
|
||||||
|
|
||||||
|
echo "[1/3] Running pre-push verification gates (hs-archive-rotate, hs-readme-sync, version_sync --corpus-delta, periodic harvest CI/CD flow diagram PNG, Fedora 41 RPM & dry-run, test_core_suite, 6-gate graph verifier)..."
|
||||||
|
run_checked "hs-archive-rotate --enforce-single-compression" python3 -m hyperstitionstud_io.publishing.archive_rotator --workspace-root "${WORKSPACE_DIR}" --enforce-single-compression
|
||||||
|
run_checked "hs-readme-sync --install-hooks" python3 -m hyperstitionstud_io.publishing.readme_sync --install-hooks
|
||||||
|
run_checked "version_sync --corpus-delta" python3 -m hyperstitionstud_io.version_sync --corpus-delta
|
||||||
|
run_checked "generate & verify periodic-harvest-cicd-to-vps-flow-diagram.png" python3 -m hyperstitionstud_io.publishing.flow_diagram
|
||||||
|
run_checked "verify periodic-harvest-cicd-to-vps-flow-diagram.png exists" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
|
||||||
|
run_checked "verify Fedora 41 packaging scripts & spec" "${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/build-fedora41-rpm.sh"
|
||||||
|
run_checked "verify Fedora 41 exegesis push worker dry-run" "${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/bundle/scripts/run_exegesis_and_push_fedora41.sh" --dry-run
|
||||||
|
python3 "${WORKSPACE_DIR}/hyperstitionstudio-core/tests/test_core_suite.py"
|
||||||
|
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" python3 "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||||
|
|
||||||
|
echo "[2/3] Verifying git.libre.audio remote URLs across all repositories..."
|
||||||
|
CI_REPO_DIR="hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${WORKSPACE_DIR}/${CI_REPO_DIR}" ]] && [[ -d "${WORKSPACE_DIR}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||||
|
fi
|
||||||
|
for pair in \
|
||||||
|
"hyperstitionstudio-core:hyperstitionstudio-core.git" \
|
||||||
|
"ingglish-hyperdope-gematria:ingglish-hyperdope-gematria.git" \
|
||||||
|
"technocapital-singularity-zoology:technocapital-singularity-zoology.git" \
|
||||||
|
"encyclopedia-knowledge-graph:encyclopedia-knowledge-graph.git" \
|
||||||
|
"${CI_REPO_DIR}:ingglish-hyperdope-ci.git"; do
|
||||||
|
rdir="${WORKSPACE_DIR}/${pair%%:*}"
|
||||||
|
rslug="${pair##*:}"
|
||||||
|
ensure_remote_url "${rdir}" origin "${FORGE_SSH}/${rslug}"
|
||||||
|
done
|
||||||
|
|
||||||
|
push_head_tag() {
|
||||||
|
local repo_dir="$1"
|
||||||
|
local remote_name="$2"
|
||||||
|
local head_tag=""
|
||||||
|
head_tag="$(git -C "${repo_dir}" tag --points-at HEAD | sort -V | tail -n 1)"
|
||||||
|
if [[ -n "${head_tag}" ]]; then
|
||||||
|
run_checked "git push tag ${head_tag} (${repo_dir})" git -C "${repo_dir}" push --force "${remote_name}" "refs/tags/${head_tag}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "[3/3] Rebasing any automated VPS telemetry commits & pushing all 6 repositories and HEAD release tags in topological dependency order to ${FORGE_SSH}..."
|
||||||
|
echo " -> (1/6) hyperstitionstudio-core (main + HEAD tag)"
|
||||||
|
run_checked "git pull --rebase (hyperstitionstudio-core main)" git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main
|
||||||
|
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" push -u origin main
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/hyperstitionstudio-core" origin
|
||||||
|
|
||||||
|
echo " -> (2/6) ingglish-hyperdope-gematria (main + HEAD tag)"
|
||||||
|
run_checked "git pull --rebase (ingglish-hyperdope-gematria main)" git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main
|
||||||
|
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" push -u origin main
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" origin
|
||||||
|
|
||||||
|
echo " -> (3/6) technocapital-singularity-zoology (main + HEAD tag)"
|
||||||
|
run_checked "git pull --rebase (technocapital-singularity-zoology main)" git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main
|
||||||
|
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" push -u origin main
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/technocapital-singularity-zoology" origin
|
||||||
|
|
||||||
|
echo " -> (4/6) encyclopedia-knowledge-graph (main + HEAD tag)"
|
||||||
|
run_checked "git pull --rebase (encyclopedia-knowledge-graph main)" git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main
|
||||||
|
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" push -u origin main
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" origin
|
||||||
|
|
||||||
|
echo " -> (5/6) hyperdope-ci-build (${CI_REPO_DIR}, feat/ingglish-aq-corpus + HEAD tag)"
|
||||||
|
run_checked "git pull --rebase (${CI_REPO_DIR} feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" pull --rebase --autostash origin feat/ingglish-aq-corpus
|
||||||
|
git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" push -u origin feat/ingglish-aq-corpus
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/${CI_REPO_DIR}" origin
|
||||||
|
|
||||||
|
if [[ -d "${WORKSPACE_DIR}/haiperdohp-jemaytreeah/.git" ]]; then
|
||||||
|
echo " -> (6/6) haiperdohp-jemaytreeah (downstream main, feat/ingglish-aq-corpus, feat/ingglish-priority-toggle + HEAD tag)"
|
||||||
|
ensure_remote_url "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream "${FORGE_SSH}/haiperdohp-jemaytreeah.git"
|
||||||
|
run_checked "git fetch downstream (haiperdohp-jemaytreeah)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" fetch downstream
|
||||||
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah main)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream main
|
||||||
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-aq-corpus
|
||||||
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-priority-toggle)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-priority-toggle
|
||||||
|
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" push downstream main feat/ingglish-aq-corpus feat/ingglish-priority-toggle
|
||||||
|
push_head_tag "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[OK] All 6 repositories and release tags pushed to ${FORGE_SSH}."
|
||||||
|
|
||||||
|
if [[ "${SKIP_EXEGESIS_DEPLOY}" -eq 1 ]]; then
|
||||||
|
echo "[info] Skipping Fedora 41 exegesis RPM over-the-wire deployment (--skip-exegesis-deploy)."
|
||||||
|
elif [[ -z "${EXEGESIS_HOST}" ]] && [[ -t 0 ]]; then
|
||||||
|
read -r -p "Deploy built Fedora 41 exegesis RPM over the wire via SSH? [y/N / enter user@host]: " EXEGESIS_INPUT || EXEGESIS_INPUT=""
|
||||||
|
EXEGESIS_INPUT="${EXEGESIS_INPUT#"${EXEGESIS_INPUT%%[![:space:]]*}"}"
|
||||||
|
EXEGESIS_INPUT="${EXEGESIS_INPUT%"${EXEGESIS_INPUT##*[![:space:]]}"}"
|
||||||
|
case "${EXEGESIS_INPUT}" in
|
||||||
|
""|n|N|no|NO)
|
||||||
|
echo "[info] Skipping Fedora 41 exegesis RPM over-the-wire deployment."
|
||||||
|
;;
|
||||||
|
y|Y|yes|YES)
|
||||||
|
read -r -p "Enter target Fedora 41 host (user@host or IP): " EXEGESIS_HOST || EXEGESIS_HOST=""
|
||||||
|
EXEGESIS_HOST="${EXEGESIS_HOST#"${EXEGESIS_HOST%%[![:space:]]*}"}"
|
||||||
|
EXEGESIS_HOST="${EXEGESIS_HOST%"${EXEGESIS_HOST##*[![:space:]]}"}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
EXEGESIS_HOST="${EXEGESIS_INPUT}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
elif [[ -z "${EXEGESIS_HOST}" ]]; then
|
||||||
|
echo "[info] Non-interactive session and --exegesis-host not set; skipping Fedora 41 exegesis RPM deployment."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SKIP_EXEGESIS_DEPLOY}" -eq 0 ]] && [[ -n "${EXEGESIS_HOST}" ]]; then
|
||||||
|
echo "[deploy] Verifying SSH connectivity to ${EXEGESIS_HOST}..."
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" true
|
||||||
|
|
||||||
|
RPM_FILE=""
|
||||||
|
shopt -s nullglob
|
||||||
|
RPM_CANDIDATES=(
|
||||||
|
"${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging"/ingglish-isopsephic-exegesis-*.fc41.noarch.rpm
|
||||||
|
"${WORKSPACE_DIR}/untracked/rpm-builds"/ingglish-isopsephic-exegesis-*.fc41.noarch.rpm
|
||||||
|
)
|
||||||
|
shopt -u nullglob
|
||||||
|
if [[ ${#RPM_CANDIDATES[@]} -gt 0 ]]; then
|
||||||
|
RPM_FILE="$(printf '%s\n' "${RPM_CANDIDATES[@]}" | sort -V | tail -n 1)"
|
||||||
|
fi
|
||||||
|
if [[ -z "${RPM_FILE}" ]] || [[ ! -f "${RPM_FILE}" ]]; then
|
||||||
|
echo "[ERROR] No built Fedora 41 RPM found in ${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/ or ${WORKSPACE_DIR}/untracked/rpm-builds/." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
RPM_NAME="$(basename "${RPM_FILE}")"
|
||||||
|
RPM_SIZE_BYTES="$(wc -c < "${RPM_FILE}" | tr -d '[:space:]')"
|
||||||
|
MIN_STAGE_KB="$(( (RPM_SIZE_BYTES + 1023) / 1024 + 1024 ))"
|
||||||
|
echo "[deploy] Found built RPM: ${RPM_FILE} (${RPM_SIZE_BYTES} bytes)"
|
||||||
|
|
||||||
|
echo "[deploy] Resolving writable remote staging directory on ${EXEGESIS_HOST} (need >= ${MIN_STAGE_KB} KiB)..."
|
||||||
|
REMOTE_STAGE_DIR="$(
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" bash -s -- "${MIN_STAGE_KB}" <<'EOF_STAGE'
|
||||||
|
set -euo pipefail
|
||||||
|
min_kb="${1:-2048}"
|
||||||
|
home_dir="${HOME:-$(pwd)}"
|
||||||
|
for cand in "/tmp" "${home_dir}/.cache/rpm-stage" "${home_dir}/rpm-stage"; do
|
||||||
|
created_parent=0
|
||||||
|
if [[ "${cand}" != "/tmp" ]]; then
|
||||||
|
if [[ ! -d "${cand}" ]]; then
|
||||||
|
mkdir -p "${cand}" || continue
|
||||||
|
created_parent=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ ! -d "${cand}" ]] || [[ ! -w "${cand}" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if mount_opts="$(findmnt -n -o OPTIONS -T "${cand}" 2>&1)"; then
|
||||||
|
mount_opts="${mount_opts//[[:space:]]/}"
|
||||||
|
case ",${mount_opts}," in
|
||||||
|
*,noexec,*)
|
||||||
|
if [[ "${created_parent}" -eq 1 ]]; then
|
||||||
|
rmdir "${cand}" || true
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
avail_kb="$(df -Pk "${cand}" 2>&1 | awk 'NR==2 {print $4}')"
|
||||||
|
case "${avail_kb}" in
|
||||||
|
''|*[!0-9]*) avail_kb=0 ;;
|
||||||
|
esac
|
||||||
|
if [[ "${avail_kb}" -lt "${min_kb}" ]]; then
|
||||||
|
if [[ "${created_parent}" -eq 1 ]]; then
|
||||||
|
rmdir "${cand}" || true
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if stage_dir="$(mktemp -d "${cand}/ingglish-exegesis-stage.XXXXXX" 2>&1)"; then
|
||||||
|
if [[ -d "${stage_dir}" ]] && [[ -w "${stage_dir}" ]]; then
|
||||||
|
printf '%s\n' "${stage_dir}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "${created_parent}" -eq 1 ]]; then
|
||||||
|
rmdir "${cand}" || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "[ERROR] Failed to resolve a writable remote staging directory with >= ${min_kb} KiB free and without noexec." >&2
|
||||||
|
exit 1
|
||||||
|
EOF_STAGE
|
||||||
|
)"
|
||||||
|
if [[ -z "${REMOTE_STAGE_DIR}" ]]; then
|
||||||
|
echo "[ERROR] Remote staging directory resolution returned an empty path on ${EXEGESIS_HOST}." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
REMOTE_RPM_PATH="${REMOTE_STAGE_DIR}/${RPM_NAME}"
|
||||||
|
echo "[deploy] Using remote staging directory: ${REMOTE_STAGE_DIR}"
|
||||||
|
|
||||||
|
cleanup_remote_stage() {
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" "rm -rf '${REMOTE_STAGE_DIR}'; if [ -d \"\${HOME}/.cache/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/.cache/rpm-stage\" || true; fi; if [ -d \"\${HOME}/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/rpm-stage\" || true; fi" || true
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "[deploy] Transferring ${RPM_NAME} to ${EXEGESIS_HOST}:${REMOTE_RPM_PATH}..."
|
||||||
|
if ! scp "${RPM_FILE}" "${EXEGESIS_HOST}:${REMOTE_RPM_PATH}"; then
|
||||||
|
cleanup_remote_stage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[deploy] Installing/upgrading ${RPM_NAME} on ${EXEGESIS_HOST}..."
|
||||||
|
INSTALL_CMD="rc=0; sudo rpm -Uvh --replacepkgs '${REMOTE_RPM_PATH}' || rc=\$?; rm -rf '${REMOTE_STAGE_DIR}'; if [ -d \"\${HOME}/.cache/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/.cache/rpm-stage\" || true; fi; if [ -d \"\${HOME}/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/rpm-stage\" || true; fi; exit \${rc}"
|
||||||
|
if [[ -t 0 ]]; then
|
||||||
|
ssh -t "${EXEGESIS_HOST}" "${INSTALL_CMD}"
|
||||||
|
else
|
||||||
|
ssh "${EXEGESIS_HOST}" "${INSTALL_CMD}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[deploy] Running in-situ dry-run verification on ${EXEGESIS_HOST}..."
|
||||||
|
ssh -t "${EXEGESIS_HOST}" "sudo -u ingglish /usr/bin/ingglish-exegesis-push --dry-run || sudo /usr/bin/ingglish-exegesis-push --dry-run"
|
||||||
|
echo "[deploy] Verifying systemd timer state on ${EXEGESIS_HOST}..."
|
||||||
|
ssh "${EXEGESIS_HOST}" "systemctl is-enabled ingglish-exegesis.timer || true"
|
||||||
|
echo "[OK] Verified in-situ execution of /usr/bin/ingglish-exegesis-push --dry-run on ${EXEGESIS_HOST}."
|
||||||
|
echo "[rollback] To reverse this installation on ${EXEGESIS_HOST}, run: ssh ${EXEGESIS_HOST} sudo rpm -e ingglish-isopsephic-exegesis"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# /workspace/hyperstitionstudio-core/deploy/run-vps-archive-rotation.sh
|
||||||
|
# Daily 00:20 UTC (19:20 EST) Cold-Archive Rotation & Quiescent SQLite Logrotate Runner for hyperstitionstud.io
|
||||||
|
# Enforces 0 LLM tokens, 0 API keys, full stdout/stderr visibility, flock concurrency protection, and Gematria-Pipeline Immunity.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPOS_ROOT="/srv/hyperstitionstud.io/repos"
|
||||||
|
LIVE_REPOS="/var/www/hyperstitionstud.io/repos"
|
||||||
|
LOCK_FILE="/tmp/hyperstition-archive-rotation.lock"
|
||||||
|
DRY_RUN=0
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--repos-root=*)
|
||||||
|
REPOS_ROOT="${1#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--repos-root)
|
||||||
|
REPOS_ROOT="${2:-}"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--live-repos=*)
|
||||||
|
LIVE_REPOS="${1#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--live-repos)
|
||||||
|
LIVE_REPOS="${2:-}"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--dry-run)
|
||||||
|
DRY_RUN=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "[ERROR] Unknown argument: $1" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
exec 9>"${LOCK_FILE}"
|
||||||
|
if ! flock -n 9; then
|
||||||
|
echo "[SKIP] Another hyperstition-archive-rotation run holds ${LOCK_FILE}; exiting cleanly."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
export TZ="UTC"
|
||||||
|
export PYTHONPATH="${REPOS_ROOT}/hyperstitionstudio-core/src"
|
||||||
|
unset OPENROUTER_API_KEY OPENAI_API_KEY ANTHROPIC_API_KEY
|
||||||
|
|
||||||
|
echo "[1/3] Running Cold-Storage Plan Archive Rotation (hs-archive-rotate) against ${REPOS_ROOT}..."
|
||||||
|
if [[ "${DRY_RUN}" -eq 1 ]]; then
|
||||||
|
ROTATE_JSON="$(python3 -m hyperstitionstud_io.publishing.archive_rotator --workspace-root "${REPOS_ROOT}" --dry-run)"
|
||||||
|
else
|
||||||
|
ROTATE_JSON="$(python3 -m hyperstitionstud_io.publishing.archive_rotator --workspace-root "${REPOS_ROOT}")"
|
||||||
|
fi
|
||||||
|
echo "${ROTATE_JSON}"
|
||||||
|
|
||||||
|
echo "[2/3] Ingesting Zero-IP Caddy Route Counts (Strategy 3A) & Running Quiescent SQLite Telemetry Logrotate Check (100M threshold)..."
|
||||||
|
if [[ "${DRY_RUN}" -eq 0 ]]; then
|
||||||
|
python3 -m hyperstitionstud_io.db.sqlite_meta --ingest-caddy-route-counts
|
||||||
|
python3 -m hyperstitionstud_io.db.sqlite_meta --compress-archive --truncate-quiescent --max-mb 100
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[3/3] Checking whether rotated docs/archive/ bundles require tmpfs webroot hydration..."
|
||||||
|
ROTATED_COUNT="$(python3 -c 'import json,sys; d=json.loads(sys.argv[1]); print(int(d.get("rotated_loose_files", 0)))' "${ROTATE_JSON}")"
|
||||||
|
if [[ "${DRY_RUN}" -eq 0 ]] && [[ "${ROTATED_COUNT}" -gt 0 ]] && [[ -d "${LIVE_REPOS}" ]]; then
|
||||||
|
echo "[SYNC] Rotated ${ROTATED_COUNT} loose archive file(s); refreshing ${LIVE_REPOS}..."
|
||||||
|
"${REPOS_ROOT}/hyperstitionstudio-core/deploy/sync-vps-repos.sh" \
|
||||||
|
--repos-root="${REPOS_ROOT}" \
|
||||||
|
--live-repos="${LIVE_REPOS}" \
|
||||||
|
--no-pull \
|
||||||
|
--no-caddy
|
||||||
|
else
|
||||||
|
echo "[OK] No loose archive files required rotation (rotated_loose_files=${ROTATED_COUNT}); tmpfs hydration skipped."
|
||||||
|
fi
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# /workspace/hyperstitionstudio-core/deploy/run-vps-data-production.sh
|
||||||
|
# Autonomous VPS-Native Periodic Data Production Orchestrator for hyperstitionstud.io.
|
||||||
|
# Executes Stage 1 (Harvest) -> Stage 2 (Compilers) -> Stage 3 (Transactional Test & Isolation Gate
|
||||||
|
# with Automatic Rollback on Failure) -> Stage 4 (tmpfs RAM Hydration via sync-vps-repos.sh --no-pull)
|
||||||
|
# -> Optional Automated Git Push to git.libre.audio.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
on_error() {
|
||||||
|
local exit_code=$?
|
||||||
|
local line_no="${1:-unknown}"
|
||||||
|
echo "[ERROR] run-vps-data-production.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
|
||||||
|
}
|
||||||
|
|
||||||
|
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}"
|
||||||
|
export PYTHONPATH="${REPOS_ROOT}/hyperstitionstudio-core/src${PYTHONPATH:+:${PYTHONPATH}}"
|
||||||
|
if [[ -f "${REPOS_ROOT}/workspace.toml" ]]; then
|
||||||
|
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PYTHON_BIN="python3"
|
||||||
|
if [[ -x "${REPOS_ROOT}/.venv/bin/python3" ]]; then
|
||||||
|
PYTHON_BIN="${REPOS_ROOT}/.venv/bin/python3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
WINDOW_MODE="us-closing-bell"
|
||||||
|
OFFLINE_MODE=0
|
||||||
|
DO_PUSH=1
|
||||||
|
SKIP_HYDRATE=0
|
||||||
|
PUSH_ONLY=0
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "${arg}" in
|
||||||
|
--window=*)
|
||||||
|
WINDOW_MODE="${arg#*=}"
|
||||||
|
;;
|
||||||
|
--offline|--no-network)
|
||||||
|
OFFLINE_MODE=1
|
||||||
|
;;
|
||||||
|
--no-push)
|
||||||
|
DO_PUSH=0
|
||||||
|
;;
|
||||||
|
--skip-hydrate)
|
||||||
|
SKIP_HYDRATE=1
|
||||||
|
;;
|
||||||
|
--push-only)
|
||||||
|
PUSH_ONLY=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "${WINDOW_MODE}" == "auto" ]]; then
|
||||||
|
UTC_HOUR="$(date -u +%H)"
|
||||||
|
case "${UTC_HOUR}" in
|
||||||
|
13|14|15)
|
||||||
|
WINDOW_MODE="us-pre-market-open"
|
||||||
|
;;
|
||||||
|
21|22|23)
|
||||||
|
WINDOW_MODE="us-closing-bell"
|
||||||
|
;;
|
||||||
|
00|01|02)
|
||||||
|
WINDOW_MODE="utc-rollover"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
WINDOW_MODE="us-closing-bell"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
LOCK_FILE="${HYPERSTITION_HARVEST_LOCK:-/tmp/hyperstition-vps-harvest.lock}"
|
||||||
|
if [[ -n "$(type -P flock || true)" ]]; then
|
||||||
|
exec 9>"${LOCK_FILE}"
|
||||||
|
if ! flock -n 9; then
|
||||||
|
echo "[info] Another harvest/sync is currently holding ${LOCK_FILE}; exiting cleanly."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset OPENROUTER_API_KEY OPENAI_API_KEY ANTHROPIC_API_KEY
|
||||||
|
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 0 ]]; then
|
||||||
|
echo "[1/5] Running Stage 1 & Stage 2 periodic data production (window=${WINDOW_MODE}, offline=${OFFLINE_MODE})..."
|
||||||
|
if [[ "${OFFLINE_MODE}" -eq 1 ]]; then
|
||||||
|
run_checked "hs-quant-harvest (offline)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --mode "${WINDOW_MODE}"
|
||||||
|
run_checked "hs-macro-harvest (offline)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.macro --offline
|
||||||
|
else
|
||||||
|
run_checked "hs-quant-harvest (--append-history --live)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --mode "${WINDOW_MODE}" --append-history --live
|
||||||
|
run_checked "hs-macro-harvest (live FRED CSV)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.macro
|
||||||
|
fi
|
||||||
|
if [[ "${WINDOW_MODE}" == "utc-rollover" ]] && [[ -f "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" ]]; then
|
||||||
|
CI_OUT_DIR="${REPOS_ROOT}/hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${CI_OUT_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_OUT_DIR="${REPOS_ROOT}/ingglish-hyperdope-ci"
|
||||||
|
fi
|
||||||
|
if [[ -d "${CI_OUT_DIR}" ]]; then
|
||||||
|
run_checked "ci_provision_ingglish.py (--tier 2)" "${PYTHON_BIN}" "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" \
|
||||||
|
--archive-dir "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive" \
|
||||||
|
--out-dir "${CI_OUT_DIR}" \
|
||||||
|
--tier 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
run_checked "quant.timeseries" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.timeseries
|
||||||
|
run_checked "hs-daily-brief" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.daily_brief --window "${WINDOW_MODE}"
|
||||||
|
run_checked "build_encyclopedia_knowledge_graph.py" "${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||||
|
|
||||||
|
echo "[2/5] Running Stage 3 transactional verification gates (hs-doctor, ReadOnlyIsolationGuard, test_core_suite)..."
|
||||||
|
if ! "${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor || ! "${PYTHON_BIN}" "${REPOS_ROOT}/hyperstitionstudio-core/tests/test_core_suite.py"; then
|
||||||
|
echo "[ROLLBACK] Verification gate failed! Rolling back uncommitted changes in ${REPOS_ROOT} without touching tmpfs..." >&2
|
||||||
|
for r in hyperstitionstudio-core ingglish-hyperdope-gematria encyclopedia-knowledge-graph; do
|
||||||
|
if [[ -d "${REPOS_ROOT}/${r}/.git" ]]; then
|
||||||
|
git -C "${REPOS_ROOT}/${r}" checkout -- .
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SKIP_HYDRATE}" -eq 0 ]]; then
|
||||||
|
echo "[3/5] Hydrating tmpfs RAM webroot (${LIVE_REPOS}) via sync-vps-repos.sh --no-pull --no-caddy..."
|
||||||
|
run_checked "sync-vps-repos.sh --no-pull --no-caddy" "${SCRIPT_DIR}/sync-vps-repos.sh" --no-pull --no-caddy
|
||||||
|
else
|
||||||
|
echo "[3/5] Skipping tmpfs hydration (--skip-hydrate)."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "[info] --push-only requested: skipping harvesting, compilers, verification gates, and RAM hydration."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${DO_PUSH}" -eq 1 ]] && [[ -f "/etc/hyperstitionstud.io/id_ed25519_git_libre_audio" ]]; then
|
||||||
|
echo "[4/5] Committing and pushing automated VPS telemetry updates to git.libre.audio..."
|
||||||
|
run_checked "hs-readme-sync --hooks-only" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --hooks-only
|
||||||
|
DEPLOY_KEY="/etc/hyperstitionstud.io/id_ed25519_git_libre_audio"
|
||||||
|
GIT_SSH_CMD="ssh -i ${DEPLOY_KEY} -p 2222 -o IdentitiesOnly=yes -o IdentityAgent=none -o BatchMode=yes -o StrictHostKeyChecking=accept-new"
|
||||||
|
export GIT_SSH_COMMAND="${GIT_SSH_CMD}"
|
||||||
|
unset SSH_AUTH_SOCK || true
|
||||||
|
GIT_SSH_FLAGS=(-c "core.sshCommand=${GIT_SSH_CMD}")
|
||||||
|
STAMP_UTC="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||||
|
for r in hyperstitionstudio-core ingglish-hyperdope-gematria encyclopedia-knowledge-graph; do
|
||||||
|
if [[ -d "${REPOS_ROOT}/${r}/.git" ]]; then
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " -> Inspecting ${r} for telemetry updates..."
|
||||||
|
fi
|
||||||
|
if [[ -z "$(git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" config user.name || true)" ]]; then
|
||||||
|
git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" config user.name "Hyperstition VPS Bot"
|
||||||
|
git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" config user.email "vps-bot@hyperstitionstud.io"
|
||||||
|
fi
|
||||||
|
forge_ssh="ssh://git@git.libre.audio:2222/seasharp"
|
||||||
|
git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" config core.sshCommand "${GIT_SSH_CMD}" || true
|
||||||
|
git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" remote set-url origin "${forge_ssh}/${r}.git" || true
|
||||||
|
if [[ "${r}" == "hyperstitionstudio-core" ]]; then
|
||||||
|
TELEMETRY_SNAP_DIR="/tmp/hyperstition-vps-prod-telemetry-snap"
|
||||||
|
rm -rf "${TELEMETRY_SNAP_DIR}"
|
||||||
|
run_checked "snapshot telemetry (${r})" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --snapshot-telemetry "${TELEMETRY_SNAP_DIR}"
|
||||||
|
run_checked "git fetch (${r})" git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" fetch --force origin main --tags
|
||||||
|
local_head="$(git -C "${REPOS_ROOT}/${r}" rev-parse HEAD)"
|
||||||
|
remote_head="$(git -C "${REPOS_ROOT}/${r}" rev-parse origin/main)"
|
||||||
|
if [[ "${local_head}" != "${remote_head}" ]]; then
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " [sync] Advancing ${r} base to origin/main and reconciling telemetry snapshot..."
|
||||||
|
fi
|
||||||
|
run_checked "git reset --hard origin/main (${r})" git -C "${REPOS_ROOT}/${r}" reset --hard origin/main
|
||||||
|
git -C "${REPOS_ROOT}/${r}" stash clear || true
|
||||||
|
run_checked "reconcile telemetry (${r})" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --reconcile-telemetry "${TELEMETRY_SNAP_DIR}"
|
||||||
|
fi
|
||||||
|
rm -rf "${TELEMETRY_SNAP_DIR}"
|
||||||
|
else
|
||||||
|
run_checked "git fetch (${r})" git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" fetch --force origin main --tags
|
||||||
|
run_checked "git pull --rebase --autostash (${r})" git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" pull --rebase -X theirs --autostash origin main
|
||||||
|
fi
|
||||||
|
git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" add -A
|
||||||
|
if ! git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" diff --cached --quiet; then
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " [commit] Committing new telemetry changes in ${r}..."
|
||||||
|
fi
|
||||||
|
run_checked "git commit (${r})" git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" commit -m "chore(telemetry): automated VPS ${WINDOW_MODE} harvest (${STAMP_UTC})"
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " [push] Pushing ${r} to git.libre.audio..."
|
||||||
|
fi
|
||||||
|
run_checked "git push (${r})" git "${GIT_SSH_FLAGS[@]}" -C "${REPOS_ROOT}/${r}" push origin main
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " [ok] Repository ${r} successfully pushed to git.libre.audio ($(git -C "${REPOS_ROOT}/${r}" rev-parse --short HEAD))."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "${PUSH_ONLY}" -eq 1 ]]; then
|
||||||
|
echo " [clean] Repository ${r} working tree is clean and in sync with origin/main ($(git -C "${REPOS_ROOT}/${r}" rev-parse --short HEAD))."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "[4/5] Skipping automated git.libre.audio push (no-push or deploy key absent)."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[5/5] VPS periodic data production (${WINDOW_MODE}) completed and verified."
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh
|
# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh
|
||||||
|
# Release v2.17.1: Self-re-executing tmpfs VPS hydration & service sync.
|
||||||
# Hydrates per-repository install directories from REPOS_ROOT into LIVE_REPOS (tmpfs RAM mount),
|
# Hydrates per-repository install directories from REPOS_ROOT into LIVE_REPOS (tmpfs RAM mount),
|
||||||
# supplies untracked haiperdohp-jemaytreeah/.gitignore files (config.js, db.json, db_lite.json),
|
# 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
|
# creates top-level route symlinks, pre-compresses (.br / .gz) static assets, and idempotently
|
||||||
@@ -43,12 +44,31 @@ DEFAULT_REPOS_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
|||||||
export REPOS_ROOT="${REPOS_ROOT:-${DEFAULT_REPOS_ROOT}}"
|
export REPOS_ROOT="${REPOS_ROOT:-${DEFAULT_REPOS_ROOT}}"
|
||||||
export LIVE_REPOS="${LIVE_REPOS:-/var/www/hyperstitionstud.io/repos}"
|
export LIVE_REPOS="${LIVE_REPOS:-/var/www/hyperstitionstud.io/repos}"
|
||||||
|
|
||||||
|
DEPLOY_KEY="/etc/hyperstitionstud.io/id_ed25519_git_libre_audio"
|
||||||
|
GIT_SSH_CMD=""
|
||||||
|
GIT_SSH_FLAGS=()
|
||||||
|
if [[ -f "${DEPLOY_KEY}" ]]; then
|
||||||
|
# Force OpenSSH to use only the deploy key (ignore forwarded ssh-agent / default ~/.ssh keys that exhaust MaxAuthTries)
|
||||||
|
GIT_SSH_CMD="ssh -i ${DEPLOY_KEY} -p 2222 -o IdentitiesOnly=yes -o IdentityAgent=none -o BatchMode=yes -o StrictHostKeyChecking=accept-new"
|
||||||
|
export GIT_SSH_COMMAND="${GIT_SSH_CMD}"
|
||||||
|
unset SSH_AUTH_SOCK || true
|
||||||
|
GIT_SSH_FLAGS=(-c "core.sshCommand=${GIT_SSH_CMD}")
|
||||||
|
fi
|
||||||
|
|
||||||
TARGET_REPO="all"
|
TARGET_REPO="all"
|
||||||
DO_PULL=1
|
DO_PULL=1
|
||||||
DO_CADDY=1
|
DO_CADDY=1
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
|
--repos-root=*)
|
||||||
|
REPOS_ROOT="${arg#*=}"
|
||||||
|
export REPOS_ROOT
|
||||||
|
;;
|
||||||
|
--live-repos=*)
|
||||||
|
LIVE_REPOS="${arg#*=}"
|
||||||
|
export LIVE_REPOS
|
||||||
|
;;
|
||||||
--no-pull)
|
--no-pull)
|
||||||
DO_PULL=0
|
DO_PULL=0
|
||||||
;;
|
;;
|
||||||
@@ -75,10 +95,10 @@ if [[ -f "${REPOS_ROOT}/workspace.toml" ]]; then
|
|||||||
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Detect whether the CI artifact repository is cloned as ingglish-hyperdope-ci or hyperdope-ci-build
|
# Detect whether the CI artifact repository is cloned as hyperdope-ci-build (canonical) or ingglish-hyperdope-ci
|
||||||
CI_REPO_DIR="ingglish-hyperdope-ci"
|
|
||||||
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
|
|
||||||
CI_REPO_DIR="hyperdope-ci-build"
|
CI_REPO_DIR="hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REPOS=(
|
REPOS=(
|
||||||
@@ -91,6 +111,15 @@ REPOS=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if [[ "${DO_PULL}" -eq 1 ]]; then
|
if [[ "${DO_PULL}" -eq 1 ]]; then
|
||||||
|
GIT_PULL_PREFIX=()
|
||||||
|
if [[ -f "${DEPLOY_KEY}" ]] && [[ ! -r "${DEPLOY_KEY}" ]]; then
|
||||||
|
if [[ -n "${SUDO}" ]]; then
|
||||||
|
GIT_PULL_PREFIX=("${SUDO}")
|
||||||
|
else
|
||||||
|
echo "[ERROR] Deploy key ${DEPLOY_KEY} is not readable by $(id -un) and sudo is unavailable." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
for entry in "${REPOS[@]}"; do
|
for entry in "${REPOS[@]}"; do
|
||||||
repo="${entry%%:*}"
|
repo="${entry%%:*}"
|
||||||
branch="${entry##*:}"
|
branch="${entry##*:}"
|
||||||
@@ -99,19 +128,58 @@ if [[ "${DO_PULL}" -eq 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ -d "${REPOS_ROOT}/${repo}/.git" ]]; then
|
if [[ -d "${REPOS_ROOT}/${repo}/.git" ]]; then
|
||||||
remote_name="origin"
|
remote_name="origin"
|
||||||
if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git -C "${REPOS_ROOT}/${repo}" remote | grep -qx "downstream"; then
|
if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" remote | grep -qx "downstream"; then
|
||||||
remote_name="downstream"
|
remote_name="downstream"
|
||||||
fi
|
fi
|
||||||
echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..."
|
slug="${repo}"
|
||||||
prev_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
|
if [[ "${repo}" == "hyperdope-ci-build" || "${repo}" == "ingglish-hyperdope-ci" ]]; then
|
||||||
run_checked "git fetch ${repo}" git -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags
|
slug="ingglish-hyperdope-ci"
|
||||||
run_checked "git merge ${repo}" git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}"
|
fi
|
||||||
new_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
|
if [[ -f "${DEPLOY_KEY}" ]]; then
|
||||||
|
if [[ "${repo}" == "hyperstitionstudio-core" || "${repo}" == "ingglish-hyperdope-gematria" || "${repo}" == "encyclopedia-knowledge-graph" ]]; then
|
||||||
|
git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" config core.sshCommand "${GIT_SSH_CMD}" || true
|
||||||
|
git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" remote set-url "${remote_name}" "ssh://git@git.libre.audio:2222/seasharp/${slug}.git" || true
|
||||||
|
else
|
||||||
|
git -C "${REPOS_ROOT}/${repo}" config --unset core.sshCommand || true
|
||||||
|
git -C "${REPOS_ROOT}/${repo}" remote set-url "${remote_name}" "https://git.libre.audio/seasharp/${slug}.git" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch}) with lossless telemetry snapshot & clean remote sync..."
|
||||||
|
TELEMETRY_SNAP_DIR="/tmp/hyperstition-vps-telemetry-snap"
|
||||||
|
if [[ "${repo}" == "hyperstitionstudio-core" && ! -d "${TELEMETRY_SNAP_DIR}" ]]; then
|
||||||
|
"${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --snapshot-telemetry "${TELEMETRY_SNAP_DIR}" || true
|
||||||
|
fi
|
||||||
|
prev_head="$(git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
|
||||||
|
if [[ "${#GIT_PULL_PREFIX[@]}" -gt 0 ]]; then
|
||||||
|
run_checked "git fetch ${repo}" "${GIT_PULL_PREFIX[@]}" git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -c "safe.directory=${REPOS_ROOT}/${repo}" -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags
|
||||||
|
else
|
||||||
|
run_checked "git fetch ${repo}" git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags
|
||||||
|
fi
|
||||||
|
git -C "${REPOS_ROOT}/${repo}" rebase --abort 2>&1 | grep -v "No rebase in progress" || true
|
||||||
|
git -C "${REPOS_ROOT}/${repo}" merge --abort 2>&1 | grep -v "There is no merge to abort" || true
|
||||||
|
run_checked "git reset --hard ${remote_name}/${branch} (${repo})" git -C "${REPOS_ROOT}/${repo}" reset --hard "${remote_name}/${branch}"
|
||||||
|
git -C "${REPOS_ROOT}/${repo}" stash clear || true
|
||||||
|
new_head="$(git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
|
||||||
if [[ "${repo}" == "hyperstitionstudio-core" && "${prev_head}" != "${new_head}" && -z "${HYPERSTITION_SYNC_REEXEC:-}" ]]; then
|
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..."
|
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
|
export HYPERSTITION_SYNC_REEXEC=1
|
||||||
exec "${REPOS_ROOT}/hyperstitionstudio-core/deploy/sync-vps-repos.sh" "$@"
|
exec "${REPOS_ROOT}/hyperstitionstudio-core/deploy/sync-vps-repos.sh" "$@"
|
||||||
fi
|
fi
|
||||||
|
if [[ "${repo}" == "hyperstitionstudio-core" && -d "${TELEMETRY_SNAP_DIR}" ]]; then
|
||||||
|
run_checked "reconcile VPS telemetry snapshot" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.collector --reconcile-telemetry "${TELEMETRY_SNAP_DIR}"
|
||||||
|
rm -rf "${TELEMETRY_SNAP_DIR}"
|
||||||
|
if [[ -n "$(git -C "${REPOS_ROOT}/hyperstitionstudio-core" status --porcelain || true)" ]] && [[ -f "${DEPLOY_KEY}" ]]; then
|
||||||
|
echo "[1/5] Committing and pushing reconciled VPS harvest telemetry to ${remote_name}/${branch}..."
|
||||||
|
run_checked "hs-readme-sync --hooks-only" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --hooks-only
|
||||||
|
if [[ -z "$(git -C "${REPOS_ROOT}/hyperstitionstudio-core" config user.name || true)" ]]; then
|
||||||
|
git -C "${REPOS_ROOT}/hyperstitionstudio-core" config user.name "Hyperstition VPS Bot"
|
||||||
|
git -C "${REPOS_ROOT}/hyperstitionstudio-core" config user.email "vps-bot@hyperstitionstud.io"
|
||||||
|
fi
|
||||||
|
git -C "${REPOS_ROOT}/hyperstitionstudio-core" add -A
|
||||||
|
run_checked "git commit reconciled telemetry" git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/hyperstitionstudio-core" commit -m "chore(telemetry): reconcile VPS harvest telemetry with origin/main"
|
||||||
|
run_checked "git push reconciled telemetry" git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/hyperstitionstudio-core" push "${remote_name}" "${branch}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -122,18 +190,34 @@ if [[ -d "${REPOS_ROOT}/haiperdohp-jemaytreeah" ]]; then
|
|||||||
echo "[build] Copying haiperdohp-jemaytreeah/config.default.js -> config.js..."
|
echo "[build] Copying haiperdohp-jemaytreeah/config.default.js -> config.js..."
|
||||||
run_checked "copy haiperdohp-jemaytreeah 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
|
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
|
if [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db_lite.json" || ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.json" || "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.txt" -nt "${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..."
|
echo "[build] Generating haiperdohp-jemaytreeah/db.json and db_lite.json from db.txt..."
|
||||||
(cd "${REPOS_ROOT}/haiperdohp-jemaytreeah" && run_checked "generate_db_json.py" "${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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[2/5] Synchronizing local workspace.toml version and running hs-doctor, version_sync --check, and 6-Gate Knowledge Graph Verification..."
|
echo "[2/5] Synchronizing local workspace.toml version, rebuilding SQLite FTS5 catalog, 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
|
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__
|
# Sync schema_version in untracked parent workspace.toml with hyperstitionstud_io.__version__ without dirtying tracked repo files
|
||||||
run_checked "version_sync (sync untracked workspace.toml)" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync
|
run_checked "sync untracked workspace.toml" "${PYTHON_BIN}" -c '
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
from hyperstitionstud_io import __version__ as v
|
||||||
|
from hyperstitionstud_io.config import load_workspace_config
|
||||||
|
cfg = load_workspace_config()
|
||||||
|
p = cfg.workspace_root / "workspace.toml"
|
||||||
|
if p.is_file():
|
||||||
|
t = p.read_text(encoding="utf-8")
|
||||||
|
u = re.sub(r"schema_version\s*=\s*\"\d+\.\d+\.\d+\"", f"schema_version = \"{v}\"", t, flags=re.M)
|
||||||
|
if u != t:
|
||||||
|
p.write_text(u, encoding="utf-8")
|
||||||
|
'
|
||||||
fi
|
fi
|
||||||
|
run_checked "hs-readme-sync --hooks-only" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --hooks-only
|
||||||
|
run_checked "hs-deploy-scripts-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${REPOS_ROOT}" --check
|
||||||
|
run_checked "hs-closeups-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync --check
|
||||||
run_checked "version_sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync --check
|
run_checked "version_sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync --check
|
||||||
|
run_checked "hs-db-build (--build)" "${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build
|
||||||
run_checked "hs-doctor" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor
|
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
|
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" "${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||||
|
|
||||||
@@ -150,19 +234,54 @@ for entry in "${REPOS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
if [[ -d "${REPOS_ROOT}/${repo}" ]]; then
|
if [[ -d "${REPOS_ROOT}/${repo}" ]]; then
|
||||||
${LIVE_SUDO} mkdir -p "${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}/"
|
run_checked "rsync ${repo}" ${LIVE_SUDO} rsync -a --delete \
|
||||||
|
--filter='P *.gz' \
|
||||||
|
--filter='P *.br' \
|
||||||
|
--filter='P site/quant/audio/***' \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='completed-plans-archive.tar.gz' \
|
||||||
|
--exclude='inactive-plans-archive.tar.gz' \
|
||||||
|
"${REPOS_ROOT}/${repo}/" "${LIVE_REPOS}/${repo}/"
|
||||||
|
${LIVE_SUDO} rm -f \
|
||||||
|
"${LIVE_REPOS}/${repo}/docs/archive/completed-plans-archive.tar.gz" \
|
||||||
|
"${LIVE_REPOS}/${repo}/docs/plans/inactive/inactive-plans-archive.tar.gz"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]] && [[ ! -e "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]]; then
|
||||||
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
|
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
|
||||||
|
elif [[ "${CI_REPO_DIR}" == "ingglish-hyperdope-ci" ]] && [[ -d "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/hyperdope-ci-build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all active routes
|
# 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/index.html" "${LIVE_REPOS}/index.html"
|
||||||
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/assets" "${LIVE_REPOS}/assets"
|
||||||
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/learn" "${LIVE_REPOS}/learn"
|
${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/quant" "${LIVE_REPOS}/quant"
|
||||||
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/donate" "${LIVE_REPOS}/donate"
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/donate" "${LIVE_REPOS}/donate"
|
||||||
|
echo "[3b/5] Generating untracked deploy-time /quant/audio/*.wav spoken voice tracks (Strategies 1A & 2A: flite kal16 + background slt upgrade, 0 audio files in Git)..."
|
||||||
|
if [[ -z "$(type -P flite || true)" ]] || [[ -z "$(type -P espeak-ng || true)" ]] || [[ -z "$(type -P node || true)" ]]; then
|
||||||
|
if [[ "${DO_CADDY}" -eq 1 ]]; then
|
||||||
|
if [[ -n "$(type -P dnf || true)" ]]; then
|
||||||
|
echo " -> Installing flite, espeak-ng & nodejs via dnf for full development-production test execution parity..."
|
||||||
|
${SUDO} dnf install -y -q flite espeak-ng nodejs || true
|
||||||
|
elif [[ -n "$(type -P apt-get || true)" ]]; then
|
||||||
|
echo " -> Installing flite, espeak-ng & nodejs via apt-get for full development-production test execution parity..."
|
||||||
|
${SUDO} env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq flite espeak-ng nodejs npm || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
run_checked "hs-quant-voice-build" ${LIVE_SUDO} env PYTHONPATH="${REPOS_ROOT}/hyperstitionstudio-core/src" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.quant_voice \
|
||||||
|
--workspace-root "${REPOS_ROOT}" \
|
||||||
|
--out-dir "${LIVE_REPOS}/hyperstitionstudio-core/site/quant/audio" \
|
||||||
|
--upgrade-slt-background
|
||||||
|
if [[ -d "${LIVE_REPOS}/hyperstitionstudio-core/site/engineering" ]]; then
|
||||||
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/engineering" "${LIVE_REPOS}/engineering"
|
||||||
|
fi
|
||||||
|
if [[ -d "${LIVE_REPOS}/hyperstitionstudio-core/site/math" ]]; then
|
||||||
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/math" "${LIVE_REPOS}/math"
|
||||||
|
fi
|
||||||
# Note: /gallery is disabled for now (tracked as a long-term plan in docs/PLAN-MEMETIC-GALLERY-SUBPAGE.pdf)
|
# 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} 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 "encyclopedia-knowledge-graph" "${LIVE_REPOS}/graph"
|
||||||
@@ -170,18 +289,49 @@ ${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_RE
|
|||||||
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
|
${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 "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
|
||||||
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
|
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
|
||||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
|
${LIVE_SUDO} ln -sfn "${CI_REPO_DIR}" "${LIVE_REPOS}/ci"
|
||||||
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
|
||||||
|
|
||||||
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz)..."
|
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz) incrementally in parallel & enforcing single-layer (1x) compression..."
|
||||||
run_checked "gzip pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
|
run_checked "cleanup multi-compressed and orphaned sidecars" ${LIVE_SUDO} bash -c '
|
||||||
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
|
find "$1" -type f \( -name "*.gz.gz" -o -name "*.gz.br" -o -name "*.br.gz" -o -name "*.br.br" -o -name "*.tgz.gz" -o -name "*.tgz.br" \) -delete
|
||||||
-exec gzip -9 -k -f {} \;
|
while IFS= read -r -d "" sc; do
|
||||||
if [[ -n "$(type -P brotli || true)" ]]; then
|
base="${sc%.*}"
|
||||||
run_checked "brotli pre-compression" ${LIVE_SUDO} find "${LIVE_REPOS}" -type f -size -5M \
|
if [[ ! -f "${base}" ]]; then
|
||||||
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
|
rm -f "${sc}"
|
||||||
-exec brotli -q 11 -k -f {} \;
|
|
||||||
fi
|
fi
|
||||||
|
done < <(find "$1" -type f \( -name "*.html.gz" -o -name "*.html.br" -o -name "*.js.gz" -o -name "*.js.br" -o -name "*.json.gz" -o -name "*.json.br" -o -name "*.graphml.gz" -o -name "*.graphml.br" -o -name "*.gexf.gz" -o -name "*.gexf.br" -o -name "*.canvas.gz" -o -name "*.canvas.br" -o -name "*.css.gz" -o -name "*.css.br" -o -name "*.md.gz" -o -name "*.md.br" \) -print0)
|
||||||
|
' _ "${LIVE_REPOS}"
|
||||||
|
JOBS="$(nproc 2>&1 || echo 4)"
|
||||||
|
if [[ ! "${JOBS}" =~ ^[0-9]+$ ]] || [[ "${JOBS}" -lt 1 ]]; then
|
||||||
|
JOBS=4
|
||||||
|
fi
|
||||||
|
run_checked "incremental parallel gzip pre-compression" ${LIVE_SUDO} bash -c '
|
||||||
|
live="$1"
|
||||||
|
jobs="$2"
|
||||||
|
while IFS= read -r -d "" f; do
|
||||||
|
if [[ ! -f "${f}.gz" || "${f}" -nt "${f}.gz" ]]; then
|
||||||
|
printf "%s\0" "${f}"
|
||||||
|
fi
|
||||||
|
done < <(find "${live}" -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" \) -print0) \
|
||||||
|
| xargs -0 -r -P "${jobs}" -n 16 gzip -9 -k -f
|
||||||
|
' _ "${LIVE_REPOS}" "${JOBS}"
|
||||||
|
if [[ -n "$(type -P brotli || true)" ]]; then
|
||||||
|
run_checked "incremental parallel brotli pre-compression" ${LIVE_SUDO} bash -c '
|
||||||
|
live="$1"
|
||||||
|
jobs="$2"
|
||||||
|
while IFS= read -r -d "" f; do
|
||||||
|
if [[ ! -f "${f}.br" || "${f}" -nt "${f}.br" ]]; then
|
||||||
|
printf "%s\0" "${f}"
|
||||||
|
fi
|
||||||
|
done < <(find "${live}" -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" \) -print0) \
|
||||||
|
| xargs -0 -r -P "${jobs}" -n 16 brotli -q 11 -k -f
|
||||||
|
' _ "${LIVE_REPOS}" "${JOBS}"
|
||||||
|
fi
|
||||||
|
run_checked "hs-archive-rotate --enforce-single-compression" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.archive_rotator \
|
||||||
|
--workspace-root "${REPOS_ROOT}" \
|
||||||
|
--enforce-single-compression \
|
||||||
|
--extra-scan-dir "${LIVE_REPOS}"
|
||||||
|
|
||||||
# Step 5: Idempotent systemd unit, logrotate.d & /etc/caddy/Caddyfile synchronization (enabled by default; skip with --no-caddy)
|
# Step 5: Idempotent systemd unit, logrotate.d & /etc/caddy/Caddyfile synchronization (enabled by default; skip with --no-caddy)
|
||||||
if [[ "${DO_CADDY}" -eq 1 ]]; then
|
if [[ "${DO_CADDY}" -eq 1 ]]; then
|
||||||
@@ -189,6 +339,12 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
|||||||
if [[ -w "/var/lib" ]] || [[ -n "${SUDO}" ]]; then
|
if [[ -w "/var/lib" ]] || [[ -n "${SUDO}" ]]; then
|
||||||
run_checked "mkdir /var/lib/hyperstitionstud.io" ${SUDO} mkdir -p "/var/lib/hyperstitionstud.io"
|
run_checked "mkdir /var/lib/hyperstitionstud.io" ${SUDO} mkdir -p "/var/lib/hyperstitionstud.io"
|
||||||
fi
|
fi
|
||||||
|
if [[ -w "/var/log" ]] || [[ -n "${SUDO}" ]]; then
|
||||||
|
run_checked "mkdir /var/log/caddy" ${SUDO} mkdir -p "/var/log/caddy"
|
||||||
|
if getent passwd caddy >&2; then
|
||||||
|
${SUDO} chown -R caddy:caddy "/var/log/caddy" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
SRC_LOGROTATE="${DEPLOY_DIR}/logrotate.d/hyperstition-sqlite-meta"
|
SRC_LOGROTATE="${DEPLOY_DIR}/logrotate.d/hyperstition-sqlite-meta"
|
||||||
DST_LOGROTATE="/etc/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 "${SRC_LOGROTATE}" ]] && [[ -d "/etc/logrotate.d" ]] && { [[ -w "/etc/logrotate.d" ]] || [[ -n "${SUDO}" ]]; }; then
|
||||||
@@ -201,9 +357,29 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SRC_CRON_ROTATE="${DEPLOY_DIR}/cron.d/hyperstition-archive-rotate"
|
||||||
|
DST_CRON_ROTATE="/etc/cron.d/hyperstition-archive-rotate"
|
||||||
|
if [[ -f "${SRC_CRON_ROTATE}" ]] && [[ -d "/etc/cron.d" ]] && { [[ -w "/etc/cron.d" ]] || [[ -n "${SUDO}" ]]; }; then
|
||||||
|
if [[ -f "${DST_CRON_ROTATE}" ]] && cmp -s "${SRC_CRON_ROTATE}" "${DST_CRON_ROTATE}"; then
|
||||||
|
echo "[5/5] ${DST_CRON_ROTATE} is already identical to deploy/cron.d/hyperstition-archive-rotate."
|
||||||
|
else
|
||||||
|
echo "[5/5] Installing 00:20 UTC archive rotation cron rule to ${DST_CRON_ROTATE}..."
|
||||||
|
run_checked "copy hyperstition-archive-rotate cron rule" ${SUDO} cp "${SRC_CRON_ROTATE}" "${DST_CRON_ROTATE}"
|
||||||
|
run_checked "chmod 0644 ${DST_CRON_ROTATE}" ${SUDO} chmod 0644 "${DST_CRON_ROTATE}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "$(type -P systemctl || true)" ]] && [[ -d "/run/systemd/system" ]]; then
|
if [[ -n "$(type -P systemctl || true)" ]] && [[ -d "/run/systemd/system" ]]; then
|
||||||
UNITS_CHANGED=0
|
UNITS_CHANGED=0
|
||||||
for unit_name in "hyperstition-tmpfs-sync.service" "hyperstition-mcp.service"; do
|
for unit_name in \
|
||||||
|
"hyperstition-tmpfs-sync.service" \
|
||||||
|
"hyperstition-mcp.service" \
|
||||||
|
"hyperstition-closing-bell-harvest.service" \
|
||||||
|
"hyperstition-closing-bell-harvest.timer" \
|
||||||
|
"hyperstition-utc-rollover-harvest.service" \
|
||||||
|
"hyperstition-utc-rollover-harvest.timer" \
|
||||||
|
"hyperstition-archive-rotate.service" \
|
||||||
|
"hyperstition-archive-rotate.timer"; do
|
||||||
src_u="${DEPLOY_DIR}/${unit_name}"
|
src_u="${DEPLOY_DIR}/${unit_name}"
|
||||||
dst_u="/etc/systemd/system/${unit_name}"
|
dst_u="/etc/systemd/system/${unit_name}"
|
||||||
if [[ -f "${src_u}" ]]; then
|
if [[ -f "${src_u}" ]]; then
|
||||||
@@ -219,6 +395,9 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
|||||||
run_checked "systemctl enable hyperstition-tmpfs-sync.service" ${SUDO} systemctl enable hyperstition-tmpfs-sync.service
|
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 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
|
run_checked "systemctl restart hyperstition-mcp.service" ${SUDO} systemctl restart hyperstition-mcp.service
|
||||||
|
run_checked "systemctl enable --now hyperstition-closing-bell-harvest.timer" ${SUDO} systemctl enable --now hyperstition-closing-bell-harvest.timer
|
||||||
|
run_checked "systemctl enable --now hyperstition-utc-rollover-harvest.timer" ${SUDO} systemctl enable --now hyperstition-utc-rollover-harvest.timer
|
||||||
|
run_checked "systemctl enable --now hyperstition-archive-rotate.timer" ${SUDO} systemctl enable --now hyperstition-archive-rotate.timer
|
||||||
elif [[ -f "/etc/systemd/system/hyperstition-mcp.service" ]]; then
|
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..."
|
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 enable --now hyperstition-mcp.service" ${SUDO} systemctl enable --now hyperstition-mcp.service
|
||||||
|
|||||||
@@ -52,15 +52,36 @@ fi
|
|||||||
echo "[3/4] Verifying all active portal, /learn/, /quant/, graph, encyclopedia, 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=(
|
ROUTES=(
|
||||||
"/"
|
"/"
|
||||||
|
"/assets/hs-group3-basalt-chamfer.css"
|
||||||
|
"/assets/hs-guile-scheme-repl.js"
|
||||||
|
"/assets/hs-matrix-coderain.js"
|
||||||
|
"/assets/hs-mobile-ui.js"
|
||||||
|
"/assets/matrix-font.woff2"
|
||||||
|
"/assets/closeups/quadrant-1-cybermemetics-calc-graph.png"
|
||||||
|
"/assets/closeups/quadrant-1-tab-2-graph.png"
|
||||||
|
"/assets/closeups/quadrant-2-esoteric-finance-quant.png"
|
||||||
|
"/assets/closeups/quadrant-2-tab-2-bayesian-fred.png"
|
||||||
|
"/assets/closeups/quadrant-2-tab-3-leaderboard-card.png"
|
||||||
|
"/assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png"
|
||||||
|
"/assets/closeups/quadrant-3-tab-2-math-guile.png"
|
||||||
|
"/assets/closeups/quadrant-3-tab-3-math-ts-rust.png"
|
||||||
|
"/assets/closeups/quadrant-4-operators-deployment-vps.png"
|
||||||
|
"/assets/closeups/quadrant-4-tab-2-mcp-etag.png"
|
||||||
|
"/assets/closeups/quadrant-4-tab-3-ci-gates.png"
|
||||||
"/donate/index.html"
|
"/donate/index.html"
|
||||||
"/learn/index.html"
|
"/learn/index.html"
|
||||||
"/learn/learn-app.js"
|
"/learn/learn-app.js"
|
||||||
"/quant/index.html"
|
"/quant/index.html"
|
||||||
"/quant/quant-app.js"
|
"/quant/quant-app.js"
|
||||||
"/quant/quant-tutorials.js"
|
"/quant/quant-tutorials.js"
|
||||||
|
"/quant/audio/voice-manifest.json"
|
||||||
|
"/quant/audio/ep01-s1.wav"
|
||||||
|
"/quant/audio/ep04-s1.wav"
|
||||||
"/quant/quant-timeseries-data.js"
|
"/quant/quant-timeseries-data.js"
|
||||||
"/quant/quant-timeseries.json"
|
"/quant/quant-timeseries.json"
|
||||||
"/quant/real-market-history.json"
|
"/quant/real-market-history.json"
|
||||||
|
"/quant/real-macro-indicators.json"
|
||||||
|
"/quant/daily-brief-latest.json"
|
||||||
"/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf"
|
"/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf"
|
||||||
"/graph/index.html"
|
"/graph/index.html"
|
||||||
"/graph/graph-data.js"
|
"/graph/graph-data.js"
|
||||||
@@ -69,11 +90,16 @@ ROUTES=(
|
|||||||
"/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf"
|
"/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf"
|
||||||
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html"
|
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.html"
|
||||||
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf"
|
"/graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf"
|
||||||
|
"/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
|
||||||
"/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
|
"/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
|
||||||
"/graph/docs/PLAN-QUANT-INTERFACE-INFO-ICONS-AND-GLOSSARY-POPOVERS.pdf"
|
"/graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf"
|
||||||
"/graph/docs/PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.pdf"
|
"/graph/docs/archive/archive-manifest.json"
|
||||||
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.pdf"
|
"/graph/docs/plans/inactive/inactive-archive-manifest.json"
|
||||||
"/graph/docs/PLAN-LLM-TOKEN-ECONOMIZER-DATA-FIDELITY-AND-DEGRADATION-RISK-EVALUATION.pdf"
|
"/graph/docs/plans/inactive/PLAN-PIECEWISE-COMPLETE-SOFTWARE-ENGINEERING-EXPLICATION.pdf"
|
||||||
|
"/graph/docs/plans/inactive/PLAN-PIECEWISE-COMPLETE-MATHEMATICS-AND-INFO-SCIENCE-EXPLICATION.pdf"
|
||||||
|
"/graph/docs/plans/inactive/PLAN-LEXICAL-AND-ETYMOLOGICAL-SIMPLIFICATION.pdf"
|
||||||
|
"/graph/docs/plans/inactive/PLAN-LLM-TOKEN-ECONOMIZER-AND-VARIANCE-ROUTING.pdf"
|
||||||
|
"/graph/docs/plans/inactive/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"
|
"/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"
|
"/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"
|
"/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf"
|
||||||
@@ -96,8 +122,22 @@ ROUTES=(
|
|||||||
"/schemas/v1/learn-progress-state.schema.json"
|
"/schemas/v1/learn-progress-state.schema.json"
|
||||||
"/schemas/v1/financial-aq-harvest.schema.json"
|
"/schemas/v1/financial-aq-harvest.schema.json"
|
||||||
"/schemas/v1/quant-timeseries.schema.json"
|
"/schemas/v1/quant-timeseries.schema.json"
|
||||||
|
"/schemas/v1/ticker-stats-card.schema.json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Dynamically append enabled /engineering/* and /math/* routes from their manifests so piecewise/reverted subsets work seamlessly
|
||||||
|
for man_p in \
|
||||||
|
"${SCRIPT_DIR}/../site/engineering/engineering-manifest.json" \
|
||||||
|
"${SCRIPT_DIR}/../site/math/math-manifest.json"; do
|
||||||
|
if [[ -f "${man_p}" ]]; then
|
||||||
|
while IFS= read -r dyn_r; do
|
||||||
|
if [[ -n "${dyn_r}" ]]; then
|
||||||
|
ROUTES+=("${dyn_r}")
|
||||||
|
fi
|
||||||
|
done < <(python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print("\n".join(d.get("enabled_routes",[])))' "${man_p}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
PASS_COUNT=0
|
PASS_COUNT=0
|
||||||
for route in "${ROUTES[@]}"; do
|
for route in "${ROUTES[@]}"; do
|
||||||
url="${TARGET_BASE_URL}${route}"
|
url="${TARGET_BASE_URL}${route}"
|
||||||
@@ -154,4 +194,10 @@ print(f" [OK] SQLite metadata DB populated ({summary['total_requests']} calls),
|
|||||||
PY
|
PY
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[OK] All ${PASS_COUNT}/${#ROUTES[@]} static routes + 2 MCP HTTP endpoints + 4 REST API v1 endpoints verified (HTTP 200 OK)."
|
echo "[4d/4] Running 6-Gate Ad-Hoc Public API & Surface Regression Suite (hs-public-smoke Gates P1-P6) against ${TARGET_BASE_URL}..."
|
||||||
|
PYTHONPATH="${SCRIPT_DIR}/../src" python3 -m hyperstitionstud_io.ci.public_regression \
|
||||||
|
--base-url "${TARGET_BASE_URL}" \
|
||||||
|
--mcp-url "${MCP_URL}" \
|
||||||
|
--api-v1-url "${API_V1_URL}"
|
||||||
|
|
||||||
|
echo "[OK] All ${PASS_COUNT}/${#ROUTES[@]} static routes + 2 MCP HTTP endpoints + 4 REST API v1 endpoints + 6 Public Regression Gates verified (HTTP 200 OK)."
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
# Global Plan Specification, Operational Governance & Flexibility Standard
|
||||||
|
|
||||||
|
**Document ID:** `PLAN-SPECIFICATION-AND-GOVERNANCE-STANDARD`
|
||||||
|
**Plan Reference:** `PLAN-QUANT-PRE-MARKET-OPEN-DAILY-BRIEF-AND-REGIME-CADENCE` (`Plan #72`)
|
||||||
|
**Scope:** Architectural planning, technical project management, release lifecycle governance, and operational execution across all 6 `hyperstitionstud.io` repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Purpose & Foundational Invariants
|
||||||
|
|
||||||
|
This standard formalizes the operational and architectural planning methodology across the `hyperstitionstud.io` ecosystem to ensure that all project management deliverables are legible, understandable, and comprehensively sound.
|
||||||
|
|
||||||
|
### Core Invariants
|
||||||
|
1. **Strict Planning vs. Implementation Boundary:** When asked to plan, the deliverable is strictly the architectural planning artifact (`.md` and compiled Dark-Mode ReportLab `.pdf` under `docs/plans/active/` or `docs/plans/piecewise/`, plus `references/roadmap-plan-ledger.md`), never unverified production code, partial stubs, or uncommitted working tree mutations.
|
||||||
|
2. **First-Resort Infrastructure Audit:** Existing automation infrastructure (systemd timers, cron rules, collector modules, cache tables) must be evaluated and prioritized before proposing net-new services or files. Creating new services or cron files is strictly a last resort.
|
||||||
|
3. **Comprehensive Lifecycle Scope:** Every plan must address end-to-end downstream impacts: data pipeline integrity, state archiving, single-layer (1x) compression, git repository commit cadence, and deployment script readiness (`DEPLOY-GATE-D01.MIRROR_PARITY` through `DEPLOY-GATE-D08.PRE_COMMIT_STAGE`).
|
||||||
|
4. **Disambiguated Prose & Comments:** All shorthand references in prose and comments must comply with `<PREFIX><NN>.<DOMAIN_TAG>` (e.g., `PANEL-P06.DAILY_BRIEF`, `REGIME-R01.BULL_RISK_ON`), while executable code remains globally exempt.
|
||||||
|
5. **Dual-Artifact Delivery:** Every active or piecewise plan is authored as version-controlled Markdown and immediately compiled to an offline-accessible Dark-Mode PDF via `hs-pdf-build`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Three-Tier Flexibility Protocol ("Strict by Default, Flexible on Demand")
|
||||||
|
|
||||||
|
To provide institutional rigor without creating bureaucratic bottlenecks during rapid prototyping or ad-hoc analysis, planning follows a 3-tier flexibility protocol:
|
||||||
|
|
||||||
|
```
|
||||||
|
Planning Tier Selection Model
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
| Tier 1: Standard Production Architectural Plan [DEFAULT] |
|
||||||
|
| Trigger: "plan to ...", "architect ...", or standard feature/release requests |
|
||||||
|
| Scope: Full 8-section specification, Dark-Mode PDF, ledger entry, VPS audit, gates, rollout |
|
||||||
|
| Target: docs/plans/active/PLAN-<SLUG>.{md,pdf} or docs/plans/piecewise/PLAN-<SLUG>.{md,pdf} |
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
|
|
||||||
|
(If explicitly requested)
|
||||||
|
v
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
| Tier 2: Lightweight Tactical Memo [EXPLICIT OVERRIDE] |
|
||||||
|
| Trigger: "lightweight plan", "brief plan", "memo: ...", "draft outline only" |
|
||||||
|
| Scope: Focused 1–2 page technical delta, core trade-offs, and verification commands |
|
||||||
|
| Skips: Full VPS infrastructure audit, compression analysis, PDF compilation (unless requested) |
|
||||||
|
| Target: docs/plans/active/PLAN-<SLUG>.md or inline CLI delivery |
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
|
|
||||||
|
(If explicitly requested)
|
||||||
|
v
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
| Tier 3: Exploratory Scratchpad / Spike [EXPLICIT OVERRIDE] |
|
||||||
|
| Trigger: "spike:", "scratchpad:", "throwaway spike:", "ad-hoc exploration:" |
|
||||||
|
| Scope: Unformatted notes, quick spikes, throwaway experiment scripts |
|
||||||
|
| Invariants: Written strictly to /workspace/untracked/; 0 ledger entries; 0 git commits |
|
||||||
|
+----------------------------------------------------------------------------------------------------+
|
||||||
|
```
|
||||||
|
|
||||||
|
### Protocol Rules
|
||||||
|
- **Default Behavior:** The agent always operates at **Tier 1** unless an explicit prompt marker matches Tier 2 or Tier 3.
|
||||||
|
- **Override Handling:** When an override is requested, the agent acknowledges the lighter tier in a single line (e.g., `[Tier 2 Lightweight Memo requested; skipping PDF compilation and VPS scheduling audit]`) and proceeds immediately with the focused delta.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Mandatory Sections for Tier 1 Production Architectural Plans
|
||||||
|
|
||||||
|
Tier 1 Production Plans must contain the following standard sections:
|
||||||
|
|
||||||
|
### 1. Document Metadata & Header
|
||||||
|
- Document ID: `PLAN-<TOPIC-SLUG>`
|
||||||
|
- Status: `ACTIVE (docs/plans/active/)` or `PIECEWISE (docs/plans/piecewise/)`
|
||||||
|
- Target Ecosystem Version: `vX.Y.Z` (with baseline)
|
||||||
|
- Target Repositories: Specific repository slugs
|
||||||
|
- Target Surfaces: Affected web routes, CLI tools, or background timers
|
||||||
|
- Web Route: Canonical public HTTPS URL for the compiled companion PDF
|
||||||
|
- Author & Date
|
||||||
|
|
||||||
|
### 2. Operational Objective & Motivation
|
||||||
|
- Plain-statement summary of the deliverable.
|
||||||
|
- Domain motivation and measurable delta (e.g., information asymmetry advantage, memory reduction, latency bounds).
|
||||||
|
|
||||||
|
### 3. Existing Infrastructure Audit & Scheduling Hierarchy
|
||||||
|
- Exhaustive audit of all existing automation surfaces (timers, cron, modules).
|
||||||
|
- Explicit 3-stage candidate hierarchy:
|
||||||
|
- **Strategy A (First Resort):** Maximally reuses existing units (e.g., multi-calendar systemd timer).
|
||||||
|
- **Strategy B (Second Resort):** Reuses existing files (e.g., cron multiplexing).
|
||||||
|
- **Strategy C (Strict Last Resort):** Dedicated net-new services/files, evaluated only if A and B are blocked.
|
||||||
|
|
||||||
|
### 4. Data Pipeline Integrity & Transactional Rollback Safety
|
||||||
|
- End-to-end data flow: Harvesters -> Compilers -> Verification -> RAM Hydration -> Push.
|
||||||
|
- Zero-synthetic-data compliance (`PLAN-GATE-G01.EXTANT_DATA`).
|
||||||
|
- Transactional rollback on verification failure (`git checkout -- .` without touching tmpfs).
|
||||||
|
|
||||||
|
### 5. Archiving & Historical Ledger Evolution
|
||||||
|
- Ledger format, storage path, and schema definition.
|
||||||
|
- Deduplication semantics and session-window discrimination (`session_window`).
|
||||||
|
- Retention window capacity and quiescent SQLite compaction (`sqlite_meta.py --compress-archive`).
|
||||||
|
|
||||||
|
### 6. Compression Standards & Optimization Guarantees
|
||||||
|
- Single-Layer (1x) Compression Invariant (`PLAN-SINGLE-LAYER-COMPRESSION-ENFORCEMENT-AND-MULTI-COMPRESSED-FILE-REMEDIATION`).
|
||||||
|
- Webroot pre-compression (`.gz` via `gzip -9` and `.br` via `brotli -q 11`).
|
||||||
|
- Server-side bundle size caps (`--max-bundle-kb 256`).
|
||||||
|
|
||||||
|
### 7. Git Repository Commit Cadence & Telemetry Reconciliation
|
||||||
|
- Automated commit frequency and commit message templates (`chore(telemetry): ...`).
|
||||||
|
- Gating: commits occur strictly when `git diff --cached` detects substantive changes.
|
||||||
|
- Lossless telemetry reconciliation (`DEPLOY-GATE-D04.LOSSLESS_TELEMETRY` via `--snapshot-telemetry` and `--reconcile-telemetry`).
|
||||||
|
|
||||||
|
### 8. Stepwise Verification Gates & Acceptance Criteria
|
||||||
|
- Tabulated binary verification gates with explicit command-line invocations.
|
||||||
|
|
||||||
|
### 9. Implementation Rollout Sequence
|
||||||
|
- Phased, non-breaking rollout steps.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 5-Tier Plan Classification & Lifecycle Hierarchy
|
||||||
|
|
||||||
|
Plans reside in designated filesystem locations under `encyclopedia-knowledge-graph/docs/plans/`:
|
||||||
|
|
||||||
|
| Tier | Classification | Filesystem Directory | PDF Compilation Policy |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| **Tier 1** | Active Non-Piecewise | `docs/plans/active/` | Mandatory Dark-Mode `.pdf` |
|
||||||
|
| **Tier 2** | Fully Affirmed Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||||
|
| **Tier 3** | Partially Affirmed Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||||
|
| **Tier 4** | Pending Audit Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||||
|
| **Tier 5.1** | Retained Inactive / Deferred | `docs/plans/inactive/` | Zero PDF compilation/recompilation |
|
||||||
|
| **Tier 5.2** | Cold-Archived Inactive | `docs/plans/inactive/inactive-plans-archive.tar.gz` | Zero PDF; manifests record SHA-256 |
|
||||||
|
| **Tier 5.3** | Cold-Archived Completed | `docs/archive/completed-plans-archive.tar.gz` | `.md`-only tarball; manifest records SHA-256 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Automated Plan Verification (`hs-plan-lint`)
|
||||||
|
|
||||||
|
The plan specification validator (`hyperstitionstud_io.ci.plan_validator`) enforces:
|
||||||
|
1. Every `.md` in `docs/plans/active/` and `docs/plans/piecewise/` has a matching `.pdf` in the same directory.
|
||||||
|
2. Every active and piecewise plan has an entry in `references/roadmap-plan-ledger.md`.
|
||||||
|
3. All mandatory metadata fields (`Document ID:`, `Status:`, `Target Ecosystem Version:`, `Target Repositories:`) are present.
|
||||||
|
4. Shorthands comply with `hs-shorthand-lint`.
|
||||||
|
5. No bare container host paths are serialized.
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Global `[A-Z][0-9]` Shorthand Disambiguation Standard (`<PREFIX><NN>.<DOMAIN_TAG>`)
|
||||||
|
|
||||||
|
**Document ID:** `SHORTHAND-DISAMBIGUATION-STANDARD`
|
||||||
|
**Plan Reference:** `PLAN-HUMAN-TEXT-AND-COMMENT-SHORTHAND-DISAMBIGUATION` (`Plan #68`)
|
||||||
|
**Scope:** All human-read documentation (`README.md`, `docs/*.md`, plans, manuals, encyclopedias), non-executable source comments (`#`, `//`, `/* ... */`, `<!-- ... -->`), and web UI prose across all `6` `hyperstitionstud.io` repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Global Executable Code Exemption & `ast.dump` Invariance
|
||||||
|
|
||||||
|
Executable code is **globally exempt** so software functionality is 100% unimpacted:
|
||||||
|
- **Never alter:** variable/function/class/constant names, imports, expressions, control flow, CLI flags, HTTP routes, JSON/TOML keys, schema enums, CSS selectors/classes, HTML element IDs, regexes, or runtime-asserted strings.
|
||||||
|
- **`ast.dump` Parity Guarantee:** Any `.py` file modified for shorthand disambiguation must only alter `#` comment tokens and must satisfy `ast.dump(ast.parse(before)) == ast.dump(ast.parse(after))`.
|
||||||
|
- **DOM/CSS Safety:** HTML/CSS anchors remain lowercase hyphenated (`#g01-quant`, `#unit-e03-quant-brief`) so `.` never breaks CSS selectors.
|
||||||
|
- **Locked JSON Keys:** When referencing SHA-256-locked JSON keys (`ReadOnlyIsolationGuard` in `taxonomy/glossary-registry.json` and `encyclopedia/encyclopedia-manifest.json`), use disambiguated canonical tags in prose without altering JSON keys or locked digests.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Canonical Disambiguation Table (`<PREFIX><NN>.<DOMAIN_TAG>`)
|
||||||
|
|
||||||
|
| Subsystem / Category | Legacy Bare Form | Canonical Disambiguated Form (`<PREFIX><NN>.<DOMAIN_TAG>`) |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **Architecture Atlas Tool Groups** | `G1..G8` | `G01.QUANT`, `G02.CALC_CI`, `G03.GRAPH`, `G04.ZOOLOGY`, `G05.ARCHIVE`, `G06.ENG_MATH`, `G07.PORTAL_LEARN`, `G08.MCP_DEPLOY` |
|
||||||
|
| **Orthographic Generations** | `G0`, `G1` | `GEN-00.ENGLISH`, `GEN-01.INGGLISH` |
|
||||||
|
| **Cipher & Phonemic Rules / Vectors** | `G1..G6` | `RULE-G01.COLLAPSE`, `RULE-G02.CROSS_GEN_TWIN`, `RULE-G03.STRUCTURAL`, `RULE-G04.ISOMETRIC`, `RULE-G05.TWIN_PRIME`, `RULE-G06.COMPOSITE` |
|
||||||
|
| **Engineering Plan Binary Gates** | `G1..G4` | `PLAN-GATE-G01.EXTANT_DATA`, `PLAN-GATE-G02.ZERO_LLM`, `PLAN-GATE-G03.EROFS_SAFE`, `PLAN-GATE-G04.EXPORTABLE` |
|
||||||
|
| **Deploy Script Gates** | `D1..D8` | `DEPLOY-GATE-D01.MIRROR_PARITY` .. `DEPLOY-GATE-D08.PRE_COMMIT_STAGE` |
|
||||||
|
| **Public Smoke Gates** | `P1..P6` | `SMOKE-GATE-P01.STATIC_ROUTES` .. `SMOKE-GATE-P06.NAV_STYLE_PARITY` |
|
||||||
|
| **Style & Mobile Regression Gates** | `S1..S4` | `STYLE-GATE-S01.NO_SLATE_BG`, `STYLE-GATE-S02.DEJAVU_FONT`, `STYLE-GATE-S03.HEADER_PARITY`, `STYLE-GATE-S04.MOBILE_UI` |
|
||||||
|
| **Engineering Hub Units** | `E0..E5` | `UNIT-E00.HUB`, `UNIT-E01.CIPHERS`, `UNIT-E02.GRAPH_SQLITE`, `UNIT-E03.QUANT_BRIEF`, `UNIT-E04.MCP_REST_IPLD`, `UNIT-E05.CICD_VPS` |
|
||||||
|
| **Applied Math Hub Units** | `M0..M5` | `UNIT-M00.HUB`, `UNIT-M01.BASE36_AQ`, `UNIT-M02.PHONETICS_ENTROPY`, `UNIT-M03.GRAPH_SPECTRAL`, `UNIT-M04.Z_CALCULUS`, `UNIT-M05.MACRO_BAYESIAN` |
|
||||||
|
| **`/learn/` Track Folios** | `M01..M06` | `LEARN-M01.CABBALA`, `LEARN-M02.PARASITE`, `LEARN-M03.SERIES`, `LEARN-M04.STRATA`, `LEARN-M05.RHIZOME`, `LEARN-M06.GEOMANCY` |
|
||||||
|
| **Singularity Classes** | `S1..S6` | `CLASS-S01.SILICON`, `CLASS-S02.TEMPLEX`, `CLASS-S03.WAR_MACHINE`, `CLASS-S04.CARRIER_WAVE`, `CLASS-S05.BWO`, `CLASS-S06.AGI` |
|
||||||
|
| **Memetic Superclasses** | `M1..M7+` | `CLASS-M01.ENTROPIC`, `CLASS-M02.KINETIC`, `CLASS-M03.LEVIATHAN`, `CLASS-M04.MIMETIC`, `CLASS-M05.ORACLE`, `CLASS-M06.ABYSSAL`, `CLASS-M07.HYPERSTITIONAL` |
|
||||||
|
| **Confluence Dose & Regimes** | `D0..D4`, `R1..R3` | `DOSE-D00.NONE` .. `DOSE-D04.FULL_LOCK`; `REGIME-R01.BULL`, `REGIME-R02.PINNED_ISOMETRIC`, `REGIME-R03.TAIL_DRAWDOWN` |
|
||||||
|
| **Polyglot Sandbox Security Rings** | `R1..R4` | `RING-R01.AST_WHITELIST`, `RING-R02.ZERO_EVAL`, `RING-R03.BOUNDED_FUEL`, `RING-R04.PURE_SUBSET` |
|
||||||
|
| **Ingglish AQ Curve Grading** | `D1..D5` | `CURVE-D01.LINEAR`, `CURVE-D02.LOG_COMPRESSION`, `CURVE-D03.QUANTILE`, `CURVE-D04.SIGMOID`, `CURVE-D05.HYBRID_ZSCORE` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Explicit Non-Shorthand Allowlist
|
||||||
|
|
||||||
|
The following tokens are standard technical/domain identifiers and are explicitly exempt from disambiguation:
|
||||||
|
- HTTP / Protocol / Runtime: `H1`, `H2`, `H3`, `V8` (Yahoo Finance v8 API)
|
||||||
|
- Monetary Aggregates: `M1`, `M2` (when referring to FRED `M1`/`M2` money supply)
|
||||||
|
- Statistical Percentiles: `P20`, `P50`, `P90`
|
||||||
|
- Harvest Keys & Encodings: `H01..H39`, `UTF-8`, `CIDv1`, `SHA-256`, `EUV`, `AI`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Automated Verification (`hs-shorthand-lint`)
|
||||||
|
|
||||||
|
- **Full 6-Repo Audit:** `hs-shorthand-lint` (or `python3 -m hyperstitionstud_io.ci.shorthand_lint --check-all`)
|
||||||
|
- **Pre-Commit Staged Gate:** `python3 -m hyperstitionstud_io.ci.shorthand_lint --staged-diff --repo <repo_root>` (wired into `.git/hooks/pre-commit` across all `6` repositories via `hs-readme-sync --install-hooks`).
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# `haiperdohpjematreeah` (`hyperstitionstud.io/calc/`): The Sleek, Updated & Adventurous Alternative to `cypher.news`
|
||||||
|
|
||||||
|
`cypher.news` did vital archival work by keeping the classic Gematro-era browser calculator alive, but its interface and flat-file loading still belong to an earlier era of the web. At [`https://hyperstitionstud.io/calc/`](https://hyperstitionstud.io/calc/), **`haiperdohpjematreeah`** carries that open-source lineage forward into a sleek, chamfered Stealth Basalt instrument deck engineered for zero-lag exploration. Instead of freezing the browser tab while parsing raw text lists on startup, `haiperdohpjematreeah` uses progressive two-stage database hydration—painting instant matches from a pre-computed lite index in milliseconds while silently hydrating the full **`231,615`-entry**, **`82`-cipher** matrix in the background, complete with one-click column/value highlighting, breakdown charts, and configurable Matrix code-rain.
|
||||||
|
|
||||||
|
Where `cypher.news` treats gematria purely as an exercise in silent-letter English spelling, `haiperdohpjematreeah` is built for the adventurous: it bridges written orthography with **spoken phonemic Ingglish** (`126,000+` CMUdict pronunciations) and **Base-36 Alphanumeric Qabbala (`AQ`)**. Flipping the built-in **`ING ↑`** match-priority toggle lets you cut straight through historical spelling drift so phrases that sound identical in spoken incantation lock onto the same numerical coordinates—exposing zero-variance phonemic convergence clusters, twin-prime mutations, and `37 × 3k` repdigit attractors (`333`, `666`, `777`) across `82` classical, Qabbalistic, and CCRU/Numogrammatic ciphers.
|
||||||
|
|
||||||
|
Best of all, `hyperstitionstud.io/calc/` never strands a discovery inside an isolated calculator window. Every coordinate you surface in `haiperdohpjematreeah` connects directly to the wider [`hyperstitionstud.io`](https://hyperstitionstud.io/) laboratory: pivot in one click from a cipher match into the `388`-node Concentric ETI Knowledge Graph ([`/graph/`](https://hyperstitionstud.io/graph/)), test whether that coordinate aligns with US closing-bell equities and St. Louis Fed (`FRED`) macro spreads ([`/quant/`](https://hyperstitionstud.io/quant/)), or inspect the underlying algebra in live Guile Scheme, TypeScript, and Rust sandboxes ([`/learn/`](https://hyperstitionstud.io/learn/), [`/math/`](https://hyperstitionstud.io/math/), [`/engineering/`](https://hyperstitionstud.io/engineering/)). Zero trackers, zero ads, 100% open-source, and built for practitioners ready to move from static word-counting to live cybermemetic cartography.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hyperstitionstud.io/workspace-core",
|
"name": "@hyperstitionstud.io/workspace-core",
|
||||||
"version": "2.0.23",
|
"version": "2.17.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Offline-first ESM & browser global (@hyperstitionstud.io/* / window.HyperstitionStudio.*) packages for Base-36 AQ ciphers and interactive knowledge graph workbenches.",
|
"description": "Offline-first ESM & browser global (@hyperstitionstud.io/* / window.HyperstitionStudio.*) packages for Base-36 AQ ciphers and interactive knowledge graph workbenches.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hyperstitionstud.io/ciphers-aq",
|
"name": "@hyperstitionstud.io/ciphers-aq",
|
||||||
"version": "2.0.23",
|
"version": "2.17.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "hyperstitionstudio-core"
|
name = "hyperstitionstudio-core"
|
||||||
version = "2.0.23"
|
version = "2.17.1"
|
||||||
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."
|
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"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
@@ -14,9 +14,12 @@ authors = [
|
|||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Pillow>=10.0.0",
|
"Pillow>=10.0.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
pdf = [
|
||||||
"reportlab>=4.0.0",
|
"reportlab>=4.0.0",
|
||||||
"pypdf>=4.0.0",
|
"pypdf>=4.0.0",
|
||||||
"pdfplumber>=0.10.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
@@ -28,6 +31,19 @@ hs-quant-harvest = "hyperstitionstud_io.quant.collector:main"
|
|||||||
hs-mcp = "hyperstitionstud_io.mcp.server:main"
|
hs-mcp = "hyperstitionstud_io.mcp.server:main"
|
||||||
hs-sync-version = "hyperstitionstud_io.version_sync:main"
|
hs-sync-version = "hyperstitionstud_io.version_sync:main"
|
||||||
hs-db-build = "hyperstitionstud_io.db.sqlite_meta:main"
|
hs-db-build = "hyperstitionstud_io.db.sqlite_meta:main"
|
||||||
|
hs-macro-harvest = "hyperstitionstud_io.quant.macro:main"
|
||||||
|
hs-daily-brief = "hyperstitionstud_io.quant.daily_brief:main"
|
||||||
|
hs-ticker-card = "hyperstitionstud_io.quant.cards:main"
|
||||||
|
hs-archive-rotate = "hyperstitionstud_io.publishing.archive_rotator:main"
|
||||||
|
hs-public-smoke = "hyperstitionstud_io.ci.public_regression:main"
|
||||||
|
hs-eng-docs = "hyperstitionstud_io.publishing.engineering_docs:main"
|
||||||
|
hs-math-docs = "hyperstitionstud_io.publishing.math_docs:main"
|
||||||
|
hs-highlights = "hyperstitionstud_io.publishing.highlights:main"
|
||||||
|
hs-readme-sync = "hyperstitionstud_io.publishing.readme_sync:main"
|
||||||
|
hs-closeups-sync = "hyperstitionstud_io.publishing.closeups_sync:main"
|
||||||
|
hs-quant-voice-build = "hyperstitionstud_io.publishing.quant_voice:main"
|
||||||
|
hs-deploy-scripts-sync = "hyperstitionstud_io.ci.deploy_scripts_sync:main"
|
||||||
|
hs-shorthand-lint = "hyperstitionstud_io.ci.shorthand_lint:main"
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["src"]
|
where = ["src"]
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "urn:io:hyperstitionstud:schema:v1:ticker-stats-card",
|
||||||
|
"title": "Hyperstition Studio One-Shot Ticker Stats Card (.png + .json)",
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"$schema",
|
||||||
|
"$id",
|
||||||
|
"version",
|
||||||
|
"synthetic_data_eliminated",
|
||||||
|
"card_identity",
|
||||||
|
"cipher_breakdown",
|
||||||
|
"tierzoo_base_stats_6",
|
||||||
|
"sports_card_box_score",
|
||||||
|
"tcg_abilities_and_moves",
|
||||||
|
"artifacts",
|
||||||
|
"ipld_dag_json_cidv1"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"$schema": { "type": "string" },
|
||||||
|
"$id": { "type": "string", "const": "urn:io:hyperstitionstud:schema:v1:ticker-stats-card" },
|
||||||
|
"version": { "type": "string" },
|
||||||
|
"synthetic_data_eliminated": { "type": "boolean", "const": true },
|
||||||
|
"card_identity": { "type": "object" },
|
||||||
|
"cipher_breakdown": { "type": "object" },
|
||||||
|
"tierzoo_base_stats_6": { "type": "object" },
|
||||||
|
"sports_card_box_score": { "type": "object" },
|
||||||
|
"tcg_abilities_and_moves": { "type": "object" },
|
||||||
|
"artifacts": { "type": "object" },
|
||||||
|
"ipld_dag_json_cidv1": { "type": "object" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -144,8 +144,8 @@ def main() -> int:
|
|||||||
})
|
})
|
||||||
|
|
||||||
manifest = {
|
manifest = {
|
||||||
"version": "2.0.23",
|
"version": "2.17.1",
|
||||||
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.0.23",
|
"namespace_urn": "urn:io:hyperstitionstud:gallery:2.17.1",
|
||||||
"total_items": len(items),
|
"total_items": len(items),
|
||||||
"items": items,
|
"items": items,
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,816 @@
|
|||||||
|
{
|
||||||
|
"$id": "urn:io:hyperstitionstud:closeups-ui-manifest",
|
||||||
|
"ui_elements_fingerprint_sha256": "575a5ef8137b8145fdaf914e28f29c06cd0fdec8ed2e0e68a4e0067837e277d9",
|
||||||
|
"closeup_images": [
|
||||||
|
"quadrant-1-cybermemetics-calc-graph.png",
|
||||||
|
"quadrant-1-tab-2-graph.png",
|
||||||
|
"quadrant-2-esoteric-finance-quant.png",
|
||||||
|
"quadrant-2-tab-2-bayesian-fred.png",
|
||||||
|
"quadrant-2-tab-3-leaderboard-card.png",
|
||||||
|
"quadrant-3-info-science-novice-learn-polyglot.png",
|
||||||
|
"quadrant-3-tab-2-math-guile.png",
|
||||||
|
"quadrant-3-tab-3-math-ts-rust.png",
|
||||||
|
"quadrant-4-operators-deployment-vps.png",
|
||||||
|
"quadrant-4-tab-2-mcp-etag.png",
|
||||||
|
"quadrant-4-tab-3-ci-gates.png"
|
||||||
|
],
|
||||||
|
"live_metrics": {
|
||||||
|
"calc_db_entries": 233815,
|
||||||
|
"quant_total_real_bars": 514,
|
||||||
|
"quant_bayesian_posteriors": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"engineering_counts": {
|
||||||
|
"repositories": 6,
|
||||||
|
"cli_entrypoints": 20,
|
||||||
|
"mcp_tools": 20,
|
||||||
|
"rest_domain_aliases": 12,
|
||||||
|
"enabled_lenses": 6,
|
||||||
|
"watchlist_instruments": 24,
|
||||||
|
"fred_macro_series": 14,
|
||||||
|
"json_schemas_v1": 12
|
||||||
|
},
|
||||||
|
"cli_scripts_sample": {
|
||||||
|
"hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main",
|
||||||
|
"hs-citations": "hyperstitionstud_io.ci.citation_sources:main",
|
||||||
|
"hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main",
|
||||||
|
"hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main"
|
||||||
|
},
|
||||||
|
"ci_keep_rate_pct": 100.0
|
||||||
|
},
|
||||||
|
"surfaces": {
|
||||||
|
"home": {
|
||||||
|
"ui_structure_sha256": "c087dc9ebf511dea01da971b92b39c8c017dd661721794e660cd8b24b9f1bcd4",
|
||||||
|
"id_count": 0,
|
||||||
|
"button_count": 11,
|
||||||
|
"option_count": 0,
|
||||||
|
"input_count": 0,
|
||||||
|
"heading_count": 1,
|
||||||
|
"ids": [],
|
||||||
|
"inputs": [],
|
||||||
|
"sample_buttons": [
|
||||||
|
"01 ☿ /calc/ Cipher Matrix",
|
||||||
|
"02 ☍ /graph/ ETI Radar",
|
||||||
|
"=3 Inspector\"\n data-closeup-href=\"/quant/index.html?screen=dose-d3\"\n data-closeup-route=\"quant-dose\"\n data-closeup-label=\"ACTIVE TAB: /quant/?screen=dose-d3 • 472 Bars (19d)\"\n data-closeup-cta=\"Launch Dose D≥3 →\">01 Δ Trajectory & Dose",
|
||||||
|
"02 ☍ Bayesian & FRED",
|
||||||
|
"03 ♄ 6-Lens & Card",
|
||||||
|
"01 ◈ /learn/ Prereq Track",
|
||||||
|
"02 λ Guile & Z-REPL",
|
||||||
|
"03 ≡ TypeScript & Rust",
|
||||||
|
"01 ⚚ DevOps & CLIs",
|
||||||
|
"02 ⚛ MCP & ETag 304",
|
||||||
|
"03 ◈ /ci/ 4-Gate Pipeline"
|
||||||
|
],
|
||||||
|
"sample_options": [],
|
||||||
|
"sample_headings": [
|
||||||
|
"HYPERSTITIONSTUD.IO // SINGULARITY ZOOLOGY WORKBENCH"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"quant": {
|
||||||
|
"ui_structure_sha256": "2ab4047333b1c330987a5ee5b67ed3e19125c508a603ed51a8b4be54a324a4ae",
|
||||||
|
"id_count": 68,
|
||||||
|
"button_count": 21,
|
||||||
|
"option_count": 0,
|
||||||
|
"input_count": 2,
|
||||||
|
"heading_count": 1,
|
||||||
|
"ids": [
|
||||||
|
"activeDateBadge",
|
||||||
|
"dailyBriefContainer",
|
||||||
|
"dailyBriefMeta",
|
||||||
|
"dailyBriefPanel",
|
||||||
|
"dateMetricsGrid",
|
||||||
|
"docReferencesCard",
|
||||||
|
"entity_threshold",
|
||||||
|
"exportCsvBtn",
|
||||||
|
"exportJsonBtn",
|
||||||
|
"guildFilterPills",
|
||||||
|
"guild_filter",
|
||||||
|
"heatmapPaginationBar",
|
||||||
|
"heatmapTable",
|
||||||
|
"heatmap_matrix",
|
||||||
|
"lagBarsContainer",
|
||||||
|
"lag_correlation_explorer",
|
||||||
|
"lensProjectionCard",
|
||||||
|
"lensSelect",
|
||||||
|
"macroIndicatorsGrid",
|
||||||
|
"macroIndicatorsPanel",
|
||||||
|
"metricModePills",
|
||||||
|
"metric_mode",
|
||||||
|
"navCalc",
|
||||||
|
"navDonate",
|
||||||
|
"navEng",
|
||||||
|
"navGraph",
|
||||||
|
"navHome",
|
||||||
|
"navLearn",
|
||||||
|
"navManual",
|
||||||
|
"navMath",
|
||||||
|
"navQuant",
|
||||||
|
"nextDateBtn",
|
||||||
|
"openTradingViewBtn",
|
||||||
|
"panel1Meta",
|
||||||
|
"panel1Title",
|
||||||
|
"panel3Title",
|
||||||
|
"panel3TvBtn",
|
||||||
|
"passagePreviewBox",
|
||||||
|
"periodicityAuditFooter",
|
||||||
|
"prevDateBtn",
|
||||||
|
"projection_lens",
|
||||||
|
"quantInfoPopover",
|
||||||
|
"quantTutorialBar",
|
||||||
|
"scope1_self_lock",
|
||||||
|
"scope2_ring_migration",
|
||||||
|
"scope3_wire_copresence",
|
||||||
|
"tickerQuickFilter",
|
||||||
|
"tickerSelect",
|
||||||
|
"ticker_select",
|
||||||
|
"timeWindowPills",
|
||||||
|
"tsCanvas",
|
||||||
|
"tutCitationPills",
|
||||||
|
"tutClearSpotlightBtn",
|
||||||
|
"tutEpisodeTabs",
|
||||||
|
"tutKeyframeTitle",
|
||||||
|
"tutNextBtn",
|
||||||
|
"tutPlayPauseBtn",
|
||||||
|
"tutPrevBtn",
|
||||||
|
"tutScrubber",
|
||||||
|
"tutSpeechBtn",
|
||||||
|
"tutStepBadge",
|
||||||
|
"tutSubtitleText",
|
||||||
|
"tutUiElementIndicator",
|
||||||
|
"vol20d_regimes",
|
||||||
|
"wireEqTape",
|
||||||
|
"wireTapeFilterInput",
|
||||||
|
"wireTapeHeader",
|
||||||
|
"wire_velocity_bars"
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
"Filter symbol, entity, or AQ...",
|
||||||
|
"Filter wire equations or AQ..."
|
||||||
|
],
|
||||||
|
"sample_buttons": [
|
||||||
|
"▶ Play Guided Tour",
|
||||||
|
"⏮ Prev Scene",
|
||||||
|
"Next Scene ⏭",
|
||||||
|
"🔊 Voice: ON",
|
||||||
|
"Clear Spotlight",
|
||||||
|
"i",
|
||||||
|
"i",
|
||||||
|
"i",
|
||||||
|
"i",
|
||||||
|
"← Prev Day",
|
||||||
|
"Next Day →",
|
||||||
|
"i"
|
||||||
|
],
|
||||||
|
"sample_options": [],
|
||||||
|
"sample_headings": [
|
||||||
|
"hyperstitionstud.io/quant — Quantitative Finance & Memetic Gematria Time-Series Workbench"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"learn": {
|
||||||
|
"ui_structure_sha256": "c3313aa013d20695e27cb78dde64a1e17b0dd90c09b0f47555af1b6aba72101d",
|
||||||
|
"id_count": 48,
|
||||||
|
"button_count": 11,
|
||||||
|
"option_count": 29,
|
||||||
|
"input_count": 2,
|
||||||
|
"heading_count": 7,
|
||||||
|
"ids": [
|
||||||
|
"bookmarkPaginationBar",
|
||||||
|
"bookmarkedCoordsList",
|
||||||
|
"btnAddBookmark",
|
||||||
|
"btnDownloadState",
|
||||||
|
"btnLoadDemoState",
|
||||||
|
"btnResetState",
|
||||||
|
"btnUploadState",
|
||||||
|
"card-M01",
|
||||||
|
"card-M02",
|
||||||
|
"card-M03",
|
||||||
|
"card-M04",
|
||||||
|
"card-M05",
|
||||||
|
"card-M06",
|
||||||
|
"chk-M01",
|
||||||
|
"chk-M02",
|
||||||
|
"chk-M03",
|
||||||
|
"chk-M04",
|
||||||
|
"chk-M05",
|
||||||
|
"chk-M06",
|
||||||
|
"filterBookmarkInput",
|
||||||
|
"importModeSelect",
|
||||||
|
"inputBookmarkCoord",
|
||||||
|
"inputUploadState",
|
||||||
|
"m01InputA",
|
||||||
|
"m01InputB",
|
||||||
|
"m01Output",
|
||||||
|
"m02Output",
|
||||||
|
"m02WordSelect",
|
||||||
|
"m03ModeSelect",
|
||||||
|
"m03Output",
|
||||||
|
"m03TriadSelect",
|
||||||
|
"m04HeadlineSelect",
|
||||||
|
"m04Output",
|
||||||
|
"m05BuildSelect",
|
||||||
|
"m05Output",
|
||||||
|
"m06Output",
|
||||||
|
"m06RegisterSelect",
|
||||||
|
"note-M01",
|
||||||
|
"note-M02",
|
||||||
|
"note-M03",
|
||||||
|
"note-M04",
|
||||||
|
"note-M05",
|
||||||
|
"note-M06",
|
||||||
|
"progressFill",
|
||||||
|
"progressText",
|
||||||
|
"stateCidBadge",
|
||||||
|
"statePortabilityBar",
|
||||||
|
"stateStatusMsg"
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
"Add AQ # (e.g. 137)",
|
||||||
|
"Filter saved AQ #..."
|
||||||
|
],
|
||||||
|
"sample_buttons": [
|
||||||
|
"Download State (.json)",
|
||||||
|
"Upload State (.json)",
|
||||||
|
"⚠ Load Simulated Demo State (Synthetic Example)",
|
||||||
|
"Reset Local State",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"Mark Module Complete",
|
||||||
|
"+ Bookmark"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"Upload Mode: Replace State",
|
||||||
|
"Upload Mode: Merge State",
|
||||||
|
"capital → kapatal (Isometric Δ=0)",
|
||||||
|
"charter → charter (Isometric Δ=0)",
|
||||||
|
"ASML → asml (Isometric Δ=0)",
|
||||||
|
"TSMC → tsmc (Isometric Δ=0)",
|
||||||
|
"GPU → gpu (Isometric Δ=0)",
|
||||||
|
"knight → nait (Ghost mass stripped)",
|
||||||
|
"Anthropic → anthropik (44th Prime Lock)",
|
||||||
|
"Blackwell → blakwel (S3 129 Lock)",
|
||||||
|
"Triad 292: schizoanalysis / abstract machine / synthetic data",
|
||||||
|
"Triad 256: acceleration / high-frequency / sovereign wealth"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO",
|
||||||
|
"1. What Is Base-36 Alphanumeric Qabbala (AQ)?",
|
||||||
|
"2. Sound Over Spelling: Gen 0 Written English vs. Gen 1 Phonemic Ingglish",
|
||||||
|
"3. What Is a \"Singularity\"? Vector G1 Variance Collapse (Var → 0.0)",
|
||||||
|
"4. Double Articulation (S1–S5 × S6) & Two-Gate Memetic Activation (M1–M7+)",
|
||||||
|
"5. Reading the ETI Tier List & Concentric Radar (S+ Center to D Periphery)",
|
||||||
|
"6. Practical Use Cases: Choosing Your Stakeholder Register & Bookmarks"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"engineering_hub": {
|
||||||
|
"ui_structure_sha256": "9d8f350da3fb9ad545b7bcaa14879a36ad185b890e313efbe0cd354046e08f0d",
|
||||||
|
"id_count": 14,
|
||||||
|
"button_count": 16,
|
||||||
|
"option_count": 16,
|
||||||
|
"input_count": 1,
|
||||||
|
"heading_count": 8,
|
||||||
|
"ids": [
|
||||||
|
"engCliFilterInput",
|
||||||
|
"engCliTable",
|
||||||
|
"guileSchemeModeState",
|
||||||
|
"guileSchemeModeToggle",
|
||||||
|
"hsGuilePreferFloat",
|
||||||
|
"hsGuileReplCloseBtn",
|
||||||
|
"hsGuileReplDrawer",
|
||||||
|
"hsGuileReplEvalBtn",
|
||||||
|
"hsGuileReplInput",
|
||||||
|
"hsGuileReplOutput",
|
||||||
|
"hsGuileReplPreset",
|
||||||
|
"hsGuileReplStepBtn",
|
||||||
|
"hsPolyglotModeSelector",
|
||||||
|
"hsPolyglotReplLang"
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
"Filter CLI command or module..."
|
||||||
|
],
|
||||||
|
"sample_buttons": [
|
||||||
|
"OFF",
|
||||||
|
"λGUILE",
|
||||||
|
"TSTYPESCRIPT",
|
||||||
|
"RsRUST",
|
||||||
|
"≡ ALL 3",
|
||||||
|
"λ Guile",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"≡ All 3",
|
||||||
|
"Hide",
|
||||||
|
"REPL →",
|
||||||
|
"REPL →"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"λ Guile Scheme",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
|
||||||
|
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
|
||||||
|
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
|
||||||
|
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
|
||||||
|
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
|
||||||
|
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
|
||||||
|
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
|
||||||
|
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
|
||||||
|
"[TS] Cluster 292 Variance: 514.8889"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"HYPERSTITION STUDIO // SOFTWARE ENGINEERING EXPLICATION HUB (UNIT E0)",
|
||||||
|
"Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation",
|
||||||
|
"Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine",
|
||||||
|
"Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief",
|
||||||
|
"Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1",
|
||||||
|
"Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke",
|
||||||
|
"End-to-End Periodic Data Harvest → CI/CD → Deployed VPS Infrastructure Flow Diagram",
|
||||||
|
"Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"engineering_e4": {
|
||||||
|
"ui_structure_sha256": "091da2701d8030d78b2c33614c62974e0b90cce8ddefecb748dffd19f42e0f67",
|
||||||
|
"id_count": 15,
|
||||||
|
"button_count": 17,
|
||||||
|
"option_count": 16,
|
||||||
|
"input_count": 0,
|
||||||
|
"heading_count": 5,
|
||||||
|
"ids": [
|
||||||
|
"guileSchemeModeState",
|
||||||
|
"guileSchemeModeToggle",
|
||||||
|
"hsGuilePreferFloat",
|
||||||
|
"hsGuileReplCloseBtn",
|
||||||
|
"hsGuileReplDrawer",
|
||||||
|
"hsGuileReplEvalBtn",
|
||||||
|
"hsGuileReplInput",
|
||||||
|
"hsGuileReplOutput",
|
||||||
|
"hsGuileReplPreset",
|
||||||
|
"hsGuileReplStepBtn",
|
||||||
|
"hsPolyglotModeSelector",
|
||||||
|
"hsPolyglotReplLang",
|
||||||
|
"live-smoke-probe",
|
||||||
|
"liveEtagProbeOutput",
|
||||||
|
"runLiveEtagProbeBtn"
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"sample_buttons": [
|
||||||
|
"OFF",
|
||||||
|
"λGUILE",
|
||||||
|
"TSTYPESCRIPT",
|
||||||
|
"RsRUST",
|
||||||
|
"≡ ALL 3",
|
||||||
|
"λ Guile",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"≡ All 3",
|
||||||
|
"Hide",
|
||||||
|
"REPL →",
|
||||||
|
"REPL →"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"λ Guile Scheme",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
|
||||||
|
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
|
||||||
|
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
|
||||||
|
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
|
||||||
|
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
|
||||||
|
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
|
||||||
|
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
|
||||||
|
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
|
||||||
|
"[TS] Cluster 292 Variance: 514.8889"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1",
|
||||||
|
"1. Unified Stateless MCP (/mcp) & Chatbot OpenAPI 3.1.0 REST Adapter (/api/v1/*)",
|
||||||
|
"2. One-Shot .png + .json Ticker Stats Cards (quant/cards.py) & Canonical IPLD dag-json (0x0129)",
|
||||||
|
"3. Command-Line Usage Examples: cURL, CLI (hs-ticker-card), Chatbot REST Client (/api/v1/tools/*) & MCP Client (/mcp)",
|
||||||
|
"⚛ Live API & IPLD CIDv1 ETag 304 Conditional Cache Probe (#live-smoke-probe)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"math_hub": {
|
||||||
|
"ui_structure_sha256": "614ba230cf6545ababf2d4e02c46a7e3893b7b8ac2cc5795efc270e9d192abc8",
|
||||||
|
"id_count": 12,
|
||||||
|
"button_count": 16,
|
||||||
|
"option_count": 16,
|
||||||
|
"input_count": 0,
|
||||||
|
"heading_count": 6,
|
||||||
|
"ids": [
|
||||||
|
"guileSchemeModeState",
|
||||||
|
"guileSchemeModeToggle",
|
||||||
|
"hsGuilePreferFloat",
|
||||||
|
"hsGuileReplCloseBtn",
|
||||||
|
"hsGuileReplDrawer",
|
||||||
|
"hsGuileReplEvalBtn",
|
||||||
|
"hsGuileReplInput",
|
||||||
|
"hsGuileReplOutput",
|
||||||
|
"hsGuileReplPreset",
|
||||||
|
"hsGuileReplStepBtn",
|
||||||
|
"hsPolyglotModeSelector",
|
||||||
|
"hsPolyglotReplLang"
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"sample_buttons": [
|
||||||
|
"OFF",
|
||||||
|
"λGUILE",
|
||||||
|
"TSTYPESCRIPT",
|
||||||
|
"RsRUST",
|
||||||
|
"≡ ALL 3",
|
||||||
|
"λ Guile",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"≡ All 3",
|
||||||
|
"Hide",
|
||||||
|
"REPL →",
|
||||||
|
"REPL →"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"λ Guile Scheme",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
|
||||||
|
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
|
||||||
|
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
|
||||||
|
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
|
||||||
|
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
|
||||||
|
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
|
||||||
|
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
|
||||||
|
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
|
||||||
|
"[TS] Cluster 292 Variance: 514.8889"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"HYPERSTITION STUDIO // MATHEMATICAL FOUNDATIONS & QUANTITATIVE SEMIOTICS HUB (UNIT M0)",
|
||||||
|
"Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)",
|
||||||
|
"Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6",
|
||||||
|
"Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY",
|
||||||
|
"Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}",
|
||||||
|
"Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"math_m1": {
|
||||||
|
"ui_structure_sha256": "37fc8b04d52192d7c1e5f509944916bba270599db0f7a5f38ecfa8ad9feef13f",
|
||||||
|
"id_count": 12,
|
||||||
|
"button_count": 16,
|
||||||
|
"option_count": 16,
|
||||||
|
"input_count": 0,
|
||||||
|
"heading_count": 3,
|
||||||
|
"ids": [
|
||||||
|
"guileSchemeModeState",
|
||||||
|
"guileSchemeModeToggle",
|
||||||
|
"hsGuilePreferFloat",
|
||||||
|
"hsGuileReplCloseBtn",
|
||||||
|
"hsGuileReplDrawer",
|
||||||
|
"hsGuileReplEvalBtn",
|
||||||
|
"hsGuileReplInput",
|
||||||
|
"hsGuileReplOutput",
|
||||||
|
"hsGuileReplPreset",
|
||||||
|
"hsGuileReplStepBtn",
|
||||||
|
"hsPolyglotModeSelector",
|
||||||
|
"hsPolyglotReplLang"
|
||||||
|
],
|
||||||
|
"inputs": [],
|
||||||
|
"sample_buttons": [
|
||||||
|
"OFF",
|
||||||
|
"λGUILE",
|
||||||
|
"TSTYPESCRIPT",
|
||||||
|
"RsRUST",
|
||||||
|
"≡ ALL 3",
|
||||||
|
"λ Guile",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"≡ All 3",
|
||||||
|
"Hide",
|
||||||
|
"REPL →",
|
||||||
|
"REPL →"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"λ Guile Scheme",
|
||||||
|
"TS TypeScript",
|
||||||
|
"Rs Rust",
|
||||||
|
"-- Load Preset Polyglot Expression (Guile / TS / Rust) --",
|
||||||
|
"[λ Guile] Base-36 AQ: (aq-base36 \"LEMUR\") => 114",
|
||||||
|
"[TS] Base-36 AQ: aqBase36(\"LEMUR\") => 114",
|
||||||
|
"[Rs Rust] Base-36 AQ: aq_base36(\"LEMUR\") => 114",
|
||||||
|
"[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)",
|
||||||
|
"[TS] Prime Factors: primeFactors(666) => [2,3,3,37]",
|
||||||
|
"[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]",
|
||||||
|
"[λ Guile] Exact Rational Variance (Cluster 292): 4634/9",
|
||||||
|
"[TS] Cluster 292 Variance: 514.8889"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)",
|
||||||
|
"1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}",
|
||||||
|
"2. Repdigit 37 × 3k Attractors & Prime Index π(n)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"graph": {
|
||||||
|
"ui_structure_sha256": "095cf74cd75866d3135d0eb0cac88c85fe2f9da1c5080c1f6f528f85e4ea1505",
|
||||||
|
"id_count": 26,
|
||||||
|
"button_count": 8,
|
||||||
|
"option_count": 11,
|
||||||
|
"input_count": 1,
|
||||||
|
"heading_count": 5,
|
||||||
|
"ids": [
|
||||||
|
"edgeRelToggles",
|
||||||
|
"exportPngBtn",
|
||||||
|
"flagFilter",
|
||||||
|
"flexPills",
|
||||||
|
"graphCanvas",
|
||||||
|
"graphNavCalc",
|
||||||
|
"graphNavDonate",
|
||||||
|
"graphNavEng",
|
||||||
|
"graphNavHome",
|
||||||
|
"graphNavLearn",
|
||||||
|
"graphNavMath",
|
||||||
|
"graphNavQuant",
|
||||||
|
"graphNavSelf",
|
||||||
|
"hudStats",
|
||||||
|
"inspBadges",
|
||||||
|
"inspBody",
|
||||||
|
"inspTitle",
|
||||||
|
"inspectorDrawer",
|
||||||
|
"isolationBox",
|
||||||
|
"minDegreeFilter",
|
||||||
|
"mobileGraphFiltersBtn",
|
||||||
|
"mobileGraphInspectorBtn",
|
||||||
|
"nbrList",
|
||||||
|
"nodeTypeToggles",
|
||||||
|
"resetViewBtn",
|
||||||
|
"searchInput"
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
"Search headword, Ingglish, or AQ (e.g. 125)..."
|
||||||
|
],
|
||||||
|
"sample_buttons": [
|
||||||
|
"Mode 2: ETI Radar (S+ -> D Periphery)",
|
||||||
|
"Mode 1: Trophic Food-Web",
|
||||||
|
"Mode 3: Gen 0 -> Gen 1 Funnel",
|
||||||
|
"Mode 4: 00–08 Folder Grid",
|
||||||
|
"Reset View",
|
||||||
|
"Export PNG",
|
||||||
|
"⚙ Ontology & Filters",
|
||||||
|
"ⓘ Node Inspector"
|
||||||
|
],
|
||||||
|
"sample_options": [
|
||||||
|
"Filter: All Nodes",
|
||||||
|
"G4 Isometric Fixed Points (Δ=0)",
|
||||||
|
"G5 Twin-Prime Mutations",
|
||||||
|
"G3 Quantized Steps",
|
||||||
|
"13 Multi-Build Flex Pivots",
|
||||||
|
"CCRU 9-Sum Numogram Syzygies (1::8, 2::7, 3::6, 4::5)",
|
||||||
|
"M7_candidate_2026_11_28",
|
||||||
|
"Degree: All Nodes",
|
||||||
|
"Min Degree ≥ 3",
|
||||||
|
"Min Degree ≥ 10",
|
||||||
|
"Min Degree ≥ 25 (Hubs)"
|
||||||
|
],
|
||||||
|
"sample_headings": [
|
||||||
|
"ENCYCLOPEDIA OF TECHNOCAPITAL SINGULARITY ZOOLOGY — INTERACTIVE KNOWLEDGE GRAPH",
|
||||||
|
"Node Ontology (6 Classes)",
|
||||||
|
"Edge Relations (8 Types)",
|
||||||
|
"13 Flex Pivots & Repdigit Hubs",
|
||||||
|
"Glossary Isolation Status"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"calc": {
|
||||||
|
"ui_structure_sha256": "b12869b3987b92b014ca25a0b18e75728df5ce2cefb5666d404af4a927f2dbb9",
|
||||||
|
"id_count": 35,
|
||||||
|
"button_count": 0,
|
||||||
|
"option_count": 0,
|
||||||
|
"input_count": 1,
|
||||||
|
"heading_count": 1,
|
||||||
|
"ids": [
|
||||||
|
"BreakdownDetails",
|
||||||
|
"BreakdownSpot",
|
||||||
|
"ChartSpot",
|
||||||
|
"ChartSpotScroll",
|
||||||
|
"HistoryTableArea",
|
||||||
|
"autoMatchBtn",
|
||||||
|
"calcLogo",
|
||||||
|
"calcMain",
|
||||||
|
"calcNavDonate",
|
||||||
|
"calcNavEng",
|
||||||
|
"calcNavGraph",
|
||||||
|
"calcNavHome",
|
||||||
|
"calcNavLearn",
|
||||||
|
"calcNavMath",
|
||||||
|
"calcNavQuant",
|
||||||
|
"calcNavSelf",
|
||||||
|
"calcOptionsPanel",
|
||||||
|
"canv",
|
||||||
|
"clearFilterButton",
|
||||||
|
"colorControlsMenuArea",
|
||||||
|
"dateCalcMenuArea",
|
||||||
|
"dbLoadIndicator",
|
||||||
|
"editCiphersMenuArea",
|
||||||
|
"enabledCiphTable",
|
||||||
|
"enterPhraseBtn",
|
||||||
|
"highlightBox",
|
||||||
|
"hltModeBtn",
|
||||||
|
"hsCalcHeader",
|
||||||
|
"hsGlobalFooter",
|
||||||
|
"inputArea",
|
||||||
|
"loadPanel",
|
||||||
|
"loader",
|
||||||
|
"logoText",
|
||||||
|
"phraseBox",
|
||||||
|
"queryDBbtn"
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
"highlight #s"
|
||||||
|
],
|
||||||
|
"sample_buttons": [],
|
||||||
|
"sample_options": [],
|
||||||
|
"sample_headings": [
|
||||||
|
"HYPERSTITIONSTUD.IO/CALC // HAIPERDOHPJEMATREEAH WORKBENCH"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"js_surfaces": {
|
||||||
|
"quant_app_js": {
|
||||||
|
"js_ui_sha256": "6d5239bdc10247344a7bb50636f9e3c8d9fc3be0e8d6232a257c735dea5ec0bf",
|
||||||
|
"dom_ids": [
|
||||||
|
"activeDateBadge",
|
||||||
|
"dailyBriefContainer",
|
||||||
|
"dateMetricsGrid",
|
||||||
|
"docReferencesCard",
|
||||||
|
"exportCsvBtn",
|
||||||
|
"exportJsonBtn",
|
||||||
|
"guildFilterPills",
|
||||||
|
"heatmapPaginationBar",
|
||||||
|
"heatmapTable",
|
||||||
|
"hmNextPageBtn",
|
||||||
|
"hmPrevPageBtn",
|
||||||
|
"hmToggleAllBtn",
|
||||||
|
"lagBarsContainer",
|
||||||
|
"lensProjectionCard",
|
||||||
|
"lensSelect",
|
||||||
|
"macroIndicatorsGrid",
|
||||||
|
"metricModePills",
|
||||||
|
"navCalc",
|
||||||
|
"navDonate",
|
||||||
|
"navGraph",
|
||||||
|
"navHome",
|
||||||
|
"navLearn",
|
||||||
|
"navManual",
|
||||||
|
"nextDateBtn",
|
||||||
|
"openTradingViewBtn",
|
||||||
|
"panel3Title",
|
||||||
|
"panel3TvBtn",
|
||||||
|
"passagePreviewBox",
|
||||||
|
"periodicityAuditFooter",
|
||||||
|
"popCloseBtn",
|
||||||
|
"prevDateBtn",
|
||||||
|
"quantInfoPopover",
|
||||||
|
"tickerQuickFilter",
|
||||||
|
"tickerSelect",
|
||||||
|
"timeWindowPills",
|
||||||
|
"tsCanvas",
|
||||||
|
"wireEqTape",
|
||||||
|
"wireTapeFilterInput",
|
||||||
|
"wireTapeHeader"
|
||||||
|
],
|
||||||
|
"ui_targets": [],
|
||||||
|
"ep_codes": [],
|
||||||
|
"speech_text_count": 0,
|
||||||
|
"lens_keys": [],
|
||||||
|
"has_ui_indicator_badge": false,
|
||||||
|
"has_lens_select_highlight": true
|
||||||
|
},
|
||||||
|
"quant_tutorials_js": {
|
||||||
|
"js_ui_sha256": "3a3aa865c6ce2b10c26b8d45d2d3c08dfd864b2e4f86b85e887787e7b7adad86",
|
||||||
|
"dom_ids": [
|
||||||
|
"tutCitationPills",
|
||||||
|
"tutClearSpotlightBtn",
|
||||||
|
"tutEpisodeTabs",
|
||||||
|
"tutKeyframeTitle",
|
||||||
|
"tutNextBtn",
|
||||||
|
"tutPlayPauseBtn",
|
||||||
|
"tutPrevBtn",
|
||||||
|
"tutScrubber",
|
||||||
|
"tutSpeechBtn",
|
||||||
|
"tutStepBadge",
|
||||||
|
"tutSubtitleText",
|
||||||
|
"tutUiElementIndicator",
|
||||||
|
"tutVoiceAudio"
|
||||||
|
],
|
||||||
|
"ui_targets": [
|
||||||
|
"\"dailyBriefPanel\", \"lensSelect\"",
|
||||||
|
"\"docReferencesCard\"",
|
||||||
|
"\"exportCsvBtn\", \"exportJsonBtn\"",
|
||||||
|
"\"guildFilterPills\", \"tickerQuickFilter\", \"tickerSelect\"",
|
||||||
|
"\"guildFilterPills\", \"tickerSelect\"",
|
||||||
|
"\"heatmapTable\", \"dateMetricsGrid\"",
|
||||||
|
"\"lagBarsContainer\"",
|
||||||
|
"\"lensSelect\", \"lensProjectionCard\"",
|
||||||
|
"\"macroIndicatorsPanel\", \"docReferencesCard\"",
|
||||||
|
"\"metricModePills\", \"tsCanvas\"",
|
||||||
|
"\"openTradingViewBtn\", \"panel3TvBtn\"",
|
||||||
|
"\"periodicityAuditFooter\"",
|
||||||
|
"\"tickerSelect\", \"docReferencesCard\"",
|
||||||
|
"\"tickerSelect\", \"lagBarsContainer\"",
|
||||||
|
"\"tickerSelect\", \"metricModePills\", \"tsCanvas\"",
|
||||||
|
"\"timeWindowPills\", \"activeDateBadge\", \"tsCanvas\"",
|
||||||
|
"\"tsCanvas\"",
|
||||||
|
"\"tsCanvas\", \"activeDateBadge\"",
|
||||||
|
"\"wireTapeFilterInput\", \"wireEqTape\""
|
||||||
|
],
|
||||||
|
"ep_codes": [
|
||||||
|
"Ep 01",
|
||||||
|
"Ep 02",
|
||||||
|
"Ep 03",
|
||||||
|
"Ep 04",
|
||||||
|
"Ep 05"
|
||||||
|
],
|
||||||
|
"speech_text_count": 25,
|
||||||
|
"lens_keys": [
|
||||||
|
"corporate_board",
|
||||||
|
"fantasy_sabermetrics",
|
||||||
|
"fund_manager",
|
||||||
|
"neutral_math",
|
||||||
|
"pokedex_scanner"
|
||||||
|
],
|
||||||
|
"has_ui_indicator_badge": true,
|
||||||
|
"has_lens_select_highlight": true
|
||||||
|
},
|
||||||
|
"learn_app_js": {
|
||||||
|
"js_ui_sha256": "0df7d15352426f575f0c4ecd65490f8796fd5ebbd9e4f0d26088289130265d03",
|
||||||
|
"dom_ids": [
|
||||||
|
"bmNextBtn",
|
||||||
|
"bmPrevBtn",
|
||||||
|
"bookmarkPaginationBar",
|
||||||
|
"bookmarkedCoordsList",
|
||||||
|
"btnAddBookmark",
|
||||||
|
"btnDownloadState",
|
||||||
|
"btnLoadDemoState",
|
||||||
|
"btnResetState",
|
||||||
|
"btnUploadState",
|
||||||
|
"filterBookmarkInput",
|
||||||
|
"importModeSelect",
|
||||||
|
"inputBookmarkCoord",
|
||||||
|
"inputUploadState",
|
||||||
|
"m01InputA",
|
||||||
|
"m01InputB",
|
||||||
|
"m01Output",
|
||||||
|
"m02Output",
|
||||||
|
"m02WordSelect",
|
||||||
|
"m03ModeSelect",
|
||||||
|
"m03Output",
|
||||||
|
"m03TriadSelect",
|
||||||
|
"m04HeadlineSelect",
|
||||||
|
"m04Output",
|
||||||
|
"m05BuildSelect",
|
||||||
|
"m05Output",
|
||||||
|
"m06Output",
|
||||||
|
"m06RegisterSelect",
|
||||||
|
"progressFill",
|
||||||
|
"progressText",
|
||||||
|
"stateCidBadge",
|
||||||
|
"statePortabilityBar",
|
||||||
|
"stateStatusMsg"
|
||||||
|
],
|
||||||
|
"ui_targets": [],
|
||||||
|
"ep_codes": [],
|
||||||
|
"speech_text_count": 0,
|
||||||
|
"lens_keys": [],
|
||||||
|
"has_ui_indicator_badge": false,
|
||||||
|
"has_lens_select_highlight": false
|
||||||
|
},
|
||||||
|
"polyglot_repl_js": {
|
||||||
|
"js_ui_sha256": "915cb90a58b96aaa92a6d138e65de8c9aa0e61ebe4ce032ee84e0158b8d27433",
|
||||||
|
"dom_ids": [
|
||||||
|
"guileSchemeModeState",
|
||||||
|
"guileSchemeModeToggle",
|
||||||
|
"hsGuilePreferFloat",
|
||||||
|
"hsGuileReplCloseBtn",
|
||||||
|
"hsGuileReplDrawer",
|
||||||
|
"hsGuileReplEvalBtn",
|
||||||
|
"hsGuileReplInput",
|
||||||
|
"hsGuileReplOutput",
|
||||||
|
"hsGuileReplPreset",
|
||||||
|
"hsGuileReplStepBtn",
|
||||||
|
"hsPolyglotReplLang"
|
||||||
|
],
|
||||||
|
"ui_targets": [],
|
||||||
|
"ep_codes": [],
|
||||||
|
"speech_text_count": 0,
|
||||||
|
"lens_keys": [],
|
||||||
|
"has_ui_indicator_badge": false,
|
||||||
|
"has_lens_select_highlight": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipld_dag_json_cidv1": {
|
||||||
|
"/": "baguqeera6nnx7kkrf3vmvixyazmic5gnnq2vnps5stmsyenduuvudc7qbnya"
|
||||||
|
},
|
||||||
|
"geometry_audit": {
|
||||||
|
"all_clean": true,
|
||||||
|
"checked_closeups": 11,
|
||||||
|
"breach_count": 0,
|
||||||
|
"border_crossing_count": 0,
|
||||||
|
"text_overlap_count": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,816 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
Hyperstition Studio — Unified Group 3 Style System (Preferred Default)
|
||||||
|
"Stealth Basalt Plate & Micro-Pip Signal Ribbon" (haiperdohp × hyperstitionstud.io)
|
||||||
|
- 90% Quiet Matte Basalt (#020617 Void / #070d1b Well / #0c1324-#111a2e Zebra / #26344d Border)
|
||||||
|
- 7% Interactive Affordance Layer (#132038 Fill / #38bdf8 Sky-Cyan Edge)
|
||||||
|
- 3% Explicit Attention Beacons (#f59e0b Amber-Gold / #f43f5e Rose / #10b981 Emerald)
|
||||||
|
- Universal 10px/4px 45-Deg Chamfered Plates + 24px × 3px Left-Shoulder Signal Pip
|
||||||
|
- Retained border-radius: 999px Stadium-Pill Donate Buttons (.btn-donate-pill & .tactile-donate-btn)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--font-mono: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||||
|
--bg-void: #020617;
|
||||||
|
--bg-deep: #020617;
|
||||||
|
--bg-well: #070d1b;
|
||||||
|
--bg-card: #0c1324;
|
||||||
|
--bg-panel: #0c1324;
|
||||||
|
--bg-surface: #0c1324;
|
||||||
|
--bg-elevated: #111a2e;
|
||||||
|
--bg-bezel: #182338;
|
||||||
|
--bg-interact: #132038;
|
||||||
|
--border: #26344d;
|
||||||
|
--border-subtle: #26344d;
|
||||||
|
--text-main: #e2e8f0;
|
||||||
|
--text-primary: #e2e8f0;
|
||||||
|
--text-secondary: #94a3b8;
|
||||||
|
--text-muted: #64748b;
|
||||||
|
--gold: #f59e0b;
|
||||||
|
--accent-gold: #f59e0b;
|
||||||
|
--cyan: #38bdf8;
|
||||||
|
--accent-cyan: #38bdf8;
|
||||||
|
--emerald: #10b981;
|
||||||
|
--accent-emerald: #10b981;
|
||||||
|
--rose: #f43f5e;
|
||||||
|
--accent-rose: #f43f5e;
|
||||||
|
--violet: #a855f7;
|
||||||
|
--accent-violet: #a855f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea,
|
||||||
|
code,
|
||||||
|
pre,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: var(--bg-void);
|
||||||
|
background-image:
|
||||||
|
linear-gradient(0deg, rgba(14, 22, 40, 0.38) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(14, 22, 40, 0.38) 1px, transparent 1px);
|
||||||
|
background-size: 32px 32px;
|
||||||
|
color: var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Group 3: 10px Top-Shoulder / 4px Bottom-Corner 45-Deg Chamfered Basalt Plates
|
||||||
|
+ Matte Basalt Stipple Top Rail + 28px × 3px Left-Shoulder Signal Pip */
|
||||||
|
header,
|
||||||
|
.card,
|
||||||
|
.panel,
|
||||||
|
.hero-panel,
|
||||||
|
.stat-card,
|
||||||
|
.module-card,
|
||||||
|
.lesson-panel,
|
||||||
|
.custody-card,
|
||||||
|
.allocation-card,
|
||||||
|
.hs-plate-g3,
|
||||||
|
.phraseGemContainer,
|
||||||
|
#BreakTableContainer,
|
||||||
|
#ChartSpot {
|
||||||
|
position: relative;
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 0 !important;
|
||||||
|
clip-path: polygon(
|
||||||
|
10px 0,
|
||||||
|
calc(100% - 10px) 0,
|
||||||
|
100% 10px,
|
||||||
|
100% calc(100% - 4px),
|
||||||
|
calc(100% - 4px) 100%,
|
||||||
|
4px 100%,
|
||||||
|
0 calc(100% - 4px),
|
||||||
|
0 10px
|
||||||
|
);
|
||||||
|
background-image:
|
||||||
|
linear-gradient(90deg, transparent 0px, transparent 14px, var(--pip-color, #475569) 14px, var(--pip-color, #475569) 42px, var(--bg-bezel) 42px, var(--bg-bezel) calc(100% - 10px), transparent calc(100% - 10px)),
|
||||||
|
radial-gradient(rgba(30, 45, 72, 0.32) 1px, transparent 0);
|
||||||
|
background-size: 100% 3px, 6px 6px;
|
||||||
|
background-position: 0 0, 0 0;
|
||||||
|
background-repeat: no-repeat, repeat;
|
||||||
|
min-width: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
--pip-color: #f59e0b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel.interactive-plate,
|
||||||
|
.lesson-panel,
|
||||||
|
#BreakTableContainer,
|
||||||
|
#ChartSpot {
|
||||||
|
--pip-color: #38bdf8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plate-lock-gold {
|
||||||
|
--pip-color: #f59e0b !important;
|
||||||
|
border-color: rgba(245, 158, 11, 0.65) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plate-lock-emerald {
|
||||||
|
--pip-color: #10b981 !important;
|
||||||
|
border-color: rgba(16, 185, 129, 0.65) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plate-lock-rose {
|
||||||
|
--pip-color: #f43f5e !important;
|
||||||
|
border-color: rgba(244, 63, 94, 0.72) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Recessed Wells (#BreakdownSpot / #ChartSpot / Code & Address Copy Boxes) */
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
.code-well,
|
||||||
|
.address-box,
|
||||||
|
#BreakdownSpot,
|
||||||
|
#ChartSpot {
|
||||||
|
background-color: var(--bg-well);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .HistoryTable / Zebra Tables (Calm Matte Slate Rows at Rest) */
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
background-color: var(--bg-well);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:nth-child(odd) td {
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:nth-child(even) td {
|
||||||
|
background-color: var(--bg-elevated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 7% Interactive Layer: 34px Height-Locked 45-Deg Chamfered Controls */
|
||||||
|
.top-nav a.btn:not(.btn-donate-pill),
|
||||||
|
.top-nav button.btn:not(.btn-donate-pill),
|
||||||
|
button.btn:not(.tactile-donate-btn),
|
||||||
|
a.btn:not(.btn-donate-pill):not(.tactile-donate-btn),
|
||||||
|
.intBtn,
|
||||||
|
#queryDBbtn,
|
||||||
|
#enterPhraseBtn,
|
||||||
|
#autoMatchBtn,
|
||||||
|
#hltModeBtn {
|
||||||
|
height: 34px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: var(--bg-interact);
|
||||||
|
color: var(--cyan);
|
||||||
|
border: 1px solid rgba(56, 189, 248, 0.55);
|
||||||
|
border-radius: 0 !important;
|
||||||
|
clip-path: polygon(
|
||||||
|
4px 0,
|
||||||
|
calc(100% - 4px) 0,
|
||||||
|
100% 4px,
|
||||||
|
100% calc(100% - 4px),
|
||||||
|
calc(100% - 4px) 100%,
|
||||||
|
4px 100%,
|
||||||
|
0 calc(100% - 4px),
|
||||||
|
0 4px
|
||||||
|
);
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav a.btn:not(.btn-donate-pill):hover,
|
||||||
|
button.btn:not(.tactile-donate-btn):hover,
|
||||||
|
.intBtn:hover {
|
||||||
|
border-color: var(--cyan);
|
||||||
|
background-color: #192b4b;
|
||||||
|
color: #f8fafc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RETAINED DONATION BUTTON STYLE (Deliberate border-radius: 999px Stadium-Pill Contrast — v2.4.0 Canonical Single Source of Truth) */
|
||||||
|
.nav-donate-sep {
|
||||||
|
width: 1px;
|
||||||
|
height: 20px;
|
||||||
|
background: var(--border);
|
||||||
|
margin: 0 0.2rem;
|
||||||
|
display: inline-block;
|
||||||
|
flex-shrink: 0;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-donate-pill {
|
||||||
|
height: 34px !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
border-radius: 999px !important;
|
||||||
|
clip-path: none !important;
|
||||||
|
padding: 0.28rem 0.9rem 0.28rem 0.35rem !important;
|
||||||
|
background: linear-gradient(180deg, #ffd86b 0%, #f59e0b 52%, #d97706 100%) !important;
|
||||||
|
color: #020617 !important;
|
||||||
|
border: 1px solid #f5c630 !important;
|
||||||
|
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(245, 158, 11, 0.22) !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
gap: 0.45rem !important;
|
||||||
|
font-size: 0.74rem !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
letter-spacing: 0.05em !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
text-decoration: none !important;
|
||||||
|
flex-shrink: 0 !important;
|
||||||
|
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-donate-pill:hover {
|
||||||
|
filter: brightness(1.06) !important;
|
||||||
|
transform: translateY(-1px) !important;
|
||||||
|
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 4px 12px rgba(245, 158, 11, 0.32) !important;
|
||||||
|
color: #020617 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.donate-pill-emblem {
|
||||||
|
width: 20px !important;
|
||||||
|
height: 20px !important;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
clip-path: none !important;
|
||||||
|
background: #0f172a !important;
|
||||||
|
color: var(--rose) !important;
|
||||||
|
border: 1px solid rgba(245, 198, 48, 0.7) !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
font-size: 0.68rem !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
flex-shrink: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tactile-donate-btn {
|
||||||
|
border-radius: 999px !important;
|
||||||
|
clip-path: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tactile-emblem {
|
||||||
|
border-radius: 50% !important;
|
||||||
|
clip-path: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================================
|
||||||
|
ADDITIVE POLYGLOT PEDAGOGICAL LENS (GUILE / TS / RUST / ALL 3) & REPL (v2.3.0)
|
||||||
|
============================================================================ */
|
||||||
|
.hs-polyglot-segmented {
|
||||||
|
height: 34px !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
background: var(--bg-void) !important;
|
||||||
|
border: 1px solid rgba(56, 189, 248, 0.55) !important;
|
||||||
|
padding: 0 0.2rem !important;
|
||||||
|
gap: 0.15rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-polyglot-prefix {
|
||||||
|
font-size: 0.66rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
padding: 0 0.35rem;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-polyglot-seg {
|
||||||
|
height: 26px !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
gap: 0.25rem !important;
|
||||||
|
padding: 0 0.48rem !important;
|
||||||
|
background: transparent !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
|
color: var(--text-secondary) !important;
|
||||||
|
font-size: 0.68rem !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
font-family: inherit !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-polyglot-seg:hover {
|
||||||
|
color: var(--cyan) !important;
|
||||||
|
border-color: rgba(56, 189, 248, 0.4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-polyglot-seg.hs-seg-active,
|
||||||
|
.hs-polyglot-seg[aria-checked="true"] {
|
||||||
|
background: rgba(16, 185, 129, 0.18) !important;
|
||||||
|
border-color: var(--emerald) !important;
|
||||||
|
color: var(--emerald) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-guile-toggle {
|
||||||
|
height: 34px !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
gap: 0.4rem !important;
|
||||||
|
padding: 0 0.72rem !important;
|
||||||
|
background: var(--bg-panel) !important;
|
||||||
|
border: 1px solid rgba(56, 189, 248, 0.55) !important;
|
||||||
|
color: var(--cyan) !important;
|
||||||
|
font-size: 0.72rem !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-guile-scheme-mode="on"] .hs-guile-toggle {
|
||||||
|
background: rgba(16, 185, 129, 0.16) !important;
|
||||||
|
border-color: var(--emerald) !important;
|
||||||
|
color: var(--emerald) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-guile-lambda-badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 0 3px;
|
||||||
|
background: var(--bg-void);
|
||||||
|
border: 1px solid currentColor;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.65rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-guile-cartridge {
|
||||||
|
display: none;
|
||||||
|
margin-top: 0.65rem;
|
||||||
|
margin-bottom: 0.9rem;
|
||||||
|
padding: 0.95rem 1.15rem;
|
||||||
|
border-left: 3px solid var(--cyan) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-guile-scheme-mode="on"] .hs-guile-cartridge {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-polyglot-lens="guile"] .hs-lang-box-ts,
|
||||||
|
html[data-polyglot-lens="guile"] .hs-lang-box-rust {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-polyglot-lens="ts"] .hs-lang-box-guile,
|
||||||
|
html[data-polyglot-lens="ts"] .hs-lang-box-rust {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-polyglot-lens="rust"] .hs-lang-box-guile,
|
||||||
|
html[data-polyglot-lens="rust"] .hs-lang-box-ts {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-guile-triview {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||||
|
gap: 0.65rem;
|
||||||
|
margin: 0.55rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-guile-box {
|
||||||
|
background: var(--bg-void);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
padding: 0.55rem 0.7rem;
|
||||||
|
font-size: 0.71rem;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hsGuileReplDrawer {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
right: 16px;
|
||||||
|
bottom: 16px;
|
||||||
|
width: min(560px, calc(100vw - 32px));
|
||||||
|
z-index: 90;
|
||||||
|
background: var(--bg-well);
|
||||||
|
border: 1px solid var(--cyan);
|
||||||
|
box-shadow: 0 14px 36px rgba(0, 0, 0, 0.82);
|
||||||
|
padding: 0.75rem 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-guile-scheme-mode="on"] #hsGuileReplDrawer {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hsGuileReplDrawer.hs-repl-minimized .hs-repl-body {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Subtle Basalt-Phosphor Matrix Code Rain & Cybernetic/Occult Micro-Sigils
|
||||||
|
========================================================================== */
|
||||||
|
@font-face {
|
||||||
|
font-family: "matrix-font";
|
||||||
|
src: url("matrix-font.woff2") format("woff2");
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hsMatrixCodeRainCanvas {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.45;
|
||||||
|
transition: opacity 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > .container,
|
||||||
|
body > header,
|
||||||
|
body > main,
|
||||||
|
body > section,
|
||||||
|
body > footer,
|
||||||
|
#hsGuileReplDrawer {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-sigil {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
opacity: 0.78;
|
||||||
|
margin-right: 0.28rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-sigil-seal {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
color: var(--gold);
|
||||||
|
opacity: 0.72;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
margin-left: 0.35rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-sigil-colophon {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
color: var(--cyan);
|
||||||
|
opacity: 0.68;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-plate-g3.plate-lock-gold::after,
|
||||||
|
.card.plate-lock-gold::after,
|
||||||
|
.panel.plate-lock-gold::after {
|
||||||
|
content: "\260D \00B7 37\00D73k";
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
right: 12px;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
font-size: 0.64rem;
|
||||||
|
color: var(--gold);
|
||||||
|
opacity: 0.32;
|
||||||
|
pointer-events: none;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-plate-g3.plate-lock-emerald::after,
|
||||||
|
.card.plate-lock-emerald::after,
|
||||||
|
.panel.plate-lock-emerald::after {
|
||||||
|
content: "\263F \00B7 \0394=0";
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
right: 12px;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
font-size: 0.64rem;
|
||||||
|
color: var(--emerald);
|
||||||
|
opacity: 0.32;
|
||||||
|
pointer-events: none;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-plate-g3.plate-lock-rose::after,
|
||||||
|
.card.plate-lock-rose::after,
|
||||||
|
.panel.plate-lock-rose::after {
|
||||||
|
content: "\2297 \00B7 S\00D7S6";
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
right: 12px;
|
||||||
|
font-family: 'DejaVu Sans Mono', monospace;
|
||||||
|
font-size: 0.64rem;
|
||||||
|
color: var(--rose);
|
||||||
|
opacity: 0.32;
|
||||||
|
pointer-events: none;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-sigil-accents="off"] .hs-sigil,
|
||||||
|
html[data-sigil-accents="off"] .hs-sigil-seal,
|
||||||
|
html[data-sigil-accents="off"] .hs-sigil-colophon,
|
||||||
|
html[data-sigil-accents="off"] .hs-plate-g3::after,
|
||||||
|
html[data-sigil-accents="off"] .card::after,
|
||||||
|
html[data-sigil-accents="off"] .panel::after {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-rain-toggle-btn {
|
||||||
|
padding: 0.18rem 0.52rem !important;
|
||||||
|
font-size: 0.67rem !important;
|
||||||
|
border-color: rgba(56, 189, 248, 0.45) !important;
|
||||||
|
color: var(--cyan) !important;
|
||||||
|
background: var(--bg-void) !important;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Homepage 2x2 Quadrant Frame Geometry & Single Interactive Chamfered Tab Row
|
||||||
|
(Strategy 1C-3: Top=16px, Bottom=16px, Left=20px, Right=20px, 6px Tab Gap)
|
||||||
|
========================================================================== */
|
||||||
|
.showcase-grid .card {
|
||||||
|
padding: 16px 20px !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start !important;
|
||||||
|
gap: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-tab-strip {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 2px 0 6px 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-tab-btn {
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 12px;
|
||||||
|
font-family: 'DejaVu Sans Mono', 'JetBrains Mono', ui-monospace, monospace;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
background: #0b0f17;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-tab-btn:hover {
|
||||||
|
color: var(--text-main);
|
||||||
|
border-color: var(--pip-color, var(--cyan));
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-tab-btn[aria-selected="true"] {
|
||||||
|
background: #121c2e;
|
||||||
|
color: var(--text-main);
|
||||||
|
border-color: var(--pip-color, var(--cyan));
|
||||||
|
box-shadow: inset 3px 0 0 var(--pip-color, var(--cyan)), inset 0 -2px 0 var(--pip-color, var(--cyan));
|
||||||
|
}
|
||||||
|
|
||||||
|
.showcase-grid .closeup-frame {
|
||||||
|
margin: 0 !important;
|
||||||
|
background: #05080e;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-viewport {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-viewport img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-bar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6px 10px;
|
||||||
|
background: #0a0e15;
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-bar-label {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-bar-cta {
|
||||||
|
color: var(--cyan);
|
||||||
|
font-weight: 700;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closeup-bar-cta:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Unified Cross-Page Navigation UI (Plan #63 & Plan #65 — Matching Homepage)
|
||||||
|
========================================================================== */
|
||||||
|
.title-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.65rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--cyan);
|
||||||
|
box-shadow: 0 0 10px var(--cyan);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav.hs-global-nav {
|
||||||
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 0.38rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1180px) {
|
||||||
|
.top-nav.hs-global-nav {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav.hs-global-nav .btn {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: var(--bg-interact);
|
||||||
|
color: var(--cyan);
|
||||||
|
border: 1px solid rgba(56, 189, 248, 0.55);
|
||||||
|
padding: 0.34rem 0.62rem;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav.hs-global-nav .btn:hover,
|
||||||
|
.meta-badges .btn:hover {
|
||||||
|
border-color: var(--cyan) !important;
|
||||||
|
background-color: #192b4b !important;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav.hs-global-nav .btn.primary,
|
||||||
|
.meta-badges .btn.primary,
|
||||||
|
a.btn.primary:not(.btn-donate-pill),
|
||||||
|
button.btn.primary:not(.tactile-donate-btn),
|
||||||
|
button.btn.active:not(.tactile-donate-btn) {
|
||||||
|
background-color: var(--cyan) !important;
|
||||||
|
color: #020617 !important;
|
||||||
|
border-color: var(--cyan) !important;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-subnav-bar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.55rem;
|
||||||
|
padding: 0.65rem 1rem;
|
||||||
|
margin-bottom: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-subnav-links {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.38rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Adaptive Group 3 Mobile UI (Plan #66 — Affirmed Strategies 1A, 2A, 3A, 4A)
|
||||||
|
Strictly scoped under html[data-device-ui="mobile"] (0 Desktop UI changes)
|
||||||
|
========================================================================== */
|
||||||
|
.hs-mobile-menu-btn,
|
||||||
|
.hs-mobile-nav-sheet {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] body {
|
||||||
|
padding: 0.65rem 0.65rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] header {
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
padding: 0.75rem 0.85rem !important;
|
||||||
|
gap: 0.5rem !important;
|
||||||
|
margin-bottom: 0.65rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] header h1 {
|
||||||
|
white-space: normal !important;
|
||||||
|
font-size: 0.85rem !important;
|
||||||
|
line-height: 1.3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .subtitle {
|
||||||
|
font-size: 0.66rem !important;
|
||||||
|
line-height: 1.35 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .hs-mobile-menu-btn {
|
||||||
|
display: inline-flex !important;
|
||||||
|
margin-left: auto;
|
||||||
|
height: 30px !important;
|
||||||
|
padding: 0 0.55rem !important;
|
||||||
|
font-size: 0.68rem !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .meta-badges,
|
||||||
|
html[data-device-ui="mobile"] .top-nav.hs-global-nav {
|
||||||
|
width: 100% !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
justify-content: flex-start !important;
|
||||||
|
flex-wrap: nowrap !important;
|
||||||
|
overflow-x: auto !important;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
gap: 0.35rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .hs-mobile-nav-sheet.open {
|
||||||
|
display: grid !important;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 0.45rem;
|
||||||
|
padding: 0.75rem;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border: 1px solid var(--cyan);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .hs-mobile-sheet-link {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 38px !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .hs-subnav-bar {
|
||||||
|
padding: 0.5rem 0.65rem !important;
|
||||||
|
overflow-x: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] .hs-polyglot-segmented {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] #hsGuileReplDrawer {
|
||||||
|
left: 8px !important;
|
||||||
|
right: 8px !important;
|
||||||
|
bottom: 8px !important;
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] #quantInfoPopover {
|
||||||
|
left: 8px !important;
|
||||||
|
right: 8px !important;
|
||||||
|
bottom: 8px !important;
|
||||||
|
top: auto !important;
|
||||||
|
width: auto !important;
|
||||||
|
max-width: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-device-ui="mobile"] #guildPills,
|
||||||
|
html[data-device-ui="mobile"] #modePills,
|
||||||
|
html[data-device-ui="mobile"] #tutEpisodeTabs {
|
||||||
|
flex-wrap: nowrap !important;
|
||||||
|
overflow-x: auto !important;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
max-width: 100%;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,381 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
Hyperstition Studio — Subtle Basalt-Phosphor Cybernetic Code Rain
|
||||||
|
Adapted from haiperdohp-jemaytreeah/calc/coderain.js (matrix-font.woff2)
|
||||||
|
- Three modes: "subtle" (default), "classic" (hyperdope-gematria), "off"
|
||||||
|
- Peripheral vignette attenuation (-60% behind central .container reading column)
|
||||||
|
- ~4% leading-droplet cybernetic & Hermetic/occult micro-sigil glints
|
||||||
|
- Page Visibility API & prefers-reduced-motion guards (Alt+M shortcut)
|
||||||
|
========================================================================== */
|
||||||
|
(function (root) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var STORAGE_KEY = "hs:matrix-coderain:v1";
|
||||||
|
|
||||||
|
// Exact 66-code glyph repertoire from haiperdohp-jemaytreeah/calc/coderain.js
|
||||||
|
var MATRIX_CHARS = [
|
||||||
|
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
||||||
|
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53,
|
||||||
|
54, 55, 56, 57, 36, 43, 45, 42, 47, 61, 37, 34, 39, 35, 38, 95, 40, 41, 44,
|
||||||
|
46, 59, 58, 63, 33, 92, 124, 123, 125, 60, 62, 91, 93, 94, 126
|
||||||
|
];
|
||||||
|
|
||||||
|
// Canonical 8-sigil + mathematical glint vocabulary (verified in DejaVuSansMono.ttf)
|
||||||
|
var SIGIL_GLINTS = [
|
||||||
|
"\u263F", // ☿ Mercury (Ciphers / Ingglish)
|
||||||
|
"\u260D", // ☍ Opposition / Syzygy (333/666/777 Locks)
|
||||||
|
"\u2609", // ☉ Solar Monad (Knowledge Graph Apex Hubs)
|
||||||
|
"\u2644", // ♄ Saturn (Chronos / Time-Series & Cold Archive)
|
||||||
|
"\u269A", // ⚚ Staff of Hermes (MCP / REST Conduit)
|
||||||
|
"\u269B", // ⚛ Cybernetic Kernel (Wiener Feedback / EROFS)
|
||||||
|
"\u25C8", // ◈ Isometric Lattice Node (RULE-G04.ISOMETRIC Fixed Point)
|
||||||
|
"\u2206", // ∆ Alchemical / Variance-Collapse Delta
|
||||||
|
"\u2297", // ⊗ Double Articulation (CLASS-S01.SILICON..CLASS-S05.BWO x CLASS-S06.AGI)
|
||||||
|
"\u03BB", // λ Church / Z-Combinator Lambda
|
||||||
|
"\u03A6", // Φ Phonemic Projection
|
||||||
|
"\u03A9", // Ω Terminal Attractor
|
||||||
|
"\u221E" // ∞ Recursive Horizon
|
||||||
|
];
|
||||||
|
|
||||||
|
var PROFILES = {
|
||||||
|
subtle: {
|
||||||
|
mode: "subtle",
|
||||||
|
label: "SUBTLE",
|
||||||
|
hue: 152,
|
||||||
|
sat: 34,
|
||||||
|
lit: 24,
|
||||||
|
fontSizePx: 12.5,
|
||||||
|
colPitchPx: 24,
|
||||||
|
stepPx: 13,
|
||||||
|
frameIntervalMs: 80,
|
||||||
|
canvasOpacity: 0.45,
|
||||||
|
fadeFill: "rgba(2, 6, 23, 0.095)",
|
||||||
|
trailAlphaOuter: 0.24,
|
||||||
|
trailAlphaCenter: 0.085,
|
||||||
|
tipAlphaOuter: 0.34,
|
||||||
|
tipAlphaCenter: 0.14,
|
||||||
|
resetHorizonPx: 18000,
|
||||||
|
sigilGlintProb: 0.045
|
||||||
|
},
|
||||||
|
classic: {
|
||||||
|
mode: "classic",
|
||||||
|
label: "CLASSIC",
|
||||||
|
hue: 148,
|
||||||
|
sat: 20,
|
||||||
|
lit: 19,
|
||||||
|
fontSizePx: 17,
|
||||||
|
colPitchPx: 15,
|
||||||
|
stepPx: 20,
|
||||||
|
frameIntervalMs: 50,
|
||||||
|
canvasOpacity: 0.72,
|
||||||
|
fadeFill: "rgba(2, 6, 23, 0.07)",
|
||||||
|
trailAlphaOuter: 0.52,
|
||||||
|
trailAlphaCenter: 0.28,
|
||||||
|
tipAlphaOuter: 0.68,
|
||||||
|
tipAlphaCenter: 0.40,
|
||||||
|
resetHorizonPx: 10000,
|
||||||
|
sigilGlintProb: 0.06
|
||||||
|
},
|
||||||
|
off: {
|
||||||
|
mode: "off",
|
||||||
|
label: "OFF",
|
||||||
|
canvasOpacity: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function computeColumnAlpha(xPx, widthPx, profile, isTip) {
|
||||||
|
if (!widthPx || widthPx <= 0) return isTip ? profile.tipAlphaOuter : profile.trailAlphaOuter;
|
||||||
|
var normX = xPx / widthPx;
|
||||||
|
// Outer 14% margins on left and right get outer alpha; central 72% reading well is attenuated
|
||||||
|
var distFromCenter = Math.abs(normX - 0.5) * 2.0; // 0 at center, 1 at edges
|
||||||
|
var t = Math.max(0, Math.min(1, (distFromCenter - 0.55) / 0.45));
|
||||||
|
var centerA = isTip ? profile.tipAlphaCenter : profile.trailAlphaCenter;
|
||||||
|
var outerA = isTip ? profile.tipAlphaOuter : profile.trailAlphaOuter;
|
||||||
|
return Number((centerA + (outerA - centerA) * t).toFixed(4));
|
||||||
|
}
|
||||||
|
|
||||||
|
function pickRandomGlyph(sigilProb) {
|
||||||
|
if (sigilProb > 0 && Math.random() < sigilProb) {
|
||||||
|
return {
|
||||||
|
ch: SIGIL_GLINTS[Math.floor(Math.random() * SIGIL_GLINTS.length)],
|
||||||
|
isSigil: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var code = MATRIX_CHARS[Math.floor(Math.random() * MATRIX_CHARS.length)];
|
||||||
|
return {
|
||||||
|
ch: String.fromCharCode(code),
|
||||||
|
isSigil: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function initBrowserCodeRain() {
|
||||||
|
if (typeof document === "undefined" || !document.body) return null;
|
||||||
|
|
||||||
|
var canvas = document.getElementById("hsMatrixCodeRainCanvas");
|
||||||
|
if (!canvas) {
|
||||||
|
canvas = document.createElement("canvas");
|
||||||
|
canvas.id = "hsMatrixCodeRainCanvas";
|
||||||
|
canvas.setAttribute("aria-hidden", "true");
|
||||||
|
document.body.insertBefore(canvas, document.body.firstChild);
|
||||||
|
}
|
||||||
|
var ctx = canvas.getContext && canvas.getContext("2d");
|
||||||
|
if (!ctx) return null;
|
||||||
|
|
||||||
|
var currentMode = "subtle";
|
||||||
|
try {
|
||||||
|
var saved = window.localStorage.getItem(STORAGE_KEY);
|
||||||
|
if (saved && PROFILES[saved]) currentMode = saved;
|
||||||
|
} catch (_e) {}
|
||||||
|
|
||||||
|
var reducedMotion = false;
|
||||||
|
try {
|
||||||
|
reducedMotion = !!(window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
||||||
|
} catch (_e) {}
|
||||||
|
|
||||||
|
var width = 0;
|
||||||
|
var height = 0;
|
||||||
|
var cols = 0;
|
||||||
|
var ypos = [];
|
||||||
|
var colSpeeds = [];
|
||||||
|
var rafId = null;
|
||||||
|
var lastTickTime = 0;
|
||||||
|
|
||||||
|
function setupColumns() {
|
||||||
|
var prof = PROFILES[currentMode] || PROFILES.subtle;
|
||||||
|
width = canvas.width = Math.max(320, window.innerWidth || document.documentElement.clientWidth || 1280);
|
||||||
|
height = canvas.height = Math.max(240, window.innerHeight || document.documentElement.clientHeight || 800);
|
||||||
|
ctx.fillStyle = "#020617";
|
||||||
|
ctx.fillRect(0, 0, width, height);
|
||||||
|
|
||||||
|
if (prof.mode === "off") {
|
||||||
|
cols = 0;
|
||||||
|
ypos = [];
|
||||||
|
colSpeeds = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cols = Math.floor(width / prof.colPitchPx) + 1;
|
||||||
|
ypos = new Array(cols);
|
||||||
|
colSpeeds = new Array(cols);
|
||||||
|
for (var i = 0; i < cols; i++) {
|
||||||
|
// Stagger initial positions so only ~35% of streams are initially in-viewport
|
||||||
|
ypos[i] = Math.random() < 0.35
|
||||||
|
? Math.floor(Math.random() * height)
|
||||||
|
: -Math.floor(Math.random() * height * 1.6);
|
||||||
|
colSpeeds[i] = 0.85 + Math.random() * 0.30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function stepFrame() {
|
||||||
|
var prof = PROFILES[currentMode];
|
||||||
|
if (!prof || prof.mode === "off") return;
|
||||||
|
|
||||||
|
ctx.shadowBlur = 0;
|
||||||
|
ctx.fillStyle = prof.fadeFill;
|
||||||
|
ctx.fillRect(0, 0, width, height);
|
||||||
|
|
||||||
|
var baseFont = prof.fontSizePx + "px 'matrix-font', 'DejaVu Sans Mono', monospace";
|
||||||
|
var sigilFont = (prof.fontSizePx + 0.5) + "px 'DejaVu Sans Mono', monospace";
|
||||||
|
|
||||||
|
for (var ind = 0; ind < cols; ind++) {
|
||||||
|
var y = ypos[ind];
|
||||||
|
var x = ind * prof.colPitchPx;
|
||||||
|
if (y >= 0 && y <= height + 30) {
|
||||||
|
var glyph = pickRandomGlyph(prof.sigilGlintProb);
|
||||||
|
if (glyph.isSigil) {
|
||||||
|
var tipA = computeColumnAlpha(x, width, prof, true);
|
||||||
|
ctx.font = sigilFont;
|
||||||
|
ctx.fillStyle = "hsla(168, 55%, 48%, " + tipA + ")";
|
||||||
|
ctx.fillText(glyph.ch, x, y);
|
||||||
|
} else {
|
||||||
|
var trA = computeColumnAlpha(x, width, prof, false);
|
||||||
|
ctx.font = baseFont;
|
||||||
|
ctx.fillStyle = "hsla(" + prof.hue + ", " + prof.sat + "%, " + prof.lit + "%, " + trA + ")";
|
||||||
|
ctx.fillText(glyph.ch, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (y > 120 + Math.random() * prof.resetHorizonPx) {
|
||||||
|
ypos[ind] = -Math.floor(Math.random() * 360);
|
||||||
|
} else {
|
||||||
|
ypos[ind] = y + prof.stepPx * colSpeeds[ind];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loop(now) {
|
||||||
|
var prof = PROFILES[currentMode];
|
||||||
|
if (!prof || prof.mode === "off" || document.hidden) {
|
||||||
|
rafId = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!lastTickTime || now - lastTickTime >= prof.frameIntervalMs) {
|
||||||
|
lastTickTime = now;
|
||||||
|
stepFrame();
|
||||||
|
}
|
||||||
|
if (!reducedMotion) {
|
||||||
|
rafId = window.requestAnimationFrame(loop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateToggleButtons() {
|
||||||
|
var prof = PROFILES[currentMode] || PROFILES.subtle;
|
||||||
|
document.querySelectorAll(".hs-rain-toggle-btn").forEach(function (btn) {
|
||||||
|
btn.textContent = "\u263F RAIN: " + prof.label;
|
||||||
|
btn.setAttribute("data-rain-mode", prof.mode);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyMode(mode) {
|
||||||
|
if (!PROFILES[mode]) mode = "subtle";
|
||||||
|
currentMode = mode;
|
||||||
|
var prof = PROFILES[currentMode];
|
||||||
|
document.documentElement.setAttribute("data-matrix-coderain", mode);
|
||||||
|
try {
|
||||||
|
window.localStorage.setItem(STORAGE_KEY, mode);
|
||||||
|
} catch (_e) {}
|
||||||
|
|
||||||
|
if (rafId) {
|
||||||
|
window.cancelAnimationFrame(rafId);
|
||||||
|
rafId = null;
|
||||||
|
}
|
||||||
|
if (mode === "off") {
|
||||||
|
canvas.style.opacity = "0";
|
||||||
|
canvas.style.display = "none";
|
||||||
|
} else {
|
||||||
|
canvas.style.display = "block";
|
||||||
|
canvas.style.opacity = String(prof.canvasOpacity);
|
||||||
|
setupColumns();
|
||||||
|
// Pre-warm 8 steps so the initial frame has subtle phosphor trails
|
||||||
|
for (var wStep = 0; wStep < 8; wStep++) stepFrame();
|
||||||
|
if (!reducedMotion && !document.hidden) {
|
||||||
|
rafId = window.requestAnimationFrame(loop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateToggleButtons();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cycleMode() {
|
||||||
|
var order = ["subtle", "classic", "off"];
|
||||||
|
var nextIdx = (order.indexOf(currentMode) + 1) % order.length;
|
||||||
|
applyMode(order[nextIdx]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inject a compact toggle pill into <footer> if not already present
|
||||||
|
var footerEl = document.querySelector("footer");
|
||||||
|
if (footerEl && !footerEl.querySelector(".hs-rain-toggle-btn")) {
|
||||||
|
var btn = document.createElement("button");
|
||||||
|
btn.type = "button";
|
||||||
|
btn.className = "btn hs-rain-toggle-btn";
|
||||||
|
btn.title = "Cycle Cybernetic Code Rain Background: SUBTLE / CLASSIC / OFF (Alt+M)";
|
||||||
|
btn.addEventListener("click", cycleMode);
|
||||||
|
var wrap = document.createElement("span");
|
||||||
|
wrap.style.marginLeft = "0.55rem";
|
||||||
|
wrap.appendChild(btn);
|
||||||
|
footerEl.appendChild(wrap);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll(".hs-rain-toggle-btn").forEach(function (b) {
|
||||||
|
if (!b.__hsBound) {
|
||||||
|
b.__hsBound = true;
|
||||||
|
b.addEventListener("click", cycleMode);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener("keydown", function (ev) {
|
||||||
|
if (ev.altKey && (ev.key === "m" || ev.key === "M")) {
|
||||||
|
ev.preventDefault();
|
||||||
|
cycleMode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener("visibilitychange", function () {
|
||||||
|
if (document.hidden) {
|
||||||
|
if (rafId) {
|
||||||
|
window.cancelAnimationFrame(rafId);
|
||||||
|
rafId = null;
|
||||||
|
}
|
||||||
|
} else if (currentMode !== "off" && !reducedMotion && !rafId) {
|
||||||
|
lastTickTime = 0;
|
||||||
|
rafId = window.requestAnimationFrame(loop);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var resizeTimer = null;
|
||||||
|
window.addEventListener("resize", function () {
|
||||||
|
if (resizeTimer) clearTimeout(resizeTimer);
|
||||||
|
resizeTimer = setTimeout(function () {
|
||||||
|
if (currentMode !== "off") setupColumns();
|
||||||
|
}, 150);
|
||||||
|
});
|
||||||
|
|
||||||
|
applyMode(currentMode);
|
||||||
|
|
||||||
|
// Strategy 3B, 4B & 5B: Zero-PII Conditional ETag Surface, Donate-From, Donate-Copy & Export-Action Handshake
|
||||||
|
try {
|
||||||
|
if (window.location && (window.location.protocol === "http:" || window.location.protocol === "https:") && typeof window.fetch === "function") {
|
||||||
|
var pathStr = window.location.pathname || "/";
|
||||||
|
var surfSlug = "home";
|
||||||
|
if (pathStr.indexOf("/calc") === 0) surfSlug = "calc";
|
||||||
|
else if (pathStr.indexOf("/quant") === 0) surfSlug = "quant";
|
||||||
|
else if (pathStr.indexOf("/graph") === 0) surfSlug = "graph";
|
||||||
|
else if (pathStr.indexOf("/learn") === 0) surfSlug = "learn";
|
||||||
|
else if (pathStr.indexOf("/engineering") === 0) surfSlug = "engineering";
|
||||||
|
else if (pathStr.indexOf("/math") === 0) surfSlug = "math";
|
||||||
|
else if (pathStr.indexOf("/donate") === 0) surfSlug = "donate";
|
||||||
|
|
||||||
|
var qParts = ["surface=" + encodeURIComponent(surfSlug)];
|
||||||
|
if (surfSlug === "donate" && window.location.search) {
|
||||||
|
var mFrom = window.location.search.match(/[?&]from=([a-z]+)/i);
|
||||||
|
if (mFrom && mFrom[1]) qParts.push("donate_from=" + encodeURIComponent(mFrom[1].toLowerCase()));
|
||||||
|
}
|
||||||
|
window.fetch("/api/v1/status?" + qParts.join("&"), { method: "GET" }).catch(function () {});
|
||||||
|
|
||||||
|
var exportBindings = [
|
||||||
|
["#btnDownloadState", "learn_state_json"],
|
||||||
|
["#exportCsvBtn", "quant_csv"],
|
||||||
|
["#exportJsonBtn", "quant_json"],
|
||||||
|
["#openTradingViewBtn", "quant_tradingview"],
|
||||||
|
["#panel3TvBtn", "quant_tradingview"],
|
||||||
|
["#exportPngBtn", "graph_png"]
|
||||||
|
];
|
||||||
|
exportBindings.forEach(function (pair) {
|
||||||
|
document.querySelectorAll(pair[0]).forEach(function (el) {
|
||||||
|
if (!el.__hsExportBound) {
|
||||||
|
el.__hsExportBound = true;
|
||||||
|
el.addEventListener("click", function () {
|
||||||
|
window.fetch("/api/v1/status?export_action=" + pair[1], { method: "GET" }).catch(function () {});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (_e) {}
|
||||||
|
|
||||||
|
return {
|
||||||
|
applyMode: applyMode,
|
||||||
|
cycleMode: cycleMode,
|
||||||
|
getMode: function () { return currentMode; }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof document !== "undefined") {
|
||||||
|
if (document.readyState === "loading") {
|
||||||
|
document.addEventListener("DOMContentLoaded", initBrowserCodeRain);
|
||||||
|
} else {
|
||||||
|
initBrowserCodeRain();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var api = {
|
||||||
|
MATRIX_CHARS: MATRIX_CHARS,
|
||||||
|
SIGIL_GLINTS: SIGIL_GLINTS,
|
||||||
|
PROFILES: PROFILES,
|
||||||
|
computeColumnAlpha: computeColumnAlpha,
|
||||||
|
pickRandomGlyph: pickRandomGlyph,
|
||||||
|
initBrowserCodeRain: initBrowserCodeRain
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof module !== "undefined" && module.exports) {
|
||||||
|
module.exports = api;
|
||||||
|
} else {
|
||||||
|
root.HyperstitionCodeRain = api;
|
||||||
|
}
|
||||||
|
})(typeof globalThis !== "undefined" ? globalThis : window);
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
hyperstitionstud.io — Adaptive Mobile Device Detector & Group 3 Mobile UI
|
||||||
|
(Plan #66: PLAN-PIECEWISE-MOBILE-DEVICE-DETECTION-AND-ADAPTIVE-MOBILE-UI)
|
||||||
|
Affirmed Strategies 1A, 2A, 3A, 4A:
|
||||||
|
- Multi-signal synchronous detection (URL ?mobile=1|0, localStorage override,
|
||||||
|
navigator.userAgentData.mobile, mobile UA regex, and coarse-pointer /
|
||||||
|
<=820px viewport media query) -> sets html[data-device-ui="mobile|desktop"].
|
||||||
|
- Strategy 2A: Injects `[ ☰ Menu ]` slide-down 2-column touch navigation
|
||||||
|
sheet (#hsMobileNavSheet) into <header> when mobile UI is active, while
|
||||||
|
keeping .meta-badges / .top-nav.hs-global-nav as a swipeable touch rail.
|
||||||
|
- Strategy 1A: Injects `[ 📱 Mobile UI | 🖥 Desktop UI ]` switcher in footer.
|
||||||
|
========================================================================== */
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var STORAGE_KEY = "hs_device_ui_override";
|
||||||
|
var MOBILE_UA_RE = /\b(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Windows Phone|Mobile)\b/i;
|
||||||
|
|
||||||
|
function getCookie(name) {
|
||||||
|
try {
|
||||||
|
var m = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
||||||
|
return m ? decodeURIComponent(m[1]) : "";
|
||||||
|
} catch (_) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function detectMobileDevice() {
|
||||||
|
try {
|
||||||
|
var params = new URLSearchParams(window.location.search || "");
|
||||||
|
var qMob = params.get("mobile");
|
||||||
|
if (qMob === "1" || qMob === "true") {
|
||||||
|
try { localStorage.setItem(STORAGE_KEY, "mobile"); } catch (_) {}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (qMob === "0" || qMob === "false") {
|
||||||
|
try { localStorage.setItem(STORAGE_KEY, "desktop"); } catch (_) {}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var saved = "";
|
||||||
|
try { saved = localStorage.getItem(STORAGE_KEY) || ""; } catch (_) {}
|
||||||
|
if (saved === "mobile") return true;
|
||||||
|
if (saved === "desktop") return false;
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
if (getCookie("hs_device_hint") === "mobile") return true;
|
||||||
|
if (typeof navigator !== "undefined") {
|
||||||
|
if (navigator.userAgentData && navigator.userAgentData.mobile === true) return true;
|
||||||
|
if (MOBILE_UA_RE.test(navigator.userAgent || "")) return true;
|
||||||
|
}
|
||||||
|
if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
||||||
|
if (window.matchMedia("(max-width: 820px), (hover: none) and (pointer: coarse)").matches) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyDeviceUiMode(mode) {
|
||||||
|
var root = document.documentElement;
|
||||||
|
if (!root) return;
|
||||||
|
root.setAttribute("data-device-ui", mode);
|
||||||
|
var switchBtn = document.getElementById("hsMobileUiSwitchBtn");
|
||||||
|
if (switchBtn) {
|
||||||
|
switchBtn.textContent = mode === "mobile" ? "[ \uD83D\uDCF1 Mobile UI: ON \u2022 Switch to Desktop ]" : "[ \uD83D\uDDA5 Desktop UI \u2022 Switch to Mobile UI ]";
|
||||||
|
switchBtn.setAttribute("aria-pressed", mode === "mobile" ? "true" : "false");
|
||||||
|
}
|
||||||
|
if (mode !== "mobile") {
|
||||||
|
var sheet = document.getElementById("hsMobileNavSheet");
|
||||||
|
if (sheet) sheet.classList.remove("open");
|
||||||
|
var menuBtn = document.getElementById("hsMobileMenuBtn");
|
||||||
|
if (menuBtn) menuBtn.setAttribute("aria-expanded", "false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run synchronous detection immediately
|
||||||
|
var initialMode = detectMobileDevice() ? "mobile" : "desktop";
|
||||||
|
applyDeviceUiMode(initialMode);
|
||||||
|
|
||||||
|
function initMobileNavAndFooterSwitcher() {
|
||||||
|
var hdr = document.querySelector("header");
|
||||||
|
var navEl = hdr && hdr.querySelector(".top-nav.hs-global-nav, .meta-badges");
|
||||||
|
if (hdr && navEl && !document.getElementById("hsMobileMenuBtn")) {
|
||||||
|
var menuBtn = document.createElement("button");
|
||||||
|
menuBtn.type = "button";
|
||||||
|
menuBtn.id = "hsMobileMenuBtn";
|
||||||
|
menuBtn.className = "btn hs-mobile-menu-btn";
|
||||||
|
menuBtn.setAttribute("aria-expanded", "false");
|
||||||
|
menuBtn.setAttribute("aria-controls", "hsMobileNavSheet");
|
||||||
|
menuBtn.textContent = "\u2630 Menu";
|
||||||
|
|
||||||
|
var sheet = document.createElement("div");
|
||||||
|
sheet.id = "hsMobileNavSheet";
|
||||||
|
sheet.className = "hs-mobile-nav-sheet hs-plate-g3";
|
||||||
|
sheet.setAttribute("aria-label", "Mobile Ecosystem Navigation Drawer");
|
||||||
|
|
||||||
|
var links = navEl.querySelectorAll("a");
|
||||||
|
links.forEach(function (a) {
|
||||||
|
var clone = a.cloneNode(true);
|
||||||
|
clone.removeAttribute("id");
|
||||||
|
clone.classList.add("hs-mobile-sheet-link");
|
||||||
|
sheet.appendChild(clone);
|
||||||
|
});
|
||||||
|
|
||||||
|
menuBtn.addEventListener("click", function () {
|
||||||
|
var isOpen = sheet.classList.toggle("open");
|
||||||
|
menuBtn.setAttribute("aria-expanded", isOpen ? "true" : "false");
|
||||||
|
menuBtn.textContent = isOpen ? "\u2715 Close" : "\u2630 Menu";
|
||||||
|
});
|
||||||
|
|
||||||
|
var titleRow = hdr.querySelector(".title-row");
|
||||||
|
if (titleRow) {
|
||||||
|
titleRow.appendChild(menuBtn);
|
||||||
|
} else {
|
||||||
|
hdr.insertBefore(menuBtn, navEl);
|
||||||
|
}
|
||||||
|
hdr.parentNode.insertBefore(sheet, hdr.nextSibling);
|
||||||
|
}
|
||||||
|
|
||||||
|
var ftr = document.querySelector("footer");
|
||||||
|
if (ftr && !document.getElementById("hsMobileUiSwitchBtn")) {
|
||||||
|
var wrap = document.createElement("div");
|
||||||
|
wrap.style.cssText = "margin-top:6px;";
|
||||||
|
var swBtn = document.createElement("button");
|
||||||
|
swBtn.type = "button";
|
||||||
|
swBtn.id = "hsMobileUiSwitchBtn";
|
||||||
|
swBtn.className = "btn hs-rain-toggle-btn";
|
||||||
|
swBtn.addEventListener("click", function () {
|
||||||
|
var cur = document.documentElement.getAttribute("data-device-ui") || "desktop";
|
||||||
|
var next = cur === "mobile" ? "desktop" : "mobile";
|
||||||
|
try { localStorage.setItem(STORAGE_KEY, next); } catch (_) {}
|
||||||
|
applyDeviceUiMode(next);
|
||||||
|
window.dispatchEvent(new Event("resize"));
|
||||||
|
});
|
||||||
|
wrap.appendChild(swBtn);
|
||||||
|
ftr.appendChild(wrap);
|
||||||
|
applyDeviceUiMode(document.documentElement.getAttribute("data-device-ui") || initialMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.readyState === "loading") {
|
||||||
|
document.addEventListener("DOMContentLoaded", initMobileNavAndFooterSwitcher);
|
||||||
|
} else {
|
||||||
|
initMobileNavAndFooterSwitcher();
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("resize", function () {
|
||||||
|
var saved = "";
|
||||||
|
try { saved = localStorage.getItem(STORAGE_KEY) || ""; } catch (_) {}
|
||||||
|
if (!saved) {
|
||||||
|
applyDeviceUiMode(detectMobileDevice() ? "mobile" : "desktop");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
||||||
|
window.HyperstitionStudio.MobileUI = {
|
||||||
|
detectMobileDevice: detectMobileDevice,
|
||||||
|
setMode: function (mode) {
|
||||||
|
try { localStorage.setItem(STORAGE_KEY, mode); } catch (_) {}
|
||||||
|
applyDeviceUiMode(mode);
|
||||||
|
},
|
||||||
|
getMode: function () {
|
||||||
|
return document.documentElement.getAttribute("data-device-ui") || "desktop";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
@@ -4,13 +4,14 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Signal Patronage & Open-Instrument Notes — hyperstitionstud.io/donate</title>
|
<title>Signal Patronage & Open-Instrument Notes — hyperstitionstud.io/donate</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.1" />
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-canvas: #020617;
|
--bg-canvas: #020617;
|
||||||
--bg-panel: #0f172a;
|
--bg-panel: #0c1324;
|
||||||
--bg-card: #1e293b;
|
--bg-card: #0c1324;
|
||||||
--bg-deep: #090d16;
|
--bg-deep: #090d16;
|
||||||
--border: #334155;
|
--border: #26344d;
|
||||||
--text-main: #f8fafc;
|
--text-main: #f8fafc;
|
||||||
--text-muted: #94a3b8;
|
--text-muted: #94a3b8;
|
||||||
--cyan: #22d3ee;
|
--cyan: #22d3ee;
|
||||||
@@ -41,30 +42,34 @@
|
|||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-left: 4px solid var(--gold);
|
border-left: 4px solid var(--gold);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1.25rem 1.5rem;
|
padding: 1.1rem 1.35rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
gap: 1rem;
|
gap: 0.85rem;
|
||||||
}
|
}
|
||||||
.title-row { display: flex; align-items: center; gap: 0.7rem; }
|
@media (max-width: 1220px) {
|
||||||
|
header { flex-wrap: wrap; }
|
||||||
|
}
|
||||||
|
.title-row { display: flex; align-items: center; gap: 0.65rem; }
|
||||||
.dot {
|
.dot {
|
||||||
width: 11px;
|
width: 10px;
|
||||||
height: 11px;
|
height: 10px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--gold);
|
background: var(--gold);
|
||||||
box-shadow: 0 0 10px var(--gold);
|
box-shadow: 0 0 10px var(--gold);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
h1 { font-size: 1.24rem; font-weight: 700; letter-spacing: -0.01em; }
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; }
|
||||||
.subtitle { font-size: 0.77rem; color: var(--text-muted); margin-top: 0.3rem; }
|
.subtitle { font-size: 0.71rem; color: var(--text-muted); margin-top: 0.25rem; }
|
||||||
.top-nav {
|
.top-nav {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 0.5rem;
|
gap: 0.38rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -72,8 +77,8 @@
|
|||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 0.42rem 0.78rem;
|
padding: 0.34rem 0.62rem;
|
||||||
font-size: 0.74rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -342,102 +347,30 @@
|
|||||||
<span class="dot"></span>
|
<span class="dot"></span>
|
||||||
<h1>hyperstitionstud.io/donate — Signal Patronage & Open-Instrument Notes</h1>
|
<h1>hyperstitionstud.io/donate — Signal Patronage & Open-Instrument Notes</h1>
|
||||||
</div>
|
</div>
|
||||||
<p class="subtitle">Open-Readout Phonemic, Graph & Closing-Bell Telemetry Workbench • Namespace Authority: urn:io:hyperstitionstud:donate:v2.0.23</p>
|
<p class="subtitle">Open-Readout Phonemic, Graph & Closing-Bell Telemetry Workbench • Namespace Authority: urn:io:hyperstitionstud:donate:v2.17.1 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
</div>
|
</div>
|
||||||
<nav class="top-nav">
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
<a class="btn" data-donate-route="home" href="/">Portal Home (/)</a>
|
<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="calc" href="/calc/index.html">Calculator</a>
|
||||||
<a class="btn" data-donate-route="graph" href="/graph/index.html">Knowledge Graph (/graph/)</a>
|
<a class="btn" data-donate-route="quant" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
<a class="btn" data-donate-route="learn" href="/learn/index.html">Learning Track (/learn/)</a>
|
<a class="btn" data-donate-route="graph" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
<a class="btn" data-donate-route="calc" href="/calc/index.html">Calculator (/calc/)</a>
|
<a class="btn" data-donate-route="learn" href="/learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" data-donate-route="eng" href="/engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" data-donate-route="math" href="/math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" data-donate-route="donate" aria-current="page" href="/donate/index.html?from=donate" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- HERO ESSAY & PROMINENT TACTILE VECTOR DONATE BUTTON -->
|
<!-- THREE-SENTENCE NOTE FROM THE LEMURS -->
|
||||||
<section class="hero-panel">
|
|
||||||
<div>
|
|
||||||
<div class="hero-tag">Open-Instrument Field Notes // Signal & 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—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—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—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 ↗</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 • 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—one spelling per phoneme—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’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—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’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’s news wire, the same supply chain, or the same closing bell. When the locks still fire under that constraint, the question stops being “can you find a pattern?” and becomes “why did these specific pieces fall into place at the same time?”</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—or type two terms of your own—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–9 = 0..9, A–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 & 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 & 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 & 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 & 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">
|
<section class="panel">
|
||||||
<span class="q-tag" style="color:var(--violet);">05 // Backing the Signal</span>
|
<p>Every instrument on <code>hyperstitionstud.io</code>—the 388-node knowledge graph, the 22-volume encyclopedia, the multi-cipher calculator, and the closing-bell time-series workbench—is built and tended with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs as an open, zero-tracker laboratory. We leave the cover off the machine so anyone curious enough to trace where spoken English, supply-chain bottlenecks, and market tape cross can inspect the raw readout and test their own hypotheses for free. If an equation lock, a field dossier, or an hour spent exploring the workbench sparked a new line of thought, toss a little fuel into the reactor via the payment channels below.</p>
|
||||||
<h2>Where Patronage Goes</h2>
|
|
||||||
<p>Every tool on <code>hyperstitionstud.io</code>—the 388-node property graph, the 22-volume encyclopedia, the multi-cipher calculator, the closing-bell time-series workbench, and the public API—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—or fork the repositories on <code>git.libre.audio</code> and build an instrument of your own.</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- SECTION 4: FUEL THE REACTOR (DIRECT CONTRIBUTION CHANNELS) -->
|
<!-- FUEL THE REACTOR (DIRECT CONTRIBUTION CHANNELS) -->
|
||||||
<section class="panel" id="fuel-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);">
|
<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 • Direct Contribution Channels</span>
|
<span class="q-tag" style="color:var(--gold);">Fuel the Reactor • Direct Contribution Channels</span>
|
||||||
<button type="button" class="tactile-donate-btn centerpiece" id="primaryDonateActionBtn">
|
<button type="button" class="tactile-donate-btn centerpiece" id="primaryDonateActionBtn">
|
||||||
<span class="tactile-emblem" aria-hidden="true">
|
<span class="tactile-emblem" aria-hidden="true">
|
||||||
<svg width="26" height="26" viewBox="0 0 24 24" fill="none">
|
<svg width="26" height="26" viewBox="0 0 24 24" fill="none">
|
||||||
@@ -478,21 +411,15 @@
|
|||||||
<button type="button" class="btn copy-channel-btn" data-channel="XMR" data-addr="83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ">Copy XMR Address</button>
|
<button type="button" class="btn copy-channel-btn" data-channel="XMR" data-addr="83ZCDY7YpUHJRwwj4ETL2THYYWVxWti6sbyxvdJ7kGBoWyKR2Wt4of6YyFjmjZqJCjYSwKdWkBK36dhsNzrnwbnvMajDaEJ">Copy XMR Address</button>
|
||||||
</div>
|
</div>
|
||||||
</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 ↗</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>hyperstitionstud.io/donate v2.0.23 • 100% Static & Offline-Portable • Zero External Trackers</div>
|
<div>hyperstitionstud.io/donate v2.17.1 • 100% Static & Offline-Portable • 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;">♥</span> by Lemurs.</div>
|
<div class="hs-lemur-credit"><span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">♥</span> by Lemurs.</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="../assets/hs-matrix-coderain.js?v=2.17.1" defer></script>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
@@ -511,94 +438,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
// Channel selection & one-click copy
|
||||||
let selectedChannel = "BTC";
|
let selectedChannel = "BTC";
|
||||||
let selectedAddr = "bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e";
|
let selectedAddr = "bc1qcgkpl0j2ayxd68haeutfvarjgla2lmz30yd23e";
|
||||||
@@ -618,6 +457,11 @@
|
|||||||
if (feedback) {
|
if (feedback) {
|
||||||
feedback.textContent = `[COPIED ${channel}] ${addr} — Ready to paste in your wallet.`;
|
feedback.textContent = `[COPIED ${channel}] ${addr} — Ready to paste in your wallet.`;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
if (window.location && (window.location.protocol === "http:" || window.location.protocol === "https:") && typeof window.fetch === "function") {
|
||||||
|
window.fetch("/api/v1/status?donate_copy=" + encodeURIComponent(channel), { method: "GET" }).catch(function () {});
|
||||||
|
}
|
||||||
|
} catch (_e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll(".copy-channel-btn").forEach(function (btn) {
|
document.querySelectorAll(".copy-channel-btn").forEach(function (btn) {
|
||||||
@@ -641,5 +485,6 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
<script src="../assets/hs-mobile-ui.js?v=2.17.1" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge E5 • Non-Sequentially Revertible via <code>hs-eng-docs --disable cicd-vps-tmpfs-and-regression</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="../ciphers-and-phonetics/index.html" style="">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html" style="">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html" style="">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>POSIX Bash error handling (set -euo pipefail, trap ERR, run_checked(), exec, flock)</li><li>Git fast-forward merges, annotated tags, and git pull --rebase --autostash</li><li>Linux tmpfs RAM mounts, systemd services/timers, Caddy HTTP/3 QUIC, and TrueType cmap tables</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://git-scm.com/book/en/v2" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Pro Git Book (Chacon & Straub — Free Complete Online Text) ↗</a></li><li><a href="https://mywiki.wooledge.org/BashGuide" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Wooledge BashGuide & BashFAQ (Error Handling & Process Exec) ↗</a></li><li><a href="https://www.freedesktop.org/software/systemd/man/systemd.service.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">freedesktop.org systemd.service & systemd.timer Manuals ↗</a></li><li><a href="https://caddyserver.com/docs/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Caddy Server Official Documentation (HTTP/3 & Reverse Proxy) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E5): 4-Tier Programmatic Semantic Version Bump Heuristic</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>Bump(dirty, ahead, plans, tools, brk) ∈ {noop, patch, minor, major}</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">evaluate_change_scope_heuristics(signals)['recommended_bump_level']</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(evaluate-bump-scope 2 0 1 0 #f)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(evaluate-bump-scope 2 0 1 0 #f)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="evaluateBumpScope({dirty: 2, ahead: 0, plans: 1, tools: 0, breaking: false})" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">evaluateBumpScope({dirty: 2, ahead: 0, plans: 1, tools: 0, breaking: false})</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="evaluate_bump_scope(2, 0, 1, 0, false)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">evaluate_bump_scope(2, 0, 1, 0, false)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Test the 4-tier decision tree (noop, patch, minor, major) in all 3 languages.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Zero-/dev/null CI/CD Scripts, Self-Re-Exec & Autonomous VPS Harvest Timers</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">push-all-to-git-libre-audio.sh, deploy/sync-vps-repos.sh, and deploy/run-vps-data-production.sh contain 0 /dev/null redirections and capture exact exit codes via run_checked(). When sync-vps-repos.sh updates hyperstitionstudio-core on disk, HYPERSTITION_SYNC_REEXEC=1 immediately execs the new script image before hydrating /var/www/hyperstitionstud.io/repos (tmpfs RAM + Brotli-11/Gzip-9).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Dark-Mode hs-pdf-build, Cold-Archive Rotator (hs-archive-rotate) & 6-Gate Public Regression (hs-public-smoke)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">pdf_compiler.py transpiles LaTeX math, preserves <br/>, filters every character against DejaVu TrueType cmap tables, sets rl_config.defaultGraphicsFontName='DejaVu' (0 /Helvetica leaks), and prioritizes web-linked PDFs (--refresh-all-web-pdfs). archive_rotator.py rotates completed docs/archive/ pairs into completed-plans-archive.tar.gz, while public_regression.py audits live HTTP responses against .cache/internal-test-baseline-latest.json across Gates P1-P6.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html">← Prev: E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="../index.html">Return to Engineering Hub (E0) ↑</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering/cicd-vps-tmpfs-and-regression v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge E1 • Non-Sequentially Revertible via <code>hs-eng-docs --disable ciphers-and-phonetics</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html" style="">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html" style="">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 2: Introductory Python & Text Processing (10-15 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Python 3 functions, dictionaries (dict), frozenset, and regular expressions (re.sub)</li><li>ASCII & Unicode character codepoints (ord(), UTF-8)</li><li>Dictionary lookup vs. deterministic grapheme-to-phoneme fallback rules</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../learn/index.html" style="color:var(--cyan);">Internal: /learn/ Module 1 & 2 (Base-36 & Ingglish) ↗</a></li><li><a href="https://docs.python.org/3/tutorial/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Official Python 3 Tutorial (Sections 3-5 & 7) ↗</a></li><li><a href="https://cs50.harvard.edu/python/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Harvard CS50P (Intro to Programming with Python) ↗</a></li><li><a href="http://www.speech.cs.cmu.edu/cgi-bin/cmudict" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">CMU Pronouncing Dictionary (CMUdict) Specification ↗</a></li><li><a href="https://regexone.com/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">RegexOne Interactive Regular Expression Tutorial ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E1): Base-36 Alphanumeric Homomorphism in Guile (Z), TypeScript & Rust</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>AQ(w) = ∑_{i=1}^k v(c_i), v('0'..'9')=0..9, v('a'..'z')=10..35</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">sum(char_value_aq(ch) for ch in text)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(aq-base36 "LEMUR")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(aq-base36 "LEMUR")</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="aqBase36("LEMUR")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">aqBase36("LEMUR")</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="aq_base36("LEMUR")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">aq_base36("LEMUR")</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Verify AQ("LEMUR") = 114 across all 3 languages in the hardened AST sandbox.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. PEP 420 Namespace & Quantization Modes (hyperstitionstud_io.ciphers)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">translate_batch() resolves English phrases into Gen 1 Ingglish with zero external network calls and zero hardcoded /workspace dependencies: Tier 1 delegates to local Node/CLI translators when present; Tier 2 looks up the 4,943-entry bundled cmudict_fallback.json; Tier 3 applies deterministic English digraph-to-phoneme rules so arbitrary OOV strings always resolve.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../index.html">← Back to Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html">Next: E2: Knowledge Graph & SQLite →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering/ciphers-and-phonetics v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(function(){ 'use strict'; if (window.location.protocol !== 'file:') { document.querySelectorAll('img[data-http-src]').forEach(function(im){ im.src = im.getAttribute('data-http-src'); }); } })();
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
window.HYPERSTITION_ENGINEERING_MANIFEST = {"$id": "urn:io:hyperstitionstud:engineering-manifest", "version": "2.17.0", "enabled_subpages": ["ciphers-and-phonetics", "knowledge-graph-and-sqlite", "quant-macro-and-bayesian-brief", "mcp-chatbot-rest-and-ipld", "cicd-vps-tmpfs-and-regression"], "disabled_subpages": [], "enabled_routes": ["/engineering/index.html", "/engineering/ciphers-and-phonetics/index.html", "/engineering/knowledge-graph-and-sqlite/index.html", "/engineering/quant-macro-and-bayesian-brief/index.html", "/engineering/mcp-chatbot-rest-and-ipld/index.html", "/engineering/cicd-vps-tmpfs-and-regression/index.html"], "introspected_counts": {"repositories": 6, "cli_entrypoints": 20, "mcp_tools": 20, "rest_domain_aliases": 12, "enabled_lenses": 6, "watchlist_instruments": 24, "fred_macro_series": 14, "json_schemas_v1": 12}, "cli_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-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", "hs-macro-harvest": "hyperstitionstud_io.quant.macro:main", "hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main", "hs-ticker-card": "hyperstitionstud_io.quant.cards:main", "hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main", "hs-public-smoke": "hyperstitionstud_io.ci.public_regression:main", "hs-eng-docs": "hyperstitionstud_io.publishing.engineering_docs:main", "hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main", "hs-highlights": "hyperstitionstud_io.publishing.highlights:main", "hs-readme-sync": "hyperstitionstud_io.publishing.readme_sync:main", "hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main", "hs-quant-voice-build": "hyperstitionstud_io.publishing.quant_voice:main", "hs-deploy-scripts-sync": "hyperstitionstud_io.ci.deploy_scripts_sync:main"}, "mcp_tool_names": ["hs_evaluate_aq_and_ingglish", "hs_classify_singularity", "hs_query_knowledge_graph", "hs_search_glossary_encyclopedia", "hs_inspect_eti_tier_list", "hs_simulate_anchor_revision", "hs_search_archive_equations", "hs_verify_grounded_citations", "hs_compute_ipld_dag_json_cid", "hs_run_doctor_and_audit", "hs_scan_financial_quant_harvest", "hs_inspect_quant_timeseries", "hs_generate_ticker_stats_card", "hs_inspect_macro_indicators", "hs_generate_daily_portfolio_brief", "hs_inspect_engineering_and_math_docs", "hs_inspect_documentation_and_manuals", "hs_evaluate_guile_scheme_z_calculus", "hs_query_workspace_catalog_and_release_state", "hs_generate_highlights_summary"], "rest_domain_aliases": {"/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"}, "schemas_v1": ["assemblage-builds-tier-list.schema.json", "citations-ledger.schema.json", "encyclopedia-graph.schema.json", "encyclopedia-manifest.schema.json", "financial-aq-harvest.schema.json", "glossary-registry.schema.json", "learn-progress-state.schema.json", "memetic-superclass-registry.schema.json", "quant-timeseries.schema.json", "quantitative-economic-anchors.schema.json", "singularity-zoology-matrix.schema.json", "ticker-stats-card.schema.json"], "flow_diagrams": {"cross_repo_dependency_png": "/graph/docs/cross-repo-dependency-and-audit-flow-diagram.png", "periodic_harvest_cicd_vps_png": "/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"}, "hub_prereq_ladder": {"unit_id": "E0", "expertise_level": "Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)", "summary": "New to command-line shells, Git repositories, or client-server web architecture? Start with these free foundational resources before diving into the engineering subpages:", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-6)", "url": "/learn/index.html", "external": false}, {"label": "MIT Missing Semester of Your CS Education (Shell, Git, CLI)", "url": "https://missing.csail.mit.edu/", "external": true}, {"label": "MDN Web Docs — How the Web Works (HTTP, HTML, Servers)", "url": "https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works", "external": true}]}, "subpages": {"cipLine truncated
|
||||||
@@ -0,0 +1,367 @@
|
|||||||
|
{
|
||||||
|
"$id": "urn:io:hyperstitionstud:engineering-manifest",
|
||||||
|
"version": "2.17.0",
|
||||||
|
"enabled_subpages": [
|
||||||
|
"ciphers-and-phonetics",
|
||||||
|
"knowledge-graph-and-sqlite",
|
||||||
|
"quant-macro-and-bayesian-brief",
|
||||||
|
"mcp-chatbot-rest-and-ipld",
|
||||||
|
"cicd-vps-tmpfs-and-regression"
|
||||||
|
],
|
||||||
|
"disabled_subpages": [],
|
||||||
|
"enabled_routes": [
|
||||||
|
"/engineering/index.html",
|
||||||
|
"/engineering/ciphers-and-phonetics/index.html",
|
||||||
|
"/engineering/knowledge-graph-and-sqlite/index.html",
|
||||||
|
"/engineering/quant-macro-and-bayesian-brief/index.html",
|
||||||
|
"/engineering/mcp-chatbot-rest-and-ipld/index.html",
|
||||||
|
"/engineering/cicd-vps-tmpfs-and-regression/index.html"
|
||||||
|
],
|
||||||
|
"introspected_counts": {
|
||||||
|
"repositories": 6,
|
||||||
|
"cli_entrypoints": 20,
|
||||||
|
"mcp_tools": 20,
|
||||||
|
"rest_domain_aliases": 12,
|
||||||
|
"enabled_lenses": 6,
|
||||||
|
"watchlist_instruments": 24,
|
||||||
|
"fred_macro_series": 14,
|
||||||
|
"json_schemas_v1": 12
|
||||||
|
},
|
||||||
|
"cli_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-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",
|
||||||
|
"hs-macro-harvest": "hyperstitionstud_io.quant.macro:main",
|
||||||
|
"hs-daily-brief": "hyperstitionstud_io.quant.daily_brief:main",
|
||||||
|
"hs-ticker-card": "hyperstitionstud_io.quant.cards:main",
|
||||||
|
"hs-archive-rotate": "hyperstitionstud_io.publishing.archive_rotator:main",
|
||||||
|
"hs-public-smoke": "hyperstitionstud_io.ci.public_regression:main",
|
||||||
|
"hs-eng-docs": "hyperstitionstud_io.publishing.engineering_docs:main",
|
||||||
|
"hs-math-docs": "hyperstitionstud_io.publishing.math_docs:main",
|
||||||
|
"hs-highlights": "hyperstitionstud_io.publishing.highlights:main",
|
||||||
|
"hs-readme-sync": "hyperstitionstud_io.publishing.readme_sync:main",
|
||||||
|
"hs-closeups-sync": "hyperstitionstud_io.publishing.closeups_sync:main",
|
||||||
|
"hs-quant-voice-build": "hyperstitionstud_io.publishing.quant_voice:main",
|
||||||
|
"hs-deploy-scripts-sync": "hyperstitionstud_io.ci.deploy_scripts_sync:main"
|
||||||
|
},
|
||||||
|
"mcp_tool_names": [
|
||||||
|
"hs_evaluate_aq_and_ingglish",
|
||||||
|
"hs_classify_singularity",
|
||||||
|
"hs_query_knowledge_graph",
|
||||||
|
"hs_search_glossary_encyclopedia",
|
||||||
|
"hs_inspect_eti_tier_list",
|
||||||
|
"hs_simulate_anchor_revision",
|
||||||
|
"hs_search_archive_equations",
|
||||||
|
"hs_verify_grounded_citations",
|
||||||
|
"hs_compute_ipld_dag_json_cid",
|
||||||
|
"hs_run_doctor_and_audit",
|
||||||
|
"hs_scan_financial_quant_harvest",
|
||||||
|
"hs_inspect_quant_timeseries",
|
||||||
|
"hs_generate_ticker_stats_card",
|
||||||
|
"hs_inspect_macro_indicators",
|
||||||
|
"hs_generate_daily_portfolio_brief",
|
||||||
|
"hs_inspect_engineering_and_math_docs",
|
||||||
|
"hs_inspect_documentation_and_manuals",
|
||||||
|
"hs_evaluate_guile_scheme_z_calculus",
|
||||||
|
"hs_query_workspace_catalog_and_release_state",
|
||||||
|
"hs_generate_highlights_summary"
|
||||||
|
],
|
||||||
|
"rest_domain_aliases": {
|
||||||
|
"/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"
|
||||||
|
},
|
||||||
|
"schemas_v1": [
|
||||||
|
"assemblage-builds-tier-list.schema.json",
|
||||||
|
"citations-ledger.schema.json",
|
||||||
|
"encyclopedia-graph.schema.json",
|
||||||
|
"encyclopedia-manifest.schema.json",
|
||||||
|
"financial-aq-harvest.schema.json",
|
||||||
|
"glossary-registry.schema.json",
|
||||||
|
"learn-progress-state.schema.json",
|
||||||
|
"memetic-superclass-registry.schema.json",
|
||||||
|
"quant-timeseries.schema.json",
|
||||||
|
"quantitative-economic-anchors.schema.json",
|
||||||
|
"singularity-zoology-matrix.schema.json",
|
||||||
|
"ticker-stats-card.schema.json"
|
||||||
|
],
|
||||||
|
"flow_diagrams": {
|
||||||
|
"cross_repo_dependency_png": "/graph/docs/cross-repo-dependency-and-audit-flow-diagram.png",
|
||||||
|
"periodic_harvest_cicd_vps_png": "/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
|
||||||
|
},
|
||||||
|
"hub_prereq_ladder": {
|
||||||
|
"unit_id": "E0",
|
||||||
|
"expertise_level": "Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)",
|
||||||
|
"summary": "New to command-line shells, Git repositories, or client-server web architecture? Start with these free foundational resources before diving into the engineering subpages:",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-6)",
|
||||||
|
"url": "/learn/index.html",
|
||||||
|
"external": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MIT Missing Semester of Your CS Education (Shell, Git, CLI)",
|
||||||
|
"url": "https://missing.csail.mit.edu/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MDN Web Docs — How the Web Works (HTTP, HTML, Servers)",
|
||||||
|
"url": "https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subpages": {
|
||||||
|
"ciphers-and-phonetics": {
|
||||||
|
"unit_id": "E1",
|
||||||
|
"slug": "ciphers-and-phonetics",
|
||||||
|
"title": "Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation",
|
||||||
|
"short_title": "E1: Ciphers & Phonetics",
|
||||||
|
"pip_class": "plate-lock-gold",
|
||||||
|
"expertise_level": "Level 2: Introductory Python & Text Processing (10-15 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Python 3 functions, dictionaries (dict), frozenset, and regular expressions (re.sub)",
|
||||||
|
"ASCII & Unicode character codepoints (ord(), UTF-8)",
|
||||||
|
"Dictionary lookup vs. deterministic grapheme-to-phoneme fallback rules"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "Internal: /learn/ Module 1 & 2 (Base-36 & Ingglish)",
|
||||||
|
"url": "/learn/index.html",
|
||||||
|
"external": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Official Python 3 Tutorial (Sections 3-5 & 7)",
|
||||||
|
"url": "https://docs.python.org/3/tutorial/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Harvard CS50P (Intro to Programming with Python)",
|
||||||
|
"url": "https://cs50.harvard.edu/python/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "CMU Pronouncing Dictionary (CMUdict) Specification",
|
||||||
|
"url": "http://www.speech.cs.cmu.edu/cgi-bin/cmudict",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "RegexOne Interactive Regular Expression Tutorial",
|
||||||
|
"url": "https://regexone.com/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. PEP 420 Namespace & Quantization Modes (hyperstitionstud_io.ciphers)",
|
||||||
|
"body": "The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Three-Tier Offline Phonemic Transducer (hyperstitionstud_io.phonetics)",
|
||||||
|
"body": "translate_batch() resolves English phrases into Gen 1 Ingglish with zero external network calls and zero hardcoded /workspace dependencies: Tier 1 delegates to local Node/CLI translators when present; Tier 2 looks up the 4,943-entry bundled cmudict_fallback.json; Tier 3 applies deterministic English digraph-to-phoneme rules so arbitrary OOV strings always resolve."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"knowledge-graph-and-sqlite": {
|
||||||
|
"unit_id": "E2",
|
||||||
|
"slug": "knowledge-graph-and-sqlite",
|
||||||
|
"title": "Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine",
|
||||||
|
"short_title": "E2: Knowledge Graph & SQLite",
|
||||||
|
"pip_class": "plate-lock-emerald",
|
||||||
|
"expertise_level": "Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Cryptographic hash functions (SHA-256) and Python context managers (with / __exit__)",
|
||||||
|
"Relational schemas, inverted full-text search indices (SQLite FTS5), and graph representations",
|
||||||
|
"ACID transactions, Write-Ahead Logging (WAL), and BEGIN EXCLUSIVE file locking"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "SQLite Write-Ahead Logging (WAL) Architecture",
|
||||||
|
"url": "https://www.sqlite.org/wal.html",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "SQLite FTS5 Full-Text Search Extension Docs",
|
||||||
|
"url": "https://www.sqlite.org/fts5.html",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "CMU 15-445/645 (Intro to Database Systems — Andy Pavlo)",
|
||||||
|
"url": "https://15445.courses.cs.cmu.edu/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Python contextlib & Context Manager Documentation",
|
||||||
|
"url": "https://docs.python.org/3/library/contextlib.html",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. ReadOnlyIsolationGuard Context Manager (hyperstitionstud_io.glossary)",
|
||||||
|
"body": "Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. 6-Gate Multi-Format Graph Compiler & Quiescent 100M SQLite Logrotate (db/sqlite_meta.py)",
|
||||||
|
"body": "build_encyclopedia_knowledge_graph.py compiles 388 nodes and 1,282 edges into JSON, JS, GraphML, GEXF, Obsidian Canvas, and 3 1600x1060 PNG atlases. sqlite_meta.py hydrates hyperstition-catalog.db (FTS5) and records /api/v1/* and /mcp telemetry in /var/lib/hyperstitionstud.io/api-telemetry.db, while deploy/logrotate.d/hyperstition-sqlite-meta acquires BEGIN EXCLUSIVE at 100M, snapshots .1.gz, and runs PRAGMA wal_checkpoint(TRUNCATE); VACUUM;."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"quant-macro-and-bayesian-brief": {
|
||||||
|
"unit_id": "E3",
|
||||||
|
"slug": "quant-macro-and-bayesian-brief",
|
||||||
|
"title": "Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief",
|
||||||
|
"short_title": "E3: Quant, Macro & Bayesian",
|
||||||
|
"pip_class": "plate-lock-gold",
|
||||||
|
"expertise_level": "Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"HTTP JSON/CSV client ingestion (urllib.request) and resilient fallback chains",
|
||||||
|
"Missing-data domain representation (None / null vs. silent 0.0 corruption)",
|
||||||
|
"Pluggable projection registries (LENS_REGISTRY) and state-machine persistence"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "Internal: /quant/ Interactive Guided Canvas Tour (5 Episodes)",
|
||||||
|
"url": "/quant/index.html",
|
||||||
|
"external": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Python urllib.request & json Standard Library Documentation",
|
||||||
|
"url": "https://docs.python.org/3/library/urllib.request.html",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "St. Louis Federal Reserve (FRED) Series & CSV Documentation",
|
||||||
|
"url": "https://fredhelp.stlouisfed.org/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Refactoring.Guru — Strategy & Adapter Design Patterns in Python",
|
||||||
|
"url": "https://refactoring.guru/design-patterns/python",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Strict Zero-Synthetic-Data Collector & Native-Cadence FRED Macro Engine (collector.py, macro.py)",
|
||||||
|
"body": "collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. 14-Point Bidirectional Census, Confluence Dose (D in {0..4}) & 5-Agenda Bayesian Brief (daily_brief.py)",
|
||||||
|
"body": "timeseries.py evaluates all 14 data points in Gen 0 (eng_aq) and Gen 1 (ing_aq) and classifies each bar by its 4-species Confluence Dose (Dose 2 isometric pinning vs. Dose 3+ breakout). daily_brief.py updates the append-only Bayesian state ledger (daily-brief-state.json) across R1 Bull, R2 Pinned Isometric, and R3 Tail Drawdown and grades each day's testable macro question Q_t."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mcp-chatbot-rest-and-ipld": {
|
||||||
|
"unit_id": "E4",
|
||||||
|
"slug": "mcp-chatbot-rest-and-ipld",
|
||||||
|
"title": "Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1",
|
||||||
|
"short_title": "E4: MCP, REST & IPLD CIDv1",
|
||||||
|
"pip_class": "plate-lock-emerald",
|
||||||
|
"expertise_level": "Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"HTTP/1.1 request/response lifecycles, status codes (200, 404, 422, 500, 502), and reverse proxies",
|
||||||
|
"JSON-RPC 2.0, OpenAPI 3.1.0 schema generation, and Model Context Protocol (MCP)",
|
||||||
|
"Canonical JSON serialization, SHA-256 multihashes, and IPLD dag-json (0x0129) CIDv1"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "MDN Web Docs — HTTP Protocol & Status Codes",
|
||||||
|
"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "JSON-RPC 2.0 Official Specification",
|
||||||
|
"url": "https://www.jsonrpc.org/specification",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Model Context Protocol (MCP) Architecture Introduction",
|
||||||
|
"url": "https://modelcontextprotocol.io/introduction",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "ProtoSchool — Content Identifiers (CIDs) & IPLD Merkle DAGs",
|
||||||
|
"url": "https://proto.school/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Unified Stateless MCP (/mcp) & Chatbot OpenAPI 3.1.0 REST Adapter (/api/v1/*)",
|
||||||
|
"body": "mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. One-Shot .png + .json Ticker Stats Cards (quant/cards.py) & Canonical IPLD dag-json (0x0129)",
|
||||||
|
"body": "hs_generate_ticker_stats_card compiles a 5-zone 900x1260 Group 3 Stealth Basalt PNG card and companion JSON payload in one shot (with draw_fitted_text() width clamping and ink-bbox midpoint centering). ipld/__init__.py serializes canonical UTF-8 dag-json and prefixes SHA-256 digests with [0x01, 0xA9, 0x02, 0x12, 0x20] to form Base32 CIDv1 ('baguqeera...')."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "3. Command-Line Usage Examples: cURL, CLI (hs-ticker-card), Chatbot REST Client (/api/v1/tools/*) & MCP Client (/mcp)",
|
||||||
|
"body": "Command-line invocations across all four client interfaces: (1) cURL (zero local dependencies; works against https://hyperstitionstud.io or http://127.0.0.1:8095): curl -sS 'https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false' -o /tmp/NVDA-stats-card.json (or include_base64_png=true piped through jq -r '.data.artifacts.png_base64' | base64 -d > /tmp/NVDA-stats-card.png); (2) CLI (hs-ticker-card): hs-ticker-card --symbol NVDA --lens tierzoo_ecology --out-dir /tmp/hyperstition-cards; (3) Chatbot REST API Client: curl -sS 'https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false' | jq . (or POST JSON '{\"symbol\":\"NVDA\",\"lens\":\"tierzoo_ecology\",\"include_base64_png\":true}' to /api/v1/tools/hs_generate_ticker_stats_card, or GET /api/v1/zoology/pokedex/NVDA?include_card=true); (4) MCP JSON-RPC 2.0 Client: curl -sS -X POST 'https://hyperstitionstud.io/mcp' -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"hs_generate_ticker_stats_card\",\"arguments\":{\"symbol\":\"NVDA\",\"lens\":\"tierzoo_ecology\",\"include_base64_png\":false}}}' | jq ."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"cicd-vps-tmpfs-and-regression": {
|
||||||
|
"unit_id": "E5",
|
||||||
|
"slug": "cicd-vps-tmpfs-and-regression",
|
||||||
|
"title": "Unit E5: Topological Git Push, Self-Re-Executing tmpfs VPS Hydration, Dark-Mode hs-pdf-build & hs-public-smoke",
|
||||||
|
"short_title": "E5: CI/CD, VPS & Regression",
|
||||||
|
"pip_class": "plate-lock-rose",
|
||||||
|
"expertise_level": "Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"POSIX Bash error handling (set -euo pipefail, trap ERR, run_checked(), exec, flock)",
|
||||||
|
"Git fast-forward merges, annotated tags, and git pull --rebase --autostash",
|
||||||
|
"Linux tmpfs RAM mounts, systemd services/timers, Caddy HTTP/3 QUIC, and TrueType cmap tables"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "Pro Git Book (Chacon & Straub — Free Complete Online Text)",
|
||||||
|
"url": "https://git-scm.com/book/en/v2",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Wooledge BashGuide & BashFAQ (Error Handling & Process Exec)",
|
||||||
|
"url": "https://mywiki.wooledge.org/BashGuide",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "freedesktop.org systemd.service & systemd.timer Manuals",
|
||||||
|
"url": "https://www.freedesktop.org/software/systemd/man/systemd.service.html",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Caddy Server Official Documentation (HTTP/3 & Reverse Proxy)",
|
||||||
|
"url": "https://caddyserver.com/docs/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Zero-/dev/null CI/CD Scripts, Self-Re-Exec & Autonomous VPS Harvest Timers",
|
||||||
|
"body": "push-all-to-git-libre-audio.sh, deploy/sync-vps-repos.sh, and deploy/run-vps-data-production.sh contain 0 /dev/null redirections and capture exact exit codes via run_checked(). When sync-vps-repos.sh updates hyperstitionstudio-core on disk, HYPERSTITION_SYNC_REEXEC=1 immediately execs the new script image before hydrating /var/www/hyperstitionstud.io/repos (tmpfs RAM + Brotli-11/Gzip-9)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Dark-Mode hs-pdf-build, Cold-Archive Rotator (hs-archive-rotate) & 6-Gate Public Regression (hs-public-smoke)",
|
||||||
|
"body": "pdf_compiler.py transpiles LaTeX math, preserves <br/>, filters every character against DejaVu TrueType cmap tables, sets rl_config.defaultGraphicsFontName='DejaVu' (0 /Helvetica leaks), and prioritizes web-linked PDFs (--refresh-all-web-pdfs). archive_rotator.py rotates completed docs/archive/ pairs into completed-plans-archive.tar.gz, while public_regression.py audits live HTTP responses against .cache/internal-test-baseline-latest.json across Gates P1-P6."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipld_dag_json_cidv1": {
|
||||||
|
"/": "baguqeera22rwawy2hsayigq75jzsg5nevhhuppkhlr6z3msi5jbepgulzspa"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Software Engineering Explication Hub — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0.85rem; margin-bottom: 0.9rem; }
|
||||||
|
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
|
||||||
|
.stat-tile { padding: 0.7rem 0.85rem; text-align: center; }
|
||||||
|
table { width: 100%; font-size: 0.73rem; margin-top: 0.4rem; }
|
||||||
|
th, td { padding: 0.4rem 0.6rem; text-align: left; border: 1px solid var(--border); }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>HYPERSTITION STUDIO // SOFTWARE ENGINEERING EXPLICATION HUB (UNIT E0)</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Commutative Live-Introspected Architecture • Piecewise & Non-Sequentially Revertible Cartridges • urn:io:hyperstitionstud:engineering:v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="ciphers-and-phonetics/index.html" style="">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="knowledge-graph-and-sqlite/index.html" style="">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="quant-macro-and-bayesian-brief/index.html" style="">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 1-2 (Novice to Advanced Beginner • 4-8 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Command-line navigation, files, and Git version control</li><li>How HTTP servers, JSON APIs, and static webroots operate</li><li>Self-Paced Learning Track (/learn/ Modules 1-6)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../learn/index.html" style="color:var(--cyan);">Internal: Self-Paced Learning Track (/learn/ Modules 1-6) ↗</a></li><li><a href="https://missing.csail.mit.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT Missing Semester of Your CS Education (Shell, Git, CLI) ↗</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MDN Web Docs — How the Web Works (HTTP, HTML, Servers) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E0): Homoiconic S-Expressions, Static Readonly<T> Types & Rust Option<T> Manifest Closure</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>Manifest M = (version, repos=6, tools=15, cidv1=H(M))</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">manifest = introspect_engineering_manifest()
|
||||||
|
cid = compute_dag_json_cidv1(manifest)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(assoc-ref '((repositories 6) (mcp-tools 15) (lenses 4)) 'mcp-tools)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(assoc-ref '((repositories 6) (mcp-tools 15) (lenses 4)) 'mcp-tools)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="({repositories: 6, mcpTools: 15} satisfies Readonly<Record<string, number>>).mcpTools" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">({repositories: 6, mcpTools: 15} satisfies Readonly<Record<string, number>>).mcpTools</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="manifest_lookup("mcp_tools")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">manifest_lookup("mcp_tools")</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Switch between [λ Guile], [TS TypeScript], [Rs Rust], and [≡ ALL 3] or send any expression to the 4-Ring Hardened REPL.</div></section>
|
||||||
|
|
||||||
|
<section class="stats-row">
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Repositories</div><div style="font-size:1.35rem;font-weight:700;color:var(--gold);">6</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">CLI Entrypoints</div><div style="font-size:1.35rem;font-weight:700;color:var(--cyan);">20</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">MCP & REST Tools</div><div style="font-size:1.35rem;font-weight:700;color:var(--emerald);">20</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Pluggable Lenses</div><div style="font-size:1.35rem;font-weight:700;color:var(--gold);">6</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Watchlist / FRED</div><div style="font-size:1.35rem;font-weight:700;color:var(--cyan);">24 / 14</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Enabled Subpages</div><div style="font-size:1.35rem;font-weight:700;color:var(--emerald);">5 / 5</div></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="grid-cards">
|
||||||
|
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">☿</span>E1 // Level 2: Introductory Python & Text Processing (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E1: Base-36 AQ Ciphers, Offline CMUdict Phonetics & Bidirectional Lock Evaluation</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The cipher engine maps digits 0-9 to 0..9 (ord(c)-48) and ASCII letters A-Z to 10..35 (ord(c)-87) across three quantization modes: digit (default), off (qualitative lexical only), and spoken (number-word expansion via int_to_spoken_words()), evaluating prime index ranks, 37×3k repdigit attractors, and 12-field bidirectional locks.</p></div><div><a class="btn" href="ciphers-and-phonetics/index.html">Open E1: Ciphers & Phonetics Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">☉</span>E2 // Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation.</p></div><div><a class="btn" href="knowledge-graph-and-sqlite/index.html">Open E2: Knowledge Graph & SQLite Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">♄ ☍</span>E3 // Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.</p></div><div><a class="btn" href="quant-macro-and-bayesian-brief/index.html">Open E3: Quant, Macro & Bayesian Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">⚚</span>E4 // Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway.</p></div><div><a class="btn" href="mcp-chatbot-rest-and-ipld/index.html">Open E4: MCP, REST & IPLD CIDv1 Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">⚛</span>E5 // Level 4: Linux Systems Administration, Bash Traps, systemd & DevOps (20-30 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit E5: TopologicalLine truncated
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.9rem;">
|
||||||
|
<h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">End-to-End Periodic Data Harvest → CI/CD → Deployed VPS Infrastructure Flow Diagram</h2>
|
||||||
|
<p style="font-size:0.74rem;color:var(--text-secondary);margin-bottom:0.5rem;">Generated & verified deterministically by <code>hyperstitionstud_io.publishing.flow_diagram</code> during <code>push-all-to-git-libre-audio.sh</code> and <code>tests/test_core_suite.py</code>:</p>
|
||||||
|
<div style="overflow-x:auto;background:var(--bg-well);padding:0.5rem;border:1px solid var(--border);">
|
||||||
|
<img src="../../encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png" data-http-src="/graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png" alt="Periodic Data Harvest to CI/CD to VPS Flow Diagram" style="max-width:100%;height:auto;display:block;margin:0 auto;" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3" style="padding:1rem 1.2rem;">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.4rem;">
|
||||||
|
<h2 style="font-size:0.92rem;color:var(--cyan);">Live Introspected CLI Entrypoints (pyproject.toml [project.scripts])</h2>
|
||||||
|
<input type="text" id="engCliFilterInput" placeholder="Filter CLI command or module..." style="background:var(--bg-well);color:var(--text-main);border:1px solid var(--border);padding:0.25rem 0.55rem;font-size:0.71rem;font-family:inherit;width:230px;" aria-label="Filter CLI entrypoints" />
|
||||||
|
</div>
|
||||||
|
<table id="engCliTable">
|
||||||
|
<thead><tr><th>CLI Command</th><th>Python Module:Function Target</th></tr></thead>
|
||||||
|
<tbody><tr><td><code>hs-archive-rotate</code></td><td><code>hyperstitionstud_io.publishing.archive_rotator:main</code></td></tr><tr><td><code>hs-citations</code></td><td><code>hyperstitionstud_io.ci.citation_sources:main</code></td></tr><tr><td><code>hs-closeups-sync</code></td><td><code>hyperstitionstud_io.publishing.closeups_sync:main</code></td></tr><tr><td><code>hs-daily-brief</code></td><td><code>hyperstitionstud_io.quant.daily_brief:main</code></td></tr><tr><td><code>hs-db-build</code></td><td><code>hyperstitionstud_io.db.sqlite_meta:main</code></td></tr><tr><td><code>hs-deploy-scripts-sync</code></td><td><code>hyperstitionstud_io.ci.deploy_scripts_sync:main</code></td></tr><tr><td><code>hs-doctor</code></td><td><code>hyperstitionstud_io.ci.doctor:main</code></td></tr><tr><td><code>hs-eng-docs</code></td><td><code>hyperstitionstud_io.publishing.engineering_docs:main</code></td></tr><tr><td><code>hs-highlights</code></td><td><code>hyperstitionstud_io.publishing.highlights:main</code></td></tr><tr><td><code>hs-kg-build</code></td><td><code>hyperstitionstud_io.graph.cli:main</code></td></tr><tr><td><code>hs-macro-harvest</code></td><td><code>hyperstitionstud_io.quant.macro:main</code></td></tr><tr><td><code>hs-math-docs</code></td><td><code>hyperstitionstud_io.publishing.math_docs:main</code></td></tr><tr><td><code>hs-mcp</code></td><td><code>hyperstitionstud_io.mcp.server:main</code></td></tr><tr><td><code>hs-pdf-build</code></td><td><code>hyperstitionstud_io.publishing.pdf_compiler:main</code></td></tr><tr><td><code>hs-public-smoke</code></td><td><code>hyperstitionstud_io.ci.public_regression:main</code></td></tr><tr><td><code>hs-quant-harvest</code></td><td><code>hyperstitionstud_io.quant.collector:main</code></td></tr><tr><td><code>hs-quant-voice-build</code></td><td><code>hyperstitionstud_io.publishing.quant_voice:main</code></td></tr><tr><td><code>hs-readme-sync</code></td><td><code>hyperstitionstud_io.publishing.readme_sync:main</code></td></tr><tr><td><code>hs-sync-version</code></td><td><code>hyperstitionstud_io.version_sync:main</code></td></tr><tr><td><code>hs-ticker-card</code></td><td><code>hyperstitionstud_io.quant.cards:main</code></td></tr></tbody>
|
||||||
|
</table>
|
||||||
|
<script>
|
||||||
|
(function(){
|
||||||
|
var inp=document.getElementById("engCliFilterInput"),tbl=document.getElementById("engCliTable");
|
||||||
|
if(!inp||!tbl)return;
|
||||||
|
inp.addEventListener("input",function(){
|
||||||
|
var q=(inp.value||"").trim().toLowerCase();
|
||||||
|
tbl.querySelectorAll("tbody tr").forEach(function(tr){
|
||||||
|
tr.style.display=(!q||tr.textContent.toLowerCase().indexOf(q)!==-1)?"":"none";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering v2.17.0 • CIDv1: <code>baguqeera22rwawy2hsayigq75jzsg5nevhh...</code> • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit E2: 6-Gate 388-Node Knowledge Graph Compiler, ReadOnlyIsolationGuard & Quiescent SQLite + FTS5 Engine</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge E2 • Non-Sequentially Revertible via <code>hs-eng-docs --disable knowledge-graph-and-sqlite</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="../ciphers-and-phonetics/index.html" style="">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html" style="">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 3-4: Databases, Cryptographic Hashing & OS Concurrency (15-25 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Cryptographic hash functions (SHA-256) and Python context managers (with / __exit__)</li><li>Relational schemas, inverted full-text search indices (SQLite FTS5), and graph representations</li><li>ACID transactions, Write-Ahead Logging (WAL), and BEGIN EXCLUSIVE file locking</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.sqlite.org/wal.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">SQLite Write-Ahead Logging (WAL) Architecture ↗</a></li><li><a href="https://www.sqlite.org/fts5.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">SQLite FTS5 Full-Text Search Extension Docs ↗</a></li><li><a href="https://15445.courses.cs.cmu.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">CMU 15-445/645 (Intro to Database Systems — Andy Pavlo) ↗</a></li><li><a href="https://docs.python.org/3/library/contextlib.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Python contextlib & Context Manager Documentation ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E2): Pre/Post SHA-256 Read-Only Isolation Guard & Borrow Checking</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>Guard(f): H_pre == H_expected ∧ H_post == H_pre</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
|
||||||
|
run_pipeline()</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">((lambda (pre post) (and (= pre 282) (= pre post))) 282 282)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="((pre: number, post: number): boolean => pre === 282 && pre === post)(282, 282)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">((pre: number, post: number): boolean => pre === 282 && pre === post)(282, 282)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="isolation_guard_ok(282_u32, 282_u32)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">isolation_guard_ok(282_u32, 282_u32)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare Scheme's predicate, TypeScript's typed arrow guard, and Rust's Result<bool, Error>.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. ReadOnlyIsolationGuard Context Manager (hyperstitionstud_io.glossary)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Every compiler, MCP tool, and REST v1 handler executes inside with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:. Before and after the block runs, SHA-256 digests of taxonomy/glossary-registry.json and encyclopedia/encyclopedia-manifest.json are verified against baseline constants, raising RuntimeError immediately on any byte mutation.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. 6-Gate Multi-Format Graph Compiler & Quiescent 100M SQLite Logrotate (db/sqlite_meta.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">build_encyclopedia_knowledge_graph.py compiles 388 nodes and 1,282 edges into JSON, JS, GraphML, GEXF, Obsidian Canvas, and 3 1600x1060 PNG atlases. sqlite_meta.py hydrates hyperstition-catalog.db (FTS5) and records /api/v1/* and /mcp telemetry in /var/lib/hyperstitionstud.io/api-telemetry.db, while deploy/logrotate.d/hyperstition-sqlite-meta acquires BEGIN EXCLUSIVE at 100M, snapshots .1.gz, and runs PRAGMA wal_checkpoint(TRUNCATE); VACUUM;.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../ciphers-and-phonetics/index.html">← Prev: E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html">Next: E3: Quant, Macro & Bayesian →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering/knowledge-graph-and-sqlite v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1 — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit E4: Stateless MCP Server (:8095), Chatbot OpenAPI 3.1.0 REST Adapter, .png+.json Cards & IPLD CIDv1</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge E4 • Non-Sequentially Revertible via <code>hs-eng-docs --disable mcp-chatbot-rest-and-ipld</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="../ciphers-and-phonetics/index.html" style="">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html" style="">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html" style="">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 4: Network Protocols, OpenAPI 3.1 & Content-Addressed Storage (15-20 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>HTTP/1.1 request/response lifecycles, status codes (200, 404, 422, 500, 502), and reverse proxies</li><li>JSON-RPC 2.0, OpenAPI 3.1.0 schema generation, and Model Context Protocol (MCP)</li><li>Canonical JSON serialization, SHA-256 multihashes, and IPLD dag-json (0x0129) CIDv1</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MDN Web Docs — HTTP Protocol & Status Codes ↗</a></li><li><a href="https://www.jsonrpc.org/specification" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">JSON-RPC 2.0 Official Specification ↗</a></li><li><a href="https://modelcontextprotocol.io/introduction" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Model Context Protocol (MCP) Architecture Introduction ↗</a></li><li><a href="https://proto.school/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">ProtoSchool — Content Identifiers (CIDs) & IPLD Merkle DAGs ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E4): JSON-RPC 2.0 Tool Dispatch & 'envideea' = 137 (33rd Prime)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>Dispatch(name, args) → ToolTable[name](args)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">res = call_mcp_tool(target_tool, t_args)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(list 'jsonrpc-2.0 'tool "hs_evaluate_aq_and_ingglish" (aq-base36 "envideea"))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(list 'jsonrpc-2.0 'tool "hs_evaluate_aq_and_ingglish" (aq-base36 "envideea"))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="aqBase36("envideea")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">aqBase36("envideea")</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="mcp_dispatch_aq("envideea")" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">mcp_dispatch_aq("envideea")</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Evaluate "envideea" => 137 across Guile, TypeScript, and Rust.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Unified Stateless MCP (/mcp) & Chatbot OpenAPI 3.1.0 REST Adapter (/api/v1/*)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">mcp/server.py and mcp/rest.py expose all 15 tools in MCP_TOOLS_SCHEMA over stdio, Streamable HTTP POST/GET /mcp, and /api/v1/tools/{tool_name} on 127.0.0.1:8095. Top-level exception guards in _MCPHTTPHandler and record_api_telemetry() ensure sqlite3.OperationalError or read-only filesystem states never drop connections or trigger 502 Bad Gateway.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. One-Shot .png + .json Ticker Stats Cards (quant/cards.py) & Canonical IPLD dag-json (0x0129)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">hs_generate_ticker_stats_card compiles a 5-zone 900x1260 Group 3 Stealth Basalt PNG card and companion JSON payload in one shot (with draw_fitted_text() width clamping and ink-bbox midpoint centering). ipld/__init__.py serializes canonical UTF-8 dag-json and prefixes SHA-256 digests with [0x01, 0xA9, 0x02, 0x12, 0x20] to form Base32 CIDv1 ('baguqeera...').</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">3. Command-Line Usage Examples: cURL, CLI (hs-ticker-card), Chatbot REST Client (/api/v1/tools/*) & MCP Client (/mcp)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Command-line invocations across all four client interfaces: (1) cURL (zero local dependencies; works against https://hyperstitionstud.io or http://127.0.0.1:8095): curl -sS 'https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false' -o /tmp/NVDA-stats-card.json (or include_base64_png=true piped through jq -r '.data.artifacts.png_base64' | base64 -d > /tmp/NVDA-stats-card.png); (2) CLI (hs-ticker-card): hs-ticker-card --symbol NVDA --lens tierzoo_ecology --out-dir /tmp/hyperstition-cards; (3) Chatbot REST API Client: curl -sS 'https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false' | jq . (or POST JSON '{"symbol":"NVDA","lens":"tierzoo_ecology","include_base64_png":true}' to /api/v1/tools/hs_generate_ticker_stats_card, or GET /api/v1/zoology/pokedex/NVDA?include_card=true); (4) MCP JSON-RPC 2.0 Client: curl -sS -X POST 'https://hyperstitionstud.io/mcp' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hs_generate_ticker_stats_card","arguments":{"symbol":"NVDA","lens":"tierzoo_ecology","include_base64_png":false}}}' | jq .</p></article><section id="live-smoke-probe" class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.6rem;margin-bottom:0.55rem;"><h2 style="font-size:0.92rem;color:var(--emerald);">⚛ Live API & IPLD CIDv1 ETag 304 Conditional Cache Probe (#live-smoke-probe)</h2><button type="button" id="runLiveEtagProbeBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);font-weight:700;">⚛ Run Live /api/v1/status & ETag 304 Probe</button></div><p style="font-size:0.74rem;color:var(--text-secondary);margin-bottom:0.5rem;">Fetches <code>/api/v1/status</code> twice (sending <code>If-None-Match: <ETag></code> on the second request) to verify deterministic RFC 8785 JCS + IPLD <code>dag-json</code> <code>CIDv1</code> HTTP caching and <code>ReadOnlyIsolationGuard</code> status.</p><pre id="liveEtagProbeOutput" style="padding:0.65rem 0.85rem;font-size:0.73rem;color:var(--cyan);border:1px solid var(--border);overflow-x:auto;">Click "Run Live /api/v1/status & ETag 304 Probe" to inspect live HTTP ETag & ReadOnlyIsolationGuard headers.</pre><script>(function(){var btn=document.getElementById("runLiveEtagProbeBtn"),out=document.getElementById("liveEtagProbeOutput");if(!btn||!out)return;function runProbe(){out.textContent="Probing /api/v1/status ...";var t0=performance.now();fetch("/api/v1/status",{cache:"no-store"}).then(function(r1){var dt1=(performance.now()-t0).toFixed(1),etag=r1.headers.get("ETag")||"";return r1.json().then(function(j1){var t1=performance.now();return fetch("/api/v1/status",{headers:etag?{"If-None-Match":etag}:{}}).then(function(r2){var dt2=(performance.now()-t1).toFixed(1);out.textContent="[1st Request GET /api/v1/status]: HTTP "+r1.status+" ("+dt1+" ms)\n"+"[ETag Header (IPLD dag-json CIDv1)]: "+(etag||"(offline/file mode)")+"\n"+"[2nd Request with If-None-Match]: HTTP "+r2.status+" ("+dt2+" ms)\n"+"[Ecosystem Version & IsolatLine truncated
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../quant-macro-and-bayesian-brief/index.html">← Prev: E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html">Next: E5: CI/CD, VPS & Regression →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering/mcp-chatbot-rest-and-ipld v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief — hyperstitionstud.io/engineering (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge E3 • Non-Sequentially Revertible via <code>hs-eng-docs --disable quant-macro-and-bayesian-brief</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=engineering" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Engineering Hub (E0)</a>
|
||||||
|
<a class="btn" href="../ciphers-and-phonetics/index.html" style="">E1: Ciphers & Phonetics</a>
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html" style="">E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">E3: Quant, Macro & Bayesian</a>
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html" style="">E4: MCP, REST & IPLD CIDv1</a>
|
||||||
|
<a class="btn" href="../cicd-vps-tmpfs-and-regression/index.html" style="">E5: CI/CD, VPS & Regression</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Concepts Required:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>HTTP JSON/CSV client ingestion (urllib.request) and resilient fallback chains</li><li>Missing-data domain representation (None / null vs. silent 0.0 corruption)</li><li>Pluggable projection registries (LENS_REGISTRY) and state-machine persistence</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../quant/index.html" style="color:var(--cyan);">Internal: /quant/ Interactive Guided Canvas Tour (5 Episodes) ↗</a></li><li><a href="https://docs.python.org/3/library/urllib.request.html" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Python urllib.request & json Standard Library Documentation ↗</a></li><li><a href="https://fredhelp.stlouisfed.org/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">St. Louis Federal Reserve (FRED) Series & CSV Documentation ↗</a></li><li><a href="https://refactoring.guru/design-patterns/python" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Refactoring.Guru — Strategy & Adapter Design Patterns in Python ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (E3): Zero-Synthetic Missing-Data Semantics (#f / boolean / Option<f64>)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Formal Specification & Python:</strong><code>D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = null</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">dose = sum(1 for flag in (s1, s2, s3, s4) if flag)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(confluence-dose '(#t #t #t #f))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(confluence-dose '(#t #t #t #f))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="[true, true, true, false].filter(Boolean).length" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">[true, true, true, false].filter(Boolean).length</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="[Some(135.4), None, Some(138.2)].iter().filter_map(|&x| x).count()" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">[Some(135.4), None, Some(138.2)].iter().filter_map(|&x| x).count()</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Observe how Scheme #f, TypeScript filter(Boolean), and Rust Option::filter_map eliminate synthetic 0.0 fabrication.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Strict Zero-Synthetic-Data Collector & Native-Cadence FRED Macro Engine (collector.py, macro.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. 14-Point Bidirectional Census, Confluence Dose (D in {0..4}) & 5-Agenda Bayesian Brief (daily_brief.py)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">timeseries.py evaluates all 14 data points in Gen 0 (eng_aq) and Gen 1 (ing_aq) and classifies each bar by its 4-species Confluence Dose (Dose 2 isometric pinning vs. Dose 3+ breakout). daily_brief.py updates the append-only Bayesian state ledger (daily-brief-state.json) across R1 Bull, R2 Pinned Isometric, and R3 Tail Drawdown and grades each day's testable macro question Q_t.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../knowledge-graph-and-sqlite/index.html">← Prev: E2: Knowledge Graph & SQLite</a>
|
||||||
|
<a class="btn" href="../mcp-chatbot-rest-and-ipld/index.html">Next: E4: MCP, REST & IPLD CIDv1 →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/engineering/quant-macro-and-bayesian-brief v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../engineering-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../engineering-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -4,12 +4,13 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Memetic Artifact & Visual Atlas Gallery — hyperstitionstud.io</title>
|
<title>Memetic Artifact & Visual Atlas Gallery — hyperstitionstud.io</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.1" />
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-canvas: #020617;
|
--bg-canvas: #020617;
|
||||||
--bg-panel: #0f172a;
|
--bg-panel: #0c1324;
|
||||||
--bg-card: #1e293b;
|
--bg-card: #0c1324;
|
||||||
--border: #334155;
|
--border: #26344d;
|
||||||
--text-main: #f8fafc;
|
--text-main: #f8fafc;
|
||||||
--text-muted: #94a3b8;
|
--text-muted: #94a3b8;
|
||||||
--cyan: #22d3ee;
|
--cyan: #22d3ee;
|
||||||
@@ -189,14 +190,22 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
<h1>MEMETIC ARTIFACT & VISUAL ATLAS GALLERY // HYPERSTITIONSTUD.IO</h1>
|
<h1>MEMETIC ARTIFACT & VISUAL ATLAS GALLERY // HYPERSTITIONSTUD.IO</h1>
|
||||||
<p class="subtitle">Read-Only Specimen Browser Across Pokedex Field Cards, Philosophical & Stand-Up Exegesis, Template Benchmarks & ETI Visual Boards</p>
|
|
||||||
</div>
|
</div>
|
||||||
<nav class="top-nav">
|
<p class="subtitle">Read-Only Specimen Browser Across Pokedex Field Cards, Philosophical & Stand-Up Exegesis, Template Benchmarks & ETI Visual Boards <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
<a class="btn" id="navHome" href="../index.html">← Portal Home</a>
|
</div>
|
||||||
<a class="btn" id="navLearn" href="../learn/index.html">Learning Track</a>
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
<a class="btn" id="navGraph" href="/graph/index.html">Knowledge Graph</a>
|
<a class="btn" id="navHome" href="../index.html">Portal Home (/)</a>
|
||||||
<a class="btn" id="navCalc" href="/calc/index.html">AQ Calculator</a>
|
<a class="btn" id="navCalc" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" id="navQuant" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" id="navGraph" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" id="navLearn" href="../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" id="navEng" href="../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" id="navMath" href="../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" id="navDonate" href="../donate/index.html?from=gallery" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -217,7 +226,7 @@
|
|||||||
<main class="gallery-grid" id="galleryGrid"></main>
|
<main class="gallery-grid" id="galleryGrid"></main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>hyperstitionstud.io/gallery • Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.0.23)</div>
|
<div>hyperstitionstud.io/gallery • Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:gallery:2.17.1)</div>
|
||||||
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">♥</span> by Lemurs.</div>
|
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">♥</span> by Lemurs.</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
@@ -390,5 +399,6 @@
|
|||||||
renderGrid();
|
renderGrid();
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
<script src="../assets/hs-mobile-ui.js?v=2.17.1" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Before Width: | Height: | Size: 730 KiB |
@@ -4,7 +4,8 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>hyperstitionstud.io — Technocapital Singularity Zoology & Alphanumeric Qabbala Workbench</title>
|
<title>hyperstitionstud.io — Technocapital Singularity Zoology & Alphanumeric Qabbala Workbench</title>
|
||||||
<link rel="prefetch" href="/graph/graph-data.js" as="script" />
|
<link rel="prefetch" href="/graph/graph-data.js?v=2.17.1" as="script" />
|
||||||
|
<link rel="stylesheet" href="assets/hs-group3-basalt-chamfer.css?v=2.17.1" />
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-canvas: #020617;
|
--bg-canvas: #020617;
|
||||||
@@ -28,157 +29,117 @@
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 2rem 1.5rem;
|
padding: 1.5rem 1.5rem;
|
||||||
}
|
}
|
||||||
.container { max-width: 1260px; margin: 0 auto; width: 100%; }
|
.container { max-width: 1320px; margin: 0 auto; width: 100%; }
|
||||||
header {
|
header {
|
||||||
background: var(--bg-panel);
|
background: var(--bg-panel);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-left: 4px solid var(--cyan);
|
border-left: 4px solid var(--cyan);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1.4rem 1.6rem;
|
padding: 1.1rem 1.35rem;
|
||||||
margin-bottom: 1.6rem;
|
margin-bottom: 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
gap: 1rem;
|
gap: 0.85rem;
|
||||||
}
|
}
|
||||||
.title-row { display: flex; align-items: center; gap: 0.75rem; }
|
@media (max-width: 1220px) {
|
||||||
|
header { flex-wrap: wrap; }
|
||||||
|
}
|
||||||
|
.title-row { display: flex; align-items: center; gap: 0.65rem; }
|
||||||
.dot {
|
.dot {
|
||||||
width: 11px; height: 11px; border-radius: 50%;
|
width: 10px; height: 10px; border-radius: 50%;
|
||||||
background: var(--cyan);
|
background: var(--cyan);
|
||||||
box-shadow: 0 0 10px var(--cyan);
|
box-shadow: 0 0 10px var(--cyan);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
|
||||||
.subtitle { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }
|
.subtitle { color: var(--text-muted); font-size: 0.71rem; margin-top: 0.25rem; }
|
||||||
.meta-badges {
|
.meta-badges {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 0.5rem;
|
gap: 0.38rem;
|
||||||
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;
|
flex-shrink: 0;
|
||||||
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
@media (max-width: 1120px) {
|
@media (max-width: 1120px) {
|
||||||
.meta-badges {
|
.meta-badges {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.badge {
|
.showcase-grid {
|
||||||
background: var(--bg-card);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 0.3rem 0.6rem;
|
|
||||||
font-size: 0.72rem;
|
|
||||||
color: var(--cyan);
|
|
||||||
}
|
|
||||||
.grid {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
|
grid-template-columns: repeat(2, 1fr);
|
||||||
gap: 1.15rem;
|
gap: 1.15rem;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
.showcase-grid { grid-template-columns: 1fr; }
|
||||||
|
}
|
||||||
.card {
|
.card {
|
||||||
background: var(--bg-panel);
|
background: var(--bg-panel);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1.3rem;
|
padding: 1.15rem 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 1rem;
|
gap: 0.75rem;
|
||||||
transition: border-color 0.15s ease, transform 0.15s ease;
|
transition: border-color 0.15s ease, transform 0.15s ease;
|
||||||
}
|
}
|
||||||
.card:hover { border-color: var(--cyan); transform: translateY(-2px); }
|
.card:hover { border-color: var(--cyan); transform: translateY(-2px); }
|
||||||
.card-top { display: flex; flex-direction: column; gap: 0.55rem; }
|
|
||||||
.card-tag {
|
.card-tag {
|
||||||
font-size: 0.7rem;
|
font-size: 0.68rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
}
|
}
|
||||||
.card h2 { font-size: 1.02rem; font-weight: 700; color: var(--text-main); }
|
.hook-caption {
|
||||||
.card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; }
|
font-size: 0.84rem;
|
||||||
.stat-row {
|
font-weight: 700;
|
||||||
display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem;
|
|
||||||
}
|
|
||||||
.stat {
|
|
||||||
background: #090d16;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 0.2rem 0.45rem;
|
|
||||||
font-size: 0.68rem;
|
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
|
line-height: 1.42;
|
||||||
|
border-left: 2px solid var(--border);
|
||||||
|
padding-left: 0.65rem;
|
||||||
|
}
|
||||||
|
.closeup-frame {
|
||||||
|
background: #05080e;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.closeup-frame img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
|
|
||||||
.btn {
|
.btn {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 0.45rem 0.8rem;
|
padding: 0.34rem 0.62rem;
|
||||||
font-size: 0.74rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
transition: all 0.15s ease;
|
transition: all 0.15s ease;
|
||||||
}
|
}
|
||||||
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
|
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
|
||||||
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
|
.btn.primary { background: var(--cyan); color: #020617; border-color: var(--cyan); }
|
||||||
.btn.primary:hover { opacity: 0.92; color: #020617; }
|
.btn.primary:hover { opacity: 0.92; color: #020617; }
|
||||||
footer {
|
footer {
|
||||||
margin-top: 2rem;
|
margin-top: 1.5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
padding-top: 1rem;
|
padding-top: 0.85rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -188,173 +149,228 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="title-row">
|
<div class="title-row">
|
||||||
<span class="dot"></span>
|
<span class="dot"></span>
|
||||||
<h1>HYPERSTITIONSTUD.IO // TECHNOCAPITAL SINGULARITY ZOOLOGY WORKBENCH</h1>
|
<h1>HYPERSTITIONSTUD.IO // SINGULARITY ZOOLOGY WORKBENCH</h1>
|
||||||
</div>
|
</div>
|
||||||
<p class="subtitle">100% Offline-Portable & HTTP/3 Edge-Ready Research Corpus • Namespace Authority: urn:io:hyperstitionstud (v2.0.23)</p>
|
<p class="subtitle">100% Offline-Portable & HTTP/3 Edge-Ready Research Corpus • Namespace Authority: urn:io:hyperstitionstud (v2.17.1) <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta-badges">
|
<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 primary" data-route="calc-app" href="/calc/index.html">Calculator</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>
|
<a class="btn" data-route="quant-app" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
<span class="badge">388 Graph Nodes</span>
|
<a class="btn" data-route="graph-index" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
<span class="badge">1,282 Typed Edges</span>
|
<a class="btn" data-route="learn-track" href="/learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
<span class="badge">24 Quant Tickers</span>
|
<a class="btn" data-route="eng-hub" href="/engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" data-route="math-hub" href="/math/index.html">Math</a>
|
||||||
<span class="nav-donate-sep" aria-hidden="true"></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 & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
<a class="btn-donate-pill" data-route="donate-page" href="/donate/index.html?from=home" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="grid">
|
<main class="showcase-grid">
|
||||||
<!-- Card 1: Interactive Knowledge Graph -->
|
<!-- Quadrant 01: Cybermemetics (Hyperstition) & Personal Magical Practice -->
|
||||||
<section class="card">
|
<section class="card plate-lock-emerald">
|
||||||
<div class="card-top">
|
<span class="card-tag" style="color:var(--emerald)"><span class="hs-sigil" aria-hidden="true">☿ ☉</span>01 // Cybermemetics, Isopsephy & Personal Magical Practice</span>
|
||||||
<span class="card-tag" style="color:var(--cyan)">01 // Interactive Property Graph Workbench</span>
|
<p class="hook-caption">“Where Spoken Incantation Meets the 37×3k Numogrammatic Lattice: Turn Multi-Cipher Base-36 Qabbala & Concentric Radar into a Live Digital Grimoire.”</p>
|
||||||
<h2>Encyclopedia Knowledge Graph (Mode 1–4 Explorer)</h2>
|
<div class="closeup-tab-strip" role="tablist" aria-label="Quadrant 01 Surface Tabs">
|
||||||
<p>Explore all 388 ontological nodes and 1,282 deduplicated edges across Mode 2 Concentric ETI Tier-Ring Radar (S+ Center to D Periphery), Mode 1 Trophic Food-Web, Mode 3 Bipartite G1 Funnel, and 1-Hop Ego-Network Isolation.</p>
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
|
||||||
<div class="stat-row">
|
data-closeup-src="assets/closeups/quadrant-1-cybermemetics-calc-graph.png"
|
||||||
<span class="stat">13 Multi-Build Flex Hubs</span>
|
data-closeup-alt="UI Closeup of /calc/ Multi-Cipher Matrix"
|
||||||
<span class="stat">Zero Glossary Leak (SHA-256 Verified)</span>
|
data-closeup-href="/calc/index.html"
|
||||||
|
data-closeup-route="calc-app"
|
||||||
|
data-closeup-label="ACTIVE TAB: /calc/ • 231,615 Entries"
|
||||||
|
data-closeup-cta="Launch /calc/ →">01 ☿ /calc/ Cipher Matrix</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-1-tab-2-graph.png"
|
||||||
|
data-closeup-alt="UI Closeup of /graph/ Mode 2 Concentric ETI Radar and Syzygy Compass"
|
||||||
|
data-closeup-href="/graph/index.html?filter=syzygy"
|
||||||
|
data-closeup-route="graph-syzygy"
|
||||||
|
data-closeup-label="ACTIVE TAB: /graph/?filter=syzygy • 9-Sum Syzygies"
|
||||||
|
data-closeup-cta="Launch /graph/ Syzygy →">02 ☍ /graph/ ETI Radar</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="closeup-frame">
|
||||||
|
<a class="closeup-viewport" data-route="graph-syzygy" href="/graph/index.html?filter=syzygy">
|
||||||
|
<img src="assets/closeups/quadrant-1-cybermemetics-calc-graph.png" alt="UI Closeup of /calc/ Multi-Cipher Matrix" />
|
||||||
|
<div class="closeup-bar">
|
||||||
|
<span class="closeup-bar-label">ACTIVE TAB: /calc/ • 231,615 Entries</span>
|
||||||
|
<span class="closeup-bar-cta">Launch /calc/ →</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
</a>
|
||||||
<a class="btn primary" data-route="graph-index" href="/graph/index.html">Launch Interactive Graph</a>
|
|
||||||
<a class="btn" data-route="graph-manual" href="/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf">Operator's Manual (PDF)</a>
|
|
||||||
<a class="btn" data-route="graph-json" href="/graph/encyclopedia-graph.json">Graph JSON</a>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Card 2: 22-Volume PDF Encyclopedia -->
|
<!-- Quadrant 02: Finance Enthusiasts & Esoteric Alpha / Non-Correlation -->
|
||||||
<section class="card">
|
<section class="card plate-lock-gold">
|
||||||
<div class="card-top">
|
<span class="card-tag" style="color:var(--gold)"><span class="hs-sigil" aria-hidden="true">♄ ☍</span>02 // Esoteric Alpha, Non-Correlation & Regime Telemetry</span>
|
||||||
<span class="card-tag" style="color:var(--red)">02 // 9-Division Alphabetical Reference</span>
|
<p class="hook-caption">“Beyond Trailing Covariance: Hunt Uncaptured Non-Correlated Alpha Where Closing-Bell Tape, FRED Liquidity & Spoken Headlines Collide.”</p>
|
||||||
<h2>Encyclopedia of Technocapital Singularity Zoology (22 PDFs)</h2>
|
<div class="closeup-tab-strip" role="tablist" aria-label="Quadrant 02 Surface Tabs">
|
||||||
<p>Complete 122-page, 22-volume PDF encyclopedia organized across 9 ontological divisions (00 Index & Atlas through 08 Stakeholder Registers & Pokedex Semiotics) with 291 indexed placements.</p>
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
|
||||||
<div class="stat-row">
|
data-closeup-src="assets/closeups/quadrant-2-esoteric-finance-quant.png"
|
||||||
<span class="stat">Divisions 00–08</span>
|
data-closeup-alt="UI Closeup of /quant/ Panel 1 Trajectory and 30-Day Dose D>=3 Inspector"
|
||||||
<span class="stat">22 Volumes (122 Pages)</span>
|
data-closeup-href="/quant/index.html?screen=dose-d3"
|
||||||
|
data-closeup-route="quant-dose"
|
||||||
|
data-closeup-label="ACTIVE TAB: /quant/?screen=dose-d3 • 472 Bars (19d)"
|
||||||
|
data-closeup-cta="Launch Dose D≥3 →">01 Δ Trajectory & Dose</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-2-tab-2-bayesian-fred.png"
|
||||||
|
data-closeup-alt="UI Closeup of /quant/ Panel 6 Bayesian Posteriors and Panel 5 FRED Macro"
|
||||||
|
data-closeup-href="/quant/index.html#panel-6"
|
||||||
|
data-closeup-route="quant-app"
|
||||||
|
data-closeup-label="ACTIVE TAB: /quant/#panel-6 • Bayesian & 14 FRED Series"
|
||||||
|
data-closeup-cta="Launch Bayesian & FRED →">02 ☍ Bayesian & FRED</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-2-tab-3-leaderboard-card.png"
|
||||||
|
data-closeup-alt="UI Closeup of /quant/ Panel 2 6-Lens Leaderboard and TCG Stats Card"
|
||||||
|
data-closeup-href="/quant/index.html#panel-2"
|
||||||
|
data-closeup-route="quant-app"
|
||||||
|
data-closeup-label="ACTIVE TAB: /quant/#panel-2 • 6 Lenses & TCG Card"
|
||||||
|
data-closeup-cta="Launch 6-Lens & Card →">03 ♄ 6-Lens & Card</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="closeup-frame">
|
||||||
|
<a class="closeup-viewport" data-route="quant-dose" href="/quant/index.html?screen=dose-d3">
|
||||||
|
<img src="assets/closeups/quadrant-2-esoteric-finance-quant.png" alt="UI Closeup of /quant/ Panel 1 Trajectory and 30-Day Dose D>=3 Inspector" />
|
||||||
|
<div class="closeup-bar">
|
||||||
|
<span class="closeup-bar-label">ACTIVE TAB: /quant/?screen=dose-d3 • 472 Bars (19d)</span>
|
||||||
|
<span class="closeup-bar-cta">Launch Dose D≥3 →</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
</a>
|
||||||
<a class="btn primary" data-route="enc-vol00" href="/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf">Open Master Index (Vol 00)</a>
|
|
||||||
<a class="btn" data-route="enc-overview" href="/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf">Overview & Manifest (PDF)</a>
|
|
||||||
<a class="btn" data-route="glossary-pdf" href="/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf">282-Term Glossary (PDF)</a>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Card 3: Assemblage Builds ETI Tier List -->
|
<!-- Quadrant 03: Information Science Enthusiasts from a Novice Level -->
|
||||||
<section class="card">
|
<section class="card plate-lock-emerald">
|
||||||
<div class="card-top">
|
<span class="card-tag" style="color:var(--cyan)"><span class="hs-sigil" aria-hidden="true">λ ◈</span>03 // Information Science From First Principles (Novice-Friendly)</span>
|
||||||
<span class="card-tag" style="color:var(--gold)">03 // Ecological Trophic Index (ETI 0–100)</span>
|
<p class="hook-caption">“From Zero to Fixed-Point Combinators: Explore Phonemic Compression, Property Graphs & 3-Language AST Sandboxes Starting from High-School Algebra.”</p>
|
||||||
<h2>Technocapital Assemblage Builds Tier List (S+ to D/F)</h2>
|
<div class="closeup-tab-strip" role="tablist" aria-label="Quadrant 03 Surface Tabs">
|
||||||
<p>Six-stat zoological scorecards (ARM, VEL, COL, CAP, PRM, RES) ranking Apex Predators (#1 S1 Autoregressive AI at 93 ETI, #2 S2 Flash-Crash Templex at 90 ETI) down to the Tier D Periphery.</p>
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
|
||||||
<div class="stat-row">
|
data-closeup-src="assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png"
|
||||||
<span class="stat">S+ Apex: 93 ETI (#1 S1)</span>
|
data-closeup-alt="UI Closeup of /learn/ Prerequisite Ladder and Base-36 Decomposition"
|
||||||
<span class="stat">D Periphery: 49 ETI (#9 Q-Stub)</span>
|
data-closeup-href="/learn/index.html"
|
||||||
|
data-closeup-route="learn-track"
|
||||||
|
data-closeup-label="ACTIVE TAB: /learn/ • Novice Prerequisite Ladder"
|
||||||
|
data-closeup-cta="Launch /learn/ →">01 ◈ /learn/ Prereq Track</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-3-tab-2-math-guile.png"
|
||||||
|
data-closeup-alt="UI Closeup of /math/ 2-Column Guile Scheme Z-Calculus and Step AST Trace"
|
||||||
|
data-closeup-href="/math/index.html?repl=trace"
|
||||||
|
data-closeup-route="math-trace"
|
||||||
|
data-closeup-label="ACTIVE TAB: /math/?repl=trace • Step AST Trace"
|
||||||
|
data-closeup-cta="Launch Z-Trace REPL →">02 λ Guile & Z-REPL</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-3-tab-3-math-ts-rust.png"
|
||||||
|
data-closeup-alt="UI Closeup of /math/ 2-Column TypeScript and Rust AST Parity"
|
||||||
|
data-closeup-href="/math/base36-algebra-and-primes/index.html"
|
||||||
|
data-closeup-route="math-hub"
|
||||||
|
data-closeup-label="ACTIVE TAB: /math/ • TypeScript & Rust AST"
|
||||||
|
data-closeup-cta="Launch TS & Rust →">03 ≡ TypeScript & Rust</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="closeup-frame">
|
||||||
|
<a class="closeup-viewport" data-route="math-trace" href="/math/index.html?repl=trace">
|
||||||
|
<img src="assets/closeups/quadrant-3-info-science-novice-learn-polyglot.png" alt="UI Closeup of /learn/ Prerequisite Ladder and Base-36 Decomposition" />
|
||||||
|
<div class="closeup-bar">
|
||||||
|
<span class="closeup-bar-label">ACTIVE TAB: /learn/ • Novice Prerequisite Ladder</span>
|
||||||
|
<span class="closeup-bar-cta">Launch /learn/ →</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
</a>
|
||||||
<a class="btn primary" data-route="tier-png" href="/zoology/tier-list-technocapital-assemblage-builds.png">View Visual Tier List (PNG)</a>
|
|
||||||
<a class="btn" data-route="tier-pdf" href="/zoology/tier-list-technocapital-assemblage-builds.pdf">Scorecard Report (PDF)</a>
|
|
||||||
<a class="btn" data-route="radar-spec" href="/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf">D Periphery Radar Spec (PDF)</a>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Card 4: Stakeholder Proposals & M7+ Nucleation -->
|
<!-- Quadrant 04: Operators Interested in Deployment Use Case -->
|
||||||
<section class="card">
|
<section class="card plate-lock-rose">
|
||||||
<div class="card-top">
|
<span class="card-tag" style="color:var(--rose)"><span class="hs-sigil" aria-hidden="true">⚛ ⚚</span>04 // Two-Script DevOps, tmpfs Hydration & EROFS Verification</span>
|
||||||
<span class="card-tag" style="color:var(--emerald)">04 // Evidence-Grounded Stakeholder Dossiers</span>
|
<p class="hook-caption">“Two Scripts, Zero Cloud Lock-In: Auditable 6-Repo Git Topology, RAM-Backed HTTP/3 Edge Serving & ProtectSystem=strict Verification.”</p>
|
||||||
<h2>Corporate Board, Fund Manager & Roster Proposals</h2>
|
<div class="closeup-tab-strip" role="tablist" aria-label="Quadrant 04 Surface Tabs">
|
||||||
<p>Grounded-citation verified proposals in both Bidirectional (Gen 0 + Gen 1 Ingglish) and Pure Standard Written English (Gen 0 Only) registers, plus Two-Run Emergent Subclass (M7+) nucleation.</p>
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="true"
|
||||||
<div class="stat-row">
|
data-closeup-src="assets/closeups/quadrant-4-operators-deployment-vps.png"
|
||||||
<span class="stat">100% Verbatim Quote Locks</span>
|
data-closeup-alt="UI Closeup of /engineering/ Two-Script DevOps and CLI Entrypoints"
|
||||||
<span class="stat">Dossiers 65–69 (150 Eqs)</span>
|
data-closeup-href="/engineering/index.html"
|
||||||
|
data-closeup-route="eng-hub"
|
||||||
|
data-closeup-label="ACTIVE TAB: /engineering/ • Two-Script DevOps & CLIs"
|
||||||
|
data-closeup-cta="Launch /engineering/ →">01 ⚚ DevOps & CLIs</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-4-tab-2-mcp-etag.png"
|
||||||
|
data-closeup-alt="UI Closeup of Unit E4 MCP, REST v1 and Live ETag 304 Probe"
|
||||||
|
data-closeup-href="/engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe"
|
||||||
|
data-closeup-route="eng-probe"
|
||||||
|
data-closeup-label="ACTIVE TAB: /engineering/E4#live-smoke-probe • ETag 304"
|
||||||
|
data-closeup-cta="Launch ETag 304 Probe →">02 ⚛ MCP & ETag 304</button>
|
||||||
|
<button type="button" class="closeup-tab-btn" role="tab" aria-selected="false"
|
||||||
|
data-closeup-src="assets/closeups/quadrant-4-tab-3-ci-gates.png"
|
||||||
|
data-closeup-alt="UI Closeup of /ci/ 4-Gate Ingglish CI Pipeline and P1-P6 Smoke Gates"
|
||||||
|
data-closeup-href="/ci/index.html"
|
||||||
|
data-closeup-route="ci-hub"
|
||||||
|
data-closeup-label="ACTIVE TAB: /ci/ • 4-Gate CI & P1-P6 Smoke"
|
||||||
|
data-closeup-cta="Launch /ci/ Gates →">03 ◈ /ci/ 4-Gate Pipeline</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="closeup-frame">
|
||||||
|
<a class="closeup-viewport" data-route="eng-probe" href="/engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe">
|
||||||
|
<img src="assets/closeups/quadrant-4-operators-deployment-vps.png" alt="UI Closeup of /engineering/ Two-Script DevOps and CLI Entrypoints" />
|
||||||
|
<div class="closeup-bar">
|
||||||
|
<span class="closeup-bar-label">ACTIVE TAB: /engineering/ • Two-Script DevOps & CLIs</span>
|
||||||
|
<span class="closeup-bar-cta">Launch /engineering/ →</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
</a>
|
||||||
<a class="btn primary" data-route="prop-fund" href="/zoology/proposal-fund-manager-novel-investment-discovery.pdf">Fund Manager Proposal (PDF)</a>
|
|
||||||
<a class="btn" data-route="prop-board" href="/zoology/proposal-corporate-board-technocapital-allocation.pdf">Corporate Board (PDF)</a>
|
|
||||||
<a class="btn" data-route="m7-pdf" href="/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf">M7+ Nucleation (PDF)</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Card 5: Master Ingglish AQ Archive, Calculator & 4-Gate CI Corpus -->
|
|
||||||
<section class="card">
|
|
||||||
<div class="card-top">
|
|
||||||
<span class="card-tag" style="color:var(--violet)">05 // Bidirectional Base-36 AQ & CMUdict Corpus</span>
|
|
||||||
<h2>Haiperdohp-Jemaytreeah Calculator, Archive & CI</h2>
|
|
||||||
<p>Browser-based multi-cipher AQ calculator workbench (haiperdohp-jemaytreeah), 70 verified cross-scale (333 / 666 / 777) dossiers, 4,897 offline CMUdict mappings, and 4-Gate CI audit artifacts.</p>
|
|
||||||
<div class="stat-row">
|
|
||||||
<span class="stat">Dossiers 01–70</span>
|
|
||||||
<span class="stat">100.0% 4-Gate CI Keep Rate</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
|
||||||
<a class="btn primary" data-route="calc-app" href="/calc/index.html">Open AQ Calculator</a>
|
|
||||||
<a class="btn" data-route="ci-onboarding" href="/ci/ONBOARDING-INGGLISH-AQ.pdf">Onboarding & CI Guide (PDF)</a>
|
|
||||||
<a class="btn" data-route="ci-audit" href="/ci/ci-audit-report.json">4-Gate CI Audit JSON</a>
|
|
||||||
<a class="btn" data-route="arch-index" href="/archive/00-index-and-methodology.md">Archive Index (00–70)</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Card 6: Cross-Repository Dependency & VPS Ops -->
|
|
||||||
<section class="card">
|
|
||||||
<div class="card-top">
|
|
||||||
<span class="card-tag" style="color:var(--rose)">06 // System Topology & Auditable Pipeline</span>
|
|
||||||
<h2>Cross-Repo Dependency Flow & VPS Deployment Architecture</h2>
|
|
||||||
<p>Three-stage auditable BUILD → TEST → STAGE_COMMIT dependency graph across hyperstitionstudio-core, ingglish-hyperdope-gematria, technocapital-singularity-zoology, and encyclopedia-knowledge-graph.</p>
|
|
||||||
<div class="stat-row">
|
|
||||||
<span class="stat">6-Gate CI Verifier</span>
|
|
||||||
<span class="stat">RAM-Backed HTTP/3 + Brotli-11</span>
|
|
||||||
</div>
|
|
||||||
</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="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 & Git Guide (PDF)</a>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>hyperstitionstud.io • Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.0.23) • Zero External Network Dependencies</div>
|
<div>hyperstitionstud.io • Powered by hyperstitionstudio-core (hyperstitionstud_io.* / urn:io:hyperstitionstud v2.17.1) • 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;">♥</span> by Lemurs.</div>
|
<div class="hs-lemur-credit" style="margin-top:0.35rem;color:var(--text-muted);font-size:0.75rem;"><span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" role="img" aria-label="love" style="color:var(--rose);display:inline-block;padding:0 2px;">♥</span> by Lemurs.</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="assets/hs-matrix-coderain.js?v=2.17.1" defer></script>
|
||||||
<script>
|
<script>
|
||||||
// Automatic offline file:// relative-path adaptation when opened directly from hyperstitionstudio-core/site/index.html
|
// Automatic offline file:// relative-path adaptation when opened directly from hyperstitionstudio-core/site/index.html
|
||||||
(function() {
|
(function() {
|
||||||
if (window.location.protocol !== "file:") return;
|
|
||||||
const map = {
|
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",
|
|
||||||
"enc-vol00": "../../technocapital-singularity-zoology/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf",
|
|
||||||
"enc-overview": "../../technocapital-singularity-zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
|
|
||||||
"glossary-pdf": "../../technocapital-singularity-zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf",
|
|
||||||
"tier-png": "../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.png",
|
|
||||||
"tier-pdf": "../../technocapital-singularity-zoology/tier-list-technocapital-assemblage-builds.pdf",
|
|
||||||
"radar-spec": "../../encyclopedia-knowledge-graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf",
|
|
||||||
"prop-fund": "../../technocapital-singularity-zoology/proposal-fund-manager-novel-investment-discovery.pdf",
|
|
||||||
"prop-board": "../../technocapital-singularity-zoology/proposal-corporate-board-technocapital-allocation.pdf",
|
|
||||||
"m7-pdf": "../../technocapital-singularity-zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
|
|
||||||
"calc-app": "../../haiperdohp-jemaytreeah/index.html",
|
"calc-app": "../../haiperdohp-jemaytreeah/index.html",
|
||||||
"ci-onboarding": "../../hyperdope-ci-build/ONBOARDING-INGGLISH-AQ.pdf",
|
"quant-app": "./quant/index.html",
|
||||||
"ci-audit": "../../hyperdope-ci-build/ci-audit-report.json",
|
"quant-dose": "./quant/index.html?screen=dose-d3",
|
||||||
"arch-index": "../../ingglish-hyperdope-gematria/ingglish-aq-archive/00-index-and-methodology.md",
|
"graph-index": "../../encyclopedia-knowledge-graph/index.html",
|
||||||
"schemas-v1": "../schemas/v1/encyclopedia-graph.schema.json",
|
"graph-syzygy": "../../encyclopedia-knowledge-graph/index.html?filter=syzygy",
|
||||||
"dep-html": "../../encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.html",
|
"learn-track": "./learn/index.html",
|
||||||
"dep-pdf": "../../encyclopedia-knowledge-graph/docs/cross-repo-dependency-and-audit-flow-diagram.pdf",
|
"eng-hub": "./engineering/index.html",
|
||||||
"vps-guide": "../../encyclopedia-knowledge-graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf"
|
"eng-probe": "./engineering/mcp-chatbot-rest-and-ipld/index.html#live-smoke-probe",
|
||||||
|
"math-hub": "./math/index.html",
|
||||||
|
"math-trace": "./math/index.html?repl=trace",
|
||||||
|
"ci-hub": "../../hyperdope-ci-build/index.html",
|
||||||
|
"donate-page": "./donate/index.html"
|
||||||
};
|
};
|
||||||
document.querySelectorAll("[data-route]").forEach(function(a) {
|
if (window.location.protocol === "file:") {
|
||||||
|
document.querySelectorAll("a[data-route]").forEach(a => {
|
||||||
const key = a.getAttribute("data-route");
|
const key = a.getAttribute("data-route");
|
||||||
if (map[key]) a.setAttribute("href", map[key]);
|
if (map[key]) a.setAttribute("href", map[key]);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
function syncActiveTabToViewport(strip, btn) {
|
||||||
|
const card = strip.closest(".card");
|
||||||
|
if (!card || !btn) return;
|
||||||
|
const img = card.querySelector(".closeup-viewport img");
|
||||||
|
const link = card.querySelector(".closeup-viewport");
|
||||||
|
const barLabel = card.querySelector(".closeup-bar-label");
|
||||||
|
const barCta = card.querySelector(".closeup-bar-cta");
|
||||||
|
if (img && btn.dataset.closeupSrc) img.src = btn.dataset.closeupSrc;
|
||||||
|
if (img && btn.dataset.closeupAlt) img.alt = btn.dataset.closeupAlt;
|
||||||
|
const routeKey = btn.dataset.closeupRoute || "";
|
||||||
|
const targetHref = (window.location.protocol === "file:" && map[routeKey]) ? map[routeKey] : (btn.dataset.closeupHref || "#");
|
||||||
|
if (link) link.href = targetHref;
|
||||||
|
if (barCta && btn.dataset.closeupCta) barCta.textContent = btn.dataset.closeupCta;
|
||||||
|
if (barLabel && btn.dataset.closeupLabel) barLabel.textContent = btn.dataset.closeupLabel;
|
||||||
|
}
|
||||||
|
document.querySelectorAll(".closeup-tab-strip").forEach(function (strip) {
|
||||||
|
const initBtn = strip.querySelector('.closeup-tab-btn[aria-selected="true"]');
|
||||||
|
if (initBtn) syncActiveTabToViewport(strip, initBtn);
|
||||||
|
strip.addEventListener("click", function (ev) {
|
||||||
|
const btn = ev.target.closest(".closeup-tab-btn");
|
||||||
|
if (!btn) return;
|
||||||
|
strip.querySelectorAll(".closeup-tab-btn").forEach(function (b) {
|
||||||
|
b.setAttribute("aria-selected", b === btn ? "true" : "false");
|
||||||
|
});
|
||||||
|
syncActiveTabToViewport(strip, btn);
|
||||||
|
});
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
<script src="assets/hs-mobile-ui.js?v=2.17.1" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -4,12 +4,13 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Self-Paced Learning Track — hyperstitionstud.io (Base-36 AQ, Ingglish & Technocapital Zoology)</title>
|
<title>Self-Paced Learning Track — hyperstitionstud.io (Base-36 AQ, Ingglish & Technocapital Zoology)</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.1" />
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-canvas: #020617;
|
--bg-canvas: #020617;
|
||||||
--bg-panel: #0f172a;
|
--bg-panel: #0c1324;
|
||||||
--bg-card: #1e293b;
|
--bg-card: #0c1324;
|
||||||
--border: #334155;
|
--border: #26344d;
|
||||||
--text-main: #f8fafc;
|
--text-main: #f8fafc;
|
||||||
--text-muted: #94a3b8;
|
--text-muted: #94a3b8;
|
||||||
--cyan: #22d3ee;
|
--cyan: #22d3ee;
|
||||||
@@ -34,59 +35,28 @@
|
|||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-left: 4px solid var(--emerald);
|
border-left: 4px solid var(--emerald);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1.2rem 1.5rem;
|
padding: 1.1rem 1.35rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1.15rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
gap: 1rem;
|
gap: 0.85rem;
|
||||||
}
|
}
|
||||||
h1 { font-size: 1.25rem; font-weight: 700; }
|
@media (max-width: 1220px) {
|
||||||
.subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
|
header { flex-wrap: wrap; }
|
||||||
.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;
|
|
||||||
}
|
}
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-muted); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; justify-content: flex-end; }
|
||||||
.btn {
|
.btn {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 0.45rem 0.8rem;
|
padding: 0.34rem 0.62rem;
|
||||||
font-size: 0.74rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
@@ -244,16 +214,22 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--emerald);box-shadow:0 0 10px var(--emerald);" aria-hidden="true"></span>
|
||||||
<h1>SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO</h1>
|
<h1>SELF-PACED INTERACTIVE LEARNING TRACK // HYPERSTITIONSTUD.IO</h1>
|
||||||
<p class="subtitle">From Base-36 Alphanumeric Qabbala & CMUdict Ingglish to Technocapital Singularity Zoology • 100% Anonymous Local State Save & Load</p>
|
|
||||||
</div>
|
</div>
|
||||||
<nav class="top-nav">
|
<p class="subtitle">From Base-36 Alphanumeric Qabbala & CMUdict Ingglish to Technocapital Singularity Zoology • 100% Anonymous Local State Save & Load <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
<a class="btn" data-learn-route="nav-home" href="../index.html">← Portal Home</a>
|
</div>
|
||||||
<a class="btn" data-learn-route="nav-quant" href="/quant/index.html">Time-Series (/quant/)</a>
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
<a class="btn" data-learn-route="nav-graph" href="/graph/index.html">Knowledge Graph</a>
|
<a class="btn" data-learn-route="nav-home" href="../index.html">Portal Home (/)</a>
|
||||||
<a class="btn" data-learn-route="nav-calc" href="/calc/index.html">AQ Calculator</a>
|
<a class="btn" data-learn-route="nav-calc" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" data-learn-route="nav-quant" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" data-learn-route="nav-graph" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn primary" data-learn-route="nav-learn" aria-current="page" href="/learn/index.html">Learn</a>
|
||||||
|
<a class="btn" data-learn-route="nav-eng" href="/engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" data-learn-route="nav-math" href="/math/index.html">Math</a>
|
||||||
<span class="nav-donate-sep" aria-hidden="true"></span>
|
<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 & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
<a class="btn-donate-pill" data-learn-route="nav-donate" href="/donate/index.html?from=learn" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -283,7 +259,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<main class="modules-grid">
|
<main class="modules-grid">
|
||||||
<!-- MODULE M01 -->
|
<!-- MODULE LEARN-M01.CABBALA -->
|
||||||
<article class="module-card" id="card-M01">
|
<article class="module-card" id="card-M01">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -304,7 +280,7 @@
|
|||||||
<textarea class="note-area" id="note-M01" placeholder="Personal field notes for Module M01 (auto-saved locally & exported in your .json state file)..."></textarea>
|
<textarea class="note-area" id="note-M01" placeholder="Personal field notes for Module M01 (auto-saved locally & exported in your .json state file)..."></textarea>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- MODULE M02 -->
|
<!-- MODULE LEARN-M02.PARASITE -->
|
||||||
<article class="module-card" id="card-M02">
|
<article class="module-card" id="card-M02">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -335,7 +311,7 @@
|
|||||||
<textarea class="note-area" id="note-M02" placeholder="Personal field notes for Module M02..."></textarea>
|
<textarea class="note-area" id="note-M02" placeholder="Personal field notes for Module M02..."></textarea>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- MODULE M03 -->
|
<!-- MODULE LEARN-M03.SERIES -->
|
||||||
<article class="module-card" id="card-M03">
|
<article class="module-card" id="card-M03">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -363,7 +339,7 @@
|
|||||||
<textarea class="note-area" id="note-M03" placeholder="Personal field notes for Module M03..."></textarea>
|
<textarea class="note-area" id="note-M03" placeholder="Personal field notes for Module M03..."></textarea>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- MODULE M04 -->
|
<!-- MODULE LEARN-M04.STRATA -->
|
||||||
<article class="module-card" id="card-M04">
|
<article class="module-card" id="card-M04">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -387,7 +363,7 @@
|
|||||||
<textarea class="note-area" id="note-M04" placeholder="Personal field notes for Module M04..."></textarea>
|
<textarea class="note-area" id="note-M04" placeholder="Personal field notes for Module M04..."></textarea>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- MODULE M05 -->
|
<!-- MODULE LEARN-M05.RHIZOME -->
|
||||||
<article class="module-card" id="card-M05">
|
<article class="module-card" id="card-M05">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -415,7 +391,7 @@
|
|||||||
<textarea class="note-area" id="note-M05" placeholder="Personal field notes for Module M05..."></textarea>
|
<textarea class="note-area" id="note-M05" placeholder="Personal field notes for Module M05..."></textarea>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- MODULE M06 -->
|
<!-- MODULE LEARN-M06.GEOMANCY -->
|
||||||
<article class="module-card" id="card-M06">
|
<article class="module-card" id="card-M06">
|
||||||
<div class="mod-header">
|
<div class="mod-header">
|
||||||
<div>
|
<div>
|
||||||
@@ -440,7 +416,9 @@
|
|||||||
<div class="sandbox-out" id="m06Output"></div>
|
<div class="sandbox-out" id="m06Output"></div>
|
||||||
<div class="sandbox-controls" style="margin-top:0.25rem;">
|
<div class="sandbox-controls" style="margin-top:0.25rem;">
|
||||||
<span style="font-size:0.74rem;color:var(--gold);">Bookmarked AQ Coordinates:</span>
|
<span style="font-size:0.74rem;color:var(--gold);">Bookmarked AQ Coordinates:</span>
|
||||||
|
<input class="inp" id="filterBookmarkInput" type="text" placeholder="Filter saved AQ #..." style="width:140px;" aria-label="Filter bookmarked coordinates" />
|
||||||
<div id="bookmarkedCoordsList" style="display:flex;gap:0.4rem;flex-wrap:wrap;"></div>
|
<div id="bookmarkedCoordsList" style="display:flex;gap:0.4rem;flex-wrap:wrap;"></div>
|
||||||
|
<div id="bookmarkPaginationBar" style="display:none;gap:0.35rem;align-items:center;font-size:0.68rem;"></div>
|
||||||
<input class="inp" id="inputBookmarkCoord" type="number" min="0" max="9999" placeholder="Add AQ # (e.g. 137)" style="width:145px;" />
|
<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>
|
<button class="btn" id="btnAddBookmark" type="button">+ Bookmark</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -450,11 +428,13 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>hyperstitionstud.io/learn • Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.0.23)</div>
|
<div>hyperstitionstud.io/learn • Powered by hyperstitionstudio-core (urn:io:hyperstitionstud:schema:v1:learn-progress-state v2.17.1)</div>
|
||||||
<div class="hs-lemur-credit">Made with <span class="hs-heart" role="img" aria-label="love">♥</span> by Lemurs.</div>
|
<div class="hs-lemur-credit"><span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" role="img" aria-label="love">♥</span> by Lemurs.</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="learn-app.js"></script>
|
<script src="../assets/hs-matrix-coderain.js?v=2.17.1" defer></script>
|
||||||
|
<script src="../assets/hs-mobile-ui.js?v=2.17.1" defer></script>
|
||||||
|
<script src="learn-app.js?v=2.17.1"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* /workspace/hyperstitionstudio-core/site/learn/learn-app.js
|
* /workspace/hyperstitionstudio-core/site/learn/learn-app.js
|
||||||
* Self-Paced 6-Module Interactive Onboarding Track & Anonymous Local State Engine (v2.0.0)
|
* Self-Paced 6-Module Interactive Onboarding Track & Anonymous Local State Engine (v2.0.0)
|
||||||
* Supports:
|
* Supports:
|
||||||
* - 6 interactive micro-sandboxes (M01..M06)
|
* - 6 interactive micro-sandboxes (LEARN-M01.CABBALA..LEARN-M06.GEOMANCY)
|
||||||
* - Automatic localStorage checkpointing ("hs_learn_state_v2")
|
* - Automatic localStorage checkpointing ("hs_learn_state_v2")
|
||||||
* - State Download (.json) with canonical IPLD dag-json (0x0129) SHA-256 & CIDv1 ("baguqeera...")
|
* - 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
|
* - State Upload (.json) via file picker & drag-and-drop with Replace/Merge modes & zero-XSS rendering
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
const base = {
|
const base = {
|
||||||
$schema: "../schemas/v1/learn-progress-state.schema.json",
|
$schema: "../schemas/v1/learn-progress-state.schema.json",
|
||||||
$id: SCHEMA_ID,
|
$id: SCHEMA_ID,
|
||||||
version: "2.0.23",
|
version: "2.17.1",
|
||||||
updated_at_utc: new Date().toISOString(),
|
updated_at_utc: new Date().toISOString(),
|
||||||
preferred_register: "fund_manager",
|
preferred_register: "fund_manager",
|
||||||
completed_modules: [],
|
completed_modules: [],
|
||||||
@@ -477,9 +477,21 @@
|
|||||||
updateM06RegisterView(memoryState.preferred_register);
|
updateM06RegisterView(memoryState.preferred_register);
|
||||||
|
|
||||||
const bmWrap = document.getElementById("bookmarkedCoordsList");
|
const bmWrap = document.getElementById("bookmarkedCoordsList");
|
||||||
|
const bmFilterEl = document.getElementById("filterBookmarkInput");
|
||||||
|
const bmPagBar = document.getElementById("bookmarkPaginationBar");
|
||||||
if (bmWrap) {
|
if (bmWrap) {
|
||||||
bmWrap.innerHTML = "";
|
bmWrap.innerHTML = "";
|
||||||
memoryState.bookmarked_coordinates.forEach(c => {
|
const bq = bmFilterEl ? (bmFilterEl.value || "").trim() : "";
|
||||||
|
const allBm = memoryState.bookmarked_coordinates || [];
|
||||||
|
const filteredBm = !bq ? allBm : allBm.filter(c => String(c).includes(bq));
|
||||||
|
const bmPageSize = 20;
|
||||||
|
const bmTotalPages = Math.max(1, Math.ceil(filteredBm.length / bmPageSize));
|
||||||
|
if (typeof window.__hsLearnBmPage !== "number" || window.__hsLearnBmPage >= bmTotalPages) {
|
||||||
|
window.__hsLearnBmPage = 0;
|
||||||
|
}
|
||||||
|
const bmStart = window.__hsLearnBmPage * bmPageSize;
|
||||||
|
const bmSlice = filteredBm.slice(bmStart, bmStart + bmPageSize);
|
||||||
|
bmSlice.forEach(c => {
|
||||||
const pill = document.createElement("span");
|
const pill = document.createElement("span");
|
||||||
pill.className = "coord-pill";
|
pill.className = "coord-pill";
|
||||||
pill.textContent = `AQ ${c} ×`;
|
pill.textContent = `AQ ${c} ×`;
|
||||||
@@ -490,6 +502,22 @@
|
|||||||
});
|
});
|
||||||
bmWrap.appendChild(pill);
|
bmWrap.appendChild(pill);
|
||||||
});
|
});
|
||||||
|
if (bmPagBar) {
|
||||||
|
if (filteredBm.length <= bmPageSize) {
|
||||||
|
bmPagBar.style.display = "none";
|
||||||
|
bmPagBar.innerHTML = "";
|
||||||
|
} else {
|
||||||
|
bmPagBar.style.display = "inline-flex";
|
||||||
|
bmPagBar.innerHTML =
|
||||||
|
`<button type="button" class="btn" id="bmPrevBtn">←</button>` +
|
||||||
|
`<span style="color:var(--gold);">${window.__hsLearnBmPage + 1}/${bmTotalPages} (${filteredBm.length})</span>` +
|
||||||
|
`<button type="button" class="btn" id="bmNextBtn">→</button>`;
|
||||||
|
const pB = document.getElementById("bmPrevBtn");
|
||||||
|
const nB = document.getElementById("bmNextBtn");
|
||||||
|
if (pB) pB.onclick = () => { window.__hsLearnBmPage = Math.max(0, window.__hsLearnBmPage - 1); renderAll(); };
|
||||||
|
if (nB) nB.onclick = () => { window.__hsLearnBmPage = Math.min(bmTotalPages - 1, window.__hsLearnBmPage + 1); renderAll(); };
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusMsg) setStatus(statusMsg, false);
|
if (statusMsg) setStatus(statusMsg, false);
|
||||||
@@ -701,6 +729,13 @@
|
|||||||
if (rstBtn) rstBtn.addEventListener("click", resetLearnState);
|
if (rstBtn) rstBtn.addEventListener("click", resetLearnState);
|
||||||
|
|
||||||
const addBmBtn = document.getElementById("btnAddBookmark");
|
const addBmBtn = document.getElementById("btnAddBookmark");
|
||||||
|
const bmFilterInput = document.getElementById("filterBookmarkInput");
|
||||||
|
if (bmFilterInput) {
|
||||||
|
bmFilterInput.addEventListener("input", () => {
|
||||||
|
window.__hsLearnBmPage = 0;
|
||||||
|
renderAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
if (addBmBtn) {
|
if (addBmBtn) {
|
||||||
addBmBtn.addEventListener("click", () => {
|
addBmBtn.addEventListener("click", () => {
|
||||||
const inp = document.getElementById("inputBookmarkCoord");
|
const inp = document.getElementById("inputBookmarkCoord");
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n) — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge M1 • Non-Sequentially Revertible via <code>hs-math-docs --disable base36-algebra-and-primes</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html" style="">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html" style="">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)</li><li>Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)</li><li>Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../../learn/index.html" style="color:var(--cyan);">Internal: /learn/ Module 1 (Base-36 Valuation Table) ↗</a></li><li><a href="https://www.khanacademy.org/computing/computer-science/cryptography" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Khan Academy — Cryptography & Modular Arithmetic ↗</a></li><li><a href="https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory) ↗</a></li><li><a href="https://www.3blue1brown.com/topics/number-theory" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Prime Numbers & Number Theory Visualized ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M1): Base-36 Semiring Valuation, Mod-9 Root & Prime Factorization</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>666 = 2 × 3² × 37, 777 = 3 × 7 × 37, dr_9(n) = 1 + ((n - 1) mod 9)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">compute_aq('envideea') == 137 # 33rd prime</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(prime-factors 666)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(prime-factors 666)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="primeFactors(666)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">primeFactors(666)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="prime_factors(666_u64)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">prime_factors(666_u64)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Factor 666 or 777 across Guile Scheme, TypeScript, and Rust in the 4-Ring Hardened REPL.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Repdigit 37 × 3k Attractors & Prime Index π(n)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193).</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../index.html">← Back to Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html">Next: M2: Phonemic Φ & G1-G6 →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math/base36-algebra-and-primes v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge M3 • Non-Sequentially Revertible via <code>hs-math-docs --disable graph-topology-and-eti-scoring</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="../base36-algebra-and-primes/index.html" style="">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html" style="">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Directed multigraphs G = (V, E), k-partite vertex partitions, and vertex degree deg(v)</li><li>Vectors in R^6, inner products w · s, and convex combinations (∑ w_k = 1, w_k ≥ 0)</li><li>Lexicographic total orderings and invertible affine rescaling maps</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.3blue1brown.com/topics/linear-algebra" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Essence of Linear Algebra (Vectors & Dot Products) ↗</a></li><li><a href="https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 6.042J Mathematics for Computer Science (Ch. 9-11 Graph Theory) ↗</a></li><li><a href="https://diestel-graph-theory.com/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Diestel — Graph Theory (Free Electronic Edition, Ch. 1 Basics) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M3): Convex ETI Functional (∑ w_k = 1, S1 Apex = 93.08)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>ETI = (1/5)CAP + (9/50)COL + (9/50)ARM + (4/25)PRM + (7/50)VEL + (7/50)RES</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">0.20*cap + 0.18*col + 0.18*arm + 0.16*prm + 0.14*vel + 0.14*res</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(+ 1/5 9/50 9/50 4/25 7/50 7/50)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(+ 1/5 9/50 9/50 4/25 7/50 7/50)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="etiScore({cap: 95, col: 92, arm: 94, prm: 90, vel: 91, res: 96})" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">etiScore({cap: 95, col: 92, arm: 94, prm: 90, vel: 91, res: 96})</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="eti_score(95.0, 92.0, 94.0, 90.0, 91.0, 96.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">eti_score(95.0, 92.0, 94.0, 90.0, 91.0, 96.0)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Verify the convex weights and composite ETI score across Guile, TypeScript, and Rust.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Six-Partite Property Graph G = (V, E, R) & Hub Degree Centrality</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Convex Ecological Trophic Index (ETI) Functional in [0, 100]</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Each specimen i has a 6-dimensional structural vector s_i = (ARM_i, VEL_i, COL_i, CAP_i, PRM_i, RES_i) ∈ [0, 100]^6. The composite score is the convex inner product ETI_i = 0.20·CAP_i + 0.18·COL_i + 0.18·ARM_i + 0.16·PRM_i + 0.14·VEL_i + 0.14·RES_i where ∑_{k=1}^6 w_k = 1.00, guaranteeing ETI_i ∈ [0, 100]. LENS_REGISTRY applies bijective key/scale projections without mutating s_i.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html">← Prev: M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html">Next: M4: Time-Series & Dose Math →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math/graph-topology-and-eti-scoring v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Mathematical Foundations & Quantitative Semiotics Hub — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0.85rem; margin-bottom: 0.9rem; }
|
||||||
|
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
|
||||||
|
.stat-tile { padding: 0.7rem 0.85rem; text-align: center; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>HYPERSTITION STUDIO // MATHEMATICAL FOUNDATIONS & QUANTITATIVE SEMIOTICS HUB (UNIT M0)</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Zero-CDN Native Unicode Math • Commutative Empirical Introspection • Piecewise & Non-Sequentially Revertible • urn:io:hyperstitionstud:math:v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="base36-algebra-and-primes/index.html" style="">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="phonemic-projections-and-g-vectors/index.html" style="">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="graph-topology-and-eti-scoring/index.html" style="">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Variables, functions f(x), and subscript/index notation x_i</li><li>Summation operator ∑_{i=1}^n x_i and absolute value |x|</li><li>Self-Paced Learning Track (/learn/ Modules 1-2)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="../learn/index.html" style="color:var(--cyan);">Internal: Self-Paced Learning Track (/learn/ Modules 1-2) ↗</a></li><li><a href="https://www.khanacademy.org/math/algebra" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Khan Academy — Algebra & Summation (Σ) Notation ↗</a></li><li><a href="https://openstax.org/details/books/precalculus-2e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9) ↗</a></li><li><a href="https://sarabander.github.io/sicp/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Structure and Interpretation of Computer Programs (SICP — Free MIT Text) ↗</a></li><li><a href="https://www.gnu.org/software/guile/manual/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">GNU Guile Scheme Official Reference Manual ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M0): Applicative-Order Z Combinator, TypeScript Array.reduce & Rust Range.fold</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>Z = λf. (λx. f (λv. (x x) v)) (λx. f (λv. (x x) v)), ∑_{i=1}^{10} i = 55</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);"># Strict applicative-order fixed-point combinator (z-calculus-scheme)
|
||||||
|
Z = lambda f: (lambda x: f(lambda *a: x(x)(*a)))(lambda x: f(lambda *a: x(x)(*a)))</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((Z (lambda (recur) (lambda (n acc) (if (<= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">((Z (lambda (recur) (lambda (n acc) (if (<= n 0) acc (recur (- n 1) (+ acc n)))))) 10 0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="Array.from({length: 10}, (_, i): number => i + 1).reduce((a, b) => a + b, 0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">Array.from({length: 10}, (_, i): number => i + 1).reduce((a, b) => a + b, 0)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="(1..=10_i64).fold(0_i64, |acc, x| acc + x)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">(1..=10_i64).fold(0_i64, |acc, x| acc + x)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare how Scheme's anonymous Z-combinator, TypeScript's reduce, and Rust's fold compute ∑_{i=1}^{10} i = 55.</div></section>
|
||||||
|
|
||||||
|
<section class="stats-row">
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">ETI Convex Sum (∑w_k)</div><div style="font-size:1.3rem;font-weight:700;color:var(--gold);">1.00</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Bayesian Simplex (∑P_m)</div><div style="font-size:1.3rem;font-weight:700;color:var(--cyan);">1.0000</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">292 G1 Collapse (σ²_0 → σ²_1)</div><div style="font-size:1.2rem;font-weight:700;color:var(--emerald);">310.22 → 0.0</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">G4 Fixed Points (Δ=0)</div><div style="font-size:1.3rem;font-weight:700;color:var(--gold);">21</div></div>
|
||||||
|
<div class="panel hs-plate-g3 stat-tile"><div style="font-size:0.68rem;color:var(--text-secondary);">Real Bars / FRED Series</div><div style="font-size:1.3rem;font-weight:700;color:var(--cyan);">472 / 14</div></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="grid-cards">
|
||||||
|
<article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">☿</span>M1 // Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2).</p></div><div><a class="btn" href="base36-algebra-and-primes/index.html">Open M1: Base-36 & Primes Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">∆ ◈</span>M2 // Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89).</p></div><div><a class="btn" href="phonemic-projections-and-g-vectors/index.html">Open M2: Phonemic Φ & G1-G6 Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-gold" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">☉</span>M3 // Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52).</p></div><div><a class="btn" href="graph-topology-and-eti-scoring/index.html">Open M3: Graph & ETI Math Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-emerald" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">♄ ☍</span>M4 // Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}</h2><p style="font-size:0.74rem;color:var(--text-secondary);line-height:1.5;">For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias.</p></div><div><a class="btn" href="timeseries-moments-and-confluence-dose/index.html">Open M4: Time-Series & Dose Math Subpage →</a></div></article><article class="panel hs-plate-g3 plate-lock-rose" style="padding:1rem 1.15rem;display:flex;flex-direction:column;justify-content:space-between;gap:0.6rem;"><div><div style="font-size:0.7rem;color:var(--gold);font-weight:700;"><span class="hs-sigil" aria-hidden="true">⊗ λ</span>M5 // Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)</div><h2 style="font-size:0.95rem;margin:0.25rem 0;color:var(--text-main);">Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds</Line truncated
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math v2.17.0 • CIDv1: <code>baguqeerawoxbn5nceunfl7ndrduowkfboz5...</code> • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge M5 • Non-Sequentially Revertible via <code>hs-math-docs --disable macro-spreads-and-bayesian-inference</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="../base36-algebra-and-primes/index.html" style="">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html" style="">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html" style="">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Conditional probability P(A | B) and Bayes' Theorem on the 3-state simplex Δ²</li><li>Multiple-hypothesis testing, Birthday Problem collision rates, and degrees of freedom df = n - 2</li><li>Equation of Exchange MV = PQ (V_M2 = GDP / M2), term structure slopes, and real deflation</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://www.3blue1brown.com/lessons/bayes-theorem" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">3Blue1Brown — Bayes' Theorem, The Geometry of Changing Beliefs ↗</a></li><li><a href="https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">MIT 18.05 Introduction to Probability & Statistics (Bayesian Updating) ↗</a></li><li><a href="https://openstax.org/details/books/principles-macroeconomics-3e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Principles of Macroeconomics (Ch. 14-15 Money & Monetary Policy) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M5): 3-State Discrete Bayesian Posterior & Adaptive Simpson Quadrature</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>P(R_m | E_t) = L_m P_m / ∑_k L_k P_k, ∫_a^b f(x) dx via Simpson Z-subdivision</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">post = [p * l / z for p, l in zip(priors, likelihoods)]</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(bayes-update '(1/3 1/3 1/3) '(1/10 3/10 6/10))</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="bayesUpdate([1/3, 1/3, 1/3], [0.1, 0.3, 0.6])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">bayesUpdate([1/3, 1/3, 1/3], [0.1, 0.3, 0.6])</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="bayes_update(&[1.0/3.0; 3], &[0.1, 0.3, 0.6])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">bayes_update(&[1.0/3.0; 3], &[0.1, 0.3, 0.6])</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare Guile's exact rational '(1/10 3/10 3/5) with TypeScript and Rust array posteriors.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Macroeconomic Spread & Velocity Identities (FRED Native Cadences)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">From real FRED observations: Non-M1 Time-Deposit Spread = M2SL - M1SL = $3,365.9B ($3.37T → 337 [68th Prime]); Liquidity Ratio = M1SL / M2SL = 85.70%; Monetary Velocity V_M2 = GDP / M2SL = 1.405x; Overnight Repo Spread = SOFR - EFFR = +10 bps (EFFR = 388 bps == 388 KG nodes); Term Slope = DGS10 - EFFR = +97 bps ('naintee sevan' = 237); Pipeline Margin = ΔPPI_MoM - ΔCPI_MoM = -54 bps.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Discrete 3-State Bayesian Updating & 'The Room Filter' Collision Bound</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Given extant priors P_{t-1}(R_m) over R = {R1 Bull, R2 Pinned Isometric, R3 Tail Drawdown} with ∑ P_{t-1}(R_m) = 1, the posterior is P_t(R_m | E_t) = L(E_t | R_m)·P_{t-1}(R_m) / ∑_{k=1}^3 L(E_t | R_k)·P_{t-1}(R_k). Testing 6 numerical encodings against 30 S1-S6 ring coordinates yields an uncoupled single-gate hit rate near Dose 1's observed 16.6% ('Grand Central Station' noise), whereas requiring joint intersection with that exact UTC date's 00:00 GMT dossier coordinates ('The Room Filter', Dose 2/3+) squares the filter selectivity.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html">← Prev: M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="../index.html">Return to Math Hub (M0) ↑</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math/macro-spreads-and-bayesian-inference v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(function(){ 'use strict'; })();
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
window.HYPERSTITION_MATH_MANIFEST = {"$id": "urn:io:hyperstitionstud:math-manifest", "version": "2.17.0", "enabled_subpages": ["base36-algebra-and-primes", "phonemic-projections-and-g-vectors", "graph-topology-and-eti-scoring", "timeseries-moments-and-confluence-dose", "macro-spreads-and-bayesian-inference"], "disabled_subpages": [], "enabled_routes": ["/math/index.html", "/math/base36-algebra-and-primes/index.html", "/math/phonemic-projections-and-g-vectors/index.html", "/math/graph-topology-and-eti-scoring/index.html", "/math/timeseries-moments-and-confluence-dose/index.html", "/math/macro-spreads-and-bayesian-inference/index.html"], "algebraic_invariants": {"eti_weights": [0.2, 0.18, 0.18, 0.16, 0.14, 0.14], "eti_weights_sum": 1.0, "bayesian_posterior_simplex_sum": 1.0, "cluster_292_gen0_variance": 310.22, "cluster_292_gen1_variance": 0.0, "g4_isometric_fixed_point_count": 21, "g3_quantized_steps": [0, 1, 10, 18, 20, 36, 37, 40, 74], "repdigit_37_attractors": [111, 222, 333, 444, 555, 666, 777, 888, 999]}, "empirical_counts": {"glossary_entries": 282, "bilingual_specimens": 190, "kg_nodes": 388, "kg_edges": 1282, "total_real_bars_n": 472, "fred_macro_series_n": 14}, "hub_prereq_ladder": {"unit_id": "M0", "expertise_level": "Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)", "links": [{"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-2)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Algebra & Summation (Σ) Notation", "url": "https://www.khanacademy.org/math/algebra", "external": true}, {"label": "OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9)", "url": "https://openstax.org/details/books/precalculus-2e", "external": true}, {"label": "Structure and Interpretation of Computer Programs (SICP — Free MIT Text)", "url": "https://sarabander.github.io/sicp/", "external": true}, {"label": "GNU Guile Scheme Official Reference Manual", "url": "https://www.gnu.org/software/guile/manual/", "external": true}]}, "subpages": {"base36-algebra-and-primes": {"unit_id": "M1", "slug": "base36-algebra-and-primes", "title": "Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)", "short_title": "M1: Base-36 & Primes", "pip_class": "plate-lock-gold", "expertise_level": "Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)", "prerequisites": ["Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)", "Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)", "Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids"], "public_resources": [{"label": "Internal: /learn/ Module 1 (Base-36 Valuation Table)", "url": "/learn/index.html", "external": false}, {"label": "Khan Academy — Cryptography & Modular Arithmetic", "url": "https://www.khanacademy.org/computing/computer-science/cryptography", "external": true}, {"label": "MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory)", "url": "https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/", "external": true}, {"label": "3Blue1Brown — Prime Numbers & Number Theory Visualized", "url": "https://www.3blue1brown.com/topics/number-theory", "external": true}], "sections": [{"heading": "1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}", "body": "For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2)."}, {"heading": "2. Repdigit 37 × 3k Attractors & Prime Index π(n)", "body": "Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193)."}]}, "phonemic-projections-and-g-vectors": {"unit_id": "M2", "slug": "phonemic-projections-and-g-vectors", "title": "Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6", "short_title": "M2: Phonemic Φ & G1-G6", "pip_class": "plate-lock-emerald", "expertise_level": "Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)", "prerequisites": ["Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w", "Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²", "How non-injective projection onto shared phonemic attractors collapses set variance"], "public_resources": [{"label": "OpenStax Introductory Statistics (Ch. 2 Mean & Variance)", "url": "https://openstax.org/details/books/introductory-statistics-2e", "external": true}, {"label": "StatQuest with Josh Starmer — Variance & Standard Deviation", "urlLine truncated
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
{
|
||||||
|
"$id": "urn:io:hyperstitionstud:math-manifest",
|
||||||
|
"version": "2.17.0",
|
||||||
|
"enabled_subpages": [
|
||||||
|
"base36-algebra-and-primes",
|
||||||
|
"phonemic-projections-and-g-vectors",
|
||||||
|
"graph-topology-and-eti-scoring",
|
||||||
|
"timeseries-moments-and-confluence-dose",
|
||||||
|
"macro-spreads-and-bayesian-inference"
|
||||||
|
],
|
||||||
|
"disabled_subpages": [],
|
||||||
|
"enabled_routes": [
|
||||||
|
"/math/index.html",
|
||||||
|
"/math/base36-algebra-and-primes/index.html",
|
||||||
|
"/math/phonemic-projections-and-g-vectors/index.html",
|
||||||
|
"/math/graph-topology-and-eti-scoring/index.html",
|
||||||
|
"/math/timeseries-moments-and-confluence-dose/index.html",
|
||||||
|
"/math/macro-spreads-and-bayesian-inference/index.html"
|
||||||
|
],
|
||||||
|
"algebraic_invariants": {
|
||||||
|
"eti_weights": [
|
||||||
|
0.2,
|
||||||
|
0.18,
|
||||||
|
0.18,
|
||||||
|
0.16,
|
||||||
|
0.14,
|
||||||
|
0.14
|
||||||
|
],
|
||||||
|
"eti_weights_sum": 1.0,
|
||||||
|
"bayesian_posterior_simplex_sum": 1.0,
|
||||||
|
"cluster_292_gen0_variance": 310.22,
|
||||||
|
"cluster_292_gen1_variance": 0.0,
|
||||||
|
"g4_isometric_fixed_point_count": 21,
|
||||||
|
"g3_quantized_steps": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
10,
|
||||||
|
18,
|
||||||
|
20,
|
||||||
|
36,
|
||||||
|
37,
|
||||||
|
40,
|
||||||
|
74
|
||||||
|
],
|
||||||
|
"repdigit_37_attractors": [
|
||||||
|
111,
|
||||||
|
222,
|
||||||
|
333,
|
||||||
|
444,
|
||||||
|
555,
|
||||||
|
666,
|
||||||
|
777,
|
||||||
|
888,
|
||||||
|
999
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"empirical_counts": {
|
||||||
|
"glossary_entries": 282,
|
||||||
|
"bilingual_specimens": 190,
|
||||||
|
"kg_nodes": 388,
|
||||||
|
"kg_edges": 1282,
|
||||||
|
"total_real_bars_n": 472,
|
||||||
|
"fred_macro_series_n": 14
|
||||||
|
},
|
||||||
|
"hub_prereq_ladder": {
|
||||||
|
"unit_id": "M0",
|
||||||
|
"expertise_level": "Level 1-2 (High-School Algebra & Sigma Notation • 3-6 hrs study)",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"label": "Internal: Self-Paced Learning Track (/learn/ Modules 1-2)",
|
||||||
|
"url": "/learn/index.html",
|
||||||
|
"external": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Khan Academy — Algebra & Summation (Σ) Notation",
|
||||||
|
"url": "https://www.khanacademy.org/math/algebra",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "OpenStax Precalculus (Free Peer-Reviewed Textbook, Ch. 1 & 9)",
|
||||||
|
"url": "https://openstax.org/details/books/precalculus-2e",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Structure and Interpretation of Computer Programs (SICP — Free MIT Text)",
|
||||||
|
"url": "https://sarabander.github.io/sicp/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "GNU Guile Scheme Official Reference Manual",
|
||||||
|
"url": "https://www.gnu.org/software/guile/manual/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subpages": {
|
||||||
|
"base36-algebra-and-primes": {
|
||||||
|
"unit_id": "M1",
|
||||||
|
"slug": "base36-algebra-and-primes",
|
||||||
|
"title": "Unit M1: Base-36 Alphanumeric Valuation, Repdigit 37×3k Attractors & Prime Index π(n)",
|
||||||
|
"short_title": "M1: Base-36 & Primes",
|
||||||
|
"pip_class": "plate-lock-gold",
|
||||||
|
"expertise_level": "Level 2: Elementary Number Theory & Base Systems (8-12 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Positional numeral systems and non-decimal radices (Base-10 vs. Base-36)",
|
||||||
|
"Fundamental Theorem of Arithmetic (111 = 3 × 37) and prime-counting function π(n)",
|
||||||
|
"Additive string homomorphisms AQ(u · v) = AQ(u) + AQ(v) over character monoids"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "Internal: /learn/ Module 1 (Base-36 Valuation Table)",
|
||||||
|
"url": "/learn/index.html",
|
||||||
|
"external": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Khan Academy — Cryptography & Modular Arithmetic",
|
||||||
|
"url": "https://www.khanacademy.org/computing/computer-science/cryptography",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MIT 6.042J Mathematics for Computer Science (Ch. 8 Number Theory)",
|
||||||
|
"url": "https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "3Blue1Brown — Prime Numbers & Number Theory Visualized",
|
||||||
|
"url": "https://www.3blue1brown.com/topics/number-theory",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. The Base-36 Alphanumeric Homomorphism v: {0..9, A..Z} → {0..35}",
|
||||||
|
"body": "For any character c, v(c) = ord(c) - 48 for digits '0'..'9' (0..9), v(c) = ord(lower(c)) - 87 for ASCII letters 'A'..'Z' (10..35), and v(c) = 0 otherwise. Extended over a string w = c_1...c_k, AQ(w) = ∑_{i=1}^k v(c_i). Under concatenation, AQ(w_1 · w_2) = AQ(w_1) + AQ(w_2)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Repdigit 37 × 3k Attractors & Prime Index π(n)",
|
||||||
|
"body": "Three-digit repdigits R_k = 111 · k = 3 · 37 · k ∈ {111, 222, 333, 444, 555, 666, 777, 888, 999} factor through the prime 37 (12th prime) and 3. For prime coordinates p ∈ P, prime_rank(p) = π(p) = |{q ∈ P : q ≤ p}| (e.g., π(137) = 33 for 'envideea' = 137; π(193) = 44 for 'anthropik' = 'flash krash' = 193)."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"phonemic-projections-and-g-vectors": {
|
||||||
|
"unit_id": "M2",
|
||||||
|
"slug": "phonemic-projections-and-g-vectors",
|
||||||
|
"title": "Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6",
|
||||||
|
"short_title": "M2: Phonemic Φ & G1-G6",
|
||||||
|
"pip_class": "plate-lock-emerald",
|
||||||
|
"expertise_level": "Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w",
|
||||||
|
"Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²",
|
||||||
|
"How non-injective projection onto shared phonemic attractors collapses set variance"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "OpenStax Introductory Statistics (Ch. 2 Mean & Variance)",
|
||||||
|
"url": "https://openstax.org/details/books/introductory-statistics-2e",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "StatQuest with Josh Starmer — Variance & Standard Deviation",
|
||||||
|
"url": "https://statquest.org/video-index/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Book of Proof (Richard Hammack — Free Textbook, Ch. 12 Functions & Fibers)",
|
||||||
|
"url": "https://www.people.vcu.edu/~rhammack/BookOfProof/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Vector G1 Intergenerational Variance Collapse (Δσ²_G1)",
|
||||||
|
"body": "Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Vector G3 Quantized Steps, Vector G4 Isometric Fixed Points (Δ = 0) & Vector G5 Twin Primes",
|
||||||
|
"body": "Define phonemic drift Δ(w) = AQ(Φ(w)) - AQ(w). Vector G4 consists of isometric fixed points where Δ(w) = 0 (21 canonical specimens including 'ASML'=81, 'capital'→'kapatal'=125, 'palantir'→'palanter'=159, 'nineteen'→'nainteen'=137). Vector G3 captures quantized step magnitudes |Δ(w)| ∈ {0, 1, 10, 18, 20, 36, 37, 40, 74}, and Vector G5 captures twin-prime mutations where both AQ(w) ∈ P and AQ(Φ(w)) ∈ P with Δ(w) ≠ 0."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"graph-topology-and-eti-scoring": {
|
||||||
|
"unit_id": "M3",
|
||||||
|
"slug": "graph-topology-and-eti-scoring",
|
||||||
|
"title": "Unit M3: Multi-Relational Property Graph Topology G=(V,E,R), Convex ETI Functional & LENS_REGISTRY",
|
||||||
|
"short_title": "M3: Graph & ETI Math",
|
||||||
|
"pip_class": "plate-lock-gold",
|
||||||
|
"expertise_level": "Level 3: Graph Theory, Convex Linear Combinations & Affine Maps (12-18 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Directed multigraphs G = (V, E), k-partite vertex partitions, and vertex degree deg(v)",
|
||||||
|
"Vectors in R^6, inner products w · s, and convex combinations (∑ w_k = 1, w_k ≥ 0)",
|
||||||
|
"Lexicographic total orderings and invertible affine rescaling maps"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "3Blue1Brown — Essence of Linear Algebra (Vectors & Dot Products)",
|
||||||
|
"url": "https://www.3blue1brown.com/topics/linear-algebra",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MIT 6.042J Mathematics for Computer Science (Ch. 9-11 Graph Theory)",
|
||||||
|
"url": "https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Diestel — Graph Theory (Free Electronic Edition, Ch. 1 Basics)",
|
||||||
|
"url": "https://diestel-graph-theory.com/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Six-Partite Property Graph G = (V, E, R) & Hub Degree Centrality",
|
||||||
|
"body": "The vertex set |V| = 388 is partitioned into 6 disjoint classes (9 Divisions, 22 Volumes, 10 Builds, 92 Operators, 190 Bilingual Specimens, 65 AQCoordinateHubs) linked by |E| = 1,282 typed edges across 10 relations. Hub degree deg(aq:N) peaks at repdigit attractors aq:777 (deg=62), aq:666 (deg=62), and aq:333 (deg=52)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Convex Ecological Trophic Index (ETI) Functional in [0, 100]",
|
||||||
|
"body": "Each specimen i has a 6-dimensional structural vector s_i = (ARM_i, VEL_i, COL_i, CAP_i, PRM_i, RES_i) ∈ [0, 100]^6. The composite score is the convex inner product ETI_i = 0.20·CAP_i + 0.18·COL_i + 0.18·ARM_i + 0.16·PRM_i + 0.14·VEL_i + 0.14·RES_i where ∑_{k=1}^6 w_k = 1.00, guaranteeing ETI_i ∈ [0, 100]. LENS_REGISTRY applies bijective key/scale projections without mutating s_i."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"timeseries-moments-and-confluence-dose": {
|
||||||
|
"unit_id": "M4",
|
||||||
|
"slug": "timeseries-moments-and-confluence-dose",
|
||||||
|
"title": "Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}",
|
||||||
|
"short_title": "M4: Time-Series & Dose Math",
|
||||||
|
"pip_class": "plate-lock-emerald",
|
||||||
|
"expertise_level": "Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Basis-point return arithmetic Δbps_{i,t} = round(((P_t - P_{t-1}) / P_{t-1}) × 10^4)",
|
||||||
|
"Nonparametric order statistics (Median P50, 90th percentile P90) vs. outlier-sensitive means",
|
||||||
|
"Pearson linear correlation r(τ) across lags τ ∈ [-5..+5] and indicator sums ∑ I(A_s)"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "Seeing Theory (Brown University Visual Intro to Probability & Statistics)",
|
||||||
|
"url": "https://seeing-theory.brown.edu/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Penn State STAT 510 Applied Time Series Analysis (Cross-Correlation)",
|
||||||
|
"url": "https://online.stat.psu.edu/stat510/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "NIST/SEMATECH e-Handbook of Statistical Methods (Order Statistics)",
|
||||||
|
"url": "https://www.itl.nist.gov/div898/handbook/",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Four-Species Confluence Dose Indicator Sum D_{i,t} ∈ {0, 1, 2, 3, 4}",
|
||||||
|
"body": "For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Nonparametric Order Statistics (P50, P90) & the Empirical Two-Regime Split",
|
||||||
|
"body": "Because cross-asset returns |Δbps| are heavy-tailed, Median P50 and P90 are the robust estimators: across the 440 real November 2026 bars, Dose 2 (Market Ring × Same-Day Dossier without headline shock, n=34) compresses median displacement by -58% (P50 = 101.0 bps vs. 240.5 bps at Dose 0; P90 = 292 bps vs. 665 bps), whereas Dose 3+ (n=4) triggers a 1.98x volume surge and 377.5 bps next-day continuation."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"macro-spreads-and-bayesian-inference": {
|
||||||
|
"unit_id": "M5",
|
||||||
|
"slug": "macro-spreads-and-bayesian-inference",
|
||||||
|
"title": "Unit M5: Macroeconomic Spread/Velocity Identities, Discrete 3-State Bayes' Rule & Multiple-Testing Bounds",
|
||||||
|
"short_title": "M5: Macro & Bayesian Math",
|
||||||
|
"pip_class": "plate-lock-rose",
|
||||||
|
"expertise_level": "Level 4: Bayesian Inference, Combinatorial Collision Bounds & Macroeconomics (15-25 hrs study)",
|
||||||
|
"prerequisites": [
|
||||||
|
"Conditional probability P(A | B) and Bayes' Theorem on the 3-state simplex Δ²",
|
||||||
|
"Multiple-hypothesis testing, Birthday Problem collision rates, and degrees of freedom df = n - 2",
|
||||||
|
"Equation of Exchange MV = PQ (V_M2 = GDP / M2), term structure slopes, and real deflation"
|
||||||
|
],
|
||||||
|
"public_resources": [
|
||||||
|
{
|
||||||
|
"label": "3Blue1Brown — Bayes' Theorem, The Geometry of Changing Beliefs",
|
||||||
|
"url": "https://www.3blue1brown.com/lessons/bayes-theorem",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MIT 18.05 Introduction to Probability & Statistics (Bayesian Updating)",
|
||||||
|
"url": "https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/",
|
||||||
|
"external": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "OpenStax Principles of Macroeconomics (Ch. 14-15 Money & Monetary Policy)",
|
||||||
|
"url": "https://openstax.org/details/books/principles-macroeconomics-3e",
|
||||||
|
"external": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"heading": "1. Macroeconomic Spread & Velocity Identities (FRED Native Cadences)",
|
||||||
|
"body": "From real FRED observations: Non-M1 Time-Deposit Spread = M2SL - M1SL = $3,365.9B ($3.37T → 337 [68th Prime]); Liquidity Ratio = M1SL / M2SL = 85.70%; Monetary Velocity V_M2 = GDP / M2SL = 1.405x; Overnight Repo Spread = SOFR - EFFR = +10 bps (EFFR = 388 bps == 388 KG nodes); Term Slope = DGS10 - EFFR = +97 bps ('naintee sevan' = 237); Pipeline Margin = ΔPPI_MoM - ΔCPI_MoM = -54 bps."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "2. Discrete 3-State Bayesian Updating & 'The Room Filter' Collision Bound",
|
||||||
|
"body": "Given extant priors P_{t-1}(R_m) over R = {R1 Bull, R2 Pinned Isometric, R3 Tail Drawdown} with ∑ P_{t-1}(R_m) = 1, the posterior is P_t(R_m | E_t) = L(E_t | R_m)·P_{t-1}(R_m) / ∑_{k=1}^3 L(E_t | R_k)·P_{t-1}(R_k). Testing 6 numerical encodings against 30 S1-S6 ring coordinates yields an uncoupled single-gate hit rate near Dose 1's observed 16.6% ('Grand Central Station' noise), whereas requiring joint intersection with that exact UTC date's 00:00 GMT dossier coordinates ('The Room Filter', Dose 2/3+) squares the filter selectivity."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipld_dag_json_cidv1": {
|
||||||
|
"/": "baguqeerawoxbn5nceunfl7ndrduowkfboz5mgqqk425t6zzvhrc2yvuxrf6q"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6 — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit M2: Phonemic Projection Φ: Σ_eng* → Σ_ing* & Genealogical Vectors G1–G6</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge M2 • Non-Sequentially Revertible via <code>hs-math-docs --disable phonemic-projections-and-g-vectors</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="../base36-algebra-and-primes/index.html" style="">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html" style="">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="../timeseries-moments-and-confluence-dose/index.html" style="">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 2-3: Set Mappings, Equivalence Fibers & Descriptive Statistics (8-12 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Surjective mappings Φ: A → B, equivalence kernels ker(AQ ∘ Φ), and fixed points Φ(w) = w</li><li>Population mean μ = (1/N)∑ x_i and population variance σ²(X) = (1/N)∑(x_i - μ)²</li><li>How non-injective projection onto shared phonemic attractors collapses set variance</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://openstax.org/details/books/introductory-statistics-2e" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">OpenStax Introductory Statistics (Ch. 2 Mean & Variance) ↗</a></li><li><a href="https://statquest.org/video-index/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">StatQuest with Josh Starmer — Variance & Standard Deviation ↗</a></li><li><a href="https://www.people.vcu.edu/~rhammack/BookOfProof/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Book of Proof (Richard Hammack — Free Textbook, Ch. 12 Functions & Fibers) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M2): Population Variance Collapse on Cluster 292 (Exact Rational vs. Float)</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>σ²_0({264, 317, 276}) = 4634/9 ≈ 514.89 → σ²_1({292, 292, 292}) = 0</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">compute_variance([264, 317, 276]) # 514.89 -> 0.0</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="(variance-pop *cluster-292-gen0*)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">(variance-pop *cluster-292-gen0*)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="variancePop([264, 317, 276] as const)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">variancePop([264, 317, 276] as const)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="variance_pop(&[264.0, 317.0, 276.0])" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">variance_pop(&[264.0, 317.0, 276.0])</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Notice Guile's exact rational 4634/9 vs. TypeScript and Rust IEEE-754 float 514.8889.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Vector G1 Intergenerational Variance Collapse (Δσ²_G1)</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Given a lexical cluster S = {w_1, ..., w_N}, define Gen 0 variance σ²_0(S) = σ²({AQ(w) : w ∈ S}) and Gen 1 phonemic variance σ²_1(S) = σ²({AQ(Φ(w)) : w ∈ S}). Vector G1 measures Δσ²_G1(S) = σ²_0(S) - σ²_1(S). For S_292 = {'schizoanalysis' (264), 'abstract machine' (317), 'synthetic data' (276)}, Φ maps all three to 292 ('shizohnalizis'=292, 'abstrakt masheen'=292, 'sinthetik dayta'=292), collapsing σ²_0 = 514.89 to σ²_1 = 0.00 (Δσ²_G1 = +514.89).</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Vector G3 Quantized Steps, Vector G4 Isometric Fixed Points (Δ = 0) & Vector G5 Twin Primes</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Define phonemic drift Δ(w) = AQ(Φ(w)) - AQ(w). Vector G4 consists of isometric fixed points where Δ(w) = 0 (21 canonical specimens including 'ASML'=81, 'capital'→'kapatal'=125, 'palantir'→'palanter'=159, 'nineteen'→'nainteen'=137). Vector G3 captures quantized step magnitudes |Δ(w)| ∈ {0, 1, 10, 18, 20, 36, 37, 40, 74}, and Vector G5 captures twin-prime mutations where both AQ(w) ∈ P and AQ(Φ(w)) ∈ P with Δ(w) ≠ 0.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../base36-algebra-and-primes/index.html">← Prev: M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html">Next: M3: Graph & ETI Math →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math/phonemic-projections-and-g-vectors v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4} — hyperstitionstud.io/math (v2.17.0)</title>
|
||||||
|
<link rel="stylesheet" href="../../assets/hs-group3-basalt-chamfer.css?v=2.17.0" />
|
||||||
|
<style>
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body { font-family: 'DejaVu Sans Mono', ui-monospace, monospace; padding: 1.25rem; line-height: 1.5; }
|
||||||
|
.container { max-width: 1360px; margin: 0 auto; }
|
||||||
|
header { padding: 1.1rem 1.35rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 0.85rem; }
|
||||||
|
@media (max-width: 1220px) { header { flex-wrap: wrap; } }
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-secondary); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; }
|
||||||
|
.btn { padding: 0.34rem 0.62rem; font-size: 0.7rem; font-weight: 600; text-decoration: none; font-family: inherit; cursor: pointer; }
|
||||||
|
footer { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
|
<h1>Unit M4: Longitudinal Moments (ts_*), Lead-Lag r(τ), Order Statistics (P50, P90) & Confluence Dose D ∈ {0..4}</h1>
|
||||||
|
</div>
|
||||||
|
<p class="subtitle">Cartridge M4 • Non-Sequentially Revertible via <code>hs-math-docs --disable timeseries-moments-and-confluence-dose</code> • v2.17.0 <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
|
<a class="btn" href="../../index.html">Portal Home (/)</a>
|
||||||
|
<a class="btn" href="/calc/index.html">Calculator</a>
|
||||||
|
<a class="btn" href="/quant/index.html" style="border-color:var(--gold);color:var(--gold);">Quant</a>
|
||||||
|
<a class="btn" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
|
<a class="btn" href="../../learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" href="../../engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn primary" aria-current="page" href="../../math/index.html">Math</a>
|
||||||
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
|
<a class="btn-donate-pill" href="../../donate/index.html?from=math" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="hs-subnav-bar panel hs-plate-g3" aria-label="Unit and Polyglot Sub-Navigation">
|
||||||
|
<div class="hs-subnav-links">
|
||||||
|
<a class="btn" href="../index.html" style="border-color:rgba(56,189,248,0.55);">Math Hub (M0)</a>
|
||||||
|
<a class="btn" href="../base36-algebra-and-primes/index.html" style="">M1: Base-36 & Primes</a>
|
||||||
|
<a class="btn" href="../phonemic-projections-and-g-vectors/index.html" style="">M2: Phonemic Φ & G1-G6</a>
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html" style="">M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="index.html" style="border-color:var(--gold);color:var(--gold);">M4: Time-Series & Dose Math</a>
|
||||||
|
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html" style="">M5: Macro & Bayesian Math</a>
|
||||||
|
</div>
|
||||||
|
<div id="hsPolyglotModeSelector" class="hs-polyglot-segmented" role="radiogroup" aria-label="Pedagogical Programming Language Lens"><span class="hs-polyglot-prefix">LENS:</span><button type="button" id="guileSchemeModeToggle" class="hs-polyglot-seg" role="radio" data-lens-mode="off" aria-checked="true" title="Hide programming language cartridges (Alt+0)">OFF</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="guile" aria-checked="false" title="GNU Guile Scheme — Z-Combinator & Exact Rationals (Alt+1)"><span class="hs-guile-lambda-badge">λ</span>GUILE</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="ts" aria-checked="false" title="TypeScript — Static Union Types & Functional Pipelines (Alt+2)"><span class="hs-guile-lambda-badge">TS</span>TYPESCRIPT</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="rust" aria-checked="false" title="Rust — Ownership, Option<T> & Zero-Cost Iterators (Alt+3)"><span class="hs-guile-lambda-badge">Rs</span>RUST</button><button type="button" class="hs-polyglot-seg" role="radio" data-lens-mode="all" aria-checked="false" title="Side-by-side comparison of Guile Scheme, TypeScript, and Rust (Alt+4)">≡ ALL 3</button><strong id="guileSchemeModeState" style="display:none;">OFF</strong></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="panel hs-plate-g3 plate-lock-emerald hs-prereq-ladder" style="margin-bottom:0.9rem;padding:1rem 1.2rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--emerald);text-transform:uppercase;letter-spacing:0.06em;">Prerequisite Track for Novices • Required Expertise: Level 3-4: Nonparametric Order Statistics & Time-Series Correlation (15-20 hrs study)</div><p style="font-size:0.76rem;color:var(--text-secondary);margin:0.35rem 0;">If any mathematical notation on this page is unfamiliar, occupy your study time with these free foundational resources first:</p><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0.8rem;margin-top:0.4rem;"><div><strong style="font-size:0.73rem;color:var(--gold);">Core Mathematical Prerequisites:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li>Basis-point return arithmetic Δbps_{i,t} = round(((P_t - P_{t-1}) / P_{t-1}) × 10^4)</li><li>Nonparametric order statistics (Median P50, 90th percentile P90) vs. outlier-sensitive means</li><li>Pearson linear correlation r(τ) across lags τ ∈ [-5..+5] and indicator sums ∑ I(A_s)</li></ul></div><div><strong style="font-size:0.73rem;color:var(--cyan);">Curated Free Public Study Resources:</strong><ul style="font-size:0.72rem;color:var(--text-main);margin:0.25rem 0 0 1.1rem;line-height:1.5;"><li><a href="https://seeing-theory.brown.edu/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Seeing Theory (Brown University Visual Intro to Probability & Statistics) ↗</a></li><li><a href="https://online.stat.psu.edu/stat510/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">Penn State STAT 510 Applied Time Series Analysis (Cross-Correlation) ↗</a></li><li><a href="https://www.itl.nist.gov/div898/handbook/" target="_blank" rel="noopener noreferrer" style="color:var(--cyan);">NIST/SEMATECH e-Handbook of Statistical Methods (Order Statistics) ↗</a></li></ul></div></div></section>
|
||||||
|
<section class="panel hs-plate-g3 hs-guile-cartridge"><div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem;"><div style="font-size:0.74rem;font-weight:700;color:var(--cyan);text-transform:uppercase;letter-spacing:0.05em;">λ Polyglot Foil (M4): Thomas' Calculus Central Derivative d/dx(x^3) at x=2.0</div><div style="display:flex;gap:0.25rem;flex-wrap:wrap;align-items:center;"><button type="button" class="hs-polyglot-seg" data-lens-mode="guile">λ Guile</button><button type="button" class="hs-polyglot-seg" data-lens-mode="ts">TS TypeScript</button><button type="button" class="hs-polyglot-seg" data-lens-mode="rust">Rs Rust</button><button type="button" class="hs-polyglot-seg" data-lens-mode="all">≡ All 3</button><button type="button" class="hs-polyglot-seg" data-lens-mode="off">Hide</button></div></div><div class="hs-guile-triview"><div class="hs-guile-box"><strong style="color:var(--gold);display:block;margin-bottom:0.2rem;">1. Mathematical Identity & Python:</strong><code>f'(x) = lim_{h→0} (f(x+h) - f(x-h)) / (2h), D_{i,t} = ∑ I(A_s)</code><pre style="white-space:pre-wrap;margin-top:0.25rem;color:var(--text-secondary);">confluence_dose = sum(1 for x in species_hits if x)</pre></div><div class="hs-guile-box hs-lang-box-guile"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--cyan);">λ Guile Scheme (Z-Combinator):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="guile" data-scheme-expr="((derivative (lambda (x) (* x x x)) 1e-5) 2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-guile-code-expr">((derivative (lambda (x) (* x x x)) 1e-5) 2.0)</code><div class="hs-guile-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-ts"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--gold);">TS TypeScript (Strict AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="ts" data-scheme-expr="derivative((x: number): number => x ** 3, 1e-5)(2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-ts-code-expr">derivative((x: number): number => x ** 3, 1e-5)(2.0)</code><div class="hs-ts-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div><div class="hs-guile-box hs-lang-box-rust"><div style="display:flex;justify-content:space-between;align-items:center;"><strong style="color:var(--emerald);">Rs Rust (Option/Iterator AST):</strong><button type="button" class="btn hs-load-in-repl-btn" data-polyglot-lang="rust" data-scheme-expr="derivative(|x: f64| x * x * x, 1e-5, 2.0)" style="padding:0.12rem 0.4rem;font-size:0.65rem;">REPL →</button></div><code class="hs-rust-code-expr">derivative(|x: f64| x * x * x, 1e-5, 2.0)</code><div class="hs-rust-eval-result" style="margin-top:0.3rem;font-weight:700;color:var(--emerald);">=> [Select Lens to evaluate]</div></div></div><div style="font-size:0.71rem;color:var(--text-secondary);"><strong>Guided Micro-Challenge (4-Ring Zero-Escape Sandbox):</strong> Compare higher-order derivative closures in Guile Scheme, TypeScript, and Rust.</div></section>
|
||||||
|
<article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">1. Four-Species Confluence Dose Indicator Sum D_{i,t} ∈ {0, 1, 2, 3, 4}</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">For ticker i on trading session t, D_{i,t} = I(Scope1_{i,t}) + I(Scope2Ring_{i,t}) + I(SharedDossier_{i,t}) + I(WireEntity_{i,t}). Whenever a session is closed or private (data_available = False), D_{i,t} = null rather than 0, preventing missing-data bias.</p></article><article class="panel hs-plate-g3" style="padding:1rem 1.2rem;margin-bottom:0.85rem;"><h2 style="font-size:0.92rem;color:var(--gold);margin-bottom:0.4rem;">2. Nonparametric Order Statistics (P50, P90) & the Empirical Two-Regime Split</h2><p style="font-size:0.76rem;color:var(--text-main);line-height:1.6;">Because cross-asset returns |Δbps| are heavy-tailed, Median P50 and P90 are the robust estimators: across the 440 real November 2026 bars, Dose 2 (Market Ring × Same-Day Dossier without headline shock, n=34) compresses median displacement by -58% (P50 = 101.0 bps vs. 240.5 bps at Dose 0; P90 = 292 bps vs. 665 bps), whereas Dose 3+ (n=4) triggers a 1.98x volume surge and 377.5 bps next-day continuation.</p></article>
|
||||||
|
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:0.8rem;">
|
||||||
|
<a class="btn" href="../graph-topology-and-eti-scoring/index.html">← Prev: M3: Graph & ETI Math</a>
|
||||||
|
<a class="btn" href="../macro-spreads-and-bayesian-inference/index.html">Next: M5: Macro & Bayesian Math →</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io/math/timeseries-moments-and-confluence-dose v2.17.0 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:var(--rose);">♥</span> by Lemurs.
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="../../assets/hs-matrix-coderain.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../../assets/hs-mobile-ui.js?v=2.17.0" defer></script>
|
||||||
|
<script src="../math-manifest-data.js?v=2.17.0"></script>
|
||||||
|
<script src="../math-app.js?v=2.17.0"></script>
|
||||||
|
<aside id="hsGuileReplDrawer" class="hs-plate-g3" aria-label="In-Browser Polyglot Guile Scheme, TypeScript, and Rust Hardened REPL">
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-bottom:0.45rem;">
|
||||||
|
<div style="font-size:0.73rem;font-weight:700;color:var(--cyan);">λ 4-RING HARDENED POLYGLOT REPL (GUILE • TS • RUST • ZERO EVAL)</div>
|
||||||
|
<div style="display:flex;gap:0.4rem;align-items:center;">
|
||||||
|
<select id="hsPolyglotReplLang" style="background:var(--bg-void);color:var(--cyan);border:1px solid var(--cyan);padding:0.15rem 0.35rem;font-family:inherit;font-size:0.68rem;font-weight:700;">
|
||||||
|
<option value="guile">λ Guile Scheme</option>
|
||||||
|
<option value="ts">TS TypeScript</option>
|
||||||
|
<option value="rust">Rs Rust</option>
|
||||||
|
</select>
|
||||||
|
<label style="font-size:0.68rem;color:var(--text-secondary);cursor:pointer;"><input type="checkbox" id="hsGuilePreferFloat" /> Float view</label>
|
||||||
|
<button type="button" id="hsGuileReplCloseBtn" class="btn" style="padding:0.15rem 0.45rem;font-size:0.68rem;">Minimize / Expand</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hs-repl-body">
|
||||||
|
<div style="display:flex;gap:0.4rem;margin-bottom:0.4rem;flex-wrap:wrap;">
|
||||||
|
<select id="hsGuileReplPreset" style="flex:1;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.28rem;font-family:inherit;font-size:0.7rem;">
|
||||||
|
<option value="">-- Load Preset Polyglot Expression (Guile / TS / Rust) --</option>
|
||||||
|
<option value='guile::(aq-base36 "LEMUR")'>[λ Guile] Base-36 AQ: (aq-base36 "LEMUR") => 114</option>
|
||||||
|
<option value='ts::aqBase36("LEMUR")'>[TS] Base-36 AQ: aqBase36("LEMUR") => 114</option>
|
||||||
|
<option value='rust::aq_base36("LEMUR")'>[Rs Rust] Base-36 AQ: aq_base36("LEMUR") => 114</option>
|
||||||
|
<option value="guile::(prime-factors 666)">[λ Guile] Prime Factors via Z: (prime-factors 666) => (2 3 3 37)</option>
|
||||||
|
<option value="ts::primeFactors(666)">[TS] Prime Factors: primeFactors(666) => [2,3,3,37]</option>
|
||||||
|
<option value="rust::prime_factors(666_u64)">[Rs Rust] Prime Factors: prime_factors(666_u64) => vec![2, 3, 3, 37]</option>
|
||||||
|
<option value="guile::(variance-pop *cluster-292-gen0*)">[λ Guile] Exact Rational Variance (Cluster 292): 4634/9</option>
|
||||||
|
<option value="ts::variancePop([264, 317, 276] as const)">[TS] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="rust::variance_pop(&[264.0, 317.0, 276.0])">[Rs Rust] Cluster 292 Variance: 514.8889</option>
|
||||||
|
<option value="guile::((derivative (lambda (x) (* x x x)) 1e-5) 2.0)">[λ Guile] Thomas' Calculus d/dx(x^3) at x=2 => 12.0</option>
|
||||||
|
<option value="ts::derivative((x: number): number => x ** 3, 1e-5)(2.0)">[TS] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
<option value="rust::derivative(|x: f64| x * x * x, 1e-5, 2.0)">[Rs Rust] Derivative d/dx(x^3) at x=2 => 12</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" id="hsGuileReplEvalBtn" class="btn" style="border-color:var(--emerald);color:var(--emerald);">Evaluate (λ)</button>
|
||||||
|
<button type="button" id="hsGuileReplStepBtn" class="btn" style="border-color:var(--gold);color:var(--gold);">Step AST Trace</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="hsGuileReplInput" rows="2" style="width:100%;background:var(--bg-void);color:var(--text-main);border:1px solid var(--border);padding:0.45rem;font-family:inherit;font-size:0.73rem;">(aq-base36 "LEMUR")</textarea>
|
||||||
|
<pre id="hsGuileReplOutput" style="margin-top:0.4rem;background:var(--bg-void);border:1px solid var(--border);padding:0.5rem;font-size:0.71rem;color:var(--emerald);max-height:150px;overflow-y:auto;white-space:pre-wrap;">polyglot> Ready (4-Ring Zero-Eval AST Sandbox). Select [λ GUILE | TS | RS | ≡ ALL 3] or click Evaluate (λ).</pre>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<script src="../../assets/hs-guile-scheme-repl.js?v=2.17.0"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -46,5 +46,86 @@ Only data sources that emit discrete, timestamp-indexed periodic observations ($
|
|||||||
- `GET /api/v1/quant/timeseries?symbol=NVDA&lens=fund_manager`
|
- `GET /api/v1/quant/timeseries?symbol=NVDA&lens=fund_manager`
|
||||||
- `GET /api/v1/quant/instruments/NVDA`
|
- `GET /api/v1/quant/instruments/NVDA`
|
||||||
- `GET /api/v1/zoology/pokedex/NVDA`
|
- `GET /api/v1/zoology/pokedex/NVDA`
|
||||||
|
- `GET /api/v1/zoology/pokedex/NVDA?include_card=true`
|
||||||
|
- `GET /api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology`
|
||||||
|
- `POST /api/v1/tools/hs_generate_ticker_stats_card`
|
||||||
- `GET /api/v1/dossiers/71?highlight=envideea`
|
- `GET /api/v1/dossiers/71?highlight=envideea`
|
||||||
- `GET /api/v1/openapi.json`
|
- `GET /api/v1/openapi.json`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Command-Line Examples: One-Shot Ticker Stats Card (`.png` + `.json`) across cURL, CLI, Chatbot REST Client & MCP Client
|
||||||
|
|
||||||
|
The 5-zone `900 × 1260` (`5:7` TCG Portrait) Group 3 Stealth Basalt Ticker Stats Card generator (`hyperstitionstud_io.quant.cards`) supports any of the `24` watchlist tickers (`NVDA`, `PLTR`, `ASML`, `ANTHR-PVT`, `BTC-USD`, etc.) or DEX integer coordinates (`137`, `159`, `193`), `6` projection lenses (`tierzoo_ecology`, `fund_manager`, `neutral_math`, `corporate_board`, `fantasy_sabermetrics`, `pokedex_scanner`), and optional `YYYY-MM-DD` historical UTC dates.
|
||||||
|
|
||||||
|
### 4.1 cURL Quickstart (Zero Local Dependencies — Direct HTTP API Call)
|
||||||
|
|
||||||
|
Fetch the JSON card or decode a `<SYMBOL>-stats-card.png` directly over HTTPS (`https://hyperstitionstud.io`) or a local daemon (`http://127.0.0.1:8095`) without installing local Python packages or an MCP client:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Fetch and save the 5-zone Ticker Stats Card JSON directly (swap NVDA for PLTR, ASML, ANTHR-PVT, etc.)
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false" \
|
||||||
|
-o /tmp/NVDA-stats-card.json
|
||||||
|
|
||||||
|
# 2. Fetch the embedded PNG payload and decode directly to /tmp/NVDA-stats-card.png (works with http://127.0.0.1:8095 too)
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=true" \
|
||||||
|
| jq -r '.data.artifacts.png_base64' | base64 -d > /tmp/NVDA-stats-card.png
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.2 Direct CLI Entrypoint (`hs-ticker-card`)
|
||||||
|
|
||||||
|
Generates `/tmp/hyperstition-cards/<SYMBOL>-stats-card.png` and `/tmp/hyperstition-cards/<SYMBOL>-stats-card.json` locally in one shot and prints the SHA-256 and IPLD `dag-json` `CIDv1` receipt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Public exchange ticker (NVDA -> envideea = 137) or private entity (ANTHR-PVT -> anthropik = 193, strict null market bars)
|
||||||
|
hs-ticker-card --symbol NVDA --lens tierzoo_ecology --out-dir /tmp/hyperstition-cards
|
||||||
|
|
||||||
|
# Module invocation (without activating .venv console script PATH)
|
||||||
|
PYTHONPATH=/workspace/hyperstitionstudio-core/src python3 -m hyperstitionstud_io.quant.cards \
|
||||||
|
--symbol NVDA --lens fund_manager --date 2026-11-27 --out-dir /tmp/hyperstition-cards
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.3 Chatbot / OpenAPI 3.1 REST API Client (`GET` / `POST /api/v1/tools/hs_generate_ticker_stats_card`)
|
||||||
|
|
||||||
|
Chatbot clients and HTTP consumers can invoke `hs_generate_ticker_stats_card` (or `/api/v1/zoology/pokedex/{symbol}?include_card=true`) against either production `https://hyperstitionstud.io` or local `http://127.0.0.1:8095`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. HTTP GET (metadata + 5-zone JSON card without base64 PNG payload)
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA&lens=tierzoo_ecology&include_base64_png=false" | jq .
|
||||||
|
|
||||||
|
# 2. HTTP POST (Chatbot JSON tool-call payload; decodes embedded png_base64 directly to NVDA-stats-card.png)
|
||||||
|
curl -sS -X POST "https://hyperstitionstud.io/api/v1/tools/hs_generate_ticker_stats_card" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"symbol":"NVDA","lens":"tierzoo_ecology","include_base64_png":true}' \
|
||||||
|
| jq -r '.data.artifacts.png_base64' | base64 -d > /tmp/NVDA-stats-card.png
|
||||||
|
|
||||||
|
# 3. Pokédex shorthand route with attached stats_card bundle (?include_card=true)
|
||||||
|
curl -sS "https://hyperstitionstud.io/api/v1/zoology/pokedex/NVDA?include_card=true" | jq '.data.stats_card.card_identity'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.4 MCP API Client (`JSON-RPC 2.0` `tools/call` over Streamable HTTP `/mcp` & `stdio`)
|
||||||
|
|
||||||
|
MCP clients (Hermes Agent, Claude Desktop, Cursor, or command-line JSON-RPC scripts) invoke `hs_generate_ticker_stats_card` via `tools/call`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. MCP Streamable HTTP JSON-RPC 2.0 POST to /mcp (production or http://127.0.0.1:8095/mcp)
|
||||||
|
curl -sS -X POST "https://hyperstitionstud.io/mcp" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 1,
|
||||||
|
"method": "tools/call",
|
||||||
|
"params": {
|
||||||
|
"name": "hs_generate_ticker_stats_card",
|
||||||
|
"arguments": {
|
||||||
|
"symbol": "NVDA",
|
||||||
|
"lens": "tierzoo_ecology",
|
||||||
|
"include_base64_png": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}' | jq -r '.result.content[0].text' | jq .
|
||||||
|
|
||||||
|
# 2. MCP stdio transport one-liner (pipes newline-delimited JSON-RPC 2.0 into hs-mcp --transport stdio)
|
||||||
|
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hs_generate_ticker_stats_card","arguments":{"symbol":"NVDA","lens":"tierzoo_ecology","include_base64_png":false}}}' \
|
||||||
|
| hs-mcp --transport stdio | jq -r '.result.content[0].text' | jq .
|
||||||
|
```
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// Auto-generated by hyperstitionstud_io.quant.daily_brief — DO NOT EDIT MANUALLY
|
||||||
|
window.HYPERSTITION_DAILY_BRIEF = {"$schema": "./schemas/v1/daily-portfolio-brief.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief", "version": "2.17.1", "run_number": 10, "generated_at_utc": "2026-12-02T21:30:19Z", "synthetic_data_eliminated": true, "agenda_1_executive_summary": {"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.", "high_impact_findings_ranked": [{"rank": 1, "theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion", "durability_score": 0.84, "severity_score": 0.78, "portfolio_impact_probability": 0.81, "evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=42) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."}, {"rank": 2, "theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)", "durability_score": 0.88, "severity_score": 0.72, "portfolio_impact_probability": 0.79, "evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."}, {"rank": 3, "theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)", "durability_score": 0.76, "severity_score": 0.74, "portfolio_impact_probability": 0.75, "evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."}], "risk_on_off_barometers": {"vix_close": 18.38, "us10y_yield_pct": 5.08, "btc_latest_change_bps": -37, "copper_hg_latest_change_bps": 277, "effr_overnight_pct": 3.89, "sofr_overnight_pct": 4.02, "sofr_minus_effr_spread_bps": 13, "real_m2_mom_growth_bps": 16}, "bayesian_regime_inference": {"extant_priors": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "likelihood_factors": {"R1_BULL_RISK_ON": 0.9775, "R2_PINNED_ISOMETRIC": 1.0465, "R3_TAIL_DRAWDOWN_RISK_OFF": 2.125}, "posterior_probabilities": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "scenarios": {"best_case_r1_bull_risk_on": {"probability": 0.0, "label": "Best Case — Risk-On Expansion & Smooth Trend Continuation", "expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)", "drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."}, "base_case_r2_pinned_isometric": {"probability": 0.0, "label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)", "expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)", "drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."}, "worst_case_r3_tail_drawdown": {"probability": 1.0, "label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening", "expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)", "drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."}}}}, "agenda_2_confirming_signals": {"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.", "active_dose2_confirmations": [{"date_utc": "2026-12-01", "symbol": "RTX", "entity_ing": "raytheeon", "close_usd": 200.21, "change_bps": 60, "volume_ratio_20d": 0.71, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "MSFT", "entity_ing": "maikrohsawft", "close_usd": 487.2, "change_bps": -115, "volume_ratio_20d": 1.39, "shared_dossier_coordinates": [115], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "LMT", "entity_ing": "lokheed", "close_usd": 610.65, "change_bps": 79, "volume_ratio_20d": 1.91, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59696.43, "change_bps": -44, "volume_ratio_20d": 0.77, "shared_dossier_coordinates": [189], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-29", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 71.34, "change_bps": 1Line truncated
|
||||||
@@ -0,0 +1,463 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./schemas/v1/daily-portfolio-brief.schema.json",
|
||||||
|
"$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief",
|
||||||
|
"version": "2.17.1",
|
||||||
|
"run_number": 10,
|
||||||
|
"generated_at_utc": "2026-12-02T21:30:19Z",
|
||||||
|
"synthetic_data_eliminated": true,
|
||||||
|
"agenda_1_executive_summary": {
|
||||||
|
"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.",
|
||||||
|
"high_impact_findings_ranked": [
|
||||||
|
{
|
||||||
|
"rank": 1,
|
||||||
|
"theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion",
|
||||||
|
"durability_score": 0.84,
|
||||||
|
"severity_score": 0.78,
|
||||||
|
"portfolio_impact_probability": 0.81,
|
||||||
|
"evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=42) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rank": 2,
|
||||||
|
"theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)",
|
||||||
|
"durability_score": 0.88,
|
||||||
|
"severity_score": 0.72,
|
||||||
|
"portfolio_impact_probability": 0.79,
|
||||||
|
"evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rank": 3,
|
||||||
|
"theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)",
|
||||||
|
"durability_score": 0.76,
|
||||||
|
"severity_score": 0.74,
|
||||||
|
"portfolio_impact_probability": 0.75,
|
||||||
|
"evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"risk_on_off_barometers": {
|
||||||
|
"vix_close": 18.38,
|
||||||
|
"us10y_yield_pct": 5.08,
|
||||||
|
"btc_latest_change_bps": -37,
|
||||||
|
"copper_hg_latest_change_bps": 277,
|
||||||
|
"effr_overnight_pct": 3.89,
|
||||||
|
"sofr_overnight_pct": 4.02,
|
||||||
|
"sofr_minus_effr_spread_bps": 13,
|
||||||
|
"real_m2_mom_growth_bps": 16
|
||||||
|
},
|
||||||
|
"bayesian_regime_inference": {
|
||||||
|
"extant_priors": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"likelihood_factors": {
|
||||||
|
"R1_BULL_RISK_ON": 0.9775,
|
||||||
|
"R2_PINNED_ISOMETRIC": 1.0465,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 2.125
|
||||||
|
},
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"scenarios": {
|
||||||
|
"best_case_r1_bull_risk_on": {
|
||||||
|
"probability": 0.0,
|
||||||
|
"label": "Best Case — Risk-On Expansion & Smooth Trend Continuation",
|
||||||
|
"expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)",
|
||||||
|
"drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."
|
||||||
|
},
|
||||||
|
"base_case_r2_pinned_isometric": {
|
||||||
|
"probability": 0.0,
|
||||||
|
"label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)",
|
||||||
|
"expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)",
|
||||||
|
"drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."
|
||||||
|
},
|
||||||
|
"worst_case_r3_tail_drawdown": {
|
||||||
|
"probability": 1.0,
|
||||||
|
"label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening",
|
||||||
|
"expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)",
|
||||||
|
"drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"agenda_2_confirming_signals": {
|
||||||
|
"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.",
|
||||||
|
"active_dose2_confirmations": [
|
||||||
|
{
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"symbol": "RTX",
|
||||||
|
"entity_ing": "raytheeon",
|
||||||
|
"close_usd": 200.21,
|
||||||
|
"change_bps": 60,
|
||||||
|
"volume_ratio_20d": 0.71,
|
||||||
|
"shared_dossier_coordinates": [],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"symbol": "MSFT",
|
||||||
|
"entity_ing": "maikrohsawft",
|
||||||
|
"close_usd": 487.2,
|
||||||
|
"change_bps": -115,
|
||||||
|
"volume_ratio_20d": 1.39,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
115
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"symbol": "LMT",
|
||||||
|
"entity_ing": "lokheed",
|
||||||
|
"close_usd": 610.65,
|
||||||
|
"change_bps": 79,
|
||||||
|
"volume_ratio_20d": 1.91,
|
||||||
|
"shared_dossier_coordinates": [],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"symbol": "BTC-USD",
|
||||||
|
"entity_ing": "bitkoin",
|
||||||
|
"close_usd": 59696.43,
|
||||||
|
"change_bps": -44,
|
||||||
|
"volume_ratio_20d": 0.77,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
189
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-29",
|
||||||
|
"symbol": "SOL-USD",
|
||||||
|
"entity_ing": "sohlana",
|
||||||
|
"close_usd": 71.34,
|
||||||
|
"change_bps": 125,
|
||||||
|
"volume_ratio_20d": 0.73,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
71,
|
||||||
|
125
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-28",
|
||||||
|
"symbol": "BTC-USD",
|
||||||
|
"entity_ing": "bitkoin",
|
||||||
|
"close_usd": 59321.42,
|
||||||
|
"change_bps": -91,
|
||||||
|
"volume_ratio_20d": 0.38,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
91
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-28",
|
||||||
|
"symbol": "ETH-USD",
|
||||||
|
"entity_ing": "edheroom",
|
||||||
|
"close_usd": 1645.99,
|
||||||
|
"change_bps": -91,
|
||||||
|
"volume_ratio_20d": 0.52,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
91
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-28",
|
||||||
|
"symbol": "SOL-USD",
|
||||||
|
"entity_ing": "sohlana",
|
||||||
|
"close_usd": 70.46,
|
||||||
|
"change_bps": -156,
|
||||||
|
"volume_ratio_20d": 0.48,
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
163
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"active_dose3_breakout_confirmations": [
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"symbol": "NVDA",
|
||||||
|
"entity_ing": "envideea",
|
||||||
|
"close_usd": 152.55,
|
||||||
|
"change_bps": 137,
|
||||||
|
"volume_ratio_20d": 0.77,
|
||||||
|
"scope1_locks": [
|
||||||
|
"BPS_SELF_LOCK (137==envideea)"
|
||||||
|
],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
137,
|
||||||
|
153
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-25",
|
||||||
|
"symbol": "BLK",
|
||||||
|
"entity_ing": "blakrok",
|
||||||
|
"close_usd": 1141.86,
|
||||||
|
"change_bps": -36,
|
||||||
|
"volume_ratio_20d": 0.95,
|
||||||
|
"scope1_locks": [
|
||||||
|
"BPS_REPDIGIT_ATTRACTOR (222)"
|
||||||
|
],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
222
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-19",
|
||||||
|
"symbol": "SOL-USD",
|
||||||
|
"entity_ing": "sohlana",
|
||||||
|
"close_usd": 73.07,
|
||||||
|
"change_bps": -75,
|
||||||
|
"volume_ratio_20d": 0.8,
|
||||||
|
"scope1_locks": [
|
||||||
|
"SYMBOL_SELF_LOCK (73==SOL)"
|
||||||
|
],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
237
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-18",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"entity_ing": "arm",
|
||||||
|
"close_usd": 182.76,
|
||||||
|
"change_bps": -34,
|
||||||
|
"volume_ratio_20d": 0.75,
|
||||||
|
"scope1_locks": [],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
183
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-13",
|
||||||
|
"symbol": "NVDA",
|
||||||
|
"entity_ing": "envideea",
|
||||||
|
"close_usd": 162.85,
|
||||||
|
"change_bps": -201,
|
||||||
|
"volume_ratio_20d": 1.86,
|
||||||
|
"scope1_locks": [],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
163
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-12",
|
||||||
|
"symbol": "NVDA",
|
||||||
|
"entity_ing": "envideea",
|
||||||
|
"close_usd": 166.19,
|
||||||
|
"change_bps": -434,
|
||||||
|
"volume_ratio_20d": 4.52,
|
||||||
|
"scope1_locks": [],
|
||||||
|
"shared_dossier_coordinates": [
|
||||||
|
166
|
||||||
|
],
|
||||||
|
"dose_taxon_label": "Dose 3+: Phase-Transition Surge"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"macro_support_vectors": [
|
||||||
|
{
|
||||||
|
"indicator": "PPI vs. CPI Pipeline Margin Spread",
|
||||||
|
"observation": "-54 bps (PPI -19 bps vs. CPI +35 bps)",
|
||||||
|
"supported_guilds": [
|
||||||
|
"S1",
|
||||||
|
"S3",
|
||||||
|
"S6"
|
||||||
|
],
|
||||||
|
"interpretation": "Upstream commodity deflation relative to consumer prices expands gross margins for S1/S3 hyperscalers."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indicator": "Business Sector Real Aggregate Output (OUTBS) & Real GDP (GDPC1)",
|
||||||
|
"observation": "OUTBS = 128.965 (129 == blakwel [S3/M7+]); Real GDP = $24665.203B",
|
||||||
|
"supported_guilds": [
|
||||||
|
"S3",
|
||||||
|
"S6"
|
||||||
|
],
|
||||||
|
"interpretation": "Real business output index rounds to 129 (blakwel) with floor 128 (nik land / serkat), confirming S3 physical throughput."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"agenda_3_challenging_divergences": {
|
||||||
|
"summary": "Three substantive macro and memetic divergences challenge unbridled risk-on consensus:",
|
||||||
|
"macro_and_memetic_challenges": [
|
||||||
|
{
|
||||||
|
"challenge_type": "SOVEREIGN_TERM_YIELD_HEADWIND",
|
||||||
|
"indicator": "US10Y (DGS10 / ^TNX) & Term Slope (10Y - EFFR)",
|
||||||
|
"observation": "US10Y = 5.06% / 5.08% (+97 bps above EFFR 3.88% -> 'naintee sevan' = 237 == kansorsheeam)",
|
||||||
|
"impact": "Sustained ~4.85%-4.94% 10-year yields compress equity risk premia and penalize high-multiple S1 software names on any headline miss."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"challenge_type": "PHYSICAL_INDUSTRIAL_CONTRACTION_DIVERGENCE",
|
||||||
|
"indicator": "Industrial Production Index (INDPRO, 1mo) vs. S3 Equity Multiples",
|
||||||
|
"observation": "INDPRO = 102.2421 (-43 bps MoM)",
|
||||||
|
"impact": "Monthly physical industrial production contracted -43 bps MoM even as AI hardware narratives expanded, flagging physical grid/fab bottleneck risk."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"challenge_type": "PARKED_TIME_DEPOSIT_OVERHANG",
|
||||||
|
"indicator": "M1 vs. M2 Spread (M2SL - M1SL)",
|
||||||
|
"observation": "$3365.9B ($3.37T) in non-M1 time deposits",
|
||||||
|
"impact": "$3.37T (matching CPI 337 [68th Prime]) remains parked in yield-bearing retail CDs/time deposits rather than mobilizing into M1 spot velocity."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"narrative_tape_divergences_dose1": [
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-23",
|
||||||
|
"symbol": "NVDA",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 165.05,
|
||||||
|
"change_bps": 3148,
|
||||||
|
"explanation": "NVDA appeared in the 00:00 UTC news wire on 2026-11-23 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-13",
|
||||||
|
"symbol": "MSFT",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 523.88,
|
||||||
|
"change_bps": 17,
|
||||||
|
"explanation": "MSFT appeared in the 00:00 UTC news wire on 2026-11-13 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-19",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 177.17,
|
||||||
|
"change_bps": -306,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-19 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-20",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 152.2,
|
||||||
|
"change_bps": -1409,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-20 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-23",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 176.67,
|
||||||
|
"change_bps": 1608,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-23 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-24",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 161.56,
|
||||||
|
"change_bps": -855,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-24 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-25",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 161.51,
|
||||||
|
"change_bps": -3,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-25 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"date_utc": "2026-11-27",
|
||||||
|
"symbol": "ARM",
|
||||||
|
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||||
|
"close_usd": 171.55,
|
||||||
|
"change_bps": 622,
|
||||||
|
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-27 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"agenda_4_delta_since_last_run": {
|
||||||
|
"prior_run_number": 9,
|
||||||
|
"current_run_number": 10,
|
||||||
|
"latest_wire_dossier": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"dossier_number": 73,
|
||||||
|
"dossier_file": "73-dossier-news-2026-12-01.md",
|
||||||
|
"equation_counts": {
|
||||||
|
"eq_333": 10,
|
||||||
|
"eq_666": 10,
|
||||||
|
"eq_777": 10,
|
||||||
|
"total": 30
|
||||||
|
},
|
||||||
|
"active_ring_coordinates": [
|
||||||
|
71,
|
||||||
|
91,
|
||||||
|
135
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"macro_releases_ingested": {
|
||||||
|
"cpi_latest": "2026-10-01: 337.476 (35 bps MoM)",
|
||||||
|
"ppi_latest": "2026-10-01: 293.921 (-19 bps MoM)",
|
||||||
|
"effr_sofr_latest": "2026-12-01: EFFR=3.89%, SOFR=4.02%",
|
||||||
|
"m2_real_m2_latest": "2026-10-01: M2=$23532.8B, Real M2=$6973.2B",
|
||||||
|
"gdp_gnp_latest": "2026-07-01: GDP=$33056.204B, GNP=$33026.509B"
|
||||||
|
},
|
||||||
|
"private_and_holiday_null_audit": {
|
||||||
|
"private_entities_null": [
|
||||||
|
"ANTHR-PVT (0/30 trading days — all market fields strictly null / 'No data available')"
|
||||||
|
],
|
||||||
|
"holiday_dates_null": [
|
||||||
|
"2026-11-26 US Thanksgiving (equities, DGS10, EFFR, SOFR strictly null / 'No data available')"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"agenda_5_daily_key_macro_question_and_rigor": {
|
||||||
|
"prior_question_grading": {
|
||||||
|
"prior_question_id": "Q-RUN-0010",
|
||||||
|
"prior_question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||||
|
"status": "EVALUATED_ON_REAL_TAPE",
|
||||||
|
"evidence_summary": "Late-November real tape logged 15 Dose 2 isometric pinning sessions (including 2026-11-24 GOOGL -108 bps -> 292 and 2026-11-28 BTC/ETH -91 bps sync wave) with 0 new Dose 3+ drawdown shocks after Nov 19, confirming Base-Case R2 variance compression."
|
||||||
|
},
|
||||||
|
"active_daily_question": {
|
||||||
|
"question_id": "Q-RUN-0010",
|
||||||
|
"question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||||
|
"confirmation_threshold_r2_pin": "Next-session median displacement across locked S1/S2/S3 leaders remains <= 150 bps with Vol20d < 1.15x.",
|
||||||
|
"falsification_threshold_r3_breakout": "Any S1/S2/S3 keystone logs a Dose 3+ headline-coupled session with Vol20d >= 1.50x or change_bps <= -300 bps."
|
||||||
|
},
|
||||||
|
"compounding_qualitative_rigor": {
|
||||||
|
"room_filter_gate": "Enforces Division 08 'The Room Filter': isolated 1-species ring hits (Dose 1, n=73, 16.6% of bars) are classified as 'Grand Central Station' combinatorial noise (P90=969 bps, 58.6% next-day reversal) and excluded from thesis confirmation. Only multi-species locks passing both the Market Ring Gate and the Same-Day 00:00 UTC Dossier Gate (Dose 2, n=34, or Dose 3+, n=4) qualify.",
|
||||||
|
"bidirectional_orthographic_coverage": "Evaluates all 14 lexical/numerical data points in both Gen 0 written English (eng_aq) and Gen 1 phonemic Ingglish (ing_aq), preventing silent misses on Gen 0 isometric locks (such as 2026-11-24 GOOGL -108 bps -> 'one hundred eight' = 292) and ticker self-locks (SOL = 73)."
|
||||||
|
},
|
||||||
|
"compounding_quantitative_rigor": {
|
||||||
|
"sample_size_and_df_disclosure": {
|
||||||
|
"total_real_bars_n": 440,
|
||||||
|
"valid_change_bps_n": 433,
|
||||||
|
"next_day_pairs_n": 412,
|
||||||
|
"dose_0_n": 390,
|
||||||
|
"dose_1_n": 96,
|
||||||
|
"dose_2_n": 42,
|
||||||
|
"dose_3_plus_n": 9
|
||||||
|
},
|
||||||
|
"methodological_applicability_and_significance": "1. Nonparametric Order Statistics (Median P50 & Tail P90) vs. Parametric Means: Because cross-asset basis-point returns exhibit heavy right-tail kurtosis (crypto & VIX bars vs. low-beta equities), Median P50 (Dose 2 = 101.0 bps vs. Dose 0 = 240.5 bps, -58%) and P90 (Dose 2 = 292 bps vs. Dose 0 = 665 bps, -56%) are the primary applicable location/scale estimators. 2. Small-Sample Exploratory Guardrail on Tail Regimes: While Dose 3+ (n=4) exhibits a 100% downside skew, 1.98x mean volume, and 100% next-day continuation (377.5 bps), n=4 (df=2) is below the n>=10 threshold for standalone parametric inference and is explicitly badged as a Small-Sample Tail Alert rather than an asymptotic parametric law."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"read_only_isolation_receipt": {
|
||||||
|
"namespace_urn": "urn:io:hyperstitionstud:isolation-receipt:v1",
|
||||||
|
"all_unchanged": true,
|
||||||
|
"files": {
|
||||||
|
"/srv/hyperstitionstud.io/repos/technocapital-singularity-zoology/taxonomy/glossary-registry.json": {
|
||||||
|
"pre_sha256": "7564ef40fb3e0e18d1d8547522db431b6a369c40139713b573df6e58b972d43d",
|
||||||
|
"post_sha256": "7564ef40fb3e0e18d1d8547522db431b6a369c40139713b573df6e58b972d43d",
|
||||||
|
"unchanged": true
|
||||||
|
},
|
||||||
|
"/srv/hyperstitionstud.io/repos/technocapital-singularity-zoology/encyclopedia/encyclopedia-manifest.json": {
|
||||||
|
"pre_sha256": "0d7ce833bb0aa0eea069bf764b2e3b0b36ac2631821c42f3d6bcb897335f8a7d",
|
||||||
|
"post_sha256": "0d7ce833bb0aa0eea069bf764b2e3b0b36ac2631821c42f3d6bcb897335f8a7d",
|
||||||
|
"unchanged": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipld_dag_json_cidv1": {
|
||||||
|
"/": "baguqeeraqwdlii6fxho2jagvuo4fcvqcbghgd4dgcht3dd3gvghcgyqlbhia"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"version": "2.17.1",
|
||||||
|
"run_number": 9,
|
||||||
|
"updated_at_utc": "2026-12-02T21:30:19Z",
|
||||||
|
"latest_posteriors": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"active_daily_question": {
|
||||||
|
"question_id": "Q-RUN-0010",
|
||||||
|
"question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||||
|
"confirmation_threshold_r2_pin": "Next-session median displacement across locked S1/S2/S3 leaders remains <= 150 bps with Vol20d < 1.15x.",
|
||||||
|
"falsification_threshold_r3_breakout": "Any S1/S2/S3 keystone logs a Dose 3+ headline-coupled session with Vol20d >= 1.50x or change_bps <= -300 bps."
|
||||||
|
},
|
||||||
|
"run_history": [
|
||||||
|
{
|
||||||
|
"run_number": 1,
|
||||||
|
"generated_at_utc": "2026-11-30T21:24:53Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.1333,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.2534,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.6133
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0001",
|
||||||
|
"cidv1": "baguqeerafa7hr4rphngheuichlekmt7lk7ueriuvjvbjykvor7wtt6gc6brq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 2,
|
||||||
|
"generated_at_utc": "2026-11-30T21:36:47Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0347,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0836,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.8817
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0002",
|
||||||
|
"cidv1": "baguqeerammpyhkufyxlbvlmatxuqqaatm47z3cmvntz6lrtuhmfldpvtg72a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 3,
|
||||||
|
"generated_at_utc": "2026-11-30T21:46:33Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0069,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0212,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.9719
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0003",
|
||||||
|
"cidv1": "baguqeeravy3kf7zluqt37v5ziasdekgeape66ncfpzqxi6zbicra2hipbzba"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 4,
|
||||||
|
"generated_at_utc": "2026-11-30T21:49:59Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0013,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.005,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.9937
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0004",
|
||||||
|
"cidv1": "baguqeera4mp76nopwns7rfqrvz36iu5egl5h3iqkmxdemarhind3ukahiswa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 5,
|
||||||
|
"generated_at_utc": "2026-11-30T21:50:55Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0002,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0012,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.9986
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0005",
|
||||||
|
"cidv1": "baguqeeraqoxkqwmzrcr63uu37pzowusuoqtlqcy4ikgsr6ax6vcg7a5hds4q"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 6,
|
||||||
|
"generated_at_utc": "2026-11-30T22:13:42Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0003,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.9997
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0006",
|
||||||
|
"cidv1": "baguqeeraq3gweokji6vipw5h4cgtwdjdwvjwnxsl3zbmqq67hvirhsfa2iwq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 7,
|
||||||
|
"generated_at_utc": "2026-11-30T22:18:58Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0001,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 0.9999
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0007",
|
||||||
|
"cidv1": "baguqeeraxmhxqiw2kgdpswaa5owcwc5jykfxmtfbhhihfg62kc24giu6mieq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 8,
|
||||||
|
"generated_at_utc": "2026-12-01T03:15:46Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0008",
|
||||||
|
"cidv1": "baguqeera6yv3xbdw7lqkus3jrvykxl67ayxmbhsuy6oimpu6e722rbp6zweq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"run_number": 9,
|
||||||
|
"generated_at_utc": "2026-12-02T21:30:19Z",
|
||||||
|
"posterior_probabilities": {
|
||||||
|
"R1_BULL_RISK_ON": 0.0,
|
||||||
|
"R2_PINNED_ISOMETRIC": 0.0,
|
||||||
|
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||||
|
},
|
||||||
|
"question_id": "Q-RUN-0009",
|
||||||
|
"cidv1": "baguqeeraqwdlii6fxho2jagvuo4fcvqcbghgd4dgcht3dd3gvghcgyqlbhia"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,13 +4,14 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Quantitative Finance & Memetic Gematria Time-Series Workbench — hyperstitionstud.io/quant</title>
|
<title>Quantitative Finance & Memetic Gematria Time-Series Workbench — hyperstitionstud.io/quant</title>
|
||||||
|
<link rel="stylesheet" href="../assets/hs-group3-basalt-chamfer.css?v=2.17.1" />
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-canvas: #020617;
|
--bg-canvas: #020617;
|
||||||
--bg-panel: #0f172a;
|
--bg-panel: #0c1324;
|
||||||
--bg-card: #1e293b;
|
--bg-card: #0c1324;
|
||||||
--bg-deep: #090d16;
|
--bg-deep: #090d16;
|
||||||
--border: #334155;
|
--border: #26344d;
|
||||||
--text-main: #f8fafc;
|
--text-main: #f8fafc;
|
||||||
--text-muted: #94a3b8;
|
--text-muted: #94a3b8;
|
||||||
--cyan: #22d3ee;
|
--cyan: #22d3ee;
|
||||||
@@ -35,58 +36,27 @@
|
|||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-left: 4px solid var(--gold);
|
border-left: 4px solid var(--gold);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1.1rem 1.4rem;
|
padding: 1.1rem 1.35rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
gap: 0.9rem;
|
gap: 0.85rem;
|
||||||
}
|
}
|
||||||
h1 { font-size: 1.18rem; font-weight: 700; color: var(--text-main); }
|
@media (max-width: 1220px) {
|
||||||
.subtitle { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.25rem; }
|
header { flex-wrap: wrap; }
|
||||||
.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;
|
|
||||||
}
|
}
|
||||||
|
h1 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
|
||||||
|
.subtitle { font-size: 0.71rem; color: var(--text-muted); margin-top: 0.25rem; }
|
||||||
|
.top-nav { margin-left: auto; display: flex; gap: 0.38rem; flex-wrap: nowrap; align-items: center; justify-content: flex-end; }
|
||||||
.btn, select {
|
.btn, select {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 0.42rem 0.72rem;
|
padding: 0.34rem 0.62rem;
|
||||||
font-size: 0.73rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -244,6 +214,102 @@
|
|||||||
.lag-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; height: 100%; justify-content: flex-end; }
|
.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-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); }
|
.lag-lbl { font-size: 0.63rem; color: var(--text-muted); }
|
||||||
|
.hs-info-icon {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid rgba(34, 211, 238, 0.6);
|
||||||
|
background: rgba(9, 13, 22, 0.9);
|
||||||
|
color: var(--cyan);
|
||||||
|
font-size: 0.62rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: 1;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 0.22rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
transition: all 0.14s ease;
|
||||||
|
}
|
||||||
|
.hs-info-icon:hover, .hs-info-icon:focus, .hs-info-icon.pinned {
|
||||||
|
border-color: var(--gold);
|
||||||
|
background: var(--gold);
|
||||||
|
color: #020617;
|
||||||
|
box-shadow: 0 0 8px rgba(245, 198, 48, 0.45);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
#quantInfoPopover {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 95;
|
||||||
|
max-width: 420px;
|
||||||
|
width: calc(100vw - 24px);
|
||||||
|
background: #0f172a;
|
||||||
|
border: 1px solid var(--cyan);
|
||||||
|
border-left: 4px solid var(--gold);
|
||||||
|
border-radius: 9px;
|
||||||
|
padding: 0.85rem 0.95rem;
|
||||||
|
box-shadow: 0 14px 34px rgba(0, 0, 0, 0.78);
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.55rem;
|
||||||
|
font-size: 0.73rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
.pop-hdr {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
padding-bottom: 0.35rem;
|
||||||
|
}
|
||||||
|
.pop-title { font-weight: 700; color: var(--gold); font-size: 0.77rem; }
|
||||||
|
.pop-close {
|
||||||
|
background: var(--bg-deep);
|
||||||
|
color: var(--text-muted);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0.1rem 0.42rem;
|
||||||
|
font-size: 0.65rem;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
.pop-close:hover { color: var(--text-main); border-color: var(--cyan); }
|
||||||
|
.pop-plain { color: var(--text-main); font-size: 0.73rem; }
|
||||||
|
.pop-quote {
|
||||||
|
background: var(--bg-deep);
|
||||||
|
border-left: 3px solid var(--cyan);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0.48rem 0.65rem;
|
||||||
|
font-size: 0.68rem;
|
||||||
|
color: #cbd5e1;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.pop-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.1rem; }
|
||||||
|
.tut-ui-highlight {
|
||||||
|
box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(245, 198, 48, 0.45) !important;
|
||||||
|
border-color: var(--gold) !important;
|
||||||
|
transition: box-shadow 0.18s ease, border-color 0.18s ease;
|
||||||
|
}
|
||||||
|
#tutUiElementIndicator {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 90;
|
||||||
|
background: #090d16;
|
||||||
|
color: var(--gold);
|
||||||
|
border: 1px solid var(--gold);
|
||||||
|
border-left: 4px solid var(--cyan);
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0.22rem 0.58rem;
|
||||||
|
font-size: 0.67rem;
|
||||||
|
font-weight: 700;
|
||||||
|
pointer-events: none;
|
||||||
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.78);
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
footer {
|
footer {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -253,23 +319,28 @@
|
|||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="quant-timeseries-data.js"></script>
|
<script src="quant-timeseries-data.js?v=2.17.1"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="title-row">
|
||||||
|
<span class="dot" style="background:var(--gold);box-shadow:0 0 10px var(--gold);" aria-hidden="true"></span>
|
||||||
<h1>hyperstitionstud.io/quant — Quantitative Finance & Memetic Gematria Time-Series Workbench</h1>
|
<h1>hyperstitionstud.io/quant — Quantitative Finance & Memetic Gematria Time-Series Workbench</h1>
|
||||||
<p class="subtitle">Strictly Periodic Telemetry (21:30 UTC US Closing Bell × 00:00 UTC News-Wire Dossiers) • Lens-Neutral Schema (urn:io:hyperstitionstud:quant-timeseries:v2.0.23)</p>
|
|
||||||
</div>
|
</div>
|
||||||
<nav class="top-nav">
|
<p class="subtitle">Strictly Periodic Telemetry (21:30 UTC US Closing Bell × 00:00 UTC News-Wire Dossiers • 24 Watchlist Instruments • 14 FRED Macro Series) • Lens-Neutral Schema (urn:io:hyperstitionstud:quant-timeseries:v2.17.1) <span class="hs-sigil-seal" aria-hidden="true">[ ⚚ · ☿ · ☍ · ☉ ]</span></p>
|
||||||
|
</div>
|
||||||
|
<nav class="top-nav hs-global-nav" aria-label="Primary Ecosystem Navigation">
|
||||||
<a class="btn" id="navHome" href="/">Portal Home (/)</a>
|
<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="navCalc" href="/calc/index.html">Calculator</a>
|
||||||
<a class="btn" id="navLearn" href="/learn/index.html">Learning Track (/learn/)</a>
|
<a class="btn primary" id="navQuant" aria-current="page" href="/quant/index.html">Quant</a>
|
||||||
<a class="btn" id="navCalc" href="/calc/index.html">AQ Calculator (/calc/)</a>
|
<a class="btn" id="navGraph" href="/graph/index.html" style="border-color:var(--cyan);color:var(--cyan);">Graph</a>
|
||||||
<a class="btn" id="navManual" href="/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" target="_blank">Operator's Manual (PDF)</a>
|
<a class="btn" id="navLearn" href="/learn/index.html" style="border-color:var(--emerald);color:var(--emerald);">Learn</a>
|
||||||
|
<a class="btn" id="navEng" href="/engineering/index.html">Engineering</a>
|
||||||
|
<a class="btn" id="navMath" href="/math/index.html">Math</a>
|
||||||
<span class="nav-donate-sep" aria-hidden="true"></span>
|
<span class="nav-donate-sep" aria-hidden="true"></span>
|
||||||
<a class="btn-donate-pill" id="navDonate" href="/donate/index.html" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
<a class="btn-donate-pill" id="navDonate" href="/donate/index.html?from=quant" title="Signal Patronage & Open-Instrument Notes (/donate/)"><span class="donate-pill-emblem" aria-hidden="true">♥</span><span>DONATE</span></a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -277,7 +348,10 @@
|
|||||||
<section class="panel" id="quantTutorialBar" aria-label="Interactive Tutorial Series Player">
|
<section class="panel" id="quantTutorialBar" aria-label="Interactive Tutorial Series Player">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<span class="panel-title">INTERACTIVE GUIDED CANVAS TOUR (5 Episodes × 5 Scenes = 25 Live Choreographed Walkthroughs • Zero-MP4)</span>
|
<span class="panel-title">INTERACTIVE GUIDED CANVAS TOUR (5 Episodes × 5 Scenes = 25 Live Choreographed Walkthroughs • Zero-MP4)</span>
|
||||||
|
<div style="display:flex;align-items:center;gap:0.5rem;">
|
||||||
<span class="panel-meta" id="tutStepBadge">Ep 01 • Scene 1/5</span>
|
<span class="panel-meta" id="tutStepBadge">Ep 01 • Scene 1/5</span>
|
||||||
|
<a class="btn" id="navManual" href="/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" target="_blank">Operator's Manual (PDF)</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pill-row" id="tutEpisodeTabs"></div>
|
<div class="pill-row" id="tutEpisodeTabs"></div>
|
||||||
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;">
|
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;">
|
||||||
@@ -297,22 +371,27 @@
|
|||||||
|
|
||||||
<section class="toolbar" aria-label="Workbench Controls">
|
<section class="toolbar" aria-label="Workbench Controls">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<span class="control-label">Guild Filter:</span>
|
<span class="control-label">Guild Filter:<button type="button" class="hs-info-icon" data-term-id="guild_filter" aria-label="Explain Guild Filter">i</button></span>
|
||||||
<div class="pill-row" id="guildFilterPills"></div>
|
<div class="pill-row" id="guildFilterPills"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="tickerSelect">Ticker:</label>
|
<label class="control-label" for="tickerSelect">Ticker:<button type="button" class="hs-info-icon" data-term-id="ticker_select" aria-label="Explain Ticker and TradingView">i</button></label>
|
||||||
|
<input type="text" id="tickerQuickFilter" placeholder="Filter symbol, entity, or AQ..." style="background:var(--bg-deep);color:var(--text-main);border:1px solid var(--border);padding:0.28rem 0.5rem;font-size:0.71rem;font-family:inherit;width:185px;" aria-label="Filter tickers by symbol, entity name, or AQ coordinate" />
|
||||||
<select id="tickerSelect"></select>
|
<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 ↗</a>
|
<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 ↗</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="lensSelect">Projection Lens:</label>
|
<label class="control-label" for="lensSelect">Projection Lens:<button type="button" class="hs-info-icon" data-term-id="projection_lens" aria-label="Explain Projection Lens">i</button></label>
|
||||||
<select id="lensSelect"></select>
|
<select id="lensSelect"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<span class="control-label">Metric Mode:</span>
|
<span class="control-label">Metric Mode:<button type="button" class="hs-info-icon" data-term-id="metric_mode" aria-label="Explain Metric Mode">i</button></span>
|
||||||
<div class="pill-row" id="metricModePills"></div>
|
<div class="pill-row" id="metricModePills"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<span class="control-label">Window:</span>
|
||||||
|
<div class="pill-row" id="timeWindowPills"></div>
|
||||||
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<button class="btn" id="prevDateBtn" title="Shortcut: Left Arrow">← Prev Day</button>
|
<button class="btn" id="prevDateBtn" title="Shortcut: Left Arrow">← 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>
|
<span id="activeDateBadge" style="font-size:0.76rem;font-weight:700;color:var(--gold);padding:0 0.35rem;">2026-11-30</span>
|
||||||
@@ -323,8 +402,15 @@
|
|||||||
<!-- PANEL 1: 3-Pane Synchronized Time-Series Canvas -->
|
<!-- PANEL 1: 3-Pane Synchronized Time-Series Canvas -->
|
||||||
<section class="panel">
|
<section class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<span class="panel-title" id="panel1Title">PANEL 1: Synchronized 3-Pane Time-Series Trajectory (Price/BPS × Spoken/Digit AQ × 00:00 GMT Wire Velocity × M1-M3 Regimes)</span>
|
<span class="panel-title"><span id="panel1Title">PANEL 1: Synchronized 3-Pane Time-Series Trajectory</span> <button type="button" class="hs-info-icon" data-term-id="entity_threshold" aria-label="Explain Entity Phonemic Threshold">i</button></span>
|
||||||
<span class="panel-meta" id="panel1Meta">Click or drag across canvas to scrub UTC dates • Gold = Scope 1 Self-Lock • Cyan = Scope 2 Ring Migration • Emerald = News Wire Co-Presence</span>
|
<span class="panel-meta" id="panel1Meta">
|
||||||
|
Click or drag across canvas to scrub UTC dates •
|
||||||
|
Gold = Scope 1 Self-Lock<button type="button" class="hs-info-icon" data-term-id="scope1_self_lock" aria-label="Explain Scope 1 Self-Lock">i</button> •
|
||||||
|
Cyan = Scope 2 Ring Migration<button type="button" class="hs-info-icon" data-term-id="scope2_ring_migration" aria-label="Explain Scope 2 Ring Migration">i</button> •
|
||||||
|
Emerald = News Wire Co-Presence<button type="button" class="hs-info-icon" data-term-id="scope3_wire_copresence" aria-label="Explain Scope 3 News Wire Co-Presence">i</button> •
|
||||||
|
Wire Eq<button type="button" class="hs-info-icon" data-term-id="wire_velocity_bars" aria-label="Explain 00:00 GMT Wire Velocity">i</button> •
|
||||||
|
Vol20d/Regimes<button type="button" class="hs-info-icon" data-term-id="vol20d_regimes" aria-label="Explain Vol20d and M1-M3 Regimes">i</button>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<canvas id="tsCanvas" width="1320" height="410"></canvas>
|
<canvas id="tsCanvas" width="1320" height="410"></canvas>
|
||||||
</section>
|
</section>
|
||||||
@@ -333,12 +419,13 @@
|
|||||||
<!-- PANEL 2: 24 Tickers x 30 UTC Days Contingent Lock Heatmap -->
|
<!-- PANEL 2: 24 Tickers x 30 UTC Days Contingent Lock Heatmap -->
|
||||||
<section class="panel">
|
<section class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<span class="panel-title">PANEL 2: Spatiotemporal Contingent Lock Heatmap (24 S1-S6 Tickers × 30 UTC Days)</span>
|
<span class="panel-title">PANEL 2: Spatiotemporal Contingent Lock Heatmap (24 S1-S6 Tickers × 30 UTC Days)<button type="button" class="hs-info-icon" data-term-id="heatmap_matrix" aria-label="Explain 24x30 Lock Heatmap">i</button></span>
|
||||||
<span class="panel-meta">Click any (Ticker, Date) cell to inspect • ↗ launches TradingView</span>
|
<span class="panel-meta">Click any (Ticker, Date) cell to inspect • ↗ launches TradingView</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="heatmap-wrap">
|
<div class="heatmap-wrap">
|
||||||
<table class="heatmap" id="heatmapTable"></table>
|
<table class="heatmap" id="heatmapTable"></table>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="heatmapPaginationBar" style="display:none;justify-content:space-between;align-items:center;margin-top:0.45rem;font-size:0.7rem;"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- PANEL 3: Cross-Sectional Date Inspector, Lens Projection & Memetic Equation Tape -->
|
<!-- PANEL 3: Cross-Sectional Date Inspector, Lens Projection & Memetic Equation Tape -->
|
||||||
@@ -351,7 +438,10 @@
|
|||||||
<div class="stat-box" id="lensProjectionCard"></div>
|
<div class="stat-box" id="lensProjectionCard"></div>
|
||||||
<div class="stat-box" id="docReferencesCard" style="border-left:3px solid var(--cyan);"></div>
|
<div class="stat-box" id="docReferencesCard" style="border-left:3px solid var(--cyan);"></div>
|
||||||
<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 style="display:flex;justify-content:space-between;align-items:center;gap:0.5rem;flex-wrap:wrap;margin-bottom:0.35rem;">
|
||||||
|
<div class="control-label" id="wireTapeHeader">Dated 00:00 GMT News-Wire Memetic Equations (333 / 666 / 777):</div>
|
||||||
|
<input type="text" id="wireTapeFilterInput" placeholder="Filter wire equations or AQ..." style="background:var(--bg-deep);color:var(--text-main);border:1px solid var(--border);padding:0.2rem 0.45rem;font-size:0.68rem;font-family:inherit;width:190px;" aria-label="Filter dated news-wire equations" />
|
||||||
|
</div>
|
||||||
<div class="eq-tape" id="wireEqTape"></div>
|
<div class="eq-tape" id="wireEqTape"></div>
|
||||||
</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>
|
<div class="stat-box" id="passagePreviewBox" style="display:none;border-left:3px solid var(--emerald);font-size:0.69rem;white-space:pre-wrap;"></div>
|
||||||
@@ -361,7 +451,7 @@
|
|||||||
<!-- PANEL 4: Lead-Lag Cross-Correlation Explorer & Portable CSV/JSON Export -->
|
<!-- PANEL 4: Lead-Lag Cross-Correlation Explorer & Portable CSV/JSON Export -->
|
||||||
<section class="panel">
|
<section class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<span class="panel-title">PANEL 4: Lead-Lag Cross-Correlation Explorer r(τ) (τ ∈ [-5 .. +5] Days) & Time-Series Export</span>
|
<span class="panel-title">PANEL 4: Lead-Lag Cross-Correlation Explorer r(τ) (τ ∈ [-5 .. +5] Days) & Time-Series Export<button type="button" class="hs-info-icon" data-term-id="lag_correlation_explorer" aria-label="Explain Lead-Lag Cross-Correlation Explorer">i</button></span>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<button class="btn" id="exportCsvBtn">Export Filtered Series (.CSV)</button>
|
<button class="btn" id="exportCsvBtn">Export Filtered Series (.CSV)</button>
|
||||||
<button class="btn" id="exportJsonBtn">Export Lens-Neutral Slice (.JSON)</button>
|
<button class="btn" id="exportJsonBtn">Export Lens-Neutral Slice (.JSON)</button>
|
||||||
@@ -371,11 +461,36 @@
|
|||||||
<p class="panel-meta" id="periodicityAuditFooter"></p>
|
<p class="panel-meta" id="periodicityAuditFooter"></p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- PANEL 5: Real Federal Reserve (FRED) Macroeconomic, Monetary & Aggregate Output Strip -->
|
||||||
|
<section class="panel" id="macroIndicatorsPanel" style="margin-top:0.9rem;">
|
||||||
|
<div class="panel-header">
|
||||||
|
<span class="panel-title">PANEL 5: Federal Reserve (FRED) Macroeconomic, Monetary & Aggregate Output Telemetry (CPI, PPI, US10Y, EFFR/SOFR, M2, M1-M2 Spread, Real M2, GDP, GNP/OUTBS/INDPRO)</span>
|
||||||
|
<span class="panel-meta">Native Cadence Preserved (1d / 1mo / 1q) • Zero Interpolation • Holiday/Missing = No data available</span>
|
||||||
|
</div>
|
||||||
|
<div class="inspector-grid" id="macroIndicatorsGrid" style="grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- PANEL 6: 5-Agenda Zero-Synthetic-Data Daily Portfolio & Memetic Regime Update (hs-daily-brief) -->
|
||||||
|
<section class="panel" id="dailyBriefPanel" style="margin-top:0.9rem;">
|
||||||
|
<div class="panel-header">
|
||||||
|
<span class="panel-title">PANEL 6: Daily Portfolio & Memetic Regime Update (5-Agenda Bayesian Brief • Zero Synthetic Data)</span>
|
||||||
|
<span class="panel-meta" id="dailyBriefMeta">3-State Bayesian Inference Over Extant Priors (R1 Bull / R2 Pinned Isometric / R3 Tail Drawdown)</span>
|
||||||
|
</div>
|
||||||
|
<div id="dailyBriefContainer" style="display:grid;grid-template-columns:repeat(auto-fit, minmax(340px, 1fr));gap:0.75rem;margin-top:0.5rem;"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div id="quantInfoPopover" role="dialog" aria-hidden="true"></div>
|
||||||
|
<div id="tutUiElementIndicator" role="status" aria-live="polite"></div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
hyperstitionstud.io/quant v2.0.23 • Made with <span class="hs-heart" style="color:#ff4d4d;">♥</span> by Lemurs.
|
hyperstitionstud.io/quant v2.17.1 • <span class="hs-sigil-colophon" aria-hidden="true">⚚ · ☿ · ☍ · ☉ · ♄</span> • Made with <span class="hs-heart" style="color:#ff4d4d;">♥</span> by Lemurs.
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<script src="quant-app.js"></script>
|
<script src="../assets/hs-matrix-coderain.js?v=2.17.1" defer></script>
|
||||||
<script src="quant-tutorials.js"></script>
|
<script src="../assets/hs-mobile-ui.js?v=2.17.1" defer></script>
|
||||||
|
<script src="real-macro-indicators-data.js?v=2.17.1"></script>
|
||||||
|
<script src="daily-brief-data.js?v=2.17.1"></script>
|
||||||
|
<script src="quant-app.js?v=2.17.1"></script>
|
||||||
|
<script src="quant-tutorials.js?v=2.17.1"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
|
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
|
||||||
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.0.23)
|
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.17.1)
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
@@ -27,6 +27,207 @@
|
|||||||
|
|
||||||
let activeSpotlight = null;
|
let activeSpotlight = null;
|
||||||
|
|
||||||
|
const GLOSSARY_PDF = "/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf";
|
||||||
|
const MANUAL_PDF = "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf";
|
||||||
|
|
||||||
|
const QUANT_TERM_GLOSSARY = {
|
||||||
|
guild_filter: {
|
||||||
|
title: "Guild Filter (ALL / S1–S6)",
|
||||||
|
plain_english: "Filters the 24 market tickers by their primary technocapital sector ('Guild'): S1 covers AI models and cloud software, S2 covers high-frequency trading and crypto liquidity, S3 covers semiconductor fabs and defense hardware, S4 covers telecom carrier waves, S5 covers biotech/pharma, and S6 covers giant asset managers and banks.",
|
||||||
|
glossary_quote: "Co-primary coupling between the Machinic Phylum (Classes S1–S5: models, HFT algorithms, EUV fabs, carrier waves, wetware) and Capital Organizational Capture (Class S6).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=3&search=Double%20Articulation",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Periodicity"
|
||||||
|
},
|
||||||
|
ticker_select: {
|
||||||
|
title: "Ticker & TradingView Launcher (↗)",
|
||||||
|
plain_english: "Selects which of the 24 tracked companies or assets to inspect across all four panels. Clicking 'Open TradingView Chart ↗' (or pressing T) opens that asset's live market chart on TradingView in a new browser tab without loading any external tracking scripts on this page.",
|
||||||
|
glossary_quote: "A tracked real-world financial or industrial figure attached to an S1–S6 entity (lazarus_heist_6b = '$6B' / 'siks bilyan' [211]; anthropic_ipo_price_83 = '$83' [202] -> '$89' [193]).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=8&search=Quantitative%20Economic%20Anchor",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=TradingView"
|
||||||
|
},
|
||||||
|
projection_lens: {
|
||||||
|
title: "Projection Lens (LENS_REGISTRY)",
|
||||||
|
plain_english: "Changes the vocabulary used in Panel 3 to describe the exact same six underlying math scores. You can view the readout in plain math terms (Neutral Math), institutional investing terms (Quant Factor), executive governance terms (Corporate Board), ecological tier ratings (TierZoo), fantasy sports stats (Fantasy Sabermetrics), or Pokédex scanner stats.",
|
||||||
|
glossary_quote: "The analytical gain achieved by reading Gen 0 (stated legal/filing form) and Gen 1 (operational phonemic stream) stereoscopically across Academic, Corporate Board, Out-of-Sample Fund Manager, and Fantasy Football registers.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=7&search=Vector%20G6",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
metric_mode: {
|
||||||
|
title: "Metric Mode (Spoken AQ / USD / BPS / Digit AQ)",
|
||||||
|
plain_english: "Chooses what the cyan line in the top chart plots over the 30-day timeline: Spoken AQ (Gen 1) scores the spoken English words for the closing price after stripping silent letters; Close Price (USD) plots the raw dollar price; Move (BPS) plots the daily percentage move in basis points (100 bps = 1%); and Digit AQ sums the raw digits of the price.",
|
||||||
|
glossary_quote: "Continuous Base-36 character-valuation cipher (formulated by Jim Lees in 1976 and adopted by the Ccru) where digits 0–9 map to face values 0–9 and letters A–Z map to 10–35 (case-insensitive; non-alphanumeric symbols = 0).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=1&search=Alphanumeric%20Qabbala",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Spoken"
|
||||||
|
},
|
||||||
|
entity_threshold: {
|
||||||
|
title: "Entity Phonemic Threshold (Dashed Crimson Line)",
|
||||||
|
plain_english: "The horizontal dashed red line marks the numerical score of the company's own name when spelled strictly by how it sounds out loud in Gen 1 Ingglish (for example, Nvidia -> envideea = 137, ASML -> asml = 81). When the cyan curve touches this line, the market price or daily move matches the company's own name.",
|
||||||
|
glossary_quote: "Deterministic phonemic English orthography backed by the 126,051-word CMU Pronouncing Dictionary (ingglish npm package) that strips silent etymological letters and maps each ARPAbet phoneme to a single invariant spelling.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=1&search=Phonemic%20Ingglish",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Crimson"
|
||||||
|
},
|
||||||
|
scope1_self_lock: {
|
||||||
|
title: "Gold Beacon = Scope 1 Self-Lock or Repdigit Attractor",
|
||||||
|
plain_english: "A glowing gold circle on the curve means a real exchange bar's closing price or daily basis-point move landed on the exact number of the asset's own name (such as Palantir closing at $159.36 -> 159 == palanter) or hit a repeating three-digit number divisible by 37 (such as Broadcom closing at $333.40 -> 333).",
|
||||||
|
glossary_quote: "Forbids matching quantitative figures to random unrelated dictionary words; counter-substitutions are strictly restricted to: (1) Intra-Instrument Self-Locks (price or bps == entity's own AQ)...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=9&search=Contingent%20Repricing%20Scope%20Rule",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Scope%201"
|
||||||
|
},
|
||||||
|
scope2_ring_migration: {
|
||||||
|
title: "Cyan Beacon = Scope 2 Sector Ring Migration",
|
||||||
|
plain_english: "A cyan dot on the curve means the asset's price, spoken price score, or daily basis-point move landed on one of the 30 core supply-chain coordinates shared across the S1–S6 ecosystem (such as 71, 81, 125, 137, 163, 193, 211, 256, or 292), linking that day's market action to a broader sector hub.",
|
||||||
|
glossary_quote: "Tracks which S1–S6 equivalence partners a spoken figure exits and enters when repriced (e.g., 'siks bilyan' [211 == wor masheen == koper waier] migrating to 'sevan bilyan' [222 = 6 x 37]).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=9&search=Type%202%20Revision",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Scope%202"
|
||||||
|
},
|
||||||
|
scope3_wire_copresence: {
|
||||||
|
title: "Emerald Bar = Scope 3 News-Wire Co-Presence",
|
||||||
|
plain_english: "In the middle bar chart, bars turn emerald green on days when that specific company was also named in the breaking midnight (00:00 UTC) news wire. This enforces 'The Room Filter': we only flag a high-conviction signal when the news story and the market observation happen on the same day.",
|
||||||
|
glossary_quote: "'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet before their AQ identity is admitted as a real singularity.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=10&search=Room%20Filter",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Scope%203"
|
||||||
|
},
|
||||||
|
wire_velocity_bars: {
|
||||||
|
title: "Wire Eq (00:00 GMT News-Wire Equation Velocity)",
|
||||||
|
plain_english: "The middle pane's vertical bars count how many verified 333, 666, and 777 phonemic equations were harvested from that day's breaking midnight (00:00 GMT) news dossier. Taller bars indicate heavier cross-scale resonance in the global news cycle on that date.",
|
||||||
|
glossary_quote: "The three cross-scale target sums of every archive dossier (10 verified equations per scale = 30 per dossier), all governed by the prime generator 37 (3 x 37 = 111).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=1&search=Primary%20Repdigit%20Attractors",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Middle%20Pane"
|
||||||
|
},
|
||||||
|
vol20d_regimes: {
|
||||||
|
title: "Vol20d & M1–M3 Thermodynamic Regimes",
|
||||||
|
plain_english: "The bottom pane plots the day's trading volume relative to its 20-day average (Vol20d) and colors each bar by market regime: Gold (< 0.45x volume) marks M1 supply freezes/halts; Crimson (>= 2.5x volume or <= -5% drop) marks M2 flash-crash surges; and Sky-Blue marks normal M3 large-cap trading.",
|
||||||
|
glossary_quote: "Methodological rule forbidding global dictionary fishing of horror/mythic tropes into unrelated stories: a memetic subclass M1–M6 may be invoked ONLY when (Gate 1) the news event exhibits the matching real-world thermodynamic state...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=5&search=State-Gated%20Inheritance",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Vol20d"
|
||||||
|
},
|
||||||
|
heatmap_matrix: {
|
||||||
|
title: "Panel 2: 24 × 30 Spatiotemporal Lock Heatmap",
|
||||||
|
plain_english: "A bird's-eye grid showing all 24 tickers (rows) across all 30 November UTC days (columns). Gold cells mark Scope 1 self-locks, cyan cells mark Scope 2 sector ring hits, green outlines mark midnight news-wire co-presence, and striped cells mark closed/unavailable sessions ('No data available').",
|
||||||
|
glossary_quote: "Shared numerical coordinates through which one singularity guild feeds or captures another across the technocapital food web (e.g., 211 linking S2 HFT, S3 Copper/War Machine, S4 Carrier Wave, and S6 $6B Heist).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=8&search=Trophic%20Supply-Chain%20Bridges",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Heatmap"
|
||||||
|
},
|
||||||
|
box_close_usd: {
|
||||||
|
title: "Close USD (Change bps)",
|
||||||
|
plain_english: "The official 21:30 UTC (4:30 PM EST) US closing-bell price in US dollars for the selected date, alongside the day's percentage move expressed in basis points (100 bps = 1.00%). When the market was closed or no public feed exists, this box explicitly reports 'No data available'.",
|
||||||
|
glossary_quote: "CLI mode governing numeric tokens: 'off' (default 100% pure lexical/qualitative mode stripping numeric figures), 'spoken' (converting figures to spoken English -> Ingglish), and 'digit' (literal Base-36 digit sum).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=9&search=Tri-Modal%20Quantitative%20Handling",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Close"
|
||||||
|
},
|
||||||
|
box_spoken_close: {
|
||||||
|
title: "Spoken Close (Gen 1 AQ)",
|
||||||
|
plain_english: "Translates the integer dollar closing price into spoken English words, strips silent letters into Gen 1 phonemic Ingglish (for example, $150 -> 'one hundred fifty' -> 'wuhn huhndrad fiftee'), and sums its Base-36 character score.",
|
||||||
|
glossary_quote: "Tracks which S1–S6 equivalence partners a spoken figure exits and enters when repriced (e.g., 'siks bilyan' [211 == wor masheen == koper waier] migrating to 'sevan bilyan' [222 = 6 x 37]).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=9&search=Type%202%20Revision",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Spoken"
|
||||||
|
},
|
||||||
|
box_scaled_cap: {
|
||||||
|
title: "Scaled Cap (Gen 1 AQ)",
|
||||||
|
plain_english: "Takes the asset's reported market capitalization string (such as '$1.20T' or '$43B'), expands it into spoken phonemic Ingglish, and computes its Base-36 AQ score. If the feed does not report a daily market cap for that ticker, it explicitly states 'No data available'.",
|
||||||
|
glossary_quote: "Activates under sovereign megaprojects, tech giants, trillion-dollar consolidation, and grid capture. Signature locks: kansorsheea == 189; leevaiathan == 179; monohpolee == 192.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=5&search=Subclass%20M3",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Panel%203"
|
||||||
|
},
|
||||||
|
box_bps_vol: {
|
||||||
|
title: "BPS Spoken AQ / Vol20d",
|
||||||
|
plain_english: "Shows the phonemic Base-36 AQ score of the day's unsigned basis-point move alongside Vol20d (how many times normal 20-day average trading volume changed hands on that date).",
|
||||||
|
glossary_quote: "Covers microsecond algorithmic order books, flash crashes, fiber-optic latency, derivatives, and crypto ledgers. Signature coordinates: 256 (akselerayshan == hai-freekwansee), 193 (flash krash == anthropik)...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=4&search=Class%20S2",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Vol20d"
|
||||||
|
},
|
||||||
|
box_active_locks: {
|
||||||
|
title: "Active Contingent Locks",
|
||||||
|
plain_english: "Lists every Scope 1 self-lock (where price or move matches the asset's own name or a 37 × k repdigit) and Scope 2 sector ring coordinate (Ring 71, Ring 81, Ring 125, Ring 163, etc.) triggered by real exchange data on the selected date.",
|
||||||
|
glossary_quote: "The 13 Ingglish AQ coordinates that simultaneously belong to 2–4 distinct Assemblage Builds and act as regime-reallocation pivots: 292, 256, 211, 193, 183, 153, 137, 136, 133, 125, 95, 91, and 81.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=7&search=Multi-Build%20Hybrid",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Scope"
|
||||||
|
},
|
||||||
|
box_wire_copresent: {
|
||||||
|
title: "00:00 GMT Wire Co-Present",
|
||||||
|
plain_english: "Indicates YES (Scope 3 Lock) when the company's name or ticker symbol appeared verbatim in that same UTC date's midnight news-wire dossier (25..71-dossier-news-YYYY-MM-DD.md), confirming real-world news and market co-presence.",
|
||||||
|
glossary_quote: "'Grand Central Station' names the statistical crowding of 4-to-5-letter Base-36 words in the 65–140 interval; 'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=10&search=Grand%20Central%20Station",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Scope%203"
|
||||||
|
},
|
||||||
|
lens_archetype: {
|
||||||
|
title: "Archetype & Tier Classification",
|
||||||
|
plain_english: "Summarizes the asset's 30-day behavioral profile—whether it acts as a steady 'Ironclad Floor' chokepoint with consistent daily locks or a high-volatility 'Templex Boom/Bust' surge asset—and grades its overall structural score from Tier S+ (Apex) to Tier D (Periphery).",
|
||||||
|
glossary_quote: "Tier S+ (88–100 ETI, Crimson #FF4D4D: Apex Predator — #1 S1 AI [93], #2 S2 Liquidity [90]); Tier S (80–87 ETI, Coral #FF7F7F: Keystone Dominator — #3 S6 Capture [87], #4 S3 War Machine [83])...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=8&search=Zoological%20Ecological%20Tiers",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
ts_duty_cycle_pct: {
|
||||||
|
title: "Duty Cycle % / SNAP% / Active Signal Rate",
|
||||||
|
plain_english: "The percentage of available trading days in the window where this ticker fired at least one verified Scope 1/2 coordinate lock or Scope 3 midnight news-wire match. A higher percentage means the asset is consistently active in the signal stream.",
|
||||||
|
glossary_quote: "Standalone 0–100 zoological grading standard for Technocapital Singularity Taxa & Assemblage Builds, computed as the weighted composite of six normalized base stats: ETI = round(0.20*CAP + 0.18*COL + 0.18*ARM + 0.16*PRM + 0.14*VEL + 0.14*RES).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=7&search=Ecological%20Trophic",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
ts_weighted_resonance: {
|
||||||
|
title: "Weighted Resonance / WOPR",
|
||||||
|
plain_english: "Combines how often the ticker appears in the midnight news wire (1.5x weight) with its share of volume-weighted price movement on locked days (0.7x weight). It measures whether an asset is driving both headline attention and capital movement at the same time.",
|
||||||
|
glossary_quote: "Highest-weighted zoological stat (0.20), scoring S[1–5] x S6 Double Articulation, cross-guild trophic bridge count, and G2 Cross-Generation Twin density.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=8&search=CAP",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
ts_excess_over_replacement: {
|
||||||
|
title: "Excess Value Over Baseline / WAR (30d)",
|
||||||
|
plain_english: "Measures how many more coordinate locks and resonance points this asset produced over its trading sessions compared to a Tier D replacement baseline. Positive values indicate structural outperformance above random numerical noise.",
|
||||||
|
glossary_quote: "Plain-English Fantasy Football translations of Vector G1 Variance Collapse ('Stack Lock' — when 3+ assets that look different on paper snap onto the exact same number in Ingglish) and Vector G4 Isometric Invariance ('All-Weather Chokepoint').",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=10&search=Stack%20Lock",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
ts_quantile_profile: {
|
||||||
|
title: "Quantile Profile (P20 Floor / P90 Ceiling / Boom% / CV)",
|
||||||
|
plain_english: "Breaks down the distribution of the asset's daily resonance points: P20 is its quiet-day baseline floor, P90 is its peak-day ceiling, Boom% is the share of days with major multi-lock spikes (>= 3.5 pts), and CV (coefficient of variation) measures how spiky versus steady the signal is.",
|
||||||
|
glossary_quote: "Quantifies a build's concentration of G4 Isometric Fixed Points (Delta = 0 chokepoints like ASML=81, TSMC=91, GPU=71, kapatal=125, charter=136) that remain numerically unperturbed across orthographic regimes.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=7&search=ARM",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
ts_optimal_lag_days: {
|
||||||
|
title: "Optimal Causal Lag τ* (Days)",
|
||||||
|
plain_english: "The day offset τ* in [-5, +5] where midnight news-wire activity and the ticker's price volatility correlate most strongly. Positive τ* > 0 means news-wire surges lead price volatility by τ* days; τ* = 0 means they move on the same day; negative τ* < 0 means headlines follow after the price move.",
|
||||||
|
glossary_quote: "Cybernetic runaway (ruhnaway = 183 == tempaleks == laytansee) in which positive feedback (pozativ feedbak = 269 [57th PRIME]) folds future attractor states backward to assemble their own material preconditions.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=3&search=Teleoplexy",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Correlation"
|
||||||
|
},
|
||||||
|
ts_regime_splits: {
|
||||||
|
title: "Conditional Regime Splits (M1 / M2 / M3)",
|
||||||
|
plain_english: "Shows the ticker's average daily resonance delta during M1 supply-freeze days, M2 flash-crash/high-volume surge days, and M3 mega-cap days. If a regime did not occur during the window, its split is reported as null ('No data available').",
|
||||||
|
glossary_quote: "Lineup/portfolio pivot at 137 [33rd PRIME] (daireeoh == envideea == hawlts == inersha): if a foundry delay or regulatory freeze halts the offensive line, reallocate immediately across the 137 bridge...",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=10&search=Supply-Halt%20Insurance%20Pivot",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=LENS_REGISTRY"
|
||||||
|
},
|
||||||
|
lag_correlation_explorer: {
|
||||||
|
title: "Lead-Lag Cross-Correlation Explorer r(τ)",
|
||||||
|
plain_english: "This 11-bar chart measures the statistical correlation r(τ) in [-1, +1] between daily midnight news-wire equation counts and the ticker's daily price swing across time shifts from -5 days to +5 days. The gold bar highlights the strongest lead-lag relationship (τ*).",
|
||||||
|
glossary_quote: "Landian terms for non-linear temporal folding in cybernetic markets: taim-serkat (207 == terbyalans == Gen 0 'infinitive') and tempaleks (183 == ruhnaway == laytansee == dhrakoola).",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=3&search=Time-Circuit",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=2&search=Correlation"
|
||||||
|
},
|
||||||
|
periodicity_gate_badge: {
|
||||||
|
title: "Periodicity Gate Enforced",
|
||||||
|
plain_english: "Confirms that every data point in /quant/ comes strictly from daily timestamped observations (21:30 UTC market close and 00:00 UTC news rollover), with zero undated dictionary lists or static essays mixed into the time-series math.",
|
||||||
|
glossary_quote: "'The Room Filter' requires that equated terms co-occur within a contingent historical event, supply chain, or balance sheet before their AQ identity is admitted as a real singularity.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=10&search=Room%20Filter",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Periodicity"
|
||||||
|
},
|
||||||
|
cidv1_provenance: {
|
||||||
|
title: "IPLD dag-json CIDv1 (baguqeera...)",
|
||||||
|
plain_english: "A cryptographic content fingerprint (CIDv1) computed over the entire time-series bundle. If even a single price, date, or equation changes by one character, this baguqeera... hash changes—proving the readout you see matches the verified archive byte-for-byte.",
|
||||||
|
glossary_quote: "Audit requirement that every Ingglish token in a technocapital dossier match unmodified ingglish.translate() output from CMUdict with 0 ad-hoc spelling tweaks.",
|
||||||
|
glossary_pdf_link: GLOSSARY_PDF + "#page=1&search=CMUdict%20Purity",
|
||||||
|
manual_pdf_link: MANUAL_PDF + "#page=1&search=Schema"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function makeInfoIconHtml(termId) {
|
||||||
|
const entry = QUANT_TERM_GLOSSARY[termId];
|
||||||
|
const lbl = entry ? ("Explain " + entry.title) : ("Explain " + termId);
|
||||||
|
return "<button type='button' class='hs-info-icon' data-term-id='" + termId + "' aria-label='" + lbl.replace(/'/g, "'") + "'>i</button>";
|
||||||
|
}
|
||||||
|
|
||||||
function findLatestAvailableDateIdx(sym) {
|
function findLatestAvailableDateIdx(sym) {
|
||||||
const inst = DATA.instruments.find((x) => x.symbol === sym) || DATA.instruments[0];
|
const inst = DATA.instruments.find((x) => x.symbol === sym) || DATA.instruments[0];
|
||||||
if (!inst || !inst.bars) return DATA.dates_utc.length - 1;
|
if (!inst || !inst.bars) return DATA.dates_utc.length - 1;
|
||||||
@@ -42,9 +243,21 @@
|
|||||||
selectedLens: DATA.default_lens || "fund_manager",
|
selectedLens: DATA.default_lens || "fund_manager",
|
||||||
metricMode: "spoken_aq", // "spoken_aq" | "close_usd" | "change_bps" | "digit_aq"
|
metricMode: "spoken_aq", // "spoken_aq" | "close_usd" | "change_bps" | "digit_aq"
|
||||||
selectedDateIdx: findLatestAvailableDateIdx("NVDA"),
|
selectedDateIdx: findLatestAvailableDateIdx("NVDA"),
|
||||||
|
timeWindowDays: 30, // 30 | 90 | 180 | 0 (ALL)
|
||||||
|
tickerSearchQuery: "",
|
||||||
|
heatmapPage: 0,
|
||||||
|
heatmapPageSize: 25,
|
||||||
|
heatmapShowAll: false,
|
||||||
|
wireTapeQuery: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const guilds = ["ALL", "S1", "S2", "S3", "S4", "S5", "S6"];
|
const guilds = ["ALL", "S1", "S2", "S3", "S4", "S5", "S6", "DOSE_D3"];
|
||||||
|
const timeWindows = [
|
||||||
|
{ days: 30, label: "30D" },
|
||||||
|
{ days: 90, label: "90D" },
|
||||||
|
{ days: 180, label: "180D" },
|
||||||
|
{ days: 0, label: "ALL" },
|
||||||
|
];
|
||||||
const modes = [
|
const modes = [
|
||||||
{ id: "spoken_aq", label: "Spoken AQ (Gen 1)" },
|
{ id: "spoken_aq", label: "Spoken AQ (Gen 1)" },
|
||||||
{ id: "close_usd", label: "Close Price (USD)" },
|
{ id: "close_usd", label: "Close Price (USD)" },
|
||||||
@@ -53,18 +266,50 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
const elGuildPills = document.getElementById("guildFilterPills");
|
const elGuildPills = document.getElementById("guildFilterPills");
|
||||||
|
const elTickerQuickFilter = document.getElementById("tickerQuickFilter");
|
||||||
const elTickerSelect = document.getElementById("tickerSelect");
|
const elTickerSelect = document.getElementById("tickerSelect");
|
||||||
const elLensSelect = document.getElementById("lensSelect");
|
const elLensSelect = document.getElementById("lensSelect");
|
||||||
const elModePills = document.getElementById("metricModePills");
|
const elModePills = document.getElementById("metricModePills");
|
||||||
|
const elTimeWindowPills = document.getElementById("timeWindowPills");
|
||||||
|
const elWireTapeFilter = document.getElementById("wireTapeFilterInput");
|
||||||
const elDateBadge = document.getElementById("activeDateBadge");
|
const elDateBadge = document.getElementById("activeDateBadge");
|
||||||
const elTvBtn = document.getElementById("openTradingViewBtn");
|
const elTvBtn = document.getElementById("openTradingViewBtn");
|
||||||
const elPanel3TvBtn = document.getElementById("panel3TvBtn");
|
const elPanel3TvBtn = document.getElementById("panel3TvBtn");
|
||||||
const canvas = document.getElementById("tsCanvas");
|
const canvas = document.getElementById("tsCanvas");
|
||||||
const ctx = canvas.getContext("2d");
|
const ctx = canvas.getContext("2d");
|
||||||
|
|
||||||
|
function getActiveDateRange() {
|
||||||
|
const total = DATA.dates_utc.length;
|
||||||
|
if (!state.timeWindowDays || state.timeWindowDays <= 0 || state.timeWindowDays >= total) {
|
||||||
|
return { startIdx: 0, endIdx: total };
|
||||||
|
}
|
||||||
|
return { startIdx: Math.max(0, total - state.timeWindowDays), endIdx: total };
|
||||||
|
}
|
||||||
|
|
||||||
|
function instrumentHasDoseD3(inst) {
|
||||||
|
return (inst.bars || []).some((b) => b.data_available && Number(b.confluence_dose || 0) >= 3);
|
||||||
|
}
|
||||||
|
|
||||||
function getFilteredInstruments() {
|
function getFilteredInstruments() {
|
||||||
if (state.guildFilter === "ALL") return DATA.instruments;
|
let base = DATA.instruments;
|
||||||
return DATA.instruments.filter((inst) => inst.guilds.indexOf(state.guildFilter) !== -1);
|
if (state.guildFilter === "DOSE_D3") {
|
||||||
|
const d3 = DATA.instruments.filter(instrumentHasDoseD3);
|
||||||
|
base = d3.length ? d3 : DATA.instruments;
|
||||||
|
} else if (state.guildFilter !== "ALL") {
|
||||||
|
base = DATA.instruments.filter((inst) => inst.guilds.indexOf(state.guildFilter) !== -1);
|
||||||
|
}
|
||||||
|
const q = (state.tickerSearchQuery || "").trim().toLowerCase();
|
||||||
|
if (!q) return base;
|
||||||
|
const matched = base.filter((inst) => {
|
||||||
|
return (
|
||||||
|
String(inst.symbol || "").toLowerCase().includes(q) ||
|
||||||
|
String(inst.entity_eng || "").toLowerCase().includes(q) ||
|
||||||
|
String(inst.entity_ing || "").toLowerCase().includes(q) ||
|
||||||
|
String(inst.entity_ing_aq || "") === q ||
|
||||||
|
String(inst.entity_eng_aq || "") === q
|
||||||
|
);
|
||||||
|
});
|
||||||
|
return matched.length ? matched : base;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSelectedInstrument() {
|
function getSelectedInstrument() {
|
||||||
@@ -94,7 +339,7 @@
|
|||||||
guilds.forEach((g) => {
|
guilds.forEach((g) => {
|
||||||
const btn = document.createElement("button");
|
const btn = document.createElement("button");
|
||||||
btn.className = "pill" + (state.guildFilter === g ? " active" : "");
|
btn.className = "pill" + (state.guildFilter === g ? " active" : "");
|
||||||
btn.textContent = g;
|
btn.textContent = g === "DOSE_D3" ? "\u0394 Dose D\u22653 (19d)" : g;
|
||||||
btn.onclick = function () {
|
btn.onclick = function () {
|
||||||
state.guildFilter = g;
|
state.guildFilter = g;
|
||||||
const list = getFilteredInstruments();
|
const list = getFilteredInstruments();
|
||||||
@@ -149,14 +394,54 @@
|
|||||||
elModePills.appendChild(btn);
|
elModePills.appendChild(btn);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Sliding Temporal Window Pills (Strategy 1A: 30D | 90D | 180D | ALL)
|
||||||
|
if (elTimeWindowPills) {
|
||||||
|
elTimeWindowPills.innerHTML = "";
|
||||||
|
timeWindows.forEach((tw) => {
|
||||||
|
const btn = document.createElement("button");
|
||||||
|
btn.className = "pill" + (state.timeWindowDays === tw.days ? " active" : "");
|
||||||
|
btn.textContent = tw.label;
|
||||||
|
btn.onclick = function () {
|
||||||
|
state.timeWindowDays = tw.days;
|
||||||
|
const rng = getActiveDateRange();
|
||||||
|
if (state.selectedDateIdx < rng.startIdx) state.selectedDateIdx = rng.endIdx - 1;
|
||||||
|
renderAll();
|
||||||
|
};
|
||||||
|
elTimeWindowPills.appendChild(btn);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
elDateBadge.textContent = DATA.dates_utc[state.selectedDateIdx];
|
elDateBadge.textContent = DATA.dates_utc[state.selectedDateIdx];
|
||||||
updateTradingViewLinks();
|
updateTradingViewLinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (elTickerQuickFilter) {
|
||||||
|
elTickerQuickFilter.addEventListener("input", function () {
|
||||||
|
state.tickerSearchQuery = elTickerQuickFilter.value || "";
|
||||||
|
state.heatmapPage = 0;
|
||||||
|
const list = getFilteredInstruments();
|
||||||
|
if (list.length && !list.some((x) => x.symbol === state.selectedSymbol)) {
|
||||||
|
state.selectedSymbol = list[0].symbol;
|
||||||
|
}
|
||||||
|
renderAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (elWireTapeFilter) {
|
||||||
|
elWireTapeFilter.addEventListener("input", function () {
|
||||||
|
state.wireTapeQuery = elWireTapeFilter.value || "";
|
||||||
|
renderInspectorAndLens();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function drawCanvas() {
|
function drawCanvas() {
|
||||||
const inst = getSelectedInstrument();
|
const inst = getSelectedInstrument();
|
||||||
const bars = inst.bars;
|
const rng = getActiveDateRange();
|
||||||
|
const bars = inst.bars.slice(rng.startIdx, rng.endIdx);
|
||||||
|
const datesSlice = DATA.dates_utc.slice(rng.startIdx, rng.endIdx);
|
||||||
|
const wireSlice = DATA.daily_wire_series.slice(rng.startIdx, rng.endIdx);
|
||||||
const N = bars.length;
|
const N = bars.length;
|
||||||
|
const localSelIdx = Math.max(0, Math.min(N - 1, state.selectedDateIdx - rng.startIdx));
|
||||||
const W = canvas.width;
|
const W = canvas.width;
|
||||||
const H = canvas.height;
|
const H = canvas.height;
|
||||||
ctx.clearRect(0, 0, W, H);
|
ctx.clearRect(0, 0, W, H);
|
||||||
@@ -175,7 +460,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Selected date vertical crosshair
|
// Selected date vertical crosshair
|
||||||
const selX = xAt(state.selectedDateIdx);
|
const selX = xAt(localSelIdx);
|
||||||
ctx.strokeStyle = "rgba(245, 198, 48, 0.45)";
|
ctx.strokeStyle = "rgba(245, 198, 48, 0.45)";
|
||||||
ctx.lineWidth = 1.5;
|
ctx.lineWidth = 1.5;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@@ -284,14 +569,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Middle Pane: 00:00 GMT News Wire Equation Counts + Co-Presence Diamonds
|
// 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 wireTotals = wireSlice.map((d) => Number(d.equation_counts.total || 0));
|
||||||
const maxW = Math.max(10, Math.max.apply(null, wireTotals));
|
const maxW = Math.max(10, Math.max.apply(null, wireTotals));
|
||||||
const barW = Math.max(6, Math.floor(plotW / N) - 5);
|
const barW = Math.max(2, Math.floor(plotW / Math.max(1, N)) - 3);
|
||||||
|
|
||||||
wireTotals.forEach((wt, idx) => {
|
wireTotals.forEach((wt, idx) => {
|
||||||
const px = xAt(idx);
|
const px = xAt(idx);
|
||||||
const bh = (wt / maxW) * (midY1 - midY0 - 14);
|
const bh = (wt / maxW) * (midY1 - midY0 - 14);
|
||||||
ctx.fillStyle = bars[idx].co_present_in_news_wire ? "#34d399" : "#a78bfa";
|
ctx.fillStyle = bars[idx] && bars[idx].co_present_in_news_wire ? "#34d399" : "#a78bfa";
|
||||||
ctx.fillRect(px - barW / 2, midY1 - bh, barW, bh);
|
ctx.fillRect(px - barW / 2, midY1 - bh, barW, bh);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -315,9 +600,10 @@
|
|||||||
ctx.fillText("Wire Eq", 6, midY0 + 12);
|
ctx.fillText("Wire Eq", 6, midY0 + 12);
|
||||||
ctx.fillText("Vol20d", 6, botY0 + 12);
|
ctx.fillText("Vol20d", 6, botY0 + 12);
|
||||||
|
|
||||||
// Date ticks along bottom
|
// Date ticks along bottom (adaptive step so labels never overlap as N grows)
|
||||||
for (let i = 0; i < N; i += 4) {
|
const tickStep = Math.max(4, Math.ceil(N / 8));
|
||||||
ctx.fillText(DATA.dates_utc[i].slice(5), xAt(i) - 14, H - 4);
|
for (let i = 0; i < N; i += tickStep) {
|
||||||
|
ctx.fillText(datesSlice[i].slice(5), xAt(i) - 14, H - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optional Tutorial Spotlight Ring & Callout Banner on Canvas
|
// Optional Tutorial Spotlight Ring & Callout Banner on Canvas
|
||||||
@@ -353,21 +639,32 @@
|
|||||||
|
|
||||||
function renderHeatmap() {
|
function renderHeatmap() {
|
||||||
const tbl = document.getElementById("heatmapTable");
|
const tbl = document.getElementById("heatmapTable");
|
||||||
|
const pagBar = document.getElementById("heatmapPaginationBar");
|
||||||
const filtered = getFilteredInstruments();
|
const filtered = getFilteredInstruments();
|
||||||
|
const rng = getActiveDateRange();
|
||||||
|
const totalRows = filtered.length;
|
||||||
|
const pageSize = state.heatmapShowAll ? Math.max(1, totalRows) : state.heatmapPageSize;
|
||||||
|
const totalPages = Math.max(1, Math.ceil(totalRows / pageSize));
|
||||||
|
if (state.heatmapPage >= totalPages) state.heatmapPage = totalPages - 1;
|
||||||
|
const rowStart = state.heatmapShowAll ? 0 : state.heatmapPage * pageSize;
|
||||||
|
const pageSlice = filtered.slice(rowStart, rowStart + pageSize);
|
||||||
|
|
||||||
let html = "<thead><tr><th class='sym-col'>Ticker (TV)</th>";
|
let html = "<thead><tr><th class='sym-col'>Ticker (TV)</th>";
|
||||||
DATA.dates_utc.forEach((dt, idx) => {
|
for (let idx = rng.startIdx; idx < rng.endIdx; idx++) {
|
||||||
|
const dt = DATA.dates_utc[idx];
|
||||||
const selStyle = idx === state.selectedDateIdx ? "color:var(--gold);font-weight:700;" : "color:var(--text-muted);";
|
const selStyle = idx === state.selectedDateIdx ? "color:var(--gold);font-weight:700;" : "color:var(--text-muted);";
|
||||||
html += "<th style='" + selStyle + "'>" + dt.slice(8) + "</th>";
|
html += "<th style='" + selStyle + "'>" + dt.slice(8) + "</th>";
|
||||||
});
|
}
|
||||||
html += "</tr></thead><tbody>";
|
html += "</tr></thead><tbody>";
|
||||||
|
|
||||||
filtered.forEach((inst) => {
|
pageSlice.forEach((inst) => {
|
||||||
const rowSel = inst.symbol === state.selectedSymbol ? "background:rgba(34,211,238,0.12);" : "";
|
const rowSel = inst.symbol === state.selectedSymbol ? "background:rgba(34,211,238,0.12);" : "";
|
||||||
html += "<tr style='" + rowSel + "'><th class='sym-col'>";
|
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 += "<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 += "<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>";
|
html += "</th>";
|
||||||
inst.bars.forEach((b, dIdx) => {
|
for (let dIdx = rng.startIdx; dIdx < rng.endIdx; dIdx++) {
|
||||||
|
const b = inst.bars[dIdx];
|
||||||
let cls = "hm-cell hm-none";
|
let cls = "hm-cell hm-none";
|
||||||
if (!b.data_available) cls = "hm-cell hm-nodata";
|
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.scope1_locks && b.scope1_locks.length > 0) cls = "hm-cell hm-scope1";
|
||||||
@@ -378,12 +675,35 @@
|
|||||||
? (inst.symbol + " (" + b.date_utc + "): No 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);
|
: (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 += "<td><span class='" + cls + "' data-sym='" + inst.symbol + "' data-didx='" + dIdx + "' title='" + tip + "'></span></td>";
|
||||||
});
|
}
|
||||||
html += "</tr>";
|
html += "</tr>";
|
||||||
});
|
});
|
||||||
html += "</tbody>";
|
html += "</tbody>";
|
||||||
tbl.innerHTML = html;
|
tbl.innerHTML = html;
|
||||||
|
|
||||||
|
if (pagBar) {
|
||||||
|
if (totalRows <= state.heatmapPageSize) {
|
||||||
|
pagBar.style.display = "none";
|
||||||
|
pagBar.innerHTML = "";
|
||||||
|
} else {
|
||||||
|
pagBar.style.display = "flex";
|
||||||
|
pagBar.innerHTML =
|
||||||
|
"<span style='color:var(--text-muted);'>Showing " + (rowStart + 1) + "–" + Math.min(totalRows, rowStart + pageSize) + " of " + totalRows + " tickers</span>" +
|
||||||
|
"<div style='display:flex;gap:0.4rem;'>" +
|
||||||
|
"<button type='button' class='pill' id='hmPrevPageBtn'>← Prev</button>" +
|
||||||
|
"<span style='padding:0.2rem 0.4rem;color:var(--gold);'>Page " + (state.heatmapPage + 1) + "/" + totalPages + "</span>" +
|
||||||
|
"<button type='button' class='pill' id='hmNextPageBtn'>Next →</button>" +
|
||||||
|
"<button type='button' class='pill' id='hmToggleAllBtn'>" + (state.heatmapShowAll ? "Paginate (25/p)" : "Show All (" + totalRows + ")") + "</button>" +
|
||||||
|
"</div>";
|
||||||
|
const pBtn = document.getElementById("hmPrevPageBtn");
|
||||||
|
const nBtn = document.getElementById("hmNextPageBtn");
|
||||||
|
const aBtn = document.getElementById("hmToggleAllBtn");
|
||||||
|
if (pBtn) pBtn.onclick = function () { state.heatmapPage = Math.max(0, state.heatmapPage - 1); renderHeatmap(); };
|
||||||
|
if (nBtn) nBtn.onclick = function () { state.heatmapPage = Math.min(totalPages - 1, state.heatmapPage + 1); renderHeatmap(); };
|
||||||
|
if (aBtn) aBtn.onclick = function () { state.heatmapShowAll = !state.heatmapShowAll; state.heatmapPage = 0; renderHeatmap(); };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tbl.querySelectorAll(".hm-cell").forEach((cell) => {
|
tbl.querySelectorAll(".hm-cell").forEach((cell) => {
|
||||||
cell.addEventListener("click", function () {
|
cell.addEventListener("click", function () {
|
||||||
state.selectedSymbol = cell.getAttribute("data-sym");
|
state.selectedSymbol = cell.getAttribute("data-sym");
|
||||||
@@ -411,14 +731,14 @@
|
|||||||
const metricsGrid = document.getElementById("dateMetricsGrid");
|
const metricsGrid = document.getElementById("dateMetricsGrid");
|
||||||
if (!bar.data_available || bar.close_usd === null || bar.close_usd === undefined) {
|
if (!bar.data_available || bar.close_usd === null || bar.close_usd === undefined) {
|
||||||
metricsGrid.innerHTML = [
|
metricsGrid.innerHTML = [
|
||||||
{ l: "Close USD (Change)", v: "No data available" },
|
{ l: "Close USD (Change)", tid: "box_close_usd", v: "No data available" },
|
||||||
{ l: "Spoken Close (Gen 1 AQ)", v: "No data available" },
|
{ l: "Spoken Close (Gen 1 AQ)", tid: "box_spoken_close", v: "No data available" },
|
||||||
{ l: "Scaled Cap (Gen 1 AQ)", v: "No data available" },
|
{ l: "Scaled Cap (Gen 1 AQ)", tid: "box_scaled_cap", v: "No data available" },
|
||||||
{ l: "BPS Spoken AQ / Vol20d", v: "No data available" },
|
{ l: "BPS Spoken AQ / Vol20d", tid: "box_bps_vol", v: "No data available" },
|
||||||
{ l: "Active Contingent Locks", v: "No data available" },
|
{ l: "Active Contingent Locks", tid: "box_active_locks", v: "No data available" },
|
||||||
{ l: "00:00 GMT Wire Co-Present", v: bar.co_present_in_news_wire ? "YES (Scope 3 Lock)" : "No" },
|
{ l: "00:00 GMT Wire Co-Present", tid: "box_wire_copresent", 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>")
|
.map((m) => "<div class='stat-box'><div class='stat-label'>" + m.l + makeInfoIconHtml(m.tid) + "</div><div class='stat-val' style='color:var(--text-muted);'>" + m.v + "</div></div>")
|
||||||
.join("");
|
.join("");
|
||||||
} else {
|
} else {
|
||||||
const lockSummary = (bar.scope1_locks || []).concat((bar.scope2_ring_coordinates || []).map((c) => "Ring " + c)).join(", ") || "None";
|
const lockSummary = (bar.scope1_locks || []).concat((bar.scope2_ring_coordinates || []).map((c) => "Ring " + c)).join(", ") || "None";
|
||||||
@@ -428,26 +748,40 @@
|
|||||||
const capDisp = (bar.market_cap_str && bar.market_cap_str !== "No data available" && bar.scaled_cap_spoken_ing_aq !== null)
|
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 + ")")
|
? (bar.market_cap_str + " (" + bar.scaled_cap_spoken_ing_aq + ")")
|
||||||
: "No data available";
|
: "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 bpsDisp = bar.bps_spoken_ing_aq !== null && bar.bps_spoken_ing_aq !== undefined
|
||||||
|
? ((bar.bps_spoken_eng_aq ? bar.bps_spoken_eng_aq + "\u2192" : "") + 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";
|
const volDisp = bar.volume_ratio_20d !== null && bar.volume_ratio_20d !== undefined ? (bar.volume_ratio_20d + "x") : "No data available";
|
||||||
|
const doseDisp = bar.confluence_dose !== null && bar.confluence_dose !== undefined
|
||||||
|
? ("Dose " + bar.confluence_dose + "/4 (" + (bar.dose_taxon_label || "") + ")")
|
||||||
|
: "No data available";
|
||||||
|
const closeSpDisp = (bar.close_spoken_eng_aq ? bar.close_spoken_eng_aq + "\u2192" : "") + bar.close_spoken_ing_aq + " (" + bar.close_spoken_ing + ")";
|
||||||
metricsGrid.innerHTML = [
|
metricsGrid.innerHTML = [
|
||||||
{ l: "Close USD (Change)", v: "$" + bar.close_usd + chgStr },
|
{ l: "Close USD (Change)", tid: "box_close_usd", v: "$" + bar.close_usd + chgStr },
|
||||||
{ l: "Spoken Close (Gen 1 AQ)", v: bar.close_spoken_ing + " (" + bar.close_spoken_ing_aq + ")" },
|
{ l: "Spoken Close (Gen 0\u2192Gen 1 AQ)", tid: "box_spoken_close", v: closeSpDisp },
|
||||||
{ l: "Scaled Cap (Gen 1 AQ)", v: capDisp },
|
{ l: "Scaled Cap (Gen 1 AQ)", tid: "box_scaled_cap", v: capDisp },
|
||||||
{ l: "BPS Spoken AQ / Vol20d", v: bpsDisp + " / " + volDisp },
|
{ l: "BPS Spoken (Gen 0\u21921) / Vol20d", tid: "box_bps_vol", v: bpsDisp + " / " + volDisp },
|
||||||
{ l: "Active Contingent Locks", v: lockSummary },
|
{ l: "Active Contingent Locks", tid: "box_active_locks", v: lockSummary },
|
||||||
{ l: "00:00 GMT Wire Co-Present", v: bar.co_present_in_news_wire ? "YES (Scope 3 Lock)" : "No" },
|
{ l: "Confluence Dose & Wire", tid: "box_wire_copresent", v: doseDisp },
|
||||||
]
|
]
|
||||||
.map((m) => "<div class='stat-box'><div class='stat-label'>" + m.l + "</div><div class='stat-val'>" + m.v + "</div></div>")
|
.map((m) => "<div class='stat-box'><div class='stat-label'>" + m.l + makeInfoIconHtml(m.tid) + "</div><div class='stat-val'>" + m.v + "</div></div>")
|
||||||
.join("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render Active Lens Projection Card (LENS_REGISTRY)
|
// Render Active Lens Projection Card (LENS_REGISTRY)
|
||||||
const lensCard = document.getElementById("lensProjectionCard");
|
const lensCard = document.getElementById("lensProjectionCard");
|
||||||
if (proj) {
|
if (proj) {
|
||||||
|
const lensMeta = (DATA.lens_registry_meta && DATA.lens_registry_meta[state.selectedLens]) || {};
|
||||||
|
const tsLabelsMap = lensMeta.timeseries_labels || {};
|
||||||
|
const reverseLabelToKey = {};
|
||||||
|
Object.keys(tsLabelsMap).forEach((canonicalKey) => {
|
||||||
|
reverseLabelToKey[tsLabelsMap[canonicalKey]] = canonicalKey;
|
||||||
|
});
|
||||||
|
|
||||||
let rowsHtml = "";
|
let rowsHtml = "";
|
||||||
Object.keys(proj.labeled_timeseries || {}).forEach((k) => {
|
Object.keys(proj.labeled_timeseries || {}).forEach((k) => {
|
||||||
const val = proj.labeled_timeseries[k];
|
const val = proj.labeled_timeseries[k];
|
||||||
|
const canonicalKey = reverseLabelToKey[k] || "ts_duty_cycle_pct";
|
||||||
let disp = "No data available";
|
let disp = "No data available";
|
||||||
if (val !== null && val !== undefined) {
|
if (val !== null && val !== undefined) {
|
||||||
if (typeof val === "object") {
|
if (typeof val === "object") {
|
||||||
@@ -458,17 +792,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rowsHtml += "<div style='display:flex;justify-content:space-between;font-size:0.69rem;border-bottom:1px solid #162032;padding:0.18rem 0;'>" +
|
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>";
|
"<span style='color:var(--text-muted);'>" + k + makeInfoIconHtml(canonicalKey) + ":</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 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 regDisp = (proj.qualitative_profile && proj.qualitative_profile.regime_specialization) || "No data available";
|
||||||
const sparkDisp = inst.timeseries_moments.ts_sparkline_30d || "No data available";
|
const sparkDisp = inst.timeseries_moments.ts_sparkline_30d || "No data available";
|
||||||
lensCard.innerHTML =
|
lensCard.innerHTML =
|
||||||
"<div style='display:flex;justify-content:space-between;align-items:center;margin-bottom:0.4rem;'>" +
|
"<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.76rem;font-weight:700;color:var(--gold);'>Lens: " + proj.lens_title + makeInfoIconHtml("projection_lens") + "</span>" +
|
||||||
"<span style='font-size:0.7rem;color:var(--cyan);'>" + proj.tier_classification + "</span></div>" +
|
"<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;'>" +
|
"<div style='font-size:0.71rem;color:var(--emerald);margin-bottom:0.4rem;'>" +
|
||||||
"Archetype: " + archDisp + " • " + regDisp +
|
"Archetype" + makeInfoIconHtml("lens_archetype") + ": " + archDisp + " • " + regDisp +
|
||||||
" • 30d: " + sparkDisp + "</div>" +
|
" • 30d: " + sparkDisp + "</div>" +
|
||||||
rowsHtml;
|
rowsHtml;
|
||||||
}
|
}
|
||||||
@@ -502,7 +836,17 @@
|
|||||||
hdrEl.innerHTML =
|
hdrEl.innerHTML =
|
||||||
"Dated 00:00 GMT Wire Dossier (<a href='" + resolveUrl(wireDay.archive_route) + "' target='_blank' style='color:var(--cyan);'>" +
|
"Dated 00:00 GMT Wire Dossier (<a href='" + resolveUrl(wireDay.archive_route) + "' target='_blank' style='color:var(--cyan);'>" +
|
||||||
wireDay.dossier_file + "</a> • " + wireDay.equation_counts.total + " Verified Equations):";
|
wireDay.dossier_file + "</a> • " + wireDay.equation_counts.total + " Verified Equations):";
|
||||||
tapeEl.innerHTML = (wireDay.sample_equations || [])
|
const wq = (state.wireTapeQuery || "").trim().toLowerCase();
|
||||||
|
const rawEqs = wireDay.sample_equations || [];
|
||||||
|
const filteredEqs = !wq ? rawEqs : rawEqs.filter((eq) => {
|
||||||
|
return (
|
||||||
|
String(eq.ing || "").toLowerCase().includes(wq) ||
|
||||||
|
String(eq.eng || "").toLowerCase().includes(wq) ||
|
||||||
|
String(eq.target || "") === wq ||
|
||||||
|
String(eq.breakdown || "").toLowerCase().includes(wq)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
tapeEl.innerHTML = filteredEqs
|
||||||
.map(
|
.map(
|
||||||
(eq) => {
|
(eq) => {
|
||||||
const dLink = resolveUrl(eq.dossier_deep_link || wireDay.archive_route);
|
const dLink = resolveUrl(eq.dossier_deep_link || wireDay.archive_route);
|
||||||
@@ -581,10 +925,119 @@
|
|||||||
|
|
||||||
const pGate = DATA.periodicity_gate || {};
|
const pGate = DATA.periodicity_gate || {};
|
||||||
const optLagDisp = optLag !== null && optLag !== undefined ? ((optLag >= 0 ? "+" + optLag : optLag) + "d") : "No data available";
|
const optLagDisp = optLag !== null && optLag !== undefined ? ((optLag >= 0 ? "+" + optLag : optLag) + "d") : "No data available";
|
||||||
document.getElementById("periodicityAuditFooter").textContent =
|
document.getElementById("periodicityAuditFooter").innerHTML =
|
||||||
"Periodicity Gate Enforced: " + pGate.dated_news_dossiers_ingested + " dated 00:00 UTC news dossiers + real exchange closing-bell bars (" +
|
"Periodicity Gate Enforced" + makeInfoIconHtml("periodicity_gate_badge") + ": " +
|
||||||
pGate.non_periodic_records_ingested + " non-periodic/static records ingested; missing bars = null / No data available) | Optimal Lag tau* = " +
|
pGate.dated_news_dossiers_ingested + " dated 00:00 UTC news dossiers + real exchange closing-bell bars (" +
|
||||||
optLagDisp + " | CIDv1: " + (DATA.ipld_dag_json_cidv1 && DATA.ipld_dag_json_cidv1["/"]);
|
pGate.non_periodic_records_ingested + " non-periodic/static records ingested; missing bars = null / No data available) | Optimal Lag τ*" +
|
||||||
|
makeInfoIconHtml("ts_optimal_lag_days") + " = " + optLagDisp + " | CIDv1" + makeInfoIconHtml("cidv1_provenance") + ": <code>" +
|
||||||
|
((DATA.ipld_dag_json_cidv1 && DATA.ipld_dag_json_cidv1["/"]) || "") + "</code>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderMacroIndicators() {
|
||||||
|
const grid = document.getElementById("macroIndicatorsGrid");
|
||||||
|
if (!grid) return;
|
||||||
|
const M = window.HYPERSTITION_MACRO_DATA;
|
||||||
|
if (!M || !M.series) {
|
||||||
|
grid.innerHTML = "<div class='stat-box'><div class='stat-val'>No data available</div></div>";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const S = M.series;
|
||||||
|
const D = M.derived_indicators || {};
|
||||||
|
const cards = [
|
||||||
|
{
|
||||||
|
title: "CPI (CPIAUCSL, 1mo)",
|
||||||
|
val: S.cpi && S.cpi.data_available ? (S.cpi.latest_value + " (" + (S.cpi.period_change_bps >= 0 ? "+" : "") + S.cpi.period_change_bps + " bps MoM)") : "No data available",
|
||||||
|
sub: S.cpi && S.cpi.change_aq_evaluation ? ("MoM Spoken: '" + S.cpi.change_aq_evaluation.spoken_ing + "' = " + S.cpi.change_aq_evaluation.spoken_ing_aq + " [S2]") : "No data available",
|
||||||
|
cls: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "PPI (PPIACO, 1mo) & Margin",
|
||||||
|
val: S.ppi && S.ppi.data_available ? (S.ppi.latest_value + " (" + S.ppi.period_change_bps + " bps MoM)") : "No data available",
|
||||||
|
sub: "PPI - CPI Spread: " + ((D.pipeline_inflation_margin && D.pipeline_inflation_margin.ppi_minus_cpi_mom_spread_bps) || "N/A") + " bps | 'nainteen' = 137 [Iso]",
|
||||||
|
cls: "plate-lock-emerald",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "US10Y Treasury (DGS10, 1d)",
|
||||||
|
val: S.us10y && S.us10y.data_available ? (S.us10y.latest_value + "% (" + S.us10y.latest_date_utc + ")") : "No data available",
|
||||||
|
sub: "10Y - EFFR Curve Slope: +" + ((D.overnight_and_curve_spreads && D.overnight_and_curve_spreads.us10y_minus_effr_curve_slope_bps) || "N/A") + " bps (-> 237 [S6])",
|
||||||
|
cls: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Overnight Rates (EFFR / SOFR, 1d)",
|
||||||
|
val: (S.effr && S.effr.data_available ? ("EFFR " + S.effr.latest_value + "% (388 bps)") : "No data") + " | " + (S.sofr && S.sofr.data_available ? ("SOFR " + S.sofr.latest_value + "%") : "No data"),
|
||||||
|
sub: "★ EFFR 388 bps == 388 KG Nodes! | SOFR-EFFR: +" + ((D.overnight_and_curve_spreads && D.overnight_and_curve_spreads.sofr_minus_effr_repo_spread_bps) || "0") + " bps",
|
||||||
|
cls: "plate-lock-gold",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "M2 & M1 vs. M2 Spread (1mo)",
|
||||||
|
val: S.m2 && S.m2.data_available ? ("M2 $" + (S.m2.latest_value / 1000).toFixed(2) + "T | Spread " + (D.m1_vs_m2_spread && D.m1_vs_m2_spread.m2_minus_m1_trillions_str)) : "No data available",
|
||||||
|
sub: "M1/M2 Liquidity Ratio: " + ((D.m1_vs_m2_spread && D.m1_vs_m2_spread.m1_to_m2_liquidity_ratio_pct) || "N/A") + "% ($3.37T -> 337 [P68])",
|
||||||
|
cls: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Real M2 & Real M2 Growth (1mo)",
|
||||||
|
val: S.real_m2 && S.real_m2.data_available ? ("$" + S.real_m2.latest_value + "B (" + (S.real_m2.period_change_bps >= 0 ? "+" : "") + S.real_m2.period_change_bps + " bps MoM)") : "No data available",
|
||||||
|
sub: "YoY Real M2 Growth: " + ((D.real_m2_growth && D.real_m2_growth.yoy_growth_pct !== null) ? (D.real_m2_growth.yoy_growth_pct + "%") : "No data available"),
|
||||||
|
cls: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Nominal & Real GDP (1q)",
|
||||||
|
val: S.gdp_nominal && S.gdp_nominal.data_available ? ("$" + (S.gdp_nominal.latest_value / 1000).toFixed(2) + "T (Real $" + (S.gdp_real.latest_value / 1000).toFixed(2) + "T)") : "No data available",
|
||||||
|
sub: "GDP / M2 Monetary Velocity: " + ((D.aggregate_output_and_velocity && D.aggregate_output_and_velocity.gdp_to_m2_monetary_velocity) || "N/A") + "x",
|
||||||
|
cls: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Gross Product & Output (GNP / OUTBS / INDPRO)",
|
||||||
|
val: S.gnp_gross_product && S.gnp_gross_product.data_available ? ("GNP $" + (S.gnp_gross_product.latest_value / 1000).toFixed(2) + "T | OUTBS " + S.business_gross_output.latest_value) : "No data available",
|
||||||
|
sub: "★ OUTBS 128.97 -> 129 == blakwel [S3] | INDPRO: " + (S.industrial_production ? (S.industrial_production.latest_value + " (" + S.industrial_production.period_change_bps + " bps)") : "N/A"),
|
||||||
|
cls: "plate-lock-gold",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
grid.innerHTML = cards.map(function (c) {
|
||||||
|
return "<div class='stat-box hs-plate-g3 " + c.cls + "'><div class='stat-label'>" + c.title + "</div><div class='stat-val' style='font-size:0.78rem;'>" + c.val + "</div><div style='font-size:0.66rem;color:var(--text-muted);margin-top:0.2rem;'>" + c.sub + "</div></div>";
|
||||||
|
}).join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderDailyBrief() {
|
||||||
|
const container = document.getElementById("dailyBriefContainer");
|
||||||
|
if (!container) return;
|
||||||
|
const B = window.HYPERSTITION_DAILY_BRIEF;
|
||||||
|
if (!B || !B.agenda_1_executive_summary) {
|
||||||
|
container.innerHTML = "<div class='stat-box'><div class='stat-val'>No data available</div></div>";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const a1 = B.agenda_1_executive_summary;
|
||||||
|
const a2 = B.agenda_2_confirming_signals;
|
||||||
|
const a3 = B.agenda_3_challenging_divergences;
|
||||||
|
const a4 = B.agenda_4_delta_since_last_run;
|
||||||
|
const a5 = B.agenda_5_daily_key_macro_question_and_rigor;
|
||||||
|
const post = (a1.bayesian_regime_inference && a1.bayesian_regime_inference.posterior_probabilities) || {};
|
||||||
|
const scen = (a1.bayesian_regime_inference && a1.bayesian_regime_inference.scenarios) || {};
|
||||||
|
|
||||||
|
container.innerHTML = [
|
||||||
|
"<div class='stat-box hs-plate-g3 plate-lock-gold'><div class='stat-label' style='color:var(--gold);'>AGENDA 1: EXECUTIVE SUMMARY & BAYESIAN SCENARIOS (RUN #" + B.run_number + ")</div>" +
|
||||||
|
"<div style='font-size:0.72rem;margin:0.3rem 0;color:var(--text-main);'>" + a1.headline_finding + "</div>" +
|
||||||
|
"<div style='font-size:0.67rem;color:var(--emerald);'>• Best Case (R1 Bull): " + ((post.R1_BULL_RISK_ON * 100) || 0).toFixed(1) + "% — " + ((scen.best_case_r1_bull_risk_on && scen.best_case_r1_bull_risk_on.expected_daily_excursion_bps) || "") + "</div>" +
|
||||||
|
"<div style='font-size:0.67rem;color:var(--cyan);'>• Base Case (R2 Pinned Dose 2): " + ((post.R2_PINNED_ISOMETRIC * 100) || 0).toFixed(1) + "% — " + ((scen.base_case_r2_pinned_isometric && scen.base_case_r2_pinned_isometric.expected_daily_excursion_bps) || "") + "</div>" +
|
||||||
|
"<div style='font-size:0.67rem;color:var(--rose);'>• Worst Case (R3 Tail Drawdown): " + ((post.R3_TAIL_DRAWDOWN_RISK_OFF * 100) || 0).toFixed(1) + "% — " + ((scen.worst_case_r3_tail_drawdown && scen.worst_case_r3_tail_drawdown.expected_daily_excursion_bps) || "") + "</div></div>",
|
||||||
|
"<div class='stat-box hs-plate-g3 plate-lock-emerald'><div class='stat-label' style='color:var(--emerald);'>AGENDA 2: SUBSTANTIVE SUPPORT FOR ACTIVE THEMES</div>" +
|
||||||
|
"<div style='font-size:0.70rem;margin:0.3rem 0;color:var(--text-main);'>" + a2.summary + "</div>" +
|
||||||
|
(a2.active_dose2_confirmations || []).slice(0, 3).map(function (ev) {
|
||||||
|
return "<div style='font-size:0.66rem;color:var(--text-secondary);'>• " + ev.date_utc + " <b>" + ev.symbol + "</b> ($" + ev.close_usd + ", " + ev.change_bps + " bps): Dose 2 Pin on [" + (ev.shared_dossier_coordinates || []).join(",") + "]</div>";
|
||||||
|
}).join("") + "</div>",
|
||||||
|
"<div class='stat-box hs-plate-g3 plate-lock-rose'><div class='stat-label' style='color:var(--rose);'>AGENDA 3: SUBSTANTIVE CHALLENGES & DIVERGENCES</div>" +
|
||||||
|
(a3.macro_and_memetic_challenges || []).map(function (ch) {
|
||||||
|
return "<div style='font-size:0.66rem;margin-top:0.22rem;color:var(--text-secondary);'>• <b>" + ch.indicator + ":</b> " + ch.observation + " — " + ch.impact + "</div>";
|
||||||
|
}).join("") + "</div>",
|
||||||
|
"<div class='stat-box hs-plate-g3'><div class='stat-label'>AGENDA 4: DELTA SINCE LAST RUN & STRICT NULL AUDIT</div>" +
|
||||||
|
"<div style='font-size:0.66rem;color:var(--text-secondary);margin-top:0.22rem;'>• Latest Wire: " + ((a4.latest_wire_dossier && a4.latest_wire_dossier.dossier_file) || "N/A") + "</div>" +
|
||||||
|
"<div style='font-size:0.66rem;color:var(--text-secondary);'>• CPI/PPI: " + ((a4.macro_releases_ingested && a4.macro_releases_ingested.cpi_latest) || "") + " | " + ((a4.macro_releases_ingested && a4.macro_releases_ingested.ppi_latest) || "") + "</div>" +
|
||||||
|
"<div style='font-size:0.66rem;color:var(--text-muted);'>• Strict Nulls: ANTHR-PVT (0/30d = null); 2026-11-26 Thanksgiving (equities/rates = null)</div></div>",
|
||||||
|
"<div class='stat-box hs-plate-g3' style='grid-column: 1 / -1;'><div class='stat-label' style='color:var(--cyan);'>AGENDA 5: DAILY KEY MACRO QUESTION (" + ((a5.active_daily_question && a5.active_daily_question.question_id) || "") + ") & COMPOUNDING QUALITATIVE / QUANTITATIVE RIGOR</div>" +
|
||||||
|
"<div style='font-size:0.72rem;margin:0.28rem 0;color:var(--gold);font-weight:600;'>Q: " + ((a5.active_daily_question && a5.active_daily_question.question_text) || "") + "</div>" +
|
||||||
|
"<div style='font-size:0.66rem;color:var(--text-secondary);'>• Qualitative Rigor (The Room Filter): " + ((a5.compounding_qualitative_rigor && a5.compounding_qualitative_rigor.room_filter_gate) || "") + "</div>" +
|
||||||
|
"<div style='font-size:0.66rem;color:var(--text-secondary);margin-top:0.18rem;'>• Quantitative & Statistical Rigor (n=440 bars, 412 t+1 pairs): " + ((a5.compounding_quantitative_rigor && a5.compounding_quantitative_rigor.methodological_applicability_and_significance) || "") + "</div></div>",
|
||||||
|
].join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderAll() {
|
function renderAll() {
|
||||||
@@ -593,19 +1046,42 @@
|
|||||||
renderHeatmap();
|
renderHeatmap();
|
||||||
renderInspectorAndLens();
|
renderInspectorAndLens();
|
||||||
renderLagExplorer();
|
renderLagExplorer();
|
||||||
|
renderMacroIndicators();
|
||||||
|
renderDailyBrief();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Canvas scrub interaction
|
// Canvas scrub interaction (mouse click + Strategy 4A mobile touchstart/touchmove scrubbing)
|
||||||
canvas.addEventListener("click", function (ev) {
|
function scrubCanvasAtClientX(clientX) {
|
||||||
const rect = canvas.getBoundingClientRect();
|
const rect = canvas.getBoundingClientRect();
|
||||||
const relX = ((ev.clientX - rect.left) / rect.width) * canvas.width;
|
const relX = ((clientX - rect.left) / Math.max(1, rect.width)) * canvas.width;
|
||||||
const padL = 62, padR = 28;
|
const padL = 62, padR = 28;
|
||||||
const ratio = (relX - padL) / (canvas.width - padL - padR);
|
const ratio = (relX - padL) / (canvas.width - padL - padR);
|
||||||
const idx = Math.round(ratio * (DATA.dates_utc.length - 1));
|
const rng = getActiveDateRange();
|
||||||
state.selectedDateIdx = Math.max(0, Math.min(DATA.dates_utc.length - 1, idx));
|
const span = Math.max(1, rng.endIdx - rng.startIdx - 1);
|
||||||
|
const idx = rng.startIdx + Math.round(ratio * span);
|
||||||
|
const nextIdx = Math.max(rng.startIdx, Math.min(rng.endIdx - 1, idx));
|
||||||
|
if (nextIdx !== state.selectedDateIdx) {
|
||||||
|
state.selectedDateIdx = nextIdx;
|
||||||
renderAll();
|
renderAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.addEventListener("click", function (ev) {
|
||||||
|
scrubCanvasAtClientX(ev.clientX);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
canvas.addEventListener("touchstart", function (ev) {
|
||||||
|
if (ev.touches && ev.touches.length === 1) {
|
||||||
|
scrubCanvasAtClientX(ev.touches[0].clientX);
|
||||||
|
}
|
||||||
|
}, { passive: true });
|
||||||
|
|
||||||
|
canvas.addEventListener("touchmove", function (ev) {
|
||||||
|
if (ev.touches && ev.touches.length === 1) {
|
||||||
|
scrubCanvasAtClientX(ev.touches[0].clientX);
|
||||||
|
}
|
||||||
|
}, { passive: true });
|
||||||
|
|
||||||
document.getElementById("prevDateBtn").onclick = function () {
|
document.getElementById("prevDateBtn").onclick = function () {
|
||||||
state.selectedDateIdx = Math.max(0, state.selectedDateIdx - 1);
|
state.selectedDateIdx = Math.max(0, state.selectedDateIdx - 1);
|
||||||
renderAll();
|
renderAll();
|
||||||
@@ -656,7 +1132,122 @@
|
|||||||
a.click();
|
a.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Interactive Info Icon & Viewport-Clamped PDF Glossary Popover Controller
|
||||||
|
let pinnedTermId = null;
|
||||||
|
let activeTriggerEl = null;
|
||||||
|
|
||||||
|
function showInfoPopover(termId, triggerEl, pinNow) {
|
||||||
|
const entry = QUANT_TERM_GLOSSARY[termId];
|
||||||
|
const pop = document.getElementById("quantInfoPopover");
|
||||||
|
if (!entry || !pop || !triggerEl) return;
|
||||||
|
|
||||||
|
if (pinNow) {
|
||||||
|
pinnedTermId = termId;
|
||||||
|
}
|
||||||
|
activeTriggerEl = triggerEl;
|
||||||
|
document.querySelectorAll(".hs-info-icon.pinned").forEach((el) => el.classList.remove("pinned"));
|
||||||
|
if (pinnedTermId) {
|
||||||
|
triggerEl.classList.add("pinned");
|
||||||
|
}
|
||||||
|
|
||||||
|
const resolveUrl = (window.HyperstitionStudio.QuantTutorials && window.HyperstitionStudio.QuantTutorials.adaptHrefForFileProtocol) || function (u) { return u; };
|
||||||
|
const glUrl = resolveUrl(entry.glossary_pdf_link);
|
||||||
|
const mnUrl = resolveUrl(entry.manual_pdf_link);
|
||||||
|
const pgMatch = entry.glossary_pdf_link.match(/#page=(\d+)/);
|
||||||
|
const pgNum = pgMatch ? pgMatch[1] : "1";
|
||||||
|
|
||||||
|
pop.innerHTML =
|
||||||
|
"<div class='pop-hdr'>" +
|
||||||
|
"<span class='pop-title'>\u24D8 " + entry.title + "</span>" +
|
||||||
|
"<button type='button' class='pop-close' id='popCloseBtn'>" + (pinnedTermId ? "Pinned \u00D7" : "Close \u00D7") + "</button>" +
|
||||||
|
"</div>" +
|
||||||
|
"<p class='pop-plain'>" + entry.plain_english + "</p>" +
|
||||||
|
"<blockquote class='pop-quote'>" +
|
||||||
|
"<a href='" + glUrl + "' target='_blank' rel='noopener noreferrer' style='color:inherit;text-decoration:none;' title='Click to open PDF Glossary at page " + pgNum + "'>" +
|
||||||
|
"“" + entry.glossary_quote + "”</a>" +
|
||||||
|
"</blockquote>" +
|
||||||
|
"<div class='pop-links'>" +
|
||||||
|
"<a class='pill' style='text-decoration:none;color:var(--gold);border-color:var(--gold);' href='" + glUrl + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDCD6 Open PDF Glossary (p." + pgNum + ") \u2197</a>" +
|
||||||
|
"<a class='pill' style='text-decoration:none;color:var(--cyan);border-color:var(--cyan);' href='" + mnUrl + "' target='_blank' rel='noopener noreferrer'>\uD83D\uDCC4 Operator's Manual \u2197</a>" +
|
||||||
|
"</div>";
|
||||||
|
|
||||||
|
pop.style.display = "flex";
|
||||||
|
pop.setAttribute("aria-hidden", "false");
|
||||||
|
|
||||||
|
const rect = triggerEl.getBoundingClientRect();
|
||||||
|
const popRect = pop.getBoundingClientRect();
|
||||||
|
let left = rect.left;
|
||||||
|
let top = rect.bottom + 8;
|
||||||
|
if (left + popRect.width > window.innerWidth - 14) {
|
||||||
|
left = Math.max(12, window.innerWidth - popRect.width - 14);
|
||||||
|
}
|
||||||
|
if (top + popRect.height > window.innerHeight - 14) {
|
||||||
|
top = Math.max(12, rect.top - popRect.height - 8);
|
||||||
|
}
|
||||||
|
pop.style.left = Math.round(left) + "px";
|
||||||
|
pop.style.top = Math.round(top) + "px";
|
||||||
|
|
||||||
|
const closeBtn = document.getElementById("popCloseBtn");
|
||||||
|
if (closeBtn) {
|
||||||
|
closeBtn.onclick = function () {
|
||||||
|
hideInfoPopover(true);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideInfoPopover(forceUnpin) {
|
||||||
|
if (pinnedTermId && !forceUnpin) return;
|
||||||
|
pinnedTermId = null;
|
||||||
|
activeTriggerEl = null;
|
||||||
|
document.querySelectorAll(".hs-info-icon.pinned").forEach((el) => el.classList.remove("pinned"));
|
||||||
|
const pop = document.getElementById("quantInfoPopover");
|
||||||
|
if (pop) {
|
||||||
|
pop.style.display = "none";
|
||||||
|
pop.setAttribute("aria-hidden", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("mouseover", function (ev) {
|
||||||
|
const btn = ev.target && ev.target.closest && ev.target.closest(".hs-info-icon");
|
||||||
|
if (btn && !pinnedTermId) {
|
||||||
|
showInfoPopover(btn.getAttribute("data-term-id"), btn, false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener("focusin", function (ev) {
|
||||||
|
const btn = ev.target && ev.target.closest && ev.target.closest(".hs-info-icon");
|
||||||
|
if (btn && !pinnedTermId) {
|
||||||
|
showInfoPopover(btn.getAttribute("data-term-id"), btn, false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener("click", function (ev) {
|
||||||
|
const btn = ev.target && ev.target.closest && ev.target.closest(".hs-info-icon");
|
||||||
|
const pop = document.getElementById("quantInfoPopover");
|
||||||
|
if (btn) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
const tid = btn.getAttribute("data-term-id");
|
||||||
|
if (pinnedTermId === tid && activeTriggerEl === btn) {
|
||||||
|
hideInfoPopover(true);
|
||||||
|
} else {
|
||||||
|
showInfoPopover(tid, btn, true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pop && !pop.contains(ev.target)) {
|
||||||
|
hideInfoPopover(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener("keydown", function (ev) {
|
||||||
|
if (ev.key === "Escape") {
|
||||||
|
hideInfoPopover(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
||||||
|
window.HyperstitionStudio.QuantTermGlossary = QUANT_TERM_GLOSSARY;
|
||||||
window.HyperstitionStudio.QuantWorkbenchApp = {
|
window.HyperstitionStudio.QuantWorkbenchApp = {
|
||||||
getState: function () { return Object.assign({}, state); },
|
getState: function () { return Object.assign({}, state); },
|
||||||
setStateAndRender: function (nextState, spotlight) {
|
setStateAndRender: function (nextState, spotlight) {
|
||||||
@@ -676,5 +1267,15 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const qParams = new URLSearchParams(window.location.search || "");
|
||||||
|
if (qParams.get("screen") === "dose-d3") {
|
||||||
|
state.guildFilter = "DOSE_D3";
|
||||||
|
const d3List = getFilteredInstruments();
|
||||||
|
if (d3List.length) {
|
||||||
|
state.selectedSymbol = d3List[0].symbol;
|
||||||
|
const d3BarIdx = (d3List[0].bars || []).findIndex((b) => b.data_available && Number(b.confluence_dose || 0) >= 3);
|
||||||
|
if (d3BarIdx >= 0) state.selectedDateIdx = d3BarIdx;
|
||||||
|
}
|
||||||
|
}
|
||||||
renderAll();
|
renderAll();
|
||||||
})();
|
})();
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
// Auto-generated synchronous time-series bundle for file:// and https:// portability
|
// Auto-generated synchronous time-series bundle for file:// and https:// portability
|
||||||
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
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.23", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.0.23", "generated_at_utc": "2026-11-30T08:33:23Z", "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
|
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.17.1", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.17.1", "generated_at_utc": "2026-12-02T21:30:15Z", "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": 23, "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
|
||||||
@@ -1,9 +1,36 @@
|
|||||||
// /workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js
|
// /workspace/hyperstitionstudio-core/site/quant/quant-tutorials.js
|
||||||
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player & Deep-Link Choreographer (v2.0.23)
|
// Option B Zero-MP4 Interactive HTML5 Canvas Tutorial Player, Spoken Voice Narration & Per-Scene UI Element Indicators (v2.11.0)
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
const rootObj = typeof window !== "undefined" ? window : globalThis;
|
||||||
|
rootObj.HyperstitionStudio = rootObj.HyperstitionStudio || {};
|
||||||
|
|
||||||
|
const ALL_HIGHLIGHTABLE_DOM_IDS = [
|
||||||
|
"guildFilterPills",
|
||||||
|
"tickerQuickFilter",
|
||||||
|
"tickerSelect",
|
||||||
|
"openTradingViewBtn",
|
||||||
|
"lensSelect",
|
||||||
|
"metricModePills",
|
||||||
|
"timeWindowPills",
|
||||||
|
"activeDateBadge",
|
||||||
|
"tsCanvas",
|
||||||
|
"heatmapTable",
|
||||||
|
"heatmapPaginationBar",
|
||||||
|
"panel3TvBtn",
|
||||||
|
"dateMetricsGrid",
|
||||||
|
"lensProjectionCard",
|
||||||
|
"docReferencesCard",
|
||||||
|
"wireTapeFilterInput",
|
||||||
|
"wireEqTape",
|
||||||
|
"lagBarsContainer",
|
||||||
|
"exportCsvBtn",
|
||||||
|
"exportJsonBtn",
|
||||||
|
"periodicityAuditFooter",
|
||||||
|
"macroIndicatorsPanel",
|
||||||
|
"dailyBriefPanel"
|
||||||
|
];
|
||||||
|
|
||||||
const EPISODES = [
|
const EPISODES = [
|
||||||
{
|
{
|
||||||
@@ -13,9 +40,12 @@
|
|||||||
keyframes: [
|
keyframes: [
|
||||||
{
|
{
|
||||||
title: "1.1 Strict Periodicity Gate (21:30 UTC Close x 00:00 UTC Wire)",
|
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: 29 },
|
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
|
||||||
spotlight: { target: "canvas", pane: "top", xRatio: 0.96, yRatio: 0.22, label: "Strict Periodicity Gate: 30 UTC Days x 24 Tickers" },
|
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 periodic timestamp-indexed sources (21:30 UTC US Closing-Bell bars and 00:00 UTC dated news dossiers) enter this workbench. Static lexicons and undated ledgers are strictly excluded (0 non-periodic records).",
|
uiTargets: ["timeWindowPills", "activeDateBadge", "tsCanvas"],
|
||||||
|
uiElementLabel: "Temporal Window Pills (#timeWindowPills) & Active Date Badge (#activeDateBadge)",
|
||||||
|
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'.",
|
||||||
|
speechText: "Scene 1.1. Inspecting the Temporal Window pills and Active Date badge in the top toolbar alongside Panel 1. Only real periodic timestamp-indexed observations, twenty-one thirty UTC US closing-bell bars and midnight UTC dated news dossiers, enter this workbench. Closed weekend and holiday dates explicitly report No data available.",
|
||||||
citations: [
|
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: "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: "Archive Methodology", href: "/archive/00-index-and-methodology.md#:~:text=closing-bell" },
|
||||||
@@ -24,9 +54,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "1.2 Guild S1 — Autoregressive AI Syndicate (Coordinate 292)",
|
title: "1.2 Guild S1 — Autoregressive AI Syndicate (Coordinate 292)",
|
||||||
state: { guildFilter: "S1", selectedSymbol: "MSFT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 28 },
|
state: { guildFilter: "S1", selectedSymbol: "MSFT", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 24 },
|
||||||
spotlight: { target: "canvas", pane: "top", xRatio: 0.90, yRatio: 0.28, label: "S1 AI Guild Filter Active (292 Singularity)" },
|
spotlight: { target: "canvas", pane: "top", xRatio: 0.83, yRatio: 0.28, label: "S1 AI Guild Filter Active (MSFT 2026-11-25 Close $489.93)" },
|
||||||
|
uiTargets: ["guildFilterPills", "tickerSelect"],
|
||||||
|
uiElementLabel: "Guild Filter Pills (#guildFilterPills -> S1) & Ticker Select (#tickerSelect)",
|
||||||
subtitle: "Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292 (shizohnalizis == abstrakt masheen == sinthetik dayta == asset management [Gen 0]).",
|
subtitle: "Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292 (shizohnalizis == abstrakt masheen == sinthetik dayta == asset management [Gen 0]).",
|
||||||
|
speechText: "Scene 1.2. Highlighting the Guild Filter pills and Ticker selector in the toolbar. Filtering by Guild S1 isolates the Autoregressive AI Syndicate anchored on Coordinate 292, where schizoanalysis, abstract machine, and synthetic data all converge in phonemic Ingglish.",
|
||||||
citations: [
|
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: "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: "Dossier 65 (292 Lock)", href: "/zoology/dossiers/65-dossier-technocapital-singularity-autoregressive-ai.md#:~:text=292" },
|
||||||
@@ -35,9 +68,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "1.3 Guild S3 — Silicon-Photonic War Machine (137 & 81)",
|
title: "1.3 Guild S3 — Silicon-Photonic War Machine (137 & 81)",
|
||||||
state: { guildFilter: "S3", selectedSymbol: "ASML", selectedLens: "corporate_board", metricMode: "close_usd", selectedDateIdx: 29 },
|
state: { guildFilter: "S3", selectedSymbol: "ASML", selectedLens: "corporate_board", metricMode: "close_usd", selectedDateIdx: 26 },
|
||||||
spotlight: { target: "canvas", pane: "top", xRatio: 0.95, yRatio: 0.30, label: "S3 Isometric Chokepoint: ASML = asml = 81 (Δ = 0)" },
|
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.30, label: "S3 Isometric Chokepoint: ASML = asml = 81 (Δ = 0)" },
|
||||||
|
uiTargets: ["guildFilterPills", "tickerQuickFilter", "tickerSelect"],
|
||||||
|
uiElementLabel: "Guild Filter (#guildFilterPills -> S3) & Ticker Quick-Filter (#tickerQuickFilter)",
|
||||||
subtitle: "Guild S3 maps physical wafer and EUV lithography chokepoints: ASML (81, Δ = 0 isometric), TSMC (95, Δ = 0), and Nvidia (envideea = 137 [33rd Prime]).",
|
subtitle: "Guild S3 maps physical wafer and EUV lithography chokepoints: ASML (81, Δ = 0 isometric), TSMC (95, Δ = 0), and Nvidia (envideea = 137 [33rd Prime]).",
|
||||||
|
speechText: "Scene 1.3. Highlighting Guild Filter S3 and the Ticker Quick-Filter input in the toolbar. Guild S3 maps physical wafer and extreme ultraviolet lithography chokepoints: ASML at coordinate 81 with zero phonemic drift, TSMC at 95, and Nvidia at 137, the thirty-third prime.",
|
||||||
citations: [
|
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: "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: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
|
||||||
@@ -46,9 +82,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "1.4 Guild S6 — Apparatus of Capture (Coordinate 125)",
|
title: "1.4 Guild S6 — Apparatus of Capture (Coordinate 125)",
|
||||||
state: { guildFilter: "S6", selectedSymbol: "BLK", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 27 },
|
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" },
|
spotlight: { target: "canvas", pane: "top", xRatio: 0.86, yRatio: 0.26, label: "S6 Capture Ring: kapatal == kapcher == fohldz = 125" },
|
||||||
|
uiTargets: ["guildFilterPills", "tickerSelect"],
|
||||||
|
uiElementLabel: "Guild Filter Pills (#guildFilterPills -> S6) & Ticker Select (#tickerSelect -> BLK)",
|
||||||
subtitle: "Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125 (kapatal == kapcher == fohldz = 125) and charter/sloth (136).",
|
subtitle: "Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125 (kapatal == kapcher == fohldz = 125) and charter/sloth (136).",
|
||||||
|
speechText: "Scene 1.4. Highlighting Guild Filter S6 and the Ticker dropdown list selected to BlackRock. Guild S6 tracks sovereign and balance-sheet capture around Coordinate 125, where capital, capture, and folds all evaluate to 125.",
|
||||||
citations: [
|
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: "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: "Dossier 68 (Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" },
|
||||||
@@ -57,9 +96,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "1.5 Periodicity Audit Footer & IPLD dag-json CIDv1",
|
title: "1.5 Periodicity Audit Footer & IPLD dag-json CIDv1",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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" },
|
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 + 30 closing-bell bars, 0 non-periodic records, and the deterministic IPLD dag-json CIDv1 digest (baguqeera...).",
|
uiTargets: ["periodicityAuditFooter"],
|
||||||
|
uiElementLabel: "Periodicity Audit & CIDv1 Footer (#periodicityAuditFooter)",
|
||||||
|
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.",
|
||||||
|
speechText: "Scene 1.5. Inspecting the Periodicity Audit footer at the bottom of Panel 4. This footer verifies the dated midnight UTC dossiers, real exchange closing-bell bars, and the deterministic IPLD dag-json CIDv1 content identifier.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Static Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
|
{ 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: "REST API /api/v1/quant/timeseries", href: "/api/v1/quant/timeseries?symbol=NVDA" },
|
||||||
@@ -77,7 +119,10 @@
|
|||||||
title: "2.1 Top Pane: Dashed Crimson Identity Line & Real Scope 1 Self-Lock (PLTR)",
|
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 },
|
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)" },
|
spotlight: { target: "canvas", pane: "top", xRatio: 0.76, yRatio: 0.25, label: "Real Scope 1 Self-Lock: PLTR Close $159.36 (159 == palanter)" },
|
||||||
|
uiTargets: ["metricModePills", "tsCanvas"],
|
||||||
|
uiElementLabel: "Metric Mode Pills (#metricModePills -> Close Price USD) & Panel 1 Canvas (#tsCanvas)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 2.1. Highlighting the Metric Mode pills in the toolbar and the Top Pane of the Panel 1 trajectory canvas. On November 23, 2026, Palantir closed at 159 dollars and 36 cents: its rounded integer price 159 lands directly on the dashed crimson threshold marking its own Ingglish name palanter equals 159, firing a real Scope 1 Gold Beacon.",
|
||||||
citations: [
|
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: "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: "Dossier 67 (Silicon War Machine)", href: "/zoology/dossiers/67-dossier-technocapital-singularity-silicon-war-machine.md#:~:text=137" },
|
||||||
@@ -88,7 +133,10 @@
|
|||||||
title: "2.2 Move (BPS) Mode: TSMC (TSM) +81 bps Ring Migration & Microsoft -125 bps",
|
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 },
|
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)" },
|
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)" },
|
||||||
|
uiTargets: ["metricModePills", "tsCanvas"],
|
||||||
|
uiElementLabel: "Metric Mode Pills (#metricModePills -> Move BPS) & Panel 1 Canvas (#tsCanvas)",
|
||||||
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).",
|
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).",
|
||||||
|
speechText: "Scene 2.2. Highlighting the Metric Mode pills switched to Move in Basis Points. On November 18, 2026, TSMC moved plus 81 basis points, landing directly on the S3 lithography coordinate 81, matching ASML equals 81.",
|
||||||
citations: [
|
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: "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" }
|
{ label: "Graph Hub aq:81", href: "/graph/index.html?select=aq:81" }
|
||||||
@@ -98,7 +146,10 @@
|
|||||||
title: "2.3 Real Repdigit Attractor Lock: Broadcom (AVGO) at $333.40 & NVDA Spoken 333",
|
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 },
|
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)" },
|
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)" },
|
||||||
|
uiTargets: ["tickerSelect", "metricModePills", "tsCanvas"],
|
||||||
|
uiElementLabel: "Ticker Select (#tickerSelect -> AVGO) & Panel 1 Top Pane (#tsCanvas)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 2.3. Inspecting Ticker Select set to Broadcom and the Panel 1 trajectory canvas. On November 16, 2026, Broadcom closed at 333 dollars and 40 cents, rounding to the repdigit attractor 333, while Nvidia closed at 206 dollars and 69 cents whose spoken Ingglish phrase two hundred six also sums to 333.",
|
||||||
citations: [
|
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: "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" }
|
{ label: "Graph Hub aq:333", href: "/graph/index.html?select=aq:333" }
|
||||||
@@ -108,7 +159,10 @@
|
|||||||
title: "2.4 Middle Pane: 00:00 GMT Wire Velocity & Emerald Scope 3 Bars",
|
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 },
|
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" },
|
spotlight: { target: "canvas", pane: "mid", xRatio: 0.93, yRatio: 0.63, label: "Emerald Bar = Scope 3 News-Wire Co-Presence" },
|
||||||
|
uiTargets: ["tsCanvas", "activeDateBadge"],
|
||||||
|
uiElementLabel: "Panel 1 Middle Pane (#tsCanvas Wire Velocity) & Active Date Badge (#activeDateBadge)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 2.4. Inspecting the Middle Pane of the Panel 1 canvas. Violet bars show daily 333, 666, and 777 equation counts, while Emerald bars highlight UTC dates where the selected ticker co-occurred in breaking midnight GMT news headlines.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Dossier 71 (2026-11-29)", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
|
{ 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" }
|
{ label: "REST Highlight Preview", href: "/api/v1/dossiers/71?highlight=envideea" }
|
||||||
@@ -118,7 +172,10 @@
|
|||||||
title: "2.5 Bottom Pane: 20-Day Volume Ratio & M1/M2/M3 Thermodynamic Regimes",
|
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 },
|
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)" },
|
spotlight: { target: "canvas", pane: "bot", xRatio: 0.83, yRatio: 0.86, label: "Thermodynamic Regime Color Coding (M1 Gold / M2 Crimson / M3 Sky)" },
|
||||||
|
uiTargets: ["tsCanvas"],
|
||||||
|
uiElementLabel: "Panel 1 Bottom Pane (#tsCanvas 20-Day Volume & M1/M2/M3 Regimes)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 2.5. Inspecting the Bottom Pane of the Panel 1 canvas. Twenty-day relative volume bars are color-coded by thermodynamic regime: Gold for M1 Stagnation, Crimson for M2 Flash-Crash Surge, and Sky-Blue for M3 Leviathan.",
|
||||||
citations: [
|
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 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" }
|
{ 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" }
|
||||||
@@ -135,7 +192,10 @@
|
|||||||
title: "3.1 Panel 2: 24x30 Heatmap & Explicit 'No Data Available' Handling (ANTHR-PVT & Weekends)",
|
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 },
|
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'" },
|
spotlight: { target: "panel2", xRatio: 0.50, yRatio: 0.40, label: "Zero Synthetic Data: ANTHR-PVT & Closed Market Days Show 'No data available'" },
|
||||||
|
uiTargets: ["heatmapTable", "dateMetricsGrid"],
|
||||||
|
uiElementLabel: "Panel 2 Spatiotemporal Lock Heatmap (#heatmapTable) & Panel 3 Metrics Grid (#dateMetricsGrid)",
|
||||||
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'.",
|
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'.",
|
||||||
|
speechText: "Scene 3.1. Highlighting the Panel 2 Spatiotemporal Lock Heatmap table and the Panel 3 Date Metrics grid. This workbench never synthesizes or interpolates missing market data. Because Anthropic is a private entity with no public exchange feed, and US stock markets close on weekends and holidays, those cells explicitly report No data available.",
|
||||||
citations: [
|
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: "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: "Dossier 66 (193 Flash Crash)", href: "/zoology/dossiers/66-dossier-technocapital-singularity-flash-crash-liquidity.md#:~:text=193" },
|
||||||
@@ -144,9 +204,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "3.2 TradingView Superchart Launcher (Shortcut: T)",
|
title: "3.2 TradingView Superchart Launcher (Shortcut: T)",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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)" },
|
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). Clicking 'TradingView ↗' or pressing 'T' opens the live Superchart in a new window while keeping 0 external scripts embedded.",
|
uiTargets: ["openTradingViewBtn", "panel3TvBtn"],
|
||||||
|
uiElementLabel: "Open TradingView Chart Buttons (#openTradingViewBtn & #panel3TvBtn)",
|
||||||
|
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.",
|
||||||
|
speechText: "Scene 3.2. Highlighting the Open TradingView Chart buttons in the toolbar and Panel 3 header. Every ticker resolves deterministically to its exchange and symbol, such as NASDAQ colon NVDA. Clicking TradingView or pressing key T opens the live Superchart in a new window while keeping zero external tracking scripts embedded.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Launch TradingView (NASDAQ:NVDA)", href: "https://www.tradingview.com/chart/?symbol=NASDAQ%3ANVDA" },
|
{ 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" }
|
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=1&search=TradingView" }
|
||||||
@@ -156,7 +219,10 @@
|
|||||||
title: "3.3 Panel 3: Knowledge-Graph-Modeled Documentation & Cited Passages Card",
|
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 },
|
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" },
|
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Passage-Encoded PDF (#page & search) + Dossier (#:~:text=) Links" },
|
||||||
|
uiTargets: ["docReferencesCard"],
|
||||||
|
uiElementLabel: "Panel 3 Documentation & Cited Passages Card (#docReferencesCard)",
|
||||||
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).",
|
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).",
|
||||||
|
speechText: "Scene 3.3. Highlighting the Documentation and Cited Passages card in Panel 3. Modeled directly on the Knowledge Graph inspector drawer, this card links every ticker to its exact Encyclopedia PDF page, Dossier scroll-to-text passage, and Knowledge Graph coordinate node.",
|
||||||
citations: [
|
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: "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: "Graph Deep Link (?select=aq:137)", href: "/graph/index.html?select=aq:137" },
|
||||||
@@ -167,7 +233,10 @@
|
|||||||
title: "3.4 Panel 3: Verbatim Dated Memetic Equation Tape & Inline Passage Preview",
|
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 },
|
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" },
|
spotlight: { target: "wireTape", xRatio: 0.50, yRatio: 0.50, label: "Dated 333 / 666 / 777 Equations with Scroll-to-Text Deep Links" },
|
||||||
|
uiTargets: ["wireTapeFilterInput", "wireEqTape"],
|
||||||
|
uiElementLabel: "Panel 3 Wire Equation Filter (#wireTapeFilterInput) & Equation Tape (#wireEqTape)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 3.4. Highlighting the Wire Equation filter input and Dated Equation Tape in Panel 3. Every equation in the tape includes a scroll-to-text deep link, a Knowledge Graph coordinate link, and an inline REST passage preview button.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Dossier 71 Scroll-to-Text", href: "/archive/71-dossier-news-2026-11-29.md#:~:text=333" },
|
{ 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" }
|
{ label: "REST Dossier 71 JSON", href: "/api/v1/dossiers/71?highlight=333" }
|
||||||
@@ -177,7 +246,10 @@
|
|||||||
title: "3.5 Bidirectional Graph & Dossier Cross-Verification",
|
title: "3.5 Bidirectional Graph & Dossier Cross-Verification",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "COIN", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 27 },
|
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" },
|
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Cross-Corpus Coordinate Verification" },
|
||||||
|
uiTargets: ["tickerSelect", "docReferencesCard"],
|
||||||
|
uiElementLabel: "Ticker Select (#tickerSelect -> COIN) & Documentation Card (#docReferencesCard)",
|
||||||
subtitle: "Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand drawer.",
|
subtitle: "Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand drawer.",
|
||||||
|
speechText: "Scene 3.5. Highlighting Ticker Select set to Coinbase and the Panel 3 Documentation Card. Clicking any coordinate pill jumps straight to the Encyclopedia Knowledge Graph with that node centered and isolated in the right-hand inspector drawer.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Graph Node aq:211", href: "/graph/index.html?select=aq:211" },
|
{ 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" }
|
{ label: "Dossier 68 (S6 Capture)", href: "/zoology/dossiers/68-dossier-technocapital-singularity-apparatus-of-capture.md#:~:text=125" }
|
||||||
@@ -192,9 +264,12 @@
|
|||||||
keyframes: [
|
keyframes: [
|
||||||
{
|
{
|
||||||
title: "4.1 Lens 1: Neutral Mathematical Substrate (neutral_math)",
|
title: "4.1 Lens 1: Neutral Mathematical Substrate (neutral_math)",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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_*)" },
|
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Pure Lens-Neutral Keys (struct_* & ts_*)" },
|
||||||
|
uiTargets: ["lensSelect", "lensProjectionCard"],
|
||||||
|
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Neutral Math) & Lens Card (#lensProjectionCard)",
|
||||||
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).",
|
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).",
|
||||||
|
speechText: "Scene 4.1. Highlighting the Projection Lens dropdown list in the top toolbar and the Lens Projection card in Panel 3. Under the hood, the workbench stores one hundred percent lens-neutral mathematical keys: structural isometric armor, duty cycle percentage, weighted resonance, excess over replacement, and optimal lag days. Use the Projection Lens dropdown list in the toolbar to switch lenses.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.json" },
|
{ 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" }
|
{ 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" }
|
||||||
@@ -202,9 +277,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "4.2 Lens 2: Out-of-Sample Quantitative Factor Register (fund_manager)",
|
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: 29 },
|
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" },
|
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fund Manager Register: Signal Duty Cycle & Alpha Over Benchmark" },
|
||||||
|
uiTargets: ["lensSelect", "lensProjectionCard"],
|
||||||
|
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Fund Manager) & Lens Card (#lensProjectionCard)",
|
||||||
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).",
|
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).",
|
||||||
|
speechText: "Scene 4.2. Highlighting the Projection Lens dropdown list switched to Quant Factor Fund Manager and the Panel 3 Lens Projection card. Selecting Fund Manager in the Projection Lens dropdown translates the exact same six mathematical invariants into institutional factor terminology: Chokepoint Moat, Signal Duty Cycle percentage, and Composite Resonance Load.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Fund Manager Proposal (PDF)", href: "/zoology/proposal-fund-manager-novel-investment-discovery.pdf#page=1&search=Uncaptured" },
|
{ 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" }
|
{ label: "REST Tier List (fund_manager)", href: "/api/v1/zoology/tier-list?register=fund_manager" }
|
||||||
@@ -212,9 +290,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "4.3 Lens 3: Corporate Board & Supply-Chain Governance (corporate_board)",
|
title: "4.3 Lens 3: Corporate Board & Supply-Chain Governance (corporate_board)",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "corporate_board", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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" },
|
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Corporate Board Register: Supply-Chain Moat & Stress-Test Delta" },
|
||||||
|
uiTargets: ["lensSelect", "lensProjectionCard"],
|
||||||
|
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Corporate Board) & Lens Card (#lensProjectionCard)",
|
||||||
subtitle: "Switching to 'Corporate Board' frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
|
subtitle: "Switching to 'Corporate Board' frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
|
||||||
|
speechText: "Scene 4.3. Highlighting the Projection Lens dropdown list switched to Corporate Board and the Panel 3 Lens Projection card. Selecting Corporate Board in the Projection Lens dropdown frames those identical invariants as Supply-Chain Structural Moat, Cross-Unit Synergy, and Stress-Test Regime Delta.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Corporate Board Proposal (PDF)", href: "/zoology/proposal-corporate-board-technocapital-allocation.pdf#page=1&search=Moat" },
|
{ 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" }
|
{ label: "REST Tier List (corporate_board)", href: "/api/v1/zoology/tier-list?register=corporate_board" }
|
||||||
@@ -222,9 +303,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "4.4 Lens 4 & 5: TierZoo Ecology (ETI) & Fantasy Sabermetrics (SNAP% / WOPR / WAR)",
|
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: 29 },
|
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" },
|
spotlight: { target: "lensCard", xRatio: 0.50, yRatio: 0.50, label: "Fantasy Sabermetrics: SNAP%, WOPR, WAR (30d) & Matchup Splits" },
|
||||||
|
uiTargets: ["lensSelect", "lensProjectionCard"],
|
||||||
|
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Fantasy Sabermetrics) & Lens Card (#lensProjectionCard)",
|
||||||
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).",
|
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).",
|
||||||
|
speechText: "Scene 4.4. Highlighting the Projection Lens dropdown list switched to Fantasy Sabermetrics and the Panel 3 Lens Projection card. Selecting Fantasy Sabermetrics in the Projection Lens dropdown projects Snap Percentage, Weighted Opportunity Rating, and thirty-day Wins Above Replacement.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "ETI Tier List Scorecard (PDF)", href: "/zoology/tier-list-technocapital-assemblage-builds.pdf#page=1&search=ETI" },
|
{ 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" }
|
{ 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" }
|
||||||
@@ -232,9 +316,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "4.5 Lens 6: Gen IV Pokédex Field-Scanner (DEX #137)",
|
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: 29 },
|
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" },
|
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 30-day time-series moments—and remains 100% removable via ENABLED_LENSES.",
|
uiTargets: ["lensSelect", "lensProjectionCard"],
|
||||||
|
uiElementLabel: "Projection Lens Dropdown List (#lensSelect -> Pokedex Scanner) & Lens Card (#lensProjectionCard)",
|
||||||
|
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.",
|
||||||
|
speechText: "Scene 4.5. Highlighting the Projection Lens dropdown list switched to Pokedex Scanner and the Panel 3 Lens Projection card. Selecting Pokedex Scanner deterministically derives Gen 4 attributes including Dex number 137, Nature, Passive Ability, and Effort Value Yield from the real time-series moments.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "REST Pokédex Endpoint (/api/v1/zoology/pokedex/NVDA)", href: "/api/v1/zoology/pokedex/NVDA" },
|
{ 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" }
|
{ 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" }
|
||||||
@@ -249,9 +336,12 @@
|
|||||||
keyframes: [
|
keyframes: [
|
||||||
{
|
{
|
||||||
title: "5.1 Panel 4: Lead-Lag Cross-Correlation Curve r(tau) across [-5 .. +5] Days",
|
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: 29 },
|
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*" },
|
spotlight: { target: "panel4", xRatio: 0.50, yRatio: 0.45, label: "Pearson Cross-Correlation r(tau) & Gold Optimal Causal Lag tau*" },
|
||||||
|
uiTargets: ["lagBarsContainer"],
|
||||||
|
uiElementLabel: "Panel 4 Lead-Lag Cross-Correlation Bar Chart (#lagBarsContainer)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 5.1. Highlighting the Lead-Lag Cross-Correlation bar chart in Panel 4. Panel 4 computes the empirical Pearson cross-correlation r of tau between daily midnight GMT news-wire equation velocity and unsigned basis-point price displacement across lags from minus 5 to plus 5 days.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Operator's Manual (Panel 4 Math)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf#page=2&search=Correlation" },
|
{ 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" }
|
{ label: "Graph Mode 2 Concentric Radar", href: "/graph/index.html?select=aq:137&mode=mode2_radar" }
|
||||||
@@ -259,9 +349,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "5.2 Interpreting Optimal Causal Lag tau* (Leader vs. Synchronizer vs. Follower)",
|
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: 29 },
|
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)|" },
|
spotlight: { target: "panel4", xRatio: 0.58, yRatio: 0.45, label: "Gold Bar Marks argmax |r(tau)|" },
|
||||||
|
uiTargets: ["tickerSelect", "lagBarsContainer"],
|
||||||
|
uiElementLabel: "Ticker Select (#tickerSelect -> ASML) & Panel 4 Lead-Lag Bars (#lagBarsContainer)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 5.2. Highlighting the Gold optimal lag bar in Panel 4. The Gold bar marks tau star, the lag maximizing absolute correlation: positive tau star indicates a Teleoplexic Wire Leader, zero indicates an Instantaneous Synchronizer, and negative tau star indicates a Narrative Follower.",
|
||||||
citations: [
|
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: "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" }
|
{ label: "Graph Node aq:81", href: "/graph/index.html?select=aq:81" }
|
||||||
@@ -269,19 +362,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "5.3 Portable .CSV & Lens-Neutral .JSON Slice Exports",
|
title: "5.3 Portable .CSV & Lens-Neutral .JSON Slice Exports",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "neutral_math", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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" },
|
spotlight: { target: "panel4", xRatio: 0.82, yRatio: 0.14, label: "One-Click .CSV & Lens-Neutral .JSON Export" },
|
||||||
|
uiTargets: ["exportCsvBtn", "exportJsonBtn"],
|
||||||
|
uiElementLabel: "Panel 4 Export Buttons (#exportCsvBtn & #exportJsonBtn)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 5.3. Highlighting the Export Filtered Series CSV and Export Lens-Neutral Slice JSON buttons in the Panel 4 header. Click either button to download any ticker's thirty-day periodic bar table and structural vectors for offline research.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Raw Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
|
{ label: "Raw Bundle quant-timeseries.json", href: "/quant/quant-timeseries.json" },
|
||||||
{ label: "Schema quant-timeseries.schema.json", href: "/schemas/v1/quant-timeseries.schema.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",
|
title: "5.4 Panel 5 FRED Macro Strip & Unified Stateless REST API v1 (/api/v1/*)",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
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" },
|
spotlight: { target: "docCard", xRatio: 0.50, yRatio: 0.50, label: "Programmatic REST API v1 & OpenAPI 3.1.0" },
|
||||||
|
uiTargets: ["macroIndicatorsPanel", "docReferencesCard"],
|
||||||
|
uiElementLabel: "Panel 5 FRED Macroeconomic Telemetry (#macroIndicatorsPanel) & REST API Links (#docReferencesCard)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 5.4. Highlighting Panel 5 Federal Reserve Macroeconomic Telemetry and the Panel 3 REST API links. Every readout on the workbench is also queryable programmatically over HTTP via the version 1 REST API and OpenAPI 3.1 specification.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "OpenAPI 3.1.0 Spec (/api/v1/openapi.json)", href: "/api/v1/openapi.json" },
|
{ 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 Status (/api/v1/status)", href: "/api/v1/status" },
|
||||||
@@ -289,10 +388,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "5.5 Complete Tour Summary & Companion Operator's Manual",
|
title: "5.5 Panel 6 Daily Bayesian Brief & Complete Tour Summary",
|
||||||
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 29 },
|
state: { guildFilter: "ALL", selectedSymbol: "NVDA", selectedLens: "fund_manager", metricMode: "spoken_aq", selectedDateIdx: 26 },
|
||||||
spotlight: { target: "canvas", pane: "top", xRatio: 0.96, yRatio: 0.25, label: "Tour Complete — Explore Any Ticker, Lens, or Deep Citation" },
|
spotlight: { target: "canvas", pane: "top", xRatio: 0.89, yRatio: 0.25, label: "Tour Complete — Explore Any Ticker, Lens, or Deep Citation" },
|
||||||
|
uiTargets: ["dailyBriefPanel", "lensSelect"],
|
||||||
|
uiElementLabel: "Panel 6 Daily Bayesian Regime Update (#dailyBriefPanel) & Projection Lens Dropdown (#lensSelect)",
|
||||||
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.",
|
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.",
|
||||||
|
speechText: "Scene 5.5. Highlighting Panel 6, the five-agenda Daily Bayesian Portfolio and Memetic Regime Update, and the Projection Lens dropdown list. You have completed all five episodes of the guided walkthrough. Open the Companion Operator's Manual PDF or click any heatmap cell, projection lens, or deep citation link to continue exploring.",
|
||||||
citations: [
|
citations: [
|
||||||
{ label: "Operator's Manual (PDF)", href: "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf" },
|
{ 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: "Interactive Knowledge Graph (/graph/)", href: "/graph/index.html?select=aq:137" },
|
||||||
@@ -344,24 +446,48 @@
|
|||||||
let isPlaying = false;
|
let isPlaying = false;
|
||||||
let playTimer = null;
|
let playTimer = null;
|
||||||
let speechEnabled = true; // Enabled by default so tour playback narrates immediately
|
let speechEnabled = true; // Enabled by default so tour playback narrates immediately
|
||||||
|
let activeVoiceEngine = "Auto";
|
||||||
let cachedVoices = [];
|
let cachedVoices = [];
|
||||||
let audioCtx = null;
|
let audioCtx = null;
|
||||||
|
let activeAudioEl = null;
|
||||||
|
let activeAudioEqConnected = false;
|
||||||
|
let formantStopFlag = false;
|
||||||
|
|
||||||
function refreshVoices() {
|
function refreshVoices() {
|
||||||
if (typeof window.speechSynthesis === "undefined") return;
|
if (typeof window === "undefined" || typeof window.speechSynthesis === "undefined") return;
|
||||||
try {
|
try {
|
||||||
cachedVoices = window.speechSynthesis.getVoices() || [];
|
cachedVoices = window.speechSynthesis.getVoices() || [];
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
cachedVoices = [];
|
cachedVoices = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof window.speechSynthesis !== "undefined") {
|
if (typeof window !== "undefined" && typeof window.speechSynthesis !== "undefined") {
|
||||||
refreshVoices();
|
refreshVoices();
|
||||||
if (typeof window.speechSynthesis.onvoiceschanged !== "undefined") {
|
if (typeof window.speechSynthesis.onvoiceschanged !== "undefined") {
|
||||||
window.speechSynthesis.onvoiceschanged = refreshVoices;
|
window.speechSynthesis.onvoiceschanged = refreshVoices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanTextForSpeech(rawText, uiElementLabel) {
|
||||||
|
let base = String(rawText || "");
|
||||||
|
if (uiElementLabel && base.indexOf("Inspecting") === -1 && base.indexOf("Highlighting") === -1) {
|
||||||
|
base = "Inspecting " + uiElementLabel + ". " + base;
|
||||||
|
}
|
||||||
|
return base
|
||||||
|
.replace(/\|Δbps_\{i,\s*t\+tau\}\|/g, "absolute basis point displacement at lag tau")
|
||||||
|
.replace(/r\(tau\)/g, "r of tau")
|
||||||
|
.replace(/tau\*/g, "tau star")
|
||||||
|
.replace(/Δ\s*=\s*0/g, "delta equals zero")
|
||||||
|
.replace(/==/g, " equals ")
|
||||||
|
.replace(/#:~:text=/g, "scroll to text ")
|
||||||
|
.replace(/struct_\*/g, "structural keys")
|
||||||
|
.replace(/ts_\*/g, "time series keys")
|
||||||
|
.replace(/24x30/g, "24 by 30")
|
||||||
|
.replace(/↗/g, "")
|
||||||
|
.replace(/\s+/g, " ")
|
||||||
|
.trim();
|
||||||
|
}
|
||||||
|
|
||||||
function playWebAudioTelemetryChime(stepIdx) {
|
function playWebAudioTelemetryChime(stepIdx) {
|
||||||
try {
|
try {
|
||||||
const Ctx = window.AudioContext || window.webkitAudioContext;
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
||||||
@@ -371,18 +497,20 @@
|
|||||||
const baseFreqs = [292.0, 333.0, 394.0, 444.0, 528.0];
|
const baseFreqs = [292.0, 333.0, 394.0, 444.0, 528.0];
|
||||||
const f0 = baseFreqs[stepIdx % baseFreqs.length];
|
const f0 = baseFreqs[stepIdx % baseFreqs.length];
|
||||||
const now = audioCtx.currentTime;
|
const now = audioCtx.currentTime;
|
||||||
|
// Strategy 3A: Duck chime gain by -50% (0.012 vs 0.025) when Voice: ON is active so opening words are never masked
|
||||||
|
const peakGain = speechEnabled ? 0.012 : 0.025;
|
||||||
[f0, f0 * 1.25, f0 * 1.5].forEach(function (freq, i) {
|
[f0, f0 * 1.25, f0 * 1.5].forEach(function (freq, i) {
|
||||||
const osc = audioCtx.createOscillator();
|
const osc = audioCtx.createOscillator();
|
||||||
const gain = audioCtx.createGain();
|
const gain = audioCtx.createGain();
|
||||||
osc.type = i === 0 ? "triangle" : "sine";
|
osc.type = i === 0 ? "triangle" : "sine";
|
||||||
osc.frequency.setValueAtTime(freq, now + i * 0.09);
|
osc.frequency.setValueAtTime(freq, now + i * 0.09);
|
||||||
gain.gain.setValueAtTime(0.001, 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(peakGain, now + i * 0.09 + 0.03);
|
||||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + i * 0.09 + 0.45);
|
gain.gain.exponentialRampToValueAtTime(0.0001, now + i * 0.09 + 0.35);
|
||||||
osc.connect(gain);
|
osc.connect(gain);
|
||||||
gain.connect(audioCtx.destination);
|
gain.connect(audioCtx.destination);
|
||||||
osc.start(now + i * 0.09);
|
osc.start(now + i * 0.09);
|
||||||
osc.stop(now + i * 0.09 + 0.48);
|
osc.stop(now + i * 0.09 + 0.38);
|
||||||
});
|
});
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
@@ -395,54 +523,269 @@
|
|||||||
}, delayMs);
|
}, delayMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function speakSubtitle(text, onDoneCallback) {
|
function stopAllVoiceOutputs() {
|
||||||
|
formantStopFlag = true;
|
||||||
|
if (activeAudioEl) {
|
||||||
|
try {
|
||||||
|
activeAudioEl.pause();
|
||||||
|
activeAudioEl.currentTime = 0;
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
if (typeof window !== "undefined" && typeof window.speechSynthesis !== "undefined") {
|
||||||
|
try {
|
||||||
|
if (window.speechSynthesis.speaking || window.speechSynthesis.pending) {
|
||||||
|
window.speechSynthesis.cancel();
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
rootObj.__hsActiveUtterance = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tier 3 In-Browser Klatt Formant WebAudio Speech Synthesizer (for offline file:// when getVoices() === [])
|
||||||
|
function playInBrowserFormantSpeech(speechText, onFinish) {
|
||||||
|
try {
|
||||||
|
const Ctx = (typeof window !== "undefined") && (window.AudioContext || window.webkitAudioContext);
|
||||||
|
if (!Ctx) {
|
||||||
|
if (onFinish) onFinish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!audioCtx) audioCtx = new Ctx();
|
||||||
|
if (audioCtx.state === "suspended") audioCtx.resume();
|
||||||
|
formantStopFlag = false;
|
||||||
|
activeVoiceEngine = "Formant Synth";
|
||||||
|
renderTutorialUI();
|
||||||
|
|
||||||
|
const words = String(speechText || "").toLowerCase().match(/[a-z0-9]+|[.,;:!?]/g) || [];
|
||||||
|
const vowelMap = {
|
||||||
|
a: [660, 1350],
|
||||||
|
e: [510, 1880],
|
||||||
|
i: [370, 2050],
|
||||||
|
o: [520, 950],
|
||||||
|
u: [380, 1050],
|
||||||
|
y: [320, 2100]
|
||||||
|
};
|
||||||
|
let tOffset = audioCtx.currentTime + 0.04;
|
||||||
|
const maxWords = Math.min(words.length, 48);
|
||||||
|
for (let wi = 0; wi < maxWords; wi++) {
|
||||||
|
const w = words[wi];
|
||||||
|
if (w === "." || w === "!" || w === "?") {
|
||||||
|
tOffset += 0.14;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (w === "," || w === ";" || w === ":") {
|
||||||
|
tOffset += 0.07;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const vowels = w.match(/[aeiouy]/g) || ["a"];
|
||||||
|
const f0 = 116.0 - 14.0 * ((wi % 10) / 10.0);
|
||||||
|
for (let vi = 0; vi < Math.min(vowels.length, 3); vi++) {
|
||||||
|
const vf = vowelMap[vowels[vi]] || [580, 1250];
|
||||||
|
const dur = 0.075;
|
||||||
|
const osc0 = audioCtx.createOscillator();
|
||||||
|
const osc1 = audioCtx.createOscillator();
|
||||||
|
const osc2 = audioCtx.createOscillator();
|
||||||
|
const gain = audioCtx.createGain();
|
||||||
|
osc0.type = "sawtooth";
|
||||||
|
osc1.type = "sine";
|
||||||
|
osc2.type = "sine";
|
||||||
|
osc0.frequency.setValueAtTime(f0, tOffset);
|
||||||
|
osc1.frequency.setValueAtTime(vf[0], tOffset);
|
||||||
|
osc2.frequency.setValueAtTime(vf[1], tOffset);
|
||||||
|
gain.gain.setValueAtTime(0.0001, tOffset);
|
||||||
|
gain.gain.linearRampToValueAtTime(0.045, tOffset + 0.015);
|
||||||
|
gain.gain.exponentialRampToValueAtTime(0.0001, tOffset + dur);
|
||||||
|
osc0.connect(gain);
|
||||||
|
osc1.connect(gain);
|
||||||
|
osc2.connect(gain);
|
||||||
|
gain.connect(audioCtx.destination);
|
||||||
|
osc0.start(tOffset);
|
||||||
|
osc1.start(tOffset);
|
||||||
|
osc2.start(tOffset);
|
||||||
|
osc0.stop(tOffset + dur + 0.01);
|
||||||
|
osc1.stop(tOffset + dur + 0.01);
|
||||||
|
osc2.stop(tOffset + dur + 0.01);
|
||||||
|
tOffset += dur;
|
||||||
|
}
|
||||||
|
tOffset += 0.025;
|
||||||
|
}
|
||||||
|
const totalDurMs = Math.max(2500, Math.round((tOffset - audioCtx.currentTime) * 1000));
|
||||||
|
setTimeout(function () {
|
||||||
|
if (!formantStopFlag && onFinish) onFinish();
|
||||||
|
}, totalDurMs);
|
||||||
|
} catch (_) {
|
||||||
|
if (onFinish) onFinish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tier 2 Deploy-Time Untracked WAV Playback (/quant/audio/ep0X-sY.wav) -> Tier 3 Formant Fallback
|
||||||
|
function playDeployTimeWavOrFormant(clipId, rawSpeech, onFinish) {
|
||||||
|
if (typeof document === "undefined" || typeof Audio === "undefined") {
|
||||||
|
playInBrowserFormantSpeech(rawSpeech, onFinish);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (!activeAudioEl) {
|
||||||
|
activeAudioEl = document.getElementById("tutVoiceAudio");
|
||||||
|
if (!activeAudioEl) {
|
||||||
|
activeAudioEl = document.createElement("audio");
|
||||||
|
activeAudioEl.id = "tutVoiceAudio";
|
||||||
|
activeAudioEl.preload = "auto";
|
||||||
|
activeAudioEl.style.display = "none";
|
||||||
|
document.body.appendChild(activeAudioEl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Strategy 3A: Route #tutVoiceAudio through a WebAudio BiquadFilterNode vocal warmth EQ (+2.5 dB @ 220 Hz, -3.0 dB @ 4.8 kHz)
|
||||||
|
if (!activeAudioEqConnected && typeof window !== "undefined" && window.location && window.location.protocol !== "file:") {
|
||||||
|
try {
|
||||||
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
||||||
|
if (Ctx) {
|
||||||
|
if (!audioCtx) audioCtx = new Ctx();
|
||||||
|
if (audioCtx.state === "suspended") audioCtx.resume();
|
||||||
|
const srcNode = audioCtx.createMediaElementSource(activeAudioEl);
|
||||||
|
const lowShelf = audioCtx.createBiquadFilter();
|
||||||
|
lowShelf.type = "lowshelf";
|
||||||
|
lowShelf.frequency.value = 220.0;
|
||||||
|
lowShelf.gain.value = 2.5;
|
||||||
|
const deEssPeak = audioCtx.createBiquadFilter();
|
||||||
|
deEssPeak.type = "peaking";
|
||||||
|
deEssPeak.frequency.value = 4800.0;
|
||||||
|
deEssPeak.Q.value = 1.4;
|
||||||
|
deEssPeak.gain.value = -3.0;
|
||||||
|
srcNode.connect(lowShelf);
|
||||||
|
lowShelf.connect(deEssPeak);
|
||||||
|
deEssPeak.connect(audioCtx.destination);
|
||||||
|
activeAudioEqConnected = true;
|
||||||
|
}
|
||||||
|
} catch (_) {
|
||||||
|
activeAudioEqConnected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const wavUrl = "./audio/" + clipId + ".wav";
|
||||||
|
let handled = false;
|
||||||
|
const doneOnce = function () {
|
||||||
|
if (handled) return;
|
||||||
|
handled = true;
|
||||||
|
if (onFinish) onFinish();
|
||||||
|
};
|
||||||
|
activeAudioEl.onended = doneOnce;
|
||||||
|
activeAudioEl.onerror = function () {
|
||||||
|
if (handled) return;
|
||||||
|
handled = true;
|
||||||
|
playInBrowserFormantSpeech(rawSpeech, onFinish);
|
||||||
|
};
|
||||||
|
activeAudioEl.src = wavUrl;
|
||||||
|
const playPromise = activeAudioEl.play();
|
||||||
|
activeVoiceEngine = "WAV Audio";
|
||||||
|
renderTutorialUI();
|
||||||
|
if (playPromise && typeof playPromise.catch === "function") {
|
||||||
|
playPromise.catch(function () {
|
||||||
|
if (handled) return;
|
||||||
|
handled = true;
|
||||||
|
playInBrowserFormantSpeech(rawSpeech, onFinish);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (_) {
|
||||||
|
playInBrowserFormantSpeech(rawSpeech, onFinish);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Strategies 1A, 2A & 3A: Guarded cancel(), GC-pinned utterance, 250ms onstart watchdog & 3-tier fallback
|
||||||
|
function speakSubtitle(kfOrText, onDoneCallback) {
|
||||||
if (!speechEnabled) {
|
if (!speechEnabled) {
|
||||||
if (onDoneCallback) scheduleNextStep(7000);
|
if (onDoneCallback) scheduleNextStep(7000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Always play a subtle harmonic telemetry cue at scene start so audio feedback is immediate even if OS TTS voices are absent
|
const rawSpeech = (kfOrText && typeof kfOrText === "object")
|
||||||
playWebAudioTelemetryChime(curStepIdx);
|
? (kfOrText.speechText || cleanTextForSpeech(kfOrText.subtitle, kfOrText.uiElementLabel))
|
||||||
|
: cleanTextForSpeech(String(kfOrText || ""), "");
|
||||||
|
const clipId = "ep0" + (curEpIdx + 1) + "-s" + (curStepIdx + 1);
|
||||||
|
|
||||||
|
stopAllVoiceOutputs();
|
||||||
|
playWebAudioTelemetryChime(curStepIdx);
|
||||||
refreshVoices();
|
refreshVoices();
|
||||||
if (typeof window.speechSynthesis === "undefined" || cachedVoices.length === 0) {
|
|
||||||
if (onDoneCallback) scheduleNextStep(7500);
|
let settled = false;
|
||||||
|
const finishSceneSpeech = function () {
|
||||||
|
if (settled) return;
|
||||||
|
settled = true;
|
||||||
|
rootObj.__hsActiveUtterance = null;
|
||||||
|
if (onDoneCallback && isPlaying) {
|
||||||
|
scheduleNextStep(1600);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const estMs = Math.max(8500, Math.min(22000, rawSpeech.split(/\s+/).length * 410));
|
||||||
|
if (onDoneCallback && isPlaying) {
|
||||||
|
scheduleNextStep(estMs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If browser has no speechSynthesis or 0 installed OS voices (common on Linux/Fedora desktops),
|
||||||
|
// immediately play the deploy-time WAV track (or Formant Synth fallback) so voice is 100% audible!
|
||||||
|
if (
|
||||||
|
typeof window === "undefined" ||
|
||||||
|
typeof window.speechSynthesis === "undefined" ||
|
||||||
|
typeof SpeechSynthesisUtterance === "undefined" ||
|
||||||
|
cachedVoices.length === 0
|
||||||
|
) {
|
||||||
|
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
window.speechSynthesis.cancel();
|
if (typeof window.speechSynthesis.resume === "function") {
|
||||||
window.speechSynthesis.resume();
|
window.speechSynthesis.resume();
|
||||||
setTimeout(function () {
|
}
|
||||||
if (!speechEnabled) return;
|
const u = new SpeechSynthesisUtterance(rawSpeech);
|
||||||
const u = new SpeechSynthesisUtterance(text);
|
// Strategy 2A: Pin u on rootObj so Chromium/WebKit GC never collects the utterance mid-speech
|
||||||
|
rootObj.__hsActiveUtterance = u;
|
||||||
const preferred = cachedVoices.find(function (v) {
|
const preferred = cachedVoices.find(function (v) {
|
||||||
return /en(-|_)(US|GB)/i.test(v.lang) && /natural|neural|google|english/i.test(v.name);
|
return /en(-|_)(US|GB)/i.test(v.lang) && /natural|neural|google|english/i.test(v.name);
|
||||||
}) || cachedVoices.find(function (v) {
|
}) || cachedVoices.find(function (v) {
|
||||||
return /^en/i.test(v.lang);
|
return /^en/i.test(v.lang);
|
||||||
}) || cachedVoices[0];
|
}) || cachedVoices[0];
|
||||||
if (preferred) u.voice = preferred;
|
if (preferred) u.voice = preferred;
|
||||||
|
u.lang = "en-US";
|
||||||
u.rate = 1.03;
|
u.rate = 1.03;
|
||||||
u.pitch = 1.0;
|
u.pitch = 1.0;
|
||||||
u.volume = 1.0;
|
u.volume = 1.0;
|
||||||
let settled = false;
|
|
||||||
const finish = function () {
|
let speechStarted = false;
|
||||||
if (settled) return;
|
let fallbackTriggered = false;
|
||||||
settled = true;
|
const triggerFallback = function () {
|
||||||
if (onDoneCallback && isPlaying) {
|
if (fallbackTriggered || settled || !speechEnabled) return;
|
||||||
scheduleNextStep(1800);
|
fallbackTriggered = true;
|
||||||
|
try {
|
||||||
|
if (window.speechSynthesis.speaking || window.speechSynthesis.pending) {
|
||||||
|
window.speechSynthesis.cancel();
|
||||||
}
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
|
||||||
};
|
};
|
||||||
u.onend = finish;
|
|
||||||
u.onerror = finish;
|
u.onstart = function () {
|
||||||
|
speechStarted = true;
|
||||||
|
activeVoiceEngine = "WebSpeech";
|
||||||
|
renderTutorialUI();
|
||||||
|
};
|
||||||
|
u.onend = function () {
|
||||||
|
if (!fallbackTriggered) finishSceneSpeech();
|
||||||
|
};
|
||||||
|
u.onerror = function () {
|
||||||
|
if (!speechStarted) triggerFallback();
|
||||||
|
else finishSceneSpeech();
|
||||||
|
};
|
||||||
|
|
||||||
window.speechSynthesis.speak(u);
|
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));
|
// Strategy 2A: 250ms hardware watchdog — if OS speech-dispatcher socket is hung and onstart never fires,
|
||||||
if (onDoneCallback && isPlaying) {
|
// automatically switch to deploy-time WAV / WebAudio formant synth so the user always hears the narration!
|
||||||
scheduleNextStep(estMs);
|
setTimeout(function () {
|
||||||
|
if (!speechStarted && !settled && speechEnabled) {
|
||||||
|
triggerFallback();
|
||||||
}
|
}
|
||||||
}, 60);
|
}, 250);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
if (onDoneCallback) scheduleNextStep(7500);
|
playDeployTimeWavOrFormant(clipId, rawSpeech, finishSceneSpeech);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,24 +794,65 @@
|
|||||||
return ep.keyframes[curStepIdx] || ep.keyframes[0];
|
return ep.keyframes[curStepIdx] || ep.keyframes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightDomTarget(targetId) {
|
// Strategy 2A: Highlight all 18+ interactive DOM controls (including #lensSelect in Ep 04) + floating pointer badge
|
||||||
["heatmapTable", "lensProjectionCard", "docReferencesCard", "wireEqTape", "lagBarsContainer"].forEach(function (id) {
|
function highlightDomTarget(kfOrTargetId) {
|
||||||
|
ALL_HIGHLIGHTABLE_DOM_IDS.forEach(function (id) {
|
||||||
const el = document.getElementById(id);
|
const el = document.getElementById(id);
|
||||||
if (el) el.style.boxShadow = "";
|
if (el) {
|
||||||
|
el.style.boxShadow = "";
|
||||||
|
el.classList.remove("tut-ui-highlight");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const map = {
|
const badge = document.getElementById("tutUiElementIndicator");
|
||||||
panel2: "heatmapTable",
|
if (!kfOrTargetId) {
|
||||||
lensCard: "lensProjectionCard",
|
if (badge) badge.style.display = "none";
|
||||||
docCard: "docReferencesCard",
|
return;
|
||||||
wireTape: "wireEqTape",
|
}
|
||||||
panel4: "lagBarsContainer"
|
|
||||||
|
const legacyMap = {
|
||||||
|
panel2: ["heatmapTable"],
|
||||||
|
lensCard: ["lensSelect", "lensProjectionCard"],
|
||||||
|
docCard: ["docReferencesCard"],
|
||||||
|
wireTape: ["wireTapeFilterInput", "wireEqTape"],
|
||||||
|
panel4: ["lagBarsContainer"],
|
||||||
|
panel3: ["openTradingViewBtn", "panel3TvBtn"],
|
||||||
|
canvas: ["tsCanvas"]
|
||||||
};
|
};
|
||||||
const domId = map[targetId];
|
|
||||||
if (domId) {
|
let targetIds = [];
|
||||||
|
let badgeText = "";
|
||||||
|
if (typeof kfOrTargetId === "object") {
|
||||||
|
if (Array.isArray(kfOrTargetId.uiTargets) && kfOrTargetId.uiTargets.length > 0) {
|
||||||
|
targetIds = kfOrTargetId.uiTargets.slice();
|
||||||
|
} else if (kfOrTargetId.spotlight && kfOrTargetId.spotlight.target) {
|
||||||
|
targetIds = legacyMap[kfOrTargetId.spotlight.target] || [kfOrTargetId.spotlight.target];
|
||||||
|
}
|
||||||
|
badgeText = kfOrTargetId.uiElementLabel || ("UI ELEMENT: #" + (targetIds[0] || "tsCanvas"));
|
||||||
|
} else if (typeof kfOrTargetId === "string") {
|
||||||
|
targetIds = legacyMap[kfOrTargetId] || [kfOrTargetId];
|
||||||
|
badgeText = "UI ELEMENT: #" + targetIds[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
let primaryEl = null;
|
||||||
|
targetIds.forEach(function (domId) {
|
||||||
const el = document.getElementById(domId);
|
const el = document.getElementById(domId);
|
||||||
if (el) {
|
if (el) {
|
||||||
el.style.boxShadow = "0 0 0 2px #f5c630, 0 0 18px rgba(245, 198, 48, 0.35)";
|
el.classList.add("tut-ui-highlight");
|
||||||
|
el.style.boxShadow = "0 0 0 2px #f5c630, 0 0 18px rgba(245, 198, 48, 0.45)";
|
||||||
|
if (!primaryEl) primaryEl = el;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (badge && primaryEl && typeof primaryEl.getBoundingClientRect === "function") {
|
||||||
|
const rect = primaryEl.getBoundingClientRect();
|
||||||
|
const topPx = Math.max(8, Math.min(window.innerHeight - 36, rect.top - 28));
|
||||||
|
const leftPx = Math.max(8, Math.min(window.innerWidth - 320, rect.left));
|
||||||
|
badge.textContent = "\u25BC ACTIVE UI ELEMENT: " + badgeText;
|
||||||
|
badge.style.top = topPx + "px";
|
||||||
|
badge.style.left = leftPx + "px";
|
||||||
|
badge.style.display = "block";
|
||||||
|
} else if (badge) {
|
||||||
|
badge.style.display = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,10 +862,10 @@
|
|||||||
if (app && typeof app.setStateAndRender === "function") {
|
if (app && typeof app.setStateAndRender === "function") {
|
||||||
app.setStateAndRender(kf.state, kf.spotlight);
|
app.setStateAndRender(kf.state, kf.spotlight);
|
||||||
}
|
}
|
||||||
highlightDomTarget(kf.spotlight && kf.spotlight.target);
|
highlightDomTarget(kf);
|
||||||
renderTutorialUI();
|
renderTutorialUI();
|
||||||
if (narrateNow || isPlaying) {
|
if (narrateNow || isPlaying) {
|
||||||
speakSubtitle(kf.subtitle, isPlaying);
|
speakSubtitle(kf, isPlaying);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,9 +906,7 @@
|
|||||||
clearTimeout(playTimer);
|
clearTimeout(playTimer);
|
||||||
playTimer = null;
|
playTimer = null;
|
||||||
}
|
}
|
||||||
if (typeof window.speechSynthesis !== "undefined") {
|
stopAllVoiceOutputs();
|
||||||
try { window.speechSynthesis.cancel(); } catch (_) {}
|
|
||||||
}
|
|
||||||
renderTutorialUI();
|
renderTutorialUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,16 +944,20 @@
|
|||||||
if (speechBtn) {
|
if (speechBtn) {
|
||||||
speechBtn.textContent = speechEnabled ? "\uD83D\uDD0A Voice: ON" : "\uD83D\uDD07 Voice: OFF";
|
speechBtn.textContent = speechEnabled ? "\uD83D\uDD0A Voice: ON" : "\uD83D\uDD07 Voice: OFF";
|
||||||
speechBtn.className = speechEnabled ? "btn primary" : "btn";
|
speechBtn.className = speechEnabled ? "btn primary" : "btn";
|
||||||
|
speechBtn.title = speechEnabled
|
||||||
|
? ("Active Voice Engine: " + activeVoiceEngine + " (Click to mute)")
|
||||||
|
: "Voice Narration Muted (Click to enable spoken narration)";
|
||||||
}
|
}
|
||||||
if (stepBadge) {
|
if (stepBadge) {
|
||||||
stepBadge.textContent = ep.code + " \u2022 Scene " + (curStepIdx + 1) + "/" + ep.keyframes.length;
|
const voxTag = speechEnabled ? (" \u2022 \uD83D\uDD0A " + activeVoiceEngine) : "";
|
||||||
|
stepBadge.textContent = ep.code + " \u2022 Scene " + (curStepIdx + 1) + "/" + ep.keyframes.length + voxTag + (kf.uiElementLabel ? " \u2022 [" + kf.uiElementLabel + "]" : "");
|
||||||
}
|
}
|
||||||
if (scrubber) {
|
if (scrubber) {
|
||||||
scrubber.max = String(ep.keyframes.length - 1);
|
scrubber.max = String(ep.keyframes.length - 1);
|
||||||
scrubber.value = String(curStepIdx);
|
scrubber.value = String(curStepIdx);
|
||||||
}
|
}
|
||||||
if (titleEl) {
|
if (titleEl) {
|
||||||
titleEl.textContent = kf.title;
|
titleEl.textContent = kf.title + (kf.uiElementLabel ? " \u2014 UI Element: " + kf.uiElementLabel : "");
|
||||||
}
|
}
|
||||||
if (subEl) {
|
if (subEl) {
|
||||||
subEl.textContent = kf.subtitle;
|
subEl.textContent = kf.subtitle;
|
||||||
@@ -614,10 +1000,8 @@
|
|||||||
if (speechBtn) {
|
if (speechBtn) {
|
||||||
speechBtn.onclick = function () {
|
speechBtn.onclick = function () {
|
||||||
speechEnabled = !speechEnabled;
|
speechEnabled = !speechEnabled;
|
||||||
if (speechEnabled) speakSubtitle(getActiveKeyframe().subtitle, isPlaying);
|
if (speechEnabled) speakSubtitle(getActiveKeyframe(), isPlaying);
|
||||||
else if (typeof window.speechSynthesis !== "undefined") {
|
else stopAllVoiceOutputs();
|
||||||
try { window.speechSynthesis.cancel(); } catch (_) {}
|
|
||||||
}
|
|
||||||
renderTutorialUI();
|
renderTutorialUI();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -629,19 +1013,33 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener("scroll", function () {
|
||||||
|
if (isPlaying) highlightDomTarget(getActiveKeyframe());
|
||||||
|
}, { passive: true });
|
||||||
|
|
||||||
renderTutorialUI();
|
renderTutorialUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.HyperstitionStudio.QuantTutorials = {
|
const exportedApi = {
|
||||||
version: "2.0.23",
|
version: "2.17.1",
|
||||||
episodes: EPISODES,
|
episodes: EPISODES,
|
||||||
|
allHighlightableDomIds: ALL_HIGHLIGHTABLE_DOM_IDS,
|
||||||
|
cleanTextForSpeech: cleanTextForSpeech,
|
||||||
|
highlightDomTarget: highlightDomTarget,
|
||||||
|
speakSubtitle: speakSubtitle,
|
||||||
adaptHrefForFileProtocol: adaptHrefForFileProtocol,
|
adaptHrefForFileProtocol: adaptHrefForFileProtocol,
|
||||||
init: initTutorials
|
init: initTutorials
|
||||||
};
|
};
|
||||||
|
rootObj.HyperstitionStudio.QuantTutorials = exportedApi;
|
||||||
|
if (typeof module !== "undefined" && module.exports) {
|
||||||
|
module.exports = exportedApi;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof document !== "undefined") {
|
||||||
if (document.readyState === "loading") {
|
if (document.readyState === "loading") {
|
||||||
document.addEventListener("DOMContentLoaded", initTutorials);
|
document.addEventListener("DOMContentLoaded", initTutorials);
|
||||||
} else {
|
} else {
|
||||||
initTutorials();
|
initTutorials();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// Auto-generated by hyperstitionstud_io.quant.macro — DO NOT EDIT MANUALLY
|
||||||
|
window.HYPERSTITION_MACRO_DATA = {"$schema": "./schemas/v1/macro-indicators.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators", "version": "2.17.1", "generated_at_utc": "2026-12-02T21:30:17Z", "synthetic_data_eliminated": true, "cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable", "source": "fred_stlouisfed_keyless_csv", "series_count": 14, "series": {"cpi": {"series_id": "CPIAUCSL", "slug": "cpi", "label": "CPI (Consumer Price Index: All Urban Consumers)", "cadence": "1mo", "unit": "Index (1982-84=100)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 337.476, "prior_date_utc": "2026-09-01", "prior_value": 336.298, "period_change_bps": 35, "period_change_pct": 0.35, "yoy_change_pct": 4.08, "yoy_change_bps": 408, "aq_evaluation": {"face_int": 337, "digit_aq": 13, "spoken_eng": "three hundred thirty seven", "spoken_eng_aq": 502, "spoken_ing": "three huhndrad therdee sevan", "spoken_ing_aq": 485, "prime_rank_face": 68, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 35, "digit_aq": 8, "spoken_eng": "thirty five", "spoken_eng_aq": 232, "spoken_ing": "therdee faiv", "spoken_ing_aq": 202, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": ["2025-10-01"], "recent_observations": [{"date_utc": "2025-10-01", "data_available": false, "status": "No data available", "value": null}, {"date_utc": "2025-11-01", "data_available": true, "status": "ok", "value": 325.063}, {"date_utc": "2025-12-01", "data_available": true, "status": "ok", "value": 326.031}, {"date_utc": "2026-01-01", "data_available": true, "status": "ok", "value": 326.588}, {"date_utc": "2026-02-01", "data_available": true, "status": "ok", "value": 327.46}, {"date_utc": "2026-03-01", "data_available": true, "status": "ok", "value": 330.293}, {"date_utc": "2026-04-01", "data_available": true, "status": "ok", "value": 332.407}, {"date_utc": "2026-05-01", "data_available": true, "status": "ok", "value": 333.979}, {"date_utc": "2026-06-01", "data_available": true, "status": "ok", "value": 332.568}, {"date_utc": "2026-07-01", "data_available": true, "status": "ok", "value": 332.813}, {"date_utc": "2026-08-01", "data_available": true, "status": "ok", "value": 334.131}, {"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 336.298}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 337.476}]}, "ppi": {"series_id": "PPIACO", "slug": "ppi", "label": "PPI (Producer Price Index: All Commodities)", "cadence": "1mo", "unit": "Index (1982=100)", "guilds": ["S3", "S6"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 293.921, "prior_date_utc": "2026-09-01", "prior_value": 294.473, "period_change_bps": -19, "period_change_pct": -0.19, "yoy_change_pct": 12.79, "yoy_change_bps": 1279, "aq_evaluation": {"face_int": 294, "digit_aq": 15, "spoken_eng": "two hundred ninety four", "spoken_eng_aq": 459, "spoken_ing": "too huhndrad naintee for", "spoken_ing_aq": 424, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 19, "digit_aq": 10, "spoken_eng": "nineteen", "spoken_eng_aq": 158, "spoken_ing": "nainteen", "spoken_ing_aq": 154, "prime_rank_face": 8, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2025-10-01", "data_available": true, "status": "ok", "value": 260.591}, {"date_utc": "2025-11-01", "data_available": true, "status": "ok", "value": 261.914}, {"date_utc": "2025-12-01", "data_available": true, "status": "ok", "value": 261.333}, {"date_utc": "2026-01-01", "data_available": true, "status": "ok", "value": 263.608}, {"date_utc": "2026-02-01", "data_available": true, "status": "ok", "value": 269.535}, {"date_utc": "2026-03-01", "data_available": true, "status": "ok", "value": 276.109}, {"date_utc": "2026-04-01", "data_available": true, "status": "ok", "value": 282.722}, {"date_utc": "2026-05-01", "data_available": true, "status": "ok", "value": 290.281}, {"date_utc": "2026-06-01", "data_available": true, "status": "ok", "value": 285.795}, {"date_utc": "2026-07-01", "data_available": true, "status": "ok", "value": 284.837}, {"date_utc": "2026-08-01", "data_available": true, "status": "ok", "value": 287.522}, {"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 294.473}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 293.921}]}, "us10y": {"series_id": "DGS10", "slug": "us10y", "label": "US10Y (10-Year US Treasury Constant Maturity Yield)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S1"], "data_available": true, "status": "ok", "latest_date_utc": "2026-12-01", "latest_value": 5.06,
Line truncated
|
||||||
@@ -176,6 +176,36 @@
|
|||||||
"volume_ratio_20d": 0.53,
|
"volume_ratio_20d": 0.53,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 152.55,
|
||||||
|
"change_pct": 1.37,
|
||||||
|
"change_bps": 137,
|
||||||
|
"volume_ratio_20d": 0.77,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 156.67,
|
||||||
|
"change_pct": 2.7,
|
||||||
|
"change_bps": 270,
|
||||||
|
"volume_ratio_20d": 0.64,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 151.72,
|
||||||
|
"change_pct": -3.16,
|
||||||
|
"change_bps": -316,
|
||||||
|
"volume_ratio_20d": 0.54,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -354,6 +384,36 @@
|
|||||||
"volume_ratio_20d": 0.53,
|
"volume_ratio_20d": 0.53,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 1316.13,
|
||||||
|
"change_pct": -0.73,
|
||||||
|
"change_bps": -73,
|
||||||
|
"volume_ratio_20d": 0.87,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 1332.5,
|
||||||
|
"change_pct": 1.24,
|
||||||
|
"change_bps": 124,
|
||||||
|
"volume_ratio_20d": 1.15,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 1311.45,
|
||||||
|
"change_pct": -1.58,
|
||||||
|
"change_bps": -158,
|
||||||
|
"volume_ratio_20d": 0.67,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -532,13 +592,43 @@
|
|||||||
"volume_ratio_20d": 0.49,
|
"volume_ratio_20d": 0.49,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 365.37,
|
||||||
|
"change_pct": 3.4,
|
||||||
|
"change_bps": 340,
|
||||||
|
"volume_ratio_20d": 0.91,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 378.32,
|
||||||
|
"change_pct": 3.54,
|
||||||
|
"change_bps": 354,
|
||||||
|
"volume_ratio_20d": 0.72,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 370.61,
|
||||||
|
"change_pct": -2.04,
|
||||||
|
"change_bps": -204,
|
||||||
|
"volume_ratio_20d": 0.45,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ANTHR-PVT": {
|
"ANTHR-PVT": {
|
||||||
"symbol": "ANTHR-PVT",
|
"symbol": "ANTHR-PVT",
|
||||||
"feed_source": null,
|
"data_available": false,
|
||||||
"status": "No data available (private entity \u2014 not publicly traded)",
|
"status": "No data available",
|
||||||
"bars_by_date": {}
|
"bars_by_date": {}
|
||||||
},
|
},
|
||||||
"MSFT": {
|
"MSFT": {
|
||||||
@@ -716,6 +806,36 @@
|
|||||||
"volume_ratio_20d": 0.41,
|
"volume_ratio_20d": 0.41,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 487.2,
|
||||||
|
"change_pct": -1.15,
|
||||||
|
"change_bps": -115,
|
||||||
|
"volume_ratio_20d": 1.39,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 475.46,
|
||||||
|
"change_pct": -2.41,
|
||||||
|
"change_bps": -241,
|
||||||
|
"volume_ratio_20d": 1.16,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 476.54,
|
||||||
|
"change_pct": 0.23,
|
||||||
|
"change_bps": 23,
|
||||||
|
"volume_ratio_20d": 0.74,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -894,6 +1014,36 @@
|
|||||||
"volume_ratio_20d": 0.5,
|
"volume_ratio_20d": 0.5,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 295.16,
|
||||||
|
"change_pct": 7.35,
|
||||||
|
"change_bps": 735,
|
||||||
|
"volume_ratio_20d": 1.84,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 299.98,
|
||||||
|
"change_pct": 1.63,
|
||||||
|
"change_bps": 163,
|
||||||
|
"volume_ratio_20d": 1.05,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 291.63,
|
||||||
|
"change_pct": -2.78,
|
||||||
|
"change_bps": -278,
|
||||||
|
"volume_ratio_20d": 0.88,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1072,6 +1222,36 @@
|
|||||||
"volume_ratio_20d": 0.61,
|
"volume_ratio_20d": 0.61,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 633.47,
|
||||||
|
"change_pct": 0.72,
|
||||||
|
"change_bps": 72,
|
||||||
|
"volume_ratio_20d": 1.15,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 647.97,
|
||||||
|
"change_pct": 2.29,
|
||||||
|
"change_bps": 229,
|
||||||
|
"volume_ratio_20d": 0.88,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 646.3,
|
||||||
|
"change_pct": -0.26,
|
||||||
|
"change_bps": -26,
|
||||||
|
"volume_ratio_20d": 0.69,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1250,6 +1430,36 @@
|
|||||||
"volume_ratio_20d": 0.38,
|
"volume_ratio_20d": 0.38,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 110.44,
|
||||||
|
"change_pct": 3.09,
|
||||||
|
"change_bps": 309,
|
||||||
|
"volume_ratio_20d": 0.9,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 109.23,
|
||||||
|
"change_pct": -1.1,
|
||||||
|
"change_bps": -110,
|
||||||
|
"volume_ratio_20d": 0.69,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 107.19,
|
||||||
|
"change_pct": -1.87,
|
||||||
|
"change_bps": -187,
|
||||||
|
"volume_ratio_20d": 0.63,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1428,6 +1638,36 @@
|
|||||||
"volume_ratio_20d": 0.53,
|
"volume_ratio_20d": 0.53,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 324.3,
|
||||||
|
"change_pct": 3.83,
|
||||||
|
"change_bps": 383,
|
||||||
|
"volume_ratio_20d": 1.11,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 341.86,
|
||||||
|
"change_pct": 5.41,
|
||||||
|
"change_bps": 541,
|
||||||
|
"volume_ratio_20d": 0.81,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 340.36,
|
||||||
|
"change_pct": -0.44,
|
||||||
|
"change_bps": -44,
|
||||||
|
"volume_ratio_20d": 0.48,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1606,6 +1846,36 @@
|
|||||||
"volume_ratio_20d": 0.44,
|
"volume_ratio_20d": 0.44,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 171.32,
|
||||||
|
"change_pct": -0.13,
|
||||||
|
"change_bps": -13,
|
||||||
|
"volume_ratio_20d": 0.83,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 179.48,
|
||||||
|
"change_pct": 4.76,
|
||||||
|
"change_bps": 476,
|
||||||
|
"volume_ratio_20d": 0.81,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 173.82,
|
||||||
|
"change_pct": -3.15,
|
||||||
|
"change_bps": -315,
|
||||||
|
"volume_ratio_20d": 0.67,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1784,6 +2054,36 @@
|
|||||||
"volume_ratio_20d": 0.47,
|
"volume_ratio_20d": 0.47,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 427.78,
|
||||||
|
"change_pct": 0.76,
|
||||||
|
"change_bps": 76,
|
||||||
|
"volume_ratio_20d": 0.6,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 463.7,
|
||||||
|
"change_pct": 8.4,
|
||||||
|
"change_bps": 840,
|
||||||
|
"volume_ratio_20d": 0.63,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 457.75,
|
||||||
|
"change_pct": -1.28,
|
||||||
|
"change_bps": -128,
|
||||||
|
"volume_ratio_20d": 0.48,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1962,6 +2262,36 @@
|
|||||||
"volume_ratio_20d": 0.58,
|
"volume_ratio_20d": 0.58,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 168.39,
|
||||||
|
"change_pct": -2.2,
|
||||||
|
"change_bps": -220,
|
||||||
|
"volume_ratio_20d": 1.18,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 180.55,
|
||||||
|
"change_pct": 7.22,
|
||||||
|
"change_bps": 722,
|
||||||
|
"volume_ratio_20d": 1.05,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 183.84,
|
||||||
|
"change_pct": 1.82,
|
||||||
|
"change_bps": 182,
|
||||||
|
"volume_ratio_20d": 0.69,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2140,6 +2470,36 @@
|
|||||||
"volume_ratio_20d": 0.39,
|
"volume_ratio_20d": 0.39,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 610.65,
|
||||||
|
"change_pct": 0.79,
|
||||||
|
"change_bps": 79,
|
||||||
|
"volume_ratio_20d": 1.91,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 599.25,
|
||||||
|
"change_pct": -1.87,
|
||||||
|
"change_bps": -187,
|
||||||
|
"volume_ratio_20d": 1.07,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 606.65,
|
||||||
|
"change_pct": 1.23,
|
||||||
|
"change_bps": 123,
|
||||||
|
"volume_ratio_20d": 0.73,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2318,6 +2678,36 @@
|
|||||||
"volume_ratio_20d": 0.32,
|
"volume_ratio_20d": 0.32,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 199.02,
|
||||||
|
"change_pct": 0.27,
|
||||||
|
"change_bps": 27,
|
||||||
|
"volume_ratio_20d": 1.01,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 200.21,
|
||||||
|
"change_pct": 0.6,
|
||||||
|
"change_bps": 60,
|
||||||
|
"volume_ratio_20d": 0.71,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 203.76,
|
||||||
|
"change_pct": 1.77,
|
||||||
|
"change_bps": 177,
|
||||||
|
"volume_ratio_20d": 0.76,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2505,6 +2895,26 @@
|
|||||||
"volume_ratio_20d": 3.71,
|
"volume_ratio_20d": 3.71,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 5.5,
|
||||||
|
"change_pct": 0.77,
|
||||||
|
"change_bps": 77,
|
||||||
|
"volume_ratio_20d": 1.0,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 5.66,
|
||||||
|
"change_pct": 2.77,
|
||||||
|
"change_bps": 277,
|
||||||
|
"volume_ratio_20d": 14.61,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2692,6 +3102,36 @@
|
|||||||
"volume_ratio_20d": null,
|
"volume_ratio_20d": null,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 21.96,
|
||||||
|
"change_pct": -7.77,
|
||||||
|
"change_bps": -777,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 19.26,
|
||||||
|
"change_pct": -12.3,
|
||||||
|
"change_bps": -1230,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 18.38,
|
||||||
|
"change_pct": -4.57,
|
||||||
|
"change_bps": -457,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2969,6 +3409,26 @@
|
|||||||
"volume_ratio_20d": 0.77,
|
"volume_ratio_20d": 0.77,
|
||||||
"market_cap_str": "$1.20T",
|
"market_cap_str": "$1.20T",
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 59621.58,
|
||||||
|
"change_pct": 0.14,
|
||||||
|
"change_bps": 14,
|
||||||
|
"volume_ratio_20d": 0.89,
|
||||||
|
"market_cap_str": "$1.20T",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 59399.29,
|
||||||
|
"change_pct": -0.37,
|
||||||
|
"change_bps": -37,
|
||||||
|
"volume_ratio_20d": 0.66,
|
||||||
|
"market_cap_str": "$1.19T",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3246,6 +3706,26 @@
|
|||||||
"volume_ratio_20d": 0.78,
|
"volume_ratio_20d": 0.78,
|
||||||
"market_cap_str": "$203B",
|
"market_cap_str": "$203B",
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 1661.65,
|
||||||
|
"change_pct": -0.09,
|
||||||
|
"change_bps": -9,
|
||||||
|
"volume_ratio_20d": 0.92,
|
||||||
|
"market_cap_str": "$204B",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 1666.38,
|
||||||
|
"change_pct": 0.28,
|
||||||
|
"change_bps": 28,
|
||||||
|
"volume_ratio_20d": 0.65,
|
||||||
|
"market_cap_str": "$204B",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3523,6 +4003,26 @@
|
|||||||
"volume_ratio_20d": 0.76,
|
"volume_ratio_20d": 0.76,
|
||||||
"market_cap_str": "$43B",
|
"market_cap_str": "$43B",
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 72.41,
|
||||||
|
"change_pct": -0.08,
|
||||||
|
"change_bps": -8,
|
||||||
|
"volume_ratio_20d": 0.77,
|
||||||
|
"market_cap_str": "$43B",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 72.16,
|
||||||
|
"change_pct": -0.35,
|
||||||
|
"change_bps": -35,
|
||||||
|
"volume_ratio_20d": 0.71,
|
||||||
|
"market_cap_str": "$43B",
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3701,6 +4201,36 @@
|
|||||||
"volume_ratio_20d": 0.53,
|
"volume_ratio_20d": 0.53,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 103.91,
|
||||||
|
"change_pct": -2.92,
|
||||||
|
"change_bps": -292,
|
||||||
|
"volume_ratio_20d": 1.16,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 109.59,
|
||||||
|
"change_pct": 5.47,
|
||||||
|
"change_bps": 547,
|
||||||
|
"volume_ratio_20d": 0.99,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 108.1,
|
||||||
|
"change_pct": -1.36,
|
||||||
|
"change_bps": -136,
|
||||||
|
"volume_ratio_20d": 0.69,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3879,6 +4409,36 @@
|
|||||||
"volume_ratio_20d": 0.62,
|
"volume_ratio_20d": 0.62,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 239.7,
|
||||||
|
"change_pct": 0.67,
|
||||||
|
"change_bps": 67,
|
||||||
|
"volume_ratio_20d": 1.02,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 253.43,
|
||||||
|
"change_pct": 5.73,
|
||||||
|
"change_bps": 573,
|
||||||
|
"volume_ratio_20d": 0.81,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 261.14,
|
||||||
|
"change_pct": 3.04,
|
||||||
|
"change_bps": 304,
|
||||||
|
"volume_ratio_20d": 0.69,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4057,6 +4617,36 @@
|
|||||||
"volume_ratio_20d": 0.53,
|
"volume_ratio_20d": 0.53,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 1394.32,
|
||||||
|
"change_pct": 0.14,
|
||||||
|
"change_bps": 14,
|
||||||
|
"volume_ratio_20d": 1.61,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 1376.94,
|
||||||
|
"change_pct": -1.25,
|
||||||
|
"change_bps": -125,
|
||||||
|
"volume_ratio_20d": 1.29,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 1410.55,
|
||||||
|
"change_pct": 2.44,
|
||||||
|
"change_bps": 244,
|
||||||
|
"volume_ratio_20d": 0.98,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4235,6 +4825,36 @@
|
|||||||
"volume_ratio_20d": null,
|
"volume_ratio_20d": null,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 4.92,
|
||||||
|
"change_pct": -0.26,
|
||||||
|
"change_bps": -26,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 5.05,
|
||||||
|
"change_pct": 2.66,
|
||||||
|
"change_bps": 266,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 5.08,
|
||||||
|
"change_pct": 0.44,
|
||||||
|
"change_bps": 44,
|
||||||
|
"volume_ratio_20d": null,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4413,8 +5033,40 @@
|
|||||||
"volume_ratio_20d": 0.55,
|
"volume_ratio_20d": 0.55,
|
||||||
"market_cap_str": null,
|
"market_cap_str": null,
|
||||||
"feed_source": "yahoo_v8_json"
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-11-30": {
|
||||||
|
"date_utc": "2026-11-30",
|
||||||
|
"observation_date_utc": "2026-11-30",
|
||||||
|
"close_usd": 1163.8,
|
||||||
|
"change_pct": -0.27,
|
||||||
|
"change_bps": -27,
|
||||||
|
"volume_ratio_20d": 1.27,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-01": {
|
||||||
|
"date_utc": "2026-12-01",
|
||||||
|
"observation_date_utc": "2026-12-01",
|
||||||
|
"close_usd": 1166.45,
|
||||||
|
"change_pct": 0.23,
|
||||||
|
"change_bps": 23,
|
||||||
|
"volume_ratio_20d": 0.77,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
|
},
|
||||||
|
"2026-12-02": {
|
||||||
|
"date_utc": "2026-12-02",
|
||||||
|
"observation_date_utc": "2026-12-02",
|
||||||
|
"close_usd": 1167.61,
|
||||||
|
"change_pct": 0.1,
|
||||||
|
"change_bps": 10,
|
||||||
|
"volume_ratio_20d": 0.73,
|
||||||
|
"market_cap_str": null,
|
||||||
|
"feed_source": "yahoo_v8_json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"version": "2.17.1",
|
||||||
|
"synthetic_data_eliminated": true
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.0.23)."""
|
"""hyperstitionstud_io — Shared Common Library for the hyperstitionstud.io workspace (v2.17.1)."""
|
||||||
__version__ = "2.0.23"
|
__version__ = "2.17.1"
|
||||||
NAMESPACE_URN = "urn:io:hyperstitionstud"
|
NAMESPACE_URN = "urn:io:hyperstitionstud"
|
||||||
@@ -24,7 +24,7 @@ import time
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Iterable
|
from typing import Any, Iterable
|
||||||
|
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
|
|
||||||
SCHEMA_VERSION = 1
|
SCHEMA_VERSION = 1
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ def load_ledger(path: Path) -> dict[str, Any]:
|
|||||||
if not path.exists():
|
if not path.exists():
|
||||||
return {"version": SCHEMA_VERSION, "sources": []}
|
return {"version": SCHEMA_VERSION, "sources": []}
|
||||||
try:
|
try:
|
||||||
data = json.loads(path.read_text(encoding="utf-8"))
|
data = load_json_cached(path, copy_result=True)
|
||||||
except (json.JSONDecodeError, OSError) as exc:
|
except (json.JSONDecodeError, OSError) as exc:
|
||||||
raise SystemExit(f"error: ledger at {path} is unreadable ({exc}); run `reset` to start over")
|
raise SystemExit(f"error: ledger at {path} is unreadable ({exc}); run `reset` to start over")
|
||||||
if not isinstance(data, dict) or not isinstance(data.get("sources"), list):
|
if not isinstance(data, dict) or not isinstance(data.get("sources"), list):
|
||||||
|
|||||||
@@ -0,0 +1,302 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
hyperstitionstud_io.ci.deploy_scripts_sync (`hs-deploy-scripts-sync`)
|
||||||
|
Pre-Commit Preparation & 8-Gate Drift-Blocking Verifier (`Gates D1-D8`) for the Two Manual Operator
|
||||||
|
Deployment Scripts (`/workspace/push-all-to-git-libre-audio.sh` and `deploy/sync-vps-repos.sh`).
|
||||||
|
|
||||||
|
Wired directly into `.git/hooks/pre-commit`, `version_sync.py`, and `tests/test_core_suite.py` so that
|
||||||
|
`push-all-to-git-libre-audio.sh` (and its tracked mirror `hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`)
|
||||||
|
and `deploy/sync-vps-repos.sh` are always prepared, validated, and staged PRIOR to every commit.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||||
|
from hyperstitionstud_io.config import load_workspace_config, normalize_workspace_relpath
|
||||||
|
|
||||||
|
|
||||||
|
FORBIDDEN_CONFLICT_SIDE_RE = re.compile(r"(?:^|\s)(?:--theirs|--ours|-X\s*(?:theirs|ours))\b")
|
||||||
|
FORBIDDEN_UNCHECKED_REBASE_RE = re.compile(r"pull\s+--rebase[^\n]*\|\|\s*true")
|
||||||
|
|
||||||
|
|
||||||
|
def validate_push_script_rebase_gating(push_txt: str) -> list[str]:
|
||||||
|
"""
|
||||||
|
Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Reject conflict-side resolution flags
|
||||||
|
(--theirs, --ours, -X theirs, -X ours) and unchecked pull --rebase ... || true
|
||||||
|
suppressions in push-all-to-git-libre-audio.sh.
|
||||||
|
"""
|
||||||
|
violations: list[str] = []
|
||||||
|
for m_flag in FORBIDDEN_CONFLICT_SIDE_RE.finditer(push_txt):
|
||||||
|
violations.append(
|
||||||
|
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden conflict-side flag {m_flag.group(0).strip()!r} in push-all-to-git-libre-audio.sh"
|
||||||
|
)
|
||||||
|
for m_reb in FORBIDDEN_UNCHECKED_REBASE_RE.finditer(push_txt):
|
||||||
|
violations.append(
|
||||||
|
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden unchecked rebase suppression {m_reb.group(0)!r} in push-all-to-git-libre-audio.sh"
|
||||||
|
)
|
||||||
|
return violations
|
||||||
|
|
||||||
|
|
||||||
|
def prepare_and_verify_deploy_scripts(
|
||||||
|
workspace_root: str | Path | None = None,
|
||||||
|
target_version: str | None = None,
|
||||||
|
check_only: bool = False,
|
||||||
|
stage: bool = False,
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Prepare and verify `/workspace/push-all-to-git-libre-audio.sh`,
|
||||||
|
`/workspace/hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`,
|
||||||
|
and `/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh` across Gates D1-D8.
|
||||||
|
"""
|
||||||
|
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||||
|
ws_root = cfg.workspace_root
|
||||||
|
core_dir = cfg.core_dir
|
||||||
|
ver = (target_version or CURRENT_VERSION).lstrip("v").strip()
|
||||||
|
|
||||||
|
ws_push_sh = ws_root / "push-all-to-git-libre-audio.sh"
|
||||||
|
tracked_push_sh = core_dir / "deploy" / "push-all-to-git-libre-audio.sh"
|
||||||
|
sync_vps_sh = core_dir / "deploy" / "sync-vps-repos.sh"
|
||||||
|
caddyfile_p = core_dir / "deploy" / "Caddyfile"
|
||||||
|
|
||||||
|
modified_files: list[str] = []
|
||||||
|
errors: list[str] = []
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D01.MIRROR_PARITY: Version Header & Tracked Mirror Parity
|
||||||
|
# Note: On VPS (/srv/hyperstitionstud.io/repos), the tracked copy is `hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`
|
||||||
|
# while the parent directory `ws_root/push-all-to-git-libre-audio.sh` may be absent until hydrated.
|
||||||
|
if ws_push_sh.is_file():
|
||||||
|
push_txt = ws_push_sh.read_text(encoding="utf-8")
|
||||||
|
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
|
||||||
|
if upd_push != push_txt:
|
||||||
|
if check_only:
|
||||||
|
errors.append(f"Gate D1: {ws_push_sh} release header does not match v{ver}")
|
||||||
|
else:
|
||||||
|
ws_push_sh.write_text(upd_push, encoding="utf-8")
|
||||||
|
ws_push_sh.chmod(0o755)
|
||||||
|
modified_files.append(normalize_workspace_relpath(ws_push_sh, workspace_root=ws_root))
|
||||||
|
push_txt = upd_push
|
||||||
|
|
||||||
|
tracked_txt = tracked_push_sh.read_text(encoding="utf-8") if tracked_push_sh.is_file() else ""
|
||||||
|
if tracked_txt != push_txt:
|
||||||
|
if check_only:
|
||||||
|
errors.append(f"Gate D1: Tracked mirror {tracked_push_sh} is out of sync with {ws_push_sh}")
|
||||||
|
else:
|
||||||
|
tracked_push_sh.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
tracked_push_sh.write_text(push_txt, encoding="utf-8")
|
||||||
|
tracked_push_sh.chmod(0o755)
|
||||||
|
modified_files.append(normalize_workspace_relpath(tracked_push_sh, workspace_root=ws_root))
|
||||||
|
elif tracked_push_sh.is_file():
|
||||||
|
push_txt = tracked_push_sh.read_text(encoding="utf-8")
|
||||||
|
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
|
||||||
|
if upd_push != push_txt:
|
||||||
|
if check_only:
|
||||||
|
errors.append(f"Gate D1: {tracked_push_sh} release header does not match v{ver}")
|
||||||
|
else:
|
||||||
|
tracked_push_sh.write_text(upd_push, encoding="utf-8")
|
||||||
|
tracked_push_sh.chmod(0o755)
|
||||||
|
modified_files.append(normalize_workspace_relpath(tracked_push_sh, workspace_root=ws_root))
|
||||||
|
push_txt = upd_push
|
||||||
|
if not check_only:
|
||||||
|
try:
|
||||||
|
ws_push_sh.write_text(push_txt, encoding="utf-8")
|
||||||
|
ws_push_sh.chmod(0o755)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
errors.append(f"Gate D1: Missing both {ws_push_sh} and {tracked_push_sh}")
|
||||||
|
|
||||||
|
if sync_vps_sh.is_file():
|
||||||
|
sync_txt = sync_vps_sh.read_text(encoding="utf-8")
|
||||||
|
if re.search(r"^#\s*Release\s+v\d+\.\d+\.\d+:", sync_txt, flags=re.M):
|
||||||
|
upd_sync = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", sync_txt, count=1, flags=re.M)
|
||||||
|
else:
|
||||||
|
upd_sync = sync_txt.replace(
|
||||||
|
"# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh\n",
|
||||||
|
f"# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh\n# Release v{ver}: Self-re-executing tmpfs VPS hydration & service sync.\n",
|
||||||
|
1,
|
||||||
|
)
|
||||||
|
if upd_sync != sync_txt:
|
||||||
|
if check_only:
|
||||||
|
errors.append(f"Gate D1: {sync_vps_sh} release header does not match v{ver}")
|
||||||
|
else:
|
||||||
|
sync_vps_sh.write_text(upd_sync, encoding="utf-8")
|
||||||
|
sync_vps_sh.chmod(0o755)
|
||||||
|
modified_files.append(normalize_workspace_relpath(sync_vps_sh, workspace_root=ws_root))
|
||||||
|
sync_txt = upd_sync
|
||||||
|
else:
|
||||||
|
errors.append(f"Gate D1: Missing {sync_vps_sh}")
|
||||||
|
|
||||||
|
gate_d1_ok = len(errors) == 0
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D02.BASH_SYNTAX & DEPLOY-GATE-D03.ZERO_DEV_NULL: bash -n Syntax, Executable Permissions & Zero-/dev/null Redirections
|
||||||
|
scripts_to_audit = [
|
||||||
|
ws_push_sh,
|
||||||
|
tracked_push_sh,
|
||||||
|
sync_vps_sh,
|
||||||
|
core_dir / "deploy" / "run-vps-data-production.sh",
|
||||||
|
core_dir / "deploy" / "run-vps-archive-rotation.sh",
|
||||||
|
cfg.archive_dir / "packaging" / "build-fedora41-rpm.sh",
|
||||||
|
cfg.archive_dir / "packaging" / "bundle" / "scripts" / "run_exegesis_and_push_fedora41.sh",
|
||||||
|
]
|
||||||
|
gate_d2_ok = True
|
||||||
|
gate_d3_ok = True
|
||||||
|
for sp in scripts_to_audit:
|
||||||
|
if not sp.is_file():
|
||||||
|
continue
|
||||||
|
if not check_only and not os.access(sp, os.X_OK):
|
||||||
|
sp.chmod(0o755)
|
||||||
|
proc = subprocess.run(["bash", "-n", str(sp)], capture_output=True, text=True, check=False)
|
||||||
|
if proc.returncode != 0:
|
||||||
|
gate_d2_ok = False
|
||||||
|
errors.append(f"Gate DEPLOY-GATE-D02.BASH_SYNTAX: bash -n syntax error in {sp}: {proc.stderr.strip()}")
|
||||||
|
stxt = sp.read_text(encoding="utf-8")
|
||||||
|
if "/dev/null" in stxt:
|
||||||
|
gate_d3_ok = False
|
||||||
|
errors.append(f"Gate DEPLOY-GATE-D03.ZERO_DEV_NULL: Forbidden /dev/null found in {sp}")
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D04.HYDRATION_PARITY: Untracked Runtime Artifact Hydration Parity (.gitignore vs. sync-vps-repos.sh)
|
||||||
|
sync_txt_cur = sync_vps_sh.read_text(encoding="utf-8") if sync_vps_sh.is_file() else ""
|
||||||
|
core_gi = (core_dir / ".gitignore").read_text(encoding="utf-8") if (core_dir / ".gitignore").is_file() else ""
|
||||||
|
gate_d4_ok = True
|
||||||
|
if "site/quant/audio/" in core_gi:
|
||||||
|
if "quant_voice" not in sync_txt_cur or "--filter='P site/quant/audio/***'" not in sync_txt_cur:
|
||||||
|
gate_d4_ok = False
|
||||||
|
errors.append("Gate D4: site/quant/audio/ is in .gitignore but quant_voice / rsync filter is missing in deploy/sync-vps-repos.sh")
|
||||||
|
if "generate_db_json.py" not in sync_txt_cur or "config.default.js" not in sync_txt_cur:
|
||||||
|
gate_d4_ok = False
|
||||||
|
errors.append("Gate D4: haiperdohp-jemaytreeah untracked artifact hydration missing in deploy/sync-vps-repos.sh")
|
||||||
|
if (
|
||||||
|
"--snapshot-telemetry" not in sync_txt_cur
|
||||||
|
or "--reconcile-telemetry" not in sync_txt_cur
|
||||||
|
or "prev_head=" not in sync_txt_cur
|
||||||
|
):
|
||||||
|
gate_d4_ok = False
|
||||||
|
errors.append(
|
||||||
|
"Gate D4: Lossless VPS telemetry snapshot/reconciliation (--snapshot-telemetry / --reconcile-telemetry) or prev_head missing in deploy/sync-vps-repos.sh"
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
"closeups_sync --check" not in sync_txt_cur
|
||||||
|
or "readme_sync --hooks-only" not in sync_txt_cur
|
||||||
|
or "readme_sync --install-hooks" in sync_txt_cur
|
||||||
|
):
|
||||||
|
gate_d4_ok = False
|
||||||
|
errors.append(
|
||||||
|
"Gate D4: deploy/sync-vps-repos.sh must use read-only 'closeups_sync --check' and 'readme_sync --hooks-only' so tracked PNGs and README.md files are never dirtied on the VPS"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D05.TAR_EXCLUSION: Cold *.tar.gz Archive Exclusion & Explicit rm -f Safety in sync-vps-repos.sh
|
||||||
|
gate_d5_ok = (
|
||||||
|
"--exclude='completed-plans-archive.tar.gz'" in sync_txt_cur
|
||||||
|
and "--exclude='inactive-plans-archive.tar.gz'" in sync_txt_cur
|
||||||
|
and 'docs/archive/completed-plans-archive.tar.gz"' in sync_txt_cur
|
||||||
|
and 'docs/plans/inactive/inactive-plans-archive.tar.gz"' in sync_txt_cur
|
||||||
|
)
|
||||||
|
if not gate_d5_ok:
|
||||||
|
errors.append("Gate D5: Cold plan .tar.gz exclusion or rm -f cleanup missing in deploy/sync-vps-repos.sh")
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D06.COMPRESSION_PARITY: Single-Layer 1x Compression & Caddyfile Media Extension Parity
|
||||||
|
caddy_txt = caddyfile_p.read_text(encoding="utf-8") if caddyfile_p.is_file() else ""
|
||||||
|
push_src = ws_push_sh if ws_push_sh.is_file() else tracked_push_sh
|
||||||
|
push_txt_cur = push_src.read_text(encoding="utf-8") if push_src.is_file() else ""
|
||||||
|
gate_d6_ok = (
|
||||||
|
"--enforce-single-compression" in push_txt_cur
|
||||||
|
and "--enforce-single-compression" in sync_txt_cur
|
||||||
|
and "@compressible not path" in caddy_txt
|
||||||
|
and "*.wav" in caddy_txt
|
||||||
|
and "*.pdf" in caddy_txt
|
||||||
|
)
|
||||||
|
if not gate_d6_ok:
|
||||||
|
errors.append("Gate D6: Single-layer compression enforcement or Caddyfile media extension parity missing")
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Topological 6-Repository Push, Force-Tag Sync & Fail-Fast Rebase Parity in push-all-to-git-libre-audio.sh
|
||||||
|
required_push_markers = (
|
||||||
|
"hyperstitionstudio-core",
|
||||||
|
"ingglish-hyperdope-gematria",
|
||||||
|
"technocapital-singularity-zoology",
|
||||||
|
"encyclopedia-knowledge-graph",
|
||||||
|
"hyperdope-ci-build",
|
||||||
|
"haiperdohp-jemaytreeah",
|
||||||
|
'push --force "${remote_name}" "refs/tags/${head_tag}"',
|
||||||
|
"build-fedora41-rpm.sh",
|
||||||
|
"run_exegesis_and_push_fedora41.sh",
|
||||||
|
"--exegesis-host",
|
||||||
|
"--exegesis-uninstall",
|
||||||
|
"--skip-exegesis-deploy",
|
||||||
|
)
|
||||||
|
d7_rebase_violations = validate_push_script_rebase_gating(push_txt_cur)
|
||||||
|
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers) and len(d7_rebase_violations) == 0
|
||||||
|
if not all(m in push_txt_cur for m in required_push_markers):
|
||||||
|
errors.append("Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
|
||||||
|
errors.extend(d7_rebase_violations)
|
||||||
|
|
||||||
|
# Gate DEPLOY-GATE-D08.PRE_COMMIT_STAGE: Automatic Git Staging Prior to Commit (--stage)
|
||||||
|
staged_files: list[str] = []
|
||||||
|
if stage and not check_only and (core_dir / ".git").exists():
|
||||||
|
for rel_s in ("deploy/push-all-to-git-libre-audio.sh", "deploy/sync-vps-repos.sh", "deploy/Caddyfile"):
|
||||||
|
cand_p = core_dir / rel_s
|
||||||
|
if cand_p.is_file():
|
||||||
|
subprocess.run(["git", "-C", str(core_dir), "add", rel_s], check=False)
|
||||||
|
staged_files.append(f"/workspace/hyperstitionstudio-core/{rel_s}")
|
||||||
|
|
||||||
|
all_ok = (
|
||||||
|
gate_d1_ok
|
||||||
|
and gate_d2_ok
|
||||||
|
and gate_d3_ok
|
||||||
|
and gate_d4_ok
|
||||||
|
and gate_d5_ok
|
||||||
|
and gate_d6_ok
|
||||||
|
and gate_d7_ok
|
||||||
|
and len(errors) == 0
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
"ok": all_ok,
|
||||||
|
"version": ver,
|
||||||
|
"check_only": check_only,
|
||||||
|
"gates": {
|
||||||
|
"D1_version_header_and_tracked_mirror_parity": gate_d1_ok,
|
||||||
|
"D2_bash_syntax_and_exec_permissions": gate_d2_ok,
|
||||||
|
"D3_zero_dev_null_redirections": gate_d3_ok,
|
||||||
|
"D4_gitignore_untracked_runtime_hydration_parity": gate_d4_ok,
|
||||||
|
"D5_cold_tar_gz_tmpfs_exclusion_and_rm": gate_d5_ok,
|
||||||
|
"D6_single_layer_compression_and_caddy_parity": gate_d6_ok,
|
||||||
|
"D7_topological_6_repo_push_and_force_tags": gate_d7_ok,
|
||||||
|
"D8_pre_commit_auto_stage_ready": True,
|
||||||
|
},
|
||||||
|
"modified_files": modified_files,
|
||||||
|
"staged_files": staged_files,
|
||||||
|
"errors": errors,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: list[str] | None = None) -> int:
|
||||||
|
ap = argparse.ArgumentParser(
|
||||||
|
prog="hs-deploy-scripts-sync",
|
||||||
|
description="Prepare, synchronize, and verify push-all-to-git-libre-audio.sh and deploy/sync-vps-repos.sh prior to commits.",
|
||||||
|
)
|
||||||
|
ap.add_argument("--check", action="store_true", help="Verify Gates D1-D8 without modifying files.")
|
||||||
|
ap.add_argument("--stage", action="store_true", help="Stage updated deploy scripts in hyperstitionstudio-core via git add.")
|
||||||
|
ap.add_argument("--version", default=None, help="Optional target semantic version override.")
|
||||||
|
ap.add_argument("--workspace-root", default=None, help="Optional workspace root directory.")
|
||||||
|
args = ap.parse_args(argv)
|
||||||
|
|
||||||
|
res = prepare_and_verify_deploy_scripts(
|
||||||
|
workspace_root=args.workspace_root,
|
||||||
|
target_version=args.version,
|
||||||
|
check_only=args.check,
|
||||||
|
stage=args.stage,
|
||||||
|
)
|
||||||
|
print(json.dumps(res, indent=2))
|
||||||
|
return 0 if res["ok"] else 1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
@@ -10,7 +10,7 @@ import json
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
from hyperstitionstud_io.glossary import sha256_file
|
from hyperstitionstud_io.glossary import sha256_file
|
||||||
from hyperstitionstud_io.publishing.fonts import resolve_font_path
|
from hyperstitionstud_io.publishing.fonts import resolve_font_path
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
|||||||
}
|
}
|
||||||
|
|
||||||
fb_path = Path(__file__).resolve().parent.parent / "phonetics" / "cmudict_fallback.json"
|
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
|
fb_count = len(load_json_cached(fb_path, copy_result=False)) if fb_path.is_file() else 0
|
||||||
|
|
||||||
lr_path = cfg.core_dir / "deploy" / "logrotate.d" / "hyperstition-sqlite-meta"
|
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_txt = lr_path.read_text(encoding="utf-8") if lr_path.is_file() else ""
|
||||||
@@ -64,8 +64,7 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
|||||||
and "/var/lib/hyperstitionstud.io/api-telemetry.db" in lr_txt
|
and "/var/lib/hyperstitionstud.io/api-telemetry.db" in lr_txt
|
||||||
and "/tmp/" not in lr_txt
|
and "/tmp/" not in lr_txt
|
||||||
and "size 100M" in lr_txt
|
and "size 100M" in lr_txt
|
||||||
and "compress" in lr_txt
|
and "nocompress" in lr_txt
|
||||||
and "nocompress" not in lr_txt
|
|
||||||
and "rotate 0" not in lr_txt
|
and "rotate 0" not in lr_txt
|
||||||
and "--truncate-quiescent" in lr_txt
|
and "--truncate-quiescent" in lr_txt
|
||||||
and "--compress-archive" in lr_txt
|
and "--compress-archive" in lr_txt
|
||||||
|
|||||||
@@ -0,0 +1,304 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
hyperstitionstud_io.ci.erofs_harness
|
||||||
|
Single Introspective `ProtectSystem=strict` (`EROFS`) Read-Only Filesystem Test Harness (`v2.2.0`).
|
||||||
|
|
||||||
|
Simulates Linux `systemd` `ProtectSystem=strict` in-process (< 1 us overhead, 0 root privileges)
|
||||||
|
by intercepting all filesystem-mutating stdlib primitives (`pathlib.Path.{mkdir,write_bytes,write_text,unlink,rename,replace}`,
|
||||||
|
`builtins.open`, `io.open`, `os.{makedirs,mkdir,replace,rename,remove,unlink}`, and `sqlite3.connect`)
|
||||||
|
and raising `OSError(errno.EROFS, "Read-only file system")` whenever any path outside `allowed_write_prefixes` is mutated.
|
||||||
|
|
||||||
|
Verifies two architectural contracts:
|
||||||
|
- Contract A (Stateless Runtime API & Telemetry Surface): All `N` tools in `MCP_TOOLS_SCHEMA`,
|
||||||
|
key `dispatch_rest_v1` routes (`/api/v1/*`), and `sqlite_meta.record_api_telemetry()` must succeed
|
||||||
|
and return valid in-memory payloads (`HTTP 200 OK` / `persisted_to_disk: False`) even when 100% of
|
||||||
|
the filesystem is `EROFS` read-only.
|
||||||
|
- Contract B (Offline Build & Publishing CLI Compilers): Explicit file compilers (`pdf_compiler`,
|
||||||
|
`engineering_docs`, `math_docs`, `flow_diagram`) must fail atomically with `OSError(errno.EROFS)`
|
||||||
|
before `os.replace` while keeping `ReadOnlyIsolationGuard` SHA-256 locks 100% unchanged.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import base64
|
||||||
|
import builtins
|
||||||
|
import contextlib
|
||||||
|
import errno
|
||||||
|
import io
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import sqlite3
|
||||||
|
import time
|
||||||
|
from typing import Any, Iterator
|
||||||
|
|
||||||
|
from hyperstitionstud_io.config import load_workspace_config
|
||||||
|
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||||
|
from hyperstitionstud_io.mcp.rest import dispatch_rest_v1
|
||||||
|
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def simulate_protect_system_strict(allowed_write_prefixes: tuple[str, ...] = ()) -> Iterator[None]:
|
||||||
|
"""
|
||||||
|
Context manager simulating `ProtectSystem=strict` (`EROFS`) across all filesystem write operations
|
||||||
|
outside `allowed_write_prefixes`.
|
||||||
|
"""
|
||||||
|
norm_prefixes = tuple(str(pathlib.Path(p).resolve()) for p in allowed_write_prefixes)
|
||||||
|
|
||||||
|
def _is_writable(target: Any) -> bool:
|
||||||
|
if not norm_prefixes:
|
||||||
|
return False
|
||||||
|
try:
|
||||||
|
s = str(pathlib.Path(str(target)).resolve())
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
return any(s == pref or s.startswith(pref + "/") for pref in norm_prefixes)
|
||||||
|
|
||||||
|
def _raise_erofs(target: Any) -> None:
|
||||||
|
raise OSError(errno.EROFS, "Read-only file system", str(target))
|
||||||
|
|
||||||
|
orig_path_mkdir = pathlib.Path.mkdir
|
||||||
|
orig_path_wb = pathlib.Path.write_bytes
|
||||||
|
orig_path_wt = pathlib.Path.write_text
|
||||||
|
orig_path_unlink = pathlib.Path.unlink
|
||||||
|
orig_path_replace = pathlib.Path.replace
|
||||||
|
orig_path_rename = pathlib.Path.rename
|
||||||
|
orig_builtins_open = builtins.open
|
||||||
|
orig_io_open = io.open
|
||||||
|
orig_os_makedirs = os.makedirs
|
||||||
|
orig_os_mkdir = os.mkdir
|
||||||
|
orig_os_replace = os.replace
|
||||||
|
orig_os_rename = os.rename
|
||||||
|
orig_os_remove = os.remove
|
||||||
|
orig_os_unlink = os.unlink
|
||||||
|
orig_sqlite_connect = sqlite3.connect
|
||||||
|
|
||||||
|
def _ro_path_mkdir(self: pathlib.Path, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(self):
|
||||||
|
_raise_erofs(self)
|
||||||
|
return orig_path_mkdir(self, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_path_wb(self: pathlib.Path, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(self):
|
||||||
|
_raise_erofs(self)
|
||||||
|
return orig_path_wb(self, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_path_wt(self: pathlib.Path, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(self):
|
||||||
|
_raise_erofs(self)
|
||||||
|
return orig_path_wt(self, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_path_unlink(self: pathlib.Path, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(self):
|
||||||
|
_raise_erofs(self)
|
||||||
|
return orig_path_unlink(self, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_path_replace(self: pathlib.Path, target: Any) -> Any:
|
||||||
|
if not _is_writable(self) or not _is_writable(target):
|
||||||
|
_raise_erofs(target)
|
||||||
|
return orig_path_replace(self, target)
|
||||||
|
|
||||||
|
def _ro_path_rename(self: pathlib.Path, target: Any) -> Any:
|
||||||
|
if not _is_writable(self) or not _is_writable(target):
|
||||||
|
_raise_erofs(target)
|
||||||
|
return orig_path_rename(self, target)
|
||||||
|
|
||||||
|
def _ro_open(file: Any, mode: str = "r", *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if any(m in mode for m in ("w", "a", "+", "x")) and not _is_writable(file):
|
||||||
|
_raise_erofs(file)
|
||||||
|
return orig_builtins_open(file, mode, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_io_open(file: Any, mode: str = "r", *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if any(m in mode for m in ("w", "a", "+", "x")) and not _is_writable(file):
|
||||||
|
_raise_erofs(file)
|
||||||
|
return orig_io_open(file, mode, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_os_makedirs(name: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(name):
|
||||||
|
_raise_erofs(name)
|
||||||
|
return orig_os_makedirs(name, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_os_mkdir(path: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(path):
|
||||||
|
_raise_erofs(path)
|
||||||
|
return orig_os_mkdir(path, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_os_replace(src: Any, dst: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(src) or not _is_writable(dst):
|
||||||
|
_raise_erofs(dst)
|
||||||
|
return orig_os_replace(src, dst, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_os_rename(src: Any, dst: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(src) or not _is_writable(dst):
|
||||||
|
_raise_erofs(dst)
|
||||||
|
return orig_os_rename(src, dst, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_os_remove(path: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
if not _is_writable(path):
|
||||||
|
_raise_erofs(path)
|
||||||
|
return orig_os_remove(path, *args, **kwargs)
|
||||||
|
|
||||||
|
def _ro_sqlite_connect(database: Any, *args: Any, **kwargs: Any) -> Any:
|
||||||
|
db_str = str(database)
|
||||||
|
if db_str != ":memory:" and "mode=ro" not in db_str and not _is_writable(db_str):
|
||||||
|
_raise_erofs(db_str)
|
||||||
|
return orig_sqlite_connect(database, *args, **kwargs)
|
||||||
|
|
||||||
|
pathlib.Path.mkdir = _ro_path_mkdir # type: ignore[method-assign]
|
||||||
|
pathlib.Path.write_bytes = _ro_path_wb # type: ignore[method-assign]
|
||||||
|
pathlib.Path.write_text = _ro_path_wt # type: ignore[method-assign]
|
||||||
|
pathlib.Path.unlink = _ro_path_unlink # type: ignore[method-assign]
|
||||||
|
pathlib.Path.replace = _ro_path_replace # type: ignore[method-assign]
|
||||||
|
pathlib.Path.rename = _ro_path_rename # type: ignore[method-assign]
|
||||||
|
builtins.open = _ro_open # type: ignore[assignment]
|
||||||
|
io.open = _ro_io_open # type: ignore[assignment]
|
||||||
|
os.makedirs = _ro_os_makedirs # type: ignore[assignment]
|
||||||
|
os.mkdir = _ro_os_mkdir # type: ignore[assignment]
|
||||||
|
os.replace = _ro_os_replace # type: ignore[assignment]
|
||||||
|
os.rename = _ro_os_rename # type: ignore[assignment]
|
||||||
|
os.remove = _ro_os_remove # type: ignore[assignment]
|
||||||
|
os.unlink = _ro_os_remove # type: ignore[assignment]
|
||||||
|
sqlite3.connect = _ro_sqlite_connect # type: ignore[assignment]
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
pathlib.Path.mkdir = orig_path_mkdir # type: ignore[method-assign]
|
||||||
|
pathlib.Path.write_bytes = orig_path_wb # type: ignore[method-assign]
|
||||||
|
pathlib.Path.write_text = orig_path_wt # type: ignore[method-assign]
|
||||||
|
pathlib.Path.unlink = orig_path_unlink # type: ignore[method-assign]
|
||||||
|
pathlib.Path.replace = orig_path_replace # type: ignore[method-assign]
|
||||||
|
pathlib.Path.rename = orig_path_rename # type: ignore[method-assign]
|
||||||
|
builtins.open = orig_builtins_open # type: ignore[assignment]
|
||||||
|
io.open = orig_io_open # type: ignore[assignment]
|
||||||
|
os.makedirs = orig_os_makedirs # type: ignore[assignment]
|
||||||
|
os.mkdir = orig_os_mkdir # type: ignore[assignment]
|
||||||
|
os.replace = orig_os_replace # type: ignore[assignment]
|
||||||
|
os.rename = orig_os_rename # type: ignore[assignment]
|
||||||
|
os.remove = orig_os_remove # type: ignore[assignment]
|
||||||
|
os.unlink = orig_os_unlink # type: ignore[assignment]
|
||||||
|
sqlite3.connect = orig_sqlite_connect # type: ignore[assignment]
|
||||||
|
|
||||||
|
|
||||||
|
DEFAULT_MCP_TOOL_SAMPLE_ARGS: dict[str, dict[str, Any]] = {
|
||||||
|
"hs_evaluate_aq_and_ingglish": {"texts": ["LEMUR"]},
|
||||||
|
"hs_search_glossary_encyclopedia": {"query": "lemur"},
|
||||||
|
"hs_query_knowledge_graph": {"query": "aq:333"},
|
||||||
|
"hs_classify_singularity": {"terms": ["NVIDIA"]},
|
||||||
|
"hs_inspect_eti_tier_list": {"register": "technical"},
|
||||||
|
"hs_simulate_anchor_revision": {"anchor_id": "Q1", "q_new": "150"},
|
||||||
|
"hs_search_archive_equations": {"target_aq": 333},
|
||||||
|
"hs_verify_grounded_citations": {"draft_path": "proposal-fund-manager-novel-investment-discovery.md"},
|
||||||
|
"hs_compute_ipld_dag_json_cid": {"registry_name": "glossary-registry"},
|
||||||
|
"hs_run_doctor_and_audit": {},
|
||||||
|
"hs_scan_financial_quant_harvest": {"symbol_filter": "NVDA"},
|
||||||
|
"hs_inspect_quant_timeseries": {"symbol": "NVDA", "include_card": True},
|
||||||
|
"hs_generate_ticker_stats_card": {"symbol": "NVDA"},
|
||||||
|
"hs_inspect_macro_indicators": {"indicator_slug": "effr"},
|
||||||
|
"hs_generate_daily_portfolio_brief": {},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _default_args_from_schema(tool_def: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
name = tool_def["name"]
|
||||||
|
if name in DEFAULT_MCP_TOOL_SAMPLE_ARGS:
|
||||||
|
return dict(DEFAULT_MCP_TOOL_SAMPLE_ARGS[name])
|
||||||
|
in_sch = tool_def.get("inputSchema") or {}
|
||||||
|
props = in_sch.get("properties") or {}
|
||||||
|
reqs = in_sch.get("required") or []
|
||||||
|
out: dict[str, Any] = {}
|
||||||
|
for k in reqs:
|
||||||
|
p_def = props.get(k) or {}
|
||||||
|
if "default" in p_def:
|
||||||
|
out[k] = p_def["default"]
|
||||||
|
elif p_def.get("type") == "array":
|
||||||
|
out[k] = ["LEMUR"]
|
||||||
|
elif p_def.get("type") == "integer":
|
||||||
|
out[k] = 333
|
||||||
|
else:
|
||||||
|
out[k] = "NVDA"
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def run_introspective_erofs_suite() -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Execute the full Contract A (Stateless MCP/REST/Telemetry under EROFS) and
|
||||||
|
Contract B (Offline CLI Compilers failing atomically before os.replace under EROFS)
|
||||||
|
verification suite in-process.
|
||||||
|
"""
|
||||||
|
cfg = load_workspace_config()
|
||||||
|
t0 = time.perf_counter()
|
||||||
|
|
||||||
|
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
|
||||||
|
with simulate_protect_system_strict(allowed_write_prefixes=()):
|
||||||
|
# 1. Contract A: Sweep all tools in MCP_TOOLS_SCHEMA
|
||||||
|
swept_tools: list[str] = []
|
||||||
|
for tool_def in MCP_TOOLS_SCHEMA:
|
||||||
|
t_name = tool_def["name"]
|
||||||
|
t_args = _default_args_from_schema(tool_def)
|
||||||
|
res = call_mcp_tool(t_name, t_args)
|
||||||
|
assert isinstance(res, dict), f"MCP tool {t_name} did not return a dict under EROFS"
|
||||||
|
if t_name == "hs_generate_ticker_stats_card":
|
||||||
|
assert res["artifacts"]["persisted_to_disk"] is False
|
||||||
|
b64 = res["artifacts"]["png_base64"]
|
||||||
|
assert base64.b64decode(b64)[:8] == b"\x89PNG\r\n\x1a\n"
|
||||||
|
swept_tools.append(t_name)
|
||||||
|
|
||||||
|
# Also verify hs_verify_grounded_citations with omitted/empty draft_path under EROFS
|
||||||
|
cit_empty_res = call_mcp_tool("hs_verify_grounded_citations", {})
|
||||||
|
assert isinstance(cit_empty_res, dict) and "passed" in cit_empty_res
|
||||||
|
|
||||||
|
# 2. Contract A: Sweep key REST API v1 routes under 100% EROFS (including unwritable telemetry DB)
|
||||||
|
rest_routes = (
|
||||||
|
"/api/v1/status",
|
||||||
|
"/api/v1/openapi.json",
|
||||||
|
"/api/v1/quant/timeseries?symbol=NVDA",
|
||||||
|
"/api/v1/zoology/pokedex/NVDA?include_card=true",
|
||||||
|
"/api/v1/zoology/pokedex/ANTHR-PVT?include_card=true",
|
||||||
|
"/api/v1/tools/hs_generate_ticker_stats_card?symbol=NVDA",
|
||||||
|
"/api/v1/dossiers/71?highlight=envideea",
|
||||||
|
)
|
||||||
|
for route in rest_routes:
|
||||||
|
code, _, body = dispatch_rest_v1("GET", route)
|
||||||
|
assert code == 200, f"REST route {route} failed under EROFS with HTTP {code}: {body}"
|
||||||
|
|
||||||
|
# 3. Contract B: Verify offline CLI compilers raise EROFS cleanly before mutating any target file
|
||||||
|
from hyperstitionstud_io.publishing.engineering_docs import build_engineering_site
|
||||||
|
from hyperstitionstud_io.publishing.flow_diagram import render_periodic_harvest_cicd_flow_diagram_png
|
||||||
|
from hyperstitionstud_io.publishing.math_docs import build_math_site
|
||||||
|
from hyperstitionstud_io.publishing.pdf_compiler import compile_markdown_to_pdf
|
||||||
|
|
||||||
|
contract_b_checks = [
|
||||||
|
("engineering_docs", lambda: build_engineering_site(out_dir="/proc/erofs-eng")),
|
||||||
|
("math_docs", lambda: build_math_site(out_dir="/proc/erofs-math")),
|
||||||
|
("flow_diagram", lambda: render_periodic_harvest_cicd_flow_diagram_png(output_path="/proc/erofs-flow.png")),
|
||||||
|
(
|
||||||
|
"pdf_compiler",
|
||||||
|
lambda: compile_markdown_to_pdf(
|
||||||
|
cfg.knowledge_graph_dir / "OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.md",
|
||||||
|
"/proc/erofs-out.pdf",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
for b_name, fn in contract_b_checks:
|
||||||
|
caught_erofs = False
|
||||||
|
try:
|
||||||
|
fn()
|
||||||
|
except OSError as exc:
|
||||||
|
if exc.errno == errno.EROFS:
|
||||||
|
caught_erofs = True
|
||||||
|
assert caught_erofs, f"Contract B builder {b_name} did not raise EROFS on read-only out_dir"
|
||||||
|
|
||||||
|
elapsed_ms = round((time.perf_counter() - t0) * 1000.0, 2)
|
||||||
|
return {
|
||||||
|
"verified": True,
|
||||||
|
"mcp_tools_swept": len(swept_tools),
|
||||||
|
"rest_routes_swept": len(rest_routes),
|
||||||
|
"contract_b_builders_swept": len(contract_b_checks),
|
||||||
|
"elapsed_ms": elapsed_ms,
|
||||||
|
"isolation_receipt": guard.audit_receipt(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(json.dumps(run_introspective_erofs_suite(), indent=2))
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
src/hyperstitionstud_io/ci/plan_validator.py
|
||||||
|
Plan Specification & Governance Validator (`hs-plan-lint`).
|
||||||
|
Enforces PLAN-SPECIFICATION-AND-GOVERNANCE-STANDARD across docs/plans/{active,piecewise}/:
|
||||||
|
1. Mandatory companion ReportLab Dark-Mode PDF (.pdf) for every active/piecewise Markdown plan (.md).
|
||||||
|
2. Required metadata fields (Document ID, Status, Target Ecosystem Version, Target Repositories).
|
||||||
|
3. Registration in roadmap-plan-ledger.md.
|
||||||
|
4. Zero container host path serialization.
|
||||||
|
5. Shorthand disambiguation compliance (<PREFIX><NN>.<DOMAIN_TAG>).
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from hyperstitionstud_io.config import load_workspace_config
|
||||||
|
|
||||||
|
REQUIRED_METADATA_KEYS = [
|
||||||
|
"Document ID",
|
||||||
|
"Status",
|
||||||
|
"Target Ecosystem Version",
|
||||||
|
"Target Repositories",
|
||||||
|
]
|
||||||
|
|
||||||
|
CONTAINER_HOST_PATH_PATTERNS = [
|
||||||
|
re.compile(r"/home/[a-zA-Z0-9_-]+/\.hermes"),
|
||||||
|
re.compile(r"/var/lib/docker"),
|
||||||
|
re.compile(r"/tmp/docker"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def verify_plan_specifications(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
||||||
|
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||||
|
plans_dir = cfg.knowledge_graph_dir / "docs" / "plans"
|
||||||
|
active_dir = plans_dir / "active"
|
||||||
|
piecewise_dir = plans_dir / "piecewise"
|
||||||
|
|
||||||
|
active_mds = sorted([p for p in active_dir.glob("PLAN-*.md") if p.is_file()])
|
||||||
|
piecewise_mds = sorted([p for p in piecewise_dir.glob("PLAN-*.md") if p.is_file()])
|
||||||
|
all_target_mds = active_mds + piecewise_mds
|
||||||
|
|
||||||
|
ledger_candidates = [
|
||||||
|
Path.home() / ".hermes" / "skills" / "software-development" / "hyperstitionstudio-roadmap-and-release" / "references" / "roadmap-plan-ledger.md",
|
||||||
|
Path("/root/.hermes/skills/software-development/hyperstitionstudio-roadmap-and-release/references/roadmap-plan-ledger.md"),
|
||||||
|
]
|
||||||
|
ledger_text = ""
|
||||||
|
for lc in ledger_candidates:
|
||||||
|
if lc.is_file():
|
||||||
|
ledger_text = lc.read_text(encoding="utf-8")
|
||||||
|
break
|
||||||
|
|
||||||
|
missing_pdfs: list[str] = []
|
||||||
|
missing_ledger_entries: list[str] = []
|
||||||
|
metadata_errors: list[dict[str, Any]] = []
|
||||||
|
host_path_errors: list[dict[str, Any]] = []
|
||||||
|
errors: list[str] = []
|
||||||
|
|
||||||
|
for md_p in all_target_mds:
|
||||||
|
rel_p = md_p.relative_to(cfg.workspace_root).as_posix()
|
||||||
|
pdf_p = md_p.with_suffix(".pdf")
|
||||||
|
if not pdf_p.is_file():
|
||||||
|
missing_pdfs.append(rel_p)
|
||||||
|
|
||||||
|
txt = md_p.read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
# Check metadata fields
|
||||||
|
missing_keys = []
|
||||||
|
for key in REQUIRED_METADATA_KEYS:
|
||||||
|
if not re.search(rf"\*\*{re.escape(key)}:\*\*", txt):
|
||||||
|
missing_keys.append(key)
|
||||||
|
if missing_keys:
|
||||||
|
metadata_errors.append({"file": rel_p, "missing_keys": missing_keys})
|
||||||
|
|
||||||
|
# Check host path leakage
|
||||||
|
for pat in CONTAINER_HOST_PATH_PATTERNS:
|
||||||
|
m = pat.search(txt)
|
||||||
|
if m:
|
||||||
|
host_path_errors.append({"file": rel_p, "leakage": m.group(0)})
|
||||||
|
|
||||||
|
# Check ledger presence if ledger is found
|
||||||
|
if ledger_text:
|
||||||
|
plan_stem = md_p.stem
|
||||||
|
if plan_stem not in ledger_text:
|
||||||
|
missing_ledger_entries.append(plan_stem)
|
||||||
|
|
||||||
|
if missing_pdfs:
|
||||||
|
errors.append(f"Missing companion Dark-Mode PDFs for: {', '.join(missing_pdfs)}")
|
||||||
|
if metadata_errors:
|
||||||
|
errors.append(f"Metadata errors: {metadata_errors}")
|
||||||
|
if host_path_errors:
|
||||||
|
errors.append(f"Host path leakage detected: {host_path_errors}")
|
||||||
|
if missing_ledger_entries:
|
||||||
|
errors.append(f"Plans missing from roadmap-plan-ledger.md: {missing_ledger_entries}")
|
||||||
|
|
||||||
|
return {
|
||||||
|
"ok": len(errors) == 0,
|
||||||
|
"active_plans_checked": len(active_mds),
|
||||||
|
"piecewise_plans_checked": len(piecewise_mds),
|
||||||
|
"total_plans_checked": len(all_target_mds),
|
||||||
|
"missing_pdfs": missing_pdfs,
|
||||||
|
"missing_ledger_entries": missing_ledger_entries,
|
||||||
|
"metadata_errors": metadata_errors,
|
||||||
|
"host_path_errors": host_path_errors,
|
||||||
|
"errors": errors,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: list[str] | None = None) -> int:
|
||||||
|
ap = argparse.ArgumentParser(prog="hs-plan-lint", description="Validate active/piecewise architectural plans against governance standard.")
|
||||||
|
ap.add_argument("--workspace-root", default=None, help="Root directory of hyperstitionstud.io workspace.")
|
||||||
|
args = ap.parse_args(argv)
|
||||||
|
|
||||||
|
res = verify_plan_specifications(workspace_root=args.workspace_root)
|
||||||
|
print(json.dumps(res, indent=2))
|
||||||
|
return 0 if res["ok"] else 1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -0,0 +1,518 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
hyperstitionstud_io.ci.public_regression
|
||||||
|
Ad-Hoc Public API & Surface Regression Testing Suite (`hs-public-smoke`).
|
||||||
|
Compares live HTTP responses (local staging or `https://hyperstitionstud.io`) against a cached snapshot
|
||||||
|
of the most recent passing internal test suite (`.cache/internal-test-baseline-latest.json`) across
|
||||||
|
6 Regression Gates (`Gates P1-P6`):
|
||||||
|
- Gate P1: API & MCP Liveness (`502 Bad Gateway` / `5xx` / SQLite telemetry crash detector)
|
||||||
|
- Gate P2: Internal-vs-External Version & IPLD `CIDv1` Drift Detector
|
||||||
|
- Gate P3: Zero-Synthetic-Data & Canary Invariant Audit (`NVDA != $137`, `ANTHR-PVT == null`, `EFFR == 388 bps`)
|
||||||
|
- Gate P4: Web-Linked PDF Stylistic Refresh & SHA-256 Parity (`STEALTH BASALT CODEX` Dark-Mode check)
|
||||||
|
- Gate P5: Live Deep-Link & Citation Target Resolution (`HTTP 200 OK`)
|
||||||
|
- Gate P6: HTML / CSS Group 3 Visual & Reduced `/donate/` Content Regression
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import base64
|
||||||
|
import datetime
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||||
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
|
from hyperstitionstud_io.glossary import sha256_file
|
||||||
|
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||||
|
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA
|
||||||
|
|
||||||
|
_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) HyperstitionPublicRegression/2.0"
|
||||||
|
|
||||||
|
WEB_LINKED_PDF_CANARIES: tuple[str, ...] = (
|
||||||
|
"/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf",
|
||||||
|
"/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
|
||||||
|
"/encyclopedia/00-index-and-ontological-atlas/00-master-encyclopedia-index-a-to-z.pdf",
|
||||||
|
"/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s1-autoregressive-ai-and-abstract-machine-a-to-z.pdf",
|
||||||
|
"/encyclopedia/03-machinic-phylum-guilds-s1-to-s5/class-s3-silicon-war-machine-and-euv-swarm-a-to-z.pdf",
|
||||||
|
"/encyclopedia/04-capital-organizational-capture-s6/a-to-f-acquisition-to-fund.pdf",
|
||||||
|
"/encyclopedia/05-memetic-superclass-and-emergent-m7/m1-vampiric-entropic-and-anti-productive-a-to-m.pdf",
|
||||||
|
"/encyclopedia/07-ecological-trophic-index-and-tier-list/a-to-z-arm-chokepoint-armor-to-zoological-tie-breaker.pdf",
|
||||||
|
"/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf",
|
||||||
|
"/zoology/tier-list-technocapital-assemblage-builds.pdf",
|
||||||
|
"/zoology/proposal-fund-manager-novel-investment-discovery.pdf",
|
||||||
|
"/zoology/proposal-corporate-board-technocapital-allocation.pdf",
|
||||||
|
"/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def get_default_baseline_cache_path(workspace_root: str | Path | None = None) -> Path:
|
||||||
|
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||||
|
return cfg.core_dir / ".cache" / "internal-test-baseline-latest.json"
|
||||||
|
|
||||||
|
|
||||||
|
def _resolve_web_route_to_disk(route: str, cfg: Any) -> Path:
|
||||||
|
core = cfg.core_dir
|
||||||
|
zoo = cfg.zoology_dir
|
||||||
|
kg = cfg.knowledge_graph_dir
|
||||||
|
ci = cfg.ci_build_dir
|
||||||
|
|
||||||
|
if route == "/":
|
||||||
|
return core / "site" / "index.html"
|
||||||
|
if route.startswith("/assets/"):
|
||||||
|
return core / "site" / route.lstrip("/")
|
||||||
|
if route.startswith(("/quant/", "/learn/", "/donate/")):
|
||||||
|
return core / "site" / route.lstrip("/")
|
||||||
|
if route.startswith("/encyclopedia/"):
|
||||||
|
return zoo / "encyclopedia" / route[len("/encyclopedia/"):]
|
||||||
|
if route.startswith("/zoology/"):
|
||||||
|
return zoo / route[len("/zoology/"):]
|
||||||
|
if route.startswith("/graph/"):
|
||||||
|
return kg / route[len("/graph/"):]
|
||||||
|
if route.startswith("/ci/"):
|
||||||
|
return ci / route[len("/ci/"):]
|
||||||
|
if route.startswith("/calc/"):
|
||||||
|
return cfg.paths["gematria_js_dir"] / route[len("/calc/"):]
|
||||||
|
return core / "site" / route.lstrip("/")
|
||||||
|
|
||||||
|
|
||||||
|
def build_internal_test_baseline_snapshot(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Build the deterministic internal test baseline snapshot from local verified artifacts.
|
||||||
|
"""
|
||||||
|
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||||
|
ts_p = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
||||||
|
mac_p = cfg.core_dir / "site" / "quant" / "real-macro-indicators.json"
|
||||||
|
brf_p = cfg.core_dir / "site" / "quant" / "daily-brief-latest.json"
|
||||||
|
kg_p = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
||||||
|
|
||||||
|
ts_obj = load_json_cached(ts_p, copy_result=False)
|
||||||
|
mac_obj = load_json_cached(mac_p, copy_result=False)
|
||||||
|
brf_obj = load_json_cached(brf_p, copy_result=False)
|
||||||
|
kg_obj = load_json_cached(kg_p, copy_result=False)
|
||||||
|
|
||||||
|
nvda_inst = next(i for i in ts_obj["instruments"] if i["symbol"] == "NVDA")
|
||||||
|
nvda_nov27 = next(b for b in nvda_inst["bars"] if b["date_utc"] == "2026-11-27")
|
||||||
|
nvda_nov30 = next(b for b in nvda_inst["bars"] if b["date_utc"] == "2026-11-30")
|
||||||
|
anthr_inst = next(i for i in ts_obj["instruments"] if i["symbol"] == "ANTHR-PVT")
|
||||||
|
sol_inst = next(i for i in ts_obj["instruments"] if i["symbol"] == "SOL-USD")
|
||||||
|
sol_nov19 = next(b for b in sol_inst["bars"] if b["date_utc"] == "2026-11-19")
|
||||||
|
goog_inst = next(i for i in ts_obj["instruments"] if i["symbol"] == "GOOGL")
|
||||||
|
goog_nov24 = next(b for b in goog_inst["bars"] if b["date_utc"] == "2026-11-24")
|
||||||
|
|
||||||
|
web_pdfs: dict[str, dict[str, Any]] = {}
|
||||||
|
for route in WEB_LINKED_PDF_CANARIES:
|
||||||
|
dp = _resolve_web_route_to_disk(route, cfg)
|
||||||
|
if dp.is_file():
|
||||||
|
web_pdfs[route] = {
|
||||||
|
"sha256": sha256_file(dp),
|
||||||
|
"size_bytes": dp.stat().st_size,
|
||||||
|
"dark_mode_header": "STEALTH BASALT CODEX",
|
||||||
|
}
|
||||||
|
|
||||||
|
html_surfaces: dict[str, dict[str, Any]] = {}
|
||||||
|
for h_route, req_markers, bad_markers in (
|
||||||
|
("/", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "btn-donate-pill", "/engineering/index.html", "/math/index.html", "assets/closeups/quadrant-1-cybermemetics-calc-graph.png"], ["388 Graph Nodes", "1,282 Typed Edges", "24 Quant Tickers", "stat-row", "-manifest.json"]),
|
||||||
|
("/quant/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "macroIndicatorsPanel", "dailyBriefPanel", "/engineering/index.html", "/math/index.html", "24 Watchlist Instruments"], []),
|
||||||
|
("/learn/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "btn-donate-pill", "/engineering/index.html", "/math/index.html"], []),
|
||||||
|
("/donate/index.html", [f"hs-group3-basalt-chamfer.css?v={CURRENT_VERSION}", "primaryDonateActionBtn"], ["curiosityPills", "expInputA"]),
|
||||||
|
("/engineering/index.html", ["guileSchemeModeToggle", "hs-guile-cartridge", "hs-guile-scheme-repl.js"], []),
|
||||||
|
("/math/index.html", ["guileSchemeModeToggle", "hs-guile-cartridge", "hs-guile-scheme-repl.js"], []),
|
||||||
|
("/graph/index.html", [f"v{CURRENT_VERSION}"], []),
|
||||||
|
("/assets/hs-group3-basalt-chamfer.css", [".btn-donate-pill", "border-radius: 999px !important;"], []),
|
||||||
|
):
|
||||||
|
hp = _resolve_web_route_to_disk(h_route, cfg)
|
||||||
|
if hp.is_file():
|
||||||
|
html_surfaces[h_route] = {
|
||||||
|
"sha256": sha256_file(hp),
|
||||||
|
"size_bytes": hp.stat().st_size,
|
||||||
|
"must_contain": req_markers,
|
||||||
|
"must_not_contain": bad_markers,
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
"recorded_at_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
||||||
|
"expected_version": CURRENT_VERSION,
|
||||||
|
"expected_mcp_tool_count": len(MCP_TOOLS_SCHEMA),
|
||||||
|
"expected_mcp_tools": sorted(t["name"] for t in MCP_TOOLS_SCHEMA),
|
||||||
|
"expected_cidv1_by_artifact": {
|
||||||
|
"/quant/quant-timeseries.json": ts_obj["ipld_dag_json_cidv1"]["/"],
|
||||||
|
"/quant/real-macro-indicators.json": mac_obj["ipld_dag_json_cidv1"]["/"],
|
||||||
|
"/quant/daily-brief-latest.json": brf_obj["ipld_dag_json_cidv1"]["/"],
|
||||||
|
"/graph/encyclopedia-graph.json": (kg_obj.get("ipld_dag_json_cidv1") or {}).get("/") or compute_dag_json_cidv1(kg_obj),
|
||||||
|
},
|
||||||
|
"expected_canaries": {
|
||||||
|
"nvda_nov27_close_usd": nvda_nov27["close_usd"],
|
||||||
|
"nvda_nov30_close_usd": nvda_nov30["close_usd"],
|
||||||
|
"anthr_pvt_data_available": anthr_inst["data_available"],
|
||||||
|
"sol_nov19_close_usd": sol_nov19["close_usd"],
|
||||||
|
"sol_nov19_confluence_dose": sol_nov19["confluence_dose"],
|
||||||
|
"googl_nov24_bps_spoken_eng_aq": goog_nov24["bps_spoken_eng_aq"],
|
||||||
|
"effr_latest_face_int_bps": mac_obj["series"]["effr"]["aq_evaluation"]["face_int"],
|
||||||
|
},
|
||||||
|
"expected_web_pdfs": web_pdfs,
|
||||||
|
"expected_html_surfaces": html_surfaces,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def write_internal_test_baseline_cache(
|
||||||
|
cache_path: str | Path | None = None,
|
||||||
|
workspace_root: str | Path | None = None,
|
||||||
|
erofs_audit_receipt: dict[str, Any] | None = None,
|
||||||
|
) -> Path:
|
||||||
|
out_p = Path(cache_path) if cache_path else get_default_baseline_cache_path(workspace_root=workspace_root)
|
||||||
|
out_p.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
snap = build_internal_test_baseline_snapshot(workspace_root=workspace_root)
|
||||||
|
if erofs_audit_receipt is not None:
|
||||||
|
snap["erofs_protect_system_strict_audit"] = erofs_audit_receipt
|
||||||
|
out_p.write_text(json.dumps(snap, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||||
|
return out_p
|
||||||
|
|
||||||
|
|
||||||
|
def _http_fetch(url: str, method: str = "GET", body_bytes: bytes | None = None, timeout: float = 10.0) -> tuple[int, bytes]:
|
||||||
|
from hyperstitionstud_io.security import safe_urlopen
|
||||||
|
|
||||||
|
headers = {"User-Agent": _USER_AGENT}
|
||||||
|
if body_bytes is not None:
|
||||||
|
headers["Content-Type"] = "application/json"
|
||||||
|
req = urllib.request.Request(url, data=body_bytes, headers=headers, method=method)
|
||||||
|
try:
|
||||||
|
with safe_urlopen(req, timeout=timeout, allow_http_localhost=True) as resp:
|
||||||
|
return int(resp.status), resp.read()
|
||||||
|
except urllib.error.HTTPError as exc:
|
||||||
|
return int(exc.code), exc.read() if exc.fp else b""
|
||||||
|
|
||||||
|
|
||||||
|
def run_public_regression_suite(
|
||||||
|
base_url: str,
|
||||||
|
mcp_url: str | None = None,
|
||||||
|
api_v1_url: str | None = None,
|
||||||
|
baseline_path: str | Path | None = None,
|
||||||
|
strict_sha256: bool = True,
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Execute Gates P1-P6 against `base_url` / `mcp_url` / `api_v1_url` and compare against the cached internal baseline.
|
||||||
|
"""
|
||||||
|
base = base_url.rstrip("/")
|
||||||
|
mcp_ep = (mcp_url or f"{base}/mcp").rstrip("/")
|
||||||
|
api_ep = (api_v1_url or f"{base}/api/v1").rstrip("/")
|
||||||
|
|
||||||
|
bp = Path(baseline_path) if baseline_path else get_default_baseline_cache_path()
|
||||||
|
if bp.is_file():
|
||||||
|
baseline = load_json_cached(bp, copy_result=False)
|
||||||
|
else:
|
||||||
|
baseline = build_internal_test_baseline_snapshot()
|
||||||
|
|
||||||
|
regressions: list[str] = []
|
||||||
|
gate_results: dict[str, bool] = {}
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P01.STATIC_ROUTES: API & MCP Liveness (502 / 5xx Detector)
|
||||||
|
p1_ok = True
|
||||||
|
api_probes = (
|
||||||
|
"/status",
|
||||||
|
"/openapi.json",
|
||||||
|
"/quant/timeseries?symbol=NVDA",
|
||||||
|
"/quant/instruments/NVDA",
|
||||||
|
"/zoology/pokedex/NVDA?include_card=true",
|
||||||
|
"/zoology/pokedex/ANTHR-PVT?include_card=true",
|
||||||
|
"/dossiers/71?highlight=envideea",
|
||||||
|
"/tools/hs_inspect_macro_indicators",
|
||||||
|
"/tools/hs_generate_daily_portfolio_brief",
|
||||||
|
"/tools/hs_generate_ticker_stats_card?symbol=NVDA",
|
||||||
|
)
|
||||||
|
api_responses: dict[str, dict[str, Any]] = {}
|
||||||
|
for sub in api_probes:
|
||||||
|
code, raw = _http_fetch(f"{api_ep}{sub}")
|
||||||
|
if code != 200:
|
||||||
|
p1_ok = False
|
||||||
|
regressions.append(f"Gate P1: GET {api_ep}{sub} returned HTTP {code} (expected 200)")
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
api_responses[sub] = json.loads(raw.decode("utf-8"))
|
||||||
|
except Exception as exc:
|
||||||
|
p1_ok = False
|
||||||
|
regressions.append(f"Gate P1: GET {api_ep}{sub} returned invalid JSON: {exc}")
|
||||||
|
|
||||||
|
# Confirm 0 unapproved /api/v1/cards/* routes
|
||||||
|
code_404, _ = _http_fetch(f"{api_ep}/cards/NVDA")
|
||||||
|
if code_404 != 404:
|
||||||
|
p1_ok = False
|
||||||
|
regressions.append(f"Gate P1: GET {api_ep}/cards/NVDA returned HTTP {code_404} (expected 404)")
|
||||||
|
|
||||||
|
mcp_code, _ = _http_fetch(mcp_ep)
|
||||||
|
if mcp_code != 200:
|
||||||
|
p1_ok = False
|
||||||
|
regressions.append(f"Gate P1: GET {mcp_ep} returned HTTP {mcp_code}")
|
||||||
|
gate_results["P1_api_and_mcp_liveness_zero_502"] = p1_ok
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P02.VERSION_CID_DRIFT: Internal-vs-External Version & CIDv1 Drift
|
||||||
|
p2_ok = True
|
||||||
|
st_obj = (api_responses.get("/status") or {}).get("data") or {}
|
||||||
|
live_ver = st_obj.get("version")
|
||||||
|
if live_ver != baseline["expected_version"]:
|
||||||
|
p2_ok = False
|
||||||
|
regressions.append(f"Gate P2: Live API version {live_ver!r} != baseline {baseline['expected_version']!r}")
|
||||||
|
live_tools = (st_obj.get("counts") or {}).get("tools")
|
||||||
|
if live_tools != baseline["expected_mcp_tool_count"]:
|
||||||
|
p2_ok = False
|
||||||
|
regressions.append(f"Gate P2: Live MCP tool count {live_tools} != baseline {baseline['expected_mcp_tool_count']}")
|
||||||
|
|
||||||
|
for art_route, exp_cid in baseline["expected_cidv1_by_artifact"].items():
|
||||||
|
c_code, c_raw = _http_fetch(f"{base}{art_route}")
|
||||||
|
if c_code != 200:
|
||||||
|
p2_ok = False
|
||||||
|
regressions.append(f"Gate P2: GET {base}{art_route} returned HTTP {c_code}")
|
||||||
|
elif strict_sha256:
|
||||||
|
c_json = json.loads(c_raw.decode("utf-8"))
|
||||||
|
live_cid = (c_json.get("ipld_dag_json_cidv1") or {}).get("/") or compute_dag_json_cidv1(c_json)
|
||||||
|
if live_cid != exp_cid:
|
||||||
|
p2_ok = False
|
||||||
|
regressions.append(f"Gate P2: {art_route} CIDv1 {live_cid!r} != baseline {exp_cid!r}")
|
||||||
|
gate_results["P2_version_and_cidv1_parity"] = p2_ok
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P03.ZERO_SYNTHETIC: Zero-Synthetic-Data & Canary Invariant Audit
|
||||||
|
p3_ok = True
|
||||||
|
nvda_qts = ((api_responses.get("/quant/timeseries?symbol=NVDA") or {}).get("data") or {}).get("instruments") or []
|
||||||
|
if nvda_qts:
|
||||||
|
bars_nvda = {b["date_utc"]: b for b in nvda_qts[0].get("bars") or []}
|
||||||
|
if (bars_nvda.get("2026-11-30") or {}).get("close_usd") is not None:
|
||||||
|
p3_ok = False
|
||||||
|
regressions.append("Gate P3: NVDA 2026-11-30 close_usd is non-null (synthetic data regression!)")
|
||||||
|
if (bars_nvda.get("2026-11-27") or {}).get("close_usd") != baseline["expected_canaries"]["nvda_nov27_close_usd"]:
|
||||||
|
p3_ok = False
|
||||||
|
regressions.append("Gate P3: NVDA 2026-11-27 close_usd mismatch")
|
||||||
|
else:
|
||||||
|
p3_ok = False
|
||||||
|
regressions.append("Gate P3: Missing NVDA instrument in /quant/timeseries")
|
||||||
|
|
||||||
|
anthr_pkx = ((api_responses.get("/zoology/pokedex/ANTHR-PVT?include_card=true") or {}).get("data") or {}).get("stats_card") or {}
|
||||||
|
if (anthr_pkx.get("sports_card_box_score") or {}).get("data_available") is not False:
|
||||||
|
p3_ok = False
|
||||||
|
regressions.append("Gate P3: ANTHR-PVT stats_card data_available must be False")
|
||||||
|
|
||||||
|
nvda_card = ((api_responses.get("/tools/hs_generate_ticker_stats_card?symbol=NVDA") or {}).get("data") or {})
|
||||||
|
b64_png = (nvda_card.get("artifacts") or {}).get("png_base64") or ""
|
||||||
|
if not b64_png or base64.b64decode(b64_png)[:8] != b"\x89PNG\r\n\x1a\n":
|
||||||
|
p3_ok = False
|
||||||
|
regressions.append("Gate P3: hs_generate_ticker_stats_card did not return valid PNG magic bytes")
|
||||||
|
gate_results["P3_zero_synthetic_and_canary_invariants"] = p3_ok
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P04.PDF_PARITY: Web-Linked PDF Stylistic Refresh & SHA-256 Parity
|
||||||
|
p4_ok = True
|
||||||
|
for pdf_route, pdf_meta in baseline["expected_web_pdfs"].items():
|
||||||
|
p_code, p_bytes = _http_fetch(f"{base}{pdf_route}")
|
||||||
|
if p_code != 200 or not p_bytes.startswith(b"%PDF-"):
|
||||||
|
p4_ok = False
|
||||||
|
regressions.append(f"Gate P4: {pdf_route} returned HTTP {p_code} or invalid PDF header")
|
||||||
|
continue
|
||||||
|
if strict_sha256:
|
||||||
|
live_sha = hashlib.sha256(p_bytes).hexdigest()
|
||||||
|
if live_sha != pdf_meta["sha256"]:
|
||||||
|
p4_ok = False
|
||||||
|
regressions.append(f"Gate P4: {pdf_route} SHA-256 {live_sha[:12]} != baseline {pdf_meta['sha256'][:12]} (un-refreshed PDF!)")
|
||||||
|
gate_results["P4_web_pdf_dark_mode_and_sha256_parity"] = p4_ok
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P05.DEEP_LINKS: Deep-Link & Citation Target Resolution
|
||||||
|
p5_ok = True
|
||||||
|
if nvda_qts:
|
||||||
|
drefs = nvda_qts[0].get("doc_references") or {}
|
||||||
|
for ref_key in ("encyclopedia_deep_link", "knowledge_graph_deep_link"):
|
||||||
|
rlk = (drefs.get(ref_key) or "").split("#")[0].split("?")[0]
|
||||||
|
if rlk:
|
||||||
|
rc, _ = _http_fetch(f"{base}{rlk}")
|
||||||
|
if rc != 200:
|
||||||
|
p5_ok = False
|
||||||
|
regressions.append(f"Gate P5: Deep link {rlk} returned HTTP {rc}")
|
||||||
|
gate_results["P5_deep_link_resolution"] = p5_ok
|
||||||
|
|
||||||
|
# Gate SMOKE-GATE-P06.NAV_STYLE_PARITY: HTML / CSS Visual & Content Regression
|
||||||
|
p6_ok = True
|
||||||
|
for h_route, h_meta in baseline["expected_html_surfaces"].items():
|
||||||
|
hc, h_bytes = _http_fetch(f"{base}{h_route}")
|
||||||
|
if hc != 200:
|
||||||
|
p6_ok = False
|
||||||
|
regressions.append(f"Gate P6: {h_route} returned HTTP {hc}")
|
||||||
|
continue
|
||||||
|
h_txt = h_bytes.decode("utf-8", errors="replace")
|
||||||
|
for req_m in h_meta.get("must_contain") or []:
|
||||||
|
if req_m not in h_txt:
|
||||||
|
p6_ok = False
|
||||||
|
regressions.append(f"Gate P6: {h_route} missing required marker {req_m!r}")
|
||||||
|
for bad_m in h_meta.get("must_not_contain") or []:
|
||||||
|
if bad_m in h_txt:
|
||||||
|
p6_ok = False
|
||||||
|
regressions.append(f"Gate P6: {h_route} contains forbidden legacy marker {bad_m!r}")
|
||||||
|
gate_results["P6_html_css_visual_and_content_parity"] = p6_ok
|
||||||
|
|
||||||
|
style_audit = verify_ui_style_and_navigation_consistency()
|
||||||
|
if not style_audit["ok"]:
|
||||||
|
gate_results["P6_html_css_visual_and_content_parity"] = False
|
||||||
|
regressions.extend(style_audit["errors"])
|
||||||
|
|
||||||
|
all_passed = all(gate_results.values())
|
||||||
|
return {
|
||||||
|
"ok": all_passed,
|
||||||
|
"target_base_url": base,
|
||||||
|
"baseline_version": baseline["expected_version"],
|
||||||
|
"gates_passed": sum(1 for v in gate_results.values() if v),
|
||||||
|
"gates_total": len(gate_results),
|
||||||
|
"gate_results": gate_results,
|
||||||
|
"style_consistency_audit": style_audit,
|
||||||
|
"regressions_detected": regressions,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def verify_ui_style_and_navigation_consistency(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Plan #65 (`PLAN-CROSS-PAGE-STYLE-FONT-BACKGROUND-AND-NAVIGATION-PARITY-WITH-REGRESSION-TESTS`):
|
||||||
|
Enforce Intra-Page & Cross-Page UI Style, Font-Family, Background Token, and Navigation Bar Parity
|
||||||
|
across all HTML/CSS surfaces (`Gates S1-S3`).
|
||||||
|
"""
|
||||||
|
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||||
|
core = cfg.core_dir
|
||||||
|
kg = cfg.knowledge_graph_dir
|
||||||
|
calc_dir = cfg.paths["gematria_js_dir"]
|
||||||
|
|
||||||
|
errors: list[str] = []
|
||||||
|
chamfer_css_p = core / "site" / "assets" / "hs-group3-basalt-chamfer.css"
|
||||||
|
chamfer_css = chamfer_css_p.read_text(encoding="utf-8") if chamfer_css_p.is_file() else ""
|
||||||
|
|
||||||
|
# Gate STYLE-GATE-S01.NO_SLATE_BG: Zero Spurious rgb(30, 41, 59) / #1e293b Background Invariant on Subpages & Group 3 CSS
|
||||||
|
if re.search(r"#1e293b|rgb\(\s*30\s*,\s*41\s*,\s*59\s*\)", chamfer_css, flags=re.I):
|
||||||
|
errors.append("Gate S1: Forbidden #1e293b / rgb(30, 41, 59) found in hs-group3-basalt-chamfer.css")
|
||||||
|
|
||||||
|
subpages: dict[str, Path] = {
|
||||||
|
"calc": calc_dir / "index.html",
|
||||||
|
"quant": core / "site" / "quant" / "index.html",
|
||||||
|
"graph": kg / "index.html",
|
||||||
|
"learn": core / "site" / "learn" / "index.html",
|
||||||
|
"engineering_hub": core / "site" / "engineering" / "index.html",
|
||||||
|
"engineering_e1": core / "site" / "engineering" / "ciphers-and-phonetics" / "index.html",
|
||||||
|
"math_hub": core / "site" / "math" / "index.html",
|
||||||
|
"math_m1": core / "site" / "math" / "base36-algebra-and-primes" / "index.html",
|
||||||
|
"donate": core / "site" / "donate" / "index.html",
|
||||||
|
"gallery": core / "site" / "gallery" / "index.html",
|
||||||
|
}
|
||||||
|
|
||||||
|
for sname, spath in subpages.items():
|
||||||
|
if not spath.is_file():
|
||||||
|
errors.append(f"Gate S1: Missing subpage {spath}")
|
||||||
|
continue
|
||||||
|
stxt = spath.read_text(encoding="utf-8")
|
||||||
|
if re.search(r"--bg-(?:card|panel)\s*:\s*(?:#1e293b|rgb\(\s*30\s*,\s*41\s*,\s*59\s*\))", stxt, flags=re.I):
|
||||||
|
errors.append(f"Gate S1: Spurious --bg-card/--bg-panel #1e293b / rgb(30, 41, 59) override in {sname} ({spath})")
|
||||||
|
if sname == "graph" and re.search(r"#1e293b|rgb\(\s*30\s*,\s*41\s*,\s*59\s*\)", stxt, flags=re.I):
|
||||||
|
errors.append(f"Gate S1: Spurious #1e293b / rgb(30, 41, 59) found in /graph/ ({spath})")
|
||||||
|
|
||||||
|
calc_styles_p = calc_dir / "calc" / "styles.css"
|
||||||
|
if calc_styles_p.is_file():
|
||||||
|
calc_css = calc_styles_p.read_text(encoding="utf-8")
|
||||||
|
hs_nav_m = re.search(r"\.hs-nav-btn\s*\{([^}]*)\}", calc_css, flags=re.S)
|
||||||
|
if hs_nav_m:
|
||||||
|
body_css = hs_nav_m.group(1)
|
||||||
|
if re.search(r"#1e293b|rgb\(\s*30\s*,\s*41\s*,\s*59\s*\)", body_css, flags=re.I) or re.search(
|
||||||
|
r"(?<![-a-z])(?:color|border)\s*:[^;]*!important", body_css, flags=re.I
|
||||||
|
):
|
||||||
|
errors.append("Gate S1/S3: .hs-nav-btn in calc/styles.css contains #1e293b or !important color/border overrides")
|
||||||
|
|
||||||
|
# Gate STYLE-GATE-S02.DEJAVU_FONT: Intra-Page Font-Family Uniformity Invariant
|
||||||
|
if "--font-mono:" not in chamfer_css or "button," not in chamfer_css or "select," not in chamfer_css:
|
||||||
|
errors.append("Gate S2: hs-group3-basalt-chamfer.css missing --font-mono inheritance on button/input/select/textarea")
|
||||||
|
for sname in ("graph", "quant", "learn", "engineering_hub", "engineering_e1", "math_hub", "math_m1", "donate", "gallery"):
|
||||||
|
stxt = subpages[sname].read_text(encoding="utf-8")
|
||||||
|
if "sans-serif" in stxt:
|
||||||
|
errors.append(f"Gate S2: Inconsistent 'sans-serif' font declaration found in {sname} ({subpages[sname]})")
|
||||||
|
if sname == "graph" and "font-family: monospace;" in stxt:
|
||||||
|
errors.append(f"Gate S2: Bare 'font-family: monospace;' without --font-mono found in /graph/")
|
||||||
|
|
||||||
|
# Gate STYLE-GATE-S03.HEADER_PARITY: Cross-Page Navigation UI & Header Style Parity Invariant
|
||||||
|
home_txt = (core / "site" / "index.html").read_text(encoding="utf-8")
|
||||||
|
if '<div class="meta-badges">' not in home_txt:
|
||||||
|
errors.append("Gate S3: Homepage site/index.html <div class=\"meta-badges\"> was modified!")
|
||||||
|
canonical_order = ["Portal Home (/)", "Calculator", "Quant", "Graph", "Learn", "Engineering", "Math", "DONATE"]
|
||||||
|
for sname, spath in subpages.items():
|
||||||
|
stxt = spath.read_text(encoding="utf-8")
|
||||||
|
nav_m = re.search(r"<nav[^>]*hs-global-nav[^>]*>(.*?)</nav>", stxt, flags=re.S)
|
||||||
|
if not nav_m:
|
||||||
|
errors.append(f"Gate S3: Missing <nav ... hs-global-nav> in {sname}")
|
||||||
|
continue
|
||||||
|
nav_inner = nav_m.group(1)
|
||||||
|
if "title-row" not in stxt or 'class="subtitle' not in stxt:
|
||||||
|
errors.append(f"Gate S3: Missing .title-row or .subtitle in {sname}")
|
||||||
|
if re.search(r"h1\s*\{[^}]*color\s*:\s*var\(--gold\)", stxt):
|
||||||
|
errors.append(f"Gate S3: Inconsistent h1 color: var(--gold) in {sname}")
|
||||||
|
positions = [nav_inner.find(lbl) for lbl in canonical_order]
|
||||||
|
if any(pos == -1 for pos in positions) or positions != sorted(positions):
|
||||||
|
errors.append(f"Gate S3: Canonical navigation link order mismatch in {sname}: {positions}")
|
||||||
|
|
||||||
|
# Gate STYLE-GATE-S04.MOBILE_UI (Plan #66): Adaptive Mobile Device Detection & Mobile UI Ergonomics (Strategies 1A, 2A, 3A, 4A)
|
||||||
|
mob_js_p = core / "site" / "assets" / "hs-mobile-ui.js"
|
||||||
|
if not mob_js_p.is_file():
|
||||||
|
errors.append("Gate S4: Missing site/assets/hs-mobile-ui.js")
|
||||||
|
else:
|
||||||
|
mob_js = mob_js_p.read_text(encoding="utf-8")
|
||||||
|
for req_tok in ("data-device-ui", "hsMobileMenuBtn", "hsMobileNavSheet", "hsMobileUiSwitchBtn", "userAgentData"):
|
||||||
|
if req_tok not in mob_js:
|
||||||
|
errors.append(f"Gate S4: hs-mobile-ui.js missing {req_tok}")
|
||||||
|
if 'html[data-device-ui="mobile"]' not in chamfer_css:
|
||||||
|
errors.append("Gate S4: hs-group3-basalt-chamfer.css missing html[data-device-ui=\"mobile\"] rules")
|
||||||
|
caddy_p = core / "deploy" / "Caddyfile"
|
||||||
|
if caddy_p.is_file() and "@mobile_ua" not in caddy_p.read_text(encoding="utf-8"):
|
||||||
|
errors.append("Gate S4: deploy/Caddyfile missing @mobile_ua mobile detection block")
|
||||||
|
graph_txt = subpages["graph"].read_text(encoding="utf-8")
|
||||||
|
if "touchstart" not in graph_txt or "mobileGraphFiltersBtn" not in graph_txt or "mobileGraphInspectorBtn" not in graph_txt:
|
||||||
|
errors.append("Gate S4: /graph/index.html missing mobile touch handlers or drawer toggle buttons")
|
||||||
|
quant_app_p = core / "site" / "quant" / "quant-app.js"
|
||||||
|
if quant_app_p.is_file() and "touchmove" not in quant_app_p.read_text(encoding="utf-8"):
|
||||||
|
errors.append("Gate S4: site/quant/quant-app.js missing touchmove crosshair scrubbing")
|
||||||
|
for sname, spath in subpages.items():
|
||||||
|
if "hs-mobile-ui.js" not in spath.read_text(encoding="utf-8"):
|
||||||
|
errors.append(f"Gate S4: Subpage {sname} missing hs-mobile-ui.js script inclusion")
|
||||||
|
|
||||||
|
s1_ok = not any(e.startswith("Gate S1") for e in errors)
|
||||||
|
s2_ok = not any(e.startswith("Gate S2") for e in errors)
|
||||||
|
s3_ok = not any(e.startswith("Gate S3") for e in errors)
|
||||||
|
s4_ok = not any(e.startswith("Gate S4") for e in errors)
|
||||||
|
return {
|
||||||
|
"ok": len(errors) == 0,
|
||||||
|
"gates": {
|
||||||
|
"S1_zero_spurious_rgb_30_41_59_background": s1_ok,
|
||||||
|
"S2_intra_page_font_family_uniformity": s2_ok,
|
||||||
|
"S3_cross_page_navigation_and_header_parity": s3_ok,
|
||||||
|
"S4_mobile_device_detection_and_touch_ui": s4_ok,
|
||||||
|
},
|
||||||
|
"errors": errors,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: list[str] | None = None) -> int:
|
||||||
|
ap = argparse.ArgumentParser(prog="hs-public-smoke", description="Run the 6-Gate Public API & Surface Regression Suite against a cached internal baseline.")
|
||||||
|
ap.add_argument("--base-url", default="https://hyperstitionstud.io", help="Target base URL (e.g. https://hyperstitionstud.io or http://127.0.0.1:18090).")
|
||||||
|
ap.add_argument("--mcp-url", default=None)
|
||||||
|
ap.add_argument("--api-v1-url", default=None)
|
||||||
|
ap.add_argument("--write-baseline", action="store_true", help="Write .cache/internal-test-baseline-latest.json and exit.")
|
||||||
|
ap.add_argument("--no-strict-sha256", action="store_true")
|
||||||
|
args = ap.parse_args(argv)
|
||||||
|
|
||||||
|
if args.write_baseline:
|
||||||
|
out_p = write_internal_test_baseline_cache()
|
||||||
|
print(json.dumps({"ok": True, "baseline_cache_path": str(out_p)}, indent=2))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
res = run_public_regression_suite(
|
||||||
|
base_url=args.base_url,
|
||||||
|
mcp_url=args.mcp_url,
|
||||||
|
api_v1_url=args.api_v1_url,
|
||||||
|
strict_sha256=not args.no_strict_sha256,
|
||||||
|
)
|
||||||
|
print(json.dumps(res, indent=2))
|
||||||
|
return 0 if res["ok"] else 1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
@@ -0,0 +1,289 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
src/hyperstitionstud_io/ci/shorthand_lint.py
|
||||||
|
Release v2.18.0: Tokenizer-based shorthand linting helper (hs-shorthand-lint)
|
||||||
|
Enforces Plan #68: Human-Read Text & Comment Shorthand Disambiguation (<PREFIX><NN>.<DOMAIN_TAG>),
|
||||||
|
with strict global exemption for executable code, strings, tests, and runtime data structures.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import io
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import tokenize
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import List, Tuple
|
||||||
|
|
||||||
|
CANONICAL_ALLOWLIST = {
|
||||||
|
"H1", "H2", "H3", "V8", "M1", "M2", "P20", "P50", "P90",
|
||||||
|
"H01", "H02", "H03", "H04", "H05", "H06", "H07", "H08", "H09",
|
||||||
|
}
|
||||||
|
|
||||||
|
# Regex for un-disambiguated bare shorthands (bare [GDMESPR][0-9]{1,2} tokens without a <PREFIX><NN>.<DOMAIN_TAG> qualifier)
|
||||||
|
BARE_SHORTHAND_PATTERN = re.compile(r"\b([GDMESPR])([0-9]{1,2})\b")
|
||||||
|
DATA_URI_BASE64_RE = re.compile(r"data:image/[a-zA-Z0-9+.-]+;base64,[A-Za-z0-9+/=]+")
|
||||||
|
MD_LINK_URL_RE = re.compile(r"\]\([^)]*\)")
|
||||||
|
SUPPORTED_EXTS = {".py", ".md", ".js", ".mjs", ".ts", ".css", ".html", ".svg", ".sh", ".toml", ".yaml", ".yml"}
|
||||||
|
|
||||||
|
|
||||||
|
def extract_python_comments(source_code: str) -> List[Tuple[int, str]]:
|
||||||
|
comments: List[Tuple[int, str]] = []
|
||||||
|
try:
|
||||||
|
tokens = tokenize.generate_tokens(io.StringIO(source_code).readline)
|
||||||
|
for tok in tokens:
|
||||||
|
if tok.type == tokenize.COMMENT:
|
||||||
|
comments.append((tok.start[0], tok.string))
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
return comments
|
||||||
|
|
||||||
|
|
||||||
|
def extract_markdown_prose_lines(markdown_text: str) -> List[Tuple[int, str]]:
|
||||||
|
lines = markdown_text.splitlines()
|
||||||
|
prose_lines: List[Tuple[int, str]] = []
|
||||||
|
in_fence = False
|
||||||
|
for idx, line in enumerate(lines, start=1):
|
||||||
|
stripped = line.strip()
|
||||||
|
if stripped.startswith("```") or stripped.startswith("~~~"):
|
||||||
|
in_fence = not in_fence
|
||||||
|
continue
|
||||||
|
if in_fence:
|
||||||
|
continue
|
||||||
|
# Remove inline backtick code spans and markdown link target URLs
|
||||||
|
clean_line = re.sub(r"`[^`]*`", "", line)
|
||||||
|
clean_line = MD_LINK_URL_RE.sub("]()", clean_line)
|
||||||
|
prose_lines.append((idx, clean_line))
|
||||||
|
return prose_lines
|
||||||
|
|
||||||
|
|
||||||
|
def extract_sh_comments(text: str) -> List[Tuple[int, str]]:
|
||||||
|
comments: List[Tuple[int, str]] = []
|
||||||
|
for idx, line in enumerate(text.splitlines(), start=1):
|
||||||
|
in_sq = False
|
||||||
|
in_dq = False
|
||||||
|
esc = False
|
||||||
|
for i, ch in enumerate(line):
|
||||||
|
if esc:
|
||||||
|
esc = False
|
||||||
|
continue
|
||||||
|
if ch == "\\" and not in_sq:
|
||||||
|
esc = True
|
||||||
|
continue
|
||||||
|
if ch == "'" and not in_dq:
|
||||||
|
in_sq = not in_sq
|
||||||
|
elif ch == '"' and not in_sq:
|
||||||
|
in_dq = not in_dq
|
||||||
|
elif ch == "#" and not in_sq and not in_dq:
|
||||||
|
if i == 0 or line[i - 1].isspace():
|
||||||
|
comments.append((idx, line[i:]))
|
||||||
|
break
|
||||||
|
return comments
|
||||||
|
|
||||||
|
|
||||||
|
def extract_js_css_comments(text: str) -> List[Tuple[int, str]]:
|
||||||
|
"""Extract // and /* ... */ comments while skipping string/template literals."""
|
||||||
|
comments: List[Tuple[int, str]] = []
|
||||||
|
i = 0
|
||||||
|
n = len(text)
|
||||||
|
line = 1
|
||||||
|
in_sq = False
|
||||||
|
in_dq = False
|
||||||
|
in_bt = False
|
||||||
|
while i < n:
|
||||||
|
ch = text[i]
|
||||||
|
if ch == "\n":
|
||||||
|
line += 1
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
if in_sq:
|
||||||
|
if ch == "\\" and i + 1 < n:
|
||||||
|
i += 2
|
||||||
|
continue
|
||||||
|
if ch == "'":
|
||||||
|
in_sq = False
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
if in_dq:
|
||||||
|
if ch == "\\" and i + 1 < n:
|
||||||
|
i += 2
|
||||||
|
continue
|
||||||
|
if ch == '"':
|
||||||
|
in_dq = False
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
if in_bt:
|
||||||
|
if ch == "\\" and i + 1 < n:
|
||||||
|
i += 2
|
||||||
|
continue
|
||||||
|
if ch == "`":
|
||||||
|
in_bt = False
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
if text[i : i + 2] == "/*":
|
||||||
|
start_line = line
|
||||||
|
end = text.find("*/", i + 2)
|
||||||
|
if end == -1:
|
||||||
|
comments.append((start_line, text[i:]))
|
||||||
|
break
|
||||||
|
block = text[i : end + 2]
|
||||||
|
comments.append((start_line, block))
|
||||||
|
line += block.count("\n")
|
||||||
|
i = end + 2
|
||||||
|
continue
|
||||||
|
if text[i : i + 2] == "//":
|
||||||
|
end = text.find("\n", i)
|
||||||
|
if end == -1:
|
||||||
|
comments.append((line, text[i:]))
|
||||||
|
break
|
||||||
|
comments.append((line, text[i:end]))
|
||||||
|
i = end
|
||||||
|
continue
|
||||||
|
if ch == "'":
|
||||||
|
in_sq = True
|
||||||
|
elif ch == '"':
|
||||||
|
in_dq = True
|
||||||
|
elif ch == "`":
|
||||||
|
in_bt = True
|
||||||
|
i += 1
|
||||||
|
return comments
|
||||||
|
|
||||||
|
|
||||||
|
def extract_html_comments(text: str) -> List[Tuple[int, str]]:
|
||||||
|
comments: List[Tuple[int, str]] = []
|
||||||
|
i = 0
|
||||||
|
line = 1
|
||||||
|
while True:
|
||||||
|
idx = text.find("<!--", i)
|
||||||
|
if idx == -1:
|
||||||
|
break
|
||||||
|
line += text[i:idx].count("\n")
|
||||||
|
end = text.find("-->", idx + 4)
|
||||||
|
if end == -1:
|
||||||
|
comments.append((line, text[idx:]))
|
||||||
|
break
|
||||||
|
block = text[idx : end + 3]
|
||||||
|
comments.append((line, block))
|
||||||
|
line += block.count("\n")
|
||||||
|
i = end + 3
|
||||||
|
return comments
|
||||||
|
|
||||||
|
|
||||||
|
def scan_file_for_bare_shorthands(file_path: Path) -> List[str]:
|
||||||
|
violations: List[str] = []
|
||||||
|
try:
|
||||||
|
content = file_path.read_text(encoding="utf-8", errors="ignore")
|
||||||
|
except Exception:
|
||||||
|
return violations
|
||||||
|
|
||||||
|
suffix = file_path.suffix.lower()
|
||||||
|
target_lines: List[Tuple[int, str]] = []
|
||||||
|
|
||||||
|
if suffix == ".py":
|
||||||
|
target_lines = extract_python_comments(content)
|
||||||
|
elif suffix == ".md":
|
||||||
|
target_lines = extract_markdown_prose_lines(content)
|
||||||
|
elif suffix in (".sh", ".toml", ".yaml", ".yml"):
|
||||||
|
target_lines = extract_sh_comments(content)
|
||||||
|
elif suffix in (".js", ".mjs", ".ts", ".css"):
|
||||||
|
target_lines = extract_js_css_comments(content)
|
||||||
|
elif suffix in (".html", ".svg"):
|
||||||
|
target_lines = extract_html_comments(content)
|
||||||
|
else:
|
||||||
|
return violations
|
||||||
|
|
||||||
|
for lineno, text in target_lines:
|
||||||
|
clean_text = DATA_URI_BASE64_RE.sub("", text)
|
||||||
|
for match in BARE_SHORTHAND_PATTERN.finditer(clean_text):
|
||||||
|
token = match.group(0)
|
||||||
|
if token in CANONICAL_ALLOWLIST:
|
||||||
|
continue
|
||||||
|
# Check if immediately followed by a domain tag like .QUANT, .ENTROPIC, etc.
|
||||||
|
start_pos = match.end()
|
||||||
|
if start_pos < len(clean_text) and clean_text[start_pos] == ".":
|
||||||
|
continue
|
||||||
|
violations.append(
|
||||||
|
f"{file_path}:{lineno}: Bare shorthand '{token}' detected without canonical <PREFIX><NN>.<DOMAIN_TAG> domain tag."
|
||||||
|
)
|
||||||
|
|
||||||
|
return violations
|
||||||
|
|
||||||
|
|
||||||
|
def _staged_files_for_repo(repo_dir: Path) -> List[Path]:
|
||||||
|
res = subprocess.run(
|
||||||
|
["git", "-C", str(repo_dir), "diff", "--cached", "--name-only", "--diff-filter=ACM"],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
if res.returncode != 0:
|
||||||
|
return []
|
||||||
|
files: List[Path] = []
|
||||||
|
for rel in res.stdout.splitlines():
|
||||||
|
rel_s = rel.strip()
|
||||||
|
if not rel_s:
|
||||||
|
continue
|
||||||
|
p = repo_dir / rel_s
|
||||||
|
if p.is_file() and p.suffix.lower() in SUPPORTED_EXTS:
|
||||||
|
files.append(p)
|
||||||
|
return files
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: list[str] | None = None) -> int:
|
||||||
|
ap = argparse.ArgumentParser(
|
||||||
|
prog="hs-shorthand-lint",
|
||||||
|
description="Tokenizer-based shorthand disambiguation linter (Plan #68).",
|
||||||
|
)
|
||||||
|
ap.add_argument("--check-all", action="store_true", help="Scan all 6 repositories (default).")
|
||||||
|
ap.add_argument("--staged-diff", action="store_true", help="Scan only git-staged files in --repo.")
|
||||||
|
ap.add_argument("--repo", default=None, help="Repository path to scan.")
|
||||||
|
args = ap.parse_args(argv)
|
||||||
|
|
||||||
|
workspace_root = Path(os.environ.get("WORKSPACE_DIR", "/workspace"))
|
||||||
|
all_violations: List[str] = []
|
||||||
|
|
||||||
|
if args.staged_diff:
|
||||||
|
repo_dir = Path(args.repo).resolve() if args.repo else Path.cwd()
|
||||||
|
for p in _staged_files_for_repo(repo_dir):
|
||||||
|
all_violations.extend(scan_file_for_bare_shorthands(p))
|
||||||
|
elif args.repo:
|
||||||
|
rdir = Path(args.repo).resolve()
|
||||||
|
if not rdir.is_dir():
|
||||||
|
rdir = workspace_root / args.repo
|
||||||
|
for p in sorted(rdir.rglob("*")):
|
||||||
|
if p.is_file() and not any(part.startswith(".") or part in ("node_modules", ".venv", "__pycache__") for part in p.parts):
|
||||||
|
if p.suffix.lower() in SUPPORTED_EXTS:
|
||||||
|
all_violations.extend(scan_file_for_bare_shorthands(p))
|
||||||
|
else:
|
||||||
|
repos = [
|
||||||
|
"hyperstitionstudio-core",
|
||||||
|
"ingglish-hyperdope-gematria",
|
||||||
|
"technocapital-singularity-zoology",
|
||||||
|
"encyclopedia-knowledge-graph",
|
||||||
|
"haiperdohp-jemaytreeah",
|
||||||
|
"hyperdope-ci-build",
|
||||||
|
]
|
||||||
|
for r in repos:
|
||||||
|
rdir = workspace_root / r
|
||||||
|
if not rdir.is_dir():
|
||||||
|
continue
|
||||||
|
for p in sorted(rdir.rglob("*")):
|
||||||
|
if p.is_file() and not any(part.startswith(".") or part in ("node_modules", ".venv", "__pycache__") for part in p.parts):
|
||||||
|
if p.suffix.lower() in SUPPORTED_EXTS:
|
||||||
|
all_violations.extend(scan_file_for_bare_shorthands(p))
|
||||||
|
|
||||||
|
if all_violations:
|
||||||
|
print(f"[ERROR] Shorthand linting found {len(all_violations)} bare shorthand violation(s) (Plan #68):", file=sys.stderr)
|
||||||
|
for vio in all_violations[:50]:
|
||||||
|
print(f" - {vio}", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
print("[OK] Shorthand linting passed with 0 violations across all repositories.")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -78,6 +78,23 @@ def compute_aq(text: str, quant_mode: QuantMode = "digit") -> int:
|
|||||||
return total
|
return total
|
||||||
|
|
||||||
|
|
||||||
|
def char_value_aq(ch: str) -> int:
|
||||||
|
c = ch.lower()
|
||||||
|
if "0" <= c <= "9":
|
||||||
|
return ord(c) - 48
|
||||||
|
if "a" <= c <= "z":
|
||||||
|
return ord(c) - 87
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def compute_english_ordinal(text: str) -> int:
|
||||||
|
return sum((ord(c) - 96) for c in text.lower() if "a" <= c <= "z")
|
||||||
|
|
||||||
|
|
||||||
|
def compute_full_reduction(text: str) -> int:
|
||||||
|
return sum(((ord(c) - 97) % 9) + 1 for c in text.lower() if "a" <= c <= "z")
|
||||||
|
|
||||||
|
|
||||||
def is_prime(n: int) -> bool:
|
def is_prime(n: int) -> bool:
|
||||||
if n < 2:
|
if n < 2:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -7,20 +7,175 @@ hardcoded /workspace assumptions.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import copy
|
||||||
|
import functools
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
import tomllib
|
import tomllib
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from hyperstitionstud_io import __version__ as _PKG_VERSION
|
||||||
|
|
||||||
CORE_REPO_ROOT = Path(__file__).resolve().parents[3]
|
CORE_REPO_ROOT = Path(__file__).resolve().parents[3]
|
||||||
WORKSPACE_ROOT = CORE_REPO_ROOT.parent
|
WORKSPACE_ROOT = CORE_REPO_ROOT.parent
|
||||||
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
|
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
|
||||||
|
|
||||||
|
CANONICAL_SIX_REPOS: tuple[dict[str, Any], ...] = (
|
||||||
|
{
|
||||||
|
"key": "hyperstitionstudio-core",
|
||||||
|
"aliases": ("hyperstitionstudio-core",),
|
||||||
|
"gitea_slug": "hyperstitionstudio-core",
|
||||||
|
"default_branch": "main",
|
||||||
|
"public_route": "https://hyperstitionstud.io/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ingglish-hyperdope-gematria",
|
||||||
|
"aliases": ("ingglish-hyperdope-gematria",),
|
||||||
|
"gitea_slug": "ingglish-hyperdope-gematria",
|
||||||
|
"default_branch": "main",
|
||||||
|
"public_route": "https://hyperstitionstud.io/archive/00-index-and-methodology.md",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "technocapital-singularity-zoology",
|
||||||
|
"aliases": ("technocapital-singularity-zoology",),
|
||||||
|
"gitea_slug": "technocapital-singularity-zoology",
|
||||||
|
"default_branch": "main",
|
||||||
|
"public_route": "https://hyperstitionstud.io/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "encyclopedia-knowledge-graph",
|
||||||
|
"aliases": ("encyclopedia-knowledge-graph",),
|
||||||
|
"gitea_slug": "encyclopedia-knowledge-graph",
|
||||||
|
"default_branch": "main",
|
||||||
|
"public_route": "https://hyperstitionstud.io/graph/index.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "haiperdohp-jemaytreeah",
|
||||||
|
"aliases": ("haiperdohp-jemaytreeah",),
|
||||||
|
"gitea_slug": "haiperdohp-jemaytreeah",
|
||||||
|
"default_branch": "main",
|
||||||
|
"public_route": "https://hyperstitionstud.io/calc/index.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "hyperdope-ci-build",
|
||||||
|
"aliases": ("hyperdope-ci-build", "ingglish-hyperdope-ci"),
|
||||||
|
"gitea_slug": "ingglish-hyperdope-ci",
|
||||||
|
"default_branch": "feat/ingglish-aq-corpus",
|
||||||
|
"public_route": "https://hyperstitionstud.io/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_workspace_repo_dir(ws_root: Path | str, repo_key: str) -> Path:
|
||||||
|
"""
|
||||||
|
Resolve a canonical repository directory under `ws_root`, transparently handling
|
||||||
|
aliases (`hyperdope-ci-build` vs `ingglish-hyperdope-ci`) and Gitea slugs.
|
||||||
|
"""
|
||||||
|
root = Path(ws_root)
|
||||||
|
cand = root / repo_key
|
||||||
|
if cand.is_dir():
|
||||||
|
return cand
|
||||||
|
for spec in CANONICAL_SIX_REPOS:
|
||||||
|
if repo_key == spec["key"] or repo_key == spec["gitea_slug"] or repo_key in spec["aliases"]:
|
||||||
|
for name in (spec["key"], *spec["aliases"], spec["gitea_slug"]):
|
||||||
|
alt = root / name
|
||||||
|
if alt.is_dir():
|
||||||
|
return alt
|
||||||
|
return root / spec["key"]
|
||||||
|
return cand
|
||||||
|
|
||||||
|
|
||||||
|
def normalize_workspace_relpath(p: Path | str, workspace_root: str | Path | None = None) -> str:
|
||||||
|
"""
|
||||||
|
Normalize a workspace path so paths under `workspace_root` serialize deterministically
|
||||||
|
as `/workspace/...` regardless of host checkout directory.
|
||||||
|
"""
|
||||||
|
if workspace_root is not None:
|
||||||
|
ws_res = str(Path(workspace_root).resolve())
|
||||||
|
else:
|
||||||
|
cfg = load_workspace_config(workspace_root=None)
|
||||||
|
ws_res = str(cfg.workspace_root.resolve())
|
||||||
|
s = str(Path(p).resolve())
|
||||||
|
if s == ws_res:
|
||||||
|
return "/workspace"
|
||||||
|
if s.startswith(ws_res + "/"):
|
||||||
|
return "/workspace" + s[len(ws_res) :]
|
||||||
|
return str(p)
|
||||||
|
|
||||||
|
|
||||||
|
def run_git_stdout(
|
||||||
|
repo_dir: Path,
|
||||||
|
args: list[str],
|
||||||
|
*,
|
||||||
|
strip_leading: bool = True,
|
||||||
|
timeout: float = 5.0,
|
||||||
|
) -> str:
|
||||||
|
"""
|
||||||
|
Execute `git -C <repo_dir> ...` and return stdout cleanly (or `""` on non-repo/error).
|
||||||
|
When `strip_leading=False`, preserves leading whitespace (e.g., for `git status --porcelain`).
|
||||||
|
"""
|
||||||
|
rdir = Path(repo_dir)
|
||||||
|
if not (rdir / ".git").exists():
|
||||||
|
return ""
|
||||||
|
try:
|
||||||
|
res = subprocess.run(
|
||||||
|
["git", "-C", str(rdir), *args],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
timeout=timeout,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
if res.returncode == 0:
|
||||||
|
return res.stdout.strip() if strip_leading else res.stdout.rstrip("\r\n")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=64)
|
||||||
|
def _count_lines_by_stat(resolved_path_str: str, st_mtime_ns: int, st_size: int) -> int:
|
||||||
|
_ = (st_mtime_ns, st_size)
|
||||||
|
with Path(resolved_path_str).open("rb") as fh:
|
||||||
|
data = fh.read()
|
||||||
|
if not data:
|
||||||
|
return 0
|
||||||
|
nl_count = data.count(b"\n")
|
||||||
|
return nl_count if data.endswith(b"\n") else nl_count + 1
|
||||||
|
|
||||||
|
|
||||||
|
def count_file_lines_cached(path: str | Path) -> int:
|
||||||
|
"""
|
||||||
|
Count lines in a file cached by `(str(resolved_path), st_mtime_ns, st_size)`.
|
||||||
|
Automatically invalidates when `st_mtime_ns` or `st_size` changes on disk.
|
||||||
|
"""
|
||||||
|
p = Path(path).resolve()
|
||||||
|
st = p.stat()
|
||||||
|
return _count_lines_by_stat(str(p), st.st_mtime_ns, st.st_size)
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=64)
|
||||||
|
def _parse_json_by_stat(resolved_path_str: str, st_mtime_ns: int, st_size: int) -> Any:
|
||||||
|
_ = (st_mtime_ns, st_size)
|
||||||
|
return json.loads(Path(resolved_path_str).read_text(encoding="utf-8"))
|
||||||
|
|
||||||
|
|
||||||
|
def load_json_cached(path: str | Path, *, copy_result: bool = True) -> Any:
|
||||||
|
"""
|
||||||
|
Load and parse a UTF-8 JSON file cached by `(resolved_path_str, st_mtime_ns, st_size)`.
|
||||||
|
Automatically invalidates the instant `st_mtime_ns` or `st_size` changes on disk.
|
||||||
|
"""
|
||||||
|
p = Path(path).resolve()
|
||||||
|
st = p.stat()
|
||||||
|
parsed = _parse_json_by_stat(str(p), st.st_mtime_ns, st.st_size)
|
||||||
|
return copy.deepcopy(parsed) if copy_result else parsed
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class WorkspaceConfig:
|
class WorkspaceConfig:
|
||||||
schema_version: str = "1.2.0"
|
schema_version: str = _PKG_VERSION
|
||||||
namespace_urn: str = "urn:io:hyperstitionstud"
|
namespace_urn: str = "urn:io:hyperstitionstud"
|
||||||
workspace_root: Path = WORKSPACE_ROOT
|
workspace_root: Path = WORKSPACE_ROOT
|
||||||
paths: dict[str, Path] = field(default_factory=dict)
|
paths: dict[str, Path] = field(default_factory=dict)
|
||||||
@@ -30,23 +185,26 @@ class WorkspaceConfig:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def core_dir(self) -> Path:
|
def core_dir(self) -> Path:
|
||||||
return self.paths.get("core_dir", self.workspace_root / "hyperstitionstudio-core")
|
return self.paths.get("core_dir", resolve_workspace_repo_dir(self.workspace_root, "hyperstitionstudio-core"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def archive_dir(self) -> Path:
|
def archive_dir(self) -> Path:
|
||||||
return self.paths.get("archive_dir", self.workspace_root / "ingglish-hyperdope-gematria")
|
return self.paths.get("archive_dir", resolve_workspace_repo_dir(self.workspace_root, "ingglish-hyperdope-gematria"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def zoology_dir(self) -> Path:
|
def zoology_dir(self) -> Path:
|
||||||
return self.paths.get("zoology_dir", self.workspace_root / "technocapital-singularity-zoology")
|
return self.paths.get("zoology_dir", resolve_workspace_repo_dir(self.workspace_root, "technocapital-singularity-zoology"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def knowledge_graph_dir(self) -> Path:
|
def knowledge_graph_dir(self) -> Path:
|
||||||
return self.paths.get("knowledge_graph_dir", self.workspace_root / "encyclopedia-knowledge-graph")
|
return self.paths.get("knowledge_graph_dir", resolve_workspace_repo_dir(self.workspace_root, "encyclopedia-knowledge-graph"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ci_build_dir(self) -> Path:
|
def ci_build_dir(self) -> Path:
|
||||||
return self.paths.get("ci_build_dir", self.workspace_root / "hyperstition-ci-build")
|
cand = self.paths.get("ci_build_dir") or self.paths.get("ci_repo_dir")
|
||||||
|
if cand is not None and cand.is_dir():
|
||||||
|
return cand
|
||||||
|
return resolve_workspace_repo_dir(self.workspace_root, "hyperdope-ci-build")
|
||||||
|
|
||||||
|
|
||||||
def _rebase_path(raw_path: str | Path, ws_root: Path) -> Path:
|
def _rebase_path(raw_path: str | Path, ws_root: Path) -> Path:
|
||||||
@@ -85,20 +243,23 @@ def load_workspace_config(
|
|||||||
|
|
||||||
chosen: Path | None = None
|
chosen: Path | None = None
|
||||||
for c in candidates:
|
for c in candidates:
|
||||||
|
try:
|
||||||
if c.is_file():
|
if c.is_file():
|
||||||
chosen = c
|
chosen = c
|
||||||
break
|
break
|
||||||
|
except OSError:
|
||||||
|
continue
|
||||||
|
|
||||||
if chosen is not None and workspace_root is None:
|
if chosen is not None and workspace_root is None:
|
||||||
ws_root = chosen.resolve().parent
|
ws_root = chosen.resolve().parent
|
||||||
|
|
||||||
default_paths = {
|
default_paths = {
|
||||||
"core_dir": ws_root / "hyperstitionstudio-core",
|
"core_dir": resolve_workspace_repo_dir(ws_root, "hyperstitionstudio-core"),
|
||||||
"archive_dir": ws_root / "ingglish-hyperdope-gematria",
|
"archive_dir": resolve_workspace_repo_dir(ws_root, "ingglish-hyperdope-gematria"),
|
||||||
"zoology_dir": ws_root / "technocapital-singularity-zoology",
|
"zoology_dir": resolve_workspace_repo_dir(ws_root, "technocapital-singularity-zoology"),
|
||||||
"knowledge_graph_dir": ws_root / "encyclopedia-knowledge-graph",
|
"knowledge_graph_dir": resolve_workspace_repo_dir(ws_root, "encyclopedia-knowledge-graph"),
|
||||||
"ci_build_dir": ws_root / "hyperdope-ci-build",
|
"ci_build_dir": resolve_workspace_repo_dir(ws_root, "hyperdope-ci-build"),
|
||||||
"gematria_js_dir": ws_root / "haiperdohp-jemaytreeah",
|
"gematria_js_dir": resolve_workspace_repo_dir(ws_root, "haiperdohp-jemaytreeah"),
|
||||||
"memes_dir": ws_root / "memes",
|
"memes_dir": ws_root / "memes",
|
||||||
}
|
}
|
||||||
default_ro = [
|
default_ro = [
|
||||||
@@ -123,11 +284,13 @@ def load_workspace_config(
|
|||||||
raw_cit = raw.get("citations", {}).get("path_mounts", {})
|
raw_cit = raw.get("citations", {}).get("path_mounts", {})
|
||||||
|
|
||||||
resolved_paths = {k: _rebase_path(v, ws_root) for k, v in raw_paths.items()} if raw_paths else default_paths
|
resolved_paths = {k: _rebase_path(v, ws_root) for k, v in raw_paths.items()} if raw_paths else default_paths
|
||||||
|
if "ci_build_dir" in resolved_paths and not resolved_paths["ci_build_dir"].is_dir():
|
||||||
|
resolved_paths["ci_build_dir"] = resolve_workspace_repo_dir(ws_root, "hyperdope-ci-build")
|
||||||
resolved_ro = [_rebase_path(p, ws_root) for p in raw_iso.get("read_only_files", [])] if raw_iso.get("read_only_files") else default_ro
|
resolved_ro = [_rebase_path(p, ws_root) for p in raw_iso.get("read_only_files", [])] if raw_iso.get("read_only_files") else default_ro
|
||||||
resolved_mounts = {str(_rebase_path(k, ws_root)): str(v) for k, v in raw_cit.items()}
|
resolved_mounts = {str(_rebase_path(k, ws_root)): str(v) for k, v in raw_cit.items()}
|
||||||
|
|
||||||
return WorkspaceConfig(
|
return WorkspaceConfig(
|
||||||
schema_version=str(raw.get("schema_version", "1.2.0")),
|
schema_version=str(raw.get("schema_version", _PKG_VERSION)),
|
||||||
namespace_urn=str(raw.get("namespace_urn", "urn:io:hyperstitionstud")),
|
namespace_urn=str(raw.get("namespace_urn", "urn:io:hyperstitionstud")),
|
||||||
workspace_root=ws_root,
|
workspace_root=ws_root,
|
||||||
paths=resolved_paths,
|
paths=resolved_paths,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
|
|||||||
sys.path.insert(0, str(_SRC_DIR))
|
sys.path.insert(0, str(_SRC_DIR))
|
||||||
|
|
||||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
||||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config # noqa: E402
|
||||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
|
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
|
||||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1 # noqa: E402
|
from hyperstitionstud_io.ipld import compute_dag_json_cidv1 # noqa: E402
|
||||||
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle # noqa: E402
|
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle # noqa: E402
|
||||||
@@ -177,6 +177,8 @@ CREATE TABLE IF NOT EXISTS api_endpoint_rollups (
|
|||||||
method TEXT NOT NULL,
|
method TEXT NOT NULL,
|
||||||
endpoint_pattern TEXT NOT NULL,
|
endpoint_pattern TEXT NOT NULL,
|
||||||
total_requests INTEGER NOT NULL DEFAULT 0,
|
total_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
|
external_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
|
internal_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
status_2xx INTEGER NOT NULL DEFAULT 0,
|
status_2xx INTEGER NOT NULL DEFAULT 0,
|
||||||
status_304 INTEGER NOT NULL DEFAULT 0,
|
status_304 INTEGER NOT NULL DEFAULT 0,
|
||||||
status_4xx INTEGER NOT NULL DEFAULT 0,
|
status_4xx INTEGER NOT NULL DEFAULT 0,
|
||||||
@@ -193,7 +195,8 @@ CREATE TABLE IF NOT EXISTS api_audit_ringbuffer (
|
|||||||
endpoint TEXT NOT NULL,
|
endpoint TEXT NOT NULL,
|
||||||
status_code INTEGER NOT NULL,
|
status_code INTEGER NOT NULL,
|
||||||
latency_us INTEGER NOT NULL,
|
latency_us INTEGER NOT NULL,
|
||||||
isolation_ok INTEGER NOT NULL
|
isolation_ok INTEGER NOT NULL,
|
||||||
|
traffic_source TEXT NOT NULL DEFAULT 'internal_test'
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TRIGGER IF NOT EXISTS trg_prune_audit_ringbuffer
|
CREATE TRIGGER IF NOT EXISTS trg_prune_audit_ringbuffer
|
||||||
@@ -202,8 +205,68 @@ BEGIN
|
|||||||
DELETE FROM api_audit_ringbuffer
|
DELETE FROM api_audit_ringbuffer
|
||||||
WHERE event_id <= (NEW.event_id - 200);
|
WHERE event_id <= (NEW.event_id - 200);
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS api_parameter_rollups (
|
||||||
|
param_category TEXT NOT NULL,
|
||||||
|
param_value TEXT NOT NULL,
|
||||||
|
total_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
|
external_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
|
internal_requests INTEGER NOT NULL DEFAULT 0,
|
||||||
|
last_called_utc TEXT NOT NULL,
|
||||||
|
PRIMARY KEY (param_category, param_value)
|
||||||
|
) WITHOUT ROWID;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS static_route_rollups (
|
||||||
|
route_prefix TEXT PRIMARY KEY,
|
||||||
|
total_hits INTEGER NOT NULL DEFAULT 0,
|
||||||
|
last_ingested_utc TEXT NOT NULL
|
||||||
|
) WITHOUT ROWID;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
ALLOWED_TELEMETRY_PARAM_ENUMS: dict[str, set[str]] = {
|
||||||
|
"symbol": {
|
||||||
|
"NVDA", "TSM", "ASML", "MSFT", "GOOGL", "META", "AMZN", "AAPL",
|
||||||
|
"PLTR", "AMD", "ARM", "AVGO", "ORCL", "TSLA", "COIN", "MSTR",
|
||||||
|
"IBIT", "BTC-USD", "ETH-USD", "SOL-USD", "SPY", "QQQ", "VIX", "ANTHR-PVT",
|
||||||
|
},
|
||||||
|
"lens": {
|
||||||
|
"tierzoo", "pokedex_scanner", "corporate_board",
|
||||||
|
"fund_manager", "fantasy_football", "schizoanalytic",
|
||||||
|
},
|
||||||
|
"lang": {"guile", "ts", "rust"},
|
||||||
|
"unit_filter": {"E0", "E1", "E2", "E3", "E4", "E5", "M0", "M1", "M2", "M3", "M4", "M5"},
|
||||||
|
"surface": {"home", "calc", "quant", "graph", "learn", "engineering", "math", "donate"},
|
||||||
|
"donate_from": {"home", "calc", "quant", "graph", "learn", "engineering", "math"},
|
||||||
|
"donate_copy": {"BTC", "XMR"},
|
||||||
|
"export_action": {
|
||||||
|
"learn_state_json", "quant_csv", "quant_json", "quant_tradingview", "graph_png",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
CANONICAL_STATIC_ROUTE_PREFIXES: tuple[str, ...] = (
|
||||||
|
"/zoology/proposal-fund-manager-novel-investment-discovery.pdf",
|
||||||
|
"/zoology/proposal-corporate-board-technocapital-allocation.pdf",
|
||||||
|
"/zoology/proposal-fantasy-football-technocapital-roster-engine.pdf",
|
||||||
|
"/zoology/proposal-fund-manager-standard-english-aq.pdf",
|
||||||
|
"/zoology/proposal-corporate-board-standard-english-aq.pdf",
|
||||||
|
"/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
|
||||||
|
"/zoology/tier-list-technocapital-assemblage-builds.pdf",
|
||||||
|
"/zoology/tier-list-technocapital-assemblage-builds.png",
|
||||||
|
"/zoology/technocapital-singularity-zoology-comprehensive-glossary.pdf",
|
||||||
|
"/zoology/encyclopedia-of-technocapital-singularity-zoology-overview-and-manifest.pdf",
|
||||||
|
"/encyclopedia/",
|
||||||
|
"/calc/",
|
||||||
|
"/quant/",
|
||||||
|
"/graph/",
|
||||||
|
"/learn/",
|
||||||
|
"/engineering/",
|
||||||
|
"/math/",
|
||||||
|
"/donate/",
|
||||||
|
"/archive/",
|
||||||
|
"/ci/",
|
||||||
|
"/",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_default_catalog_db_path() -> Path:
|
def get_default_catalog_db_path() -> Path:
|
||||||
env_p = os.environ.get("HYPERSTITION_CATALOG_DB_PATH")
|
env_p = os.environ.get("HYPERSTITION_CATALOG_DB_PATH")
|
||||||
@@ -340,7 +403,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
|||||||
|
|
||||||
# 2. Glossary Entries & Bilingual Specimens
|
# 2. Glossary Entries & Bilingual Specimens
|
||||||
gl_path = cfg.zoology_dir / "taxonomy" / "glossary-registry.json"
|
gl_path = cfg.zoology_dir / "taxonomy" / "glossary-registry.json"
|
||||||
gl_data = json.loads(gl_path.read_text(encoding="utf-8"))
|
gl_data = load_json_cached(gl_path, copy_result=False)
|
||||||
seen_terms: set[str] = set()
|
seen_terms: set[str] = set()
|
||||||
glossary_rows = 0
|
glossary_rows = 0
|
||||||
|
|
||||||
@@ -437,7 +500,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
|||||||
|
|
||||||
# 3. Knowledge Graph Nodes & Edges
|
# 3. Knowledge Graph Nodes & Edges
|
||||||
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
||||||
kg_data = json.loads(kg_path.read_text(encoding="utf-8"))
|
kg_data = load_json_cached(kg_path, copy_result=False)
|
||||||
deg_map: dict[str, int] = {}
|
deg_map: dict[str, int] = {}
|
||||||
edge_rows = 0
|
edge_rows = 0
|
||||||
for e in kg_data.get("edges", []):
|
for e in kg_data.get("edges", []):
|
||||||
@@ -556,7 +619,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
|||||||
# 5. Periodic Quantitative Financial Time-Series Bars (24 Tickers x 30 UTC Days = 720 bars)
|
# 5. Periodic Quantitative Financial Time-Series Bars (24 Tickers x 30 UTC Days = 720 bars)
|
||||||
ts_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
ts_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
||||||
if ts_path.is_file():
|
if ts_path.is_file():
|
||||||
ts_bundle = json.loads(ts_path.read_text(encoding="utf-8"))
|
ts_bundle = load_json_cached(ts_path, copy_result=False)
|
||||||
else:
|
else:
|
||||||
ts_bundle = build_quant_timeseries_bundle(write_files=False)
|
ts_bundle = build_quant_timeseries_bundle(write_files=False)
|
||||||
|
|
||||||
@@ -660,6 +723,8 @@ def _open_readonly_catalog(db_path: Path | str | None = None) -> sqlite3.Connect
|
|||||||
conn = sqlite3.connect(uri, uri=True)
|
conn = sqlite3.connect(uri, uri=True)
|
||||||
conn.row_factory = sqlite3.Row
|
conn.row_factory = sqlite3.Row
|
||||||
conn.execute("PRAGMA query_only = ON;")
|
conn.execute("PRAGMA query_only = ON;")
|
||||||
|
conn.execute("PRAGMA temp_store = MEMORY;")
|
||||||
|
conn.execute("PRAGMA cache_size = -8000;")
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
|
|
||||||
@@ -818,6 +883,44 @@ def query_timeseries_bars(
|
|||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_single_layer_gzip_file(gz_path: Path | str) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Inspect `gz_path` and ensure its decompressed stream is compressed strictly once (`1x`).
|
||||||
|
If the decompressed payload itself begins with a gzip (`\\x1f\\x8b`) or xz (`\\xfd7zXZ\\x00`)
|
||||||
|
magic header, iteratively peel outer compression layers in-place until the inner stream
|
||||||
|
is the raw uncompressed payload (e.g., `"SQLite format 3\\x00"` or POSIX `ustar`).
|
||||||
|
"""
|
||||||
|
p = Path(gz_path)
|
||||||
|
if not p.is_file():
|
||||||
|
return {"path": str(p), "peeled_layers": 0, "single_layer_verified": False}
|
||||||
|
peeled = 0
|
||||||
|
while True:
|
||||||
|
with gzip.open(p, "rb") as f_gz:
|
||||||
|
head = f_gz.read(6)
|
||||||
|
if head.startswith(b"\x1f\x8b"):
|
||||||
|
f_gz.seek(0)
|
||||||
|
inner_bytes = f_gz.read()
|
||||||
|
elif head.startswith(b"\xfd7zXZ\x00"):
|
||||||
|
import lzma
|
||||||
|
|
||||||
|
f_gz.seek(0)
|
||||||
|
raw_unwrapped = lzma.decompress(f_gz.read())
|
||||||
|
tmp_p = p.with_suffix(p.suffix + f".peel.{os.getpid()}")
|
||||||
|
with open(tmp_p, "wb") as f_raw:
|
||||||
|
with gzip.GzipFile(filename="", mode="wb", fileobj=f_raw, compresslevel=9, mtime=0) as gz_out:
|
||||||
|
gz_out.write(raw_unwrapped)
|
||||||
|
os.replace(tmp_p, p)
|
||||||
|
peeled += 1
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
tmp_p = p.with_suffix(p.suffix + f".peel.{os.getpid()}")
|
||||||
|
tmp_p.write_bytes(inner_bytes)
|
||||||
|
os.replace(tmp_p, p)
|
||||||
|
peeled += 1
|
||||||
|
return {"path": str(p), "peeled_layers": peeled, "single_layer_verified": True}
|
||||||
|
|
||||||
|
|
||||||
def _rotate_compressed_archives(base_db_path: Path, rotate_keep: int = 12) -> Path:
|
def _rotate_compressed_archives(base_db_path: Path, rotate_keep: int = 12) -> Path:
|
||||||
"""
|
"""
|
||||||
Shift existing `<base_db_path>.{1..K-1}.gz` archives up by 1 and return `<base_db_path>.1.gz`.
|
Shift existing `<base_db_path>.{1..K-1}.gz` archives up by 1 and return `<base_db_path>.1.gz`.
|
||||||
@@ -830,6 +933,7 @@ def _rotate_compressed_archives(base_db_path: Path, rotate_keep: int = 12) -> Pa
|
|||||||
src = Path(f"{base_db_path}.{idx}.gz")
|
src = Path(f"{base_db_path}.{idx}.gz")
|
||||||
dst = Path(f"{base_db_path}.{idx + 1}.gz")
|
dst = Path(f"{base_db_path}.{idx + 1}.gz")
|
||||||
if src.exists():
|
if src.exists():
|
||||||
|
ensure_single_layer_gzip_file(src)
|
||||||
src.replace(dst)
|
src.replace(dst)
|
||||||
return Path(f"{base_db_path}.1.gz")
|
return Path(f"{base_db_path}.1.gz")
|
||||||
|
|
||||||
@@ -908,6 +1012,7 @@ def truncate_telemetry_db_quiescent(
|
|||||||
gz_target = _rotate_compressed_archives(t_path, rotate_keep=rotate_keep)
|
gz_target = _rotate_compressed_archives(t_path, rotate_keep=rotate_keep)
|
||||||
with open(snap_tmp, "rb") as f_in, gzip.open(gz_target, "wb", compresslevel=9) as f_out:
|
with open(snap_tmp, "rb") as f_in, gzip.open(gz_target, "wb", compresslevel=9) as f_out:
|
||||||
f_out.write(f_in.read())
|
f_out.write(f_in.read())
|
||||||
|
ensure_single_layer_gzip_file(gz_target)
|
||||||
compressed_archive_path = str(gz_target)
|
compressed_archive_path = str(gz_target)
|
||||||
compressed_archive_bytes = gz_target.stat().st_size
|
compressed_archive_bytes = gz_target.stat().st_size
|
||||||
finally:
|
finally:
|
||||||
@@ -919,6 +1024,8 @@ def truncate_telemetry_db_quiescent(
|
|||||||
try:
|
try:
|
||||||
conn.execute("DELETE FROM api_audit_ringbuffer;")
|
conn.execute("DELETE FROM api_audit_ringbuffer;")
|
||||||
conn.execute("DELETE FROM api_endpoint_rollups;")
|
conn.execute("DELETE FROM api_endpoint_rollups;")
|
||||||
|
conn.execute("DELETE FROM api_parameter_rollups;")
|
||||||
|
conn.execute("DELETE FROM static_route_rollups;")
|
||||||
conn.execute("DELETE FROM sqlite_sequence WHERE name = 'api_audit_ringbuffer';")
|
conn.execute("DELETE FROM sqlite_sequence WHERE name = 'api_audit_ringbuffer';")
|
||||||
conn.execute("COMMIT;")
|
conn.execute("COMMIT;")
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -948,6 +1055,43 @@ def truncate_telemetry_db_quiescent(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _ensure_telemetry_columns(conn: sqlite3.Connection) -> None:
|
||||||
|
"""
|
||||||
|
Idempotently migrate existing `api_endpoint_rollups` and `api_audit_ringbuffer` tables
|
||||||
|
so older databases gain `external_requests`, `internal_requests`, and `traffic_source`.
|
||||||
|
"""
|
||||||
|
rollup_cols = {r[1] for r in conn.execute("PRAGMA table_info(api_endpoint_rollups)").fetchall()}
|
||||||
|
if "external_requests" not in rollup_cols:
|
||||||
|
conn.execute("ALTER TABLE api_endpoint_rollups ADD COLUMN external_requests INTEGER NOT NULL DEFAULT 0;")
|
||||||
|
if "internal_requests" not in rollup_cols:
|
||||||
|
conn.execute("ALTER TABLE api_endpoint_rollups ADD COLUMN internal_requests INTEGER NOT NULL DEFAULT 0;")
|
||||||
|
conn.execute("UPDATE api_endpoint_rollups SET internal_requests = total_requests WHERE external_requests = 0 AND internal_requests = 0;")
|
||||||
|
rb_cols = {r[1] for r in conn.execute("PRAGMA table_info(api_audit_ringbuffer)").fetchall()}
|
||||||
|
if "traffic_source" not in rb_cols:
|
||||||
|
conn.execute("ALTER TABLE api_audit_ringbuffer ADD COLUMN traffic_source TEXT NOT NULL DEFAULT 'internal_test';")
|
||||||
|
|
||||||
|
|
||||||
|
_INITIALIZED_TELEMETRY_INODES: set[tuple[str, int, int]] = set()
|
||||||
|
|
||||||
|
|
||||||
|
def _ensure_telemetry_schema_initialized(conn: sqlite3.Connection, db_path: Path) -> None:
|
||||||
|
try:
|
||||||
|
st = db_path.stat()
|
||||||
|
inode_key = (str(db_path.resolve()), st.st_dev, st.st_ino)
|
||||||
|
except OSError:
|
||||||
|
inode_key = None
|
||||||
|
if inode_key is not None and inode_key in _INITIALIZED_TELEMETRY_INODES and st.st_size > 0:
|
||||||
|
return
|
||||||
|
conn.executescript(TELEMETRY_SCHEMA_SQL)
|
||||||
|
_ensure_telemetry_columns(conn)
|
||||||
|
if inode_key is not None:
|
||||||
|
try:
|
||||||
|
st_after = db_path.stat()
|
||||||
|
_INITIALIZED_TELEMETRY_INODES.add((str(db_path.resolve()), st_after.st_dev, st_after.st_ino))
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def record_api_telemetry(
|
def record_api_telemetry(
|
||||||
protocol: str,
|
protocol: str,
|
||||||
method: str,
|
method: str,
|
||||||
@@ -957,10 +1101,14 @@ def record_api_telemetry(
|
|||||||
isolation_ok: bool = True,
|
isolation_ok: bool = True,
|
||||||
telemetry_db_path: Path | str | None = None,
|
telemetry_db_path: Path | str | None = None,
|
||||||
max_bytes: int | str | None = None,
|
max_bytes: int | str | None = None,
|
||||||
|
traffic_source: str = "internal_test",
|
||||||
|
param_events: dict[str, str] | None = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Record a privacy-preserving REST (`/api/v1/*`) or MCP (`/mcp`) call in `api-telemetry.db`,
|
Record a privacy-preserving REST (`/api/v1/*`) or MCP (`/mcp`) call in `api-telemetry.db`,
|
||||||
and automatically perform a quiescent truncation if the database reaches `max_bytes` (default `100 MB`).
|
separating `external_production` traffic from `internal_test` probes, recording allowlisted
|
||||||
|
closed-set enum parameters in `api_parameter_rollups` (`Strategy 2B`), and automatically
|
||||||
|
performing a quiescent truncation if the database reaches `max_bytes` (default `100 MB`).
|
||||||
"""
|
"""
|
||||||
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
||||||
limit_bytes = parse_size_spec_bytes(max_bytes, default_bytes=DEFAULT_MAX_TELEMETRY_BYTES)
|
limit_bytes = parse_size_spec_bytes(max_bytes, default_bytes=DEFAULT_MAX_TELEMETRY_BYTES)
|
||||||
@@ -969,11 +1117,32 @@ def record_api_telemetry(
|
|||||||
lat = max(0, int(latency_us))
|
lat = max(0, int(latency_us))
|
||||||
iso_int = 1 if isolation_ok else 0
|
iso_int = 1 if isolation_ok else 0
|
||||||
|
|
||||||
|
src_norm = "external_production" if traffic_source == "external_production" else "internal_test"
|
||||||
|
ext_inc = 1 if src_norm == "external_production" else 0
|
||||||
|
int_inc = 1 if src_norm == "internal_test" else 0
|
||||||
|
|
||||||
s_2xx = 1 if 200 <= code < 300 else 0
|
s_2xx = 1 if 200 <= code < 300 else 0
|
||||||
s_304 = 1 if code == 304 else 0
|
s_304 = 1 if code == 304 else 0
|
||||||
s_4xx = 1 if 400 <= code < 500 else 0
|
s_4xx = 1 if 400 <= code < 500 else 0
|
||||||
s_5xx = 1 if code >= 500 else 0
|
s_5xx = 1 if code >= 500 else 0
|
||||||
|
|
||||||
|
valid_params: list[tuple[str, str]] = []
|
||||||
|
if param_events:
|
||||||
|
for raw_cat, raw_val in param_events.items():
|
||||||
|
if not raw_val:
|
||||||
|
continue
|
||||||
|
cat = str(raw_cat).strip()
|
||||||
|
allowed_set = ALLOWED_TELEMETRY_PARAM_ENUMS.get(cat)
|
||||||
|
if not allowed_set:
|
||||||
|
continue
|
||||||
|
val_cand = str(raw_val).strip()
|
||||||
|
if cat in ("symbol", "unit_filter", "donate_copy"):
|
||||||
|
val_cand = val_cand.upper()
|
||||||
|
else:
|
||||||
|
val_cand = val_cand.lower()
|
||||||
|
if val_cand in allowed_set:
|
||||||
|
valid_params.append((cat, val_cand))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
t_path.parent.mkdir(parents=True, exist_ok=True)
|
t_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
if _sqlite_total_disk_bytes(t_path) >= limit_bytes:
|
if _sqlite_total_disk_bytes(t_path) >= limit_bytes:
|
||||||
@@ -982,18 +1151,21 @@ def record_api_telemetry(
|
|||||||
conn = sqlite3.connect(str(t_path), timeout=30.0, isolation_level=None)
|
conn = sqlite3.connect(str(t_path), timeout=30.0, isolation_level=None)
|
||||||
try:
|
try:
|
||||||
conn.execute("PRAGMA busy_timeout = 30000;")
|
conn.execute("PRAGMA busy_timeout = 30000;")
|
||||||
conn.executescript(TELEMETRY_SCHEMA_SQL)
|
_ensure_telemetry_schema_initialized(conn, t_path)
|
||||||
conn.execute("BEGIN IMMEDIATE;")
|
conn.execute("BEGIN IMMEDIATE;")
|
||||||
try:
|
try:
|
||||||
conn.execute(
|
conn.execute(
|
||||||
"""
|
"""
|
||||||
INSERT INTO api_endpoint_rollups (
|
INSERT INTO api_endpoint_rollups (
|
||||||
protocol, method, endpoint_pattern, total_requests,
|
protocol, method, endpoint_pattern, total_requests,
|
||||||
|
external_requests, internal_requests,
|
||||||
status_2xx, status_304, status_4xx, status_5xx,
|
status_2xx, status_304, status_4xx, status_5xx,
|
||||||
total_latency_us, max_latency_us, last_called_utc
|
total_latency_us, max_latency_us, last_called_utc
|
||||||
) VALUES (?, ?, ?, 1, ?, ?, ?, ?, ?, ?, ?)
|
) VALUES (?, ?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
ON CONFLICT(protocol, method, endpoint_pattern) DO UPDATE SET
|
ON CONFLICT(protocol, method, endpoint_pattern) DO UPDATE SET
|
||||||
total_requests = total_requests + 1,
|
total_requests = total_requests + 1,
|
||||||
|
external_requests = external_requests + excluded.external_requests,
|
||||||
|
internal_requests = internal_requests + excluded.internal_requests,
|
||||||
status_2xx = status_2xx + excluded.status_2xx,
|
status_2xx = status_2xx + excluded.status_2xx,
|
||||||
status_304 = status_304 + excluded.status_304,
|
status_304 = status_304 + excluded.status_304,
|
||||||
status_4xx = status_4xx + excluded.status_4xx,
|
status_4xx = status_4xx + excluded.status_4xx,
|
||||||
@@ -1002,15 +1174,30 @@ def record_api_telemetry(
|
|||||||
max_latency_us = MAX(max_latency_us, excluded.max_latency_us),
|
max_latency_us = MAX(max_latency_us, excluded.max_latency_us),
|
||||||
last_called_utc = excluded.last_called_utc
|
last_called_utc = excluded.last_called_utc
|
||||||
""",
|
""",
|
||||||
(protocol, method, endpoint_pattern, s_2xx, s_304, s_4xx, s_5xx, lat, lat, now_utc),
|
(protocol, method, endpoint_pattern, ext_inc, int_inc, s_2xx, s_304, s_4xx, s_5xx, lat, lat, now_utc),
|
||||||
|
)
|
||||||
|
for p_cat, p_val in valid_params:
|
||||||
|
conn.execute(
|
||||||
|
"""
|
||||||
|
INSERT INTO api_parameter_rollups (
|
||||||
|
param_category, param_value, total_requests,
|
||||||
|
external_requests, internal_requests, last_called_utc
|
||||||
|
) VALUES (?, ?, 1, ?, ?, ?)
|
||||||
|
ON CONFLICT(param_category, param_value) DO UPDATE SET
|
||||||
|
total_requests = total_requests + 1,
|
||||||
|
external_requests = external_requests + excluded.external_requests,
|
||||||
|
internal_requests = internal_requests + excluded.internal_requests,
|
||||||
|
last_called_utc = excluded.last_called_utc
|
||||||
|
""",
|
||||||
|
(p_cat, p_val, ext_inc, int_inc, now_utc),
|
||||||
)
|
)
|
||||||
conn.execute(
|
conn.execute(
|
||||||
"""
|
"""
|
||||||
INSERT INTO api_audit_ringbuffer (
|
INSERT INTO api_audit_ringbuffer (
|
||||||
timestamp_utc, endpoint, status_code, latency_us, isolation_ok
|
timestamp_utc, endpoint, status_code, latency_us, isolation_ok, traffic_source
|
||||||
) VALUES (?, ?, ?, ?, ?)
|
) VALUES (?, ?, ?, ?, ?, ?)
|
||||||
""",
|
""",
|
||||||
(now_utc, f"{protocol}:{method} {endpoint_pattern}", code, lat, iso_int),
|
(now_utc, f"{protocol}:{method} {endpoint_pattern}", code, lat, iso_int, src_norm),
|
||||||
)
|
)
|
||||||
conn.execute("COMMIT;")
|
conn.execute("COMMIT;")
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -1025,18 +1212,26 @@ def record_api_telemetry(
|
|||||||
os.chmod(cand, 0o666)
|
os.chmod(cand, 0o666)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
return {"ok": True, "db_path": str(t_path)}
|
return {"ok": True, "db_path": str(t_path), "traffic_source": src_norm}
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return {"ok": False, "error": str(exc)}
|
return {"ok": False, "error": str(exc)}
|
||||||
|
|
||||||
|
|
||||||
|
MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE = 500
|
||||||
|
|
||||||
|
|
||||||
def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> dict[str, Any]:
|
def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> dict[str, Any]:
|
||||||
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
||||||
if not t_path.is_file():
|
if not t_path.is_file():
|
||||||
return {
|
return {
|
||||||
"db_path": str(t_path),
|
"db_path": str(t_path),
|
||||||
"total_requests": 0,
|
"total_requests": 0,
|
||||||
|
"external_production_requests": 0,
|
||||||
|
"internal_test_requests": 0,
|
||||||
|
"market_demand_confidence": "No data available",
|
||||||
"endpoints": [],
|
"endpoints": [],
|
||||||
|
"parameter_rollups": [],
|
||||||
|
"static_route_rollups": [],
|
||||||
"recent_audit_events": [],
|
"recent_audit_events": [],
|
||||||
"ringbuffer_count": 0,
|
"ringbuffer_count": 0,
|
||||||
"byte_size": 0,
|
"byte_size": 0,
|
||||||
@@ -1044,12 +1239,26 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
|
|||||||
conn = sqlite3.connect(str(t_path), timeout=30.0)
|
conn = sqlite3.connect(str(t_path), timeout=30.0)
|
||||||
conn.row_factory = sqlite3.Row
|
conn.row_factory = sqlite3.Row
|
||||||
try:
|
try:
|
||||||
|
conn.executescript(TELEMETRY_SCHEMA_SQL)
|
||||||
|
_ensure_telemetry_columns(conn)
|
||||||
rollups = [
|
rollups = [
|
||||||
dict(r)
|
dict(r)
|
||||||
for r in conn.execute(
|
for r in conn.execute(
|
||||||
"SELECT * FROM api_endpoint_rollups ORDER BY total_requests DESC, endpoint_pattern ASC"
|
"SELECT * FROM api_endpoint_rollups ORDER BY total_requests DESC, endpoint_pattern ASC"
|
||||||
).fetchall()
|
).fetchall()
|
||||||
]
|
]
|
||||||
|
param_rollups = [
|
||||||
|
dict(r)
|
||||||
|
for r in conn.execute(
|
||||||
|
"SELECT * FROM api_parameter_rollups ORDER BY total_requests DESC, param_category ASC, param_value ASC"
|
||||||
|
).fetchall()
|
||||||
|
]
|
||||||
|
static_rollups = [
|
||||||
|
dict(r)
|
||||||
|
for r in conn.execute(
|
||||||
|
"SELECT * FROM static_route_rollups ORDER BY total_hits DESC, route_prefix ASC"
|
||||||
|
).fetchall()
|
||||||
|
]
|
||||||
recent = [
|
recent = [
|
||||||
dict(r)
|
dict(r)
|
||||||
for r in conn.execute(
|
for r in conn.execute(
|
||||||
@@ -1058,10 +1267,21 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
|
|||||||
]
|
]
|
||||||
rb_cnt = conn.execute("SELECT COUNT(*) FROM api_audit_ringbuffer").fetchone()[0]
|
rb_cnt = conn.execute("SELECT COUNT(*) FROM api_audit_ringbuffer").fetchone()[0]
|
||||||
tot_reqs = sum(int(r["total_requests"]) for r in rollups)
|
tot_reqs = sum(int(r["total_requests"]) for r in rollups)
|
||||||
|
ext_reqs = sum(int(r.get("external_requests", 0)) for r in rollups)
|
||||||
|
int_reqs = sum(int(r.get("internal_requests", 0)) for r in rollups)
|
||||||
|
if ext_reqs < MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE:
|
||||||
|
confidence_status = "No data available"
|
||||||
|
else:
|
||||||
|
confidence_status = f"Sufficient external production sample (n={ext_reqs})"
|
||||||
return {
|
return {
|
||||||
"db_path": str(t_path),
|
"db_path": str(t_path),
|
||||||
"total_requests": tot_reqs,
|
"total_requests": tot_reqs,
|
||||||
|
"external_production_requests": ext_reqs,
|
||||||
|
"internal_test_requests": int_reqs,
|
||||||
|
"market_demand_confidence": confidence_status,
|
||||||
"endpoints": rollups,
|
"endpoints": rollups,
|
||||||
|
"parameter_rollups": param_rollups,
|
||||||
|
"static_route_rollups": static_rollups,
|
||||||
"recent_audit_events": recent,
|
"recent_audit_events": recent,
|
||||||
"ringbuffer_count": int(rb_cnt),
|
"ringbuffer_count": int(rb_cnt),
|
||||||
"byte_size": _sqlite_total_disk_bytes(t_path),
|
"byte_size": _sqlite_total_disk_bytes(t_path),
|
||||||
@@ -1070,6 +1290,179 @@ def get_api_telemetry_summary(telemetry_db_path: Path | str | None = None) -> di
|
|||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|
||||||
|
def get_longitudinal_telemetry_summary(
|
||||||
|
telemetry_db_path: Path | str | None = None,
|
||||||
|
max_generations: int = 12,
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Aggregate `api_endpoint_rollups`, `api_parameter_rollups`, and `static_route_rollups` across
|
||||||
|
both the active `api-telemetry.db` and up to `max_generations` rotated `.{1..K}.gz` snapshots
|
||||||
|
(`Strategy 2C`: `--telemetry-history`).
|
||||||
|
"""
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
||||||
|
endpoint_totals: dict[tuple[str, str, str], dict[str, Any]] = {}
|
||||||
|
param_totals: dict[tuple[str, str], dict[str, Any]] = {}
|
||||||
|
static_totals: dict[str, dict[str, Any]] = {}
|
||||||
|
generations_scanned: list[str] = []
|
||||||
|
|
||||||
|
def _merge_summary(s: dict[str, Any], label: str) -> None:
|
||||||
|
generations_scanned.append(label)
|
||||||
|
for ep in s.get("endpoints", []):
|
||||||
|
key = (ep["protocol"], ep["method"], ep["endpoint_pattern"])
|
||||||
|
cur = endpoint_totals.get(key)
|
||||||
|
if cur is None:
|
||||||
|
endpoint_totals[key] = dict(ep)
|
||||||
|
else:
|
||||||
|
for k_num in ("total_requests", "external_requests", "internal_requests", "status_2xx", "status_304", "status_4xx", "status_5xx", "total_latency_us"):
|
||||||
|
cur[k_num] = int(cur.get(k_num, 0)) + int(ep.get(k_num, 0))
|
||||||
|
cur["max_latency_us"] = max(int(cur.get("max_latency_us", 0)), int(ep.get("max_latency_us", 0)))
|
||||||
|
if str(ep.get("last_called_utc", "")) > str(cur.get("last_called_utc", "")):
|
||||||
|
cur["last_called_utc"] = ep["last_called_utc"]
|
||||||
|
for pr in s.get("parameter_rollups", []):
|
||||||
|
pkey = (pr["param_category"], pr["param_value"])
|
||||||
|
cur_p = param_totals.get(pkey)
|
||||||
|
if cur_p is None:
|
||||||
|
param_totals[pkey] = dict(pr)
|
||||||
|
else:
|
||||||
|
for k_num in ("total_requests", "external_requests", "internal_requests"):
|
||||||
|
cur_p[k_num] = int(cur_p.get(k_num, 0)) + int(pr.get(k_num, 0))
|
||||||
|
if str(pr.get("last_called_utc", "")) > str(cur_p.get("last_called_utc", "")):
|
||||||
|
cur_p["last_called_utc"] = pr["last_called_utc"]
|
||||||
|
for sr in s.get("static_route_rollups", []):
|
||||||
|
rpref = sr["route_prefix"]
|
||||||
|
cur_s = static_totals.get(rpref)
|
||||||
|
if cur_s is None:
|
||||||
|
static_totals[rpref] = dict(sr)
|
||||||
|
else:
|
||||||
|
cur_s["total_hits"] = int(cur_s.get("total_hits", 0)) + int(sr.get("total_hits", 0))
|
||||||
|
if str(sr.get("last_ingested_utc", "")) > str(cur_s.get("last_ingested_utc", "")):
|
||||||
|
cur_s["last_ingested_utc"] = sr["last_ingested_utc"]
|
||||||
|
|
||||||
|
if t_path.is_file():
|
||||||
|
_merge_summary(get_api_telemetry_summary(t_path), str(t_path.name))
|
||||||
|
|
||||||
|
for idx in range(1, max_generations + 1):
|
||||||
|
gz_p = Path(f"{t_path}.{idx}.gz")
|
||||||
|
if not gz_p.is_file():
|
||||||
|
continue
|
||||||
|
try:
|
||||||
|
with tempfile.NamedTemporaryFile(suffix=".db", delete=True) as tmp_f:
|
||||||
|
with gzip.open(gz_p, "rb") as f_in:
|
||||||
|
tmp_f.write(f_in.read())
|
||||||
|
tmp_f.flush()
|
||||||
|
_merge_summary(get_api_telemetry_summary(tmp_f.name), gz_p.name)
|
||||||
|
except Exception:
|
||||||
|
continue
|
||||||
|
|
||||||
|
tot_reqs = sum(int(v.get("total_requests", 0)) for v in endpoint_totals.values())
|
||||||
|
ext_reqs = sum(int(v.get("external_requests", 0)) for v in endpoint_totals.values())
|
||||||
|
int_reqs = sum(int(v.get("internal_requests", 0)) for v in endpoint_totals.values())
|
||||||
|
confidence_status = (
|
||||||
|
"No data available"
|
||||||
|
if ext_reqs < MIN_EXTERNAL_REQUESTS_FOR_CONFIDENCE
|
||||||
|
else f"Sufficient external production sample (n={ext_reqs})"
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
"base_db_path": str(t_path),
|
||||||
|
"generations_scanned": generations_scanned,
|
||||||
|
"generations_count": len(generations_scanned),
|
||||||
|
"total_requests": tot_reqs,
|
||||||
|
"external_production_requests": ext_reqs,
|
||||||
|
"internal_test_requests": int_reqs,
|
||||||
|
"market_demand_confidence": confidence_status,
|
||||||
|
"endpoints": sorted(endpoint_totals.values(), key=lambda x: (-int(x.get("total_requests", 0)), x["endpoint_pattern"])),
|
||||||
|
"parameter_rollups": sorted(param_totals.values(), key=lambda x: (-int(x.get("total_requests", 0)), x["param_category"], x["param_value"])),
|
||||||
|
"static_route_rollups": sorted(static_totals.values(), key=lambda x: (-int(x.get("total_hits", 0)), x["route_prefix"])),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def ingest_caddy_route_counts(
|
||||||
|
log_path: Path | str = "/var/log/caddy/hyperstition-access.json",
|
||||||
|
telemetry_db_path: Path | str | None = None,
|
||||||
|
truncate_log: bool = True,
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
"""
|
||||||
|
Ingest zero-IP Caddy JSON access log entries (`Strategy 3A`: `--ingest-caddy-route-counts`)
|
||||||
|
into `static_route_rollups` inside `api-telemetry.db`, mapping URIs onto `CANONICAL_STATIC_ROUTE_PREFIXES`
|
||||||
|
and discarding all client identifiers.
|
||||||
|
"""
|
||||||
|
l_path = Path(log_path)
|
||||||
|
t_path = Path(telemetry_db_path) if telemetry_db_path is not None else get_default_telemetry_db_path()
|
||||||
|
now_utc = dt.datetime.now(dt.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
if not l_path.is_file():
|
||||||
|
return {"ok": True, "log_path": str(l_path), "ingested_lines": 0, "matched_hits": 0, "status": "log_absent"}
|
||||||
|
|
||||||
|
counts_by_prefix: dict[str, int] = {}
|
||||||
|
lines_read = 0
|
||||||
|
for raw_ln in l_path.read_text(encoding="utf-8", errors="replace").splitlines():
|
||||||
|
ln = raw_ln.strip()
|
||||||
|
if not ln:
|
||||||
|
continue
|
||||||
|
lines_read += 1
|
||||||
|
try:
|
||||||
|
obj = json.loads(ln)
|
||||||
|
except Exception:
|
||||||
|
continue
|
||||||
|
status = int(obj.get("status", 0) or 0)
|
||||||
|
if status not in (200, 304):
|
||||||
|
continue
|
||||||
|
req_obj = obj.get("request") or {}
|
||||||
|
uri = str(req_obj.get("uri") or obj.get("uri") or "").split("?", 1)[0]
|
||||||
|
if not uri or uri.startswith("/api/v1") or uri.startswith("/mcp") or uri.startswith("/assets/"):
|
||||||
|
continue
|
||||||
|
for pref in CANONICAL_STATIC_ROUTE_PREFIXES:
|
||||||
|
if pref == "/":
|
||||||
|
if uri in ("/", "/index.html"):
|
||||||
|
counts_by_prefix["/"] = counts_by_prefix.get("/", 0) + 1
|
||||||
|
break
|
||||||
|
elif uri == pref or uri.startswith(pref):
|
||||||
|
counts_by_prefix[pref] = counts_by_prefix.get(pref, 0) + 1
|
||||||
|
break
|
||||||
|
|
||||||
|
if counts_by_prefix:
|
||||||
|
t_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
conn = sqlite3.connect(str(t_path), timeout=30.0, isolation_level=None)
|
||||||
|
try:
|
||||||
|
conn.execute("PRAGMA busy_timeout = 30000;")
|
||||||
|
conn.executescript(TELEMETRY_SCHEMA_SQL)
|
||||||
|
conn.execute("BEGIN IMMEDIATE;")
|
||||||
|
try:
|
||||||
|
for pref, cnt in counts_by_prefix.items():
|
||||||
|
conn.execute(
|
||||||
|
"""
|
||||||
|
INSERT INTO static_route_rollups (route_prefix, total_hits, last_ingested_utc)
|
||||||
|
VALUES (?, ?, ?)
|
||||||
|
ON CONFLICT(route_prefix) DO UPDATE SET
|
||||||
|
total_hits = total_hits + excluded.total_hits,
|
||||||
|
last_ingested_utc = excluded.last_ingested_utc
|
||||||
|
""",
|
||||||
|
(pref, cnt, now_utc),
|
||||||
|
)
|
||||||
|
conn.execute("COMMIT;")
|
||||||
|
except Exception:
|
||||||
|
conn.execute("ROLLBACK;")
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
conn.close()
|
||||||
|
|
||||||
|
if truncate_log:
|
||||||
|
try:
|
||||||
|
l_path.write_text("", encoding="utf-8")
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return {
|
||||||
|
"ok": True,
|
||||||
|
"log_path": str(l_path),
|
||||||
|
"db_path": str(t_path),
|
||||||
|
"ingested_lines": lines_read,
|
||||||
|
"matched_hits": sum(counts_by_prefix.values()),
|
||||||
|
"counts_by_prefix": counts_by_prefix,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def run_logrotate_directive(
|
def run_logrotate_directive(
|
||||||
conf_path: Path | str | None = None,
|
conf_path: Path | str | None = None,
|
||||||
telemetry_db_path: Path | str | None = None,
|
telemetry_db_path: Path | str | None = None,
|
||||||
@@ -1091,8 +1484,10 @@ def run_logrotate_directive(
|
|||||||
configured_size_str = m_size.group(1)
|
configured_size_str = m_size.group(1)
|
||||||
configured_bytes = parse_size_spec_bytes(configured_size_str)
|
configured_bytes = parse_size_spec_bytes(configured_size_str)
|
||||||
|
|
||||||
if not re.search(r"^\s*compress\s*$", txt, flags=re.MULTILINE) or re.search(r"^\s*nocompress\s*$", txt, flags=re.MULTILINE):
|
if not re.search(r"^\s*nocompress\s*$", txt, flags=re.MULTILINE) or "--compress-archive" not in txt:
|
||||||
raise ValueError(f"{c_path} must specify 'compress' (and not 'nocompress') so rotated archives are compressed rather than removed.")
|
raise ValueError(
|
||||||
|
f"{c_path} must specify 'nocompress' in the outer logrotate block and '--compress-archive' in prerotate so sqlite_meta.py compresses rotated archives strictly once (1x)."
|
||||||
|
)
|
||||||
m_rot = re.search(r"^\s*rotate\s+(\d+)\s*$", txt, flags=re.MULTILINE)
|
m_rot = re.search(r"^\s*rotate\s+(\d+)\s*$", txt, flags=re.MULTILINE)
|
||||||
rotate_count = int(m_rot.group(1)) if m_rot else 0
|
rotate_count = int(m_rot.group(1)) if m_rot else 0
|
||||||
if rotate_count < 1:
|
if rotate_count < 1:
|
||||||
@@ -1161,6 +1556,9 @@ def main(argv: list[str] | None = None) -> int:
|
|||||||
ap.add_argument("--timeseries", action="store_true", help="Query periodic quant_timeseries_bars.")
|
ap.add_argument("--timeseries", action="store_true", help="Query periodic quant_timeseries_bars.")
|
||||||
ap.add_argument("--symbol", default=None, help="Optional ticker symbol filter for --timeseries.")
|
ap.add_argument("--symbol", default=None, help="Optional ticker symbol filter for --timeseries.")
|
||||||
ap.add_argument("--telemetry", action="store_true", help="Print REST/MCP telemetry rollup summary.")
|
ap.add_argument("--telemetry", action="store_true", help="Print REST/MCP telemetry rollup summary.")
|
||||||
|
ap.add_argument("--telemetry-history", action="store_true", help="Print longitudinal REST/MCP telemetry aggregated across active DB and rotated .1.gz..12.gz snapshots (Strategy 2C).")
|
||||||
|
ap.add_argument("--ingest-caddy-route-counts", action="store_true", help="Ingest zero-IP Caddy JSON access log counts into static_route_rollups (Strategy 3A).")
|
||||||
|
ap.add_argument("--caddy-log", default="/var/log/caddy/hyperstition-access.json", help="Path to zero-IP Caddy access log.")
|
||||||
ap.add_argument(
|
ap.add_argument(
|
||||||
"--truncate-quiescent",
|
"--truncate-quiescent",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@@ -1213,6 +1611,14 @@ def main(argv: list[str] | None = None) -> int:
|
|||||||
print(json.dumps(query_timeseries_bars(symbol=args.symbol, db_path=args.db), indent=2))
|
print(json.dumps(query_timeseries_bars(symbol=args.symbol, db_path=args.db), indent=2))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
if args.telemetry_history:
|
||||||
|
print(json.dumps(get_longitudinal_telemetry_summary(args.db), indent=2))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if args.ingest_caddy_route_counts:
|
||||||
|
print(json.dumps(ingest_caddy_route_counts(args.caddy_log, telemetry_db_path=args.db), indent=2))
|
||||||
|
return 0
|
||||||
|
|
||||||
if args.telemetry:
|
if args.telemetry:
|
||||||
print(json.dumps(get_api_telemetry_summary(args.db), indent=2))
|
print(json.dumps(get_api_telemetry_summary(args.db), indent=2))
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -4,13 +4,22 @@ hyperstitionstud_io.glossary — Provenance-Keyed Glossary Registry & Cryptograp
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import functools
|
||||||
import hashlib
|
import hashlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Iterable
|
from typing import Any, Iterable
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=128)
|
||||||
|
def _sha256_by_stat(resolved_path_str: str, st_mtime_ns: int, st_size: int) -> str:
|
||||||
|
_ = (st_mtime_ns, st_size)
|
||||||
|
return hashlib.sha256(Path(resolved_path_str).read_bytes()).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
def sha256_file(path: str | Path) -> str:
|
def sha256_file(path: str | Path) -> str:
|
||||||
return hashlib.sha256(Path(path).read_bytes()).hexdigest()
|
p = Path(path).resolve()
|
||||||
|
st = p.stat()
|
||||||
|
return _sha256_by_stat(str(p), st.st_mtime_ns, st.st_size)
|
||||||
|
|
||||||
|
|
||||||
class ReadOnlyIsolationGuard:
|
class ReadOnlyIsolationGuard:
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ ENABLED_LENSES: tuple[str, ...] = (
|
|||||||
|
|
||||||
# 12 Canonical Lens-Neutral Mathematical Keys:
|
# 12 Canonical Lens-Neutral Mathematical Keys:
|
||||||
# Structural Combine (6):
|
# Structural Combine (6):
|
||||||
# 1. struct_isometric_armor (G4 Isometric Chokepoint Ratio, 0-100)
|
# 1. struct_isometric_armor (RULE-G04.ISOMETRIC Chokepoint Ratio, 0-100)
|
||||||
# 2. struct_drift_velocity (G3 Inverse Phonemic Drift & Quantized Steps, 0-100)
|
# 2. struct_drift_velocity (RULE-G03.STRUCTURAL Inverse Phonemic Drift & Quantized Steps, 0-100)
|
||||||
# 3. struct_variance_collapse (G1 Log Gen 0 -> Gen 1 Variance Collapse, 0-100)
|
# 3. struct_variance_collapse (RULE-G01.COLLAPSE Log GEN-00.ENGLISH -> GEN-01.INGGLISH Variance Collapse, 0-100)
|
||||||
# 4. struct_trophic_capture (S[1-5]xS6 Double-Articulation & Cross-Guild Degree, 0-100)
|
# 4. struct_trophic_capture (CLASS-S01.SILICON..CLASS-S05.BWO x CLASS-S06.AGI Double-Articulation & Cross-Guild Degree, 0-100)
|
||||||
# 5. struct_prime_density (G5 Prime & Twin-Prime Mutation Density, 0-100)
|
# 5. struct_prime_density (RULE-G05.TWIN_PRIME Mutation Density, 0-100)
|
||||||
# 6. struct_repricing_resilience (Tri-Modal Repricing & State-Gate Closure, 0-100)
|
# 6. struct_repricing_resilience (Tri-Modal Repricing & State-Gate Closure, 0-100)
|
||||||
# Longitudinal Time-Series Moments (6):
|
# Longitudinal Time-Series Moments (6):
|
||||||
# 7. ts_duty_cycle_pct (Pr[X_t > 0] Active Lock/Wire Duty Cycle %)
|
# 7. ts_duty_cycle_pct (Pr[X_t > 0] Active Lock/Wire Duty Cycle %)
|
||||||
@@ -35,7 +35,7 @@ ENABLED_LENSES: tuple[str, ...] = (
|
|||||||
# 9. ts_excess_over_replacement (Value Over Baseline Tier D Replacement)
|
# 9. ts_excess_over_replacement (Value Over Baseline Tier D Replacement)
|
||||||
# 10. ts_quantile_profile ({p20_floor, p90_ceiling, boom_pct, bust_pct, cv})
|
# 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)
|
# 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})
|
# 12. ts_regime_splits (Conditional Regime Delta {CLASS-M01.ENTROPIC, CLASS-M02.KINETIC, CLASS-M03.LEVIATHAN})
|
||||||
|
|
||||||
LENS_REGISTRY: dict[str, dict[str, Any]] = {
|
LENS_REGISTRY: dict[str, dict[str, Any]] = {
|
||||||
"neutral_math": {
|
"neutral_math": {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import json
|
|||||||
import re
|
import re
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
|
|
||||||
STATIC_RESOURCES: list[dict[str, str]] = [
|
STATIC_RESOURCES: list[dict[str, str]] = [
|
||||||
{
|
{
|
||||||
@@ -53,6 +53,48 @@ STATIC_RESOURCES: list[dict[str, str]] = [
|
|||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"description": "Node/edge ontology counts, top 15 AQ coordinate hubs by degree, and SHA-256 isolation receipt.",
|
"description": "Node/edge ontology counts, top 15 AQ coordinate hubs by degree, and SHA-256 isolation receipt.",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:quant-timeseries",
|
||||||
|
"name": "Periodic Quantitative Financial & Memetic Gematria Time-Series Bundle",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "30-day x 24-instrument real market history, 14-point eng_aq/ing_aq census, and Dose 0..3+ scores.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:macro-indicators",
|
||||||
|
"name": "Federal Reserve (FRED) Real Macroeconomic Indicators Bundle (14 Series)",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "CPI, PPI, US10Y, EFFR, SOFR, M1, M2, M2-M1 Spread, Real M2, GDP, GNP, OUTBS, and INDPRO.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:daily-brief",
|
||||||
|
"name": "5-Agenda Zero-Synthetic-Data Daily Portfolio & Bayesian Regime Update",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "3-state discrete Bayesian regime posteriors (R1/R2/R3), confirming/challenging signals, and Daily Key Question Q_t.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:engineering-manifest",
|
||||||
|
"name": "Software Engineering Explication Hub Manifest (Units E0-E5)",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "Live-introspected CLI scripts, MCP tools, schemas, Novice Prerequisite Ladders, and E0-E5 subpages.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:math-manifest",
|
||||||
|
"name": "Applied Mathematics & Quantitative Semiotics Hub Manifest (Units M0-M5)",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "Algebraic conservation invariants, empirical counts, Novice Prerequisite Ladders, and M0-M5 subpages.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:archive-manifest",
|
||||||
|
"name": "Cold-Storage Rotated Plan Archive Manifest (completed-plans-archive.tar.gz)",
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"description": "SHA-256 manifest of all completed software plans rotated into completed-plans-archive.tar.gz.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "urn:io:hyperstitionstud:resource:guile-prelude",
|
||||||
|
"name": "Canonical GNU Guile Scheme & Z-Combinator Prelude (guile_prelude.scm)",
|
||||||
|
"mimeType": "text/x-scheme",
|
||||||
|
"description": "Applicative-order Z combinator, Thomas' Calculus primitives, Base-36 AQ, exact rational variance, ETI, and Bayes rules.",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
RESOURCE_TEMPLATES: list[dict[str, str]] = [
|
RESOURCE_TEMPLATES: list[dict[str, str]] = [
|
||||||
@@ -80,17 +122,25 @@ def read_mcp_resource(uri: str) -> dict[str, Any]:
|
|||||||
"urn:io:hyperstitionstud:resource:singularity-matrix": cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.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:memetic-registry": cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json",
|
||||||
"urn:io:hyperstitionstud:resource:quantitative-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
|
"urn:io:hyperstitionstud:resource:quantitative-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:quant-timeseries": cfg.core_dir / "site" / "quant" / "quant-timeseries.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:macro-indicators": cfg.core_dir / "site" / "quant" / "real-macro-indicators.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:daily-brief": cfg.core_dir / "site" / "quant" / "daily-brief-latest.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:engineering-manifest": cfg.core_dir / "site" / "engineering" / "engineering-manifest.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:math-manifest": cfg.core_dir / "site" / "math" / "math-manifest.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:archive-manifest": cfg.knowledge_graph_dir / "docs" / "archive" / "archive-manifest.json",
|
||||||
|
"urn:io:hyperstitionstud:resource:guile-prelude": cfg.core_dir / "src" / "hyperstitionstud_io" / "publishing" / "guile_prelude.scm",
|
||||||
}
|
}
|
||||||
if uri in static_map:
|
if uri in static_map:
|
||||||
p = static_map[uri]
|
p = static_map[uri]
|
||||||
|
mime = "text/x-scheme" if p.suffix == ".scm" else "application/json"
|
||||||
return {
|
return {
|
||||||
"contents": [
|
"contents": [
|
||||||
{"uri": uri, "mimeType": "application/json", "text": p.read_text(encoding="utf-8")}
|
{"uri": uri, "mimeType": mime, "text": p.read_text(encoding="utf-8")}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if uri == "urn:io:hyperstitionstud:resource:knowledge-graph-summary":
|
if uri == "urn:io:hyperstitionstud:resource:knowledge-graph-summary":
|
||||||
kg = json.loads((cfg.knowledge_graph_dir / "encyclopedia-graph.json").read_text(encoding="utf-8"))
|
kg = load_json_cached(cfg.knowledge_graph_dir / "encyclopedia-graph.json", copy_result=False)
|
||||||
summary = {
|
summary = {
|
||||||
"version": kg.get("version"),
|
"version": kg.get("version"),
|
||||||
"namespace_urn": kg.get("namespace_urn"),
|
"namespace_urn": kg.get("namespace_urn"),
|
||||||
|
|||||||
@@ -401,14 +401,68 @@ def _dispatch_rest_v1_inner(
|
|||||||
return _error_response(500, "INTERNAL_ERROR", str(exc))
|
return _error_response(500, "INTERNAL_ERROR", str(exc))
|
||||||
|
|
||||||
|
|
||||||
|
def compute_response_etag(payload: Any) -> str:
|
||||||
|
"""
|
||||||
|
Compute a deterministic strong HTTP ETag (`"<cidv1-or-sha256>"`) for any REST/MCP response payload.
|
||||||
|
"""
|
||||||
|
import hashlib
|
||||||
|
|
||||||
|
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||||
|
|
||||||
|
if isinstance(payload, dict):
|
||||||
|
cid_top = (payload.get("ipld_dag_json_cidv1") or {}).get("/")
|
||||||
|
if isinstance(cid_top, str) and cid_top:
|
||||||
|
return f'"{cid_top}"'
|
||||||
|
data_sub = payload.get("data")
|
||||||
|
if isinstance(data_sub, dict):
|
||||||
|
cid_sub = (data_sub.get("ipld_dag_json_cidv1") or {}).get("/")
|
||||||
|
if isinstance(cid_sub, str) and cid_sub:
|
||||||
|
return f'"{cid_sub}"'
|
||||||
|
try:
|
||||||
|
return f'"{compute_dag_json_cidv1(payload)}"'
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
raw_bytes = (
|
||||||
|
payload.encode("utf-8")
|
||||||
|
if isinstance(payload, str)
|
||||||
|
else json.dumps(payload, sort_keys=True, ensure_ascii=False).encode("utf-8")
|
||||||
|
)
|
||||||
|
return f'"sha256-{hashlib.sha256(raw_bytes).hexdigest()[:40]}"'
|
||||||
|
|
||||||
|
|
||||||
|
def matches_if_none_match(if_none_match: str | None, etag: str) -> bool:
|
||||||
|
"""
|
||||||
|
Evaluate RFC 9110 `If-None-Match` header against a strong or weak ETag.
|
||||||
|
"""
|
||||||
|
if not if_none_match or not etag:
|
||||||
|
return False
|
||||||
|
inm_raw = if_none_match.strip()
|
||||||
|
if inm_raw == "*":
|
||||||
|
return True
|
||||||
|
target_norm = etag.strip()
|
||||||
|
if target_norm.startswith("W/"):
|
||||||
|
target_norm = target_norm[2:].strip()
|
||||||
|
for part in inm_raw.split(","):
|
||||||
|
cand = part.strip()
|
||||||
|
if cand.startswith("W/"):
|
||||||
|
cand = cand[2:].strip()
|
||||||
|
if cand == target_norm or cand.strip('"') == target_norm.strip('"'):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def dispatch_rest_v1(
|
def dispatch_rest_v1(
|
||||||
method: str,
|
method: str,
|
||||||
raw_path: str,
|
raw_path: str,
|
||||||
body_bytes: bytes = b"",
|
body_bytes: bytes = b"",
|
||||||
|
if_none_match: str | None = None,
|
||||||
|
traffic_source: str = "internal_test",
|
||||||
) -> tuple[int, str, Any]:
|
) -> tuple[int, str, Any]:
|
||||||
"""
|
"""
|
||||||
Dispatch an HTTP GET or POST request under `/api/v1/*` and automatically record
|
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`).
|
the request metadata and latency in the SQLite REST API metadata database (`api-telemetry.db`).
|
||||||
|
When `if_none_match` matches the deterministic response ETag on a `GET` `200` response,
|
||||||
|
records `status_code=304` (`304 Not Modified`) and returns `(304, content_type, "")`.
|
||||||
Returns `(http_status_code, content_type, response_payload_or_text)`.
|
Returns `(http_status_code, content_type, response_payload_or_text)`.
|
||||||
"""
|
"""
|
||||||
parsed_url = urllib.parse.urlsplit(raw_path)
|
parsed_url = urllib.parse.urlsplit(raw_path)
|
||||||
@@ -416,7 +470,22 @@ def dispatch_rest_v1(
|
|||||||
query_str = parsed_url.query
|
query_str = parsed_url.query
|
||||||
t0_ns = time.perf_counter_ns()
|
t0_ns = time.perf_counter_ns()
|
||||||
status, ctype, payload = _dispatch_rest_v1_inner(method, path, query_str, body_bytes)
|
status, ctype, payload = _dispatch_rest_v1_inner(method, path, query_str, body_bytes)
|
||||||
|
if status == 200 and method.upper() == "GET" and if_none_match:
|
||||||
|
etag = compute_response_etag(payload)
|
||||||
|
if matches_if_none_match(if_none_match, etag):
|
||||||
|
status = 304
|
||||||
|
payload = ""
|
||||||
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
|
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
|
||||||
|
|
||||||
|
param_events: dict[str, str] = {}
|
||||||
|
if query_str:
|
||||||
|
for k, vals in urllib.parse.parse_qs(query_str, keep_blank_values=False).items():
|
||||||
|
if vals:
|
||||||
|
param_events[k] = vals[0]
|
||||||
|
m_sym = re.match(r"^/api/v1/(?:quant/instruments|zoology/pokedex)/([^/]+)$", path)
|
||||||
|
if m_sym:
|
||||||
|
param_events.setdefault("symbol", urllib.parse.unquote(m_sym.group(1)))
|
||||||
|
|
||||||
record_api_telemetry(
|
record_api_telemetry(
|
||||||
protocol="rest_v1",
|
protocol="rest_v1",
|
||||||
method=method.upper(),
|
method=method.upper(),
|
||||||
@@ -424,5 +493,7 @@ def dispatch_rest_v1(
|
|||||||
status_code=status,
|
status_code=status,
|
||||||
latency_us=elapsed_us,
|
latency_us=elapsed_us,
|
||||||
isolation_ok=True,
|
isolation_ok=True,
|
||||||
|
traffic_source=traffic_source,
|
||||||
|
param_events=param_events,
|
||||||
)
|
)
|
||||||
return status, ctype, payload
|
return status, ctype, payload
|
||||||
@@ -30,17 +30,21 @@ from hyperstitionstud_io.mcp.resources import ( # noqa: E402
|
|||||||
STATIC_RESOURCES,
|
STATIC_RESOURCES,
|
||||||
read_mcp_resource,
|
read_mcp_resource,
|
||||||
)
|
)
|
||||||
from hyperstitionstud_io.mcp.rest import dispatch_rest_v1 # noqa: E402
|
from hyperstitionstud_io.mcp.rest import ( # noqa: E402
|
||||||
|
compute_response_etag,
|
||||||
|
dispatch_rest_v1,
|
||||||
|
matches_if_none_match,
|
||||||
|
)
|
||||||
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool # noqa: E402
|
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA, call_mcp_tool # noqa: E402
|
||||||
|
|
||||||
SERVER_INFO = {
|
SERVER_INFO = {
|
||||||
"name": "hyperstitionstudio-mcp",
|
"name": "hyperstitionstudio-mcp",
|
||||||
"version": "2.0.23",
|
"version": "2.17.1",
|
||||||
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.0.23",
|
"namespace_urn": "urn:io:hyperstitionstud:mcp:2.17.1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
|
def dispatch_jsonrpc(req: dict[str, Any], traffic_source: str = "internal_test") -> dict[str, Any] | None:
|
||||||
"""
|
"""
|
||||||
Process a single JSON-RPC 2.0 request or notification and return the JSON-RPC 2.0 response
|
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').
|
(or None for notifications without an 'id').
|
||||||
@@ -130,6 +134,14 @@ def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
|
|||||||
}
|
}
|
||||||
finally:
|
finally:
|
||||||
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
|
elapsed_us = max(1, (time.perf_counter_ns() - t0_ns) // 1000)
|
||||||
|
rpc_params: dict[str, str] = {}
|
||||||
|
if method == "tools/call" and isinstance(params, dict):
|
||||||
|
t_args = params.get("arguments") or {}
|
||||||
|
if isinstance(t_args, dict):
|
||||||
|
for p_k in ("symbol", "symbol_filter", "lens", "lang", "unit_filter"):
|
||||||
|
if p_k in t_args and t_args[p_k]:
|
||||||
|
norm_k = "symbol" if p_k == "symbol_filter" else p_k
|
||||||
|
rpc_params[norm_k] = str(t_args[p_k])
|
||||||
record_api_telemetry(
|
record_api_telemetry(
|
||||||
protocol="mcp_jsonrpc",
|
protocol="mcp_jsonrpc",
|
||||||
method="POST",
|
method="POST",
|
||||||
@@ -137,6 +149,8 @@ def dispatch_jsonrpc(req: dict[str, Any]) -> dict[str, Any] | None:
|
|||||||
status_code=status_code,
|
status_code=status_code,
|
||||||
latency_us=elapsed_us,
|
latency_us=elapsed_us,
|
||||||
isolation_ok=True,
|
isolation_ok=True,
|
||||||
|
traffic_source=traffic_source,
|
||||||
|
param_events=rpc_params,
|
||||||
)
|
)
|
||||||
|
|
||||||
return {"jsonrpc": "2.0", "id": req_id, "result": result}
|
return {"jsonrpc": "2.0", "id": req_id, "result": result}
|
||||||
@@ -170,35 +184,73 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
|
|||||||
def log_message(self, format: str, *args: Any) -> None:
|
def log_message(self, format: str, *args: Any) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
def _send_payload(self, status: int, content_type: str, payload: Any) -> None:
|
def _send_payload(self, status: int, content_type: str, payload: Any, etag: str | None = None) -> None:
|
||||||
|
if status == 304:
|
||||||
|
self.send_response(304)
|
||||||
|
if etag:
|
||||||
|
self.send_header("ETag", etag)
|
||||||
|
self.send_header("Cache-Control", "public, max-age=60, must-revalidate")
|
||||||
|
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, If-None-Match")
|
||||||
|
self.send_header("Access-Control-Expose-Headers", "ETag")
|
||||||
|
self.end_headers()
|
||||||
|
return
|
||||||
if isinstance(payload, str):
|
if isinstance(payload, str):
|
||||||
body = payload.encode("utf-8")
|
body = payload.encode("utf-8")
|
||||||
else:
|
else:
|
||||||
body = (json.dumps(payload, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
|
body = (json.dumps(payload, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
|
||||||
|
computed_etag = etag or compute_response_etag(payload)
|
||||||
self.send_response(status)
|
self.send_response(status)
|
||||||
self.send_header("Content-Type", content_type)
|
self.send_header("Content-Type", content_type)
|
||||||
self.send_header("Content-Length", str(len(body)))
|
self.send_header("Content-Length", str(len(body)))
|
||||||
|
if computed_etag:
|
||||||
|
self.send_header("ETag", computed_etag)
|
||||||
|
self.send_header("Cache-Control", "public, max-age=60, must-revalidate")
|
||||||
self.send_header("Access-Control-Allow-Origin", "*")
|
self.send_header("Access-Control-Allow-Origin", "*")
|
||||||
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||||
self.send_header("Access-Control-Allow-Headers", "Content-Type")
|
self.send_header("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
|
||||||
|
self.send_header("Access-Control-Expose-Headers", "ETag")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.wfile.write(body)
|
self.wfile.write(body)
|
||||||
|
|
||||||
def _send_json(self, status: int, payload: Any) -> None:
|
def _send_json(self, status: int, payload: Any, etag: str | None = None) -> None:
|
||||||
self._send_payload(status, "application/json; charset=utf-8", payload)
|
self._send_payload(status, "application/json; charset=utf-8", payload, etag=etag)
|
||||||
|
|
||||||
def do_OPTIONS(self) -> None:
|
def do_OPTIONS(self) -> None:
|
||||||
self.send_response(204)
|
self.send_response(204)
|
||||||
self.send_header("Access-Control-Allow-Origin", "*")
|
self.send_header("Access-Control-Allow-Origin", "*")
|
||||||
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||||
self.send_header("Access-Control-Allow-Headers", "Content-Type")
|
self.send_header("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
|
||||||
|
self.send_header("Access-Control-Expose-Headers", "ETag")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
||||||
|
def _classify_traffic_source(self) -> str:
|
||||||
|
ua = (self.headers.get("User-Agent") or "").strip()
|
||||||
|
if "HyperstitionPublicSmoke" in ua or "HyperstitionInternalTest" in ua:
|
||||||
|
return "internal_test"
|
||||||
|
return "external_production"
|
||||||
|
|
||||||
def do_GET(self) -> None:
|
def do_GET(self) -> None:
|
||||||
try:
|
try:
|
||||||
|
inm = self.headers.get("If-None-Match")
|
||||||
|
tsrc = self._classify_traffic_source()
|
||||||
if self.path.startswith("/api/v1"):
|
if self.path.startswith("/api/v1"):
|
||||||
status, ctype, payload = dispatch_rest_v1("GET", self.path)
|
status, ctype, payload = dispatch_rest_v1("GET", self.path, traffic_source=tsrc)
|
||||||
self._send_payload(status, ctype, payload)
|
etag = compute_response_etag(payload) if status == 200 else None
|
||||||
|
if status == 200 and inm and etag and matches_if_none_match(inm, etag):
|
||||||
|
record_api_telemetry(
|
||||||
|
protocol="rest_v1",
|
||||||
|
method="GET",
|
||||||
|
endpoint_pattern=self.path.split("?", 1)[0],
|
||||||
|
status_code=304,
|
||||||
|
latency_us=1,
|
||||||
|
isolation_ok=True,
|
||||||
|
traffic_source=tsrc,
|
||||||
|
)
|
||||||
|
self._send_payload(304, ctype, "", etag=etag)
|
||||||
|
return
|
||||||
|
self._send_payload(status, ctype, payload, etag=etag)
|
||||||
return
|
return
|
||||||
manifest = {
|
manifest = {
|
||||||
"serverInfo": SERVER_INFO,
|
"serverInfo": SERVER_INFO,
|
||||||
@@ -220,7 +272,11 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
|
|||||||
"resources": [r["uri"] for r in STATIC_RESOURCES],
|
"resources": [r["uri"] for r in STATIC_RESOURCES],
|
||||||
"prompts": [p["name"] for p in MCP_PROMPTS],
|
"prompts": [p["name"] for p in MCP_PROMPTS],
|
||||||
}
|
}
|
||||||
self._send_json(200, manifest)
|
m_etag = compute_response_etag(manifest)
|
||||||
|
if inm and matches_if_none_match(inm, m_etag):
|
||||||
|
self._send_payload(304, "application/json; charset=utf-8", "", etag=m_etag)
|
||||||
|
return
|
||||||
|
self._send_json(200, manifest, etag=m_etag)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self._send_json(500, {"ok": False, "error": {"code": "INTERNAL_ERROR", "status": 500, "message": str(exc)}})
|
self._send_json(500, {"ok": False, "error": {"code": "INTERNAL_ERROR", "status": 500, "message": str(exc)}})
|
||||||
|
|
||||||
@@ -233,8 +289,9 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
|
|||||||
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32600, "message": "Invalid content length"}})
|
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32600, "message": "Invalid content length"}})
|
||||||
return
|
return
|
||||||
raw_bytes = self.rfile.read(length) if length > 0 else b""
|
raw_bytes = self.rfile.read(length) if length > 0 else b""
|
||||||
|
tsrc = self._classify_traffic_source()
|
||||||
if self.path.startswith("/api/v1"):
|
if self.path.startswith("/api/v1"):
|
||||||
status, ctype, payload = dispatch_rest_v1("POST", self.path, raw_bytes)
|
status, ctype, payload = dispatch_rest_v1("POST", self.path, raw_bytes, traffic_source=tsrc)
|
||||||
self._send_payload(status, ctype, payload)
|
self._send_payload(status, ctype, payload)
|
||||||
return
|
return
|
||||||
if not raw_bytes:
|
if not raw_bytes:
|
||||||
@@ -246,7 +303,7 @@ class _MCPHTTPHandler(BaseHTTPRequestHandler):
|
|||||||
except json.JSONDecodeError as exc:
|
except json.JSONDecodeError as exc:
|
||||||
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": str(exc)}})
|
self._send_json(400, {"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": str(exc)}})
|
||||||
return
|
return
|
||||||
resp = dispatch_jsonrpc(req)
|
resp = dispatch_jsonrpc(req, traffic_source=tsrc)
|
||||||
if resp is None:
|
if resp is None:
|
||||||
self.send_response(202)
|
self.send_response(202)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|||||||
@@ -19,10 +19,11 @@ from hyperstitionstud_io.ciphers import (
|
|||||||
is_repdigit_37,
|
is_repdigit_37,
|
||||||
prime_rank,
|
prime_rank,
|
||||||
)
|
)
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
from hyperstitionstud_io.ipld import inspect_dag_json_payload
|
from hyperstitionstud_io.ipld import inspect_dag_json_payload
|
||||||
from hyperstitionstud_io.phonetics import translate_batch
|
from hyperstitionstud_io.phonetics import translate_batch
|
||||||
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest
|
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest
|
||||||
|
from hyperstitionstud_io.security import safe_tar_members
|
||||||
|
|
||||||
REGISTER_STAT_LABELS = {
|
REGISTER_STAT_LABELS = {
|
||||||
"academic": {
|
"academic": {
|
||||||
@@ -186,14 +187,14 @@ MCP_TOOLS_SCHEMA: list[dict[str, Any]] = [
|
|||||||
"inputSchema": {
|
"inputSchema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"harvest_mode": {"type": "string", "enum": ["us-closing-bell", "utc-rollover"], "default": "us-closing-bell"},
|
"harvest_mode": {"type": "string", "enum": ["us-pre-market-open", "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')."},
|
"symbol_filter": {"type": "string", "default": "", "description": "Optional ticker symbol filter (e.g. 'NVDA', 'ASML', 'BTC-USD')."},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hs_inspect_quant_timeseries",
|
"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.",
|
"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, pluggable LENS_REGISTRY projections, and optional one-shot .png + .json stats card bundle.",
|
||||||
"inputSchema": {
|
"inputSchema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -203,6 +204,122 @@ MCP_TOOLS_SCHEMA: list[dict[str, Any]] = [
|
|||||||
"enum": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"],
|
"enum": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"],
|
||||||
"default": "fund_manager",
|
"default": "fund_manager",
|
||||||
},
|
},
|
||||||
|
"include_card": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": False,
|
||||||
|
"description": "When true and a symbol is specified, generates and attaches the one-shot .png + .json ticker stats card bundle.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_generate_ticker_stats_card",
|
||||||
|
"description": "Generate a one-shot hybrid Pokémon/Sports/TCG/TierZoo ticker stats card (.png + .json) in the Group 3 haiperdohp-jemaytreeah × hyperstitionstud.io design system using 100% real exchange and news-wire observations (null / 'No data available' when absent).",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"symbol": {"type": "string", "default": "NVDA", "description": "Ticker symbol or DEX coordinate (e.g. 'NVDA', 'PLTR', 'SOL-USD', 'ANTHR-PVT', '137')."},
|
||||||
|
"lens": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["tierzoo_ecology", "fund_manager", "neutral_math", "corporate_board", "fantasy_sabermetrics", "pokedex_scanner"],
|
||||||
|
"default": "tierzoo_ecology",
|
||||||
|
},
|
||||||
|
"date_utc": {"type": "string", "default": "", "description": "Optional YYYY-MM-DD UTC date (defaults to latest available real trading date)."},
|
||||||
|
"include_base64_png": {"type": "boolean", "default": True, "description": "Whether to embed base64-encoded PNG bytes in the JSON response."},
|
||||||
|
},
|
||||||
|
"required": ["symbol"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_inspect_macro_indicators",
|
||||||
|
"description": "Inspect real Federal Reserve (FRED) macroeconomic, monetary, and aggregate output indicators (CPI, PPI, US10Y, EFFR, SOFR, M1, M2, M1 vs. M2 Spread, Real M2 Growth, GDP, GNP, OUTBS, INDPRO) with native cadence preservation and bidirectional eng_aq/ing_aq evaluations.",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"indicator_slug": {"type": "string", "default": "", "description": "Optional indicator slug filter (e.g. 'cpi', 'ppi', 'us10y', 'effr', 'sofr', 'm1', 'm2', 'real_m2', 'gdp_nominal', 'gdp_real', 'gnp_gross_product', 'business_gross_output', 'industrial_production')."},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_generate_daily_portfolio_brief",
|
||||||
|
"description": "Generate or inspect the 5-Agenda Zero-Synthetic-Data Daily Portfolio & Memetic Regime Update (Executive Summary + 3-State Bayesian Best/Base/Worst-Case Scenarios, Confirming Signals, Challenging Divergences, Delta Since Last Run, and Daily Key Macro Question + Compounding Rigor).",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"refresh": {"type": "boolean", "default": False, "description": "When true, recomputes the daily brief and advances the Bayesian prior/posterior state ledger."},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_inspect_engineering_and_math_docs",
|
||||||
|
"description": "Inspect the live-introspected Software Engineering (/engineering/ Units E0-E5) and Applied Mathematics (/math/ Units M0-M5) explication hubs, subpage sections, algebraic conservation invariants, CLI scripts table, Novice Prerequisite Ladders, and 3-language polyglot cartridges (Guile Scheme, TypeScript, Rust).",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"domain": {"type": "string", "enum": ["all", "engineering", "math"], "default": "all"},
|
||||||
|
"unit_filter": {"type": "string", "default": "", "description": "Optional unit ID or subpage slug (e.g. 'E0'..'E5', 'M0'..'M5', 'ciphers-and-phonetics')."},
|
||||||
|
"include_polyglot_cartridges": {"type": "boolean", "default": True},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_inspect_documentation_and_manuals",
|
||||||
|
"description": "Search, list, and retrieve full Markdown text and PDF deep-links across all documentation tiers: Operator's Manuals, VPS/CI Guides, Stakeholder Proposals & Specs, Interactive /learn/ Curriculum, /quant/ Guided Tutorials & 27 [i] Glossary Popovers, Active/Deferred Plans, and Cold-Rotated Completed Plans (read in-memory from completed-plans-archive.tar.gz).",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"category": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["all", "manuals", "proposals_and_specs", "active_and_deferred_plans", "archived_plans", "learn_and_tutorials", "quant_glossary_popovers"],
|
||||||
|
"default": "all",
|
||||||
|
},
|
||||||
|
"doc_id": {"type": "string", "default": "", "description": "Optional document filename or plan ID (e.g. 'OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES', 'PLAN-HS-PDF-BUILD-DARK-MODE-AND-GLYPH-SANITIZATION')."},
|
||||||
|
"search_query": {"type": "string", "default": "", "description": "Optional case-insensitive keyword to search across manuals and plans."},
|
||||||
|
"include_full_markdown": {"type": "boolean", "default": False},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_evaluate_guile_scheme_z_calculus",
|
||||||
|
"description": "Evaluate a pure functional Guile Scheme (Z-combinator), TypeScript, or Rust expression inside the 4-Ring Zero-Escape AST Sandbox (supporting exact rationals p/q, float conversion, step traces, and guile_prelude.scm inspection).",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"expression": {"type": "string", "default": '(aq-base36 "LEMUR")'},
|
||||||
|
"lang": {"type": "string", "enum": ["guile", "ts", "rust"], "default": "guile"},
|
||||||
|
"prefer_float": {"type": "boolean", "default": False},
|
||||||
|
"include_trace": {"type": "boolean", "default": True},
|
||||||
|
"include_prelude_source": {"type": "boolean", "default": False},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_query_workspace_catalog_and_release_state",
|
||||||
|
"description": "Query the unified SQLite FTS5 catalog (registry manifests, FTS5 BM25 search, cross-corpus AQ coordinate joins, indexed time-series bar queries), inspect zero-token programmatic semantic version bump heuristics (hs-sync-version --explain-bump), and read the cached EROFS/public-regression baseline and API telemetry summary.",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"fts_query": {"type": "string", "default": "", "description": "Optional full-text search query across glossary entries, graph nodes, equations, and dossiers."},
|
||||||
|
"doc_type": {"type": "string", "enum": ["all", "glossary", "equation", "node", "dossier", "instrument"], "default": "all"},
|
||||||
|
"registry": {"type": "string", "default": "", "description": "Optional registry slug to query from SQLite registry_manifests (or 'all' for all manifests)."},
|
||||||
|
"aq_int": {"type": "integer", "default": 0, "description": "Optional integer AQ coordinate (1..999) for cross-corpus SQLite coordinate join."},
|
||||||
|
"symbol": {"type": "string", "default": "", "description": "Optional ticker symbol for indexed SQLite quant_timeseries_bars query."},
|
||||||
|
"start_date": {"type": "string", "default": ""},
|
||||||
|
"end_date": {"type": "string", "default": ""},
|
||||||
|
"min_points": {"type": "number", "default": 0.0},
|
||||||
|
"include_version_bump_heuristics": {"type": "boolean", "default": True},
|
||||||
|
"include_baseline_and_telemetry": {"type": "boolean", "default": True},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hs_generate_highlights_summary",
|
||||||
|
"description": "Generate an ad-hoc <= 2 paragraph (<= 1,100 char, zero-HTML/LaTeX/table) phone-messenger highlights summary for software engineers (Paragraph 1) and mathematics enthusiasts (Paragraph 2) at 0 LLM tokens, writing output artifacts exclusively to /workspace/untracked/recent-highlights/.",
|
||||||
|
"inputSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"focus": {"type": "string", "enum": ["both", "eng", "math"], "default": "both"},
|
||||||
|
"max_chars": {"type": "integer", "default": 1100},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -239,8 +356,8 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
if name == "hs_classify_singularity":
|
if name == "hs_classify_singularity":
|
||||||
terms = [str(t) for t in arguments.get("terms", [])]
|
terms = [str(t) for t in arguments.get("terms", [])]
|
||||||
headline = str(arguments.get("headline_text", "")).lower()
|
headline = str(arguments.get("headline_text", "")).lower()
|
||||||
mat = json.loads((cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json").read_text(encoding="utf-8"))
|
mat = load_json_cached(cfg.zoology_dir / "taxonomy" / "singularity-zoology-matrix.json", copy_result=False)
|
||||||
mem = json.loads((cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json").read_text(encoding="utf-8"))
|
mem = load_json_cached(cfg.zoology_dir / "taxonomy" / "memetic-superclass-registry.json", copy_result=False)
|
||||||
ing_map = translate_batch(terms)
|
ing_map = translate_batch(terms)
|
||||||
|
|
||||||
classified = []
|
classified = []
|
||||||
@@ -277,7 +394,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
q = str(arguments.get("query", "")).strip().lower()
|
q = str(arguments.get("query", "")).strip().lower()
|
||||||
inc_nbr = bool(arguments.get("include_neighbors", True))
|
inc_nbr = bool(arguments.get("include_neighbors", True))
|
||||||
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
||||||
kg = json.loads(kg_path.read_text(encoding="utf-8"))
|
kg = load_json_cached(kg_path, copy_result=False)
|
||||||
matches = []
|
matches = []
|
||||||
for n in kg["nodes"]:
|
for n in kg["nodes"]:
|
||||||
if (
|
if (
|
||||||
@@ -313,7 +430,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
q = str(arguments.get("query", "")).strip().lower()
|
q = str(arguments.get("query", "")).strip().lower()
|
||||||
g_filt = str(arguments.get("guild_filter", "")).strip().upper()
|
g_filt = str(arguments.get("guild_filter", "")).strip().upper()
|
||||||
limit = int(arguments.get("limit", 15))
|
limit = int(arguments.get("limit", 15))
|
||||||
gl = json.loads((cfg.zoology_dir / "taxonomy" / "glossary-registry.json").read_text(encoding="utf-8"))
|
gl = load_json_cached(cfg.zoology_dir / "taxonomy" / "glossary-registry.json", copy_result=False)
|
||||||
hits = []
|
hits = []
|
||||||
for sec in gl.get("sections", []):
|
for sec in gl.get("sections", []):
|
||||||
for ent in sec.get("entries", []):
|
for ent in sec.get("entries", []):
|
||||||
@@ -338,7 +455,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
if name == "hs_inspect_eti_tier_list":
|
if name == "hs_inspect_eti_tier_list":
|
||||||
b_filt = str(arguments.get("build_filter", "all")).strip().upper()
|
b_filt = str(arguments.get("build_filter", "all")).strip().upper()
|
||||||
reg = str(arguments.get("register", "academic")).strip().lower()
|
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"))
|
tl = load_json_cached(cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json", copy_result=False)
|
||||||
labels = REGISTER_STAT_LABELS.get(reg, REGISTER_STAT_LABELS["academic"])
|
labels = REGISTER_STAT_LABELS.get(reg, REGISTER_STAT_LABELS["academic"])
|
||||||
rows = []
|
rows = []
|
||||||
for r in tl.get("rows", []):
|
for r in tl.get("rows", []):
|
||||||
@@ -370,7 +487,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
aid = str(arguments.get("anchor_id", "")).strip()
|
aid = str(arguments.get("anchor_id", "")).strip()
|
||||||
new_dig = str(arguments.get("new_digit_str", "")).strip()
|
new_dig = str(arguments.get("new_digit_str", "")).strip()
|
||||||
new_sp_eng = str(arguments.get("new_spoken_eng", "")).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"))
|
anc_data = load_json_cached(cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json", copy_result=False)
|
||||||
anchor = next((a for a in anc_data.get("anchors", []) if a["anchor_id"] == aid), None)
|
anchor = next((a for a in anc_data.get("anchors", []) if a["anchor_id"] == aid), None)
|
||||||
if anchor is None:
|
if anchor is None:
|
||||||
return {"error": f"Unknown anchor_id '{aid}'", "available_anchors": [a["anchor_id"] for a in anc_data.get("anchors", [])]}
|
return {"error": f"Unknown anchor_id '{aid}'", "available_anchors": [a["anchor_id"] for a in anc_data.get("anchors", [])]}
|
||||||
@@ -419,9 +536,12 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
return {"match_count": len(eqs), "equations": eqs[:limit]}
|
return {"match_count": len(eqs), "equations": eqs[:limit]}
|
||||||
|
|
||||||
if name == "hs_verify_grounded_citations":
|
if name == "hs_verify_grounded_citations":
|
||||||
dp = Path(str(arguments.get("draft_path", "")))
|
raw_dp = str(arguments.get("draft_path", "")).strip() or "proposal-fund-manager-novel-investment-discovery.md"
|
||||||
|
dp = Path(raw_dp)
|
||||||
if not dp.is_absolute():
|
if not dp.is_absolute():
|
||||||
dp = cfg.zoology_dir / dp
|
dp = cfg.zoology_dir / dp
|
||||||
|
if dp.is_dir():
|
||||||
|
dp = cfg.zoology_dir / "proposal-fund-manager-novel-investment-discovery.md"
|
||||||
variant = str(arguments.get("ledger_variant", "common"))
|
variant = str(arguments.get("ledger_variant", "common"))
|
||||||
req_ev = bool(arguments.get("require_evidence", True))
|
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_name = "citations-ledger-english-aq.json" if variant == "english_aq" else "citations-ledger-common.json"
|
||||||
@@ -448,6 +568,13 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
"assemblage-builds-tier-list": cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.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",
|
"quantitative-economic-anchors": cfg.zoology_dir / "taxonomy" / "quantitative-economic-anchors.json",
|
||||||
"encyclopedia-graph": cfg.knowledge_graph_dir / "encyclopedia-graph.json",
|
"encyclopedia-graph": cfg.knowledge_graph_dir / "encyclopedia-graph.json",
|
||||||
|
"quant-timeseries": cfg.core_dir / "site" / "quant" / "quant-timeseries.json",
|
||||||
|
"real-macro-indicators": cfg.core_dir / "site" / "quant" / "real-macro-indicators.json",
|
||||||
|
"daily-brief-latest": cfg.core_dir / "site" / "quant" / "daily-brief-latest.json",
|
||||||
|
"engineering-manifest": cfg.core_dir / "site" / "engineering" / "engineering-manifest.json",
|
||||||
|
"math-manifest": cfg.core_dir / "site" / "math" / "math-manifest.json",
|
||||||
|
"archive-manifest": cfg.knowledge_graph_dir / "docs" / "archive" / "archive-manifest.json",
|
||||||
|
"inactive-archive-manifest": cfg.knowledge_graph_dir / "docs" / "plans" / "inactive" / "inactive-archive-manifest.json",
|
||||||
}
|
}
|
||||||
p = reg_map.get(str(reg_name))
|
p = reg_map.get(str(reg_name))
|
||||||
if p is None or not p.is_file():
|
if p is None or not p.is_file():
|
||||||
@@ -479,7 +606,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
lens_q = str(arguments.get("lens", "fund_manager")).strip()
|
lens_q = str(arguments.get("lens", "fund_manager")).strip()
|
||||||
ts_json_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
ts_json_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
||||||
if ts_json_path.is_file():
|
if ts_json_path.is_file():
|
||||||
bundle = json.loads(ts_json_path.read_text(encoding="utf-8"))
|
bundle = load_json_cached(ts_json_path, copy_result=False)
|
||||||
else:
|
else:
|
||||||
bundle = build_quant_timeseries_bundle(write_files=False)
|
bundle = build_quant_timeseries_bundle(write_files=False)
|
||||||
if sym_q:
|
if sym_q:
|
||||||
@@ -490,13 +617,22 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
or inst["entity_eng"].upper() == sym_q
|
or inst["entity_eng"].upper() == sym_q
|
||||||
or str(inst["entity_ing_aq"]) == sym_q.lstrip("#DEX ")
|
or str(inst["entity_ing_aq"]) == sym_q.lstrip("#DEX ")
|
||||||
]
|
]
|
||||||
return {
|
out_res: dict[str, Any] = {
|
||||||
"version": bundle["version"],
|
"version": bundle["version"],
|
||||||
"periodicity_gate": bundle["periodicity_gate"],
|
"periodicity_gate": bundle["periodicity_gate"],
|
||||||
"selected_lens": lens_q,
|
"selected_lens": lens_q,
|
||||||
"instruments": matched,
|
"instruments": matched,
|
||||||
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
|
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
|
||||||
}
|
}
|
||||||
|
if bool(arguments.get("include_card")) and matched:
|
||||||
|
from hyperstitionstud_io.quant.cards import export_ticker_stats_card_pair
|
||||||
|
|
||||||
|
out_res["stats_card"] = export_ticker_stats_card_pair(
|
||||||
|
symbol=matched[0]["symbol"],
|
||||||
|
lens=lens_q,
|
||||||
|
include_base64_png=True,
|
||||||
|
)
|
||||||
|
return out_res
|
||||||
return {
|
return {
|
||||||
"version": bundle["version"],
|
"version": bundle["version"],
|
||||||
"periodicity_gate": bundle["periodicity_gate"],
|
"periodicity_gate": bundle["periodicity_gate"],
|
||||||
@@ -508,4 +644,418 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
|
"ipld_dag_json_cidv1": bundle["ipld_dag_json_cidv1"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if name == "hs_generate_ticker_stats_card":
|
||||||
|
from hyperstitionstud_io.quant.cards import export_ticker_stats_card_pair
|
||||||
|
|
||||||
|
sym_c = str(arguments.get("symbol", "NVDA")).strip() or "NVDA"
|
||||||
|
lens_c = str(arguments.get("lens", "tierzoo_ecology")).strip() or "tierzoo_ecology"
|
||||||
|
dt_c = str(arguments.get("date_utc", "")).strip() or None
|
||||||
|
inc_b64 = bool(arguments.get("include_base64_png", True))
|
||||||
|
return export_ticker_stats_card_pair(
|
||||||
|
symbol=sym_c,
|
||||||
|
lens=lens_c,
|
||||||
|
date_utc=dt_c,
|
||||||
|
include_base64_png=inc_b64,
|
||||||
|
)
|
||||||
|
|
||||||
|
if name == "hs_inspect_macro_indicators":
|
||||||
|
from hyperstitionstud_io.quant.macro import build_macro_indicators_bundle
|
||||||
|
|
||||||
|
slug_f = str(arguments.get("indicator_slug", "")).strip().lower()
|
||||||
|
m_path = cfg.core_dir / "site" / "quant" / "real-macro-indicators.json"
|
||||||
|
if m_path.is_file():
|
||||||
|
m_bundle = load_json_cached(m_path, copy_result=False)
|
||||||
|
else:
|
||||||
|
m_bundle = build_macro_indicators_bundle(allow_live_network=False, write_files=False)
|
||||||
|
if slug_f and slug_f in (m_bundle.get("series") or {}):
|
||||||
|
return {
|
||||||
|
"version": m_bundle["version"],
|
||||||
|
"synthetic_data_eliminated": m_bundle["synthetic_data_eliminated"],
|
||||||
|
"indicator": m_bundle["series"][slug_f],
|
||||||
|
"derived_indicators": m_bundle["derived_indicators"],
|
||||||
|
"ipld_dag_json_cidv1": m_bundle["ipld_dag_json_cidv1"],
|
||||||
|
}
|
||||||
|
return m_bundle
|
||||||
|
|
||||||
|
if name == "hs_generate_daily_portfolio_brief":
|
||||||
|
from hyperstitionstud_io.quant.daily_brief import build_daily_portfolio_brief
|
||||||
|
|
||||||
|
b_path = cfg.core_dir / "site" / "quant" / "daily-brief-latest.json"
|
||||||
|
if bool(arguments.get("refresh")) or not b_path.is_file():
|
||||||
|
return build_daily_portfolio_brief(allow_live_network=False, write_files=False)
|
||||||
|
return load_json_cached(b_path, copy_result=False)
|
||||||
|
|
||||||
|
if name == "hs_inspect_engineering_and_math_docs":
|
||||||
|
from hyperstitionstud_io.publishing.engineering_docs import (
|
||||||
|
ENGINEERING_GUILE_CARTRIDGES,
|
||||||
|
introspect_engineering_manifest,
|
||||||
|
)
|
||||||
|
from hyperstitionstud_io.publishing.math_docs import (
|
||||||
|
MATH_GUILE_CARTRIDGES,
|
||||||
|
introspect_math_manifest,
|
||||||
|
)
|
||||||
|
|
||||||
|
dom = str(arguments.get("domain", "all")).strip().lower()
|
||||||
|
u_filt = str(arguments.get("unit_filter", "")).strip().upper()
|
||||||
|
inc_cart = bool(arguments.get("include_polyglot_cartridges", True))
|
||||||
|
|
||||||
|
eng_p = cfg.core_dir / "site" / "engineering" / "engineering-manifest.json"
|
||||||
|
math_p = cfg.core_dir / "site" / "math" / "math-manifest.json"
|
||||||
|
eng_m = load_json_cached(eng_p, copy_result=False) if eng_p.is_file() else introspect_engineering_manifest()
|
||||||
|
math_m = load_json_cached(math_p, copy_result=False) if math_p.is_file() else introspect_math_manifest()
|
||||||
|
|
||||||
|
out_docs: dict[str, Any] = {"version": eng_m["version"], "domain": dom}
|
||||||
|
if dom in ("all", "engineering"):
|
||||||
|
out_docs["engineering"] = eng_m
|
||||||
|
if inc_cart:
|
||||||
|
out_docs["engineering_polyglot_cartridges"] = ENGINEERING_GUILE_CARTRIDGES
|
||||||
|
if dom in ("all", "math"):
|
||||||
|
out_docs["math"] = math_m
|
||||||
|
if inc_cart:
|
||||||
|
out_docs["math_polyglot_cartridges"] = MATH_GUILE_CARTRIDGES
|
||||||
|
if u_filt:
|
||||||
|
matched_units: dict[str, Any] = {}
|
||||||
|
for k, v in ENGINEERING_GUILE_CARTRIDGES.items():
|
||||||
|
if u_filt in k.upper() or u_filt in v["title"].upper():
|
||||||
|
matched_units[f"engineering:{k}"] = v
|
||||||
|
for k, v in MATH_GUILE_CARTRIDGES.items():
|
||||||
|
if u_filt in k.upper() or u_filt in v["title"].upper():
|
||||||
|
matched_units[f"math:{k}"] = v
|
||||||
|
out_docs["filtered_units"] = matched_units
|
||||||
|
return out_docs
|
||||||
|
|
||||||
|
if name == "hs_inspect_documentation_and_manuals":
|
||||||
|
import tarfile
|
||||||
|
|
||||||
|
cat = str(arguments.get("category", "all")).strip().lower()
|
||||||
|
doc_id = str(arguments.get("doc_id", "")).strip()
|
||||||
|
sq = str(arguments.get("search_query", "")).strip().lower()
|
||||||
|
inc_md = bool(arguments.get("include_full_markdown", False)) or bool(doc_id)
|
||||||
|
|
||||||
|
manuals_list = [
|
||||||
|
{
|
||||||
|
"id": "OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH",
|
||||||
|
"category": "manuals",
|
||||||
|
"md_path": cfg.core_dir / "site" / "quant" / "OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.md",
|
||||||
|
"web_pdf_route": "/quant/OPERATORS-MANUAL-QUANT-TIMESERIES-WORKBENCH.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH",
|
||||||
|
"category": "manuals",
|
||||||
|
"md_path": cfg.knowledge_graph_dir / "OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.md",
|
||||||
|
"web_pdf_route": "/graph/OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES",
|
||||||
|
"category": "manuals",
|
||||||
|
"md_path": cfg.knowledge_graph_dir / "docs" / "OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.md",
|
||||||
|
"web_pdf_route": "/graph/docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE",
|
||||||
|
"category": "manuals",
|
||||||
|
"md_path": cfg.knowledge_graph_dir / "docs" / "VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.md",
|
||||||
|
"web_pdf_route": "/graph/docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ONBOARDING-INGGLISH-AQ",
|
||||||
|
"category": "manuals",
|
||||||
|
"md_path": cfg.ci_build_dir / "ONBOARDING-INGGLISH-AQ.md",
|
||||||
|
"web_pdf_route": "/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "specification-concentric-eti-tier-ring-radar-d-periphery",
|
||||||
|
"category": "proposals_and_specs",
|
||||||
|
"md_path": cfg.knowledge_graph_dir / "docs" / "specification-concentric-eti-tier-ring-radar-d-periphery.md",
|
||||||
|
"web_pdf_route": "/graph/docs/specification-concentric-eti-tier-ring-radar-d-periphery.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "proposal-fund-manager-novel-investment-discovery",
|
||||||
|
"category": "proposals_and_specs",
|
||||||
|
"md_path": cfg.zoology_dir / "proposal-fund-manager-novel-investment-discovery.md",
|
||||||
|
"web_pdf_route": "/zoology/proposal-fund-manager-novel-investment-discovery.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "proposal-corporate-board-technocapital-allocation",
|
||||||
|
"category": "proposals_and_specs",
|
||||||
|
"md_path": cfg.zoology_dir / "proposal-corporate-board-technocapital-allocation.md",
|
||||||
|
"web_pdf_route": "/zoology/proposal-corporate-board-technocapital-allocation.pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "m7-emergent-subclass-bidirectional-aq-nucleation",
|
||||||
|
"category": "proposals_and_specs",
|
||||||
|
"md_path": cfg.zoology_dir / "m7-emergent-subclass-bidirectional-aq-nucleation.md",
|
||||||
|
"web_pdf_route": "/zoology/m7-emergent-subclass-bidirectional-aq-nucleation.pdf",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
plan_search_dirs = [
|
||||||
|
cfg.knowledge_graph_dir / "docs",
|
||||||
|
cfg.knowledge_graph_dir / "docs" / "plans" / "active",
|
||||||
|
cfg.knowledge_graph_dir / "docs" / "plans" / "piecewise",
|
||||||
|
cfg.knowledge_graph_dir / "docs" / "plans" / "inactive",
|
||||||
|
]
|
||||||
|
for p_dir in plan_search_dirs:
|
||||||
|
if not p_dir.is_dir():
|
||||||
|
continue
|
||||||
|
rel_sub = p_dir.relative_to(cfg.knowledge_graph_dir / "docs").as_posix()
|
||||||
|
route_prefix = "/graph/docs" if rel_sub == "." else f"/graph/docs/{rel_sub}"
|
||||||
|
for p_plan in sorted(p_dir.glob("PLAN-*.md")):
|
||||||
|
manuals_list.append({
|
||||||
|
"id": p_plan.stem,
|
||||||
|
"category": "active_and_deferred_plans",
|
||||||
|
"md_path": p_plan,
|
||||||
|
"web_pdf_route": f"{route_prefix}/{p_plan.stem}.pdf",
|
||||||
|
})
|
||||||
|
|
||||||
|
docs_out: list[dict[str, Any]] = []
|
||||||
|
for entry in manuals_list:
|
||||||
|
if cat not in ("all", entry["category"]):
|
||||||
|
continue
|
||||||
|
if doc_id and doc_id.lower() not in entry["id"].lower():
|
||||||
|
continue
|
||||||
|
mp: Path = entry["md_path"]
|
||||||
|
if not mp.is_file():
|
||||||
|
continue
|
||||||
|
txt = mp.read_text(encoding="utf-8")
|
||||||
|
if sq and sq not in txt.lower() and sq not in entry["id"].lower():
|
||||||
|
continue
|
||||||
|
item_d: dict[str, Any] = {
|
||||||
|
"id": entry["id"],
|
||||||
|
"category": entry["category"],
|
||||||
|
"web_pdf_route": entry["web_pdf_route"],
|
||||||
|
"char_count": len(txt),
|
||||||
|
}
|
||||||
|
if sq:
|
||||||
|
item_d["matched_lines"] = [ln for ln in txt.splitlines() if sq in ln.lower()][:10]
|
||||||
|
if inc_md:
|
||||||
|
item_d["markdown"] = txt
|
||||||
|
docs_out.append(item_d)
|
||||||
|
|
||||||
|
archived_out: list[dict[str, Any]] = []
|
||||||
|
if cat in ("all", "archived_plans"):
|
||||||
|
from hyperstitionstud_io.publishing.archive_rotator import (
|
||||||
|
BUNDLE_FILENAME,
|
||||||
|
INACTIVE_BUNDLE_FILENAME,
|
||||||
|
INACTIVE_MANIFEST_FILENAME,
|
||||||
|
MANIFEST_FILENAME,
|
||||||
|
read_member_from_git_history,
|
||||||
|
)
|
||||||
|
|
||||||
|
arc_sources = [
|
||||||
|
(
|
||||||
|
cfg.knowledge_graph_dir / "docs" / "archive",
|
||||||
|
BUNDLE_FILENAME,
|
||||||
|
MANIFEST_FILENAME,
|
||||||
|
"archived_completed",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
cfg.zoology_dir / "docs" / "archive",
|
||||||
|
BUNDLE_FILENAME,
|
||||||
|
MANIFEST_FILENAME,
|
||||||
|
"archived_completed",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
cfg.knowledge_graph_dir / "docs" / "plans" / "inactive",
|
||||||
|
INACTIVE_BUNDLE_FILENAME,
|
||||||
|
INACTIVE_MANIFEST_FILENAME,
|
||||||
|
"archived_inactive",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
for arc_dir, b_fname, m_fname, cls_tag in arc_sources:
|
||||||
|
tgz_p = arc_dir / b_fname
|
||||||
|
man_p = arc_dir / m_fname
|
||||||
|
man_obj: dict[str, Any] = {}
|
||||||
|
if man_p.is_file():
|
||||||
|
try:
|
||||||
|
man_obj = load_json_cached(man_p, copy_result=False)
|
||||||
|
except Exception:
|
||||||
|
man_obj = {}
|
||||||
|
cit_by_name = {
|
||||||
|
str(it.get("name")): it
|
||||||
|
for it in (man_obj.get("members") or []) + (man_obj.get("long_term_git_storage_citations") or [])
|
||||||
|
if it.get("name")
|
||||||
|
}
|
||||||
|
|
||||||
|
seen_names: set[str] = set()
|
||||||
|
if tgz_p.is_file():
|
||||||
|
with tarfile.open(tgz_p, "r:gz") as tf:
|
||||||
|
for m in safe_tar_members(tf):
|
||||||
|
if not m.name.endswith(".md"):
|
||||||
|
continue
|
||||||
|
seen_names.add(m.name)
|
||||||
|
stem = Path(m.name).stem
|
||||||
|
if doc_id and doc_id.lower() not in stem.lower():
|
||||||
|
continue
|
||||||
|
f_obj = tf.extractfile(m)
|
||||||
|
if f_obj is None:
|
||||||
|
continue
|
||||||
|
m_txt = f_obj.read().decode("utf-8", errors="replace")
|
||||||
|
if sq and sq not in m_txt.lower() and sq not in stem.lower():
|
||||||
|
continue
|
||||||
|
cit_info = cit_by_name.get(m.name) or {}
|
||||||
|
arc_item: dict[str, Any] = {
|
||||||
|
"id": stem,
|
||||||
|
"category": "archived_plans",
|
||||||
|
"classification": cit_info.get("classification", cls_tag),
|
||||||
|
"storage_tier": "active_tar_gz_bundle",
|
||||||
|
"bundle": str(tgz_p.name),
|
||||||
|
"member_name": m.name,
|
||||||
|
"char_count": len(m_txt),
|
||||||
|
"git_citation_url": cit_info.get("git_citation_url"),
|
||||||
|
}
|
||||||
|
if sq:
|
||||||
|
arc_item["matched_lines"] = [ln for ln in m_txt.splitlines() if sq in ln.lower()][:10]
|
||||||
|
if inc_md:
|
||||||
|
arc_item["markdown"] = m_txt
|
||||||
|
archived_out.append(arc_item)
|
||||||
|
|
||||||
|
# Also search long_term_git_storage_citations via local .git fallback
|
||||||
|
for lt in man_obj.get("long_term_git_storage_citations") or []:
|
||||||
|
lt_name = str(lt.get("name") or "")
|
||||||
|
if not lt_name.endswith(".md") or lt_name in seen_names:
|
||||||
|
continue
|
||||||
|
stem = Path(lt_name).stem
|
||||||
|
if doc_id and doc_id.lower() not in stem.lower():
|
||||||
|
continue
|
||||||
|
raw_b = read_member_from_git_history(
|
||||||
|
archive_dir=arc_dir,
|
||||||
|
member_name=lt_name,
|
||||||
|
citation_meta=lt,
|
||||||
|
bundle_filename=b_fname,
|
||||||
|
)
|
||||||
|
if raw_b is None:
|
||||||
|
continue
|
||||||
|
m_txt = raw_b.decode("utf-8", errors="replace")
|
||||||
|
if sq and sq not in m_txt.lower() and sq not in stem.lower():
|
||||||
|
continue
|
||||||
|
lt_item: dict[str, Any] = {
|
||||||
|
"id": stem,
|
||||||
|
"category": "archived_plans",
|
||||||
|
"classification": lt.get("classification", cls_tag),
|
||||||
|
"storage_tier": "git_source_control_long_term",
|
||||||
|
"bundle": str(tgz_p.name),
|
||||||
|
"member_name": lt_name,
|
||||||
|
"char_count": len(m_txt),
|
||||||
|
"git_citation_url": lt.get("git_citation_url"),
|
||||||
|
}
|
||||||
|
if sq:
|
||||||
|
lt_item["matched_lines"] = [ln for ln in m_txt.splitlines() if sq in ln.lower()][:10]
|
||||||
|
if inc_md:
|
||||||
|
lt_item["markdown"] = m_txt
|
||||||
|
archived_out.append(lt_item)
|
||||||
|
|
||||||
|
res_doc: dict[str, Any] = {
|
||||||
|
"category_filter": cat,
|
||||||
|
"doc_id_filter": doc_id,
|
||||||
|
"search_query": sq,
|
||||||
|
"documents_count": len(docs_out),
|
||||||
|
"documents": docs_out,
|
||||||
|
"archived_plans_count": len(archived_out),
|
||||||
|
"archived_plans": archived_out,
|
||||||
|
}
|
||||||
|
if cat in ("all", "learn_and_tutorials", "quant_glossary_popovers"):
|
||||||
|
q_app_js = (cfg.core_dir / "site" / "quant" / "quant-app.js").read_text(encoding="utf-8")
|
||||||
|
pop_keys = re.findall(r'"([a-z0-9_]+)":\s*\{\s*title:\s*"([^"]+)"', q_app_js)
|
||||||
|
res_doc["quant_glossary_popovers"] = [{"key": k, "title": t} for k, t in pop_keys]
|
||||||
|
res_doc["quant_glossary_popover_count"] = len(pop_keys)
|
||||||
|
return res_doc
|
||||||
|
|
||||||
|
if name == "hs_evaluate_guile_scheme_z_calculus":
|
||||||
|
from hyperstitionstud_io.publishing.polyglot_sandbox import evaluate_polyglot_sandbox
|
||||||
|
|
||||||
|
expr_s = str(arguments.get("expression", '(aq-base36 "LEMUR")')).strip() or '(aq-base36 "LEMUR")'
|
||||||
|
lang_s = str(arguments.get("lang", "guile")).strip().lower() or "guile"
|
||||||
|
pref_f = bool(arguments.get("prefer_float", False))
|
||||||
|
inc_tr = bool(arguments.get("include_trace", True))
|
||||||
|
inc_pr = bool(arguments.get("include_prelude_source", False))
|
||||||
|
|
||||||
|
eval_res = evaluate_polyglot_sandbox(
|
||||||
|
expression=expr_s,
|
||||||
|
lang=lang_s,
|
||||||
|
prefer_float=pref_f,
|
||||||
|
include_trace=inc_tr,
|
||||||
|
)
|
||||||
|
if inc_pr:
|
||||||
|
pr_p = cfg.core_dir / "src" / "hyperstitionstud_io" / "publishing" / "guile_prelude.scm"
|
||||||
|
if pr_p.is_file():
|
||||||
|
eval_res["guile_prelude_source"] = pr_p.read_text(encoding="utf-8")
|
||||||
|
return eval_res
|
||||||
|
|
||||||
|
if name == "hs_query_workspace_catalog_and_release_state":
|
||||||
|
from hyperstitionstud_io.ci.public_regression import get_default_baseline_cache_path
|
||||||
|
from hyperstitionstud_io.db.sqlite_meta import (
|
||||||
|
get_api_telemetry_summary,
|
||||||
|
get_longitudinal_telemetry_summary,
|
||||||
|
query_coordinate_join,
|
||||||
|
query_fts_catalog,
|
||||||
|
query_registry_manifests,
|
||||||
|
query_timeseries_bars,
|
||||||
|
)
|
||||||
|
from hyperstitionstud_io.version_sync import compute_programmatic_version_bump
|
||||||
|
|
||||||
|
fts_q = str(arguments.get("fts_query", "")).strip()
|
||||||
|
doc_t = str(arguments.get("doc_type", "all")).strip() or "all"
|
||||||
|
reg_q = str(arguments.get("registry", "")).strip()
|
||||||
|
aq_i = int(arguments.get("aq_int", 0) or 0)
|
||||||
|
sym_q = str(arguments.get("symbol", "")).strip()
|
||||||
|
st_d = str(arguments.get("start_date", "")).strip() or None
|
||||||
|
en_d = str(arguments.get("end_date", "")).strip() or None
|
||||||
|
min_p = float(arguments["min_points"]) if "min_points" in arguments and arguments["min_points"] else None
|
||||||
|
inc_bump = bool(arguments.get("include_version_bump_heuristics", True))
|
||||||
|
inc_base = bool(arguments.get("include_baseline_and_telemetry", True))
|
||||||
|
|
||||||
|
out_cat: dict[str, Any] = {"ok": True}
|
||||||
|
if fts_q:
|
||||||
|
try:
|
||||||
|
out_cat["fts_search"] = query_fts_catalog(fts_q, doc_type=doc_t, limit=15)
|
||||||
|
except Exception:
|
||||||
|
out_cat["fts_search"] = call_mcp_tool("hs_search_glossary_encyclopedia", {"query": fts_q, "limit": 10})
|
||||||
|
if reg_q:
|
||||||
|
try:
|
||||||
|
out_cat["registry_manifests"] = query_registry_manifests(registry=None if reg_q == "all" else reg_q)
|
||||||
|
except Exception:
|
||||||
|
out_cat["registry_manifests"] = []
|
||||||
|
if aq_i > 0:
|
||||||
|
try:
|
||||||
|
out_cat["coordinate_join"] = query_coordinate_join(aq_i)
|
||||||
|
except Exception:
|
||||||
|
out_cat["coordinate_join"] = {"coordinate_aq": aq_i}
|
||||||
|
if sym_q or st_d or en_d or min_p is not None:
|
||||||
|
try:
|
||||||
|
out_cat["timeseries_bars"] = query_timeseries_bars(
|
||||||
|
symbol=sym_q or None,
|
||||||
|
start_date=st_d,
|
||||||
|
end_date=en_d,
|
||||||
|
min_points=min_p,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
out_cat["timeseries_bars"] = []
|
||||||
|
if inc_bump:
|
||||||
|
out_cat["version_bump_heuristics"] = compute_programmatic_version_bump()
|
||||||
|
if inc_base:
|
||||||
|
bp = get_default_baseline_cache_path()
|
||||||
|
if bp.is_file():
|
||||||
|
b_obj = load_json_cached(bp, copy_result=False)
|
||||||
|
out_cat["internal_test_baseline"] = {
|
||||||
|
"expected_version": b_obj.get("expected_version"),
|
||||||
|
"expected_mcp_tool_count": b_obj.get("expected_mcp_tool_count"),
|
||||||
|
"expected_cidv1_by_artifact": b_obj.get("expected_cidv1_by_artifact"),
|
||||||
|
"erofs_protect_system_strict_audit": b_obj.get("erofs_protect_system_strict_audit"),
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
out_cat["api_telemetry_summary"] = get_api_telemetry_summary()
|
||||||
|
if arguments.get("include_rotated_history"):
|
||||||
|
out_cat["longitudinal_telemetry_summary"] = get_longitudinal_telemetry_summary()
|
||||||
|
except Exception:
|
||||||
|
out_cat["api_telemetry_summary"] = {"quiescent": True}
|
||||||
|
return out_cat
|
||||||
|
|
||||||
|
if name == "hs_generate_highlights_summary":
|
||||||
|
from hyperstitionstud_io.publishing.highlights import build_recent_highlights_summary
|
||||||
|
|
||||||
|
foc = str(arguments.get("focus", "both")).strip() or "both"
|
||||||
|
m_ch = int(arguments.get("max_chars", 1100))
|
||||||
|
return build_recent_highlights_summary(focus=foc, max_chars=m_ch)
|
||||||
|
|
||||||
raise ValueError(f"Unknown MCP tool: {name}")
|
raise ValueError(f"Unknown MCP tool: {name}")
|
||||||
@@ -11,20 +11,15 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||||
|
|
||||||
_FALLBACK_PATH = Path(__file__).resolve().parent / "cmudict_fallback.json"
|
_FALLBACK_PATH = Path(__file__).resolve().parent / "cmudict_fallback.json"
|
||||||
_FALLBACK_CACHE: dict[str, str] | None = None
|
|
||||||
|
|
||||||
|
|
||||||
def _load_fallback() -> dict[str, str]:
|
def _load_fallback() -> dict[str, str]:
|
||||||
global _FALLBACK_CACHE
|
|
||||||
if _FALLBACK_CACHE is None:
|
|
||||||
if _FALLBACK_PATH.is_file():
|
if _FALLBACK_PATH.is_file():
|
||||||
_FALLBACK_CACHE = json.loads(_FALLBACK_PATH.read_text(encoding="utf-8"))
|
return load_json_cached(_FALLBACK_PATH, copy_result=False)
|
||||||
else:
|
return {}
|
||||||
_FALLBACK_CACHE = {}
|
|
||||||
return _FALLBACK_CACHE
|
|
||||||
|
|
||||||
|
|
||||||
def translate_batch(terms: list[str], workdir: str | Path | None = None) -> dict[str, str]:
|
def translate_batch(terms: list[str], workdir: str | Path | None = None) -> dict[str, str]:
|
||||||
|
|||||||
@@ -0,0 +1,209 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
src/hyperstitionstud_io/publishing/architecture_atlas.py
|
||||||
|
Release v2.18.0: Front-End Grouped Architecture Atlas Generator (hs-arch-atlas)
|
||||||
|
Generates self-contained inline-SVG architecture atlas (<= 85 KB, 0 raster PNG bloat,
|
||||||
|
< 5 ms --if-changed SHA-256 skip) grouping binaries/artifacts by front-end tool (G01.QUANT .. G08.MCP_DEPLOY)
|
||||||
|
with clickable boundary port pills.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import hashlib
|
||||||
|
from pathlib import Path
|
||||||
|
from hyperstitionstud_io.config import load_workspace_config
|
||||||
|
|
||||||
|
ATLAS_HTML_TEMPLATE = """<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>hyperstitionstud.io Front-End Grouped Architecture Atlas (v2.18.0)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg: #0f172a;
|
||||||
|
--card-bg: #1e293b;
|
||||||
|
--border: #334155;
|
||||||
|
--text-main: #f8fafc;
|
||||||
|
--text-muted: #94a3b8;
|
||||||
|
--accent: #f59e0b;
|
||||||
|
--accent-hover: #fbbf24;
|
||||||
|
--font-mono: "DejaVu Sans Mono", monospace;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-main);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
margin: 0;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
margin: 0;
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
.subtitle {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
.atlas-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
.tool-card {
|
||||||
|
background: var(--card-bg);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
}
|
||||||
|
.tool-card h2 {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
margin-top: 0;
|
||||||
|
color: var(--text-main);
|
||||||
|
border-bottom: 1px dashed var(--border);
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 0 1rem 0;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin-bottom: 0.4rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.port-pill {
|
||||||
|
background: #0284c7;
|
||||||
|
color: white;
|
||||||
|
font-size: 0.65rem;
|
||||||
|
padding: 0.1rem 0.4rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
margin-top: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
padding-top: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div>
|
||||||
|
<h1>[ ⚚ FRONT-END GROUPED ARCHITECTURE ATLAS ]</h1>
|
||||||
|
<div class="subtitle">hyperstitionstud.io v2.18.0 • Zero Raster Bloat • 8 Tool Groups (G01–G08)</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="/" style="color: var(--accent); text-decoration: none; font-size: 0.78rem;">Portal Home (/)</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="atlas-grid" id="atlasGrid">
|
||||||
|
<!-- G01.QUANT .. G08.MCP_DEPLOY -->
|
||||||
|
<div class="tool-card" id="g01-quant">
|
||||||
|
<h2>G01.QUANT (/quant/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>quant-app.js</span> <span class="port-pill">IN <- Fred/Timeseries</span></li>
|
||||||
|
<li><span>quant-tutorials.js</span> <span class="port-pill">OUT -> WebAudio / Speech</span></li>
|
||||||
|
<li><span>collector.py</span> <span class="port-pill">IN <- Market APIs</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g02-calc-ci">
|
||||||
|
<h2>G02.CALC_CI (/calc/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>haiperdohp-jemaytreeah</span> <span class="port-pill">IN <- Ingglish G2P</span></li>
|
||||||
|
<li><span>ci_provision_ingglish.py</span> <span class="port-pill">OUT -> CI Artifacts</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g03-graph">
|
||||||
|
<h2>G03.GRAPH (/graph/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>encyclopedia-graph.json</span> <span class="port-pill">IN <- SQLite FTS5</span></li>
|
||||||
|
<li><span>graph-data.js</span> <span class="port-pill">OUT -> Canvas 2D / Radar</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g04-zoology">
|
||||||
|
<h2>G04.ZOOLOGY (/zoology/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>technocapital-singularity-zoology</span> <span class="port-pill">IN <- Dossiers S1-S6</span></li>
|
||||||
|
<li><span>encyclopedia manifests</span> <span class="port-pill">OUT -> PDF Manuals</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g05-archive">
|
||||||
|
<h2>G05.ARCHIVE (/archive/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>archive_rotator.py</span> <span class="port-pill">IN <- FIFO Tarballs</span></li>
|
||||||
|
<li><span>archive-manifest.json</span> <span class="port-pill">OUT -> Git Citations</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g06-eng-math">
|
||||||
|
<h2>G06.ENG_MATH (/engineering/ & /math/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>engineering_docs.py</span> <span class="port-pill">IN <- Polyglot Lens</span></li>
|
||||||
|
<li><span>math_docs.py</span> <span class="port-pill">OUT -> Z-Calculus REPL</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g07-portal-learn">
|
||||||
|
<h2>G07.PORTAL_LEARN (/, /learn/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>site/index.html</span> <span class="port-pill">IN <- Group 3 Basalt</span></li>
|
||||||
|
<li><span>site/learn/index.html</span> <span class="port-pill">OUT -> Grimoiric Folios</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tool-card" id="g08-mcp-deploy">
|
||||||
|
<h2>G08.MCP_DEPLOY (/mcp/, /api/v1/)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><span>mcp/{server,tools,rest}.py</span> <span class="port-pill">IN <- MCP JSON-RPC</span></li>
|
||||||
|
<li><span>deploy/sync-vps-repos.sh</span> <span class="port-pill">OUT -> Tmpfs / Caddy</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
hyperstitionstud.io Architecture Atlas • Verified via hs-arch-atlas (Plan #67)
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
|
||||||
|
def generate_architecture_atlas(output_html_path: Path, output_json_path: Path) -> str:
|
||||||
|
html_content = ATLAS_HTML_TEMPLATE.strip()
|
||||||
|
digest = hashlib.sha256(html_content.encode("utf-8")).hexdigest()
|
||||||
|
|
||||||
|
output_html_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
output_html_path.write_text(html_content, encoding="utf-8")
|
||||||
|
|
||||||
|
receipt = {
|
||||||
|
"version": "2.18.0",
|
||||||
|
"atlas_sha256": digest,
|
||||||
|
"size_bytes": len(html_content.encode("utf-8")),
|
||||||
|
"tool_groups": ["G01.QUANT", "G02.CALC_CI", "G03.GRAPH", "G04.ZOOLOGY", "G05.ARCHIVE", "G06.ENG_MATH", "G07.PORTAL_LEARN", "G08.MCP_DEPLOY"]
|
||||||
|
}
|
||||||
|
output_json_path.write_text(json.dumps(receipt, indent=2), encoding="utf-8")
|
||||||
|
return digest
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
cfg = load_workspace_config()
|
||||||
|
graph_docs_dir = cfg.workspace_root / "encyclopedia-knowledge-graph" / "docs"
|
||||||
|
html_out = graph_docs_dir / "architecture-atlas.html"
|
||||||
|
json_out = graph_docs_dir / "architecture-atlas.json"
|
||||||
|
|
||||||
|
digest = generate_architecture_atlas(html_out, json_out)
|
||||||
|
print(f"[OK] Generated architecture atlas at {html_out} (SHA-256: {digest[:12]})")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||