Files
hyperstitionstudio-core/README.md
T

80 lines
6.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# `hyperstitionstudio-core` (`hyperstitionstud_io.*` — `v2.17.1`)
<!-- 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 &rarr; [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 7 tracked module/artifact surface(s)
> - **Touched Files / Surfaces:** `deploy/hyperstition-closing-bell-harvest.service`, `deploy/hyperstition-closing-bell-harvest.timer`, `deploy/run-vps-data-production.sh`, `src/hyperstitionstud_io/mcp/tools.py`, `src/hyperstitionstud_io/quant/collector.py`, `src/hyperstitionstud_io/quant/daily_brief.py`, `tests/test_core_suite.py`
> - **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`).
---
## 5-Minute New-User Onboarding (Public HTTP Clone into Any Directory)
```bash
# 1. Create a parent workspace folder anywhere on your machine
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace
# 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/ingglish-hyperdope-gematria.git
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
git clone https://git.libre.audio/seasharp/encyclopedia-knowledge-graph.git
git clone https://git.libre.audio/seasharp/haiperdohp-jemaytreeah.git
git clone -b feat/ingglish-aq-corpus https://git.libre.audio/seasharp/ingglish-hyperdope-ci.git
# 2b. Supply the 3 untracked runtime files listed in haiperdohp-jemaytreeah/.gitignore (config.js, db.json, db_lite.json)
cp haiperdohp-jemaytreeah/config.default.js haiperdohp-jemaytreeah/config.js
(cd haiperdohp-jemaytreeah && python3 tools/generate_db_json.py db.txt db.json)
# 3. Create & activate a local Python virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r hyperstitionstudio-core/requirements.txt
pip install --no-deps -e ./hyperstitionstudio-core
# 4. Copy the location-independent workspace configuration and run the health check
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
hs-doctor
# 5. Run the 7-suite verification test runner (including ProtectSystem=strict EROFS introspection)
python3 hyperstitionstudio-core/tests/test_core_suite.py
# 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
```
---
## Key Architecture & Capabilities (`v2.17.1`)
1. **17 CLI Entrypoints (`pyproject.toml [project.scripts]`):**
- `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`.
2. **20 Stateless Read-Only MCP & OpenAPI 3.1 REST Tools + HTTP `ETag` (`304 Not Modified`) Caching:**
- 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/*`.
3. **Interactive Web Workbenches (`https://hyperstitionstud.io/`):**
- `/` (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).
4. **4,943-Entry Offline `CMUdict` Phonetics Lookup (`cmudict_fallback.json`):**
- Translates `Gen 0` English tokens to `Gen 1` Ingglish 100% offline with zero network calls.
5. **One-Shot `900×1260` Ticker Stats Cards (`.png` + `.json`) via cURL, CLI, Chatbot REST API & MCP:**
```bash
# (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 .
```