overmind-mcp 2.0.0 → 2.0.2

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/docs/script.js ADDED
@@ -0,0 +1,428 @@
1
+ // Matrix Rain Effect
2
+ const canvas = document.getElementById('matrix');
3
+ const ctx = canvas.getContext('2d');
4
+
5
+ canvas.width = window.innerWidth;
6
+ canvas.height = window.innerHeight;
7
+
8
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()_+-=[]{}|;:,.<>?';
9
+ const charArray = chars.split('');
10
+
11
+ const fontSize = 14;
12
+ const columns = canvas.width / fontSize;
13
+
14
+ const drops = [];
15
+ for (let i = 0; i < columns; i++) {
16
+ drops[i] = 1;
17
+ }
18
+
19
+ function drawMatrix() {
20
+ ctx.fillStyle = 'rgba(6, 6, 9, 0.08)'; // Matches new dark-bg
21
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
22
+
23
+ ctx.fillStyle = '#00fff5';
24
+ ctx.font = fontSize + 'px monospace';
25
+
26
+ for (let i = 0; i < drops.length; i++) {
27
+ const text = charArray[Math.floor(Math.random() * charArray.length)];
28
+ ctx.fillText(text, i * fontSize, drops[i] * fontSize);
29
+
30
+ if (drops[i] * fontSize > canvas.height && Math.random() > 0.975) {
31
+ drops[i] = 0;
32
+ }
33
+ drops[i]++;
34
+ }
35
+ }
36
+
37
+ setInterval(drawMatrix, 50);
38
+
39
+ // Resize handler
40
+ window.addEventListener('resize', () => {
41
+ canvas.width = window.innerWidth;
42
+ canvas.height = window.innerHeight;
43
+ const newColumns = Math.floor(canvas.width / fontSize);
44
+ if (newColumns > drops.length) {
45
+ for (let i = drops.length; i < newColumns; i++) drops[i] = 1;
46
+ }
47
+ });
48
+
49
+ // SVG Filter Animation Logic
50
+ const glitchFilter = document.querySelector('#cyber-glitch feTurbulence');
51
+ if (glitchFilter) {
52
+ let glitchBaseFreq = 0.00001;
53
+ setInterval(() => {
54
+ // Jitter the displacement map slightly for the 'glitch' effect
55
+ const noise = Math.random() * 0.05;
56
+ glitchFilter.setAttribute('baseFrequency', `${glitchBaseFreq} ${noise}`);
57
+ }, 100);
58
+ }
59
+
60
+ // Main initialization
61
+ document.addEventListener('DOMContentLoaded', () => {
62
+ // Tab functionality
63
+ const tabBtns = document.querySelectorAll('.tab-btn');
64
+ const tabContents = document.querySelectorAll('.tab-content');
65
+
66
+ tabBtns.forEach((btn) => {
67
+ btn.addEventListener('click', () => {
68
+ const tabId = btn.getAttribute('data-tab');
69
+ tabBtns.forEach((b) => b.classList.remove('active'));
70
+ tabContents.forEach((c) => c.classList.remove('active'));
71
+ btn.classList.add('active');
72
+ const target = document.getElementById(tabId);
73
+ if (target) target.classList.add('active');
74
+ });
75
+ });
76
+
77
+ // Copy functionality
78
+ const copyBtns = document.querySelectorAll('.copy-btn, .terminal-copy');
79
+
80
+ window.copyToClipboard = function (text) {
81
+ navigator.clipboard.writeText(text).then(() => {
82
+ console.log('Copied to clipboard:', text);
83
+ });
84
+ };
85
+
86
+ copyBtns.forEach((btn) => {
87
+ btn.addEventListener('click', () => {
88
+ let code;
89
+ if (btn.classList.contains('terminal-copy')) {
90
+ code = btn.previousElementSibling.textContent;
91
+ } else {
92
+ const codeContainer = btn.closest('.code-container');
93
+ code = codeContainer.querySelector('code').textContent;
94
+ }
95
+
96
+ navigator.clipboard.writeText(code).then(() => {
97
+ const originalIcon = btn.innerHTML;
98
+ btn.innerHTML = '<i class="fas fa-check"></i>';
99
+ btn.style.color = '#00ff00';
100
+ setTimeout(() => {
101
+ btn.innerHTML = originalIcon;
102
+ btn.style.color = '';
103
+ }, 2000);
104
+ });
105
+ });
106
+ });
107
+
108
+ // Smooth scroll
109
+ document.querySelectorAll('a[href^="#"]').forEach((anchor) => {
110
+ anchor.addEventListener('click', function (e) {
111
+ const href = this.getAttribute('href');
112
+ if (href === '#' || !href.startsWith('#')) return;
113
+ e.preventDefault();
114
+ const target = document.querySelector(href);
115
+ if (target) {
116
+ target.scrollIntoView({ behavior: 'smooth', block: 'start' });
117
+ }
118
+ });
119
+ });
120
+
121
+ // Stats counter
122
+ const stats = document.querySelectorAll('.stat-value');
123
+ const animateStats = () => {
124
+ stats.forEach((stat) => {
125
+ const target = parseInt(stat.getAttribute('data-target'));
126
+ const duration = 2000;
127
+ const increment = target / (duration / 16);
128
+ let current = 0;
129
+ const updateStat = () => {
130
+ current += increment;
131
+ if (current < target) {
132
+ stat.textContent = Math.floor(current);
133
+ requestAnimationFrame(updateStat);
134
+ } else {
135
+ stat.textContent = target;
136
+ }
137
+ };
138
+ updateStat();
139
+ });
140
+ };
141
+
142
+ const statsObserver = new IntersectionObserver(
143
+ (entries) => {
144
+ entries.forEach((entry) => {
145
+ if (entry.isIntersecting) {
146
+ animateStats();
147
+ statsObserver.unobserve(entry.target);
148
+ }
149
+ });
150
+ },
151
+ { threshold: 0.5 },
152
+ );
153
+
154
+ const heroStats = document.querySelector('.hero-stats');
155
+ if (heroStats) statsObserver.observe(heroStats);
156
+
157
+ // Feature cards 3D effect
158
+ const featureCards = document.querySelectorAll('.feature-card');
159
+ featureCards.forEach((card) => {
160
+ card.addEventListener('mousemove', (e) => {
161
+ const rect = card.getBoundingClientRect();
162
+ const x = e.clientX - rect.left;
163
+ const y = e.clientY - rect.top;
164
+ const centerX = rect.width / 2;
165
+ const centerY = rect.height / 2;
166
+ const rotateX = (y - centerY) / 20;
167
+ const rotateY = (centerX - x) / 20;
168
+ card.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-10px)`;
169
+ });
170
+ card.addEventListener('mouseleave', () => {
171
+ card.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) translateY(0)';
172
+ });
173
+ });
174
+
175
+ // Mobile Menu
176
+ const mobileToggle = document.querySelector('.mobile-toggle');
177
+ const navLinks = document.querySelector('.nav-links');
178
+ if (mobileToggle) {
179
+ mobileToggle.addEventListener('click', () => {
180
+ navLinks.classList.toggle('active');
181
+ mobileToggle.classList.toggle('active');
182
+ });
183
+
184
+ // Close mobile menu when clicking on a link
185
+ const mobileNavLinks = navLinks.querySelectorAll('.nav-link');
186
+ mobileNavLinks.forEach((link) => {
187
+ link.addEventListener('click', () => {
188
+ navLinks.classList.remove('active');
189
+ mobileToggle.classList.remove('active');
190
+ });
191
+ });
192
+
193
+ // Close mobile menu when clicking outside
194
+ document.addEventListener('click', (e) => {
195
+ if (!e.target.closest('nav') && navLinks.classList.contains('active')) {
196
+ navLinks.classList.remove('active');
197
+ mobileToggle.classList.remove('active');
198
+ }
199
+ });
200
+ }
201
+
202
+ // Scroll to Top Button
203
+ const scrollTopBtn = document.getElementById('scrollTop');
204
+ if (scrollTopBtn) {
205
+ window.addEventListener('scroll', () => {
206
+ if (window.pageYOffset > 300) {
207
+ scrollTopBtn.classList.add('visible');
208
+ } else {
209
+ scrollTopBtn.classList.remove('visible');
210
+ }
211
+ });
212
+
213
+ scrollTopBtn.addEventListener('click', () => {
214
+ window.scrollTo({
215
+ top: 0,
216
+ behavior: 'smooth',
217
+ });
218
+ });
219
+ }
220
+
221
+ // Smooth reveal animation for prompt sections
222
+ const observerOptions = {
223
+ threshold: 0.1,
224
+ rootMargin: '0px 0px -50px 0px',
225
+ };
226
+
227
+ const sectionObserver = new IntersectionObserver((entries) => {
228
+ entries.forEach((entry) => {
229
+ if (entry.isIntersecting) {
230
+ entry.target.style.opacity = '1';
231
+ entry.target.style.transform = 'translateY(0)';
232
+ }
233
+ });
234
+ }, observerOptions);
235
+
236
+ document.querySelectorAll('.prompt-section').forEach((section) => {
237
+ section.style.opacity = '0';
238
+ section.style.transform = 'translateY(30px)';
239
+ section.style.transition = 'opacity 0.6s ease, transform 0.6s ease';
240
+ sectionObserver.observe(section);
241
+ });
242
+
243
+ // Rule cards hover effect enhancement
244
+ const ruleCards = document.querySelectorAll('.rule-card');
245
+ ruleCards.forEach((card) => {
246
+ card.addEventListener('mouseenter', () => {
247
+ card.style.zIndex = '10';
248
+ });
249
+ card.addEventListener('mouseleave', () => {
250
+ card.style.zIndex = '1';
251
+ });
252
+ });
253
+
254
+ // PROFESSIONAL CORTEX ENGINE
255
+ const cortex = document.querySelector('.orchestration-cortex');
256
+ const fleetContainer = document.getElementById('agent-fleet');
257
+ const linksContainer = document.getElementById('cortex-links');
258
+ const hologramData = document.querySelector('.hologram-data');
259
+
260
+ if (cortex && fleetContainer && linksContainer) {
261
+ const agents = [];
262
+ const numAgents = 24;
263
+ const missions = [
264
+ 'STATUS: OPTIMIZING_NEURAL_FLOW',
265
+ 'STATUS: VECTOR_SYMMETRY_ACTIVE',
266
+ 'STATUS: MCP_HANDSHAKE_VALID',
267
+ 'STATUS: DISTRIBUTED_COGNITION',
268
+ 'STATUS: PROTOCOL_ALIGNMENT',
269
+ 'STATUS: SYSTEM_INTEGRITY_MAX',
270
+ ];
271
+
272
+ for (let i = 0; i < numAgents; i++) {
273
+ const node = document.createElement('div');
274
+ node.className = 'agent-node';
275
+ fleetContainer.appendChild(node);
276
+
277
+ const angle = (i / numAgents) * Math.PI * 2;
278
+ const layer = i % 3; // 3 distinct orbital layers
279
+ const baseRadius = 120 + layer * 50;
280
+
281
+ agents.push({
282
+ el: node,
283
+ angle: angle,
284
+ baseRadius: baseRadius,
285
+ radius: 0,
286
+ speed: (0.002 + Math.random() * 0.004) * (layer === 1 ? -1 : 1),
287
+ active: false,
288
+ lastActivation: 0,
289
+ });
290
+ }
291
+
292
+ const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
293
+ svg.style.cssText =
294
+ 'position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none;';
295
+ linksContainer.appendChild(svg);
296
+
297
+ const lines = agents.map(() => {
298
+ const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
299
+ line.setAttribute('class', 'link-line');
300
+ svg.appendChild(line);
301
+ return line;
302
+ });
303
+
304
+ function sendDataBurst(startX, startY, endX, endY) {
305
+ const p = document.createElement('div');
306
+ p.className = 'data-particle';
307
+ cortex.appendChild(p);
308
+
309
+ let progress = 0;
310
+ const speed = 0.015 + Math.random() * 0.02;
311
+
312
+ function step() {
313
+ progress += speed;
314
+ p.style.left = `${startX + (endX - startX) * progress}px`;
315
+ p.style.top = `${startY + (endY - startY) * progress}px`;
316
+
317
+ if (progress < 1) requestAnimationFrame(step);
318
+ else p.remove();
319
+ }
320
+ step();
321
+ }
322
+
323
+ function animateCortex() {
324
+ const cw = cortex.offsetWidth;
325
+ const ch = cortex.offsetHeight;
326
+ const cx = cw / 2;
327
+ const cy = ch / 2;
328
+ const scale = Math.max(0.5, cw / 600);
329
+
330
+ const core = document.querySelector('.cortex-core');
331
+ if (core) {
332
+ const pulse = 1 + Math.sin(Date.now() / 1500) * 0.03;
333
+ core.style.transform = `translate(-50%, -50%) scale(${scale * pulse})`;
334
+ }
335
+
336
+ agents.forEach((agent, i) => {
337
+ agent.angle += agent.speed;
338
+ agent.radius = agent.baseRadius * scale;
339
+ const ax = cx + Math.cos(agent.angle) * agent.radius;
340
+ const ay = cy + Math.sin(agent.angle) * agent.radius;
341
+
342
+ agent.el.style.left = `${ax}px`;
343
+ agent.el.style.top = `${ay}px`;
344
+
345
+ const agentScale = agent.active ? scale * 1.4 : scale;
346
+ agent.el.style.transform = `translate(-50%, -50%) scale(${agentScale})`;
347
+ agent.el.style.opacity = agent.active ? '1' : '0.4';
348
+
349
+ const line = lines[i];
350
+ line.setAttribute('x1', cx);
351
+ line.setAttribute('y1', cy);
352
+ line.setAttribute('x2', ax);
353
+ line.setAttribute('y2', ay);
354
+
355
+ if (agent.active) {
356
+ line.setAttribute('class', 'link-line active');
357
+ } else {
358
+ line.setAttribute('class', 'link-line');
359
+ }
360
+ });
361
+ requestAnimationFrame(animateCortex);
362
+ }
363
+ animateCortex();
364
+
365
+ // Autonomous systemic logic
366
+ setInterval(() => {
367
+ const available = agents.filter((a) => !a.active);
368
+ if (available.length > 0 && Math.random() > 0.4) {
369
+ const a = available[Math.floor(Math.random() * available.length)];
370
+ a.active = true;
371
+ a.el.classList.add('active');
372
+
373
+ // Logical data transmission
374
+ setTimeout(
375
+ () =>
376
+ sendDataBurst(
377
+ cw / 2,
378
+ ch / 2,
379
+ cw / 2 + Math.cos(a.angle) * a.radius,
380
+ ch / 2 + Math.sin(a.angle) * a.radius,
381
+ ),
382
+ 100,
383
+ );
384
+
385
+ setTimeout(
386
+ () => {
387
+ a.active = false;
388
+ a.el.classList.remove('active');
389
+ },
390
+ 1500 + Math.random() * 2000,
391
+ );
392
+ }
393
+
394
+ // Update terminal status log logic
395
+ if (Math.random() > 0.8 && hologramData) {
396
+ const lines = hologramData.querySelectorAll('.data-line');
397
+ lines[1].textContent = `ACTIVE_NODES: ${agents.filter((a) => a.active).length}/${numAgents}`;
398
+ if (Math.random() > 0.5) {
399
+ lines[0].textContent = missions[Math.floor(Math.random() * missions.length)];
400
+ }
401
+ }
402
+ }, 1000);
403
+
404
+ // Interactive Core (Professional Interaction)
405
+ const coreTrigger = document.querySelector('.cortex-core');
406
+ if (coreTrigger) {
407
+ coreTrigger.addEventListener('click', () => {
408
+ // High-level systemic synchronization
409
+ agents.forEach((a, idx) => {
410
+ setTimeout(() => {
411
+ a.active = true;
412
+ a.el.classList.add('active');
413
+ sendDataBurst(
414
+ cortex.offsetWidth / 2,
415
+ cortex.offsetHeight / 2,
416
+ cortex.offsetWidth / 2 + Math.cos(a.angle) * a.radius,
417
+ cortex.offsetHeight / 2 + Math.sin(a.angle) * a.radius,
418
+ );
419
+ setTimeout(() => {
420
+ a.active = false;
421
+ a.el.classList.remove('active');
422
+ }, 2000);
423
+ }, idx * 30);
424
+ });
425
+ });
426
+ }
427
+ }
428
+ });