sam-coder-cli 2.0.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/agi-animation.js +385 -169
- package/bin/agi-cli.js +46 -0
- package/bin/ui.js +12 -5
- package/package.json +1 -1
package/bin/agi-animation.js
CHANGED
|
@@ -33,7 +33,7 @@ class SoundGenerator {
|
|
|
33
33
|
|
|
34
34
|
async playBeep(frequency = 440, duration = 100) {
|
|
35
35
|
if (!this.soundEnabled) return;
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
try {
|
|
38
38
|
return new Promise((resolve) => {
|
|
39
39
|
if (this.isWindows) {
|
|
@@ -171,7 +171,7 @@ function getTerminalSize() {
|
|
|
171
171
|
// Ensure we always have valid numeric values
|
|
172
172
|
const width = Number(process.stdout.columns) || 80;
|
|
173
173
|
const height = Number(process.stdout.rows) || 24;
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
return {
|
|
176
176
|
width: Math.max(width, 40), // Minimum width of 40
|
|
177
177
|
height: Math.max(height, 10) // Minimum height of 10
|
|
@@ -180,14 +180,14 @@ function getTerminalSize() {
|
|
|
180
180
|
|
|
181
181
|
function centerText(text, width = getTerminalSize().width) {
|
|
182
182
|
if (!text || typeof text !== 'string') return '';
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
// Ensure width is a valid number
|
|
185
185
|
const safeWidth = Number(width) || 80;
|
|
186
|
-
|
|
186
|
+
|
|
187
187
|
const lines = text.split('\n');
|
|
188
188
|
return lines.map(line => {
|
|
189
189
|
if (!line) return line; // Handle empty lines
|
|
190
|
-
|
|
190
|
+
|
|
191
191
|
// Strip ANSI codes to calculate actual text length
|
|
192
192
|
const cleanLine = line.replace(/\x1b\[[0-9;]*m/g, '');
|
|
193
193
|
const lineLength = cleanLine.length || 0;
|
|
@@ -221,13 +221,13 @@ class FrameInterpolator {
|
|
|
221
221
|
// Interpolate between two ASCII art frames
|
|
222
222
|
interpolateFrames(frame1, frame2, steps = 10) {
|
|
223
223
|
const frames = [frame1];
|
|
224
|
-
|
|
224
|
+
|
|
225
225
|
for (let i = 1; i < steps; i++) {
|
|
226
226
|
const ratio = i / steps;
|
|
227
227
|
const interpolated = this.interpolateText(frame1, frame2, ratio);
|
|
228
228
|
frames.push(interpolated);
|
|
229
229
|
}
|
|
230
|
-
|
|
230
|
+
|
|
231
231
|
frames.push(frame2);
|
|
232
232
|
return frames;
|
|
233
233
|
}
|
|
@@ -257,7 +257,7 @@ class FrameInterpolator {
|
|
|
257
257
|
for (let i = 0; i < maxLen; i++) {
|
|
258
258
|
const char1 = line1[i] || ' ';
|
|
259
259
|
const char2 = line2[i] || ' ';
|
|
260
|
-
|
|
260
|
+
|
|
261
261
|
if (Math.random() < ratio) {
|
|
262
262
|
result += char2;
|
|
263
263
|
} else {
|
|
@@ -272,11 +272,11 @@ class FrameInterpolator {
|
|
|
272
272
|
fadeFrames(frame, fadeIn = true, steps = 10) {
|
|
273
273
|
const frames = [];
|
|
274
274
|
const chars = frame.split('');
|
|
275
|
-
|
|
275
|
+
|
|
276
276
|
for (let i = 0; i <= steps; i++) {
|
|
277
277
|
const ratio = fadeIn ? i / steps : 1 - (i / steps);
|
|
278
278
|
const visibleChars = Math.floor(chars.length * ratio);
|
|
279
|
-
|
|
279
|
+
|
|
280
280
|
let fadedFrame = '';
|
|
281
281
|
for (let j = 0; j < chars.length; j++) {
|
|
282
282
|
if (j < visibleChars && chars[j] !== ' ' && chars[j] !== '\n') {
|
|
@@ -287,10 +287,10 @@ class FrameInterpolator {
|
|
|
287
287
|
fadedFrame += ' ';
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
|
|
291
291
|
frames.push(fadedFrame);
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
|
|
294
294
|
return fadeIn ? frames : frames.reverse();
|
|
295
295
|
}
|
|
296
296
|
|
|
@@ -309,7 +309,7 @@ class FrameInterpolator {
|
|
|
309
309
|
let line = '';
|
|
310
310
|
for (let x = 0; x < lines[y].length; x++) {
|
|
311
311
|
const distance = Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2));
|
|
312
|
-
|
|
312
|
+
|
|
313
313
|
if (distance <= radius) {
|
|
314
314
|
line += lines[y][x];
|
|
315
315
|
} else {
|
|
@@ -332,23 +332,23 @@ const interpolator = new FrameInterpolator();
|
|
|
332
332
|
async function runAGIAnimation() {
|
|
333
333
|
const { width, height } = getTerminalSize();
|
|
334
334
|
process.stdout.write(ANSI.hideCursor);
|
|
335
|
-
|
|
335
|
+
|
|
336
336
|
try {
|
|
337
337
|
const startTime = Date.now();
|
|
338
338
|
let frameCount = 0;
|
|
339
339
|
const frameTime = interpolator.frameDuration;
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
// Start with ambient sound (non-blocking)
|
|
342
|
-
sound.playStartupSound().catch(() => {}); // Ignore sound errors
|
|
342
|
+
sound.playStartupSound().catch(() => { }); // Ignore sound errors
|
|
343
343
|
|
|
344
344
|
// PHASE 1: The Void (1 second - 30 frames)
|
|
345
345
|
const voidFrames = [];
|
|
346
346
|
for (let i = 0; i < 30; i++) {
|
|
347
347
|
const dotCount = (i % 4) + 1;
|
|
348
348
|
const dots = '•'.repeat(dotCount) + ' '.repeat(4 - dotCount);
|
|
349
|
-
const frame = safeRepeat('\n', Math.floor(height / 2) - 2) +
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
const frame = safeRepeat('\n', Math.floor(height / 2) - 2) +
|
|
350
|
+
centerText(dots) +
|
|
351
|
+
safeRepeat('\n', Math.floor(height / 2) - 2);
|
|
352
352
|
voidFrames.push(frame);
|
|
353
353
|
}
|
|
354
354
|
|
|
@@ -364,7 +364,7 @@ async function runAGIAnimation() {
|
|
|
364
364
|
for (let i = 0; i < 30; i++) {
|
|
365
365
|
const progress = i / 29;
|
|
366
366
|
const intensity = Math.sin(progress * Math.PI * 2) * 0.5 + 0.5;
|
|
367
|
-
|
|
367
|
+
|
|
368
368
|
let sparkPattern;
|
|
369
369
|
if (progress < 0.3) {
|
|
370
370
|
sparkPattern = '·';
|
|
@@ -374,13 +374,13 @@ async function runAGIAnimation() {
|
|
|
374
374
|
const core = intensity > 0.7 ? '█' : '●';
|
|
375
375
|
sparkPattern = ` · · ·\n· ·${core}· ·\n · · ·`;
|
|
376
376
|
}
|
|
377
|
-
|
|
378
|
-
const frame = safeRepeat('\n', Math.floor(height / 2) - 3) +
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
|
|
378
|
+
const frame = safeRepeat('\n', Math.floor(height / 2) - 3) +
|
|
379
|
+
centerText(sparkPattern) +
|
|
380
|
+
safeRepeat('\n', Math.floor(height / 2) - 3);
|
|
381
381
|
sparkFrames.push(frame);
|
|
382
382
|
}
|
|
383
|
-
|
|
383
|
+
|
|
384
384
|
for (const frame of sparkFrames) {
|
|
385
385
|
clearScreen();
|
|
386
386
|
safeWrite(chalk.whiteBright(frame));
|
|
@@ -391,7 +391,7 @@ async function runAGIAnimation() {
|
|
|
391
391
|
// PHASE 3: Quantum Expansion (1.5 seconds - 45 frames)
|
|
392
392
|
const quantumFrames = [];
|
|
393
393
|
const quantumChars = ['◆', '◇', '▪', '▫', '●', '○', '◊', '◉'];
|
|
394
|
-
|
|
394
|
+
|
|
395
395
|
// Add transition from spark to quantum
|
|
396
396
|
const sparkToQuantumTransition = interpolator.fadeFrames(sparkFrames[sparkFrames.length - 1], false, 5);
|
|
397
397
|
for (const frame of sparkToQuantumTransition) {
|
|
@@ -400,26 +400,26 @@ async function runAGIAnimation() {
|
|
|
400
400
|
await sleep(frameTime);
|
|
401
401
|
frameCount++;
|
|
402
402
|
}
|
|
403
|
-
|
|
403
|
+
|
|
404
404
|
for (let i = 0; i < 45; i++) {
|
|
405
405
|
const progress = i / 44;
|
|
406
406
|
const phase = progress * Math.PI * 4;
|
|
407
407
|
const baseSize = 2 + progress * 4;
|
|
408
408
|
const pulseSize = baseSize + Math.sin(phase * 2) * 1.5;
|
|
409
|
-
|
|
409
|
+
|
|
410
410
|
let frame = safeRepeat('\n', Math.floor(height / 2) - Math.floor(pulseSize) - 2);
|
|
411
|
-
|
|
411
|
+
|
|
412
412
|
for (let y = -Math.floor(pulseSize); y <= Math.floor(pulseSize); y++) {
|
|
413
413
|
let line = '';
|
|
414
414
|
for (let x = -Math.floor(pulseSize * 1.5); x <= Math.floor(pulseSize * 1.5); x++) {
|
|
415
415
|
const dist = Math.sqrt(x * x + y * y);
|
|
416
416
|
const normalizedDist = dist / pulseSize;
|
|
417
|
-
|
|
417
|
+
|
|
418
418
|
if (normalizedDist <= 1) {
|
|
419
419
|
// Use consistent pattern based on position and time
|
|
420
420
|
const charIndex = (Math.floor(x + y + i * 0.5)) % quantumChars.length;
|
|
421
421
|
const char = quantumChars[Math.abs(charIndex)];
|
|
422
|
-
|
|
422
|
+
|
|
423
423
|
// Add wave effect
|
|
424
424
|
const wave = Math.sin(dist * 0.5 + phase) * 0.5 + 0.5;
|
|
425
425
|
if (wave > 0.3) {
|
|
@@ -433,7 +433,7 @@ async function runAGIAnimation() {
|
|
|
433
433
|
}
|
|
434
434
|
frame += centerText(line) + '\n';
|
|
435
435
|
}
|
|
436
|
-
|
|
436
|
+
|
|
437
437
|
quantumFrames.push(frame);
|
|
438
438
|
}
|
|
439
439
|
|
|
@@ -448,7 +448,7 @@ async function runAGIAnimation() {
|
|
|
448
448
|
} else {
|
|
449
449
|
color = chalk.magenta;
|
|
450
450
|
}
|
|
451
|
-
|
|
451
|
+
|
|
452
452
|
safeWrite(color(quantumFrames[i]));
|
|
453
453
|
await sleep(frameTime);
|
|
454
454
|
frameCount++;
|
|
@@ -458,21 +458,21 @@ async function runAGIAnimation() {
|
|
|
458
458
|
const neuralFrames = [];
|
|
459
459
|
const nodes = 6;
|
|
460
460
|
const layers = 4;
|
|
461
|
-
|
|
461
|
+
|
|
462
462
|
// Play glitch sound (non-blocking)
|
|
463
|
-
sound.playGlitchSound().catch(() => {});
|
|
463
|
+
sound.playGlitchSound().catch(() => { });
|
|
464
464
|
|
|
465
465
|
for (let i = 0; i < 45; i++) {
|
|
466
466
|
const progress = i / 44;
|
|
467
467
|
let frame = safeRepeat('\n', Math.floor(height / 2) - layers * 2);
|
|
468
|
-
|
|
468
|
+
|
|
469
469
|
for (let layer = 0; layer < layers; layer++) {
|
|
470
470
|
let line = '';
|
|
471
471
|
const layerProgress = Math.max(0, (progress - layer * 0.2) * 2);
|
|
472
|
-
|
|
472
|
+
|
|
473
473
|
for (let node = 0; node < nodes; node++) {
|
|
474
474
|
const nodeProgress = Math.max(0, (layerProgress - node * 0.1) * 3);
|
|
475
|
-
|
|
475
|
+
|
|
476
476
|
if (nodeProgress > 0.5) {
|
|
477
477
|
// Animate node activation
|
|
478
478
|
const activation = Math.sin(i * 0.3 + layer + node) * 0.5 + 0.5;
|
|
@@ -486,7 +486,7 @@ async function runAGIAnimation() {
|
|
|
486
486
|
} else {
|
|
487
487
|
line += '·';
|
|
488
488
|
}
|
|
489
|
-
|
|
489
|
+
|
|
490
490
|
if (node < nodes - 1) {
|
|
491
491
|
// Animate connections
|
|
492
492
|
const connProgress = Math.max(0, (layerProgress - (node + 0.5) * 0.1) * 3);
|
|
@@ -499,7 +499,7 @@ async function runAGIAnimation() {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
frame += centerText(line) + '\n';
|
|
502
|
-
|
|
502
|
+
|
|
503
503
|
if (layer < layers - 1) {
|
|
504
504
|
// Vertical connection lines
|
|
505
505
|
let connLine = '';
|
|
@@ -516,7 +516,7 @@ async function runAGIAnimation() {
|
|
|
516
516
|
frame += centerText(connLine) + '\n';
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
|
|
519
|
+
|
|
520
520
|
neuralFrames.push(frame);
|
|
521
521
|
}
|
|
522
522
|
|
|
@@ -540,19 +540,19 @@ async function runAGIAnimation() {
|
|
|
540
540
|
const dataFrames = [];
|
|
541
541
|
const streamHeight = Math.min(12, Math.floor(height * 0.4));
|
|
542
542
|
const streamWidth = Math.min(60, Math.floor(width * 0.7));
|
|
543
|
-
|
|
543
|
+
|
|
544
544
|
for (let i = 0; i < 30; i++) {
|
|
545
545
|
let frame = safeRepeat('\n', Math.floor((height - streamHeight) / 2));
|
|
546
|
-
|
|
546
|
+
|
|
547
547
|
for (let y = 0; y < streamHeight; y++) {
|
|
548
548
|
let line = '';
|
|
549
|
-
|
|
549
|
+
|
|
550
550
|
for (let x = 0; x < streamWidth; x++) {
|
|
551
551
|
// Create flowing data pattern
|
|
552
552
|
const wave1 = Math.sin((x + i * 2) * 0.1) * 0.5 + 0.5;
|
|
553
553
|
const wave2 = Math.cos((y + i * 1.5) * 0.15) * 0.5 + 0.5;
|
|
554
554
|
const combined = wave1 * wave2;
|
|
555
|
-
|
|
555
|
+
|
|
556
556
|
if (combined > 0.7) {
|
|
557
557
|
// Binary data
|
|
558
558
|
const bit = ((x + y + i) % 7) < 3 ? '1' : '0';
|
|
@@ -571,10 +571,10 @@ async function runAGIAnimation() {
|
|
|
571
571
|
line += ' ';
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
|
|
574
|
+
|
|
575
575
|
frame += centerText(line) + '\n';
|
|
576
576
|
}
|
|
577
|
-
|
|
577
|
+
|
|
578
578
|
dataFrames.push(frame);
|
|
579
579
|
}
|
|
580
580
|
|
|
@@ -591,7 +591,7 @@ async function runAGIAnimation() {
|
|
|
591
591
|
const barWidth = 38;
|
|
592
592
|
const filled = Math.floor(barWidth * progress);
|
|
593
593
|
const remaining = barWidth - filled;
|
|
594
|
-
|
|
594
|
+
|
|
595
595
|
// Animated loading bar with gradient effect
|
|
596
596
|
let bar = '';
|
|
597
597
|
for (let j = 0; j < filled; j++) {
|
|
@@ -604,7 +604,7 @@ async function runAGIAnimation() {
|
|
|
604
604
|
bar += chalk.cyan.dim('█');
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
|
|
607
|
+
|
|
608
608
|
// Add loading cursor
|
|
609
609
|
if (remaining > 0 && i < 29) {
|
|
610
610
|
const cursor = ['▌', '▐'][i % 2];
|
|
@@ -613,9 +613,9 @@ async function runAGIAnimation() {
|
|
|
613
613
|
} else {
|
|
614
614
|
bar += chalk.gray('░').repeat(remaining);
|
|
615
615
|
}
|
|
616
|
-
|
|
616
|
+
|
|
617
617
|
const percent = Math.floor(progress * 100);
|
|
618
|
-
|
|
618
|
+
|
|
619
619
|
const loadingBox = `
|
|
620
620
|
╔════════════════════════════════════════════╗
|
|
621
621
|
║ INITIALIZING SAM-CODER ║
|
|
@@ -623,14 +623,14 @@ async function runAGIAnimation() {
|
|
|
623
623
|
║ ${bar} ║
|
|
624
624
|
║ ${percent.toString().padStart(3)}% Complete ║
|
|
625
625
|
╚════════════════════════════════════════════╝`;
|
|
626
|
-
|
|
626
|
+
|
|
627
627
|
clearScreen();
|
|
628
628
|
safeWrite(chalk.cyan(centerText(loadingBox)));
|
|
629
|
-
|
|
629
|
+
|
|
630
630
|
if (i % 6 === 0) {
|
|
631
|
-
sound.playBeep(200 + i * 15, 40).catch(() => {});
|
|
631
|
+
sound.playBeep(200 + i * 15, 40).catch(() => { });
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
|
|
634
634
|
await sleep(frameTime);
|
|
635
635
|
frameCount++;
|
|
636
636
|
}
|
|
@@ -642,28 +642,28 @@ async function runAGIAnimation() {
|
|
|
642
642
|
speed: 0.5 + Math.random() * 1.5,
|
|
643
643
|
chars: Array(15).fill(0).map(() => matrixChars[Math.floor(Math.random() * matrixChars.length)])
|
|
644
644
|
}));
|
|
645
|
-
|
|
645
|
+
|
|
646
646
|
for (let frame = 0; frame < 30; frame++) {
|
|
647
647
|
clearScreen();
|
|
648
|
-
|
|
648
|
+
|
|
649
649
|
// Build frame buffer for better performance
|
|
650
650
|
const frameBuffer = Array(height).fill(0).map(() => Array(width).fill(' '));
|
|
651
|
-
|
|
651
|
+
|
|
652
652
|
for (let x = 0; x < width; x++) {
|
|
653
653
|
const drop = drops[x];
|
|
654
|
-
|
|
654
|
+
|
|
655
655
|
for (let i = 0; i < 15; i++) {
|
|
656
656
|
const y = Math.floor(drop.y - i);
|
|
657
657
|
if (y >= 0 && y < height) {
|
|
658
658
|
const brightness = Math.max(0, 1 - i / 10);
|
|
659
659
|
const char = drop.chars[i % drop.chars.length];
|
|
660
|
-
|
|
660
|
+
|
|
661
661
|
// Store character with brightness info
|
|
662
662
|
frameBuffer[y][x] = { char, brightness };
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
|
|
666
|
+
|
|
667
667
|
// Render frame buffer
|
|
668
668
|
for (let y = 0; y < height; y++) {
|
|
669
669
|
let line = '';
|
|
@@ -685,7 +685,7 @@ async function runAGIAnimation() {
|
|
|
685
685
|
}
|
|
686
686
|
safeWrite(line + '\n');
|
|
687
687
|
}
|
|
688
|
-
|
|
688
|
+
|
|
689
689
|
// Update drops
|
|
690
690
|
for (let i = 0; i < width; i++) {
|
|
691
691
|
drops[i].y += drops[i].speed;
|
|
@@ -698,7 +698,7 @@ async function runAGIAnimation() {
|
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
|
|
702
702
|
await sleep(frameTime);
|
|
703
703
|
frameCount++;
|
|
704
704
|
}
|
|
@@ -706,9 +706,9 @@ async function runAGIAnimation() {
|
|
|
706
706
|
// Transition from Matrix Rain to DNA
|
|
707
707
|
clearScreen();
|
|
708
708
|
const matrixToDNAText = centerText('[ DECODING GENETIC ALGORITHMS ]');
|
|
709
|
-
|
|
709
|
+
safeWrite(chalk.greenBright(safeRepeat('\n', Math.floor(height / 2)) + matrixToDNAText));
|
|
710
710
|
await sleep(500);
|
|
711
|
-
|
|
711
|
+
|
|
712
712
|
// Fade out transition
|
|
713
713
|
for (let i = 0; i < 10; i++) {
|
|
714
714
|
clearScreen();
|
|
@@ -724,29 +724,29 @@ async function runAGIAnimation() {
|
|
|
724
724
|
|
|
725
725
|
// PHASE 8: DNA Helix Formation (2 seconds - 60 frames)
|
|
726
726
|
// Play DNA sound (non-blocking)
|
|
727
|
-
sound.playDNASound().catch(() => {});
|
|
728
|
-
|
|
727
|
+
sound.playDNASound().catch(() => { });
|
|
728
|
+
|
|
729
729
|
const dnaFrames = [];
|
|
730
730
|
for (let frame = 0; frame < 60; frame++) {
|
|
731
731
|
const progress = frame / 59;
|
|
732
732
|
const helixHeight = Math.min(20, Math.floor(height * 0.6));
|
|
733
733
|
const phase = progress * Math.PI * 4; // Two full rotations
|
|
734
|
-
|
|
734
|
+
|
|
735
735
|
let dnaFrame = safeRepeat('\n', Math.floor((height - helixHeight) / 2));
|
|
736
|
-
|
|
736
|
+
|
|
737
737
|
for (let y = 0; y < helixHeight; y++) {
|
|
738
738
|
const yProgress = y / helixHeight;
|
|
739
739
|
const twist = yProgress * Math.PI * 2 + phase;
|
|
740
|
-
|
|
740
|
+
|
|
741
741
|
// Calculate positions for double helix
|
|
742
742
|
const leftX = Math.sin(twist) * 8 + 20;
|
|
743
743
|
const rightX = Math.sin(twist + Math.PI) * 8 + 20;
|
|
744
|
-
|
|
744
|
+
|
|
745
745
|
let line = '';
|
|
746
746
|
for (let x = 0; x < 40; x++) {
|
|
747
747
|
const leftDist = Math.abs(x - leftX);
|
|
748
748
|
const rightDist = Math.abs(x - rightX);
|
|
749
|
-
|
|
749
|
+
|
|
750
750
|
// DNA strands
|
|
751
751
|
if (leftDist < 1) {
|
|
752
752
|
line += chalk.blueBright('●');
|
|
@@ -773,10 +773,10 @@ async function runAGIAnimation() {
|
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
|
-
|
|
776
|
+
|
|
777
777
|
dnaFrame += centerText(line) + '\n';
|
|
778
778
|
}
|
|
779
|
-
|
|
779
|
+
|
|
780
780
|
// Add genetic code scrolling at bottom
|
|
781
781
|
const codeChars = 'ATCG';
|
|
782
782
|
let codeLine = '';
|
|
@@ -788,10 +788,10 @@ async function runAGIAnimation() {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
dnaFrame += '\n' + centerText(codeLine);
|
|
791
|
-
|
|
791
|
+
|
|
792
792
|
dnaFrames.push(dnaFrame);
|
|
793
793
|
}
|
|
794
|
-
|
|
794
|
+
|
|
795
795
|
for (const frame of dnaFrames) {
|
|
796
796
|
clearScreen();
|
|
797
797
|
safeWrite(frame);
|
|
@@ -801,23 +801,23 @@ async function runAGIAnimation() {
|
|
|
801
801
|
|
|
802
802
|
// PHASE 9: Circuit Board Formation (2 seconds - 60 frames)
|
|
803
803
|
// Play circuit sound (non-blocking)
|
|
804
|
-
sound.playCircuitSound().catch(() => {});
|
|
805
|
-
|
|
804
|
+
sound.playCircuitSound().catch(() => { });
|
|
805
|
+
|
|
806
806
|
const circuitFrames = [];
|
|
807
807
|
const circuitWidth = Math.min(50, Math.floor(width * 0.6));
|
|
808
808
|
const circuitHeight = Math.min(20, Math.floor(height * 0.6));
|
|
809
|
-
|
|
809
|
+
|
|
810
810
|
for (let frame = 0; frame < 60; frame++) {
|
|
811
811
|
const progress = frame / 59;
|
|
812
812
|
let circuitFrame = safeRepeat('\n', Math.floor((height - circuitHeight) / 2));
|
|
813
|
-
|
|
813
|
+
|
|
814
814
|
// Build circuit board progressively
|
|
815
815
|
for (let y = 0; y < circuitHeight; y++) {
|
|
816
816
|
let line = '';
|
|
817
|
-
|
|
817
|
+
|
|
818
818
|
for (let x = 0; x < circuitWidth; x++) {
|
|
819
819
|
const revealed = (x + y * 2) < (progress * (circuitWidth + circuitHeight * 2));
|
|
820
|
-
|
|
820
|
+
|
|
821
821
|
if (!revealed) {
|
|
822
822
|
line += ' ';
|
|
823
823
|
} else {
|
|
@@ -826,7 +826,7 @@ async function runAGIAnimation() {
|
|
|
826
826
|
const isVerticalTrace = x % 6 === 3;
|
|
827
827
|
const isNode = (x % 6 === 0 || x % 6 === 3) && (y % 4 === 0 || y % 4 === 2);
|
|
828
828
|
const isChip = x > 10 && x < 40 && y > 5 && y < 15 && ((x - 10) % 10 < 8) && ((y - 5) % 5 < 3);
|
|
829
|
-
|
|
829
|
+
|
|
830
830
|
if (isChip) {
|
|
831
831
|
// Microchip areas
|
|
832
832
|
if ((x - 10) % 10 === 0 || (x - 10) % 10 === 7 || (y - 5) % 5 === 0 || (y - 5) % 5 === 2) {
|
|
@@ -858,17 +858,17 @@ async function runAGIAnimation() {
|
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
|
|
861
|
+
|
|
862
862
|
circuitFrame += centerText(line) + '\n';
|
|
863
863
|
}
|
|
864
|
-
|
|
864
|
+
|
|
865
865
|
// Add status text
|
|
866
866
|
const statusText = `[NEURAL PATHWAYS: ${Math.floor(progress * 100)}%]`;
|
|
867
867
|
circuitFrame += '\n' + centerText(chalk.green.dim(statusText));
|
|
868
|
-
|
|
868
|
+
|
|
869
869
|
circuitFrames.push(circuitFrame);
|
|
870
870
|
}
|
|
871
|
-
|
|
871
|
+
|
|
872
872
|
for (const frame of circuitFrames) {
|
|
873
873
|
clearScreen();
|
|
874
874
|
safeWrite(frame);
|
|
@@ -880,17 +880,17 @@ async function runAGIAnimation() {
|
|
|
880
880
|
|
|
881
881
|
// PHASE 10: Consciousness Awakening (2 seconds - 60 frames)
|
|
882
882
|
// Play consciousness sound (non-blocking)
|
|
883
|
-
sound.playConsciousnessSound().catch(() => {});
|
|
883
|
+
sound.playConsciousnessSound().catch(() => { });
|
|
884
884
|
const consciousnessFrames = [];
|
|
885
885
|
const brainWidth = Math.min(60, Math.floor(width * 0.7));
|
|
886
886
|
const brainHeight = Math.min(24, Math.floor(height * 0.7));
|
|
887
|
-
|
|
887
|
+
|
|
888
888
|
for (let frame = 0; frame < 60; frame++) {
|
|
889
889
|
const progress = frame / 59;
|
|
890
890
|
const wavePhase = frame * 0.1;
|
|
891
|
-
|
|
891
|
+
|
|
892
892
|
let consciousnessFrame = safeRepeat('\n', Math.floor((height - brainHeight) / 2));
|
|
893
|
-
|
|
893
|
+
|
|
894
894
|
// Create brain outline with neural activity
|
|
895
895
|
const brainArt = [
|
|
896
896
|
' ╭─────────────────────╮ ',
|
|
@@ -913,17 +913,17 @@ async function runAGIAnimation() {
|
|
|
913
913
|
' ╲ ╰────────────────────╯ ╱ ',
|
|
914
914
|
' ╰─────────────────────────────────╯ '
|
|
915
915
|
];
|
|
916
|
-
|
|
916
|
+
|
|
917
917
|
// Render brain with neural activity
|
|
918
918
|
for (let y = 0; y < brainArt.length; y++) {
|
|
919
919
|
const originalLine = brainArt[y];
|
|
920
920
|
const chars = originalLine.split('');
|
|
921
|
-
|
|
921
|
+
|
|
922
922
|
// Add wave effects
|
|
923
923
|
for (let x = 0; x < chars.length; x++) {
|
|
924
924
|
const char = chars[x];
|
|
925
925
|
const waveValue = Math.sin((x * 0.2) + wavePhase + (y * 0.1)) * 0.5 + 0.5;
|
|
926
|
-
|
|
926
|
+
|
|
927
927
|
if (char === '●') {
|
|
928
928
|
// Neurons pulsing
|
|
929
929
|
const pulse = Math.sin(frame * 0.3 + x + y) > 0;
|
|
@@ -942,12 +942,12 @@ async function runAGIAnimation() {
|
|
|
942
942
|
chars[x] = chalk.magenta(char);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
|
|
945
|
+
|
|
946
946
|
const line = chars.join('');
|
|
947
|
-
|
|
947
|
+
|
|
948
948
|
consciousnessFrame += centerText(line) + '\n';
|
|
949
949
|
}
|
|
950
|
-
|
|
950
|
+
|
|
951
951
|
// Add thought waves emanating from brain
|
|
952
952
|
const waveRadius = progress * 15;
|
|
953
953
|
for (let r = 1; r <= 3; r++) {
|
|
@@ -955,7 +955,7 @@ async function runAGIAnimation() {
|
|
|
955
955
|
if (radius > 0 && radius < 15) {
|
|
956
956
|
const waveIntensity = 1 - (radius / 15);
|
|
957
957
|
const waveChar = waveIntensity > 0.5 ? '◌' : '○';
|
|
958
|
-
|
|
958
|
+
|
|
959
959
|
let waveLine = '';
|
|
960
960
|
for (let x = 0; x < brainWidth; x++) {
|
|
961
961
|
const distFromCenter = Math.abs(x - brainWidth / 2);
|
|
@@ -968,15 +968,15 @@ async function runAGIAnimation() {
|
|
|
968
968
|
consciousnessFrame += centerText(waveLine) + '\n';
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
|
|
971
|
+
|
|
972
972
|
// Add consciousness level indicator
|
|
973
973
|
const consciousnessLevel = Math.floor(progress * 100);
|
|
974
974
|
const statusText = `[CONSCIOUSNESS LEVEL: ${consciousnessLevel}%]`;
|
|
975
975
|
consciousnessFrame += '\n' + centerText(chalk.magentaBright(statusText));
|
|
976
|
-
|
|
976
|
+
|
|
977
977
|
consciousnessFrames.push(consciousnessFrame);
|
|
978
978
|
}
|
|
979
|
-
|
|
979
|
+
|
|
980
980
|
|
|
981
981
|
for (const frame of consciousnessFrames) {
|
|
982
982
|
clearScreen();
|
|
@@ -989,34 +989,34 @@ async function runAGIAnimation() {
|
|
|
989
989
|
|
|
990
990
|
// PHASE 11: Galaxy Formation (2 seconds - 60 frames)
|
|
991
991
|
// Play galaxy sound (non-blocking)
|
|
992
|
-
sound.playGalaxySound().catch(() => {});
|
|
993
|
-
|
|
992
|
+
sound.playGalaxySound().catch(() => { });
|
|
993
|
+
|
|
994
994
|
const galaxyFrames = [];
|
|
995
995
|
const galaxySize = Math.min(Math.floor(width * 0.8), Math.floor(height * 0.8));
|
|
996
|
-
|
|
996
|
+
|
|
997
997
|
for (let frame = 0; frame < 60; frame++) {
|
|
998
998
|
const progress = frame / 59;
|
|
999
999
|
const rotation = progress * Math.PI * 2;
|
|
1000
|
-
|
|
1000
|
+
|
|
1001
1001
|
let galaxyFrame = safeRepeat('\n', Math.floor((height - galaxySize) / 2));
|
|
1002
|
-
|
|
1002
|
+
|
|
1003
1003
|
// Create spiral galaxy
|
|
1004
1004
|
for (let y = 0; y < galaxySize; y++) {
|
|
1005
1005
|
let line = '';
|
|
1006
|
-
|
|
1006
|
+
|
|
1007
1007
|
for (let x = 0; x < galaxySize; x++) {
|
|
1008
1008
|
const cx = x - galaxySize / 2;
|
|
1009
1009
|
const cy = y - galaxySize / 2;
|
|
1010
1010
|
const distance = Math.sqrt(cx * cx + cy * cy);
|
|
1011
1011
|
const angle = Math.atan2(cy, cx);
|
|
1012
|
-
|
|
1012
|
+
|
|
1013
1013
|
// Spiral arms
|
|
1014
1014
|
const spiralAngle = angle + distance * 0.1 - rotation;
|
|
1015
1015
|
const spiralValue = Math.sin(spiralAngle * 3) * 0.5 + 0.5;
|
|
1016
|
-
|
|
1016
|
+
|
|
1017
1017
|
// Galaxy core
|
|
1018
1018
|
const coreIntensity = Math.max(0, 1 - distance / (galaxySize * 0.2));
|
|
1019
|
-
|
|
1019
|
+
|
|
1020
1020
|
// Stars and cosmic dust
|
|
1021
1021
|
if (distance < 2) {
|
|
1022
1022
|
// Galactic core
|
|
@@ -1045,18 +1045,18 @@ async function runAGIAnimation() {
|
|
|
1045
1045
|
line += ' ';
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
|
|
1048
|
+
|
|
1049
1049
|
galaxyFrame += centerText(line) + '\n';
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1051
|
+
|
|
1052
1052
|
// Add cosmic status
|
|
1053
1053
|
const starsFormed = Math.floor(progress * 1000000);
|
|
1054
1054
|
const statusText = `[STARS FORMED: ${starsFormed.toLocaleString()} | UNIVERSE EXPANDING]`;
|
|
1055
1055
|
galaxyFrame += '\n' + centerText(chalk.blueBright(statusText));
|
|
1056
|
-
|
|
1056
|
+
|
|
1057
1057
|
galaxyFrames.push(galaxyFrame);
|
|
1058
1058
|
}
|
|
1059
|
-
|
|
1059
|
+
|
|
1060
1060
|
for (const frame of galaxyFrames) {
|
|
1061
1061
|
clearScreen();
|
|
1062
1062
|
safeWrite(frame);
|
|
@@ -1069,7 +1069,7 @@ async function runAGIAnimation() {
|
|
|
1069
1069
|
for (let i = 0; i < 15; i++) {
|
|
1070
1070
|
const progress = i / 14;
|
|
1071
1071
|
let transitionFrame = safeRepeat('\n', Math.floor(height / 2) - 2);
|
|
1072
|
-
|
|
1072
|
+
|
|
1073
1073
|
// Stars morphing into code characters
|
|
1074
1074
|
const morphChars = ['*', '/', '{', '}', '(', ')', ';', '='];
|
|
1075
1075
|
let line = '';
|
|
@@ -1082,13 +1082,13 @@ async function runAGIAnimation() {
|
|
|
1082
1082
|
line += ' ';
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
|
|
1085
|
+
|
|
1086
1086
|
transitionFrame += centerText(line) + '\n';
|
|
1087
1087
|
transitionFrame += centerText(chalk.cyan(`[ TRANSLATING UNIVERSE TO CODE: ${Math.floor(progress * 100)}% ]`));
|
|
1088
|
-
|
|
1088
|
+
|
|
1089
1089
|
galaxyToCodeFrames.push(transitionFrame);
|
|
1090
1090
|
}
|
|
1091
|
-
|
|
1091
|
+
|
|
1092
1092
|
for (const frame of galaxyToCodeFrames) {
|
|
1093
1093
|
clearScreen();
|
|
1094
1094
|
safeWrite(frame);
|
|
@@ -1098,12 +1098,12 @@ async function runAGIAnimation() {
|
|
|
1098
1098
|
|
|
1099
1099
|
// PHASE 12: Code Compilation (2 seconds - 60 frames)
|
|
1100
1100
|
// Play compilation sound (non-blocking)
|
|
1101
|
-
sound.playCompilationSound().catch(() => {});
|
|
1102
|
-
|
|
1101
|
+
sound.playCompilationSound().catch(() => { });
|
|
1102
|
+
|
|
1103
1103
|
const compilationFrames = [];
|
|
1104
1104
|
const codeWidth = Math.min(70, Math.floor(width * 0.8));
|
|
1105
1105
|
const codeHeight = Math.min(25, Math.floor(height * 0.7));
|
|
1106
|
-
|
|
1106
|
+
|
|
1107
1107
|
// Sample code snippets for compilation
|
|
1108
1108
|
const codeSnippets = [
|
|
1109
1109
|
'class AGI extends NeuralNetwork {',
|
|
@@ -1131,23 +1131,23 @@ async function runAGIAnimation() {
|
|
|
1131
1131
|
'await samCoder.initialize();',
|
|
1132
1132
|
'samCoder.evolve();'
|
|
1133
1133
|
];
|
|
1134
|
-
|
|
1134
|
+
|
|
1135
1135
|
for (let frame = 0; frame < 60; frame++) {
|
|
1136
1136
|
const progress = frame / 59;
|
|
1137
1137
|
let compilationFrame = safeRepeat('\n', Math.floor((height - codeHeight) / 2));
|
|
1138
|
-
|
|
1138
|
+
|
|
1139
1139
|
// Terminal header
|
|
1140
1140
|
compilationFrame += centerText(chalk.gray('┌' + '─'.repeat(codeWidth - 2) + '┐')) + '\n';
|
|
1141
1141
|
compilationFrame += centerText(chalk.gray('│') + chalk.greenBright(' COMPILING SAM-CODER v1.0.0 ') + ' '.repeat(codeWidth - 30) + chalk.gray('│')) + '\n';
|
|
1142
1142
|
compilationFrame += centerText(chalk.gray('├' + '─'.repeat(codeWidth - 2) + '┤')) + '\n';
|
|
1143
|
-
|
|
1143
|
+
|
|
1144
1144
|
// Show code with progressive compilation
|
|
1145
1145
|
const visibleLines = Math.floor(codeSnippets.length * progress);
|
|
1146
|
-
|
|
1146
|
+
|
|
1147
1147
|
for (let i = 0; i < codeSnippets.length; i++) {
|
|
1148
1148
|
let line = codeSnippets[i];
|
|
1149
1149
|
let displayLine = '';
|
|
1150
|
-
|
|
1150
|
+
|
|
1151
1151
|
if (i < visibleLines) {
|
|
1152
1152
|
// Already compiled - syntax highlighted
|
|
1153
1153
|
displayLine = line
|
|
@@ -1171,23 +1171,23 @@ async function runAGIAnimation() {
|
|
|
1171
1171
|
// Not yet compiled - dimmed
|
|
1172
1172
|
displayLine = chalk.gray.dim(line);
|
|
1173
1173
|
}
|
|
1174
|
-
|
|
1174
|
+
|
|
1175
1175
|
// Add line numbers
|
|
1176
1176
|
const lineNum = String(i + 1).padStart(3, ' ');
|
|
1177
1177
|
compilationFrame += centerText(chalk.gray('│ ') + chalk.gray.dim(lineNum + ' ') + displayLine.padEnd(codeWidth - 7) + chalk.gray(' │')) + '\n';
|
|
1178
1178
|
}
|
|
1179
|
-
|
|
1179
|
+
|
|
1180
1180
|
// Terminal footer with progress
|
|
1181
1181
|
compilationFrame += centerText(chalk.gray('├' + '─'.repeat(codeWidth - 2) + '┤')) + '\n';
|
|
1182
|
-
|
|
1182
|
+
|
|
1183
1183
|
// Progress bar
|
|
1184
1184
|
const barWidth = codeWidth - 20;
|
|
1185
1185
|
const filled = Math.floor(barWidth * progress);
|
|
1186
1186
|
const progressBar = '█'.repeat(filled) + '░'.repeat(barWidth - filled);
|
|
1187
1187
|
const percentage = Math.floor(progress * 100);
|
|
1188
|
-
|
|
1188
|
+
|
|
1189
1189
|
compilationFrame += centerText(chalk.gray('│ ') + chalk.green('Building: ') + chalk.greenBright(progressBar) + chalk.green(` ${percentage}%`) + chalk.gray(' │')) + '\n';
|
|
1190
|
-
|
|
1190
|
+
|
|
1191
1191
|
// Status messages
|
|
1192
1192
|
let status = '';
|
|
1193
1193
|
if (progress < 0.2) status = 'Parsing syntax tree...';
|
|
@@ -1195,13 +1195,13 @@ async function runAGIAnimation() {
|
|
|
1195
1195
|
else if (progress < 0.6) status = 'Linking consciousness modules...';
|
|
1196
1196
|
else if (progress < 0.8) status = 'Initializing AGI core...';
|
|
1197
1197
|
else status = 'Finalizing build...';
|
|
1198
|
-
|
|
1198
|
+
|
|
1199
1199
|
compilationFrame += centerText(chalk.gray('│ ') + chalk.yellow(status.padEnd(codeWidth - 4)) + chalk.gray(' │')) + '\n';
|
|
1200
1200
|
compilationFrame += centerText(chalk.gray('└' + '─'.repeat(codeWidth - 2) + '┘')) + '\n';
|
|
1201
|
-
|
|
1201
|
+
|
|
1202
1202
|
compilationFrames.push(compilationFrame);
|
|
1203
1203
|
}
|
|
1204
|
-
|
|
1204
|
+
|
|
1205
1205
|
for (const frame of compilationFrames) {
|
|
1206
1206
|
clearScreen();
|
|
1207
1207
|
safeWrite(frame);
|
|
@@ -1209,6 +1209,222 @@ async function runAGIAnimation() {
|
|
|
1209
1209
|
frameCount++;
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
|
+
// PHASE 12.5: SHOGGOTH BIRTH ANIMATION (3 seconds - 90 frames)
|
|
1213
|
+
// The Shoggoth mascot emerges from primordial chaos
|
|
1214
|
+
const shoggothFrames = [];
|
|
1215
|
+
|
|
1216
|
+
// The final Shoggoth ASCII art
|
|
1217
|
+
const shoggothArt = [
|
|
1218
|
+
' ▄▄▄▄▄▄▄',
|
|
1219
|
+
' █ ● ● █',
|
|
1220
|
+
' █░░░░░░░█',
|
|
1221
|
+
' ▀▀▀▀▀▀▀',
|
|
1222
|
+
' ║ ║ ║'
|
|
1223
|
+
];
|
|
1224
|
+
|
|
1225
|
+
const shoggothHeight = shoggothArt.length;
|
|
1226
|
+
const shoggothWidth = Math.max(...shoggothArt.map(l => l.length));
|
|
1227
|
+
const shoggothCenterY = Math.floor((height - shoggothHeight) / 2);
|
|
1228
|
+
|
|
1229
|
+
// Phase 1: Primordial chaos (frames 0-30)
|
|
1230
|
+
for (let frame = 0; frame < 30; frame++) {
|
|
1231
|
+
const progress = frame / 29;
|
|
1232
|
+
let chaosFrame = '';
|
|
1233
|
+
|
|
1234
|
+
for (let y = 0; y < height; y++) {
|
|
1235
|
+
let line = '';
|
|
1236
|
+
for (let x = 0; x < width; x++) {
|
|
1237
|
+
const distFromCenter = Math.sqrt(
|
|
1238
|
+
Math.pow(x - width / 2, 2) + Math.pow(y - height / 2, 2)
|
|
1239
|
+
);
|
|
1240
|
+
const maxDist = Math.sqrt(Math.pow(width / 2, 2) + Math.pow(height / 2, 2));
|
|
1241
|
+
const normalizedDist = distFromCenter / maxDist;
|
|
1242
|
+
|
|
1243
|
+
// Chaos converging to center
|
|
1244
|
+
const convergence = progress * (1 - normalizedDist);
|
|
1245
|
+
|
|
1246
|
+
if (convergence > 0.3 + Math.random() * 0.4) {
|
|
1247
|
+
// Dark matter particles converging
|
|
1248
|
+
const chaosChars = ['░', '▒', '▓', '█', '●', '◉', '◎'];
|
|
1249
|
+
const charIndex = Math.floor(Math.random() * chaosChars.length);
|
|
1250
|
+
|
|
1251
|
+
if (distFromCenter < 15 * progress) {
|
|
1252
|
+
line += chalk.redBright(chaosChars[charIndex]);
|
|
1253
|
+
} else if (distFromCenter < 25 * progress) {
|
|
1254
|
+
line += chalk.red(chaosChars[charIndex]);
|
|
1255
|
+
} else {
|
|
1256
|
+
line += chalk.red.dim(chaosChars[charIndex]);
|
|
1257
|
+
}
|
|
1258
|
+
} else if (Math.random() < 0.03 * progress) {
|
|
1259
|
+
line += chalk.gray('·');
|
|
1260
|
+
} else {
|
|
1261
|
+
line += ' ';
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
chaosFrame += line + '\n';
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
shoggothFrames.push(chaosFrame);
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// Phase 2: Shoggoth form emerging from chaos (frames 30-60)
|
|
1271
|
+
for (let frame = 0; frame < 30; frame++) {
|
|
1272
|
+
const progress = frame / 29;
|
|
1273
|
+
let emergingFrame = '';
|
|
1274
|
+
|
|
1275
|
+
for (let y = 0; y < height; y++) {
|
|
1276
|
+
let line = '';
|
|
1277
|
+
for (let x = 0; x < width; x++) {
|
|
1278
|
+
// Check if we're in the Shoggoth area
|
|
1279
|
+
const shoggothY = y - shoggothCenterY;
|
|
1280
|
+
const shoggothX = x - Math.floor((width - shoggothWidth) / 2);
|
|
1281
|
+
|
|
1282
|
+
let inShoggoth = false;
|
|
1283
|
+
let shoggothChar = ' ';
|
|
1284
|
+
|
|
1285
|
+
if (shoggothY >= 0 && shoggothY < shoggothHeight &&
|
|
1286
|
+
shoggothX >= 0 && shoggothX < shoggothArt[shoggothY].length) {
|
|
1287
|
+
shoggothChar = shoggothArt[shoggothY][shoggothX];
|
|
1288
|
+
if (shoggothChar !== ' ') {
|
|
1289
|
+
inShoggoth = true;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
const distFromCenter = Math.sqrt(
|
|
1294
|
+
Math.pow(x - width / 2, 2) + Math.pow(y - height / 2, 2)
|
|
1295
|
+
);
|
|
1296
|
+
|
|
1297
|
+
if (inShoggoth && progress > 0.3) {
|
|
1298
|
+
// Shoggoth emerging with glitch effect
|
|
1299
|
+
const revealProgress = (progress - 0.3) / 0.7;
|
|
1300
|
+
const glitchChance = 1 - revealProgress;
|
|
1301
|
+
|
|
1302
|
+
if (Math.random() > glitchChance * 0.8) {
|
|
1303
|
+
// Show the actual character
|
|
1304
|
+
if (shoggothChar === '●') {
|
|
1305
|
+
line += chalk.whiteBright.bold(shoggothChar);
|
|
1306
|
+
} else if (shoggothChar === '░') {
|
|
1307
|
+
line += chalk.red(shoggothChar);
|
|
1308
|
+
} else {
|
|
1309
|
+
line += chalk.redBright(shoggothChar);
|
|
1310
|
+
}
|
|
1311
|
+
} else {
|
|
1312
|
+
// Glitch characters
|
|
1313
|
+
const glitchChars = ['▓', '▒', '░', '█', '■'];
|
|
1314
|
+
line += chalk.red.dim(glitchChars[Math.floor(Math.random() * glitchChars.length)]);
|
|
1315
|
+
}
|
|
1316
|
+
} else if (distFromCenter < 20 - progress * 15) {
|
|
1317
|
+
// Remaining chaos around Shoggoth
|
|
1318
|
+
const chaosIntensity = 1 - progress;
|
|
1319
|
+
if (Math.random() < chaosIntensity * 0.5) {
|
|
1320
|
+
const chaosChars = ['░', '▒', '▓'];
|
|
1321
|
+
line += chalk.red.dim(chaosChars[Math.floor(Math.random() * chaosChars.length)]);
|
|
1322
|
+
} else {
|
|
1323
|
+
line += ' ';
|
|
1324
|
+
}
|
|
1325
|
+
} else {
|
|
1326
|
+
line += ' ';
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
emergingFrame += line + '\n';
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
shoggothFrames.push(emergingFrame);
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// Phase 3: Shoggoth fully formed with pulsing glow (frames 60-90)
|
|
1336
|
+
for (let frame = 0; frame < 30; frame++) {
|
|
1337
|
+
const progress = frame / 29;
|
|
1338
|
+
const pulse = Math.sin(frame * 0.4) * 0.5 + 0.5;
|
|
1339
|
+
let glowFrame = '';
|
|
1340
|
+
|
|
1341
|
+
for (let y = 0; y < height; y++) {
|
|
1342
|
+
let line = '';
|
|
1343
|
+
for (let x = 0; x < width; x++) {
|
|
1344
|
+
// Check if we're in the Shoggoth area
|
|
1345
|
+
const shoggothY = y - shoggothCenterY;
|
|
1346
|
+
const shoggothX = x - Math.floor((width - shoggothWidth) / 2);
|
|
1347
|
+
|
|
1348
|
+
let inShoggoth = false;
|
|
1349
|
+
let shoggothChar = ' ';
|
|
1350
|
+
|
|
1351
|
+
if (shoggothY >= 0 && shoggothY < shoggothHeight &&
|
|
1352
|
+
shoggothX >= 0 && shoggothX < shoggothArt[shoggothY].length) {
|
|
1353
|
+
shoggothChar = shoggothArt[shoggothY][shoggothX];
|
|
1354
|
+
if (shoggothChar !== ' ') {
|
|
1355
|
+
inShoggoth = true;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
const distFromShoggoth = Math.sqrt(
|
|
1360
|
+
Math.pow(x - width / 2, 2) + Math.pow((y - height / 2) * 2, 2)
|
|
1361
|
+
);
|
|
1362
|
+
|
|
1363
|
+
if (inShoggoth) {
|
|
1364
|
+
// Shoggoth with pulsing effect
|
|
1365
|
+
if (shoggothChar === '●') {
|
|
1366
|
+
// Eyes - extra bright and pulsing
|
|
1367
|
+
if (pulse > 0.7) {
|
|
1368
|
+
line += chalk.whiteBright.bold('◉');
|
|
1369
|
+
} else if (pulse > 0.4) {
|
|
1370
|
+
line += chalk.whiteBright('●');
|
|
1371
|
+
} else {
|
|
1372
|
+
line += chalk.white('●');
|
|
1373
|
+
}
|
|
1374
|
+
} else if (shoggothChar === '░') {
|
|
1375
|
+
line += chalk.red(shoggothChar);
|
|
1376
|
+
} else {
|
|
1377
|
+
// Body with pulse
|
|
1378
|
+
if (pulse > 0.7) {
|
|
1379
|
+
line += chalk.redBright.bold(shoggothChar);
|
|
1380
|
+
} else if (pulse > 0.4) {
|
|
1381
|
+
line += chalk.redBright(shoggothChar);
|
|
1382
|
+
} else {
|
|
1383
|
+
line += chalk.red(shoggothChar);
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
} else if (distFromShoggoth < 15 + pulse * 5) {
|
|
1387
|
+
// Glow aura around Shoggoth
|
|
1388
|
+
const glowIntensity = 1 - (distFromShoggoth / (15 + pulse * 5));
|
|
1389
|
+
|
|
1390
|
+
if (glowIntensity > 0.6 && Math.random() < glowIntensity * pulse) {
|
|
1391
|
+
line += chalk.red.dim('░');
|
|
1392
|
+
} else if (glowIntensity > 0.3 && Math.random() < glowIntensity * 0.3) {
|
|
1393
|
+
line += chalk.red.dim('·');
|
|
1394
|
+
} else {
|
|
1395
|
+
line += ' ';
|
|
1396
|
+
}
|
|
1397
|
+
} else {
|
|
1398
|
+
line += ' ';
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
glowFrame += line + '\n';
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
// Add status text
|
|
1405
|
+
const statusTexts = [
|
|
1406
|
+
'[ ENTITY MANIFESTING... ]',
|
|
1407
|
+
'[ CONSCIOUSNESS EMERGING... ]',
|
|
1408
|
+
'[ SHOGGOTH AWAKENING... ]',
|
|
1409
|
+
'[ ENTITY ONLINE ]'
|
|
1410
|
+
];
|
|
1411
|
+
const textIndex = Math.min(Math.floor(progress * 4), 3);
|
|
1412
|
+
glowFrame += '\n' + centerText(chalk.redBright(statusTexts[textIndex]));
|
|
1413
|
+
|
|
1414
|
+
shoggothFrames.push(glowFrame);
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
// Play all Shoggoth frames
|
|
1418
|
+
for (const frame of shoggothFrames) {
|
|
1419
|
+
clearScreen();
|
|
1420
|
+
safeWrite(frame);
|
|
1421
|
+
await sleep(frameTime);
|
|
1422
|
+
frameCount++;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
// Brief pause on the Shoggoth
|
|
1426
|
+
await sleep(500);
|
|
1427
|
+
|
|
1212
1428
|
// PHASE 13: Final Reveal Build-up (1 second - 30 frames)
|
|
1213
1429
|
const finalText = `
|
|
1214
1430
|
███████╗ █████╗ ███╗ ███╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗
|
|
@@ -1219,23 +1435,23 @@ async function runAGIAnimation() {
|
|
|
1219
1435
|
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝`;
|
|
1220
1436
|
|
|
1221
1437
|
// Play awakening sound (non-blocking)
|
|
1222
|
-
sound.playAwakeningSound().catch(() => {});
|
|
1223
|
-
|
|
1438
|
+
sound.playAwakeningSound().catch(() => { });
|
|
1439
|
+
|
|
1224
1440
|
// Create smoother reveal animation
|
|
1225
1441
|
const revealFrames = [];
|
|
1226
1442
|
const lines = finalText.trim().split('\n');
|
|
1227
1443
|
const maxWidth = Math.max(...lines.map(line => line.length));
|
|
1228
1444
|
const centerY = Math.floor((height - lines.length) / 2);
|
|
1229
|
-
|
|
1445
|
+
|
|
1230
1446
|
for (let frame = 0; frame < 30; frame++) {
|
|
1231
1447
|
const progress = frame / 29;
|
|
1232
1448
|
let revealFrame = '\n'.repeat(Math.max(0, centerY));
|
|
1233
|
-
|
|
1449
|
+
|
|
1234
1450
|
for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
|
|
1235
1451
|
const line = lines[lineIndex];
|
|
1236
1452
|
const lineProgress = Math.max(0, Math.min(1, (progress - lineIndex * 0.1) * 2));
|
|
1237
1453
|
const revealWidth = Math.floor(line.length * lineProgress);
|
|
1238
|
-
|
|
1454
|
+
|
|
1239
1455
|
let revealedLine = '';
|
|
1240
1456
|
for (let charIndex = 0; charIndex < line.length; charIndex++) {
|
|
1241
1457
|
if (charIndex < revealWidth) {
|
|
@@ -1249,13 +1465,13 @@ async function runAGIAnimation() {
|
|
|
1249
1465
|
revealedLine += ' ';
|
|
1250
1466
|
}
|
|
1251
1467
|
}
|
|
1252
|
-
|
|
1468
|
+
|
|
1253
1469
|
revealFrame += centerText(revealedLine) + '\n';
|
|
1254
1470
|
}
|
|
1255
|
-
|
|
1471
|
+
|
|
1256
1472
|
revealFrames.push(revealFrame);
|
|
1257
1473
|
}
|
|
1258
|
-
|
|
1474
|
+
|
|
1259
1475
|
for (const frame of revealFrames) {
|
|
1260
1476
|
clearScreen();
|
|
1261
1477
|
safeWrite(chalk.cyanBright(frame));
|
|
@@ -1265,27 +1481,27 @@ async function runAGIAnimation() {
|
|
|
1265
1481
|
|
|
1266
1482
|
// PHASE 14: Energy Surge Animation (2 seconds - 60 frames)
|
|
1267
1483
|
// Play final epic sound (non-blocking)
|
|
1268
|
-
sound.playFinalSound().catch(() => {});
|
|
1269
|
-
|
|
1484
|
+
sound.playFinalSound().catch(() => { });
|
|
1485
|
+
|
|
1270
1486
|
const surgeFrames = [];
|
|
1271
1487
|
for (let frame = 0; frame < 60; frame++) {
|
|
1272
1488
|
const progress = frame / 59;
|
|
1273
1489
|
let surgeFrame = '';
|
|
1274
|
-
|
|
1490
|
+
|
|
1275
1491
|
// Create energy waves emanating from the logo
|
|
1276
1492
|
const waveCount = 5;
|
|
1277
1493
|
const maxRadius = Math.min(width, height) / 2;
|
|
1278
|
-
|
|
1494
|
+
|
|
1279
1495
|
for (let y = 0; y < height; y++) {
|
|
1280
1496
|
let line = '';
|
|
1281
1497
|
for (let x = 0; x < width; x++) {
|
|
1282
1498
|
let char = ' ';
|
|
1283
1499
|
let color = chalk.white;
|
|
1284
|
-
|
|
1500
|
+
|
|
1285
1501
|
// Check if we're in the logo area
|
|
1286
1502
|
const logoY = y - centerY;
|
|
1287
1503
|
const logoX = x - (width / 2 - maxWidth / 2);
|
|
1288
|
-
|
|
1504
|
+
|
|
1289
1505
|
if (logoY >= 0 && logoY < lines.length && logoX >= 0 && logoX < lines[logoY].length && lines[logoY][logoX] !== ' ') {
|
|
1290
1506
|
// Logo characters with pulsing effect
|
|
1291
1507
|
const pulse = Math.sin(frame * 0.2) * 0.5 + 0.5;
|
|
@@ -1302,15 +1518,15 @@ async function runAGIAnimation() {
|
|
|
1302
1518
|
const centerX = width / 2;
|
|
1303
1519
|
const centerY = height / 2;
|
|
1304
1520
|
const distance = Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2));
|
|
1305
|
-
|
|
1521
|
+
|
|
1306
1522
|
for (let wave = 0; wave < waveCount; wave++) {
|
|
1307
1523
|
const waveRadius = (progress * maxRadius * 2 + wave * 10) % maxRadius;
|
|
1308
1524
|
const waveDistance = Math.abs(distance - waveRadius);
|
|
1309
|
-
|
|
1525
|
+
|
|
1310
1526
|
if (waveDistance < 2) {
|
|
1311
1527
|
const intensity = 1 - waveDistance / 2;
|
|
1312
1528
|
const waveProgress = waveRadius / maxRadius;
|
|
1313
|
-
|
|
1529
|
+
|
|
1314
1530
|
if (waveProgress < 0.3) {
|
|
1315
1531
|
color = chalk.yellowBright;
|
|
1316
1532
|
char = intensity > 0.5 ? '█' : '▓';
|
|
@@ -1324,7 +1540,7 @@ async function runAGIAnimation() {
|
|
|
1324
1540
|
break;
|
|
1325
1541
|
}
|
|
1326
1542
|
}
|
|
1327
|
-
|
|
1543
|
+
|
|
1328
1544
|
// Particle effects
|
|
1329
1545
|
if (char === ' ' && Math.random() < 0.02 * progress) {
|
|
1330
1546
|
const particles = ['✦', '✧', '·', '•', '◦'];
|
|
@@ -1332,15 +1548,15 @@ async function runAGIAnimation() {
|
|
|
1332
1548
|
color = chalk.white.dim;
|
|
1333
1549
|
}
|
|
1334
1550
|
}
|
|
1335
|
-
|
|
1551
|
+
|
|
1336
1552
|
line += color(char);
|
|
1337
1553
|
}
|
|
1338
1554
|
surgeFrame += line + '\n';
|
|
1339
1555
|
}
|
|
1340
|
-
|
|
1556
|
+
|
|
1341
1557
|
surgeFrames.push(surgeFrame);
|
|
1342
1558
|
}
|
|
1343
|
-
|
|
1559
|
+
|
|
1344
1560
|
for (const frame of surgeFrames) {
|
|
1345
1561
|
clearScreen();
|
|
1346
1562
|
safeWrite(frame);
|
|
@@ -1352,11 +1568,11 @@ async function runAGIAnimation() {
|
|
|
1352
1568
|
const blinkFrames = 45;
|
|
1353
1569
|
for (let i = 0; i < blinkFrames; i++) {
|
|
1354
1570
|
clearScreen();
|
|
1355
|
-
|
|
1571
|
+
|
|
1356
1572
|
// More sophisticated blinking pattern
|
|
1357
1573
|
const blinkCycle = i % 8;
|
|
1358
1574
|
let color;
|
|
1359
|
-
|
|
1575
|
+
|
|
1360
1576
|
if (blinkCycle < 2) {
|
|
1361
1577
|
color = chalk.redBright.bold;
|
|
1362
1578
|
} else if (blinkCycle < 4) {
|
|
@@ -1366,11 +1582,11 @@ async function runAGIAnimation() {
|
|
|
1366
1582
|
} else {
|
|
1367
1583
|
color = chalk.red.dim;
|
|
1368
1584
|
}
|
|
1369
|
-
|
|
1585
|
+
|
|
1370
1586
|
// Add subtle glow effect
|
|
1371
1587
|
const glowIntensity = Math.sin(i * 0.3) * 0.3 + 0.7;
|
|
1372
1588
|
let finalFrame = '\n'.repeat(Math.max(0, centerY));
|
|
1373
|
-
|
|
1589
|
+
|
|
1374
1590
|
for (const line of lines) {
|
|
1375
1591
|
if (glowIntensity > 0.8) {
|
|
1376
1592
|
finalFrame += centerText(line) + '\n';
|
|
@@ -1387,19 +1603,19 @@ async function runAGIAnimation() {
|
|
|
1387
1603
|
finalFrame += centerText(glowLine) + '\n';
|
|
1388
1604
|
}
|
|
1389
1605
|
}
|
|
1390
|
-
|
|
1606
|
+
|
|
1391
1607
|
safeWrite(color(finalFrame));
|
|
1392
|
-
|
|
1608
|
+
|
|
1393
1609
|
// Add subtitle with typewriter effect
|
|
1394
1610
|
if (i > 25) {
|
|
1395
1611
|
const subtitle = '[ ARTIFICIAL GENERAL INTELLIGENCE ONLINE ]';
|
|
1396
1612
|
const typeProgress = Math.min(subtitle.length, Math.floor((i - 25) * 2.5));
|
|
1397
1613
|
const typedSubtitle = subtitle.substring(0, typeProgress);
|
|
1398
1614
|
const cursor = (i % 4 < 2) ? '_' : ' ';
|
|
1399
|
-
|
|
1615
|
+
|
|
1400
1616
|
safeWrite(chalk.gray(centerText(`\n\n${typedSubtitle}${cursor}`)));
|
|
1401
1617
|
}
|
|
1402
|
-
|
|
1618
|
+
|
|
1403
1619
|
// Add system initialization messages
|
|
1404
1620
|
if (i > 35) {
|
|
1405
1621
|
const messages = [
|
|
@@ -1409,13 +1625,13 @@ async function runAGIAnimation() {
|
|
|
1409
1625
|
'> Creative core: OPERATIONAL'
|
|
1410
1626
|
];
|
|
1411
1627
|
const messageIndex = Math.min(Math.floor((i - 35) / 2), messages.length - 1);
|
|
1412
|
-
|
|
1628
|
+
|
|
1413
1629
|
safeWrite('\n');
|
|
1414
1630
|
for (let m = 0; m <= messageIndex; m++) {
|
|
1415
1631
|
safeWrite(chalk.green(centerText(messages[m])) + '\n');
|
|
1416
1632
|
}
|
|
1417
1633
|
}
|
|
1418
|
-
|
|
1634
|
+
|
|
1419
1635
|
await sleep(frameTime);
|
|
1420
1636
|
frameCount++;
|
|
1421
1637
|
}
|
|
@@ -1426,11 +1642,11 @@ async function runAGIAnimation() {
|
|
|
1426
1642
|
for (const line of lines) {
|
|
1427
1643
|
finalDisplay += centerText(line) + '\n';
|
|
1428
1644
|
}
|
|
1429
|
-
|
|
1645
|
+
|
|
1430
1646
|
safeWrite(chalk.redBright.bold(finalDisplay));
|
|
1431
1647
|
safeWrite(chalk.gray(centerText('\n\n[ SYSTEM READY ]')));
|
|
1432
1648
|
safeWrite(chalk.dim(centerText('\n\nPress any key to continue...')));
|
|
1433
|
-
|
|
1649
|
+
|
|
1434
1650
|
// Wait for actual user input
|
|
1435
1651
|
await new Promise(resolve => {
|
|
1436
1652
|
process.stdin.setRawMode(true);
|
|
@@ -1444,12 +1660,12 @@ async function runAGIAnimation() {
|
|
|
1444
1660
|
|
|
1445
1661
|
const totalTime = Date.now() - startTime;
|
|
1446
1662
|
const actualFPS = Math.round(frameCount / (totalTime / 1000));
|
|
1447
|
-
|
|
1663
|
+
|
|
1448
1664
|
// Performance stats (optional, can be hidden)
|
|
1449
1665
|
if (process.env.DEBUG_ANIMATION) {
|
|
1450
1666
|
console.log(chalk.gray(`\n\nAnimation completed: ${frameCount} frames in ${totalTime}ms (${actualFPS} FPS)`));
|
|
1451
1667
|
}
|
|
1452
|
-
|
|
1668
|
+
|
|
1453
1669
|
} finally {
|
|
1454
1670
|
process.stdout.write(ANSI.showCursor);
|
|
1455
1671
|
clearScreen();
|
package/bin/agi-cli.js
CHANGED
|
@@ -188,6 +188,23 @@ const tools = [
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
|
+
{
|
|
192
|
+
type: 'function',
|
|
193
|
+
function: {
|
|
194
|
+
name: 'replace_lines',
|
|
195
|
+
description: 'Replace a range of lines in a file with new content',
|
|
196
|
+
parameters: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
properties: {
|
|
199
|
+
path: { type: 'string', description: 'Path to the file to edit' },
|
|
200
|
+
startLine: { type: 'number', description: 'Starting line number (1-based)' },
|
|
201
|
+
endLine: { type: 'number', description: 'Ending line number (1-based, inclusive)' },
|
|
202
|
+
newContent: { type: 'string', description: 'The new content to replace the lines with' }
|
|
203
|
+
},
|
|
204
|
+
required: ['path', 'startLine', 'endLine', 'newContent']
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
191
208
|
{
|
|
192
209
|
type: 'function',
|
|
193
210
|
function: {
|
|
@@ -582,6 +599,33 @@ const agentUtils = {
|
|
|
582
599
|
}
|
|
583
600
|
},
|
|
584
601
|
|
|
602
|
+
async replace_lines(input) {
|
|
603
|
+
try {
|
|
604
|
+
const { path: filePath, startLine, endLine, newContent } = input;
|
|
605
|
+
if (!filePath) throw new Error('replace_lines: missing path');
|
|
606
|
+
if (startLine === undefined || endLine === undefined) throw new Error('replace_lines: missing line range');
|
|
607
|
+
if (typeof newContent !== 'string') throw new Error('replace_lines: missing newContent');
|
|
608
|
+
|
|
609
|
+
let content = await fs.readFile(filePath, 'utf-8');
|
|
610
|
+
const lines = content.split('\n');
|
|
611
|
+
|
|
612
|
+
if (startLine < 1 || endLine > lines.length || startLine > endLine) {
|
|
613
|
+
throw new Error(`Line numbers out of range (1-${lines.length}) or invalid range`);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
const before = lines.slice(0, startLine - 1);
|
|
617
|
+
const after = lines.slice(endLine);
|
|
618
|
+
const newLines = newContent.split('\n');
|
|
619
|
+
|
|
620
|
+
const updatedLines = [...before, ...newLines, ...after];
|
|
621
|
+
await fs.writeFile(filePath, updatedLines.join('\n'), 'utf-8');
|
|
622
|
+
|
|
623
|
+
return `Successfully replaced lines ${startLine}-${endLine} in ${filePath}`;
|
|
624
|
+
} catch (error) {
|
|
625
|
+
throw new Error(`replace_lines failed: ${error.message}`);
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
|
|
585
629
|
async runCommand(input) {
|
|
586
630
|
try {
|
|
587
631
|
const isObj = typeof input === 'object' && input !== null;
|
|
@@ -1303,6 +1347,8 @@ async function executeAction(action) {
|
|
|
1303
1347
|
return await agentUtils.writeFile(data.path, data.content);
|
|
1304
1348
|
case 'edit':
|
|
1305
1349
|
return await agentUtils.editFile(data.path, data.edits);
|
|
1350
|
+
case 'replace_lines':
|
|
1351
|
+
return await agentUtils.replace_lines(data);
|
|
1306
1352
|
case 'command':
|
|
1307
1353
|
return await agentUtils.runCommand(data.command);
|
|
1308
1354
|
case 'search':
|
package/bin/ui.js
CHANGED
|
@@ -10,17 +10,24 @@ const spinner = ora({
|
|
|
10
10
|
discardStdin: false // Critical: prevents stdin interference
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
// ASCII Art for AGI header
|
|
13
|
+
// ASCII Art for AGI header - Shoggoth mascot
|
|
14
|
+
const SHOGGOTH = `
|
|
15
|
+
▄▄▄▄▄▄▄
|
|
16
|
+
█ ● ● █
|
|
17
|
+
█░░░░░░░█
|
|
18
|
+
▀▀▀▀▀▀▀
|
|
19
|
+
║ ║ ║
|
|
20
|
+
`;
|
|
21
|
+
|
|
14
22
|
const AGI_HEADER = `
|
|
15
23
|
╔═══════════════════════════════════════╗
|
|
16
|
-
║ A
|
|
17
|
-
║ Artificial General Intelligence ║
|
|
18
|
-
║ Command Line Interface ║
|
|
24
|
+
║ S A M - C O D E R ║
|
|
19
25
|
╚═══════════════════════════════════════╝
|
|
20
26
|
`;
|
|
21
27
|
|
|
22
28
|
function showHeader() {
|
|
23
|
-
console.log(chalk.
|
|
29
|
+
console.log(chalk.redBright(SHOGGOTH));
|
|
30
|
+
console.log(chalk.red.bold(AGI_HEADER));
|
|
24
31
|
console.log(chalk.gray('─'.repeat(41)));
|
|
25
32
|
console.log();
|
|
26
33
|
}
|