Spaces:
Running
Running
chore(sync): mirror backend .py + Dockerfile to Space (hf-sync-backend)
Browse filesAutomated backend sync from szl-holdings/a11oy main via hf-sync-backend.
Updated (differed from the Space): Dockerfile, serve.py
Deleted (gone from the repo + Dockerfile COPY set): (none)
Keeps the Space-built backend (serve.py + the Dockerfile-COPY'd .py
modules) identical to GitHub main so the Space never rebuilds from a
stale backend, new endpoints don't 404 there, and orphaned modules
removed from the repo don't linger in the Space tree.
- Dockerfile +8 -0
- serve.py +33 -0
Dockerfile
CHANGED
|
@@ -130,6 +130,14 @@ COPY static/a11oy_operator_organ.js ./static/a11oy_operator_organ.js
|
|
| 130 |
COPY static/vendor3d/three.module.min.js ./static/vendor3d/three.module.min.js
|
| 131 |
COPY static/vendor3d/OrbitControls.js ./static/vendor3d/OrbitControls.js
|
| 132 |
COPY static/vendor3d/THREE_LICENSE.txt ./static/vendor3d/THREE_LICENSE.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
# ADDITIVE: batch-2 sovereign security data module (imported by serve.py; try/except-guarded).
|
| 134 |
# ADDITIVE: a11oy.code conversational orchestrator module (imported by serve.py).
|
| 135 |
# ADDITIVE (a11oy Code agentic core, 2026-06-10): the GENUINELY-agentic loop + agentic
|
|
|
|
| 130 |
COPY static/vendor3d/three.module.min.js ./static/vendor3d/three.module.min.js
|
| 131 |
COPY static/vendor3d/OrbitControls.js ./static/vendor3d/OrbitControls.js
|
| 132 |
COPY static/vendor3d/THREE_LICENSE.txt ./static/vendor3d/THREE_LICENSE.txt
|
| 133 |
+
# ADDITIVE (cathedral unification, GitHub-aligned): the ONE canonical genius
|
| 134 |
+
# cathedral served at /cathedral — IDENTICAL "Constellation · Khipu" scene as the
|
| 135 |
+
# SZLHOLDINGS/cathedral HF static space. cathedral_genius.html is that HF
|
| 136 |
+
# index.html byte-for-byte except its two asset paths (importmap -> /hero/vendor3d,
|
| 137 |
+
# module src -> /cathedral/app.js). app.js is the canonical ES module, served
|
| 138 |
+
# sovereign in-image. Reuses the vendor3d Three.js r160 above — 0 CDN.
|
| 139 |
+
COPY cathedral_genius.html ./cathedral_genius.html
|
| 140 |
+
COPY static/cathedral_app.js ./static/cathedral_app.js
|
| 141 |
# ADDITIVE: batch-2 sovereign security data module (imported by serve.py; try/except-guarded).
|
| 142 |
# ADDITIVE: a11oy.code conversational orchestrator module (imported by serve.py).
|
| 143 |
# ADDITIVE (a11oy Code agentic core, 2026-06-10): the GENUINELY-agentic loop + agentic
|
serve.py
CHANGED
|
@@ -6441,6 +6441,39 @@ async def _hero_vendor(fname: str) -> Response:
|
|
| 6441 |
return JSONResponse({"error": "vendor missing"}, status_code=404)
|
| 6442 |
|
| 6443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6444 |
|
| 6445 |
# --- Doctrine v13 organ page routes (ADDITIVE; explicit, win over SPA catch-all) ---
|
| 6446 |
PAGES_DIR = Path("/app/pages")
|
|
|
|
| 6441 |
return JSONResponse({"error": "vendor missing"}, status_code=404)
|
| 6442 |
|
| 6443 |
|
| 6444 |
+
# === ADDITIVE: /cathedral — the ONE canonical genius cathedral, GitHub-aligned. ===
|
| 6445 |
+
# Unifies the cathedral front door so a11oy.net/cathedral renders the IDENTICAL
|
| 6446 |
+
# "Constellation · Khipu" scene as the SZLHOLDINGS/cathedral HF static space and
|
| 6447 |
+
# killinchu/cathedral. The page (cathedral_genius.html at the repo root) is the
|
| 6448 |
+
# canonical HF index.html byte-for-byte EXCEPT its two asset paths, which are
|
| 6449 |
+
# repointed at sovereign in-image routes: the ES-module app at /cathedral/app.js
|
| 6450 |
+
# and the vendored Three.js r160 (MIT) at the existing /hero/vendor3d/* routes.
|
| 6451 |
+
# 0 runtime CDN; system-font stacks; Three.js vendored. Honesty doctrine v11:
|
| 6452 |
+
# locked-proven = 8, Λ = Conjecture 1 (advisory), Khipu BFT = Conjecture 2.
|
| 6453 |
+
# Registered BEFORE the SPA /{full_path:path} catch-all so it wins ordered match
|
| 6454 |
+
# (previously /cathedral fell through to the console SPA shell — the divergence).
|
| 6455 |
+
# Signed-off-by: Stephen P. Lutar Jr. <stephenlutar2@gmail.com>
|
| 6456 |
+
@app.get("/cathedral")
|
| 6457 |
+
async def cathedral_genius_page() -> Response:
|
| 6458 |
+
f = Path("/app/cathedral_genius.html")
|
| 6459 |
+
if f.is_file():
|
| 6460 |
+
return FileResponse(str(f), media_type="text/html")
|
| 6461 |
+
# Honest fallback: the Sovereign-Lattice front door, then the SPA shell.
|
| 6462 |
+
hero = Path("/app/cathedral.html")
|
| 6463 |
+
if hero.is_file():
|
| 6464 |
+
return FileResponse(str(hero), media_type="text/html")
|
| 6465 |
+
return FileResponse(INDEX_HTML, media_type="text/html")
|
| 6466 |
+
|
| 6467 |
+
@app.get("/cathedral/app.js")
|
| 6468 |
+
async def _cathedral_app_js() -> Response:
|
| 6469 |
+
f = Path("/app/static/cathedral_app.js")
|
| 6470 |
+
if f.is_file():
|
| 6471 |
+
return FileResponse(str(f), media_type="application/javascript; charset=utf-8",
|
| 6472 |
+
headers={"Cache-Control": "public, max-age=3600"})
|
| 6473 |
+
return JSONResponse({"error": "cathedral app.js missing"}, status_code=404)
|
| 6474 |
+
# === end /cathedral canonical genius unification ===
|
| 6475 |
+
|
| 6476 |
+
|
| 6477 |
|
| 6478 |
# --- Doctrine v13 organ page routes (ADDITIVE; explicit, win over SPA catch-all) ---
|
| 6479 |
PAGES_DIR = Path("/app/pages")
|