mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
This squashes all local history (768 commits) onto the scrubbed PR #90 baseline. Individual commits were lost during filter-repo corruption; the working tree content is preserved intact. Build: N/A (working tree state only)
466 lines
20 KiB
HTML
466 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Sovereign Surface | Research Stack</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=JetBrains+Mono:wght@300;400&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--bg: #050505;
|
|
--surface: rgba(255, 255, 255, 0.05);
|
|
--accent: #00ffcc;
|
|
--text: #e0e0e0;
|
|
--text-dim: #a0a0a0;
|
|
--glass: rgba(15, 15, 15, 0.7);
|
|
--border: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: 'Outfit', sans-serif;
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
display: grid;
|
|
grid-template-columns: 300px 1fr;
|
|
}
|
|
|
|
/* Sidebar */
|
|
aside {
|
|
background: var(--surface);
|
|
border-right: 1px solid var(--border);
|
|
padding: 2rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
letter-spacing: -0.02em;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.status-panel {
|
|
padding: 1rem;
|
|
background: var(--glass);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.status-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.status-label { color: var(--text-dim); }
|
|
.status-value { font-family: 'JetBrains Mono', monospace; }
|
|
|
|
/* Main Content */
|
|
main {
|
|
padding: 2rem;
|
|
overflow-y: auto;
|
|
background: radial-gradient(circle at 50% 50%, #0a0a0a 0%, #050505 100%);
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.card {
|
|
background: var(--glass);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
padding: 1.5rem;
|
|
transition: transform 0.2s, border-color 0.2s;
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-4px);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tag {
|
|
font-size: 0.7rem;
|
|
padding: 0.2rem 0.5rem;
|
|
background: var(--accent);
|
|
color: black;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.formula {
|
|
font-family: 'JetBrains Mono', monospace;
|
|
background: rgba(0,0,0,0.3);
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
font-size: 0.9rem;
|
|
color: var(--accent);
|
|
margin-bottom: 1rem;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.description {
|
|
font-size: 0.85rem;
|
|
color: var(--text-dim);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes pulse {
|
|
0% { opacity: 0.4; }
|
|
50% { opacity: 1; }
|
|
100% { opacity: 0.4; }
|
|
}
|
|
|
|
.live-indicator {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: var(--accent);
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
margin-right: 0.5rem;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.nav-link {
|
|
display: block;
|
|
padding: 0.75rem 1rem;
|
|
color: var(--text-dim);
|
|
text-decoration: none;
|
|
border-radius: 8px;
|
|
transition: all 0.2s;
|
|
font-size: 0.95rem;
|
|
border: 1px solid transparent;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
.nav-link:hover {
|
|
color: var(--text);
|
|
background: rgba(255, 255, 255, 0.02);
|
|
}
|
|
.nav-link.active {
|
|
color: var(--accent);
|
|
background: var(--surface);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.nuvmap-cell {
|
|
aspect-ratio: 1;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: transform 0.1s, box-shadow 0.1s;
|
|
}
|
|
.nuvmap-cell:hover {
|
|
transform: scale(1.15);
|
|
z-index: 10;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<aside>
|
|
<h1>SOVEREIGN<br>SURFACE</h1>
|
|
|
|
<div class="status-panel">
|
|
<div class="status-item">
|
|
<span class="status-label">HEARTBEAT</span>
|
|
<span class="status-value"><span class="live-indicator"></span>LIVE</span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span class="status-label">PHI (φ)</span>
|
|
<span id="phi-val" class="status-value">0.3547</span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span class="status-label">GPU LOAD</span>
|
|
<span id="gpu-load" class="status-value">0%</span>
|
|
</div>
|
|
<div id="gpu-bar-container" style="width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 4px; overflow: hidden;">
|
|
<div id="gpu-bar" style="width: 0%; height: 100%; background: var(--accent); transition: width 0.5s;"></div>
|
|
</div>
|
|
<div class="status-item" style="margin-top: 1rem;">
|
|
<span class="status-label">REASONING ETC</span>
|
|
<span id="etc-val" class="status-value" style="color: var(--accent);">0s</span>
|
|
</div>
|
|
<div class="status-item">
|
|
<span class="status-label">FORMAL CORE</span>
|
|
<span class="status-value" style="color: #00ff00;">LOCKED</span>
|
|
</div>
|
|
</div>
|
|
|
|
<nav style="display: flex; flex-direction: column; gap: 0.25rem; margin-top: 1.5rem;">
|
|
<a href="#" id="tab-forest" class="nav-link active" onclick="switchTab('forest')">Equation Forest</a>
|
|
<a href="#" id="tab-nuvmap" class="nav-link" onclick="switchTab('nuvmap')">NUVMAP Projection</a>
|
|
</nav>
|
|
</aside>
|
|
|
|
<main>
|
|
<!-- Section: Equation Forest -->
|
|
<div id="section-forest" class="tab-content">
|
|
<div style="margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: center;">
|
|
<h2 style="font-size: 1.8rem;">Equation Forest</h2>
|
|
<div class="tag" style="background: var(--surface); color: var(--text);">15 ACTIVE KERNELS</div>
|
|
</div>
|
|
|
|
<div id="equation-grid" class="grid">
|
|
<!-- Cards will be injected here -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Section: NUVMAP Projection -->
|
|
<div id="section-nuvmap" class="tab-content" style="display: none;">
|
|
<div style="margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: center;">
|
|
<h2 style="font-size: 1.8rem;">NUVMAP Projection Surface</h2>
|
|
<div class="tag" id="nuvmap-util-tag" style="background: var(--surface); color: var(--accent);">AREA UTILIZATION: --</div>
|
|
</div>
|
|
|
|
<!-- Interactive Map Summary -->
|
|
<div class="card" style="margin-bottom: 2rem; padding: 2rem;">
|
|
<div style="display: flex; gap: 2rem; margin-bottom: 1.5rem; justify-content: space-between; align-items: center;">
|
|
<div style="display: flex; gap: 2rem;">
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Total Qubits</div>
|
|
<div id="nuvmap-total-qubits" style="font-size: 1.8rem; font-weight: 600; color: var(--accent);">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Bekenstein Bound</div>
|
|
<div id="nuvmap-bekenstein" style="font-size: 1.8rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Admissible Cells</div>
|
|
<div id="nuvmap-admissible" style="font-size: 1.8rem; font-weight: 600; color: #00ff00;">--</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<button onclick="loadNuvmap()" style="background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-family: inherit;">Refresh Surface</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Legend -->
|
|
<div style="display: flex; gap: 1.5rem; margin-bottom: 1.5rem; font-size: 0.8rem; border-top: 1px solid var(--border); padding-top: 1rem;">
|
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
<div style="width: 12px; height: 12px; border-radius: 3px; background: #00ffcc; box-shadow: 0 0 8px #00ffcc;"></div>
|
|
<span>Admissible (Active front)</span>
|
|
</div>
|
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
<div style="width: 12px; height: 12px; border-radius: 3px; background: #33ccff; box-shadow: 0 0 8px #33ccff;"></div>
|
|
<span>Admissible (Decayed)</span>
|
|
</div>
|
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
<div style="width: 12px; height: 12px; border-radius: 3px; background: #ff3366; box-shadow: 0 0 8px #ff3366;"></div>
|
|
<span>Chiral Scarred (Rejected)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 16x16 interactive grid representing the 256 cells -->
|
|
<div id="nuvmap-grid-visual" style="display: grid; grid-template-columns: repeat(16, 1fr); gap: 6px; aspect-ratio: 1; max-width: 500px; margin: 0 auto; background: rgba(0,0,0,0.4); padding: 12px; border-radius: 12px; border: 1px solid var(--border);">
|
|
<!-- 256 cells dynamically loaded -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Details Card -->
|
|
<div id="nuvmap-details-card" class="card" style="display: none; border-color: var(--accent); margin-bottom: 2rem;">
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
|
|
<h3 style="font-size: 1.2rem; font-weight: 600;">Cell Details: <span id="cell-coord" style="color: var(--accent);">[u_i, v_i]</span></h3>
|
|
<span id="cell-admissibility-badge" class="tag">Admissible</span>
|
|
</div>
|
|
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; font-size: 0.9rem;">
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Eigenmass (E_i)</div>
|
|
<div id="cell-eigenmass" class="status-value" style="font-size: 1.1rem; color: var(--accent);">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Residual Risk (R_i)</div>
|
|
<div id="cell-risk" class="status-value" style="font-size: 1.1rem;">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Qubits (q_i)</div>
|
|
<div id="cell-qubits" class="status-value" style="font-size: 1.1rem; color: #00ff00;">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Chiral Residual (chi_i)</div>
|
|
<div id="cell-chiral" class="status-value" style="font-size: 1.1rem;">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Structural integrity (S_i)</div>
|
|
<div id="cell-structural" class="status-value" style="font-size: 1.1rem;">--</div>
|
|
</div>
|
|
<div>
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">Landauer threshold (L_i)</div>
|
|
<div id="cell-landauer" class="status-value" style="font-size: 1.1rem;">--</div>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem;">
|
|
<div class="status-label" style="font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.25rem;">CFF cell fingerprint</div>
|
|
<div id="cell-fingerprint" style="font-family: 'JetBrains Mono', monospace; word-break: break-all; color: var(--text-dim); font-size: 0.8rem;">--</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script>
|
|
function switchTab(tab) {
|
|
document.querySelectorAll('.tab-content').forEach(el => el.style.display = 'none');
|
|
document.querySelectorAll('.nav-link').forEach(el => el.classList.remove('active'));
|
|
|
|
if (tab === 'forest') {
|
|
document.getElementById('section-forest').style.display = 'block';
|
|
document.getElementById('tab-forest').classList.add('active');
|
|
} else if (tab === 'nuvmap') {
|
|
document.getElementById('section-nuvmap').style.display = 'block';
|
|
document.getElementById('tab-nuvmap').classList.add('active');
|
|
loadNuvmap();
|
|
}
|
|
}
|
|
|
|
async function loadForest() {
|
|
const resp = await fetch('/api/forest');
|
|
const data = await resp.json();
|
|
const grid = document.getElementById('equation-grid');
|
|
grid.innerHTML = '';
|
|
|
|
data.equations.forEach(eq => {
|
|
const card = document.createElement('div');
|
|
card.className = 'card';
|
|
card.innerHTML = `
|
|
<div class="card-header">
|
|
<span class="card-title">${eq.name}</span>
|
|
<span class="tag">${eq.type}</span>
|
|
</div>
|
|
<div class="formula">${eq.formula}</div>
|
|
<p class="description">${eq.description}</p>
|
|
`;
|
|
grid.appendChild(card);
|
|
});
|
|
}
|
|
|
|
async function loadNuvmap() {
|
|
try {
|
|
const resp = await fetch('/api/nuvmap');
|
|
const data = await resp.json();
|
|
if (data.error) {
|
|
alert(data.error);
|
|
return;
|
|
}
|
|
|
|
// Update summary metrics
|
|
document.getElementById('nuvmap-total-qubits').innerText = data.summary.total_qubits;
|
|
document.getElementById('nuvmap-bekenstein').innerText = data.summary.bekenstein_bound;
|
|
document.getElementById('nuvmap-admissible').innerText = `${data.summary.num_admissible} / ${data.summary.num_cells}`;
|
|
document.getElementById('nuvmap-util-tag').innerText = `AREA UTILIZATION: ${data.summary.area_utilization}`;
|
|
|
|
// Draw cells visual grid
|
|
const visualGrid = document.getElementById('nuvmap-grid-visual');
|
|
visualGrid.innerHTML = '';
|
|
|
|
data.cells.forEach(cell => {
|
|
const div = document.createElement('div');
|
|
div.className = 'nuvmap-cell';
|
|
|
|
// Style by state
|
|
let bg = '#ff3366'; // Scarred (rejected)
|
|
let shadow = 'none';
|
|
if (cell.admissible) {
|
|
if (cell.E_i > 0.05) {
|
|
bg = '#00ffcc'; // Admissible active front
|
|
shadow = '0 0 8px rgba(0, 255, 204, 0.4)';
|
|
} else {
|
|
bg = '#33ccff'; // Admissible decayed
|
|
shadow = '0 0 6px rgba(51, 204, 255, 0.3)';
|
|
}
|
|
}
|
|
|
|
div.style.background = bg;
|
|
div.style.boxShadow = shadow;
|
|
const q_ratio = cell.q_i / 50.0;
|
|
div.style.opacity = Math.min(1.0, 0.4 + q_ratio);
|
|
div.title = `Cell ${cell.u_i}: E=${cell.E_i.toFixed(4)}, q=${cell.q_i}`;
|
|
|
|
div.onclick = () => selectCell(cell);
|
|
visualGrid.appendChild(div);
|
|
});
|
|
} catch (err) {
|
|
console.error("Error loading NUVMAP:", err);
|
|
}
|
|
}
|
|
|
|
function selectCell(cell) {
|
|
document.getElementById('nuvmap-details-card').style.display = 'block';
|
|
document.getElementById('cell-coord').innerText = `[${cell.u_i}, ${cell.v_i}]`;
|
|
|
|
const badge = document.getElementById('cell-admissibility-badge');
|
|
if (cell.admissible) {
|
|
badge.innerText = 'ADMISSIBLE';
|
|
badge.style.background = '#00ffcc';
|
|
badge.style.color = 'black';
|
|
} else {
|
|
badge.innerText = 'REJECTED';
|
|
badge.style.background = '#ff3366';
|
|
badge.style.color = 'white';
|
|
}
|
|
|
|
document.getElementById('cell-eigenmass').innerText = cell.E_i.toFixed(6);
|
|
document.getElementById('cell-risk').innerText = cell.R_i.toFixed(6);
|
|
document.getElementById('cell-qubits').innerText = cell.q_i;
|
|
document.getElementById('cell-chiral').innerText = cell.chi_i.toFixed(6);
|
|
document.getElementById('cell-structural').innerText = cell.S_i.toFixed(2);
|
|
document.getElementById('cell-landauer').innerText = cell.L_i.toFixed(2);
|
|
document.getElementById('cell-fingerprint').innerText = cell.fingerprint;
|
|
}
|
|
|
|
function connectWS() {
|
|
const ws = new WebSocket(`ws://${window.location.host}/ws/telemetry`);
|
|
ws.onmessage = (event) => {
|
|
const data = JSON.parse(event.data);
|
|
if (data.type === 'heartbeat') {
|
|
document.getElementById('phi-val').innerText = data.phi.toFixed(4);
|
|
document.getElementById('gpu-load').innerText = `${data.gpu.util}%`;
|
|
document.getElementById('gpu-bar').style.width = `${data.gpu.util}%`;
|
|
document.getElementById('etc-val').innerText = data.etc;
|
|
|
|
// Update heartbeat pulse speed based on load
|
|
const indicator = document.querySelector('.live-indicator');
|
|
if (data.is_deriving) {
|
|
indicator.style.animationDuration = '0.5s';
|
|
indicator.style.background = '#ff0055';
|
|
} else {
|
|
indicator.style.animationDuration = '2s';
|
|
indicator.style.background = 'var(--accent)';
|
|
}
|
|
}
|
|
};
|
|
ws.onclose = () => setTimeout(connectWS, 5000);
|
|
}
|
|
|
|
loadForest();
|
|
connectWS();
|
|
</script>
|
|
</body>
|
|
</html>
|