vibehacker 4.1.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/LICENSE +30 -0
- package/README.md +77 -0
- package/index.js +37 -0
- package/package.json +51 -0
- package/src/agent.js +311 -0
- package/src/api.js +314 -0
- package/src/app.js +2198 -0
- package/src/approve.js +217 -0
- package/src/auth.js +45 -0
- package/src/config.js +59 -0
- package/src/models.js +218 -0
- package/src/providers.js +387 -0
- package/src/setup.js +95 -0
- package/src/supabase.js +287 -0
- package/src/tools.js +588 -0
- package/src/welcome.js +119 -0
package/src/welcome.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const blessed = require('blessed');
|
|
4
|
+
|
|
5
|
+
const LOGO_LINES = [
|
|
6
|
+
'██╗ ██╗██╗██████╗ ███████╗',
|
|
7
|
+
'██║ ██║██║██╔══██╗██╔════╝',
|
|
8
|
+
'██║ ██║██║██████╔╝█████╗ ',
|
|
9
|
+
'╚██╗ ██╔╝██║██╔══██╗██╔══╝ ',
|
|
10
|
+
' ╚████╔╝ ██║██████╔╝███████╗',
|
|
11
|
+
' ╚═══╝ ╚═╝╚═════╝ ╚══════╝',
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const SUB_LINES = [
|
|
15
|
+
'██╗ ██╗ █████╗ ██████╗██╗ ██╗███████╗██████╗ ',
|
|
16
|
+
'██║ ██║██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗',
|
|
17
|
+
'███████║███████║██║ █████╔╝ █████╗ ██████╔╝',
|
|
18
|
+
'██╔══██║██╔══██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗',
|
|
19
|
+
'██║ ██║██║ ██║╚██████╗██║ ██╗███████╗██║ ██║',
|
|
20
|
+
'╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝',
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
function showWelcome(screen) {
|
|
24
|
+
return new Promise((resolve) => {
|
|
25
|
+
const W = Math.min(screen.width - 2, 68);
|
|
26
|
+
const H = Math.min(screen.height - 2, 22);
|
|
27
|
+
|
|
28
|
+
const overlay = blessed.box({
|
|
29
|
+
parent: screen,
|
|
30
|
+
top: 'center', left: 'center',
|
|
31
|
+
width: W, height: H,
|
|
32
|
+
tags: true,
|
|
33
|
+
border: { type: 'line' },
|
|
34
|
+
style: { fg: '#00ff44', bg: 'black', border: { fg: '#002200' } },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
let done_ = false;
|
|
38
|
+
const timers = [];
|
|
39
|
+
|
|
40
|
+
function cleanup() {
|
|
41
|
+
timers.forEach(t => { try { clearInterval(t); clearTimeout(t); } catch (_) {} });
|
|
42
|
+
timers.length = 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let topBanner = null;
|
|
46
|
+
function finish() {
|
|
47
|
+
if (done_) return;
|
|
48
|
+
done_ = true;
|
|
49
|
+
cleanup();
|
|
50
|
+
try { overlay.destroy(); } catch (_) {}
|
|
51
|
+
if (topBanner) { try { topBanner.destroy(); } catch (_) {} }
|
|
52
|
+
screen.render();
|
|
53
|
+
resolve();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ── Phase 1: Full-screen VIBE logo with glow-in (5s) ──
|
|
57
|
+
const borderGlow = ['#002200', '#003300', '#004400', '#005500', '#007700', '#00aa44'];
|
|
58
|
+
let glowIdx = 0;
|
|
59
|
+
timers.push(setInterval(() => {
|
|
60
|
+
if (glowIdx < borderGlow.length) {
|
|
61
|
+
overlay.style.border.fg = borderGlow[glowIdx++];
|
|
62
|
+
screen.render();
|
|
63
|
+
}
|
|
64
|
+
}, 100));
|
|
65
|
+
|
|
66
|
+
const logoColors = ['#001100', '#002200', '#003300', '#005500', '#007700', '#00aa44', '#00dd44', '#00ff44'];
|
|
67
|
+
let colorIdx = 0;
|
|
68
|
+
|
|
69
|
+
function buildLogo() {
|
|
70
|
+
const c = logoColors[Math.min(colorIdx, logoColors.length - 1)];
|
|
71
|
+
const c2 = logoColors[Math.min(Math.max(0, colorIdx - 2), logoColors.length - 1)];
|
|
72
|
+
const lines = [
|
|
73
|
+
'',
|
|
74
|
+
...LOGO_LINES.map(l => `{center}{${c}-fg}${l}{/${c}-fg}{/center}`),
|
|
75
|
+
...SUB_LINES.map(l => `{center}{${c2}-fg}${l}{/${c2}-fg}{/center}`),
|
|
76
|
+
'',
|
|
77
|
+
`{center}{#00aa44-fg}Cybersecurity Arsenal{/#00aa44-fg}{/center}`,
|
|
78
|
+
'',
|
|
79
|
+
`{center}{#333333-fg}v${require('../package.json').version}{/#333333-fg}{/center}`,
|
|
80
|
+
];
|
|
81
|
+
return lines.join('\n');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
overlay.setContent(buildLogo());
|
|
85
|
+
overlay.focus();
|
|
86
|
+
screen.render();
|
|
87
|
+
|
|
88
|
+
timers.push(setInterval(() => {
|
|
89
|
+
if (colorIdx < logoColors.length - 1) colorIdx++;
|
|
90
|
+
overlay.setContent(buildLogo());
|
|
91
|
+
screen.render();
|
|
92
|
+
}, 100));
|
|
93
|
+
|
|
94
|
+
// ── Phase 2: After 5s, shrink to top banner ──
|
|
95
|
+
timers.push(setTimeout(() => {
|
|
96
|
+
if (done_) return;
|
|
97
|
+
try { overlay.destroy(); } catch (_) {}
|
|
98
|
+
topBanner = blessed.box({
|
|
99
|
+
parent: screen,
|
|
100
|
+
top: 0, left: 'center',
|
|
101
|
+
width: Math.min(screen.width - 4, 42),
|
|
102
|
+
height: 3,
|
|
103
|
+
tags: true,
|
|
104
|
+
border: { type: 'line' },
|
|
105
|
+
style: { fg: '#00ff88', bg: 'black', border: { fg: '#00aa44' } },
|
|
106
|
+
content: `{center}{bold}{#00ff88-fg}◈ V I B E H A C K E R ◈{/#00ff88-fg}{/bold}{/center}`,
|
|
107
|
+
});
|
|
108
|
+
screen.render();
|
|
109
|
+
}, 5000));
|
|
110
|
+
|
|
111
|
+
// ── Phase 3: After 10s total, dismiss ──
|
|
112
|
+
timers.push(setTimeout(finish, 10000));
|
|
113
|
+
|
|
114
|
+
// Skip on any keypress
|
|
115
|
+
screen.once('keypress', () => finish());
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
module.exports = { showWelcome };
|