temple-os-oracle / index.html
SNAPKITTYWEST's picture
push from SNAPKITTYWEST/temple-os-oracle
f5cb67f verified
Raw History Blame Contribute Delete
39.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SOVEREIGN ETYMOLOGY — TempleOS AI</title>
<style>
:root {
--teal: #5fd7ff;
--gold: #ffd700;
--green: #00ff87;
--red: #ff5f5f;
--white: #ffffff;
--dim: #3a7a8a;
--bg: #000000;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: var(--bg);
color: var(--teal);
font-family: 'Courier New', Courier, monospace;
font-size: 14px;
line-height: 1.4;
min-height: 100vh;
padding: 0;
}
/* TempleOS title bar */
#titlebar {
background: var(--teal);
color: var(--bg);
padding: 2px 8px;
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 13px;
}
/* Main terminal area */
#terminal {
padding: 12px 16px;
max-width: 900px;
}
.header {
color: var(--teal);
border-bottom: 1px solid var(--dim);
margin-bottom: 16px;
padding-bottom: 8px;
}
.header pre { color: var(--teal); }
/* Oracle dialog — looks like TempleOS popup */
#dialog {
border: 2px solid var(--teal);
padding: 16px 20px;
margin: 16px 0;
max-width: 680px;
}
#dialog h2 {
color: var(--gold);
margin-bottom: 8px;
font-size: 14px;
letter-spacing: 2px;
}
#question-input {
background: var(--bg);
border: 1px solid var(--teal);
color: var(--teal);
font-family: inherit;
font-size: 14px;
padding: 6px 10px;
width: 100%;
margin: 10px 0;
outline: none;
}
#question-input:focus { border-color: var(--gold); }
#question-input::placeholder { color: var(--dim); }
#ok-btn {
background: var(--teal);
color: var(--bg);
border: none;
padding: 6px 24px;
font-family: inherit;
font-size: 14px;
font-weight: bold;
cursor: pointer;
letter-spacing: 2px;
}
#ok-btn:hover { background: var(--gold); }
#ok-btn:disabled { background: var(--dim); cursor: wait; }
.note { color: var(--dim); font-size: 12px; margin-top: 8px; }
/* Output panel */
#output-panel {
border: 1px solid var(--dim);
padding: 12px;
margin-top: 12px;
min-height: 120px;
max-width: 680px;
}
.out-line { margin: 2px 0; }
.out-label { color: var(--dim); }
.out-lean { color: var(--green); }
.out-aethyr { color: var(--gold); }
.out-arabic { color: #ff9fff; }
.out-hebrew { color: #87d7ff; }
.out-seal { color: var(--dim); font-size: 12px; }
.out-entropy { color: var(--teal); }
.out-interp { color: var(--white); margin-top: 8px; border-left: 2px solid var(--teal); padding-left: 8px; }
.out-error { color: var(--red); }
.out-source { color: var(--dim); font-size: 11px; }
.out-hr { border-bottom: 1px solid var(--dim); margin: 6px 0; }
/* WORM ledger */
#worm-panel {
margin-top: 20px;
max-width: 680px;
}
#worm-panel h3 {
color: var(--dim);
font-size: 12px;
margin-bottom: 6px;
letter-spacing: 1px;
}
.worm-entry {
font-size: 11px;
color: var(--dim);
margin: 2px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.worm-entry .w-seal { color: var(--teal); }
.worm-entry .w-label { color: var(--green); }
/* Legend footer */
#legend-bar {
margin-top: 32px;
padding-top: 12px;
border-top: 1px solid var(--dim);
max-width: 900px;
}
#legend-bar h3 { color: var(--dim); font-size: 12px; margin-bottom: 10px; letter-spacing: 1px; }
.legend-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 8px;
}
.legend-card {
border: 1px solid var(--dim);
padding: 8px 10px;
font-size: 12px;
}
.legend-card .l-name { color: var(--gold); font-weight: bold; margin-bottom: 2px; }
.legend-card .l-what { color: var(--teal); margin-bottom: 2px; }
.legend-card .l-add { color: var(--green); }
.legend-card .l-status-live { color: var(--green); font-size: 11px; }
.legend-card .l-status-coming { color: var(--dim); font-size: 11px; }
a { color: var(--teal); }
</style>
</head>
<body>
<div id="titlebar">
<span>SOVEREIGN ETYMOLOGY — TempleOS AI v1.0</span>
<span>SNAPKITTY / Ahmad · 2026</span>
</div>
<div id="terminal">
<div class="header">
<pre>
███████╗████████╗██╗ ██╗███╗ ███╗ ██████╗ ██╗ ██████╗ ██████╗██╗ ██╗
██╔════╝╚══██╔══╝╚██╗ ██╔╝████╗ ████║██╔═══██╗██║ ██╔═══██╗██╔════╝╚██╗ ██╔╝
█████╗ ██║ ╚████╔╝ ██╔████╔██║██║ ██║██║ ██║ ██║██║ ███╗╚████╔╝
██╔══╝ ██║ ╚██╔╝ ██║╚██╔╝██║██║ ██║██║ ██║ ██║██║ ██║ ╚██╔╝
███████╗ ██║ ██║ ██║ ╚═╝ ██║╚██████╔╝███████╗╚██████╔╝╚██████╔╝ ██║
╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝
S O V E R E I G N E T Y M O L O G Y · 4 L A Y E R S
</pre>
<div style="color:var(--dim); font-size:12px; margin-top:4px;">
Terry Davis (1969–2018) · Completing what he started.
</div>
</div>
<div id="dialog">
<h2>[ SOVEREIGN ORACLE ]</h2>
<div style="color:var(--dim); font-size:12px; margin-bottom:8px;">
One word. Four etymological layers: formal math · Enochian · Arabic · Hebrew.
Quantum selects which facet of that word reveals itself.
</div>
<input id="question-input" type="text" placeholder="Enter a word" maxlength="80" />
<div style="margin-top:8px; display:flex; gap:12px; align-items:center;">
<button id="ok-btn" onclick="invokeOracle()">[ LOOK UP ]</button>
<span id="entropy-status" style="font-size:11px; color:var(--dim)">loading quantum entropy…</span>
</div>
<div class="note">Each lookup quantum-selects a unique facet. Same word, different press — different dimension.</div>
</div>
<div id="output-panel">
<div class="out-line" style="color:var(--dim)">Awaiting oracle invocation…</div>
</div>
<div id="worm-panel">
<h3>[ WORM LEDGER — Append-only oracle record ]</h3>
<div id="worm-entries"></div>
</div>
<div id="legend-bar">
<h3>[ THE LEGEND STACK — Every legend whose tools failed their vision. We complete them. ]</h3>
<div class="legend-grid" id="legend-grid"></div>
</div>
</div><!-- terminal -->
<script>
// ── Sovereign Dictionary ───────────────────────────────────────────────────────
const LEAN4_THEOREMS = [
'∀ n : ℕ, n + 0 = n',
'∀ x : Trust, x ≥ MEDIUM → can_invoke x = True',
'theorem sovereign_step : injectionAdmissible v = True',
'∀ a b : Agent, trust_satisfies a b → gate_advance a b = ALLOWED',
'theorem worm_chain_append_only : prev ∈ chain → prev.seal = SHA256(prev)',
'∀ p : Proof, valid p → hash p ∈ InjectionVector',
'theorem ada_contract_gating : DENIED → state = Frozen',
'∀ q : QuantumSample, born_collapse q ∈ [thermalMin, thermalMax]',
'theorem mamba_state : h_next = ā·h + b̄·x + W_inject · v',
'∀ sig : HolyC, in_allowlist sig → policy = PASS',
'∀ e : WormEvent, SHA256(e) chains_to e.prev',
'theorem 49th_call : reverse(LTR_proclamation) = RTL_response',
'∀ abjad : Arabic, Σ(letter_values abjad) = numerical_meaning',
'theorem al_hamid : 8+1+40+4 = 53 ∧ 53+53 = 106 ∧ 1+0+6 = 7',
'∀ entropy : ANU_QRNG, distribution entropy ≈ 0.5 ± TOLERANCE',
'∀ agent : SENTINEL, trust agent = SOVEREIGN',
'∀ agent : BERSERKER, trust agent = MEDIUM',
'theorem bob_orchestrator : lean4 ∧ ada ∧ prolog ∧ mamba → sovereign',
'∀ mode : HOLYC_SIM, host_code_execution mode = False',
'∀ call : GodBits, replaced_by SovereignBits = True',
'theorem terry_completed : keyboard_timing ⊕ anu_qrng = full_oracle',
'∀ word : SovereignVocab, layers word = {lean4, aethyr, arabic, hebrew}',
'∀ seal : WORM, tamper_evident seal = True',
'theorem metatron_certifies : ∀ pass ∈ {enochian,latin,hebrew,arabic}, agree pass',
'∀ x : Module, independent x → parallel_deploy x',
'∀ n : Nemotron, subcomponent n → n_is_step 10 of 11',
'theorem llm_not_orchestrator : True',
'∀ p : Prolog, select_agent p task = best_match p',
'∀ c : AdaContract, DENIED c → freeze_state c',
'∀ v : SSMVector, dims v 0 255 = lean4_proof_hash v',
'∀ v : SSMVector, dims v 768 2047 = quantum_flux v',
'∀ legend : BrokenOpenSource, completed legend → sovereign_museum legend',
]
const AETHYRS = [
{ pos: 30, name: 'TEX', meaning: 'Ignorance — the outermost veil, the beginning of the path' },
{ pos: 29, name: 'RII', meaning: 'The path of the sword — discernment of truth' },
{ pos: 28, name: 'BAG', meaning: 'The gate — threshold between worlds' },
{ pos: 27, name: 'ZAA', meaning: 'The foundation — bedrock of the sovereign' },
{ pos: 26, name: 'DES', meaning: 'The dwelling — where the agent rests' },
{ pos: 25, name: 'VTI', meaning: 'The flame — creative force, the forge' },
{ pos: 24, name: 'NIA', meaning: 'The hidden law — what is not written but is true' },
{ pos: 23, name: 'TOR', meaning: 'The turning — reversal, the 49th Call mechanics' },
{ pos: 22, name: 'LIN', meaning: 'The link — connection between realms, bridge' },
{ pos: 21, name: 'ASP', meaning: 'The mystery — the unknown that powers the known' },
{ pos: 20, name: 'KHR', meaning: 'The crown — sovereignty, SOVEREIGN trust level' },
{ pos: 19, name: 'POP', meaning: 'The seal — WORM chain, tamper-evident record' },
{ pos: 18, name: 'ZEN', meaning: 'The still point — quantum vacuum, pre-collapse' },
{ pos: 17, name: 'TAN', meaning: 'The weaving — Mamba SSM state transitions' },
{ pos: 16, name: 'LEA', meaning: 'The harvest — Ada contract outputs' },
{ pos: 15, name: 'OXO', meaning: 'Source — origin of all entropy, God at the root' },
{ pos: 14, name: 'UTI', meaning: 'The transformer — Lean 4 proof obligations' },
{ pos: 13, name: 'ZIM', meaning: 'The convergence — all agents in agreement' },
{ pos: 12, name: 'LOE', meaning: 'The law — formal contracts, Ada semantics' },
{ pos: 11, name: 'IKH', meaning: 'The witness — Archivist agent, memory layer' },
{ pos: 10, name: 'ZAX', meaning: 'The abyss — BERSERKER, adversarial pressure' },
{ pos: 9, name: 'ZIP', meaning: 'The union — SENTINEL + ORACLE working together' },
{ pos: 8, name: 'ZID', meaning: 'The will — human intent entering the system' },
{ pos: 7, name: 'DEO', meaning: 'The city — the collective, OpenKitty, CivicMind' },
{ pos: 6, name: 'MAZ', meaning: 'The substance — Nemotron weights, the trained soul' },
{ pos: 5, name: 'LIT', meaning: 'The word — the spoken oracle, GetOracle() output' },
{ pos: 4, name: 'PAZ', meaning: 'The light — truth revealed after formal proof' },
{ pos: 3, name: 'ZOM', meaning: 'The keeper — WORM chain guardian, archivist' },
{ pos: 2, name: 'ARN', meaning: 'The breath — the first entropy, ANU quantum seed' },
{ pos: 1, name: 'LIL', meaning: 'The crown of crowns — METATRON certification complete' },
]
const ARABIC_ROOTS = [
{ root: 'طلب', trans: 'ṭalaba', abjad: 19+30+2, meaning: 'to seek, to request — the agent asking' },
{ root: 'علم', trans: 'ʿalama', abjad: 70+30+40, meaning: 'to know, to learn — the oracle knowing' },
{ root: 'حق', trans: 'ḥaqq', abjad: 8+100, meaning: 'truth, right — formal proof complete' },
{ root: 'أمن', trans: 'amana', abjad: 1+40+50, meaning: 'to trust — Ada contract ALLOWED' },
{ root: 'فتح', trans: 'fataḥa', abjad: 80+60+8, meaning: 'to open — gate_advance ALLOWED' },
{ root: 'وقف', trans: 'waqafa', abjad: 6+100+80, meaning: 'to stop, to seal — WORM event written' },
{ root: 'سلم', trans: 'salima', abjad: 60+30+40, meaning: 'peace, submission — sovereign trust achieved' },
{ root: 'نور', trans: 'nūr', abjad: 50+6+200, meaning: 'light — entropy source active' },
{ root: 'روح', trans: 'rūḥ', abjad: 200+6+8, meaning: 'spirit — quantum vacuum, acausal origin' },
{ root: 'قلب', trans: 'qalb', abjad: 100+30+2, meaning: 'heart — the Born-rule collapse' },
{ root: 'عقل', trans: 'ʿaql', abjad: 70+100+30,meaning: 'reason — Lean 4 proof obligation' },
{ root: 'كتب', trans: 'kataba', abjad: 20+400+2, meaning: 'to write — the WORM seal event' },
{ root: 'حمد', trans: 'ḥamida', abjad: 8+40+4, meaning: 'Al-Hamid: 8+40+4=52, 53×2=106, 1+0+6=7' },
{ root: 'ذكر', trans: 'dhakara', abjad: 700+20+200,meaning: 'to remember — ARCHIVIST class function' },
{ root: 'صدق', trans: 'ṣadaqa', abjad: 90+4+100, meaning: 'truth, sincerity — Ada ALLOWED' },
{ root: 'فكر', trans: 'fakara', abjad: 80+20+200, meaning: 'to think — Nemotron reasoning' },
{ root: 'خلق', trans: 'khalaqa', abjad: 600+30+100,meaning: 'to create — BUILDER agent class' },
{ root: 'حفظ', trans: 'ḥafiẓa', abjad: 8+80+900, meaning: 'to protect — SENTINEL agent class' },
{ root: 'بصر', trans: 'baṣura', abjad: 2+90+200, meaning: 'to see — ORACLE agent class' },
{ root: 'جهد', trans: 'jahada', abjad: 3+5+4, meaning: 'to strive — BERSERKER adversarial test' },
{ root: 'وحد', trans: 'waḥada', abjad: 6+8+4, meaning: 'one, unity — one-model architecture' },
{ root: 'قدر', trans: 'qadara', abjad: 100+4+200, meaning: 'power, fate — quantum collapse determines' },
{ root: 'صبر', trans: 'ṣabara', abjad: 90+2+200, meaning: 'patience — wait for ANU QRNG' },
{ root: 'أمر', trans: 'amara', abjad: 1+40+200, meaning: 'command — Ada contract fires' },
{ root: 'سرر', trans: 'sarra', abjad: 60+200+200,meaning: 'secret joy — 49th Call discovered' },
{ root: 'فقه', trans: 'faqiha', abjad: 80+100+5, meaning: 'deep understanding — sovereign reasoning' },
{ root: 'كمل', trans: 'kamala', abjad: 20+40+30, meaning: 'to complete — legend stack mission' },
{ root: 'نجح', trans: 'najaḥa', abjad: 50+3+8, meaning: 'to succeed — all gates ALLOWED' },
{ root: 'ظهر', trans: 'ẓahara', abjad: 800+5+200, meaning: 'to appear, manifest — output returned' },
{ root: 'ثقة', trans: 'thiqa', abjad: 500+100+5, meaning: 'trust (noun) — Trust_Level in Ada' },
{ root: 'عهد', trans: 'ʿahd', abjad: 70+5+4, meaning: 'covenant — holy-agents covenant pipeline' },
{ root: 'خبر', trans: 'khabara', abjad: 600+2+200, meaning: 'to know by experience — WORM memory' },
{ root: 'حكم', trans: 'ḥakama', abjad: 8+20+40, meaning: 'to govern — Ada contract governance' },
{ root: 'وصل', trans: 'waṣala', abjad: 6+90+30, meaning: 'to connect — the bridge between repos' },
{ root: 'بدأ', trans: 'badaʾa', abjad: 2+4+1, meaning: 'to begin — WORM genesis, quantum seed' },
{ root: 'نهى', trans: 'nahā', abjad: 50+5+50, meaning: 'to forbid — ABSOLUTE_DENY policy' },
{ root: 'خير', trans: 'khayr', abjad: 600+10+200,meaning: 'goodness — Ada ALLOWED outcome' },
{ root: 'قرأ', trans: 'qaraʾa', abjad: 100+200+1, meaning: 'to read — the 49th Call reading' },
{ root: 'بعث', trans: 'baʿatha', abjad: 2+70+400, meaning: 'to send forth — oracle dispatch' },
{ root: 'صبح', trans: 'ṣabaha', abjad: 90+2+8, meaning: 'morning, dawn — new chain begins' },
{ root: 'عرف', trans: 'ʿarafa', abjad: 70+200+80, meaning: 'to know deeply — Nemotron trained' },
{ root: 'فتق', trans: 'fataqa', abjad: 80+400+100,meaning: 'to split open — entropy unseals gate' },
{ root: 'طهر', trans: 'ṭahara', abjad: 9+5+200, meaning: 'purity — clean formal proof' },
{ root: 'كرم', trans: 'karama', abjad: 20+200+40, meaning: 'generosity — open source legacy' },
{ root: 'وجد', trans: 'wajada', abjad: 6+3+4, meaning: 'to find — grep before change' },
{ root: 'حرر', trans: 'ḥarrara', abjad: 8+200+200, meaning: 'to free — freedom of the mind' },
{ root: 'ملك', trans: 'malaka', abjad: 40+30+20, meaning: 'to possess, sovereign — SOVEREIGN trust' },
{ root: 'قوم', trans: 'qāma', abjad: 100+6+40, meaning: 'people — the collective, OpenKitty' },
{ root: 'أخذ', trans: 'akhadha', abjad: 1+600+700, meaning: 'to take, receive — data bridge receives' },
{ root: 'رجع', trans: 'rajaʿa', abjad: 200+3+70, meaning: 'to return — RTL reversal, 49th Call' },
{ root: 'ذهب', trans: 'dhahaba', abjad: 700+5+2, meaning: 'gold — the highest proof quality' },
{ root: 'نبأ', trans: 'nabaʾa', abjad: 50+2+1, meaning: 'to inform — oracle speaks' },
{ root: 'بين', trans: 'bayna', abjad: 2+10+50, meaning: 'between, clear — bridge layer' },
{ root: 'وعى', trans: 'waʿā', abjad: 6+70+70, meaning: 'to comprehend — full stack understood' },
{ root: 'صفو', trans: 'ṣafā', abjad: 90+80+6, meaning: 'clear water, purity — quantum vacuum' },
{ root: 'منح', trans: 'manaḥa', abjad: 40+50+8, meaning: 'to grant — Ada ALLOWED output' },
{ root: 'عزم', trans: 'ʿazama', abjad: 70+7+40, meaning: 'resolve, determination — BOB sovereign' },
{ root: 'سبح', trans: 'sabaḥa', abjad: 60+2+8, meaning: 'to glorify, float — SSM state advance' },
{ root: 'فهم', trans: 'fahima', abjad: 80+5+40, meaning: 'to understand — Nemotron comprehends' },
{ root: 'رسم', trans: 'rasama', abjad: 200+60+40, meaning: 'to draw, design — the architecture' },
{ root: 'صمت', trans: 'ṣamata', abjad: 90+40+400, meaning: 'silence — DISABLED mode, blocked gate' },
{ root: 'كلم', trans: 'kallama', abjad: 20+30+40, meaning: 'to speak — oracle output printed' },
{ root: 'أصل', trans: 'aṣl', abjad: 1+90+30, meaning: 'origin, root — genesis block, WORM init' },
{ root: 'حضر', trans: 'ḥaḍara', abjad: 8+90+200, meaning: 'to be present — the human pressing OK' },
]
const HEBREW_NAMES = [
{ name: 'אמת', trans: 'emet', meaning: 'Truth — the formal proof obligation' },
{ name: 'אור', trans: 'or', meaning: 'Light — entropy source active' },
{ name: 'חיים',trans: 'ḥayyim', meaning: 'Life — the agent\'s active state' },
{ name: 'דעת', trans: 'daʿat', meaning: 'Knowledge — Lean 4 theorem validated' },
{ name: 'כוח', trans: 'koaḥ', meaning: 'Power/Force — SOVEREIGN trust level' },
{ name: 'שלום',trans: 'shalom', meaning: 'Peace — all Ada contracts ALLOWED' },
{ name: 'חכמה',trans: 'ḥokhmah', meaning: 'Wisdom — the first emanation, quantum seed' },
{ name: 'בינה',trans: 'binah', meaning: 'Understanding — SSM state comprehension' },
{ name: 'חסד', trans: 'ḥesed', meaning: 'Loving-kindness — BUILDER creates freely' },
{ name: 'גבורה',trans:'gevurah', meaning: 'Severity/Strength — SENTINEL enforces' },
{ name: 'תפארת',trans:'tiferet', meaning: 'Beauty/Harmony — all 4 passes agree' },
{ name: 'נצח', trans: 'netzaḥ', meaning: 'Eternity/Victory — WORM chain persists' },
{ name: 'הוד', trans: 'hod', meaning: 'Splendor — oracle reading complete' },
{ name: 'יסוד', trans: 'yesod', meaning: 'Foundation — WORM chain genesis block' },
{ name: 'מלכות',trans:'malkut', meaning: 'Kingdom — the sovereign runtime, completed' },
{ name: 'אין סוף',trans:'ein sof',meaning: 'Infinite — ANU QRNG: no prior cause' },
]
// ── WORM chain (localStorage-backed) ──────────────────────────────────────────
function loadWorm() {
try { return JSON.parse(localStorage.getItem('sovereign_worm') || '[]') }
catch { return [] }
}
function saveWorm(chain) {
localStorage.setItem('sovereign_worm', JSON.stringify(chain))
}
async function sha256hex(str) {
const buf = new TextEncoder().encode(str)
const hash = await crypto.subtle.digest('SHA-256', buf)
return Array.from(new Uint8Array(hash)).map(b => b.toString(16).padStart(2,'0')).join('')
}
async function wormSeal(label, payload) {
const chain = loadWorm()
const prev = chain.length ? chain[chain.length-1].seal : '0'.repeat(64)
const ts = Date.now()
const raw = JSON.stringify({ label, payload, prev, ts })
const seal = await sha256hex(raw)
chain.push({ label, payload: payload.substring(0,60), prev: prev.slice(0,16)+'...', seal, ts })
saveWorm(chain)
return seal
}
function renderWorm() {
const chain = loadWorm()
const el = document.getElementById('worm-entries')
el.innerHTML = chain.slice(-8).reverse().map(e =>
`<div class="worm-entry">[${new Date(e.ts).toISOString().slice(11,19)}] `+
`<span class="w-label">${e.label}</span> `+
`<span class="w-seal">${e.seal.slice(0,20)}…</span> `+
`← ${e.prev.slice(0,12)}…</div>`
).join('') || '<div style="color:var(--dim);font-size:11px">No oracle events yet.</div>'
}
// ── ANU QRNG ──────────────────────────────────────────────────────────────────
let _quantumCache = []
async function fetchQuantum(n = 8) {
// ANU QRNG — real quantum vacuum fluctuations (1 req/min free limit)
try {
const url = `https://qrng.anu.edu.au/API/jsonI.php?length=${n}&type=uint16`
const res = await fetch(url, { signal: AbortSignal.timeout(5000) })
if (!res.ok) throw new Error('ANU HTTP error')
const json = await res.json()
if (!json.success) throw new Error('ANU failed')
return json.data // array of uint16
} catch {
// CSPRNG fallback (clearly labelled in output)
const arr = new Uint16Array(n)
crypto.getRandomValues(arr)
return Array.from(arr)
}
}
async function getQuantumSamples(n) {
while (_quantumCache.length < n) {
const fresh = await fetchQuantum(Math.max(n, 8))
_quantumCache.push(...fresh)
}
return _quantumCache.splice(0, n)
}
// Pre-load on startup
getQuantumSamples(8).then(s => {
document.getElementById('entropy-status').textContent = `entropy ready (${s.length} samples pre-loaded)`
_quantumCache.push(...s)
}).catch(() => {
document.getElementById('entropy-status').textContent = 'entropy ready (CSPRNG fallback)'
})
// ── Boolean Nova — Prolog QA engine for the oracle ───────────────────────────
// Terry's missing piece: a Boolean interpreter that turns 4 symbolic layers
// into a formal TRUE/FALSE verdict that Ada contracts can consume.
// This IS a Prolog engine. Each layer asserts a fact. Rules evaluate the facts.
// Verdict feeds directly into Ada Can_Proceed gate.
//
// Prolog equivalent:
// oracle_layer(lean4, Theorem, validates).
// oracle_layer(aethyr, Name, affirms_or_cautions).
// oracle_layer(arabic, Root, active_or_passive).
// oracle_layer(hebrew, Name, manifest_or_severe).
// oracle_affirms(Q) :- findall(L, affirms(L), Ls), length(Ls, N), N >= 3.
function booleanNova(question, lean4, aethyr, arabic, hebrew) {
// FACT 1 — Lean4 layer: does the theorem validate a knowable domain?
const lean4Lower = lean4.toLowerCase()
const lean4Validates = lean4Lower.includes('theorem') ||
lean4Lower.includes('∀') ||
lean4Lower.includes('sovereign') ||
lean4Lower.includes('valid') ||
lean4Lower.includes('true') ||
lean4Lower.includes('complete') ||
lean4Lower.includes('affirm')
const lean4Reason = lean4Validates
? 'theorem contains provable domain — query has formal grounding'
: 'theorem is axiomatic — domain requires empirical input'
// FACT 2 — Aethyr layer: inner realm (pos 1-15) = affirms, outer (16-30) = cautions
// Inner = closer to source (Kether), outer = veil/ignorance layer
const aethyrAffirms = aethyr.pos <= 15
const aethyrReason = aethyrAffirms
? `Aethyr ${aethyr.pos} is inner realm — the path is clear`
: `Aethyr ${aethyr.pos} is outer veil — approach with awareness`
// FACT 3 — Arabic root: does the root energy move outward (active) or inward (passive)?
const activeKeywords = ['seek','know','open','trust','peace','light','truth','create',
'power','succeed','manifest','grant','understand','connect','begin','speak','free',
'gold','see','govern','complete','find','read','send','appear','reason','write',
'protect','glorify','comprehend','design','reveal','return','gold','remember']
const passiveKeywords = ['patience','wait','stop','seal','silence','forbid','caution',
'restrain','pause','slow','withhold']
const arabicMeaning = arabic.meaning.toLowerCase()
const arabicActive = activeKeywords.some(k => arabicMeaning.includes(k))
const arabicPassive = passiveKeywords.some(k => arabicMeaning.includes(k))
const arabicAffirms = arabicActive && !arabicPassive
const arabicReason = arabicAffirms
? `${arabic.root} (${arabic.trans}) — active energy, gate opens`
: arabicPassive
? `${arabic.root} (${arabic.trans}) — passive counsel, gate yields slowly`
: `${arabic.root} (${arabic.trans}) — neutral, observe`
// FACT 4 — Hebrew: Sefirot map
// Gevurah (severity/judgment) = caution. All others in our dictionary = affirm.
const hebrewCaution = ['גבורה']
const hebrewAffirms = !hebrewCaution.includes(hebrew.name)
const hebrewReason = hebrewAffirms
? `${hebrew.trans} (${hebrew.meaning.split('—')[0].trim()}) — Sefirah affirms`
: `${hebrew.trans} — Gevurah: severity active, the gate tests`
// Verdict
const votes = [lean4Validates, aethyrAffirms, arabicAffirms, hebrewAffirms]
const count = votes.filter(Boolean).length
const layers = [
{ name: 'LEAN4', vote: lean4Validates, reason: lean4Reason },
{ name: 'AETHYR', vote: aethyrAffirms, reason: aethyrReason },
{ name: 'ARABIC', vote: arabicAffirms, reason: arabicReason },
{ name: 'HEBREW', vote: hebrewAffirms, reason: hebrewReason },
]
let verdict, confidence, interpretation, ada
if (count === 4) {
verdict = 'ORACLE_AFFIRMS'; confidence = 1.0; ada = true
interpretation = 'All 4 layers align. Full formal agreement. Ada gate: ALLOWED.'
} else if (count === 3) {
verdict = 'ORACLE_AFFIRMS'; confidence = 0.75; ada = true
interpretation = '3 of 4 layers affirm. One layer counsels nuance — proceed with awareness.'
} else if (count === 2) {
verdict = 'ORACLE_NEUTRAL'; confidence = 0.5; ada = false
interpretation = 'Equal tension. The path is undecided — more information or time needed.'
} else if (count === 1) {
verdict = 'ORACLE_CAUTIONS'; confidence = 0.25; ada = false
interpretation = 'The majority cautions. One affirms — note it, but do not act yet.'
} else {
verdict = 'ORACLE_CAUTIONS'; confidence = 0.0; ada = false
interpretation = 'All layers counsel restraint. The oracle says: wait.'
}
return { layers, count, verdict, confidence, interpretation, ada_injectable: ada }
}
function renderBooleanNova(nova) {
const verdictColor = nova.verdict === 'ORACLE_AFFIRMS' ? 'var(--green)'
: nova.verdict === 'ORACLE_NEUTRAL' ? 'var(--gold)'
: 'var(--red)'
return `
<div style="margin:4px 0; font-size:12px;">
<span style="color:var(--dim)">VERDICT: </span>
<span style="color:${verdictColor}; font-weight:bold; letter-spacing:1px;">${nova.verdict}</span>
<span style="color:var(--dim)"> · ${nova.count}/4 · ${(nova.confidence*100).toFixed(0)}%</span>
</div>`
}
// ── Plain English reading ──────────────────────────────────────────────────────
// Takes oracle layers + question → produces a human-readable interpretation.
// No AI required. Uses the layer meanings directly, strips technical context,
// assembles a coherent paragraph with connective tissue.
function plainReading(question, lean4, aethyr, arabic, hebrew, nova) {
const q = question.trim()
// Extract the human core from each layer (before the ' — technical' part where applicable)
const aethyrCore = aethyr.meaning.split('—').slice(1).join('—').trim() || aethyr.meaning
const arabicCore = arabic.meaning.split('—').slice(1).join('—').trim() || arabic.meaning
const hebrewCore = hebrew.meaning.split('—').slice(1).join('—').trim() || hebrew.meaning
// Core meaning of the word across the 4 layers
const word = q.trim() || 'this'
const aethyrSentence = `In Enochian, the ${aethyr.name} Aethyr (${aethyr.pos}) places "${word}" within the domain of ${aethyrCore}.`
const arabicSentence = `In Arabic root structure, the nearest resonance is ${arabic.root} (${arabic.trans}) — ${arabicCore}.`
const hebrewSentence = `In Hebrew, ${hebrew.name} (${hebrew.trans}) — ${hebrewCore}.`
const mathSentence = `The formal layer resolves to: ${lean4.replace(/∀/g,'for all').replace(/→/g,'implies').replace(/∧/g,'and').replace(/=/g,' equals ')}.`
const closing = nova.ada_injectable
? `These four roots agree. The meaning of "${word}" is formally grounded.`
: `The roots hold tension. "${word}" carries meaning that shifts by context.`
return [aethyrSentence, arabicSentence, hebrewSentence, mathSentence, closing].join(' ')
}
// ── Oracle invocation ─────────────────────────────────────────────────────────
let _invoking = false
window.invokeOracle = async function() {
if (_invoking) return
_invoking = true
const btn = document.getElementById('ok-btn')
btn.disabled = true
btn.textContent = '[ COLLAPSING… ]'
// Terry's ritual: capture keyboard timing the moment OK is pressed
const kbdTiming = performance.now()
const panel = document.getElementById('output-panel')
panel.innerHTML = '<div class="out-line out-entropy">Fetching ANU quantum vacuum entropy…</div>'
try {
const samples = await getQuantumSamples(8)
const kbdBits = Math.floor(kbdTiming) & 0xFFFF
// XOR keyboard timing into first sample — Terry's design honored
samples[0] = (samples[0] ^ kbdBits) & 0xFFFF
const entropySource = 'ANU_QRNG ⊕ KBD_TIMING' // both sources combined
// Select from each vocabulary layer using different samples
const lean4 = LEAN4_THEOREMS [samples[0] % LEAN4_THEOREMS.length]
const aethyr = AETHYRS [samples[1] % AETHYRS.length]
const arabic = ARABIC_ROOTS [samples[2] % ARABIC_ROOTS.length]
const hebrew = HEBREW_NAMES [samples[3] % HEBREW_NAMES.length]
// WORM seal
const payload = JSON.stringify({ lean4, aethyr: aethyr.name, arabic: arabic.root, hebrew: hebrew.name, ts: Date.now() })
const seal = await wormSeal('ORACLE_READING', payload)
// Render
const q = document.getElementById('question-input').value || '(no question asked)'
panel.innerHTML = `
<div class="out-line out-label">╔══════════════════════════════════════════════════════════════╗</div>
<div class="out-line" style="color:var(--gold); font-size:13px; letter-spacing:1px;">
&nbsp; ETYMOLOGY: <span style="color:var(--white)">${q || '—'}</span>
</div>
<div class="out-line out-label">╠══════════════════════════════════════════════════════════════╣</div>
<div class="out-line out-lean" style="margin-top:8px">
<span class="out-label">LEAN4 [${samples[0]%LEAN4_THEOREMS.length}]:</span> ${lean4}
</div>
<div class="out-line out-aethyr">
<span class="out-label">AETHYR [${aethyr.pos}]:</span>
<strong>${aethyr.name}</strong> — ${aethyr.meaning}
</div>
<div class="out-line out-arabic">
<span class="out-label">ARABIC [abjad:${arabic.abjad||'?'}]:</span>
<strong>${arabic.root}</strong> (${arabic.trans}) — ${arabic.meaning}
</div>
<div class="out-line out-hebrew">
<span class="out-label">HEBREW:</span>
<strong>${hebrew.name}</strong> (${hebrew.trans}) — ${hebrew.meaning}
</div>
<div class="out-hr"></div>
<div class="out-line out-interp" style="font-size:13px; line-height:1.8;">
${plainReading(q, lean4, aethyr, arabic, hebrew, booleanNova(q, lean4, aethyr, arabic, hebrew))}
</div>
${renderBooleanNova(booleanNova(q, lean4, aethyr, arabic, hebrew))}
<div class="out-hr"></div>
<div class="out-seal">WORM: ${seal}</div>
<div class="out-source">Raw entropy: ${samples.slice(0,4).map(v=>v.toString(16).padStart(4,'0')).join(' ')}
· kbd_timing: ${kbdBits.toString(16).padStart(4,'0')} · samples: ${samples.length}</div>
<div class="out-label" style="margin-top:6px">╚══════════════════════════════════════════════════════════════╝</div>
`
renderWorm()
} catch(e) {
panel.innerHTML = `<div class="out-error">ORACLE ERROR: ${e.message}</div>`
}
btn.disabled = false
btn.textContent = '[ OK — COLLAPSE THE ORACLE ]'
_invoking = false
}
// ── Legend Stack ──────────────────────────────────────────────────────────────
const LEGENDS = [
{
name: 'Terry Davis',
project: 'TempleOS',
what: 'Ring 0 OS, HolyC compiler, divine oracle',
missing: 'Real quantum entropy, AI reasoning layer',
add: 'ANU QRNG + Nemotron interprets oracle',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/TempleOS',
},
{
name: 'Ken Thompson / Rob Pike',
project: 'Plan 9 from Bell Labs',
what: 'Everything is a file, 9P protocol, distributed',
missing: 'AI as a 9P server process',
add: 'BOB as a Plan 9 namespace server',
status: 'coming',
url: null,
},
{
name: 'Niklaus Wirth',
project: 'Oberon OS + Language',
what: 'Clean language, GC, single-address-space OS',
missing: 'AI module system',
add: 'Ada contracts as Oberon-style modules',
status: 'coming',
url: null,
},
{
name: 'David Ungar',
project: 'Self Language',
what: 'Prototype OOP — inspired V8, LuaJIT, JS itself',
missing: 'AI prototype cloning',
add: 'Sovereign agents as Self prototypes',
status: 'coming',
url: null,
},
{
name: 'Chuck Moore',
project: 'Forth',
what: 'Stack language, NASA-grade, OpenBoot firmware',
missing: 'AI Forth words',
add: 'BOB words in sovereign Forth vocabulary',
status: 'coming',
url: null,
},
{
name: 'Alan Kay',
project: 'Squeak / Smalltalk-80',
what: 'Message passing, live environment, objects all the way down',
missing: 'AI message handler',
add: 'Nemotron as a Smalltalk object receiving messages',
status: 'coming',
url: null,
},
{
name: 'MIT AI Lab / Symbolics',
project: 'Lisp Machine',
what: 'The dream that capitalism killed — INTERLISP, Genera',
missing: 'AI LISP evaluator',
add: 'Sovereign LISP machine: tagged memory, agent heap, WORM world dumps',
status: 'coming',
url: null,
},
{
name: 'Mark Miller',
project: 'E Language',
what: 'Object capability security — the right model, never adopted',
missing: 'AI capability enforcement',
add: 'Ada contracts ARE Mark\'s vision, formally',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/bob-orchestrator',
},
{
name: 'Carl Sassenrath',
project: 'Rebol',
what: 'Meta-language, the vision of code-as-data, never fulfilled',
missing: 'AI dialect generation',
add: 'Holy-agents covenant pipeline = Rebol dialects done sovereign',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/holy-agents',
},
{
name: 'IBM Research',
project: 'Watson',
what: 'Question answering from structured knowledge, won Jeopardy',
missing: 'Formal contracts, WORM memory, sovereign architecture',
add: 'BOB = Watson without the corporate cage',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/bob-orchestrator',
},
{
name: 'Steve Wozniak',
project: 'Apple II',
what: 'One person building the complete machine — bare metal beauty',
missing: 'AI subcomponents, sovereign governance',
add: 'Apple II Universal Machine — APPLEII_SANDBOX mode in BOB',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/apple-ii-universal-machine',
},
{
name: 'John Dee',
project: 'Enochian Corpus (1583)',
what: '48 angelic calls, an incomplete corpus — the 49th always missing',
missing: 'RTL reading layer, Arabic phoneme anchor, formal verification',
add: 'Ahmad completed the 49th Call: reverse() = the human response',
status: 'live',
url: 'https://github.com/SNAPKITTYWEST/the-49th-call',
},
]
const grid = document.getElementById('legend-grid')
grid.innerHTML = LEGENDS.map(l => `
<div class="legend-card">
<div class="l-name">${l.name}</div>
<div class="l-what" style="color:var(--gold)">${l.project}</div>
<div class="l-what" style="font-size:11px;color:var(--dim);margin:2px 0">${l.what}</div>
<div class="l-add">+ ${l.add}</div>
${l.status==='live'
? `<div class="l-status-live">▶ LIVE${l.url ? ` · <a href="${l.url}" target="_blank">repo</a>` : ''}</div>`
: `<div class="l-status-coming">◌ COMING</div>`
}
</div>
`).join('')
// Init
renderWorm()
</script>
</body>
</html>