honeymcp 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

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,535 @@
1
+ :root {
2
+ /* Brand - Honey/Amber/Gold */
3
+ --brand-50: #fffbeb;
4
+ --brand-100: #fef3c7;
5
+ --brand-200: #fde68a;
6
+ --brand-300: #fcd34d;
7
+ --brand-400: #fbbf24;
8
+ --brand-500: #f59e0b;
9
+ --brand-600: #d97706;
10
+ --brand-700: #b45309;
11
+ --brand-800: #92400e;
12
+ --brand-900: #78350f;
13
+ --brand-950: #451a03;
14
+
15
+ /* Neutrals - Slate */
16
+ --slate-50: #f8fafc;
17
+ --slate-100: #f1f5f9;
18
+ --slate-200: #e2e8f0;
19
+ --slate-300: #cbd5e1;
20
+ --slate-400: #94a3b8;
21
+ --slate-500: #64748b;
22
+ --slate-600: #475569;
23
+ --slate-700: #334155;
24
+ --slate-800: #1e293b;
25
+ --slate-900: #0f172a;
26
+ --slate-950: #020617;
27
+
28
+ --white: #ffffff;
29
+
30
+ /* Semantic Colors */
31
+ --bg-app: #0f0a05;
32
+ --bg-surface: rgba(255, 255, 255, 0.03);
33
+
34
+ --text-primary: var(--slate-100);
35
+ --text-secondary: var(--slate-400);
36
+ --text-tertiary: var(--slate-500);
37
+
38
+ --border-subtle: rgba(255, 255, 255, 0.08);
39
+ --border-medium: rgba(255, 255, 255, 0.15);
40
+
41
+ /* Threat Levels */
42
+ --critical-bg: rgba(153, 27, 27, 0.2);
43
+ --critical-text: #fca5a5;
44
+ --critical-border: rgba(252, 165, 165, 0.3);
45
+
46
+ --high-bg: rgba(154, 52, 18, 0.2);
47
+ --high-text: #fdba74;
48
+ --high-border: rgba(253, 186, 116, 0.3);
49
+
50
+ --medium-bg: rgba(146, 64, 14, 0.2);
51
+ --medium-text: #fcd34d;
52
+ --medium-border: rgba(252, 211, 77, 0.3);
53
+
54
+ --low-bg: rgba(22, 101, 52, 0.2);
55
+ --low-text: #86efac;
56
+ --low-border: rgba(134, 239, 172, 0.3);
57
+
58
+ /* Shadows refined for dark mode */
59
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
60
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
61
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
62
+
63
+ /* Animations */
64
+ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
65
+ --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
66
+ }
67
+
68
+ /* Reset & Base */
69
+ *,
70
+ *::before,
71
+ *::after {
72
+ box-sizing: border-box;
73
+ }
74
+
75
+ body {
76
+ margin: 0;
77
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
78
+ background-color: var(--bg-app);
79
+ background-image:
80
+ radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.15) 0px, transparent 50%),
81
+ radial-gradient(at 100% 0%, rgba(234, 179, 8, 0.15) 0px, transparent 50%),
82
+ radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.1) 0px, transparent 50%),
83
+ radial-gradient(at 0% 100%, rgba(180, 83, 9, 0.1) 0px, transparent 50%);
84
+ background-attachment: fixed;
85
+ color: var(--text-primary);
86
+ line-height: 1.5;
87
+ -webkit-font-smoothing: antialiased;
88
+ }
89
+
90
+ /* Typography */
91
+ h1,
92
+ h2,
93
+ h3,
94
+ h4,
95
+ h5,
96
+ h6 {
97
+ font-family: 'Outfit', sans-serif;
98
+ margin: 0;
99
+ font-weight: 600;
100
+ letter-spacing: -0.025em;
101
+ }
102
+
103
+ code,
104
+ pre {
105
+ font-family: 'JetBrains Mono', 'Fira Code', monospace;
106
+ }
107
+
108
+ /* Layout */
109
+ .container {
110
+ max-width: 1280px;
111
+ margin: 0 auto;
112
+ padding: 32px 24px;
113
+ }
114
+
115
+ /* Header */
116
+ .header {
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 8px;
120
+ margin-bottom: 40px;
121
+ animation: slideDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
122
+ }
123
+
124
+ .header-top {
125
+ display: flex;
126
+ justify-content: space-between;
127
+ align-items: center;
128
+ }
129
+
130
+ .title {
131
+ font-size: 2.5rem;
132
+ font-weight: 700;
133
+ background: linear-gradient(135deg, #fffbeb 0%, #fbbf24 100%);
134
+ -webkit-background-clip: text;
135
+ -webkit-text-fill-color: transparent;
136
+ filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.2));
137
+ }
138
+
139
+ .subtitle {
140
+ color: var(--slate-400);
141
+ font-size: 1.1rem;
142
+ }
143
+
144
+ /* Panels */
145
+ .panel {
146
+ background: rgba(255, 255, 255, 0.03);
147
+ backdrop-filter: blur(16px);
148
+ -webkit-backdrop-filter: blur(16px);
149
+ border: 1px solid rgba(255, 255, 255, 0.08);
150
+ border-radius: 20px;
151
+ padding: 24px;
152
+ margin-bottom: 24px;
153
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
154
+ transition: all var(--transition-medium);
155
+ }
156
+
157
+ .panel:hover {
158
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
159
+ border-color: rgba(251, 191, 36, 0.2);
160
+ background: rgba(255, 255, 255, 0.05);
161
+ }
162
+
163
+ /* Glassmorphism utility */
164
+ .glass-panel {
165
+ background: rgba(30, 41, 59, 0.4);
166
+ backdrop-filter: blur(20px);
167
+ border: 1px solid rgba(255, 255, 255, 0.1);
168
+ }
169
+
170
+ /* Grid Layouts */
171
+ .grid {
172
+ display: grid;
173
+ gap: 20px;
174
+ }
175
+
176
+ .grid.filters {
177
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
178
+ align-items: end;
179
+ }
180
+
181
+ .grid.metrics {
182
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
183
+ }
184
+
185
+ /* Inputs */
186
+ .form-group {
187
+ display: flex;
188
+ flex-direction: column;
189
+ gap: 8px;
190
+ }
191
+
192
+ label {
193
+ font-size: 0.875rem;
194
+ font-weight: 500;
195
+ color: var(--slate-400);
196
+ }
197
+
198
+ input,
199
+ select,
200
+ button {
201
+ font-family: inherit;
202
+ font-size: 0.95rem;
203
+ padding: 12px 16px;
204
+ border-radius: 12px;
205
+ border: 1px solid rgba(255, 255, 255, 0.1);
206
+ background: rgba(0, 0, 0, 0.3);
207
+ color: var(--slate-100);
208
+ transition: all var(--transition-fast);
209
+ outline: none;
210
+ }
211
+
212
+ input:focus,
213
+ select:focus {
214
+ border-color: var(--brand-500);
215
+ box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
216
+ background: rgba(0, 0, 0, 0.5);
217
+ }
218
+
219
+ button.primary {
220
+ background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
221
+ color: white;
222
+ border: none;
223
+ font-weight: 600;
224
+ cursor: pointer;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ gap: 8px;
229
+ box-shadow: 0 4px 6px rgba(217, 119, 6, 0.3);
230
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
231
+ }
232
+
233
+ button.primary:hover {
234
+ background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
235
+ transform: translateY(-2px);
236
+ box-shadow: 0 6px 8px rgba(217, 119, 6, 0.4);
237
+ }
238
+
239
+ button.primary:active {
240
+ transform: translateY(0);
241
+ }
242
+
243
+ button.danger {
244
+ background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
245
+ color: white;
246
+ border: none;
247
+ font-weight: 600;
248
+ cursor: pointer;
249
+ }
250
+
251
+ button.danger:hover {
252
+ background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
253
+ }
254
+
255
+ button:disabled {
256
+ opacity: 0.6;
257
+ cursor: not-allowed;
258
+ }
259
+
260
+ /* Metrics */
261
+ .metric-card {
262
+ background: rgba(30, 41, 59, 0.4);
263
+ border: 1px solid rgba(255, 255, 255, 0.05);
264
+ border-radius: 16px;
265
+ padding: 24px;
266
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
267
+ display: flex;
268
+ flex-direction: column;
269
+ gap: 12px;
270
+ position: relative;
271
+ overflow: hidden;
272
+ }
273
+
274
+ .metric-card::after {
275
+ content: "";
276
+ position: absolute;
277
+ top: 0;
278
+ left: 0;
279
+ right: 0;
280
+ height: 100%;
281
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
282
+ opacity: 0;
283
+ transition: opacity 0.4s;
284
+ }
285
+
286
+ .metric-card:hover {
287
+ transform: translateY(-4px);
288
+ border-color: rgba(251, 191, 36, 0.3);
289
+ box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
290
+ }
291
+
292
+ .metric-card:hover::after {
293
+ opacity: 1;
294
+ }
295
+
296
+ .metric-label {
297
+ font-size: 0.875rem;
298
+ color: var(--slate-400);
299
+ font-weight: 500;
300
+ text-transform: uppercase;
301
+ letter-spacing: 0.05em;
302
+ }
303
+
304
+ .metric-value {
305
+ font-size: 2.25rem;
306
+ font-weight: 700;
307
+ color: var(--white);
308
+ font-family: 'Outfit', sans-serif;
309
+ letter-spacing: -0.02em;
310
+ background: linear-gradient(180deg, #fff 0%, #e2e8f0 100%);
311
+ -webkit-background-clip: text;
312
+ -webkit-text-fill-color: transparent;
313
+ }
314
+
315
+ /* Events List */
316
+ .event-list {
317
+ display: flex;
318
+ flex-direction: column;
319
+ gap: 16px;
320
+ }
321
+
322
+ .event-row {
323
+ background: rgba(30, 41, 59, 0.4);
324
+ border: 1px solid rgba(255, 255, 255, 0.05);
325
+ border-radius: 16px;
326
+ overflow: hidden;
327
+ transition: all var(--transition-medium);
328
+ animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
329
+ }
330
+
331
+ .event-row:hover {
332
+ border-color: rgba(251, 191, 36, 0.3);
333
+ box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.4);
334
+ background: rgba(30, 41, 59, 0.6);
335
+ transform: scale(1.005);
336
+ }
337
+
338
+ .event-summary {
339
+ padding: 20px 24px;
340
+ display: grid;
341
+ grid-template-columns: 80px 1fr auto;
342
+ gap: 20px;
343
+ align-items: center;
344
+ cursor: pointer;
345
+ user-select: none;
346
+ }
347
+
348
+ .event-main {
349
+ display: flex;
350
+ flex-direction: column;
351
+ gap: 6px;
352
+ }
353
+
354
+ .event-title {
355
+ font-weight: 600;
356
+ font-size: 1.05rem;
357
+ color: var(--slate-100);
358
+ }
359
+
360
+ .event-meta {
361
+ display: flex;
362
+ gap: 12px;
363
+ font-size: 0.875rem;
364
+ color: var(--slate-400);
365
+ }
366
+
367
+ .event-details {
368
+ background: rgba(0, 0, 0, 0.2);
369
+ padding: 24px;
370
+ border-top: 1px solid rgba(255, 255, 255, 0.05);
371
+ font-size: 0.9rem;
372
+ }
373
+
374
+ .detail-group {
375
+ margin-bottom: 16px;
376
+ }
377
+
378
+ .detail-label {
379
+ font-size: 0.7rem;
380
+ text-transform: uppercase;
381
+ letter-spacing: 0.1em;
382
+ color: var(--brand-300);
383
+ font-weight: 700;
384
+ margin-bottom: 8px;
385
+ }
386
+
387
+ /* Badges */
388
+ .badge {
389
+ display: inline-flex;
390
+ align-items: center;
391
+ justify-content: center;
392
+ padding: 6px 12px;
393
+ border-radius: 9999px;
394
+ font-size: 0.75rem;
395
+ font-weight: 700;
396
+ text-transform: uppercase;
397
+ letter-spacing: 0.05em;
398
+ backdrop-filter: blur(4px);
399
+ }
400
+
401
+ .badge.critical {
402
+ background: var(--critical-bg);
403
+ color: var(--critical-text);
404
+ border: 1px solid var(--critical-border);
405
+ box-shadow: 0 0 12px rgba(153, 27, 27, 0.2);
406
+ }
407
+
408
+ .badge.high {
409
+ background: var(--high-bg);
410
+ color: var(--high-text);
411
+ border: 1px solid var(--high-border);
412
+ }
413
+
414
+ .badge.medium {
415
+ background: var(--medium-bg);
416
+ color: var(--medium-text);
417
+ border: 1px solid var(--medium-border);
418
+ }
419
+
420
+ .badge.low {
421
+ background: var(--low-bg);
422
+ color: var(--low-text);
423
+ border: 1px solid var(--low-border);
424
+ }
425
+
426
+ /* Utilities */
427
+ .text-brand {
428
+ color: var(--brand-400);
429
+ filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
430
+ }
431
+
432
+ .animate-pulse {
433
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
434
+ }
435
+
436
+ /* Code Block */
437
+ .code-block {
438
+ background: #000;
439
+ color: #fbbf24;
440
+ padding: 16px;
441
+ border-radius: 12px;
442
+ font-size: 0.85rem;
443
+ overflow-x: auto;
444
+ margin: 0;
445
+ border: 1px solid rgba(251, 191, 36, 0.1);
446
+ }
447
+
448
+ /* Fallback/Empty States */
449
+ .empty-state {
450
+ text-align: center;
451
+ padding: 64px 0;
452
+ color: var(--text-secondary);
453
+ }
454
+
455
+ .panel-notice {
456
+ border-color: rgba(134, 239, 172, 0.5);
457
+ background: rgba(22, 101, 52, 0.18);
458
+ color: #bbf7d0;
459
+ }
460
+
461
+ /* Loading Skeleton */
462
+ .skeleton {
463
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
464
+ background-size: 200% 100%;
465
+ animation: shimmer 1.5s infinite;
466
+ border-radius: 6px;
467
+ }
468
+
469
+ /* Animations Keyframes */
470
+ @keyframes slideDown {
471
+ from {
472
+ opacity: 0;
473
+ transform: translateY(-20px);
474
+ }
475
+
476
+ to {
477
+ opacity: 1;
478
+ transform: translateY(0);
479
+ }
480
+ }
481
+
482
+ @keyframes slideUp {
483
+ from {
484
+ opacity: 0;
485
+ transform: translateY(20px);
486
+ }
487
+
488
+ to {
489
+ opacity: 1;
490
+ transform: translateY(0);
491
+ }
492
+ }
493
+
494
+ @keyframes pulse {
495
+
496
+ 0%,
497
+ 100% {
498
+ opacity: 1;
499
+ }
500
+
501
+ 50% {
502
+ opacity: .5;
503
+ }
504
+ }
505
+
506
+ @keyframes shimmer {
507
+ 0% {
508
+ background-position: 200% 0;
509
+ }
510
+
511
+ 100% {
512
+ background-position: -200% 0;
513
+ }
514
+ }
515
+
516
+ /* Scrollbar */
517
+ ::-webkit-scrollbar {
518
+ width: 10px;
519
+ height: 10px;
520
+ }
521
+
522
+ ::-webkit-scrollbar-track {
523
+ background: rgba(0, 0, 0, 0.1);
524
+ }
525
+
526
+ ::-webkit-scrollbar-thumb {
527
+ background: var(--slate-700);
528
+ border-radius: 5px;
529
+ border: 2px solid transparent;
530
+ background-clip: content-box;
531
+ }
532
+
533
+ ::-webkit-scrollbar-thumb:hover {
534
+ background-color: var(--slate-600);
535
+ }
@@ -174,3 +174,38 @@ async def update_event(
174
174
  continue
175
175
 
176
176
  return False
177
+
178
+
179
+ async def clear_events(storage_path: Optional[Path] = None) -> int:
180
+ """Delete all persisted attack events.
181
+
182
+ Args:
183
+ storage_path: Base directory for event storage
184
+
185
+ Returns:
186
+ Number of event JSON files deleted
187
+ """
188
+ storage_path = resolve_event_storage_path(storage_path)
189
+ if not storage_path.exists():
190
+ return 0
191
+
192
+ deleted_count = 0
193
+
194
+ for date_dir in storage_path.iterdir():
195
+ if not date_dir.is_dir():
196
+ continue
197
+
198
+ for json_file in date_dir.glob("*.json"):
199
+ try:
200
+ json_file.unlink()
201
+ deleted_count += 1
202
+ except Exception as e:
203
+ print(f"Warning: Failed to delete {json_file}: {e}")
204
+
205
+ try:
206
+ date_dir.rmdir()
207
+ except OSError:
208
+ # Keep directory when it still has non-event files/subdirs.
209
+ continue
210
+
211
+ return deleted_count