synthos 0.1.0 → 0.2.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.
@@ -0,0 +1,617 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>SynthOS</title>
7
+ <style>
8
+ /* Nebula Dusk Theme */
9
+ * { margin: 0; padding: 0; box-sizing: border-box; }
10
+ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%); color: #e0e0e0; height: 100vh; display: flex; }
11
+ .chat-panel { width: 30%; background: linear-gradient(180deg, rgba(26,26,46,0.95) 0%, rgba(22,33,62,0.95) 100%); box-shadow: 0 0 30px rgba(138,43,226,0.2), inset 0 0 60px rgba(75,0,130,0.1); padding: 20px; display: flex; flex-direction: column; border-right: 1px solid rgba(138,43,226,0.3); }
12
+ .chat-header { font-size: 24px; padding: 15px; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); color: #fff; text-align: center; border-radius: 15px; box-shadow: 0 4px 20px rgba(102,126,234,0.4); text-shadow: 0 2px 10px rgba(0,0,0,0.3); letter-spacing: 2px; }
13
+ .chat-messages { flex-grow: 1; overflow-y: auto; padding: 15px; margin-top: 15px; background: rgba(15,15,35,0.6); border-radius: 15px; border: 1px solid rgba(138,43,226,0.2); box-shadow: inset 0 0 30px rgba(75,0,130,0.2); }
14
+ .chat-message { margin-bottom: 15px; padding: 12px 15px; background: linear-gradient(135deg, rgba(102,126,234,0.15) 0%, rgba(118,75,162,0.15) 100%); border-radius: 15px; box-shadow: 0 2px 10px rgba(138,43,226,0.2); border: 1px solid rgba(138,43,226,0.1); backdrop-filter: blur(5px); }
15
+ .chat-message p { margin-bottom: 5px; line-height: 1.5; }
16
+ .chat-message p strong { font-weight: 600; background: linear-gradient(90deg, #667eea, #f093fb); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
17
+ .chat-message p code { background: rgba(138,43,226,0.3); padding: 2px 6px; border-radius: 5px; font-family: 'Courier New', Courier, monospace; color: #f093fb; border: 1px solid rgba(240,147,251,0.3); }
18
+ .link-group { display: flex; justify-content: space-between; margin: 15px 0; padding: 10px; background: rgba(15,15,35,0.4); border-radius: 10px; border: 1px solid rgba(138,43,226,0.2); }
19
+ .link-group a { font-size: 14px; color: #b794f6; text-decoration: none; padding: 8px 15px; border-radius: 8px; transition: all 0.3s ease; border: 1px solid transparent; }
20
+ .link-group a:hover { background: linear-gradient(135deg, rgba(102,126,234,0.3) 0%, rgba(118,75,162,0.3) 100%); border-color: rgba(183,148,246,0.5); box-shadow: 0 0 15px rgba(138,43,226,0.3); color: #f093fb; }
21
+ form { display: flex; flex-direction: row; width: 100%; gap: 10px; align-items: center; }
22
+ .chat-input { padding: 14px 18px; border: 1px solid rgba(138,43,226,0.3); border-radius: 25px; flex-grow: 1; font-size: 14px; background: rgba(15,15,35,0.8); color: #e0e0e0; box-shadow: inset 0 2px 10px rgba(0,0,0,0.3), 0 0 20px rgba(138,43,226,0.1); transition: all 0.3s ease; }
23
+ .chat-input:focus { outline: none; border-color: rgba(183,148,246,0.6); box-shadow: inset 0 2px 10px rgba(0,0,0,0.3), 0 0 25px rgba(138,43,226,0.3); }
24
+ .chat-input::placeholder { color: rgba(183,148,246,0.5); }
25
+ .chat-submit { padding: 14px 20px; border: none; border-radius: 25px; font-size: 14px; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); color: #fff; cursor: pointer; transition: all 0.3s ease; font-weight: 600; letter-spacing: 1px; box-shadow: 0 4px 20px rgba(102,126,234,0.4); white-space: nowrap; }
26
+ .chat-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(102,126,234,0.6); }
27
+ .chat-submit:active { transform: translateY(0); }
28
+ .viewer-panel { width: 70%; padding: 25px; background: linear-gradient(135deg, rgba(22,33,62,0.9) 0%, rgba(15,15,35,0.95) 100%); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: inset 0 0 60px rgba(75,0,130,0.15); position: relative; overflow: hidden; }
29
+ .loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,15,35,0.9); justify-content: center; align-items: center; z-index: 1000; }
30
+ .spinner { width: 50px; height: 50px; border: 4px solid rgba(138,43,226,0.3); border-top-color: #f093fb; border-radius: 50%; animation: spin 1s linear infinite; }
31
+ @keyframes spin { to { transform: rotate(360deg); } }
32
+
33
+ /* Scrollbar Styles */
34
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
35
+ ::-webkit-scrollbar-track { background: rgba(15,15,35,0.6); border-radius: 10px; }
36
+ ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%); border-radius: 10px; border: 2px solid rgba(15,15,35,0.6); box-shadow: 0 0 10px rgba(138,43,226,0.4); }
37
+ ::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f093fb 0%, #764ba2 50%, #667eea 100%); box-shadow: 0 0 15px rgba(240,147,251,0.5); }
38
+ ::-webkit-scrollbar-corner { background: rgba(15,15,35,0.6); }
39
+ * { scrollbar-width: thin; scrollbar-color: #764ba2 rgba(15,15,35,0.6); }
40
+
41
+ /* Game Styles */
42
+ .game-container {
43
+ display: flex;
44
+ flex-direction: column;
45
+ align-items: center;
46
+ gap: 15px;
47
+ width: 100%;
48
+ height: 100%;
49
+ }
50
+ .game-header {
51
+ display: flex;
52
+ justify-content: space-between;
53
+ width: 100%;
54
+ max-width: 600px;
55
+ padding: 10px 20px;
56
+ background: linear-gradient(135deg, rgba(102,126,234,0.2) 0%, rgba(118,75,162,0.2) 100%);
57
+ border-radius: 15px;
58
+ border: 1px solid rgba(138,43,226,0.3);
59
+ }
60
+ .game-stat {
61
+ font-size: 18px;
62
+ font-weight: 600;
63
+ color: #f093fb;
64
+ text-shadow: 0 0 10px rgba(240,147,251,0.5);
65
+ }
66
+ #gameCanvas {
67
+ border: 2px solid rgba(138,43,226,0.5);
68
+ border-radius: 10px;
69
+ box-shadow: 0 0 30px rgba(138,43,226,0.3), inset 0 0 50px rgba(75,0,130,0.2);
70
+ background: rgba(10,10,25,0.9);
71
+ }
72
+ .game-controls {
73
+ display: flex;
74
+ gap: 15px;
75
+ margin-top: 10px;
76
+ }
77
+ .game-btn {
78
+ padding: 12px 25px;
79
+ border: none;
80
+ border-radius: 25px;
81
+ font-size: 14px;
82
+ font-weight: 600;
83
+ cursor: pointer;
84
+ transition: all 0.3s ease;
85
+ text-transform: uppercase;
86
+ letter-spacing: 1px;
87
+ }
88
+ .game-btn.start {
89
+ background: linear-gradient(135deg, #00f260 0%, #0575e6 100%);
90
+ color: #fff;
91
+ box-shadow: 0 4px 20px rgba(0,242,96,0.4);
92
+ }
93
+ .game-btn.start:hover {
94
+ transform: translateY(-2px);
95
+ box-shadow: 0 6px 25px rgba(0,242,96,0.6);
96
+ }
97
+ .game-btn.pause {
98
+ background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
99
+ color: #fff;
100
+ box-shadow: 0 4px 20px rgba(240,147,251,0.4);
101
+ }
102
+ .game-instructions {
103
+ font-size: 12px;
104
+ color: rgba(183,148,246,0.7);
105
+ text-align: center;
106
+ margin-top: 5px;
107
+ }
108
+ </style>
109
+ </head>
110
+ <body>
111
+ <div class="chat-panel">
112
+ <div class="chat-header">SynthOS</div>
113
+ <div class="chat-messages" id="chatMessages">
114
+ <div class="chat-message"><p><strong>SynthOS:</strong> What can I create for you?</p></div>
115
+ <div class="chat-message"><p><strong>You:</strong> create a cool looking space invaders game</p></div>
116
+ <div class="chat-message"><p><strong>SynthOS:</strong> 🚀 Space Invaders activated! I've created a neon-themed retro arcade game with glowing aliens, particle explosions, and smooth animations. Use <code>←</code> <code>→</code> to move and <code>SPACE</code> to fire. Good luck, pilot!</p></div>
117
+ </div>
118
+ <div class="link-group">
119
+ <a href="#" id="saveLink">Save</a>
120
+ <a href="/pages" id="pagesLink">Pages</a>
121
+ <a href="#" id="resetLink">Reset</a>
122
+ </div>
123
+ <form action="/" method="POST" id="chatForm">
124
+ <input type="text" class="chat-input" id="chatInput" name="message" placeholder="Type a message...">
125
+ <button type="submit" class="chat-submit">Send</button>
126
+ </form>
127
+ </div>
128
+ <div class="viewer-panel" id="viewerPanel">
129
+ <div class="game-container">
130
+ <div class="game-header">
131
+ <span class="game-stat">SCORE: <span id="score">0</span></span>
132
+ <span class="game-stat">LEVEL: <span id="level">1</span></span>
133
+ <span class="game-stat">LIVES: <span id="lives">3</span></span>
134
+ </div>
135
+ <canvas id="gameCanvas" width="600" height="450"></canvas>
136
+ <div class="game-controls">
137
+ <button class="game-btn start" id="startBtn">Start Game</button>
138
+ <button class="game-btn pause" id="pauseBtn">Pause</button>
139
+ </div>
140
+ <div class="game-instructions">← → to move | SPACE to fire | Destroy all aliens!</div>
141
+ </div>
142
+ </div>
143
+ <div id="thoughts" style="display: none;">Created a visually stunning Space Invaders game with a neon/cyberpunk aesthetic that matches the Nebula Dusk theme. Features include: glowing aliens with different colors per row, a sleek player ship with gradient effects, particle explosions when enemies are destroyed, smooth animations, level progression with increasing difficulty, lives system, and responsive controls. The game uses canvas for rendering with requestAnimationFrame for smooth 60fps gameplay. Added visual effects like glow shadows, star field background, and pulsing animations to make it feel modern while keeping the classic gameplay.</div>
144
+ <div id="loadingOverlay" class="loading-overlay"><div class="spinner"></div></div>
145
+ <script>
146
+ document.getElementById("chatInput").focus();
147
+ document.getElementById("chatForm").addEventListener('submit', () => {
148
+ document.getElementById("loadingOverlay").style.display = 'flex';
149
+ document.getElementById("chatForm").action = window.location.pathname;
150
+ });
151
+ document.getElementById("saveLink").addEventListener("click", function() {
152
+ const pageName = prompt("Enter the name of the page to save as:");
153
+ if (pageName) {
154
+ window.location.href = `${window.location.pathname}/save?name=${encodeURIComponent(pageName)}`;
155
+ }
156
+ });
157
+ document.getElementById("resetLink").addEventListener("click", function() {
158
+ window.location.href = `${window.location.pathname}/reset`;
159
+ });
160
+ window.onload = function() {
161
+ const chatMessages = document.getElementById('chatMessages');
162
+ chatMessages.scrollTo({
163
+ top: chatMessages.scrollHeight,
164
+ behavior: 'smooth'
165
+ });
166
+ };
167
+
168
+ // Space Invaders Game
169
+ const canvas = document.getElementById('gameCanvas');
170
+ const ctx = canvas.getContext('2d');
171
+
172
+ // Game state
173
+ let gameRunning = false;
174
+ let gamePaused = false;
175
+ let score = 0;
176
+ let level = 1;
177
+ let lives = 3;
178
+
179
+ // Player
180
+ const player = {
181
+ x: canvas.width / 2 - 25,
182
+ y: canvas.height - 50,
183
+ width: 50,
184
+ height: 30,
185
+ speed: 7,
186
+ color: '#00f260'
187
+ };
188
+
189
+ // Bullets
190
+ let bullets = [];
191
+ const bulletSpeed = 8;
192
+
193
+ // Enemy bullets
194
+ let enemyBullets = [];
195
+ const enemyBulletSpeed = 4;
196
+
197
+ // Aliens
198
+ let aliens = [];
199
+ const alienRows = 5;
200
+ const alienCols = 10;
201
+ const alienWidth = 40;
202
+ const alienHeight = 30;
203
+ const alienPadding = 10;
204
+ let alienDirection = 1;
205
+ let alienSpeed = 1;
206
+ let alienDropAmount = 20;
207
+
208
+ // Particles for explosions
209
+ let particles = [];
210
+
211
+ // Stars background
212
+ let stars = [];
213
+ for (let i = 0; i < 100; i++) {
214
+ stars.push({
215
+ x: Math.random() * canvas.width,
216
+ y: Math.random() * canvas.height,
217
+ size: Math.random() * 2 + 0.5,
218
+ speed: Math.random() * 0.5 + 0.1,
219
+ opacity: Math.random() * 0.5 + 0.5
220
+ });
221
+ }
222
+
223
+ // Alien colors by row
224
+ const alienColors = ['#f093fb', '#667eea', '#00f260', '#f5576c', '#ffd700'];
225
+
226
+ // Controls
227
+ const keys = {
228
+ left: false,
229
+ right: false,
230
+ space: false
231
+ };
232
+
233
+ let lastShot = 0;
234
+ const shootCooldown = 250;
235
+
236
+ // Initialize aliens
237
+ function initAliens() {
238
+ aliens = [];
239
+ for (let row = 0; row < alienRows; row++) {
240
+ for (let col = 0; col < alienCols; col++) {
241
+ aliens.push({
242
+ x: col * (alienWidth + alienPadding) + 50,
243
+ y: row * (alienHeight + alienPadding) + 40,
244
+ width: alienWidth,
245
+ height: alienHeight,
246
+ color: alienColors[row],
247
+ alive: true,
248
+ pulsePhase: Math.random() * Math.PI * 2
249
+ });
250
+ }
251
+ }
252
+ }
253
+
254
+ // Create explosion particles
255
+ function createExplosion(x, y, color) {
256
+ for (let i = 0; i < 15; i++) {
257
+ particles.push({
258
+ x: x,
259
+ y: y,
260
+ vx: (Math.random() - 0.5) * 8,
261
+ vy: (Math.random() - 0.5) * 8,
262
+ life: 1,
263
+ color: color,
264
+ size: Math.random() * 4 + 2
265
+ });
266
+ }
267
+ }
268
+
269
+ // Draw functions
270
+ function drawStars() {
271
+ stars.forEach(star => {
272
+ ctx.fillStyle = `rgba(255, 255, 255, ${star.opacity})`;
273
+ ctx.beginPath();
274
+ ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2);
275
+ ctx.fill();
276
+
277
+ star.y += star.speed;
278
+ if (star.y > canvas.height) {
279
+ star.y = 0;
280
+ star.x = Math.random() * canvas.width;
281
+ }
282
+ });
283
+ }
284
+
285
+ function drawPlayer() {
286
+ ctx.save();
287
+
288
+ // Glow effect
289
+ ctx.shadowColor = player.color;
290
+ ctx.shadowBlur = 20;
291
+
292
+ // Ship body
293
+ const gradient = ctx.createLinearGradient(player.x, player.y + player.height, player.x, player.y);
294
+ gradient.addColorStop(0, '#0575e6');
295
+ gradient.addColorStop(1, '#00f260');
296
+
297
+ ctx.fillStyle = gradient;
298
+ ctx.beginPath();
299
+ ctx.moveTo(player.x + player.width / 2, player.y);
300
+ ctx.lineTo(player.x + player.width, player.y + player.height);
301
+ ctx.lineTo(player.x + player.width - 10, player.y + player.height);
302
+ ctx.lineTo(player.x + player.width / 2, player.y + player.height - 10);
303
+ ctx.lineTo(player.x + 10, player.y + player.height);
304
+ ctx.lineTo(player.x, player.y + player.height);
305
+ ctx.closePath();
306
+ ctx.fill();
307
+
308
+ // Cockpit
309
+ ctx.fillStyle = '#fff';
310
+ ctx.shadowBlur = 10;
311
+ ctx.beginPath();
312
+ ctx.arc(player.x + player.width / 2, player.y + 12, 5, 0, Math.PI * 2);
313
+ ctx.fill();
314
+
315
+ ctx.restore();
316
+ }
317
+
318
+ function drawAliens() {
319
+ const time = Date.now() / 1000;
320
+
321
+ aliens.forEach(alien => {
322
+ if (!alien.alive) return;
323
+
324
+ ctx.save();
325
+
326
+ const pulse = Math.sin(time * 3 + alien.pulsePhase) * 0.2 + 0.8;
327
+
328
+ // Glow
329
+ ctx.shadowColor = alien.color;
330
+ ctx.shadowBlur = 15 * pulse;
331
+
332
+ // Alien body
333
+ ctx.fillStyle = alien.color;
334
+
335
+ // Draw alien shape (classic invader style)
336
+ const cx = alien.x + alien.width / 2;
337
+ const cy = alien.y + alien.height / 2;
338
+
339
+ ctx.beginPath();
340
+ // Body
341
+ ctx.roundRect(alien.x + 5, alien.y + 5, alien.width - 10, alien.height - 10, 5);
342
+ ctx.fill();
343
+
344
+ // Eyes
345
+ ctx.fillStyle = '#0f0f23';
346
+ ctx.beginPath();
347
+ ctx.arc(cx - 8, cy - 2, 4, 0, Math.PI * 2);
348
+ ctx.arc(cx + 8, cy - 2, 4, 0, Math.PI * 2);
349
+ ctx.fill();
350
+
351
+ // Antennae
352
+ ctx.strokeStyle = alien.color;
353
+ ctx.lineWidth = 2;
354
+ ctx.beginPath();
355
+ ctx.moveTo(cx - 10, alien.y + 5);
356
+ ctx.lineTo(cx - 15, alien.y - 5);
357
+ ctx.moveTo(cx + 10, alien.y + 5);
358
+ ctx.lineTo(cx + 15, alien.y - 5);
359
+ ctx.stroke();
360
+
361
+ ctx.restore();
362
+ });
363
+ }
364
+
365
+ function drawBullets() {
366
+ ctx.save();
367
+
368
+ bullets.forEach(bullet => {
369
+ ctx.shadowColor = '#00f260';
370
+ ctx.shadowBlur = 10;
371
+ ctx.fillStyle = '#00f260';
372
+ ctx.fillRect(bullet.x - 2, bullet.y, 4, 15);
373
+ });
374
+
375
+ enemyBullets.forEach(bullet => {
376
+ ctx.shadowColor = '#f5576c';
377
+ ctx.shadowBlur = 10;
378
+ ctx.fillStyle = '#f5576c';
379
+ ctx.fillRect(bullet.x - 2, bullet.y, 4, 15);
380
+ });
381
+
382
+ ctx.restore();
383
+ }
384
+
385
+ function drawParticles() {
386
+ particles.forEach(p => {
387
+ ctx.save();
388
+ ctx.globalAlpha = p.life;
389
+ ctx.shadowColor = p.color;
390
+ ctx.shadowBlur = 10;
391
+ ctx.fillStyle = p.color;
392
+ ctx.beginPath();
393
+ ctx.arc(p.x, p.y, p.size * p.life, 0, Math.PI * 2);
394
+ ctx.fill();
395
+ ctx.restore();
396
+ });
397
+ }
398
+
399
+ function drawGameOver() {
400
+ ctx.save();
401
+ ctx.fillStyle = 'rgba(15, 15, 35, 0.8)';
402
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
403
+
404
+ ctx.shadowColor = '#f093fb';
405
+ ctx.shadowBlur = 30;
406
+ ctx.fillStyle = '#f093fb';
407
+ ctx.font = 'bold 48px Segoe UI';
408
+ ctx.textAlign = 'center';
409
+ ctx.fillText('GAME OVER', canvas.width / 2, canvas.height / 2 - 20);
410
+
411
+ ctx.shadowBlur = 10;
412
+ ctx.font = '24px Segoe UI';
413
+ ctx.fillStyle = '#667eea';
414
+ ctx.fillText(`Final Score: ${score}`, canvas.width / 2, canvas.height / 2 + 30);
415
+
416
+ ctx.restore();
417
+ }
418
+
419
+ // Update functions
420
+ function updatePlayer() {
421
+ if (keys.left && player.x > 0) {
422
+ player.x -= player.speed;
423
+ }
424
+ if (keys.right && player.x < canvas.width - player.width) {
425
+ player.x += player.speed;
426
+ }
427
+ if (keys.space && Date.now() - lastShot > shootCooldown) {
428
+ bullets.push({
429
+ x: player.x + player.width / 2,
430
+ y: player.y
431
+ });
432
+ lastShot = Date.now();
433
+ }
434
+ }
435
+
436
+ function updateBullets() {
437
+ bullets = bullets.filter(bullet => {
438
+ bullet.y -= bulletSpeed;
439
+ return bullet.y > 0;
440
+ });
441
+
442
+ enemyBullets = enemyBullets.filter(bullet => {
443
+ bullet.y += enemyBulletSpeed;
444
+ return bullet.y < canvas.height;
445
+ });
446
+ }
447
+
448
+ function updateAliens() {
449
+ let hitEdge = false;
450
+ let lowestY = 0;
451
+
452
+ aliens.forEach(alien => {
453
+ if (!alien.alive) return;
454
+
455
+ alien.x += alienSpeed * alienDirection;
456
+
457
+ if (alien.x <= 0 || alien.x + alien.width >= canvas.width) {
458
+ hitEdge = true;
459
+ }
460
+
461
+ if (alien.y + alien.height > lowestY) {
462
+ lowestY = alien.y + alien.height;
463
+ }
464
+ });
465
+
466
+ if (hitEdge) {
467
+ alienDirection *= -1;
468
+ aliens.forEach(alien => {
469
+ alien.y += alienDropAmount;
470
+ });
471
+ }
472
+
473
+ // Check if aliens reached player
474
+ if (lowestY >= player.y) {
475
+ lives = 0;
476
+ gameRunning = false;
477
+ }
478
+
479
+ // Random alien shooting
480
+ if (Math.random() < 0.02 * level) {
481
+ const aliveAliens = aliens.filter(a => a.alive);
482
+ if (aliveAliens.length > 0) {
483
+ const shooter = aliveAliens[Math.floor(Math.random() * aliveAliens.length)];
484
+ enemyBullets.push({
485
+ x: shooter.x + shooter.width / 2,
486
+ y: shooter.y + shooter.height
487
+ });
488
+ }
489
+ }
490
+ }
491
+
492
+ function updateParticles() {
493
+ particles = particles.filter(p => {
494
+ p.x += p.vx;
495
+ p.y += p.vy;
496
+ p.life -= 0.02;
497
+ p.vx *= 0.98;
498
+ p.vy *= 0.98;
499
+ return p.life > 0;
500
+ });
501
+ }
502
+
503
+ function checkCollisions() {
504
+ // Bullets vs Aliens
505
+ bullets.forEach((bullet, bi) => {
506
+ aliens.forEach(alien => {
507
+ if (!alien.alive) return;
508
+
509
+ if (bullet.x > alien.x && bullet.x < alien.x + alien.width &&
510
+ bullet.y > alien.y && bullet.y < alien.y + alien.height) {
511
+ alien.alive = false;
512
+ bullets.splice(bi, 1);
513
+ score += 10 * level;
514
+ document.getElementById('score').textContent = score;
515
+ createExplosion(alien.x + alien.width / 2, alien.y + alien.height / 2, alien.color);
516
+ }
517
+ });
518
+ });
519
+
520
+ // Enemy bullets vs Player
521
+ enemyBullets.forEach((bullet, bi) => {
522
+ if (bullet.x > player.x && bullet.x < player.x + player.width &&
523
+ bullet.y > player.y && bullet.y < player.y + player.height) {
524
+ enemyBullets.splice(bi, 1);
525
+ lives--;
526
+ document.getElementById('lives').textContent = lives;
527
+ createExplosion(player.x + player.width / 2, player.y + player.height / 2, '#00f260');
528
+
529
+ if (lives <= 0) {
530
+ gameRunning = false;
531
+ }
532
+ }
533
+ });
534
+
535
+ // Check level complete
536
+ if (aliens.every(a => !a.alive)) {
537
+ level++;
538
+ document.getElementById('level').textContent = level;
539
+ alienSpeed = 1 + level * 0.5;
540
+ initAliens();
541
+ }
542
+ }
543
+
544
+ // Game loop
545
+ function gameLoop() {
546
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
547
+
548
+ drawStars();
549
+
550
+ if (gameRunning && !gamePaused) {
551
+ updatePlayer();
552
+ updateBullets();
553
+ updateAliens();
554
+ updateParticles();
555
+ checkCollisions();
556
+ }
557
+
558
+ drawAliens();
559
+ drawPlayer();
560
+ drawBullets();
561
+ drawParticles();
562
+
563
+ if (!gameRunning && lives <= 0) {
564
+ drawGameOver();
565
+ }
566
+
567
+ requestAnimationFrame(gameLoop);
568
+ }
569
+
570
+ // Event listeners
571
+ document.addEventListener('keydown', (e) => {
572
+ if (e.key === 'ArrowLeft' || e.key === 'a') keys.left = true;
573
+ if (e.key === 'ArrowRight' || e.key === 'd') keys.right = true;
574
+ if (e.key === ' ') {
575
+ e.preventDefault();
576
+ keys.space = true;
577
+ }
578
+ });
579
+
580
+ document.addEventListener('keyup', (e) => {
581
+ if (e.key === 'ArrowLeft' || e.key === 'a') keys.left = false;
582
+ if (e.key === 'ArrowRight' || e.key === 'd') keys.right = false;
583
+ if (e.key === ' ') keys.space = false;
584
+ });
585
+
586
+ document.getElementById('startBtn').addEventListener('click', () => {
587
+ score = 0;
588
+ level = 1;
589
+ lives = 3;
590
+ alienSpeed = 1;
591
+ bullets = [];
592
+ enemyBullets = [];
593
+ particles = [];
594
+ player.x = canvas.width / 2 - 25;
595
+
596
+ document.getElementById('score').textContent = score;
597
+ document.getElementById('level').textContent = level;
598
+ document.getElementById('lives').textContent = lives;
599
+
600
+ initAliens();
601
+ gameRunning = true;
602
+ gamePaused = false;
603
+ });
604
+
605
+ document.getElementById('pauseBtn').addEventListener('click', () => {
606
+ if (gameRunning) {
607
+ gamePaused = !gamePaused;
608
+ document.getElementById('pauseBtn').textContent = gamePaused ? 'Resume' : 'Pause';
609
+ }
610
+ });
611
+
612
+ // Initialize and start
613
+ initAliens();
614
+ gameLoop();
615
+ </script>
616
+ </body>
617
+ </html>
@@ -1,7 +1,7 @@
1
- {
2
- "id": "windows-terminal",
3
- "type": "command",
4
- "command": "{{command}}",
5
- "description": "Executes a windows based terminal command in the current working directory",
6
- "variables": "{{command}}"
1
+ {
2
+ "id": "windows-terminal",
3
+ "type": "command",
4
+ "command": "{{command}}",
5
+ "description": "Executes a windows based terminal command in the current working directory",
6
+ "variables": "{{command}}"
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createCompletePrompt.d.ts","sourceRoot":"","sources":["../../src/service/createCompletePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAA4B,MAAM,aAAa,CAAC;AAGjF,eAAO,MAAM,eAAe,UAM3B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA4BvG"}
1
+ {"version":3,"file":"createCompletePrompt.d.ts","sourceRoot":"","sources":["../../src/service/createCompletePrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAA4B,MAAM,aAAa,CAAC;AAGjF,eAAO,MAAM,eAAe,UAO3B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA4BvG"}
@@ -4,11 +4,12 @@ exports.createCompletePrompt = exports.availableModels = void 0;
4
4
  const agentm_core_1 = require("agentm-core");
5
5
  const settings_1 = require("../settings");
6
6
  exports.availableModels = [
7
- 'claude-3-5-sonnet-20240620',
8
- 'gpt-4o-mini',
9
- 'gpt-4o-2024-08-06',
10
- 'o1-mini',
11
- 'o1-preview'
7
+ 'claude-opus-4-5',
8
+ 'Claude Sonnet 4.5',
9
+ 'Claude Haiku 4.5',
10
+ 'GPT-5.2',
11
+ 'GPT-5 mini',
12
+ 'GPT-5 nano'
12
13
  ];
13
14
  async function createCompletePrompt(pagesFolder, model) {
14
15
  // Get configuration settings
@@ -1 +1 @@
1
- {"version":3,"file":"createCompletePrompt.js","sourceRoot":"","sources":["../../src/service/createCompletePrompt.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AACjF,0CAA2C;AAE9B,QAAA,eAAe,GAAG;IAC3B,4BAA4B;IAC5B,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,YAAY;CACf,CAAC;AAEK,KAAK,UAAU,oBAAoB,CAAC,WAAmB,EAAE,KAAc;IAC1E,6BAA6B;IAC7B,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,WAAW,CAAC,CAAC;IACjD,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KACpD;IAED,iBAAiB;IACjB,KAAK,GAAG,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC;IAChC,IAAI,CAAC,KAAK,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC3C;IAED,8BAA8B;IAC9B,IAAI,aAA6B,CAAC;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;IACtC,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;QAC7B,aAAa,GAAG,IAAA,uBAAS,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;KAC9C;SAAM;QACH,aAAa,GAAG,IAAA,oBAAM,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;KAC3C;IAED,4BAA4B;IAC5B,IAAI,QAAQ,CAAC,cAAc,EAAE;QACzB,OAAO,IAAA,+BAAiB,EAAC,aAAa,EAAE,IAAI,CAAC,CAAC;KACjD;SAAM;QACH,OAAO,aAAa,CAAC;KACxB;AACL,CAAC;AA5BD,oDA4BC"}
1
+ {"version":3,"file":"createCompletePrompt.js","sourceRoot":"","sources":["../../src/service/createCompletePrompt.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AACjF,0CAA2C;AAE9B,QAAA,eAAe,GAAG;IAC3B,iBAAiB;IACjB,mBAAmB;IACnB,kBAAkB;IAClB,SAAS;IACT,YAAY;IACZ,YAAY;CACf,CAAC;AAEK,KAAK,UAAU,oBAAoB,CAAC,WAAmB,EAAE,KAAc;IAC1E,6BAA6B;IAC7B,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,WAAW,CAAC,CAAC;IACjD,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KACpD;IAED,iBAAiB;IACjB,KAAK,GAAG,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC;IAChC,IAAI,CAAC,KAAK,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC3C;IAED,8BAA8B;IAC9B,IAAI,aAA6B,CAAC;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;IACtC,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;QAC7B,aAAa,GAAG,IAAA,uBAAS,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;KAC9C;SAAM;QACH,aAAa,GAAG,IAAA,oBAAM,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;KAC3C;IAED,4BAA4B;IAC5B,IAAI,QAAQ,CAAC,cAAc,EAAE;QACzB,OAAO,IAAA,+BAAiB,EAAC,aAAa,EAAE,IAAI,CAAC,CAAC;KACjD;SAAM;QACH,OAAO,aAAa,CAAC;KACxB;AACL,CAAC;AA5BD,oDA4BC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "synthos",
3
3
  "author": "Steven Ickman",
4
4
  "description": "An AI powered shell experience.",
5
- "version": "0.1.0",
5
+ "version": "0.2.0",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "synthos",