|
|
|
|
|
|
| (async function() {
|
| const API_BASE = 'https://raw.githubusercontent.com/SNAPKITTYWEST/snapkitty-agentos/main/.agentos';
|
|
|
|
|
| async function fetchBucketCount() {
|
| try {
|
| const response = await fetch(`${API_BASE}/gitbucket/index/manifest.json`);
|
| if (!response.ok) return 'β';
|
| const data = await response.json();
|
| return data.buckets ? data.buckets.length : 0;
|
| } catch (e) {
|
| return 'β';
|
| }
|
| }
|
|
|
|
|
| async function fetchProblemCount() {
|
| try {
|
| const response = await fetch(`${API_BASE}/pnp/problem_registry.json`);
|
| if (!response.ok) return 'β';
|
| const data = await response.json();
|
| return data.problems ? data.problems.length : 0;
|
| } catch (e) {
|
| return 'β';
|
| }
|
| }
|
|
|
|
|
| async function fetchSkillCount() {
|
| try {
|
| const response = await fetch(`${API_BASE}/skills/registry.json`);
|
| if (!response.ok) return 'β';
|
| const data = await response.json();
|
| return data.skills ? data.skills.length : 0;
|
| } catch (e) {
|
| return 'β';
|
| }
|
| }
|
|
|
|
|
| const bucketCount = await fetchBucketCount();
|
| const problemCount = await fetchProblemCount();
|
| const skillCount = await fetchSkillCount();
|
|
|
| document.getElementById('bucket-count').textContent = bucketCount;
|
| document.getElementById('solution-count').textContent = problemCount;
|
| document.getElementById('agent-count').textContent = skillCount;
|
|
|
|
|
| const terminalLines = [
|
| '$ npm run verify:all',
|
| 'βΆ Plasma Gate verification...',
|
| 'β Ed25519 public key present',
|
| 'βΆ P/NP problem verification...',
|
| 'β 3 problems registered (all open)',
|
| 'βΆ Skill verification...',
|
| 'β ledger_validation_v3 verified',
|
| 'β borrow_chain_scheduler_v1 verified',
|
| 'βΆ APL Fortran package verification...',
|
| 'β 10 files, 6 symbols verified',
|
| '',
|
| '$ npm run swarm',
|
| 'βΆ Loading problems from registry...',
|
| 'β 3 problems loaded',
|
| 'βΆ Distributing to git buckets...',
|
| 'β Sealed 3 problems β bucket_np_registry',
|
| 'β Sealed 1 problem β bucket_np_1',
|
| 'β Sealed 1 problem β bucket_np_2',
|
| 'β Sealed 1 problem β bucket_p_3',
|
| 'βΆ Verification: 6/6 passed',
|
| 'β Swarm orchestration complete',
|
| '',
|
| '$ git push origin main',
|
| 'β Deployed to GitHub Pages',
|
| 'β'
|
| ];
|
|
|
| const terminal = document.getElementById('terminal-output');
|
| let lineIndex = 0;
|
|
|
| function addTerminalLine() {
|
| if (lineIndex < terminalLines.length) {
|
| const line = document.createElement('div');
|
| const isLast = lineIndex === terminalLines.length - 1;
|
| line.className = isLast ? 'terminal-line cursor' : 'terminal-line';
|
| line.textContent = terminalLines[lineIndex];
|
|
|
|
|
| if (terminalLines[lineIndex].startsWith('β')) {
|
| line.style.color = '#27c93f';
|
| } else if (terminalLines[lineIndex].startsWith('βΆ')) {
|
| line.style.color = '#00d4cc';
|
| } else if (terminalLines[lineIndex].startsWith('$')) {
|
| line.style.color = '#ffbd2e';
|
| }
|
|
|
| terminal.appendChild(line);
|
| terminal.scrollTop = terminal.scrollHeight;
|
| lineIndex++;
|
|
|
|
|
| const delay = terminalLines[lineIndex - 1] === '' ? 200 : 400;
|
| setTimeout(addTerminalLine, delay);
|
| }
|
| }
|
|
|
|
|
| setTimeout(() => {
|
| terminal.innerHTML = '';
|
| addTerminalLine();
|
| }, 2000);
|
| })();
|
|
|