warp-agent 1.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.
@@ -0,0 +1,626 @@
1
+ :root {
2
+ --bg-dark: #07090e;
3
+ --bg-card: rgba(14, 18, 27, 0.85);
4
+ --bg-card-border: rgba(255, 255, 255, 0.08);
5
+ --accent-cyan: #00f0ff;
6
+ --accent-emerald: #00ff88;
7
+ --accent-red: #ff3366;
8
+ --accent-yellow: #ffb703;
9
+ --accent-purple: #b5179e;
10
+ --text-primary: #f0f4f8;
11
+ --text-muted: #8899ac;
12
+ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
13
+ --font-mono: 'JetBrains Mono', monospace;
14
+ }
15
+
16
+ * {
17
+ box-sizing: border-box;
18
+ margin: 0;
19
+ padding: 0;
20
+ }
21
+
22
+ body {
23
+ background-color: var(--bg-dark);
24
+ color: var(--text-primary);
25
+ font-family: var(--font-sans);
26
+ overflow-x: hidden;
27
+ min-height: 100vh;
28
+ background-image:
29
+ radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.04) 0%, transparent 40%),
30
+ radial-gradient(circle at 90% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 40%),
31
+ linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
32
+ linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
33
+ background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
34
+ }
35
+
36
+ .studio-container {
37
+ max-width: 1440px;
38
+ margin: 0 auto;
39
+ padding: 24px 32px 120px;
40
+ position: relative;
41
+ }
42
+
43
+ /* TOP BAR */
44
+ .top-nav {
45
+ display: flex;
46
+ justify-content: space-between;
47
+ align-items: center;
48
+ padding-bottom: 20px;
49
+ border-bottom: 1px solid var(--bg-card-border);
50
+ }
51
+
52
+ .brand-cluster {
53
+ display: flex;
54
+ align-items: center;
55
+ gap: 16px;
56
+ }
57
+
58
+ .brand-logo {
59
+ width: 44px;
60
+ height: 44px;
61
+ border-radius: 12px;
62
+ background: linear-gradient(135deg, #00f0ff, #00ff88);
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ font-size: 24px;
67
+ box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
68
+ }
69
+
70
+ .brand-title {
71
+ font-size: 22px;
72
+ font-weight: 900;
73
+ letter-spacing: -0.5px;
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 10px;
77
+ }
78
+
79
+ .badge-system1 {
80
+ font-size: 10px;
81
+ font-weight: 700;
82
+ padding: 3px 8px;
83
+ border-radius: 6px;
84
+ background: rgba(0, 255, 136, 0.15);
85
+ border: 1px solid rgba(0, 255, 136, 0.4);
86
+ color: var(--accent-emerald);
87
+ letter-spacing: 1px;
88
+ }
89
+
90
+ .brand-subtitle {
91
+ font-size: 13px;
92
+ color: var(--text-muted);
93
+ margin-top: 2px;
94
+ }
95
+
96
+ .studio-controls {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 12px;
100
+ }
101
+
102
+ .scenario-picker {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: 8px;
106
+ background: var(--bg-card);
107
+ border: 1px solid var(--bg-card-border);
108
+ padding: 6px 12px;
109
+ border-radius: 8px;
110
+ font-size: 12px;
111
+ color: var(--text-muted);
112
+ }
113
+
114
+ .scenario-picker select {
115
+ background: transparent;
116
+ border: none;
117
+ color: #fff;
118
+ font-family: var(--font-mono);
119
+ font-size: 12px;
120
+ outline: none;
121
+ cursor: pointer;
122
+ }
123
+
124
+ .scenario-picker select option {
125
+ background: #0f131a;
126
+ color: #fff;
127
+ }
128
+
129
+ .btn-tool {
130
+ background: var(--bg-card);
131
+ border: 1px solid var(--bg-card-border);
132
+ color: var(--text-primary);
133
+ padding: 8px 14px;
134
+ border-radius: 8px;
135
+ font-size: 12px;
136
+ font-weight: 600;
137
+ cursor: pointer;
138
+ transition: all 0.2s ease;
139
+ backdrop-filter: blur(8px);
140
+ }
141
+
142
+ .btn-tool:hover {
143
+ background: rgba(255, 255, 255, 0.1);
144
+ border-color: rgba(255, 255, 255, 0.2);
145
+ }
146
+
147
+ .btn-tool.active {
148
+ border-color: rgba(0, 240, 255, 0.5);
149
+ color: var(--accent-cyan);
150
+ }
151
+
152
+ /* HERO TELEMETRY */
153
+ .speedrun-hero {
154
+ margin: 28px 0;
155
+ display: flex;
156
+ justify-content: space-between;
157
+ align-items: center;
158
+ background: var(--bg-card);
159
+ border: 1px solid var(--bg-card-border);
160
+ border-radius: 16px;
161
+ padding: 20px 28px;
162
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
163
+ backdrop-filter: blur(12px);
164
+ }
165
+
166
+ .telemetry-bar {
167
+ display: flex;
168
+ gap: 36px;
169
+ }
170
+
171
+ .stat-card {
172
+ display: flex;
173
+ flex-direction: column;
174
+ }
175
+
176
+ .stat-label {
177
+ font-size: 11px;
178
+ font-weight: 700;
179
+ letter-spacing: 1px;
180
+ color: var(--text-muted);
181
+ font-family: var(--font-mono);
182
+ }
183
+
184
+ .stat-value {
185
+ font-size: 26px;
186
+ font-weight: 800;
187
+ font-family: var(--font-mono);
188
+ margin-top: 4px;
189
+ }
190
+
191
+ .stat-value small {
192
+ font-size: 14px;
193
+ font-weight: 500;
194
+ color: var(--text-muted);
195
+ }
196
+
197
+ .text-cyan { color: var(--accent-cyan); }
198
+ .text-emerald { color: var(--accent-emerald); }
199
+ .text-yellow { color: var(--accent-yellow); }
200
+ .text-purple { color: var(--accent-purple); }
201
+ .text-red { color: var(--accent-red); }
202
+
203
+ .cta-actions {
204
+ display: flex;
205
+ gap: 12px;
206
+ }
207
+
208
+ .btn-warp {
209
+ background: linear-gradient(135deg, #00f0ff, #00ff88);
210
+ border: none;
211
+ color: #040810;
212
+ font-weight: 800;
213
+ font-size: 15px;
214
+ padding: 14px 28px;
215
+ border-radius: 10px;
216
+ cursor: pointer;
217
+ box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
218
+ transition: all 0.2s ease;
219
+ position: relative;
220
+ overflow: hidden;
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 8px;
224
+ }
225
+
226
+ .btn-warp:hover {
227
+ transform: translateY(-2px);
228
+ box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
229
+ }
230
+
231
+ .btn-warp:active {
232
+ transform: translateY(1px);
233
+ }
234
+
235
+ .btn-reset {
236
+ background: rgba(255, 255, 255, 0.05);
237
+ border: 1px solid var(--bg-card-border);
238
+ color: var(--text-muted);
239
+ font-weight: 600;
240
+ font-size: 13px;
241
+ padding: 14px 20px;
242
+ border-radius: 10px;
243
+ cursor: pointer;
244
+ transition: all 0.2s ease;
245
+ }
246
+
247
+ .btn-reset:hover {
248
+ background: rgba(255, 255, 255, 0.1);
249
+ color: #fff;
250
+ }
251
+
252
+ /* ARENA SPLIT-SCREEN */
253
+ .arena-grid {
254
+ display: grid;
255
+ grid-template-columns: 1fr 1fr;
256
+ gap: 24px;
257
+ margin-top: 10px;
258
+ }
259
+
260
+ .arena-panel {
261
+ background: var(--bg-card);
262
+ border: 1px solid var(--bg-card-border);
263
+ border-radius: 16px;
264
+ padding: 22px;
265
+ display: flex;
266
+ flex-direction: column;
267
+ height: 520px;
268
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
269
+ backdrop-filter: blur(16px);
270
+ position: relative;
271
+ }
272
+
273
+ .legacy-panel {
274
+ border-left: 3px solid rgba(255, 51, 102, 0.4);
275
+ }
276
+
277
+ .warp-panel {
278
+ border-left: 3px solid rgba(0, 255, 136, 0.6);
279
+ box-shadow: 0 10px 40px rgba(0, 255, 136, 0.05);
280
+ }
281
+
282
+ .panel-header {
283
+ display: flex;
284
+ justify-content: space-between;
285
+ align-items: center;
286
+ padding-bottom: 14px;
287
+ }
288
+
289
+ .header-tag {
290
+ font-size: 12px;
291
+ font-weight: 700;
292
+ font-family: var(--font-mono);
293
+ display: flex;
294
+ align-items: center;
295
+ gap: 8px;
296
+ }
297
+
298
+ .tag-legacy { color: var(--accent-red); }
299
+ .tag-warp { color: var(--accent-emerald); }
300
+
301
+ .dot-red, .dot-emerald {
302
+ width: 8px;
303
+ height: 8px;
304
+ border-radius: 50%;
305
+ display: inline-block;
306
+ }
307
+
308
+ .dot-red { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
309
+ .dot-emerald { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
310
+
311
+ .panel-metrics {
312
+ display: flex;
313
+ gap: 16px;
314
+ font-family: var(--font-mono);
315
+ font-weight: 700;
316
+ font-size: 14px;
317
+ }
318
+
319
+ .progress-track {
320
+ width: 100%;
321
+ height: 6px;
322
+ background: rgba(255, 255, 255, 0.05);
323
+ border-radius: 3px;
324
+ overflow: hidden;
325
+ margin-bottom: 16px;
326
+ }
327
+
328
+ .progress-bar-fill {
329
+ height: 100%;
330
+ transition: width 0.1s linear;
331
+ }
332
+
333
+ .fill-red { background: var(--accent-red); }
334
+ .fill-emerald { background: linear-gradient(90deg, #00f0ff, #00ff88); box-shadow: 0 0 10px var(--accent-emerald); }
335
+
336
+ .agent-status-box {
337
+ display: flex;
338
+ align-items: center;
339
+ gap: 16px;
340
+ padding: 12px 16px;
341
+ background: rgba(0, 0, 0, 0.4);
342
+ border-radius: 10px;
343
+ border: 1px solid rgba(255, 255, 255, 0.05);
344
+ margin-bottom: 16px;
345
+ }
346
+
347
+ .spinner-idle {
348
+ font-size: 24px;
349
+ }
350
+
351
+ .gauge-ring {
352
+ width: 44px;
353
+ height: 44px;
354
+ border-radius: 50%;
355
+ border: 2px solid var(--accent-emerald);
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
360
+ }
361
+
362
+ .gauge-number {
363
+ font-family: var(--font-mono);
364
+ font-size: 12px;
365
+ font-weight: 800;
366
+ color: var(--accent-emerald);
367
+ }
368
+
369
+ .status-meta {
370
+ flex: 1;
371
+ }
372
+
373
+ .status-heading {
374
+ font-size: 14px;
375
+ font-weight: 700;
376
+ }
377
+
378
+ .status-sub {
379
+ font-size: 12px;
380
+ color: var(--text-muted);
381
+ margin-top: 2px;
382
+ }
383
+
384
+ /* STREAM CONSOLES */
385
+ .stream-console {
386
+ flex: 1;
387
+ background: #030508;
388
+ border-radius: 10px;
389
+ border: 1px solid rgba(255, 255, 255, 0.04);
390
+ padding: 14px;
391
+ font-family: var(--font-mono);
392
+ font-size: 11.5px;
393
+ line-height: 1.6;
394
+ overflow-y: auto;
395
+ display: flex;
396
+ flex-direction: column;
397
+ gap: 6px;
398
+ }
399
+
400
+ .stream-console::-webkit-scrollbar {
401
+ width: 5px;
402
+ }
403
+
404
+ .stream-console::-webkit-scrollbar-thumb {
405
+ background: rgba(255, 255, 255, 0.15);
406
+ border-radius: 3px;
407
+ }
408
+
409
+ .log-entry {
410
+ display: flex;
411
+ gap: 8px;
412
+ }
413
+
414
+ .log-dim { color: var(--text-muted); }
415
+ .log-red { color: var(--accent-red); }
416
+ .log-emerald { color: var(--accent-emerald); }
417
+ .log-cyan { color: var(--accent-cyan); }
418
+ .log-yellow { color: var(--accent-yellow); }
419
+
420
+ /* VICTORY BANNER */
421
+ .victory-banner {
422
+ display: none;
423
+ margin-top: 20px;
424
+ background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 240, 255, 0.15));
425
+ border: 1px solid rgba(0, 255, 136, 0.4);
426
+ border-radius: 14px;
427
+ padding: 16px 24px;
428
+ box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
429
+ animation: slideUp 0.3s ease;
430
+ }
431
+
432
+ @keyframes slideUp {
433
+ from { opacity: 0; transform: translateY(10px); }
434
+ to { opacity: 1; transform: translateY(0); }
435
+ }
436
+
437
+ .victory-content {
438
+ display: flex;
439
+ justify-content: space-between;
440
+ align-items: center;
441
+ }
442
+
443
+ .victory-badge {
444
+ font-size: 18px;
445
+ font-weight: 900;
446
+ color: var(--accent-emerald);
447
+ font-family: var(--font-mono);
448
+ letter-spacing: -0.5px;
449
+ }
450
+
451
+ .victory-stats {
452
+ display: flex;
453
+ gap: 20px;
454
+ }
455
+
456
+ .stat-pill {
457
+ font-size: 13px;
458
+ font-family: var(--font-mono);
459
+ background: rgba(0, 0, 0, 0.5);
460
+ padding: 6px 14px;
461
+ border-radius: 8px;
462
+ border: 1px solid rgba(255, 255, 255, 0.1);
463
+ }
464
+
465
+ .stat-pill .label {
466
+ color: var(--text-muted);
467
+ margin-right: 6px;
468
+ }
469
+
470
+ /* FLOATING CIRCULAR WEBCAM BUBBLE */
471
+ .camera-dock {
472
+ position: fixed;
473
+ z-index: 9999;
474
+ transition: all 0.3s ease;
475
+ user-select: none;
476
+ }
477
+
478
+ .dock-bottom-right {
479
+ bottom: 30px;
480
+ right: 36px;
481
+ }
482
+
483
+ .dock-bottom-left {
484
+ bottom: 30px;
485
+ left: 36px;
486
+ }
487
+
488
+ .dock-top-right {
489
+ top: 90px;
490
+ right: 36px;
491
+ }
492
+
493
+ .camera-canvas-wrapper {
494
+ width: 190px;
495
+ height: 190px;
496
+ position: relative;
497
+ border-radius: 50%;
498
+ display: flex;
499
+ align-items: center;
500
+ justify-content: center;
501
+ }
502
+
503
+ #audioVisualizerRing {
504
+ position: absolute;
505
+ top: -15px;
506
+ left: -15px;
507
+ width: 220px;
508
+ height: 220px;
509
+ pointer-events: none;
510
+ z-index: 10;
511
+ }
512
+
513
+ #webcamVideo {
514
+ width: 180px;
515
+ height: 180px;
516
+ border-radius: 50%;
517
+ object-fit: cover;
518
+ border: 3px solid rgba(0, 240, 255, 0.6);
519
+ box-shadow: 0 0 25px rgba(0, 240, 255, 0.35);
520
+ background: #000;
521
+ transform: scaleX(-1); /* Mirror mode for webcam */
522
+ }
523
+
524
+ .camera-placeholder {
525
+ position: absolute;
526
+ width: 180px;
527
+ height: 180px;
528
+ border-radius: 50%;
529
+ background: rgba(14, 18, 27, 0.95);
530
+ border: 3px solid rgba(255, 255, 255, 0.15);
531
+ display: flex;
532
+ flex-direction: column;
533
+ align-items: center;
534
+ justify-content: center;
535
+ cursor: pointer;
536
+ transition: all 0.2s ease;
537
+ }
538
+
539
+ .camera-placeholder:hover {
540
+ border-color: var(--accent-cyan);
541
+ box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
542
+ }
543
+
544
+ .cam-avatar {
545
+ font-size: 38px;
546
+ }
547
+
548
+ .cam-hint {
549
+ font-size: 11px;
550
+ color: var(--text-muted);
551
+ font-weight: 600;
552
+ margin-top: 6px;
553
+ text-align: center;
554
+ padding: 0 16px;
555
+ }
556
+
557
+ .camera-controls-overlay {
558
+ position: absolute;
559
+ bottom: -6px;
560
+ display: flex;
561
+ gap: 6px;
562
+ background: rgba(0, 0, 0, 0.75);
563
+ border: 1px solid var(--bg-card-border);
564
+ padding: 4px 8px;
565
+ border-radius: 20px;
566
+ backdrop-filter: blur(8px);
567
+ z-index: 20;
568
+ }
569
+
570
+ .cam-btn {
571
+ background: transparent;
572
+ border: none;
573
+ color: var(--text-muted);
574
+ font-size: 12px;
575
+ cursor: pointer;
576
+ padding: 3px 6px;
577
+ border-radius: 6px;
578
+ transition: all 0.2s ease;
579
+ }
580
+
581
+ .cam-btn:hover {
582
+ color: #fff;
583
+ background: rgba(255, 255, 255, 0.1);
584
+ }
585
+
586
+ .cam-btn.active {
587
+ color: var(--accent-cyan);
588
+ }
589
+
590
+ .presenter-tag {
591
+ text-align: center;
592
+ font-size: 10px;
593
+ font-weight: 800;
594
+ font-family: var(--font-mono);
595
+ letter-spacing: 1px;
596
+ color: var(--accent-cyan);
597
+ margin-top: 14px;
598
+ display: flex;
599
+ align-items: center;
600
+ justify-content: center;
601
+ gap: 6px;
602
+ }
603
+
604
+ .live-dot {
605
+ width: 6px;
606
+ height: 6px;
607
+ border-radius: 50%;
608
+ background: var(--accent-cyan);
609
+ box-shadow: 0 0 6px var(--accent-cyan);
610
+ animation: pulseDot 1.5s infinite;
611
+ }
612
+
613
+ @keyframes pulseDot {
614
+ 0%, 100% { opacity: 1; transform: scale(1); }
615
+ 50% { opacity: 0.4; transform: scale(0.85); }
616
+ }
617
+
618
+ /* RESPONSIVE */
619
+ @media (max-width: 1024px) {
620
+ .arena-grid {
621
+ grid-template-columns: 1fr;
622
+ }
623
+ .telemetry-bar {
624
+ gap: 18px;
625
+ }
626
+ }
package/server.js ADDED
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Zero-dependency local server for WARP-AGENT Visualizer Studio
3
+ */
4
+ import http from 'http';
5
+ import fs from 'fs';
6
+ import path from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ import { exec } from 'child_process';
9
+ import { WarpSpeedrunEngine } from './src/speedrun-engine.js';
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+ const PUBLIC_DIR = path.join(__dirname, 'public');
14
+ const PORT = process.env.PORT || 3333;
15
+
16
+ const MIME_TYPES = {
17
+ '.html': 'text/html; charset=utf-8',
18
+ '.css': 'text/css; charset=utf-8',
19
+ '.js': 'application/javascript; charset=utf-8',
20
+ '.json': 'application/json; charset=utf-8',
21
+ '.png': 'image/png',
22
+ '.svg': 'image/svg+xml'
23
+ };
24
+
25
+ const server = http.createServer(async (req, res) => {
26
+ const url = new URL(req.url, `http://${req.headers.host}`);
27
+
28
+ // SSE Speedrun Stream Endpoint
29
+ if (url.pathname === '/api/stream') {
30
+ res.writeHead(200, {
31
+ 'Content-Type': 'text/event-stream',
32
+ 'Cache-Control': 'no-cache',
33
+ 'Connection': 'keep-alive',
34
+ 'Access-Control-Allow-Origin': '*'
35
+ });
36
+
37
+ const task = url.searchParams.get('task') || "Isolate & repair race condition in 20 microservices";
38
+ const engine = new WarpSpeedrunEngine({
39
+ totalSteps: 48,
40
+ onStep: (data) => {
41
+ res.write(`data: ${JSON.stringify(data)}\n\n`);
42
+ }
43
+ });
44
+
45
+ const summary = await engine.run(task);
46
+ res.write(`event: complete\ndata: ${JSON.stringify(summary)}\n\n`);
47
+ res.end();
48
+ return;
49
+ }
50
+
51
+ // Static File Serving
52
+ let filePath = path.join(PUBLIC_DIR, url.pathname === '/' ? 'index.html' : url.pathname);
53
+ if (!filePath.startsWith(PUBLIC_DIR)) {
54
+ res.writeHead(403);
55
+ return res.end('Forbidden');
56
+ }
57
+
58
+ fs.stat(filePath, (err, stats) => {
59
+ if (err || !stats.isFile()) {
60
+ res.writeHead(404, { 'Content-Type': 'text/plain' });
61
+ return res.end('404 Not Found');
62
+ }
63
+
64
+ const ext = path.extname(filePath).toLowerCase();
65
+ const contentType = MIME_TYPES[ext] || 'application/octet-stream';
66
+
67
+ res.writeHead(200, { 'Content-Type': contentType });
68
+ fs.createReadStream(filePath).pipe(res);
69
+ });
70
+ });
71
+
72
+ server.listen(PORT, () => {
73
+ const studioUrl = `http://localhost:${PORT}`;
74
+ console.log(`\n⚡ WARP-AGENT Visualizer Studio live at: \x1b[36m${studioUrl}\x1b[0m`);
75
+ console.log(`🎥 Ready for screen recording with floating webcam & audio visualizer.`);
76
+
77
+ // Auto-open in default browser on macOS
78
+ if (process.platform === 'darwin') {
79
+ exec(`open "${studioUrl}"`);
80
+ }
81
+ });