Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@a040ffd0038e0474fb4ee3b10fc77fba9366c43a derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy a040ffd0038e0474fb4ee3b10fc77fba9366c43a.
Files: 1298 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).
Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- a11oy_landing.html +64 -15
- pages/console.html +228 -2
- pages/landing.html +23 -7
- serve.py +84 -26
a11oy_landing.html
CHANGED
|
@@ -356,6 +356,12 @@
|
|
| 356 |
.chip.simulated .dot{background:var(--gray)}
|
| 357 |
.chip.unavailable{color:var(--down);border-color:rgba(232,116,110,0.35);background:rgba(232,116,110,0.07)}
|
| 358 |
.chip.unavailable .dot{background:var(--down)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
.product-card .lam{margin-top:auto;padding-top:14px}
|
| 360 |
.honesty .lambda-line{margin:24px 0 0;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
|
| 361 |
.honesty .lambda-line .muted{max-width:640px}
|
|
@@ -524,11 +530,17 @@
|
|
| 524 |
<div class="status-row">
|
| 525 |
<span class="chip software"><span class="dot"></span>SOFTWARE</span>
|
| 526 |
<span class="chip simulated"><span class="dot"></span>SIMULATED effectors</span>
|
|
|
|
| 527 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 528 |
<div class="lam"><span class="val" id="v-defense">—</span><span class="cap">advisory Λ</span><span id="v-defense-chip"></span></div>
|
| 529 |
<div class="golinks">
|
| 530 |
-
<a class="go" href="/killinchu"
|
| 531 |
-
<a class="go" href="https://huggingface.co/spaces/SZLHOLDINGS/killinchu" rel="noopener">Space →</a>
|
| 532 |
</div>
|
| 533 |
</article>
|
| 534 |
<article class="card product-card" id="product-forge">
|
|
@@ -618,10 +630,14 @@
|
|
| 618 |
<div class="grid g4">
|
| 619 |
<div class="tier locked">
|
| 620 |
<div class="tnum" id="pt-locked">—</div>
|
| 621 |
-
<div class="tname">LOCKED-PROVEN</div>
|
| 622 |
<p>Lean-8 kernel count from <code>/honest</code> <code>locked_formula_count</code>
|
| 623 |
(show 8 or N/A). Not genome catalog LOCKED-PROVEN. F18 is Reed-Solomon
|
| 624 |
parity (erasure tolerance), not "DSSE seal".</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 625 |
</div>
|
| 626 |
<div class="tier semantic">
|
| 627 |
<div class="tnum" id="pt-semantic">—</div>
|
|
@@ -910,30 +926,61 @@
|
|
| 910 |
}
|
| 911 |
|
| 912 |
function setTiers(t){
|
| 913 |
-
// Catalog tiers only. Kernel Lean-8 chip is
|
| 914 |
// locked_formula_count. Never genome LOCKED-PROVEN. Never proof_tiers.locked.
|
| 915 |
$("pt-semantic").textContent = (num(t.semantic) === null) ? "N/A" : t.semantic;
|
| 916 |
$("pt-evidence").textContent = (num(t.evidence) === null) ? "N/A" : t.evidence;
|
| 917 |
$("pt-conjecture").textContent = (num(t.conjecture) === null) ? "N/A" : t.conjecture;
|
| 918 |
}
|
| 919 |
-
|
|
|
|
|
|
|
|
|
|
| 920 |
try{
|
| 921 |
const h = await getJSON("/api/a11oy/v1/honest");
|
| 922 |
const n = num(h && h.locked_formula_count);
|
| 923 |
$("pt-locked").textContent = (n === 8) ? "8" : "N/A";
|
| 924 |
}catch(e){ $("pt-locked").textContent = "N/A"; }
|
| 925 |
}
|
|
|
|
|
|
|
| 926 |
function setCatalogNote(n){
|
| 927 |
-
|
| 928 |
-
if(!el)
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 935 |
}
|
| 936 |
-
el.textContent = (num(n)===null) ? "" : ("Genome catalog LOCKED-PROVEN = "+n+" (catalog, not kernel). Lean-8 is the kernel; genome-144 is the catalog.");
|
| 937 |
}
|
| 938 |
|
| 939 |
function setVerticals(v){
|
|
@@ -1115,7 +1162,9 @@
|
|
| 1115 |
(async function(){
|
| 1116 |
loadEstatePulse();
|
| 1117 |
loadOverclaimMetrics();
|
| 1118 |
-
|
|
|
|
|
|
|
| 1119 |
const ov = await loadOverview();
|
| 1120 |
const filled = {
|
| 1121 |
tiers: $("proof-src").innerHTML.trim() !== "",
|
|
|
|
| 356 |
.chip.simulated .dot{background:var(--gray)}
|
| 357 |
.chip.unavailable{color:var(--down);border-color:rgba(232,116,110,0.35);background:rgba(232,116,110,0.07)}
|
| 358 |
.chip.unavailable .dot{background:var(--down)}
|
| 359 |
+
/* Genome catalog tag slot: visually subordinate to the kernel chip so the
|
| 360 |
+
catalog count can never be mistaken for the Lean-8 kernel count. */
|
| 361 |
+
.tier .genome-note{margin-top:10px;padding-top:10px;border-top:1px solid var(--border);
|
| 362 |
+
font-size:.82rem;color:var(--ghost)}
|
| 363 |
+
.tier .genome-note .n{font-family:var(--mono);color:var(--sub)}
|
| 364 |
+
.product-card .kc-note{margin-top:10px;font-size:.84rem;color:var(--ghost)}
|
| 365 |
.product-card .lam{margin-top:auto;padding-top:14px}
|
| 366 |
.honesty .lambda-line{margin:24px 0 0;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
|
| 367 |
.honesty .lambda-line .muted{max-width:640px}
|
|
|
|
| 530 |
<div class="status-row">
|
| 531 |
<span class="chip software"><span class="dot"></span>SOFTWARE</span>
|
| 532 |
<span class="chip simulated"><span class="dot"></span>SIMULATED effectors</span>
|
| 533 |
+
<span class="chip down" id="kc-runtime"><span class="dot"></span>RUNTIME UNAVAILABLE</span>
|
| 534 |
</div>
|
| 535 |
+
<p class="kc-note" id="kc-runtime-note">This document carries no live reading of the
|
| 536 |
+
killinchu Space runtime, so the runtime is labelled <b>UNAVAILABLE</b>. The in-page
|
| 537 |
+
probe below only reports REACHABLE on an actual HTTP 200 this visit; if the request
|
| 538 |
+
is refused or has timed out, the label stays UNAVAILABLE. The Hugging Face Space hub
|
| 539 |
+
page is the honest entry point while the runtime is down — it is not a live product
|
| 540 |
+
surface.</p>
|
| 541 |
<div class="lam"><span class="val" id="v-defense">—</span><span class="cap">advisory Λ</span><span id="v-defense-chip"></span></div>
|
| 542 |
<div class="golinks">
|
| 543 |
+
<a class="go" href="https://huggingface.co/spaces/SZLHOLDINGS/killinchu" rel="noopener">killinchu Space hub →</a>
|
|
|
|
| 544 |
</div>
|
| 545 |
</article>
|
| 546 |
<article class="card product-card" id="product-forge">
|
|
|
|
| 630 |
<div class="grid g4">
|
| 631 |
<div class="tier locked">
|
| 632 |
<div class="tnum" id="pt-locked">—</div>
|
| 633 |
+
<div class="tname">LOCKED-PROVEN · KERNEL</div>
|
| 634 |
<p>Lean-8 kernel count from <code>/honest</code> <code>locked_formula_count</code>
|
| 635 |
(show 8 or N/A). Not genome catalog LOCKED-PROVEN. F18 is Reed-Solomon
|
| 636 |
parity (erasure tolerance), not "DSSE seal".</p>
|
| 637 |
+
<p class="genome-note">Genome catalog tag LOCKED-PROVEN (a different count, from
|
| 638 |
+
<code>/api/a11oy/v1/genome</code> <code>tier_counts</code>):
|
| 639 |
+
<span class="n" id="pt-genome-locked">—</span> of 144 catalog entries. Catalog tag,
|
| 640 |
+
not the kernel chip above.</p>
|
| 641 |
</div>
|
| 642 |
<div class="tier semantic">
|
| 643 |
<div class="tnum" id="pt-semantic">—</div>
|
|
|
|
| 926 |
}
|
| 927 |
|
| 928 |
function setTiers(t){
|
| 929 |
+
// Catalog tiers only. Kernel Lean-8 chip is loadKernelLocked() from /honest
|
| 930 |
// locked_formula_count. Never genome LOCKED-PROVEN. Never proof_tiers.locked.
|
| 931 |
$("pt-semantic").textContent = (num(t.semantic) === null) ? "N/A" : t.semantic;
|
| 932 |
$("pt-evidence").textContent = (num(t.evidence) === null) ? "N/A" : t.evidence;
|
| 933 |
$("pt-conjecture").textContent = (num(t.conjecture) === null) ? "N/A" : t.conjecture;
|
| 934 |
}
|
| 935 |
+
// Kernel locked-proven chip (#pt-locked) is bound ONLY to the honest kernel
|
| 936 |
+
// count. It is never bound to a genome catalog tier (tier_counts['LOCKED-PROVEN']
|
| 937 |
+
// is 25 of 144 — a catalog tag, not the Lean-8 kernel).
|
| 938 |
+
async function loadKernelLocked(){
|
| 939 |
try{
|
| 940 |
const h = await getJSON("/api/a11oy/v1/honest");
|
| 941 |
const n = num(h && h.locked_formula_count);
|
| 942 |
$("pt-locked").textContent = (n === 8) ? "8" : "N/A";
|
| 943 |
}catch(e){ $("pt-locked").textContent = "N/A"; }
|
| 944 |
}
|
| 945 |
+
// Genome catalog tag count, rendered in its own slot so it can never be read
|
| 946 |
+
// as the kernel chip.
|
| 947 |
function setCatalogNote(n){
|
| 948 |
+
const el = $("pt-genome-locked");
|
| 949 |
+
if(!el) return;
|
| 950 |
+
el.textContent = (num(n)===null) ? "N/A" : String(n);
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
// ---- killinchu runtime honesty ------------------------------------------
|
| 954 |
+
// The killinchu Space runtime is labelled UNAVAILABLE unless THIS visit gets a
|
| 955 |
+
// real HTTP 200 from its health endpoint. A refused or timed-out probe is
|
| 956 |
+
// never read as "live"; nothing about the runtime is asserted from markup.
|
| 957 |
+
const KC_RUNTIME_PROBE = "https://szlholdings-killinchu.hf.space/api/health";
|
| 958 |
+
function markKillinchuUnavailable(reason){
|
| 959 |
+
const chip = $("kc-runtime");
|
| 960 |
+
if(chip){
|
| 961 |
+
chip.className = "chip down";
|
| 962 |
+
chip.innerHTML = '<span class="dot"></span>RUNTIME UNAVAILABLE' + (reason ? (" \u00b7 " + esc(reason)) : "");
|
| 963 |
+
}
|
| 964 |
+
}
|
| 965 |
+
function markKillinchuReachable(){
|
| 966 |
+
const chip = $("kc-runtime");
|
| 967 |
+
if(chip){
|
| 968 |
+
chip.className = "chip live";
|
| 969 |
+
chip.innerHTML = '<span class="dot"></span>RUNTIME REACHABLE \u00b7 live read this visit';
|
| 970 |
+
}
|
| 971 |
+
}
|
| 972 |
+
async function probeKillinchuRuntime(){
|
| 973 |
+
const ctl = ("AbortController" in window) ? new AbortController() : null;
|
| 974 |
+
const timer = ctl ? setTimeout(function(){ ctl.abort(); }, 4000) : null;
|
| 975 |
+
try{
|
| 976 |
+
const r = await fetch(KC_RUNTIME_PROBE, { signal: ctl ? ctl.signal : undefined, cache: "no-store" });
|
| 977 |
+
if(timer) clearTimeout(timer);
|
| 978 |
+
if(r && r.ok){ markKillinchuReachable(); return; }
|
| 979 |
+
markKillinchuUnavailable("HTTP " + (r ? r.status : "no response"));
|
| 980 |
+
}catch(e){
|
| 981 |
+
if(timer) clearTimeout(timer);
|
| 982 |
+
markKillinchuUnavailable((e && e.name === "AbortError") ? "probe timed out" : "runtime unreachable");
|
| 983 |
}
|
|
|
|
| 984 |
}
|
| 985 |
|
| 986 |
function setVerticals(v){
|
|
|
|
| 1162 |
(async function(){
|
| 1163 |
loadEstatePulse();
|
| 1164 |
loadOverclaimMetrics();
|
| 1165 |
+
loadKernelLocked();
|
| 1166 |
+
markKillinchuUnavailable();
|
| 1167 |
+
probeKillinchuRuntime();
|
| 1168 |
const ov = await loadOverview();
|
| 1169 |
const filled = {
|
| 1170 |
tiers: $("proof-src").innerHTML.trim() !== "",
|
pages/console.html
CHANGED
|
@@ -16313,8 +16313,12 @@ window.warboard_init=warboard_init; window.warboard_all=warboard_all;
|
|
| 16313 |
}
|
| 16314 |
|
| 16315 |
async function renderPublications(c){
|
| 16316 |
-
|
| 16317 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16318 |
var h='<div class="pz-wrap">';
|
| 16319 |
h+='<div class="pz-lead">The shoulders we stand on. SZL’s own program is DOI-pinned on Zenodo; the work it builds on is cited in full with a one-line note on exactly what we adapt. Honest tiers throughout: <b style="color:var(--teal)">'+esc(lockedTxt)+' locked-proven</b> {F1,F4,F7,F11,F12,F18,F19,F22}; Λ-uniqueness = <b style="color:#7e8aa3">Conjecture 1</b> (never green); Khipu BFT safety = Conjecture 2. Every formula’s proof tier is verifiable in <a href="#genome" onclick="go(\'genome\');return false;" style="color:var(--teal)">Genome</a> against <code>/api/a11oy/v1/genome</code>.</div>';
|
| 16320 |
|
|
@@ -16889,5 +16893,227 @@ window.a11oyInvestor = (function(){
|
|
| 16889 |
})();
|
| 16890 |
</script>
|
| 16891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16892 |
</body>
|
| 16893 |
</html>
|
|
|
|
| 16313 |
}
|
| 16314 |
|
| 16315 |
async function renderPublications(c){
|
| 16316 |
+
// The locked-8 kernel count is bound to the honest kernel endpoint
|
| 16317 |
+
// (locked_formula_count over {F1,F4,F7,F11,F12,F18,F19,F22}). It is NEVER
|
| 16318 |
+
// bound to a genome catalog tier count — that catalog tag is a different
|
| 16319 |
+
// number (25 of 144) and rendering it here would misstate the kernel.
|
| 16320 |
+
var lockedTxt='N/A';
|
| 16321 |
+
try{ var hk=await window.getJSON(window.API+'/v1/honest'); var kn=(hk&&hk.locked_formula_count); if(typeof kn==='number'&&kn>0) lockedTxt=String(kn); }catch(e){}
|
| 16322 |
var h='<div class="pz-wrap">';
|
| 16323 |
h+='<div class="pz-lead">The shoulders we stand on. SZL’s own program is DOI-pinned on Zenodo; the work it builds on is cited in full with a one-line note on exactly what we adapt. Honest tiers throughout: <b style="color:var(--teal)">'+esc(lockedTxt)+' locked-proven</b> {F1,F4,F7,F11,F12,F18,F19,F22}; Λ-uniqueness = <b style="color:#7e8aa3">Conjecture 1</b> (never green); Khipu BFT safety = Conjecture 2. Every formula’s proof tier is verifiable in <a href="#genome" onclick="go(\'genome\');return false;" style="color:var(--teal)">Genome</a> against <code>/api/a11oy/v1/genome</code>.</div>';
|
| 16324 |
|
|
|
|
| 16893 |
})();
|
| 16894 |
</script>
|
| 16895 |
|
| 16896 |
+
<script>
|
| 16897 |
+
/* try-khipu-panel — additive, Command-Center-ONLY "Try Khipu" panel.
|
| 16898 |
+
Doctrine v11. Adds NO nav entry (tabs.json 139-tab gate is untouched) and no
|
| 16899 |
+
new view key: it wraps V.command.render and appends itself to the Command
|
| 16900 |
+
Center body only. Deep links (?view=) are honored so it never mounts on a
|
| 16901 |
+
non-command surface (e.g. Investor View).
|
| 16902 |
+
|
| 16903 |
+
Wire: GET /api/a11oy/v1/khipu/status (pin + honesty, never signs)
|
| 16904 |
+
POST /api/a11oy/v1/khipu/chat (same-origin CPU-lab proxy)
|
| 16905 |
+
Honesty rules enforced here:
|
| 16906 |
+
- lab_status is shown verbatim: READY / FAILED / UNAVAILABLE (probe did not
|
| 16907 |
+
resolve THIS request). Never a fabricated READY.
|
| 16908 |
+
- elapsed_ms is MEASURED (server-side wall clock). Token counts are shown
|
| 16909 |
+
only as the lab's own REPORTED usage. No throughput marketing number is
|
| 16910 |
+
computed or displayed anywhere in this panel.
|
| 16911 |
+
- signature is UNSIGNED unless the lab returns a real signature; the
|
| 16912 |
+
receipt hash is shown as record_sha256, UNKNOWN when absent.
|
| 16913 |
+
- the pinned GGUF digest is a SNAPSHOT (pin), GPU inference is ROADMAP,
|
| 16914 |
+
energy attestation is 8/8 SIMULATED (never MEASURED without a live meter).
|
| 16915 |
+
- the inference lab is a CPU inference lab: not a trainer, not Serve Studio,
|
| 16916 |
+
and Ask & Act is not a live control plane.
|
| 16917 |
+
- the proxy authenticates to the lab with the dummy Bearer not-a-secret;
|
| 16918 |
+
no user or repo token is ever put in the browser.
|
| 16919 |
+
- Λ = Conjecture 1 (advisory, gray) — never a theorem, never green.
|
| 16920 |
+
*/
|
| 16921 |
+
(function(){
|
| 16922 |
+
'use strict';
|
| 16923 |
+
var STATUS_URL='/api/a11oy/v1/khipu/status';
|
| 16924 |
+
var CHAT_URL='/api/a11oy/v1/khipu/chat';
|
| 16925 |
+
var LOCKED_LAB_V1='https://szlholdings-szl-model-inference-lab.hf.space/v1';
|
| 16926 |
+
var HOST_ID='tk-panel-host';
|
| 16927 |
+
|
| 16928 |
+
function esc(s){ return String(s==null?'':s).replace(/[&<>"']/g,function(ch){
|
| 16929 |
+
return ({'&':'&','<':'<','>':'>','"':'"',"'":'''})[ch]; }); }
|
| 16930 |
+
function E(id){ return document.getElementById(id); }
|
| 16931 |
+
function H(id,html){ var n=E(id); if(n) n.innerHTML=html; }
|
| 16932 |
+
|
| 16933 |
+
/* 1396 owns ?view= deep links (Investor View). Read the query param FIRST,
|
| 16934 |
+
then the hash, so this panel mounts on the Command Center only. */
|
| 16935 |
+
function currentView(){
|
| 16936 |
+
var q='';
|
| 16937 |
+
try{ q=new URLSearchParams(window.location.search||'').get('view')||''; }catch(e){ q=''; }
|
| 16938 |
+
if(q) return String(q).split('/')[0];
|
| 16939 |
+
var h=String(window.location.hash||'').replace(/^#/,'');
|
| 16940 |
+
if(h) return h.split('/')[0];
|
| 16941 |
+
return 'command';
|
| 16942 |
+
}
|
| 16943 |
+
|
| 16944 |
+
function tone(state){
|
| 16945 |
+
if(state==='READY') return 'tk-ok';
|
| 16946 |
+
if(state==='FAILED'||state==='UNAVAILABLE'||state==='UNKNOWN') return 'tk-warn';
|
| 16947 |
+
return 'tk-dim';
|
| 16948 |
+
}
|
| 16949 |
+
function chip(text,state,title){
|
| 16950 |
+
return '<span class="tk-chip '+tone(state||text)+'"'+(title?' title="'+esc(title)+'"':'')+'>'+esc(text)+'</span>';
|
| 16951 |
+
}
|
| 16952 |
+
|
| 16953 |
+
function shell(){
|
| 16954 |
+
return ''
|
| 16955 |
+
+'<style>'
|
| 16956 |
+
+'#'+HOST_ID+'{margin-top:1.1rem;border:1px solid rgba(201,183,135,.34);border-radius:10px;'
|
| 16957 |
+
+'background:rgba(12,16,18,.45);padding:.95rem 1rem 1.05rem}'
|
| 16958 |
+
+'#'+HOST_ID+' h2{margin:0 0 .15rem;font-size:15px;letter-spacing:.02em;color:var(--cream,#e8e2d4)}'
|
| 16959 |
+
+'#'+HOST_ID+' .tk-sub{margin:.1rem 0 .75rem;font-size:11.5px;line-height:1.65;color:var(--paragraph,#a8a294)}'
|
| 16960 |
+
+'#'+HOST_ID+' .tk-chip{display:inline-block;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;'
|
| 16961 |
+
+'font-size:10px;letter-spacing:.06em;padding:.1rem .38rem;border-radius:4px;margin:0 .25rem .25rem 0;'
|
| 16962 |
+
+'border:1px solid rgba(201,183,135,.4);color:#c9b787}'
|
| 16963 |
+
+'#'+HOST_ID+' .tk-ok{border-color:rgba(95,179,163,.55);color:#5fb3a3}'
|
| 16964 |
+
+'#'+HOST_ID+' .tk-warn{border-color:rgba(201,183,135,.65);color:#c9b787}'
|
| 16965 |
+
+'#'+HOST_ID+' .tk-dim{border-color:rgba(160,160,160,.35);color:#9a958a}'
|
| 16966 |
+
+'#'+HOST_ID+' .tk-grid{display:grid;gap:.5rem;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin:.5rem 0}'
|
| 16967 |
+
+'#'+HOST_ID+' .tk-cell{border:1px solid rgba(255,255,255,.07);border-radius:7px;padding:.45rem .55rem}'
|
| 16968 |
+
+'#'+HOST_ID+' .tk-k{font-family:ui-monospace,Menlo,monospace;font-size:9.5px;letter-spacing:.09em;color:#8f8a7e}'
|
| 16969 |
+
+'#'+HOST_ID+' .tk-v{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:#e8e2d4;word-break:break-all}'
|
| 16970 |
+
+'#'+HOST_ID+' textarea{width:100%;box-sizing:border-box;min-height:62px;background:rgba(0,0,0,.35);'
|
| 16971 |
+
+'color:#e8e2d4;border:1px solid rgba(255,255,255,.13);border-radius:7px;padding:.45rem .55rem;font-size:12.5px}'
|
| 16972 |
+
+'#'+HOST_ID+' button{margin-top:.45rem;background:rgba(95,179,163,.16);color:#cfe9e2;'
|
| 16973 |
+
+'border:1px solid rgba(95,179,163,.5);border-radius:7px;padding:.35rem .8rem;font-size:12px;cursor:pointer}'
|
| 16974 |
+
+'#'+HOST_ID+' button[disabled]{opacity:.55;cursor:progress}'
|
| 16975 |
+
+'#'+HOST_ID+' .tk-note{font-family:ui-monospace,Menlo,monospace;font-size:10px;line-height:1.7;color:#8f8a7e;margin-top:.55rem}'
|
| 16976 |
+
+'#'+HOST_ID+' pre{white-space:pre-wrap;font-size:12px;line-height:1.6;color:#e8e2d4;margin:.4rem 0 0}'
|
| 16977 |
+
+'</style>'
|
| 16978 |
+
+'<h2>Try Khipu <span id="tk-state">'+chip('PROBING','PROBING')+'</span></h2>'
|
| 16979 |
+
+'<p class="tk-sub">A same-origin proxy to the pinned CPU inference lab '
|
| 16980 |
+
+'(<code>'+esc(LOCKED_LAB_V1)+'</code>). This is an inference lab: '
|
| 16981 |
+
+'<b>not a trainer</b>, <b>not Serve Studio</b>, and Ask & Act on this console is '
|
| 16982 |
+
+'<b>not a live control plane</b>. Prompts go to '
|
| 16983 |
+
+'<code>'+esc(CHAT_URL)+'</code>; posture comes from <code>'+esc(STATUS_URL)+'</code>. '
|
| 16984 |
+
+'Throughput is not reported — we publish only what the lab measures.</p>'
|
| 16985 |
+
+'<div class="tk-grid" id="tk-pin"></div>'
|
| 16986 |
+
+'<label class="tk-k" for="tk-prompt">PROMPT · CLAMPED SERVER-SIDE (max_tokens 32 · temperature 0)</label>'
|
| 16987 |
+
+'<textarea id="tk-prompt" placeholder="What is a khipu receipt?"></textarea>'
|
| 16988 |
+
+'<div><button type="button" id="tk-run">▶ Ask the lab</button></div>'
|
| 16989 |
+
+'<div id="tk-out"></div>'
|
| 16990 |
+
+'<p class="tk-note" id="tk-honesty"></p>';
|
| 16991 |
+
}
|
| 16992 |
+
|
| 16993 |
+
function renderPin(d){
|
| 16994 |
+
var pin=(d&&d.pin)||{}, hon=(d&&d.honesty)||{}, doc=(d&&d.doctrine)||{};
|
| 16995 |
+
var st=(d&&d.lab_status)||'UNAVAILABLE';
|
| 16996 |
+
H('tk-state',chip(st,st,'lab posture read from '+STATUS_URL+' this request'));
|
| 16997 |
+
var cells=[
|
| 16998 |
+
['LAB POSTURE',chip(st,st)+' '+chip(st==='READY'?'probe resolved':'no live probe','')],
|
| 16999 |
+
['PINNED GGUF sha256','<span class="tk-v">'+esc(pin.gguf_sha256||'UNKNOWN')+'</span> '+chip('SNAPSHOT','SNAPSHOT')],
|
| 17000 |
+
['GPU INFERENCE ENDPOINT',chip(pin.gpu_inference_endpoint||'ROADMAP','ROADMAP')+' '+chip('CPU lab only today','')],
|
| 17001 |
+
['ENERGY ATTESTED RUNS','<span class="tk-v">'+esc(hon.energy_attested_runs||pin.energy_attested_runs||'8/8 SIMULATED')+'</span> '+chip('SIMULATED','SIMULATED')+chip('not MEASURED — no live meter','')],
|
| 17002 |
+
['LOCKED LAB v1','<span class="tk-v">'+esc(pin.locked_lab_v1||LOCKED_LAB_V1)+'</span>'],
|
| 17003 |
+
['DOCTRINE','<span class="tk-v">locked-'+esc(doc.locked_formulas!=null?doc.locked_formulas:8)+' · \u039b='+esc(doc.lambda||'Conjecture 1')+'</span> '+chip('Conjecture 1','')]
|
| 17004 |
+
];
|
| 17005 |
+
H('tk-pin',cells.map(function(c){
|
| 17006 |
+
return '<div class="tk-cell"><div class="tk-k">'+esc(c[0])+'</div><div>'+c[1]+'</div></div>';
|
| 17007 |
+
}).join(''));
|
| 17008 |
+
H('tk-honesty','Lab role: '+esc(hon.forge_lab||pin.forge_lab_role||'CPU inference lab \u2014 not a trainer, not Serve Studio')
|
| 17009 |
+
+'<br>Ask & Act: '+esc(hon.ask_and_act||'not a live control plane')
|
| 17010 |
+
+'<br>Auth: the proxy calls the lab with the dummy header <code>Bearer not-a-secret</code>; no repo or user token reaches the browser.'
|
| 17011 |
+
+'<br>Throughput: not reported \u2014 token counts below are the lab\u2019s own REPORTED usage, elapsed time is MEASURED server-side.');
|
| 17012 |
+
}
|
| 17013 |
+
|
| 17014 |
+
function renderUnavailable(msg){
|
| 17015 |
+
H('tk-state',chip('UNAVAILABLE','UNAVAILABLE','status probe did not resolve this request'));
|
| 17016 |
+
H('tk-pin','<div class="tk-cell"><div class="tk-k">LAB POSTURE</div><div>'
|
| 17017 |
+
+chip('UNAVAILABLE','UNAVAILABLE')+'<div class="tk-v">'+esc(msg||'status probe did not resolve')
|
| 17018 |
+
+'</div></div></div>'
|
| 17019 |
+
+'<div class="tk-cell"><div class="tk-k">LOCKED LAB v1</div><div class="tk-v">'+esc(LOCKED_LAB_V1)+'</div></div>'
|
| 17020 |
+
+'<div class="tk-cell"><div class="tk-k">PINNED GGUF sha256</div><div>'+chip('SNAPSHOT','SNAPSHOT')
|
| 17021 |
+
+' '+chip('UNKNOWN','UNKNOWN')+'</div></div>'
|
| 17022 |
+
+'<div class="tk-cell"><div class="tk-k">GPU INFERENCE ENDPOINT</div><div>'+chip('ROADMAP','ROADMAP')+'</div></div>'
|
| 17023 |
+
+'<div class="tk-cell"><div class="tk-k">ENERGY ATTESTED RUNS</div><div class="tk-v">8/8 SIMULATED</div></div>');
|
| 17024 |
+
H('tk-honesty','Lab role: CPU inference lab \u2014 not a trainer, not Serve Studio.'
|
| 17025 |
+
+'<br>Ask & Act: not a live control plane.'
|
| 17026 |
+
+'<br>Auth: dummy header <code>Bearer not-a-secret</code> is used server-side only.'
|
| 17027 |
+
+'<br>Throughput: not reported. \u039b = Conjecture 1 (advisory, never a theorem).');
|
| 17028 |
+
}
|
| 17029 |
+
|
| 17030 |
+
async function loadStatus(){
|
| 17031 |
+
try{
|
| 17032 |
+
var r=await fetch(STATUS_URL,{headers:{accept:'application/json'}});
|
| 17033 |
+
if(!r.ok) throw new Error('HTTP '+r.status);
|
| 17034 |
+
renderPin(await r.json());
|
| 17035 |
+
}catch(e){ renderUnavailable(String(e&&e.message||e)); }
|
| 17036 |
+
}
|
| 17037 |
+
|
| 17038 |
+
async function ask(){
|
| 17039 |
+
var btn=E('tk-run'); var ta=E('tk-prompt');
|
| 17040 |
+
var prompt=((ta&&ta.value)||'').trim();
|
| 17041 |
+
if(!prompt){ H('tk-out','<p class="tk-note">Enter a prompt \u2014 the proxy rejects an empty body (422), it does not invent one.</p>'); return; }
|
| 17042 |
+
if(btn){ btn.disabled=true; btn.textContent='asking the lab\u2026'; }
|
| 17043 |
+
H('tk-out','<p class="tk-note">POST '+esc(CHAT_URL)+' \u2014 waiting on the CPU lab\u2026</p>');
|
| 17044 |
+
try{
|
| 17045 |
+
var r=await fetch(CHAT_URL,{method:'POST',headers:{'content-type':'application/json',accept:'application/json'},
|
| 17046 |
+
body:JSON.stringify({prompt:prompt,max_tokens:32,temperature:0})});
|
| 17047 |
+
var d={}; try{ d=await r.json(); }catch(e){ d={}; }
|
| 17048 |
+
var st=d.lab_status||(r.ok?'READY':'FAILED');
|
| 17049 |
+
var sig=d.signature||'UNSIGNED';
|
| 17050 |
+
var rec=d.record_sha256||'UNKNOWN';
|
| 17051 |
+
var usage=d.usage||{};
|
| 17052 |
+
var el=(d.elapsed_ms!=null?d.elapsed_ms+' ms':'UNKNOWN');
|
| 17053 |
+
var body=(d.ok&&d.text)?('<pre>'+esc(d.text)+'</pre>')
|
| 17054 |
+
:('<p class="tk-note">No completion returned \u2014 shown honestly as '+esc(st)+', nothing fabricated.'
|
| 17055 |
+
+(d.error?(' Lab detail: '+esc(String(d.error).slice(0,200))):'')+'</p>');
|
| 17056 |
+
H('tk-out',body
|
| 17057 |
+
+'<div class="tk-grid">'
|
| 17058 |
+
+'<div class="tk-cell"><div class="tk-k">LAB RESULT</div><div>'+chip(st,st)+' '+chip(d.ok?'ok':'no completion','')+'</div></div>'
|
| 17059 |
+
+'<div class="tk-cell"><div class="tk-k">SIGNATURE</div><div>'+chip(sig,sig==='UNSIGNED'?'UNAVAILABLE':sig)
|
| 17060 |
+
+'<div class="tk-v">'+(sig==='UNSIGNED'?'no in-image signing key in this runtime \u2014 honest UNSIGNED':'as returned by the lab')+'</div></div></div>'
|
| 17061 |
+
+'<div class="tk-cell"><div class="tk-k">record_sha256</div><div class="tk-v">'+esc(rec)+'</div></div>'
|
| 17062 |
+
+'<div class="tk-cell"><div class="tk-k">ELAPSED</div><div class="tk-v">'+esc(el)+'</div>'
|
| 17063 |
+
+'<div>'+chip(d.elapsed_ms_label||'MEASURED','MEASURED','server-side wall clock for this request')+'</div></div>'
|
| 17064 |
+
+'<div class="tk-cell"><div class="tk-k">USAGE (LAB-REPORTED)</div><div class="tk-v">prompt '
|
| 17065 |
+
+esc(usage.prompt_tokens!=null?usage.prompt_tokens:'\u2014')+' · completion '
|
| 17066 |
+
+esc(usage.completion_tokens!=null?usage.completion_tokens:'\u2014')+' · total '
|
| 17067 |
+
+esc(usage.total_tokens!=null?usage.total_tokens:'\u2014')+'</div><div>'
|
| 17068 |
+
+chip(d.usage_label||'REPORTED','')+chip('no throughput number derived','')+'</div></div>'
|
| 17069 |
+
+'<div class="tk-cell"><div class="tk-k">\u039b</div><div>'+chip((d.honesty&&d.honesty.lambda)||'Conjecture 1','')
|
| 17070 |
+
+'<div class="tk-v">advisory \u2014 gray, never green, never a theorem</div></div></div>'
|
| 17071 |
+
+'</div>');
|
| 17072 |
+
}catch(e){
|
| 17073 |
+
H('tk-out','<p class="tk-note">'+chip('UNAVAILABLE','UNAVAILABLE')+' request did not resolve: '
|
| 17074 |
+
+esc(String(e&&e.message||e))+' \u2014 no answer, no signature, no record_sha256 fabricated.</p>');
|
| 17075 |
+
}
|
| 17076 |
+
if(btn){ btn.disabled=false; btn.innerHTML='▶ Ask the lab'; }
|
| 17077 |
+
loadStatus();
|
| 17078 |
+
}
|
| 17079 |
+
|
| 17080 |
+
/* Mount into the Command Center body only. */
|
| 17081 |
+
function mount(host){
|
| 17082 |
+
if(!host) return;
|
| 17083 |
+
if(currentView()!=='command') return;
|
| 17084 |
+
if(host.querySelector('#'+HOST_ID)) return;
|
| 17085 |
+
var sec=document.createElement('section');
|
| 17086 |
+
sec.id=HOST_ID;
|
| 17087 |
+
sec.setAttribute('aria-label','Try Khipu');
|
| 17088 |
+
sec.innerHTML=shell();
|
| 17089 |
+
host.appendChild(sec);
|
| 17090 |
+
var btn=E('tk-run'); if(btn) btn.addEventListener('click',ask);
|
| 17091 |
+
loadStatus();
|
| 17092 |
+
}
|
| 17093 |
+
|
| 17094 |
+
function wrap(){
|
| 17095 |
+
var V=window.VIEWS;
|
| 17096 |
+
if(!V||!V.command||typeof V.command.render!=='function') return false;
|
| 17097 |
+
if(V.command.__tryKhipuWrapped) return true;
|
| 17098 |
+
var prev=V.command.render;
|
| 17099 |
+
V.command.render=async function(c){
|
| 17100 |
+
try{ await prev.call(this,c); }catch(e){ /* upstream render owns its own honesty */ }
|
| 17101 |
+
try{ mount(c); }catch(e){}
|
| 17102 |
+
return undefined;
|
| 17103 |
+
};
|
| 17104 |
+
V.command.__tryKhipuWrapped=true;
|
| 17105 |
+
/* Command Center may already be painted (first load) — mount once now. */
|
| 17106 |
+
try{ if(currentView()==='command') mount(document.getElementById('vbody')); }catch(e){}
|
| 17107 |
+
return true;
|
| 17108 |
+
}
|
| 17109 |
+
|
| 17110 |
+
var tries=0;
|
| 17111 |
+
var iv=setInterval(function(){ tries++; if(wrap()||tries>200) clearInterval(iv); },100);
|
| 17112 |
+
if(document.readyState!=='loading'){ wrap(); }
|
| 17113 |
+
else { document.addEventListener('DOMContentLoaded',function(){ wrap(); }); }
|
| 17114 |
+
})();
|
| 17115 |
+
/* end try-khipu-panel */
|
| 17116 |
+
</script>
|
| 17117 |
+
|
| 17118 |
</body>
|
| 17119 |
</html>
|
pages/landing.html
CHANGED
|
@@ -362,12 +362,15 @@ img,svg,canvas,video{max-width:100%;height:auto;}
|
|
| 362 |
<p class="ds-card__body">Policy, reasoning, operator and counter-UAS in one console. Live gates, signed receipts, and the halt button.</p>
|
| 363 |
<span class="ds-btn ds-btn--primary" style="margin-top:8px;align-self:flex-start;">Enter the platform <span class="ds-btn__arrow">→</span></span>
|
| 364 |
</a>
|
| 365 |
-
<a class="ds-card" href="https://
|
| 366 |
<span class="ds-card__id">// KILLINCHU</span>
|
| 367 |
<h3 class="ds-card__title">Drones & Vessels</h3>
|
| 368 |
<div class="ds-card__rule"></div>
|
| 369 |
<p class="ds-card__body">The maritime & airspace surface: track drones and vessels, run counter-UAS cued engagements through the same governed, signed loop.</p>
|
| 370 |
-
<
|
|
|
|
|
|
|
|
|
|
| 371 |
</a>
|
| 372 |
<a class="ds-card" href="/lyte" style="cursor:pointer;">
|
| 373 |
<span class="ds-card__id">// LYTE · BIND</span>
|
|
@@ -392,8 +395,8 @@ img,svg,canvas,video{max-width:100%;height:auto;}
|
|
| 392 |
</div>
|
| 393 |
<div class="ds-footer__cols">
|
| 394 |
<div class="ds-footer__col"><h4>Platform</h4><a href="/console">Command Console</a><a href="/benchmark">Benchmark</a><a href="#what">What it is</a><a href="#diff">Receipts</a><a href="#proof">Proof</a></div>
|
| 395 |
-
<div class="ds-footer__col"><h4>Surfaces</h4><a href="/console">a11oy</a><a href="https://
|
| 396 |
-
<div class="ds-footer__col"><h4>
|
| 397 |
</div>
|
| 398 |
</div>
|
| 399 |
<div class="ds-footer__bottom">
|
|
@@ -505,6 +508,14 @@ img,svg,canvas,video{max-width:100%;height:auto;}
|
|
| 505 |
var el=document.getElementById(id); if(!el)return;
|
| 506 |
el.textContent=val; el.classList.remove("is-loading");
|
| 507 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
function unreachable(id){
|
| 509 |
var el=document.getElementById(id); if(!el)return;
|
| 510 |
el.textContent="probe slow"; el.classList.remove("is-loading");
|
|
@@ -514,11 +525,16 @@ img,svg,canvas,video{max-width:100%;height:auto;}
|
|
| 514 |
// services up + (lambda_status echoed in observability too)
|
| 515 |
fetchJSON("/api/a11oy/v1/observability/summary",8000).then(function(j){
|
| 516 |
var m=(j&&j.melt&&j.melt.metrics)||{};
|
| 517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 518 |
setKpi("kpiServices",m.organs_reachable+" / "+m.organs_total);
|
| 519 |
-
} else {
|
| 520 |
if(j&&j.honesty){var h=document.getElementById("liveHonesty"); if(h)h.textContent=j.honesty;}
|
| 521 |
-
}).catch(function(){
|
| 522 |
|
| 523 |
// trust score (lambda)
|
| 524 |
fetchJSON("/api/a11oy/v1/lambda",8000).then(function(j){
|
|
|
|
| 362 |
<p class="ds-card__body">Policy, reasoning, operator and counter-UAS in one console. Live gates, signed receipts, and the halt button.</p>
|
| 363 |
<span class="ds-btn ds-btn--primary" style="margin-top:8px;align-self:flex-start;">Enter the platform <span class="ds-btn__arrow">→</span></span>
|
| 364 |
</a>
|
| 365 |
+
<a class="ds-card" href="https://huggingface.co/spaces/SZLHOLDINGS/killinchu" rel="noopener" style="cursor:pointer;">
|
| 366 |
<span class="ds-card__id">// KILLINCHU</span>
|
| 367 |
<h3 class="ds-card__title">Drones & Vessels</h3>
|
| 368 |
<div class="ds-card__rule"></div>
|
| 369 |
<p class="ds-card__body">The maritime & airspace surface: track drones and vessels, run counter-UAS cued engagements through the same governed, signed loop.</p>
|
| 370 |
+
<p class="ds-card__body"><b>Runtime: UNAVAILABLE.</b> This page holds no live reading of the
|
| 371 |
+
killinchu Space runtime, so it is not presented as live and the link goes to the Space
|
| 372 |
+
hub page rather than a runtime that has timed out.</p>
|
| 373 |
+
<span class="ds-btn" style="margin-top:8px;align-self:flex-start;">Open the killinchu Space hub <span class="ds-btn__arrow">→</span></span>
|
| 374 |
</a>
|
| 375 |
<a class="ds-card" href="/lyte" style="cursor:pointer;">
|
| 376 |
<span class="ds-card__id">// LYTE · BIND</span>
|
|
|
|
| 395 |
</div>
|
| 396 |
<div class="ds-footer__cols">
|
| 397 |
<div class="ds-footer__col"><h4>Platform</h4><a href="/console">Command Console</a><a href="/benchmark">Benchmark</a><a href="#what">What it is</a><a href="#diff">Receipts</a><a href="#proof">Proof</a></div>
|
| 398 |
+
<div class="ds-footer__col"><h4>Surfaces</h4><a href="/console">a11oy</a><a href="https://huggingface.co/spaces/SZLHOLDINGS/killinchu" rel="noopener">killinchu (runtime UNAVAILABLE)</a><a href="/lyte">LYTE lattice</a></div>
|
| 399 |
+
<div class="ds-footer__col"><h4>Endpoints</h4><a href="/api/a11oy/v1/observability/summary">Observability</a><a href="/api/a11oy/v1/lambda">Trust score</a><a href="/api/a11oy/v1/gates">Gates</a></div>
|
| 400 |
</div>
|
| 401 |
</div>
|
| 402 |
<div class="ds-footer__bottom">
|
|
|
|
| 508 |
var el=document.getElementById(id); if(!el)return;
|
| 509 |
el.textContent=val; el.classList.remove("is-loading");
|
| 510 |
}
|
| 511 |
+
// Honest label for a read that produced no live value: name the state, never
|
| 512 |
+
// paint a fabricated number or a live-looking zero.
|
| 513 |
+
function unavailableKpi(id,state){
|
| 514 |
+
var el=document.getElementById(id); if(!el)return;
|
| 515 |
+
el.textContent=(String(state||"UNAVAILABLE").toUpperCase()==="OBSERVED")?"UNAVAILABLE":("UNAVAILABLE · "+String(state||"UNAVAILABLE"));
|
| 516 |
+
el.classList.remove("is-loading","is-live");
|
| 517 |
+
el.style.color="var(--muted)"; el.style.fontSize="16px";
|
| 518 |
+
}
|
| 519 |
function unreachable(id){
|
| 520 |
var el=document.getElementById(id); if(!el)return;
|
| 521 |
el.textContent="probe slow"; el.classList.remove("is-loading");
|
|
|
|
| 525 |
// services up + (lambda_status echoed in observability too)
|
| 526 |
fetchJSON("/api/a11oy/v1/observability/summary",8000).then(function(j){
|
| 527 |
var m=(j&&j.melt&&j.melt.metrics)||{};
|
| 528 |
+
// organs_reachable is a live count ONLY when the summary's own
|
| 529 |
+
// observation_state says it was observed this read. An inventory/idle/
|
| 530 |
+
// UNAVAILABLE state is reported as UNAVAILABLE, never as a live zero.
|
| 531 |
+
var state=(j&&(j.observation_state||j.state))||"UNAVAILABLE";
|
| 532 |
+
var observed=String(state).toUpperCase()==="OBSERVED";
|
| 533 |
+
if(observed&&typeof m.organs_reachable==="number"&&typeof m.organs_total==="number"){
|
| 534 |
setKpi("kpiServices",m.organs_reachable+" / "+m.organs_total);
|
| 535 |
+
} else { unavailableKpi("kpiServices",state); }
|
| 536 |
if(j&&j.honesty){var h=document.getElementById("liveHonesty"); if(h)h.textContent=j.honesty;}
|
| 537 |
+
}).catch(function(){unavailableKpi("kpiServices","UNAVAILABLE");});
|
| 538 |
|
| 539 |
// trust score (lambda)
|
| 540 |
fetchJSON("/api/a11oy/v1/lambda",8000).then(function(j){
|
serve.py
CHANGED
|
@@ -81,6 +81,36 @@ def gov_envelope(payload=None, status="REAL", citations=None, reason=None, **ext
|
|
| 81 |
# console/ there. Local verification must resolve the same source tree rather
|
| 82 |
# than trying to return a container-only path (which turns an otherwise honest
|
| 83 |
# 404 or history fallback into a 500).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
_IMAGE_STATIC_DIR = Path("/app/static")
|
| 85 |
_LOCAL_STATIC_DIR = Path(__file__).resolve().parent / "console"
|
| 86 |
STATIC_DIR = _IMAGE_STATIC_DIR if (_IMAGE_STATIC_DIR / "index.html").is_file() else _LOCAL_STATIC_DIR
|
|
@@ -3926,7 +3956,10 @@ app.add_middleware(
|
|
| 3926 |
allow_origins=_CORS_ALLOWED_ORIGINS,
|
| 3927 |
allow_origin_regex=_CORS_ALLOWED_ORIGIN_REGEX,
|
| 3928 |
allow_credentials=False,
|
| 3929 |
-
|
|
|
|
|
|
|
|
|
|
| 3930 |
allow_headers=["Content-Type", "Authorization", "X-Requested-With"],
|
| 3931 |
)
|
| 3932 |
|
|
@@ -4025,7 +4058,7 @@ from fastapi.responses import RedirectResponse as _PTG_Redirect
|
|
| 4025 |
|
| 4026 |
_PTG_IMAGE_WEB = Path("/app/web")
|
| 4027 |
_PTG_LOCAL_WEB = Path(__file__).resolve().parent / "web"
|
| 4028 |
-
_PTG_WEB =
|
| 4029 |
|
| 4030 |
def _ptg_serve(filename: str):
|
| 4031 |
async def _h() -> Response:
|
|
@@ -11894,7 +11927,7 @@ async def spa_root():
|
|
| 11894 |
# vendored Three.js r160, live receipt/mesh weave-ins + in-browser WebCrypto
|
| 11895 |
# verify), then the cathedral hero, then the console SPA, then the SPA index.
|
| 11896 |
# All fallbacks preserved so a missing file never white-screens "/".
|
| 11897 |
-
for _cand in (
|
| 11898 |
PAGES_DIR / "console.html", INDEX_HTML):
|
| 11899 |
try:
|
| 11900 |
_cp = Path(_cand)
|
|
@@ -12005,7 +12038,7 @@ async def _energy3d_app_js() -> Response:
|
|
| 12005 |
|
| 12006 |
|
| 12007 |
# --- Doctrine v13 organ page routes (ADDITIVE; explicit, win over SPA catch-all) ---
|
| 12008 |
-
PAGES_DIR = Path("/app/pages")
|
| 12009 |
|
| 12010 |
# === ADDITIVE (Yachay CTO + Perplexity Computer Agent, 2026-06-02): wire orphaned ===
|
| 12011 |
# === genius pages that were BUILT but never registered (fell to SPA shell = a lie). ===
|
|
@@ -12042,7 +12075,7 @@ except Exception as _br_e: # noqa: BLE001
|
|
| 12042 |
# only the /api/a11oy/v4/predict* JSON routes. Explicit route wins over SPA catch-all.
|
| 12043 |
@app.get("/predict")
|
| 12044 |
async def predict_page() -> Response:
|
| 12045 |
-
f =
|
| 12046 |
if f.is_file():
|
| 12047 |
return FileResponse(f, media_type="text/html")
|
| 12048 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -12052,7 +12085,7 @@ async def predict_page() -> Response:
|
|
| 12052 |
# now COPYed to /app/web/canonical.html by the Dockerfile (added in this same commit).
|
| 12053 |
@app.get("/canonical")
|
| 12054 |
async def canonical_page() -> Response:
|
| 12055 |
-
f =
|
| 12056 |
if f.is_file():
|
| 12057 |
return FileResponse(f, media_type="text/html")
|
| 12058 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -12062,7 +12095,7 @@ async def canonical_page() -> Response:
|
|
| 12062 |
# /app/web/status.html by the Dockerfile already; just needs an explicit route.
|
| 12063 |
@app.get("/status")
|
| 12064 |
async def status_page() -> Response:
|
| 12065 |
-
f =
|
| 12066 |
if f.is_file():
|
| 12067 |
return FileResponse(f, media_type="text/html")
|
| 12068 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -12081,7 +12114,7 @@ async def status_page() -> Response:
|
|
| 12081 |
# Signed-off-by: Stephen P. Lutar Jr. <stephenlutar2@gmail.com>
|
| 12082 |
@app.get("/proof")
|
| 12083 |
async def proof_replay_page() -> Response:
|
| 12084 |
-
f =
|
| 12085 |
if f.is_file():
|
| 12086 |
return FileResponse(f, media_type="text/html")
|
| 12087 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -12098,7 +12131,7 @@ async def proof_replay_page() -> Response:
|
|
| 12098 |
# Registered BEFORE the SPA /{full_path:path} catch-all so it wins the ordered match.
|
| 12099 |
@app.get("/trust")
|
| 12100 |
async def trust_page() -> Response:
|
| 12101 |
-
f =
|
| 12102 |
if f.is_file():
|
| 12103 |
return FileResponse(f, media_type="text/html")
|
| 12104 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -12210,21 +12243,32 @@ async def _elite_redirect() -> Response:
|
|
| 12210 |
app.add_api_route("/elite", _elite_redirect, methods=["GET"], include_in_schema=False)
|
| 12211 |
|
| 12212 |
|
| 12213 |
-
# /killinchu —
|
| 12214 |
-
# through to the A11OY SPA shell and returns a misleading HTTP 200. Keep the
|
| 12215 |
-
# bridge server-side so it works without JavaScript at every mobile viewport,
|
| 12216 |
-
#
|
| 12217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12218 |
|
| 12219 |
|
| 12220 |
async def _killinchu_redirect(request: Request, full_path: str = "") -> Response:
|
| 12221 |
-
|
| 12222 |
-
|
| 12223 |
-
|
| 12224 |
-
|
| 12225 |
-
response =
|
| 12226 |
-
response.headers["X-SZL-
|
| 12227 |
-
|
|
|
|
|
|
|
| 12228 |
return response
|
| 12229 |
|
| 12230 |
|
|
@@ -12248,7 +12292,7 @@ app.add_api_route(
|
|
| 12248 |
# baked (Dockerfile COPY) but lacked a route -> soft-404'd to the SPA shell.
|
| 12249 |
@app.get("/estate-hologram")
|
| 12250 |
async def estate_hologram_page() -> Response:
|
| 12251 |
-
f =
|
| 12252 |
if f.is_file():
|
| 12253 |
return FileResponse(f, media_type="text/html")
|
| 12254 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
@@ -14422,10 +14466,24 @@ except Exception as _ftiers_e:
|
|
| 14422 |
_A11OY_FTIERS_DIAG = {"status": "FAILED", "error": repr(_ftiers_e)}
|
| 14423 |
|
| 14424 |
# ============================================================================
|
| 14425 |
-
#
|
| 14426 |
-
#
|
| 14427 |
-
#
|
| 14428 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14429 |
# ============================================================================
|
| 14430 |
try:
|
| 14431 |
import a11oy_canonical_domain as _canon_mod
|
|
|
|
| 81 |
# console/ there. Local verification must resolve the same source tree rather
|
| 82 |
# than trying to return a container-only path (which turns an otherwise honest
|
| 83 |
# 404 or history fallback into a 500).
|
| 84 |
+
# SOURCE-ROOT RESOLUTION (identity-lock root cause). Document handlers used to
|
| 85 |
+
# hardcode /app/<file>. In the HF Docker image /app IS this source tree, but on
|
| 86 |
+
# any other host /app may be absent OR a symlink to a DIFFERENT (stale) checkout,
|
| 87 |
+
# so the handlers silently fell back to the SPA shell and served a document that
|
| 88 |
+
# did not match the repo — /trust lost its product canonical https://a-11-oy.com/trust
|
| 89 |
+
# and "/" served a stale landing. Resolve documents against the running module's
|
| 90 |
+
# own directory FIRST (which IS /app inside the image, so behaviour there is
|
| 91 |
+
# unchanged), and only then against the image path. Honest: the bytes served are
|
| 92 |
+
# always the bytes of the source that is running.
|
| 93 |
+
_SZL_SRC_ROOT = Path(__file__).resolve().parent
|
| 94 |
+
_SZL_IMAGE_ROOT = Path("/app")
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def _szl_doc(rel: str) -> Path:
|
| 98 |
+
"""Return the readable path for a repo-relative document.
|
| 99 |
+
|
| 100 |
+
Prefers the running source tree; falls back to the image root. Returns the
|
| 101 |
+
source-relative candidate when neither exists so callers keep their honest
|
| 102 |
+
is_file() guard and their existing SPA/404 fallback.
|
| 103 |
+
"""
|
| 104 |
+
rel = rel.lstrip("/")
|
| 105 |
+
local = _SZL_SRC_ROOT / rel
|
| 106 |
+
if local.is_file():
|
| 107 |
+
return local
|
| 108 |
+
image = _SZL_IMAGE_ROOT / rel
|
| 109 |
+
if image.is_file():
|
| 110 |
+
return image
|
| 111 |
+
return local
|
| 112 |
+
|
| 113 |
+
|
| 114 |
_IMAGE_STATIC_DIR = Path("/app/static")
|
| 115 |
_LOCAL_STATIC_DIR = Path(__file__).resolve().parent / "console"
|
| 116 |
STATIC_DIR = _IMAGE_STATIC_DIR if (_IMAGE_STATIC_DIR / "index.html").is_file() else _LOCAL_STATIC_DIR
|
|
|
|
| 3956 |
allow_origins=_CORS_ALLOWED_ORIGINS,
|
| 3957 |
allow_origin_regex=_CORS_ALLOWED_ORIGIN_REGEX,
|
| 3958 |
allow_credentials=False,
|
| 3959 |
+
# HEAD is declared explicitly: crawlers and uptime monitors HEAD the document
|
| 3960 |
+
# routes, and every document route accepts HEAD, so the CORS preflight answer
|
| 3961 |
+
# must say so instead of implying HEAD is unsupported.
|
| 3962 |
+
allow_methods=["GET", "HEAD", "POST", "OPTIONS"],
|
| 3963 |
allow_headers=["Content-Type", "Authorization", "X-Requested-With"],
|
| 3964 |
)
|
| 3965 |
|
|
|
|
| 4058 |
|
| 4059 |
_PTG_IMAGE_WEB = Path("/app/web")
|
| 4060 |
_PTG_LOCAL_WEB = Path(__file__).resolve().parent / "web"
|
| 4061 |
+
_PTG_WEB = _PTG_LOCAL_WEB if _PTG_LOCAL_WEB.is_dir() else _PTG_IMAGE_WEB
|
| 4062 |
|
| 4063 |
def _ptg_serve(filename: str):
|
| 4064 |
async def _h() -> Response:
|
|
|
|
| 11927 |
# vendored Three.js r160, live receipt/mesh weave-ins + in-browser WebCrypto
|
| 11928 |
# verify), then the cathedral hero, then the console SPA, then the SPA index.
|
| 11929 |
# All fallbacks preserved so a missing file never white-screens "/".
|
| 11930 |
+
for _cand in (_szl_doc("a11oy_landing.html"), _szl_doc("cathedral.html"),
|
| 11931 |
PAGES_DIR / "console.html", INDEX_HTML):
|
| 11932 |
try:
|
| 11933 |
_cp = Path(_cand)
|
|
|
|
| 12038 |
|
| 12039 |
|
| 12040 |
# --- Doctrine v13 organ page routes (ADDITIVE; explicit, win over SPA catch-all) ---
|
| 12041 |
+
PAGES_DIR = _SZL_SRC_ROOT / "pages" if (_SZL_SRC_ROOT / "pages").is_dir() else Path("/app/pages")
|
| 12042 |
|
| 12043 |
# === ADDITIVE (Yachay CTO + Perplexity Computer Agent, 2026-06-02): wire orphaned ===
|
| 12044 |
# === genius pages that were BUILT but never registered (fell to SPA shell = a lie). ===
|
|
|
|
| 12075 |
# only the /api/a11oy/v4/predict* JSON routes. Explicit route wins over SPA catch-all.
|
| 12076 |
@app.get("/predict")
|
| 12077 |
async def predict_page() -> Response:
|
| 12078 |
+
f = _szl_doc("predict.html")
|
| 12079 |
if f.is_file():
|
| 12080 |
return FileResponse(f, media_type="text/html")
|
| 12081 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 12085 |
# now COPYed to /app/web/canonical.html by the Dockerfile (added in this same commit).
|
| 12086 |
@app.get("/canonical")
|
| 12087 |
async def canonical_page() -> Response:
|
| 12088 |
+
f = _szl_doc("web/canonical.html")
|
| 12089 |
if f.is_file():
|
| 12090 |
return FileResponse(f, media_type="text/html")
|
| 12091 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 12095 |
# /app/web/status.html by the Dockerfile already; just needs an explicit route.
|
| 12096 |
@app.get("/status")
|
| 12097 |
async def status_page() -> Response:
|
| 12098 |
+
f = _szl_doc("web/status.html")
|
| 12099 |
if f.is_file():
|
| 12100 |
return FileResponse(f, media_type="text/html")
|
| 12101 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 12114 |
# Signed-off-by: Stephen P. Lutar Jr. <stephenlutar2@gmail.com>
|
| 12115 |
@app.get("/proof")
|
| 12116 |
async def proof_replay_page() -> Response:
|
| 12117 |
+
f = _szl_doc("web/proof.html")
|
| 12118 |
if f.is_file():
|
| 12119 |
return FileResponse(f, media_type="text/html")
|
| 12120 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 12131 |
# Registered BEFORE the SPA /{full_path:path} catch-all so it wins the ordered match.
|
| 12132 |
@app.get("/trust")
|
| 12133 |
async def trust_page() -> Response:
|
| 12134 |
+
f = _szl_doc("web/trust.html")
|
| 12135 |
if f.is_file():
|
| 12136 |
return FileResponse(f, media_type="text/html")
|
| 12137 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 12243 |
app.add_api_route("/elite", _elite_redirect, methods=["GET"], include_in_schema=False)
|
| 12244 |
|
| 12245 |
|
| 12246 |
+
# /killinchu — path bridge, honestly labelled. Without an explicit route this path
|
| 12247 |
+
# falls through to the A11OY SPA shell and returns a misleading HTTP 200. Keep the
|
| 12248 |
+
# bridge server-side so it works without JavaScript at every mobile viewport, and
|
| 12249 |
+
# preserve subpaths/query strings.
|
| 12250 |
+
#
|
| 12251 |
+
# HONESTY (identity-lock): the killinchu Space RUNTIME is not up — a request to
|
| 12252 |
+
# szlholdings-killinchu.hf.space times out / errors, so redirecting a visitor there
|
| 12253 |
+
# implies a live product that is not serving. The bridge therefore targets the
|
| 12254 |
+
# Hugging Face HUB page for the Space (which is always readable and states the
|
| 12255 |
+
# runtime's own state), stamps X-SZL-Route-State: UNAVAILABLE_RUNTIME, and links
|
| 12256 |
+
# the hub as rel="alternate" — NEVER rel="canonical" (this app does not hand its
|
| 12257 |
+
# canonical to a third-party host; product canonical stays on a-11-oy.com).
|
| 12258 |
+
_KILLINCHU_HUB = "https://huggingface.co/spaces/SZLHOLDINGS/killinchu"
|
| 12259 |
+
_KILLINCHU_RUNTIME_STATE = "UNAVAILABLE_RUNTIME"
|
| 12260 |
|
| 12261 |
|
| 12262 |
async def _killinchu_redirect(request: Request, full_path: str = "") -> Response:
|
| 12263 |
+
# Deep links cannot be honoured while the runtime is down (no runtime = no
|
| 12264 |
+
# subpath), so every /killinchu/* request lands on the hub page and the
|
| 12265 |
+
# requested subpath is echoed in a header instead of being faked upstream.
|
| 12266 |
+
response = _PTG_Redirect(url=_KILLINCHU_HUB, status_code=307)
|
| 12267 |
+
response.headers["X-SZL-Route-State"] = _KILLINCHU_RUNTIME_STATE
|
| 12268 |
+
response.headers["X-SZL-Killinchu-Hub"] = _KILLINCHU_HUB
|
| 12269 |
+
if full_path:
|
| 12270 |
+
response.headers["X-SZL-Killinchu-Requested-Path"] = f"/{full_path}"
|
| 12271 |
+
response.headers["Link"] = f'<{_KILLINCHU_HUB}>; rel="alternate"'
|
| 12272 |
return response
|
| 12273 |
|
| 12274 |
|
|
|
|
| 12292 |
# baked (Dockerfile COPY) but lacked a route -> soft-404'd to the SPA shell.
|
| 12293 |
@app.get("/estate-hologram")
|
| 12294 |
async def estate_hologram_page() -> Response:
|
| 12295 |
+
f = _szl_doc("web/estate-hologram.html")
|
| 12296 |
if f.is_file():
|
| 12297 |
return FileResponse(f, media_type="text/html")
|
| 12298 |
return FileResponse(INDEX_HTML, media_type="text/html")
|
|
|
|
| 14466 |
_A11OY_FTIERS_DIAG = {"status": "FAILED", "error": repr(_ftiers_e)}
|
| 14467 |
|
| 14468 |
# ============================================================================
|
| 14469 |
+
# AYNI IDENTITY LOCK — canonical host: a-11-oy.com (product). a11oy.net is the
|
| 14470 |
+
# PROOF REGISTRY, not a sunset domain: this app emits NO .net 301 and exports no
|
| 14471 |
+
# SUNSET_DOMAIN. a11oy_canonical_domain.register() only adds the host-aware
|
| 14472 |
+
# product Link rel="canonical" header — https://a-11-oy.com/<path> — computed by
|
| 14473 |
+
# the app, not Cloudflare, and never huggingface.co/spaces.
|
| 14474 |
+
#
|
| 14475 |
+
# DNS facts this app records but does NOT change (no DNS is edited from here):
|
| 14476 |
+
# * The apex stays proxied — orange-cloud. Do not grey-cloud the apex; the
|
| 14477 |
+
# grey-cloud path drops the proxy that terminates TLS for the Space.
|
| 14478 |
+
# * The Hugging Face runtime.domains entry for a-11-oy.com may report PENDING
|
| 14479 |
+
# while Cloudflare still serves the apex. PENDING is KALLPA/Stephen DNS; it
|
| 14480 |
+
# is never stamped "domain LIVE" and never rewrites HTML canonicals.
|
| 14481 |
+
# * www.a-11-oy.com GET / is Cloudflare HTTP 404 today — UNAVAILABLE until a
|
| 14482 |
+
# Cloudflare 301 www → apex exists. We do not fabricate a working www.
|
| 14483 |
+
# * Do not add a second HF custom domain. Do not merge PR 1363.
|
| 14484 |
+
# Read-path-safe (pure header/Location response, no receipt, no signing).
|
| 14485 |
+
# Registered before uvicorn.run so the middleware stack is built with it; passes
|
| 14486 |
+
# through the HF Space host + localhost untouched.
|
| 14487 |
# ============================================================================
|
| 14488 |
try:
|
| 14489 |
import a11oy_canonical_domain as _canon_mod
|