Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@6fce07000c059cb2c8dcffba0cfb99b621543e97 derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy 6fce07000c059cb2c8dcffba0cfb99b621543e97.
Files: 1206 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>
- Dockerfile +1 -1
- static/shared/szl_command_bar.css +203 -0
- static/shared/szl_command_bar.js +362 -0
Dockerfile
CHANGED
|
@@ -517,7 +517,7 @@ COPY szl_connectors/ ./szl_connectors/
|
|
| 517 |
|
| 518 |
# --- ESTATE ECOSYSTEM FOUNDATION (Dev5, 2026-06): byte-identical shared modules ---
|
| 519 |
# … (full rationale: docs/DOCKERFILE_NOTES.md §66)
|
| 520 |
-
COPY static/shared/szl_label_engine.js static/shared/szl_receipt_cosign.js static/shared/szl_codename_sanitizer.js static/shared/szl_holo3d.js ./static/shared/
|
| 521 |
|
| 522 |
# --- GOVERNANCE / EVAL / CALIBRATION layer (Dev B, 2026-06): ADDITIVE ---
|
| 523 |
# … (full rationale: docs/DOCKERFILE_NOTES.md §67)
|
|
|
|
| 517 |
|
| 518 |
# --- ESTATE ECOSYSTEM FOUNDATION (Dev5, 2026-06): byte-identical shared modules ---
|
| 519 |
# … (full rationale: docs/DOCKERFILE_NOTES.md §66)
|
| 520 |
+
COPY static/shared/szl_label_engine.js static/shared/szl_receipt_cosign.js static/shared/szl_codename_sanitizer.js static/shared/szl_holo3d.js static/shared/szl_command_bar.js static/shared/szl_command_bar.css ./static/shared/
|
| 521 |
|
| 522 |
# --- GOVERNANCE / EVAL / CALIBRATION layer (Dev B, 2026-06): ADDITIVE ---
|
| 523 |
# … (full rationale: docs/DOCKERFILE_NOTES.md §67)
|
static/shared/szl_command_bar.css
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
(c) 2026 Lutar, Stephen P. - SZL Holdings - ORCID 0009-0001-0110-4173 */
|
| 3 |
+
/* szl_command_bar.css — KANCHAY holographic command bar (density / glass / motion / IA).
|
| 4 |
+
Canonical house palette (Doctrine v11). Does not restore the gold/tan console palette.
|
| 5 |
+
Λ is Conjecture 1 — advisory, gray, never green, never a theorem, never a gate. */
|
| 6 |
+
|
| 7 |
+
:root{
|
| 8 |
+
--void:#080c14;
|
| 9 |
+
--proof:#3af4c8;
|
| 10 |
+
--lattice:#5b8dee;
|
| 11 |
+
--kanchay-gold:#d7b96b;
|
| 12 |
+
--ground:#080c14;
|
| 13 |
+
--panel:#0e1626;
|
| 14 |
+
--panel2:#0a1019;
|
| 15 |
+
--rail:#0a1019;
|
| 16 |
+
--gold:#d7b96b;
|
| 17 |
+
--gold-bright:#e4c97a;
|
| 18 |
+
--gold-line:rgba(215,185,107,0.18);
|
| 19 |
+
--gold-soft:rgba(215,185,107,0.05);
|
| 20 |
+
--teal:#3af4c8;
|
| 21 |
+
--teal-soft:rgba(58,244,200,0.10);
|
| 22 |
+
--teal-line:rgba(58,244,200,0.22);
|
| 23 |
+
--cream:#eef4fb;
|
| 24 |
+
--paragraph:#aebccf;
|
| 25 |
+
--muted:#7d8aa0;
|
| 26 |
+
--dim:#65788f;
|
| 27 |
+
--live:#3af4c8;
|
| 28 |
+
--err:#e8746e;
|
| 29 |
+
--warn:#d7b96b;
|
| 30 |
+
--gray:#7d8aa0;
|
| 31 |
+
--szl-bar-h:52px;
|
| 32 |
+
--mono:'JetBrains Mono',ui-monospace,SFMono-Regular,monospace;
|
| 33 |
+
--display:'Space Grotesk',system-ui,-apple-system,"Segoe UI",sans-serif;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
/* ===== three-zone holographic bar ===== */
|
| 37 |
+
.szl-hbar,.topbar.szl-hbar{
|
| 38 |
+
--hbar-bg:rgba(8,12,20,0.78);
|
| 39 |
+
position:sticky;top:0;z-index:80;
|
| 40 |
+
display:flex;align-items:stretch;gap:0;
|
| 41 |
+
min-height:var(--szl-bar-h)!important;height:auto!important;max-height:none!important;
|
| 42 |
+
overflow:visible!important;flex-wrap:nowrap;white-space:nowrap;
|
| 43 |
+
padding:0 12px;box-sizing:border-box;
|
| 44 |
+
background:var(--hbar-bg);
|
| 45 |
+
backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
|
| 46 |
+
border-bottom:1px solid rgba(28,41,66,0.9);
|
| 47 |
+
box-shadow:inset 0 1px 0 rgba(58,244,200,0.45); /* single top specular hairline */
|
| 48 |
+
font-family:var(--mono);font-size:12.5px;letter-spacing:.08em;text-transform:uppercase;
|
| 49 |
+
color:var(--cream);line-height:1.2;
|
| 50 |
+
}
|
| 51 |
+
.szl-hbar *,.szl-hbar *::before,.szl-hbar *::after{box-sizing:border-box;}
|
| 52 |
+
.szl-hbar a{color:inherit;text-decoration:none;}
|
| 53 |
+
.szl-hbar .menu-btn{flex:0 0 auto;align-self:center;}
|
| 54 |
+
|
| 55 |
+
.szl-hbar-zone{
|
| 56 |
+
display:flex;align-items:center;gap:10px;min-width:0;padding:8px 12px;
|
| 57 |
+
}
|
| 58 |
+
.szl-hbar-scope{flex:0 1 auto;max-width:34%;border-right:1px solid rgba(28,41,66,0.8);}
|
| 59 |
+
.szl-hbar-live{flex:1 1 auto;justify-content:center;gap:8px;overflow:hidden;}
|
| 60 |
+
.szl-hbar-switch{flex:0 1 auto;margin-left:auto;border-left:1px solid rgba(28,41,66,0.8);gap:8px;}
|
| 61 |
+
|
| 62 |
+
.szl-hbar-crumb{display:inline-flex;align-items:center;gap:8px;min-width:0;}
|
| 63 |
+
.szl-hbar-crumb .sep{color:var(--dim);}
|
| 64 |
+
.szl-hbar-crumb .now{color:var(--proof);}
|
| 65 |
+
|
| 66 |
+
/* Glass only on live / receipt-bearing chips — glass means "this is streaming." */
|
| 67 |
+
.szl-chip{
|
| 68 |
+
display:inline-flex;align-items:center;gap:6px;
|
| 69 |
+
padding:5px 9px;border-radius:6px;border:1px solid transparent;
|
| 70 |
+
color:var(--muted);font-size:12px;letter-spacing:.08em;
|
| 71 |
+
}
|
| 72 |
+
.szl-chip--live{
|
| 73 |
+
color:var(--cream);
|
| 74 |
+
background:rgba(14,22,38,0.55);
|
| 75 |
+
border-color:rgba(58,244,200,0.28);
|
| 76 |
+
backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
|
| 77 |
+
box-shadow:inset 0 1px 0 rgba(58,244,200,0.18);
|
| 78 |
+
}
|
| 79 |
+
.szl-chip--off{color:var(--muted);border-color:rgba(101,120,143,0.35);}
|
| 80 |
+
.szl-chip--deny{
|
| 81 |
+
color:#0a1019;background:var(--err);border-color:var(--err);
|
| 82 |
+
animation:szl-deny-flash .28s steps(2,end) 3;
|
| 83 |
+
}
|
| 84 |
+
.szl-chip--lambda,.szl-lambda{color:var(--gray)!important;} /* Conjecture 1 — never green */
|
| 85 |
+
.szl-dot{width:7px;height:7px;border-radius:50%;background:var(--proof);box-shadow:0 0 6px rgba(58,244,200,.45);}
|
| 86 |
+
.szl-chip--off .szl-dot{background:var(--dim);box-shadow:none;}
|
| 87 |
+
.szl-roll{font-variant-numeric:tabular-nums;display:inline-block;min-width:1.6ch;text-align:right;}
|
| 88 |
+
.szl-roll.is-tick{animation:szl-digit .45s ease;}
|
| 89 |
+
.szl-pulse{animation:szl-hairline 1.1s ease-out 1;}
|
| 90 |
+
|
| 91 |
+
.szl-origins{display:inline-flex;align-items:center;gap:2px;}
|
| 92 |
+
.szl-origins a,.szl-origins button.szl-origin{
|
| 93 |
+
appearance:none;background:transparent;border:0;color:var(--muted);
|
| 94 |
+
font:inherit;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;
|
| 95 |
+
padding:7px 10px;border-radius:6px;min-height:36px;
|
| 96 |
+
}
|
| 97 |
+
.szl-origins a.is-on,.szl-origins button.szl-origin.is-on{color:var(--proof);box-shadow:inset 0 -1px 0 var(--proof);}
|
| 98 |
+
.szl-origins a:hover,.szl-origins button.szl-origin:hover{color:var(--cream);}
|
| 99 |
+
|
| 100 |
+
.szl-proof{color:var(--proof)!important;white-space:nowrap;}
|
| 101 |
+
.szl-cmdk{
|
| 102 |
+
display:inline-flex;align-items:center;gap:6px;
|
| 103 |
+
padding:6px 10px;border-radius:6px;border:1px solid rgba(58,244,200,0.28);
|
| 104 |
+
color:var(--proof);background:rgba(58,244,200,0.06);cursor:pointer;
|
| 105 |
+
font:inherit;letter-spacing:.08em;text-transform:uppercase;min-height:36px;
|
| 106 |
+
}
|
| 107 |
+
.szl-more{
|
| 108 |
+
appearance:none;background:transparent;border:1px solid rgba(101,120,143,0.4);
|
| 109 |
+
color:var(--muted);font:inherit;letter-spacing:.08em;text-transform:uppercase;
|
| 110 |
+
padding:6px 10px;border-radius:6px;cursor:pointer;min-height:36px;
|
| 111 |
+
}
|
| 112 |
+
.szl-overflow{position:relative;}
|
| 113 |
+
.szl-overflow-menu{
|
| 114 |
+
display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:90;
|
| 115 |
+
min-width:220px;padding:8px;border-radius:8px;
|
| 116 |
+
background:rgba(8,12,20,0.96);border:1px solid rgba(28,41,66,0.95);
|
| 117 |
+
box-shadow:0 16px 40px rgba(0,0,0,.45);
|
| 118 |
+
white-space:normal;
|
| 119 |
+
}
|
| 120 |
+
.szl-overflow.open .szl-overflow-menu{display:flex;flex-direction:column;gap:4px;}
|
| 121 |
+
.szl-overflow-menu a,.szl-overflow-menu button{
|
| 122 |
+
display:block;width:100%;text-align:left;background:transparent;border:0;
|
| 123 |
+
color:var(--cream);font:inherit;letter-spacing:.06em;text-transform:uppercase;
|
| 124 |
+
padding:8px 10px;border-radius:6px;cursor:pointer;
|
| 125 |
+
}
|
| 126 |
+
.szl-overflow-menu a:hover,.szl-overflow-menu button:hover{background:rgba(58,244,200,0.08);color:var(--proof);}
|
| 127 |
+
.szl-estate{display:inline-flex;align-items:center;gap:6px;}
|
| 128 |
+
|
| 129 |
+
/* Public default: estate switcher + labs/killinchu stay behind the operator gate. */
|
| 130 |
+
html:not([data-operator="1"]) .szl-estate,
|
| 131 |
+
html:not([data-operator="1"]) .extlinks,
|
| 132 |
+
html:not([data-operator="1"]) .switcher,
|
| 133 |
+
html:not([data-operator="1"]) [data-view="labs"],
|
| 134 |
+
html:not([data-operator="1"]) [data-view="labsintro"],
|
| 135 |
+
html:not([data-operator="1"]) a[href*="killinchu"],
|
| 136 |
+
html:not([data-operator="1"]) .vcard[href="#cybSurface"]{display:none!important;}
|
| 137 |
+
|
| 138 |
+
html[data-view="investor"] [data-view="energy"],
|
| 139 |
+
html[data-view="investor"] [data-view="energySci"],
|
| 140 |
+
html[data-view="investor"] [data-view="energyReceipts"],
|
| 141 |
+
html[data-view="investor"] [data-view="energyGrid"],
|
| 142 |
+
html[data-view="investor"] .vcard[href="#cybSurface"],
|
| 143 |
+
html[data-view="investor"] .vcard-energy,
|
| 144 |
+
html:not([data-operator="1"]) [data-view="energy"],
|
| 145 |
+
html:not([data-operator="1"]) [data-view="energySci"],
|
| 146 |
+
html:not([data-operator="1"]) [data-view="energyReceipts"],
|
| 147 |
+
html:not([data-operator="1"]) [data-view="energyGrid"]{display:none!important;}
|
| 148 |
+
|
| 149 |
+
/* Honest empty states — UNKNOWN / ROADMAP / UNAVAILABLE (consume 1391 patterns, KANCHAY tokens). */
|
| 150 |
+
.empty-unknown,.szl-empty{
|
| 151 |
+
display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;
|
| 152 |
+
padding:.9rem 1rem;border:1px dashed var(--gold-line);border-radius:8px;background:transparent;
|
| 153 |
+
}
|
| 154 |
+
.empty-unknown-k,.szl-empty__k{
|
| 155 |
+
font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;
|
| 156 |
+
color:var(--gold);border:1px solid var(--gold-line);padding:.12rem .45rem;border-radius:4px;
|
| 157 |
+
}
|
| 158 |
+
.empty-unknown-d,.szl-empty__d{font-size:13px;line-height:1.5;color:var(--dim);}
|
| 159 |
+
.empty-unknown-viz,.szl-empty--viz{min-height:220px;align-items:center;justify-content:center;text-align:center;}
|
| 160 |
+
.szl-empty[data-kind="error"] .szl-empty__k{color:var(--err);border-color:rgba(232,116,110,0.45);}
|
| 161 |
+
.szl-empty[data-kind="permission"] .szl-empty__k{color:var(--gray);border-color:rgba(125,138,160,0.4);}
|
| 162 |
+
|
| 163 |
+
/* ⌘K palette */
|
| 164 |
+
.szl-pal-ov{position:fixed;inset:0;z-index:220;background:rgba(8,12,20,.72);backdrop-filter:blur(4px);display:none;align-items:flex-start;justify-content:center;}
|
| 165 |
+
.szl-pal-ov.open{display:flex;}
|
| 166 |
+
.szl-pal{margin-top:12vh;width:min(560px,92vw);background:var(--panel);border:1px solid var(--teal-line);border-radius:12px;overflow:hidden;}
|
| 167 |
+
.szl-pal input{width:100%;box-sizing:border-box;padding:1rem 1.1rem;background:var(--panel2);border:none;border-bottom:1px solid var(--gold-line);color:var(--cream);font-family:var(--mono);font-size:14px;outline:none;text-transform:none;letter-spacing:0;}
|
| 168 |
+
.szl-pal-list{max-height:48vh;overflow:auto;padding:.4rem;}
|
| 169 |
+
.szl-pal-item{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.55rem .7rem;border-radius:8px;cursor:pointer;color:var(--paragraph);font-size:13px;letter-spacing:.04em;text-transform:uppercase;}
|
| 170 |
+
.szl-pal-item:hover,.szl-pal-item.sel{background:var(--teal-soft);color:var(--cream);}
|
| 171 |
+
.szl-pal-item .road{color:var(--gold);font-size:10px;}
|
| 172 |
+
|
| 173 |
+
.szl-op-toggle{
|
| 174 |
+
appearance:none;background:transparent;border:1px solid rgba(101,120,143,0.4);
|
| 175 |
+
color:var(--dim);font:inherit;letter-spacing:.08em;text-transform:uppercase;
|
| 176 |
+
padding:6px 10px;border-radius:6px;cursor:pointer;min-height:36px;
|
| 177 |
+
}
|
| 178 |
+
html[data-operator="1"] .szl-op-toggle{color:var(--proof);border-color:var(--teal-line);}
|
| 179 |
+
|
| 180 |
+
@keyframes szl-digit{0%{transform:translateY(40%);opacity:.2;}100%{transform:none;opacity:1;}}
|
| 181 |
+
@keyframes szl-hairline{0%{box-shadow:inset 0 1px 0 rgba(58,244,200,1),0 0 0 0 rgba(58,244,200,.35);}100%{box-shadow:inset 0 1px 0 rgba(58,244,200,.18),0 0 0 0 rgba(58,244,200,0);}}
|
| 182 |
+
@keyframes szl-deny-flash{0%,100%{filter:none;}50%{filter:brightness(1.35);}}
|
| 183 |
+
@keyframes szl-lattice{
|
| 184 |
+
0%{background-position:0 0;}
|
| 185 |
+
100%{background-position:24px 0;}
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
/* Residual conductor-lattice (subtle, 5% holographic). Tied to the bar, not decoration. */
|
| 189 |
+
.szl-hbar::before{
|
| 190 |
+
content:"";position:absolute;inset:0;pointer-events:none;opacity:.05;z-index:0;
|
| 191 |
+
background-image:repeating-linear-gradient(90deg,rgba(91,141,238,.9) 0 1px,transparent 1px 24px);
|
| 192 |
+
animation:szl-lattice 18s linear infinite;
|
| 193 |
+
}
|
| 194 |
+
.szl-hbar > *{position:relative;z-index:1;}
|
| 195 |
+
|
| 196 |
+
@media (max-width:820px){
|
| 197 |
+
.szl-hbar{flex-wrap:wrap;white-space:normal;row-gap:6px;padding:8px 10px;}
|
| 198 |
+
.szl-hbar-scope,.szl-hbar-live,.szl-hbar-switch{max-width:none;border:0;flex:1 1 100%;margin:0;justify-content:flex-start;}
|
| 199 |
+
.szl-hbar-live{order:3;}
|
| 200 |
+
}
|
| 201 |
+
@media (prefers-reduced-motion:reduce){
|
| 202 |
+
.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
* (c) 2026 Lutar, Stephen P. - SZL Holdings - ORCID 0009-0001-0110-4173
|
| 3 |
+
* szl_command_bar.js — three-zone holographic command bar (KANCHAY).
|
| 4 |
+
* Read-only probes. Never signs. Never fabricates metrics.
|
| 5 |
+
* Λ = Conjecture 1 (advisory, gray). Locked-proven stays 8.
|
| 6 |
+
*/
|
| 7 |
+
(function (global) {
|
| 8 |
+
'use strict';
|
| 9 |
+
if (global.__szlCommandBarLoaded) return;
|
| 10 |
+
global.__szlCommandBarLoaded = true;
|
| 11 |
+
|
| 12 |
+
var PROOF = 'https://a11oy.net';
|
| 13 |
+
var KERNEL = 'https://huggingface.co/SZLHOLDINGS/governed-inference-meter';
|
| 14 |
+
var reduce = false;
|
| 15 |
+
try {
|
| 16 |
+
reduce = !!(global.matchMedia && global.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
| 17 |
+
} catch (e) {}
|
| 18 |
+
try {
|
| 19 |
+
var bootQ = location.search || '';
|
| 20 |
+
if (/[?&]operator=1\b/.test(bootQ) || localStorage.getItem('szl.operator') === '1') {
|
| 21 |
+
document.documentElement.setAttribute('data-operator', '1');
|
| 22 |
+
}
|
| 23 |
+
var bootView = null;
|
| 24 |
+
try { bootView = new URLSearchParams(bootQ).get('view'); } catch (e2) {}
|
| 25 |
+
if (!bootView && /[?&]investor=1\b/.test(bootQ)) bootView = 'investor';
|
| 26 |
+
if (!bootView) bootView = (location.hash || '').replace(/^#/, '').split('/')[0];
|
| 27 |
+
if (bootView) document.documentElement.setAttribute('data-view', bootView);
|
| 28 |
+
} catch (e) {}
|
| 29 |
+
|
| 30 |
+
var VERBS = [
|
| 31 |
+
{ label: 'Verify a receipt', href: '/verify' },
|
| 32 |
+
{ label: 'Open diligence room', href: PROOF },
|
| 33 |
+
{ label: 'Proof registry', href: PROOF },
|
| 34 |
+
{ label: 'Command Center', href: '/console?view=command' },
|
| 35 |
+
{ label: 'Ask & Act', href: '/console?view=ask' },
|
| 36 |
+
{ label: 'Investor View', href: '/console?view=investor' },
|
| 37 |
+
{ label: 'WILLAY — signed refusals', href: '/willay' },
|
| 38 |
+
{ label: 'Pull the kernel', href: KERNEL },
|
| 39 |
+
{ label: 'Persistent kernel', href: '', roadmap: true }
|
| 40 |
+
];
|
| 41 |
+
|
| 42 |
+
function el(tag, attrs, kids) {
|
| 43 |
+
var n = document.createElement(tag);
|
| 44 |
+
if (attrs) {
|
| 45 |
+
Object.keys(attrs).forEach(function (k) {
|
| 46 |
+
if (k === 'class') n.className = attrs[k];
|
| 47 |
+
else if (k === 'text') n.textContent = attrs[k];
|
| 48 |
+
else if (k === 'html') n.innerHTML = attrs[k];
|
| 49 |
+
else if (k.slice(0, 2) === 'on' && typeof attrs[k] === 'function') n.addEventListener(k.slice(2), attrs[k]);
|
| 50 |
+
else if (attrs[k] != null) n.setAttribute(k, attrs[k]);
|
| 51 |
+
});
|
| 52 |
+
}
|
| 53 |
+
(kids || []).forEach(function (c) {
|
| 54 |
+
if (c == null) return;
|
| 55 |
+
n.appendChild(typeof c === 'string' ? document.createTextNode(c) : c);
|
| 56 |
+
});
|
| 57 |
+
return n;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
function fetchJson(url, ms) {
|
| 61 |
+
var ctrl = typeof AbortController !== 'undefined' ? new AbortController() : null;
|
| 62 |
+
var t = ctrl ? setTimeout(function () { try { ctrl.abort(); } catch (e) {} }, ms || 8000) : null;
|
| 63 |
+
return fetch(url, { cache: 'no-store', signal: ctrl ? ctrl.signal : undefined }).then(function (r) {
|
| 64 |
+
if (t) clearTimeout(t);
|
| 65 |
+
if (!r.ok) throw new Error('HTTP ' + r.status);
|
| 66 |
+
return r.json();
|
| 67 |
+
}).catch(function (e) {
|
| 68 |
+
if (t) clearTimeout(t);
|
| 69 |
+
throw e;
|
| 70 |
+
});
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
function setChip(node, live, text) {
|
| 74 |
+
if (!node) return;
|
| 75 |
+
node.classList.toggle('szl-chip--live', !!live);
|
| 76 |
+
node.classList.toggle('szl-chip--off', !live);
|
| 77 |
+
var lab = node.querySelector('[data-lab]');
|
| 78 |
+
if (lab) lab.textContent = text;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
function roll(node, next) {
|
| 82 |
+
if (!node) return;
|
| 83 |
+
var prev = node.getAttribute('data-v');
|
| 84 |
+
node.textContent = next;
|
| 85 |
+
node.setAttribute('data-v', String(next));
|
| 86 |
+
if (!reduce && prev != null && prev !== String(next)) {
|
| 87 |
+
node.classList.remove('is-tick');
|
| 88 |
+
void node.offsetWidth;
|
| 89 |
+
node.classList.add('is-tick');
|
| 90 |
+
}
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
function mount(root) {
|
| 94 |
+
if (!root || root.getAttribute('data-szl-mounted') === '1') return;
|
| 95 |
+
root.setAttribute('data-szl-mounted', '1');
|
| 96 |
+
root.classList.add('szl-hbar', 'topbar');
|
| 97 |
+
|
| 98 |
+
var surface = root.getAttribute('data-surface') || 'Command Platform';
|
| 99 |
+
var origin = (root.getAttribute('data-origin') || 'product').toLowerCase();
|
| 100 |
+
var menu = root.querySelector('.menu-btn');
|
| 101 |
+
|
| 102 |
+
var scope = el('div', { class: 'szl-hbar-zone szl-hbar-scope', 'aria-label': 'Scope' }, [
|
| 103 |
+
el('div', { class: 'szl-hbar-crumb' }, [
|
| 104 |
+
el('span', { text: 'SZL HOLDINGS' }),
|
| 105 |
+
el('span', { class: 'sep', text: '/' }),
|
| 106 |
+
el('span', { text: 'A11OY' }),
|
| 107 |
+
el('span', { class: 'sep', text: '/' }),
|
| 108 |
+
el('span', { class: 'now', text: surface })
|
| 109 |
+
])
|
| 110 |
+
]);
|
| 111 |
+
|
| 112 |
+
var svc = el('span', { class: 'szl-chip szl-chip--off', id: 'runtime-status' }, [
|
| 113 |
+
el('span', { class: 'szl-dot' }),
|
| 114 |
+
el('span', { 'data-lab': '1', id: 'runtime-status-text', text: 'UNAVAILABLE' })
|
| 115 |
+
]);
|
| 116 |
+
var lam = el('span', { class: 'szl-chip szl-chip--off szl-chip--lambda', title: 'Λ = Conjecture 1 — advisory, never a theorem, never a gate' }, [
|
| 117 |
+
el('span', { text: 'Λ' }),
|
| 118 |
+
el('span', { 'data-lab': '1', text: 'CONJECTURE 1' })
|
| 119 |
+
]);
|
| 120 |
+
var chain = el('span', { class: 'szl-chip szl-chip--off' }, [
|
| 121 |
+
el('span', { text: 'CHAIN' }),
|
| 122 |
+
el('span', { class: 'szl-roll', 'data-lab': '1', 'data-roll': '1', text: '—' })
|
| 123 |
+
]);
|
| 124 |
+
var age = el('span', { class: 'szl-chip szl-chip--off' }, [
|
| 125 |
+
el('span', { text: 'RECEIPT' }),
|
| 126 |
+
el('span', { 'data-lab': '1', text: 'UNAVAILABLE' })
|
| 127 |
+
]);
|
| 128 |
+
var kern = el('span', {
|
| 129 |
+
class: 'szl-chip szl-chip--off',
|
| 130 |
+
title: 'Lean locked theorems from /api/a11oy/v1/honest locked_formula_count. Genome LOCKED-PROVEN is catalog, never this chip.'
|
| 131 |
+
}, [
|
| 132 |
+
el('span', { text: 'LOCKED-8' }),
|
| 133 |
+
el('span', { 'data-lab': '1', text: 'UNAVAILABLE' })
|
| 134 |
+
]);
|
| 135 |
+
var live = el('div', { class: 'szl-hbar-zone szl-hbar-live', 'aria-label': 'Live cluster' }, [svc, lam, kern, chain, age]);
|
| 136 |
+
|
| 137 |
+
var product = el('a', {
|
| 138 |
+
class: 'szl-origin' + (origin === 'product' ? ' is-on' : ''),
|
| 139 |
+
href: '/console',
|
| 140 |
+
'aria-label': 'Open the command center',
|
| 141 |
+
text: 'Command'
|
| 142 |
+
});
|
| 143 |
+
var proof = el('a', {
|
| 144 |
+
class: 'szl-origin szl-proof' + (origin === 'proof' ? ' is-on' : ''),
|
| 145 |
+
href: PROOF,
|
| 146 |
+
target: '_blank',
|
| 147 |
+
rel: 'noopener noreferrer',
|
| 148 |
+
text: 'Proof registry ↗'
|
| 149 |
+
});
|
| 150 |
+
var investor = el('button', {
|
| 151 |
+
class: 'szl-origin',
|
| 152 |
+
type: 'button',
|
| 153 |
+
id: 'inv-toggle',
|
| 154 |
+
text: 'Investor view',
|
| 155 |
+
onclick: function () {
|
| 156 |
+
if (typeof global.go === 'function') global.go('investor');
|
| 157 |
+
else location.href = '/console?view=investor';
|
| 158 |
+
}
|
| 159 |
+
});
|
| 160 |
+
var cmdkBtn = el('button', { class: 'szl-cmdk', type: 'button', title: 'Command palette', text: '⌘K' });
|
| 161 |
+
var opBtn = el('button', { class: 'szl-op-toggle', type: 'button', text: 'Operator' });
|
| 162 |
+
var moreBtn = el('button', { class: 'szl-more', type: 'button', text: 'More' });
|
| 163 |
+
var moreMenu = el('div', { class: 'szl-overflow-menu', role: 'menu' });
|
| 164 |
+
var overflow = el('div', { class: 'szl-overflow' }, [moreBtn, moreMenu]);
|
| 165 |
+
|
| 166 |
+
var estate = el('nav', { class: 'szl-estate extlinks', 'aria-label': 'Estate switcher' }, [
|
| 167 |
+
el('a', { class: 'flag', href: '/console', text: 'A11OY' }),
|
| 168 |
+
el('a', { class: 'flag', href: 'https://huggingface.co/spaces/szlholdings/killinchu', target: '_blank', rel: 'noopener noreferrer', text: 'KILLINCHU' }),
|
| 169 |
+
el('a', { class: 'flag', href: '/anatomy-v5', text: 'ANATOMY' })
|
| 170 |
+
]);
|
| 171 |
+
|
| 172 |
+
var origins = el('div', { class: 'szl-origins' }, [product, proof]);
|
| 173 |
+
var sw = el('div', { class: 'szl-hbar-zone szl-hbar-switch', 'aria-label': 'Surface switcher' }, [
|
| 174 |
+
origins, investor, cmdkBtn, opBtn, estate, overflow
|
| 175 |
+
]);
|
| 176 |
+
|
| 177 |
+
root.textContent = '';
|
| 178 |
+
if (menu) root.appendChild(menu);
|
| 179 |
+
root.appendChild(scope);
|
| 180 |
+
root.appendChild(live);
|
| 181 |
+
root.appendChild(sw);
|
| 182 |
+
|
| 183 |
+
opBtn.addEventListener('click', function () {
|
| 184 |
+
var on = document.documentElement.getAttribute('data-operator') === '1';
|
| 185 |
+
if (on) document.documentElement.removeAttribute('data-operator');
|
| 186 |
+
else document.documentElement.setAttribute('data-operator', '1');
|
| 187 |
+
try { localStorage.setItem('szl.operator', on ? '0' : '1'); } catch (e) {}
|
| 188 |
+
});
|
| 189 |
+
try {
|
| 190 |
+
if (localStorage.getItem('szl.operator') === '1') document.documentElement.setAttribute('data-operator', '1');
|
| 191 |
+
} catch (e) {}
|
| 192 |
+
|
| 193 |
+
moreBtn.addEventListener('click', function (ev) {
|
| 194 |
+
ev.stopPropagation();
|
| 195 |
+
overflow.classList.toggle('open');
|
| 196 |
+
});
|
| 197 |
+
document.addEventListener('click', function () { overflow.classList.remove('open'); });
|
| 198 |
+
|
| 199 |
+
function collectOverflow() {
|
| 200 |
+
moreMenu.textContent = '';
|
| 201 |
+
var extras = [
|
| 202 |
+
{ label: 'Verify a receipt', href: '/verify' },
|
| 203 |
+
{ label: 'WILLAY', href: '/willay' },
|
| 204 |
+
{ label: 'Ask & Act', href: '/console?view=ask' }
|
| 205 |
+
];
|
| 206 |
+
extras.forEach(function (it) {
|
| 207 |
+
moreMenu.appendChild(el('a', { href: it.href, role: 'menuitem', text: it.label }));
|
| 208 |
+
});
|
| 209 |
+
}
|
| 210 |
+
collectOverflow();
|
| 211 |
+
|
| 212 |
+
var lastHead = null;
|
| 213 |
+
function probe() {
|
| 214 |
+
var operator = document.documentElement.getAttribute('data-operator') === '1';
|
| 215 |
+
Promise.all([
|
| 216 |
+
fetchJson('/healthz', 6000).catch(function () { return null; }),
|
| 217 |
+
fetchJson('/api/a11oy/v1/readiness/tab-matrix?view=summary', 6000).catch(function () { return null; }),
|
| 218 |
+
fetchJson('/api/a11oy/v1/observability/summary', 6000).catch(function () { return null; }),
|
| 219 |
+
fetchJson('/api/a11oy/v1/lambda', 6000).catch(function () { return null; }),
|
| 220 |
+
fetchJson('/api/a11oy/v1/wow/ledger?limit=1', 6000).catch(function () { return null; }),
|
| 221 |
+
fetchJson('/api/a11oy/v1/honest', 6000).catch(function () { return null; })
|
| 222 |
+
]).then(function (vals) {
|
| 223 |
+
var health = vals[0], matrix = vals[1], summary = vals[2], lambda = vals[3], ledger = vals[4], honest = vals[5];
|
| 224 |
+
if (health && (health.status === 'ok' || health.status === 'healthy')) {
|
| 225 |
+
var label = 'ONLINE';
|
| 226 |
+
if (operator && matrix && matrix.available === false) label = 'ONLINE · CONTRACT GAP';
|
| 227 |
+
else if (operator && matrix && matrix.contract_version) label = 'ONLINE · CONTRACT ' + matrix.contract_version;
|
| 228 |
+
setChip(svc, true, label);
|
| 229 |
+
svc.classList.remove('szl-chip--deny');
|
| 230 |
+
} else {
|
| 231 |
+
setChip(svc, false, 'UNAVAILABLE');
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
if (lambda && typeof lambda.lambda === 'number') {
|
| 235 |
+
setChip(lam, true, 'CONJECTURE 1 · ' + lambda.lambda.toFixed(3));
|
| 236 |
+
} else {
|
| 237 |
+
setChip(lam, false, 'CONJECTURE 1 · UNAVAILABLE');
|
| 238 |
+
}
|
| 239 |
+
lam.classList.add('szl-chip--lambda');
|
| 240 |
+
|
| 241 |
+
var lockedN = honest && honest.locked_formula_count;
|
| 242 |
+
if (lockedN === 8) setChip(kern, true, '8');
|
| 243 |
+
else setChip(kern, false, 'UNAVAILABLE');
|
| 244 |
+
|
| 245 |
+
var depth = (ledger && ledger.chain_depth != null) ? ledger.chain_depth
|
| 246 |
+
: (summary && summary.dag_depth != null) ? summary.dag_depth : null;
|
| 247 |
+
var rollEl = chain.querySelector('[data-roll]');
|
| 248 |
+
if (depth != null) {
|
| 249 |
+
setChip(chain, true, '');
|
| 250 |
+
if (rollEl) {
|
| 251 |
+
rollEl.removeAttribute('data-lab');
|
| 252 |
+
roll(rollEl, String(depth));
|
| 253 |
+
}
|
| 254 |
+
} else {
|
| 255 |
+
setChip(chain, false, 'UNAVAILABLE');
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
var recs = (ledger && (ledger.receipts || ledger.items)) || [];
|
| 259 |
+
var rec = recs[0];
|
| 260 |
+
if (rec) {
|
| 261 |
+
var ts = rec.timestamp_utc || rec.ts || rec.t || rec.created_at;
|
| 262 |
+
var ageLabel = 'SIGNED';
|
| 263 |
+
if (rec.unsigned || rec.signer_state === 'UNSIGNED') ageLabel = 'UNSIGNED';
|
| 264 |
+
else if (rec.hash || rec.prev_hash) ageLabel = 'HASH-LINKED';
|
| 265 |
+
if (ts) {
|
| 266 |
+
var then = Date.parse(ts);
|
| 267 |
+
if (!isNaN(then)) {
|
| 268 |
+
var sec = Math.max(0, Math.round((Date.now() - then) / 1000));
|
| 269 |
+
ageLabel += sec < 60 ? (' · ' + sec + 's') : (' · ' + Math.round(sec / 60) + 'm');
|
| 270 |
+
}
|
| 271 |
+
}
|
| 272 |
+
setChip(age, true, ageLabel);
|
| 273 |
+
var head = rec.hash || rec.receipt_id || rec.id;
|
| 274 |
+
if (head && head !== lastHead) {
|
| 275 |
+
lastHead = head;
|
| 276 |
+
if (!reduce) {
|
| 277 |
+
root.classList.remove('szl-pulse');
|
| 278 |
+
void root.offsetWidth;
|
| 279 |
+
root.classList.add('szl-pulse');
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
} else {
|
| 283 |
+
setChip(age, false, 'UNAVAILABLE');
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
var deny = false;
|
| 287 |
+
try {
|
| 288 |
+
var g = document.getElementById('hero-gate');
|
| 289 |
+
if (g && /DENY|BLOCKED/.test(g.textContent || '')) deny = true;
|
| 290 |
+
} catch (e) {}
|
| 291 |
+
if (deny) svc.classList.add('szl-chip--deny');
|
| 292 |
+
}).catch(function () {
|
| 293 |
+
setChip(svc, false, 'UNAVAILABLE');
|
| 294 |
+
setChip(lam, false, 'CONJECTURE 1 · UNAVAILABLE');
|
| 295 |
+
setChip(kern, false, 'UNAVAILABLE');
|
| 296 |
+
setChip(chain, false, 'UNAVAILABLE');
|
| 297 |
+
setChip(age, false, 'UNAVAILABLE');
|
| 298 |
+
});
|
| 299 |
+
}
|
| 300 |
+
probe();
|
| 301 |
+
setInterval(probe, 20000);
|
| 302 |
+
|
| 303 |
+
cmdkBtn.addEventListener('click', openPalette);
|
| 304 |
+
document.addEventListener('keydown', function (e) {
|
| 305 |
+
if ((e.metaKey || e.ctrlKey) && (e.key === 'k' || e.key === 'K')) {
|
| 306 |
+
e.preventDefault();
|
| 307 |
+
openPalette();
|
| 308 |
+
}
|
| 309 |
+
});
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
var pal = null;
|
| 313 |
+
function openPalette() {
|
| 314 |
+
if (!pal) pal = buildPalette();
|
| 315 |
+
pal.classList.add('open');
|
| 316 |
+
var inp = pal.querySelector('input');
|
| 317 |
+
if (inp) inp.focus();
|
| 318 |
+
}
|
| 319 |
+
function closePalette() { if (pal) pal.classList.remove('open'); }
|
| 320 |
+
|
| 321 |
+
function buildPalette() {
|
| 322 |
+
var ov = el('div', { class: 'szl-pal-ov', role: 'dialog', 'aria-label': 'Command palette' });
|
| 323 |
+
var box = el('div', { class: 'szl-pal' });
|
| 324 |
+
var inp = el('input', { type: 'search', placeholder: 'Verify a receipt, jump a surface…', 'aria-label': 'Command' });
|
| 325 |
+
var list = el('div', { class: 'szl-pal-list' });
|
| 326 |
+
function render(q) {
|
| 327 |
+
list.textContent = '';
|
| 328 |
+
var qq = (q || '').toLowerCase();
|
| 329 |
+
VERBS.filter(function (v) { return !qq || v.label.toLowerCase().indexOf(qq) >= 0; }).forEach(function (v) {
|
| 330 |
+
var item = el('div', { class: 'szl-pal-item' }, [
|
| 331 |
+
el('span', { text: v.label }),
|
| 332 |
+
v.roadmap ? el('span', { class: 'road', text: 'ROADMAP' }) : null
|
| 333 |
+
]);
|
| 334 |
+
item.addEventListener('click', function () {
|
| 335 |
+
if (v.roadmap) return;
|
| 336 |
+
closePalette();
|
| 337 |
+
if (v.href.indexOf('/console?view=') === 0 && typeof global.go === 'function') {
|
| 338 |
+
global.go(v.href.split('view=')[1]);
|
| 339 |
+
} else {
|
| 340 |
+
location.href = v.href;
|
| 341 |
+
}
|
| 342 |
+
});
|
| 343 |
+
list.appendChild(item);
|
| 344 |
+
});
|
| 345 |
+
}
|
| 346 |
+
inp.addEventListener('input', function () { render(inp.value); });
|
| 347 |
+
ov.addEventListener('click', function (e) { if (e.target === ov) closePalette(); });
|
| 348 |
+
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closePalette(); });
|
| 349 |
+
box.appendChild(inp); box.appendChild(list); ov.appendChild(box);
|
| 350 |
+
document.body.appendChild(ov);
|
| 351 |
+
render('');
|
| 352 |
+
return ov;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
function mountAll() {
|
| 356 |
+
document.querySelectorAll('[data-szl-command-bar]').forEach(mount);
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
global.SZLCommandBar = { mount: mount, mountAll: mountAll };
|
| 360 |
+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', mountAll);
|
| 361 |
+
else mountAll();
|
| 362 |
+
})(window);
|