labs-claude 0.7.1 → 0.8.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/src/dash.js +13 -8
  3. package/src/ui.js +63 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labs-claude",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Run the real Claude Code CLI on Qwen4 1M (Vision + Web), Gemini 4, Bedrock, or ElevenLabs — with colorful setup and admin token tracking.",
5
5
  "bin": {
6
6
  "labs": "bin/labs.js"
package/src/dash.js CHANGED
@@ -7,7 +7,7 @@ const os = require('os');
7
7
  const path = require('path');
8
8
  const { LABS_DIR, saveConfig } = require('./config');
9
9
  const { storedConfig, saveGatewayKey } = require('./gateway-client');
10
- const { c, THEMES, activeTheme, gradient, visibleWidth, sparkline, randomQuip, askMasked, runSelfUpdate } = require('./ui');
10
+ const { c, THEMES, activeTheme, gradient, visibleWidth, sparkline, randomQuip, play3DIntro, askMasked, runSelfUpdate } = require('./ui');
11
11
  const { version } = require('../package.json');
12
12
 
13
13
  const DEFAULT_GATEWAY_URL = 'https://labs.instant.uz';
@@ -74,18 +74,21 @@ function renderCenteredCard(rows, cols, cardWidth = 58) {
74
74
  }
75
75
 
76
76
  function renderHero(me, theme, cols) {
77
- const logo1 = gradient('█░░ ▄▀█ █▄▄ █▀', theme.from, theme.to);
78
- const logo2 = gradient('█▄▄ █▀█ █▄█ ▄█', theme.to, theme.from);
77
+ const art = [
78
+ '██╗ █████╗ ██████╗ ███████╗',
79
+ '██║ ██╔══██╗██╔══██╗██╔════╝',
80
+ '██║ ███████║██████╔╝███████╗',
81
+ '███████╗██║ ██║██████╔╝███████║',
82
+ '╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝',
83
+ ];
79
84
  const name = me?.name ? `hey ${me.name}` : 'welcome to labs';
80
85
  const boxDot = me ? (me.box_up ? c.mint('● online') : c.rose('● sleeping')) : c.dim('● offline');
81
86
  const lines = [
82
87
  '',
88
+ ...art.map(row => centerLine(gradient(row, theme.from, theme.to), cols)),
89
+ centerLine(c.dim(`v${version} · qwen4-35b-a3b 1m`), cols),
83
90
  '',
84
- centerLine(`${logo1} ${c.dim(`v${version}`)}`, cols),
85
- centerLine(logo2, cols),
86
- '',
87
- centerLine(`${c.bold(c.white(name))} ${c.dim('·')} ${c.cyan('Qwen4-35B-A3B 1M')} ${c.dim('·')} ${boxDot}`, cols),
88
- centerLine(c.dim(randomQuip()), cols),
91
+ centerLine(`${c.bold(c.white(name))} ${c.dim('·')} ${boxDot} ${c.dim('·')} ${c.dim(randomQuip())}`, cols),
89
92
  '',
90
93
  ];
91
94
  return lines.join('\n');
@@ -159,6 +162,8 @@ async function runSettings(ask, askHidden) {
159
162
  }
160
163
 
161
164
  async function runDash(ask, askHidden, launchNow) {
165
+ const initCols = process.stdout.columns || 90;
166
+ await play3DIntro(initCols);
162
167
  while (true) {
163
168
  const cols = process.stdout.columns || 90;
164
169
  const cfg = storedConfig();
package/src/ui.js CHANGED
@@ -416,4 +416,66 @@ function runSelfUpdate(currentVersion) {
416
416
  console.log(`\n ${c.mint('✔')} Updated to latest! Close and reopen any open labs terminals.\n`);
417
417
  }
418
418
 
419
- module.exports = { c, THEMES, activeTheme, gradient, visibleWidth, sparkline, CHILL_QUIPS, randomQuip, playMascotIntro, askMasked, withSpinner, printCard, isNewerVersion, checkUpdateNotice, runSelfUpdate };
419
+ // Real-time 3D rotating neon torus/cube + matrix sparkle intro (0.9s, 24-bit RGB, zero dependencies).
420
+ async function play3DIntro(cols = 90) {
421
+ if (!USE_COLOR) return;
422
+ const th = activeTheme();
423
+ const W = 38;
424
+ const H = 13;
425
+ const padLeft = ' '.repeat(Math.max(2, Math.floor((cols - W) / 2)));
426
+ const shades = ' .:-=+*#%@';
427
+ const rainChars = '01アイウエオカキクケコ✦✧';
428
+ const frames = 16;
429
+
430
+ process.stdout.write('\x1b[?25l'); // hide cursor during animation
431
+ try {
432
+ for (let f = 0; f < frames; f += 1) {
433
+ const A = f * 0.22;
434
+ const B = f * 0.15;
435
+ const cosA = Math.cos(A), sinA = Math.sin(A);
436
+ const cosB = Math.cos(B), sinB = Math.sin(B);
437
+ const zbuf = new Float32Array(W * H);
438
+ const cbuf = new Array(W * H).fill(' ');
439
+
440
+ // Subtle Matrix rain sparks in background
441
+ for (let x = 0; x < W; x += 4) {
442
+ const y = (f * 2 + x * 3) % H;
443
+ cbuf[y * W + x] = rainChars[(f + x) % rainChars.length];
444
+ }
445
+
446
+ // 3D Torus projection (classic donut math scaled for compact crisp hero)
447
+ for (let theta = 0; theta < 6.28; theta += 0.14) {
448
+ const ct = Math.cos(theta), st = Math.sin(theta);
449
+ for (let phi = 0; phi < 6.28; phi += 0.06) {
450
+ const cp = Math.cos(phi), sp = Math.sin(phi);
451
+ const h = ct + 2.1;
452
+ const D = 1 / (sp * h * sinA + st * cosA + 5.2);
453
+ const t = sp * h * cosA - st * sinA;
454
+ const x = Math.floor(W / 2 + 15 * D * (cp * h * cosB - t * sinB));
455
+ const y = Math.floor(H / 2 + 7.5 * D * (cp * h * sinB + t * cosB));
456
+ const o = x + W * y;
457
+ const N = Math.floor(8 * ((st * sinA - sp * ct * cosA) * cosB - sp * ct * sinA - st * cosA - cp * ct * sinB));
458
+ if (y >= 0 && y < H && x >= 0 && x < W && D > zbuf[o]) {
459
+ zbuf[o] = D;
460
+ cbuf[o] = shades[Math.max(1, Math.min(shades.length - 1, N))];
461
+ }
462
+ }
463
+ }
464
+
465
+ let out = '\x1b[2J\x1b[H\n\n';
466
+ for (let y = 0; y < H; y += 1) {
467
+ const row = cbuf.slice(y * W, (y + 1) * W).join('');
468
+ out += `${padLeft}${gradient(row, th.from, th.to)}\n`;
469
+ }
470
+ const pct = Math.round(((f + 1) / frames) * 100);
471
+ const bar = gradient('█'.repeat(Math.round(pct / 5)), th.from, th.to) + c.dim('░'.repeat(20 - Math.round(pct / 5)));
472
+ out += `\n${' '.repeat(Math.max(2, Math.floor((cols - 32) / 2)))}${bar} ${c.dim(`${pct}%`)}\n`;
473
+ process.stdout.write(out);
474
+ await sleep(52);
475
+ }
476
+ } finally {
477
+ process.stdout.write('\x1b[?25h'); // restore cursor
478
+ }
479
+ }
480
+
481
+ module.exports = { c, THEMES, activeTheme, gradient, visibleWidth, sparkline, CHILL_QUIPS, randomQuip, playMascotIntro, play3DIntro, askMasked, withSpinner, printCard, isNewerVersion, checkUpdateNotice, runSelfUpdate };