-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcp-interface.html
More file actions
3515 lines (3224 loc) · 200 KB
/
mcp-interface.html
File metadata and controls
3515 lines (3224 loc) · 200 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
Copyright (c) 2024 Jatin Kumar - All Rights Reserved
This software is proprietary and confidential. Unauthorized copying, distribution, or modification is strictly prohibited.
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MCP Server Interface</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.card-shadow {
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
</style>
</head>
<body class="min-h-screen bg-gradient-to-br from-gray-900 via-black to-gray-800">
<!-- Header -->
<div class="bg-gray-900 border-b border-blue-500 shadow-lg">
<div class="max-w-7xl mx-auto px-6 py-6">
<div class="flex items-center justify-center gap-4">
<div class="bg-gradient-to-br from-blue-500 to-purple-600 p-3 rounded-xl shadow-lg">
<svg class="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
</svg>
</div>
<div class="text-center">
<h1 class="text-3xl font-bold bg-gradient-to-r from-blue-400 to-purple-600 bg-clip-text text-transparent">
NEW MCP Server Interface
</h1>
<p class="text-gray-300 mt-1">Unified Model Context Protocol - Advanced Features</p>
<p class="text-xs text-gray-500 mt-2">© 2024 Jatin Kumar - All Rights Reserved</p>
</div>
</div>
</div>
</div>
<!-- Navigation Tabs -->
<div class="max-w-7xl mx-auto px-6 py-4">
<div class="flex space-x-1 bg-gray-800 rounded-lg p-1 border border-blue-500">
<button onclick="showTab('mcp-tools')" id="tab-mcp-tools" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all bg-blue-500 text-white shadow-lg">
<span>🔧</span>
<span class="font-medium">MCP Tools</span>
</button>
<button onclick="showTab('context')" id="tab-context" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>📝</span>
<span class="font-medium">Context</span>
</button>
<button onclick="showTab('files')" id="tab-files" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>📁</span>
<span class="font-medium">Files</span>
</button>
<button onclick="showTab('streaming')" id="tab-streaming" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>📡</span>
<span class="font-medium">Streaming</span>
</button>
<button onclick="showTab('monitoring')" id="tab-monitoring" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>📊</span>
<span class="font-medium">Monitoring</span>
</button>
<button onclick="showTab('automations')" id="tab-automations" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>🤖</span>
<span class="font-medium">Automations</span>
</button>
<button onclick="showTab('help')" id="tab-help" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>❓</span>
<span class="font-medium">Help</span>
</button>
<button onclick="showTab('admin')" id="tab-admin" class="flex-1 flex items-center justify-center gap-2 py-2 px-4 rounded-md transition-all text-gray-300 hover:text-white">
<span>🔐</span>
<span class="font-medium">Admin</span>
</button>
</div>
</div>
<!-- Main Content -->
<div class="max-w-7xl mx-auto px-6 pb-8">
<!-- MCP Tools Tab -->
<div id="content-mcp-tools" class="tab-content">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Tools List -->
<div class="lg:col-span-1">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 overflow-hidden">
<div class="bg-gradient-to-r from-indigo-500 to-purple-600 px-6 py-4">
<h2 class="text-xl font-bold text-white flex items-center gap-2">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
MCP Tools
</h2>
</div>
<div class="p-4 space-y-2" id="tools-list">
<div class="text-center py-8">
<div class="animate-spin w-8 h-8 border-4 border-indigo-500 border-t-transparent rounded-full mx-auto mb-4"></div>
<p class="text-gray-200">Loading tools...</p>
</div>
</div>
</div>
</div>
<!-- Tool Execution Panel -->
<div class="lg:col-span-2">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-12 text-center">
<div class="inline-block bg-indigo-100 p-6 rounded-full mb-4">
<svg class="w-16 h-16 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
</div>
<h3 class="text-2xl font-bold text-white mb-2">Select a Tool to Get Started</h3>
<p class="text-gray-200">Choose a tool from the left panel to execute MCP operations</p>
</div>
</div>
</div>
</div>
<!-- Context Tab -->
<div id="content-context" class="tab-content hidden">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6">Context Management</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">Current Context</h3>
<div class="bg-gray-700 rounded-lg p-4 max-h-64 overflow-y-auto">
<pre class="text-sm text-gray-200" id="context-display">Loading context...</pre>
</div>
</div>
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">Context Operations</h3>
<div class="space-y-3">
<button onclick="addContextItem()" class="w-full bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition-colors">
Add Context Item
</button>
<button onclick="updateContext()" class="w-full bg-green-500 text-white py-2 px-4 rounded-lg hover:bg-green-600 transition-colors">
Update Context
</button>
<button onclick="clearContext()" class="w-full bg-red-500 text-white py-2 px-4 rounded-lg hover:bg-red-600 transition-colors">
Clear Context
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Files Tab -->
<div id="content-files" class="tab-content hidden">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6">File Management</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">Upload Files</h3>
<div id="drop-zone" class="border-2 border-dashed border-indigo-400 rounded-lg p-8 text-center cursor-pointer hover:border-indigo-500 hover:bg-indigo-900/30 transition-all bg-gray-800"
ondrop="handleDrop(event)" ondragover="handleDragOver(event)" ondragleave="handleDragLeave(event)" onclick="document.getElementById('file-input').click()">
<input type="file" id="file-input" class="hidden" accept=".jpg,.jpeg,.png,.json,.py,.md,.txt,.csv,.xlsx" multiple onchange="handleFileSelect(event)">
<svg class="w-12 h-12 text-indigo-400 mx-auto mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
</svg>
<p class="text-indigo-600 font-semibold mb-2">Click to browse or drag & drop files</p>
<p class="text-sm text-gray-400">Supported: JPG, PNG, JSON, PY, MD, TXT, CSV, XLSX</p>
</div>
<div id="upload-progress" class="mt-4 hidden">
<div class="bg-indigo-100 rounded-lg p-3">
<div class="flex items-center gap-2">
<div class="animate-spin w-5 h-5 border-3 border-indigo-500 border-t-transparent rounded-full"></div>
<span class="text-indigo-700 font-medium">Uploading...</span>
</div>
</div>
</div>
</div>
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">File List</h3>
<div class="bg-gray-700 rounded-lg p-4 max-h-64 overflow-y-auto" id="files-list">
<p class="text-gray-400 text-center">Loading files...</p>
</div>
</div>
</div>
</div>
</div>
<!-- Streaming Tab -->
<div id="content-streaming" class="tab-content hidden">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6">Real-time Streaming</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">Stream Controls</h3>
<div class="space-y-3">
<button onclick="toggleStreaming()" id="stream-button" class="w-full bg-green-500 text-white py-2 px-4 rounded-lg hover:bg-green-600 transition-colors">
Start Streaming
</button>
<div class="flex items-center gap-2">
<div id="stream-indicator" class="w-3 h-3 rounded-full bg-gray-400"></div>
<span class="text-sm text-gray-200" id="stream-status">Streaming Inactive</span>
</div>
</div>
</div>
<div>
<h3 class="text-lg font-semibold text-gray-300 mb-4">Stream Events</h3>
<div class="bg-gray-700 rounded-lg p-4 max-h-64 overflow-y-auto" id="stream-events">
<div class="space-y-2">
<div class="text-sm text-gray-200">System initialized</div>
<div class="text-sm text-gray-200">Ready for streaming</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Monitoring Tab -->
<div id="content-monitoring" class="tab-content hidden">
<div class="space-y-6">
<!-- Server Status -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6">Server Status</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6" id="server-status">
<div class="text-center py-8">
<div class="animate-spin w-8 h-8 border-4 border-indigo-500 border-t-transparent rounded-full mx-auto mb-4"></div>
<p class="text-gray-200">Loading server status...</p>
</div>
</div>
</div>
<!-- System Metrics -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6">System Metrics</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6" id="system-metrics">
<div class="text-center py-8">
<div class="animate-spin w-8 h-8 border-4 border-indigo-500 border-t-transparent rounded-full mx-auto mb-4"></div>
<p class="text-gray-200">Loading metrics...</p>
</div>
</div>
</div>
</div>
</div>
<!-- Automations Tab -->
<div id="content-automations" class="tab-content hidden">
<div class="space-y-6">
<!-- Automations Header -->
<div class="bg-gradient-to-r from-indigo-500 to-purple-600 rounded-2xl shadow-lg p-6 text-white">
<div class="flex items-center gap-4">
<span class="text-5xl">🤖</span>
<div>
<h2 class="text-3xl font-bold">Automation Hub</h2>
<p class="text-indigo-100 mt-1">Integrated Automation Tools & Workflows</p>
</div>
</div>
</div>
<!-- Automation Blocks Grid -->
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- META-MINDS Analytics Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-purple-200 hover:border-purple-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('meta-minds')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-purple-500 to-pink-600 p-3 rounded-xl">
<span class="text-3xl">🧠</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">META-MINDS</h3>
<p class="text-xs text-purple-600">Data Analytics</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">AI-powered SMART question generation with 97%+ quality scores</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-purple-100 text-purple-700 px-2 py-1 rounded">Analytics</span>
<span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded">Active</span>
</div>
</div>
<!-- PROJECT STRATEGIST Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-orange-200 hover:border-orange-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('project-strategist')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-orange-500 to-red-600 p-3 rounded-xl">
<span class="text-3xl">📋</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">PROJECT STRATEGIST</h3>
<p class="text-xs text-orange-600">Project Management</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Scope of work, project proposals, pace strategy and planning documents</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded">Strategy</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- SAMPLE SELECTOR Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-cyan-200 hover:border-cyan-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('sample-selector')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-cyan-500 to-blue-600 p-3 rounded-xl">
<span class="text-3xl">🎯</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">SAMPLE SELECTOR</h3>
<p class="text-xs text-cyan-600">Data Sampling</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Intelligent sample selection for statistical analysis and research</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-cyan-100 text-cyan-700 px-2 py-1 rounded">Sampling</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- DATA QUALITY VALIDATOR Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-red-200 hover:border-red-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('data-quality-validator')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-red-500 to-pink-600 p-3 rounded-xl">
<span class="text-3xl">🔍</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">DATA QUALITY VALIDATOR</h3>
<p class="text-xs text-red-600">Quality Assurance</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Comprehensive dataset quality checking and validation</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-red-100 text-red-700 px-2 py-1 rounded">Quality</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- SURFACE EXPLORER Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-teal-200 hover:border-teal-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('surface-explorer')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-teal-500 to-green-600 p-3 rounded-xl">
<span class="text-3xl">🔬</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">SURFACE EXPLORER</h3>
<p class="text-xs text-teal-600">Data Exploration</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Basic data exploration and preliminary analysis tools</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-teal-100 text-teal-700 px-2 py-1 rounded">Exploration</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- CENTRAL ORCHESTRATOR Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-indigo-200 hover:border-indigo-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('central-orchestrator')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-indigo-500 to-purple-600 p-3 rounded-xl">
<span class="text-3xl">🎼</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">CENTRAL ORCHESTRATOR</h3>
<p class="text-xs text-indigo-600">Workflow Management</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Centralized workflow orchestration and task management</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-indigo-100 text-indigo-700 px-2 py-1 rounded">Orchestration</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- WORKFLOW ENGINE Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-green-200 hover:border-green-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('workflow-engine')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-green-500 to-teal-600 p-3 rounded-xl">
<span class="text-3xl">⚡</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">WORKFLOW ENGINE</h3>
<p class="text-xs text-green-600">Process Automation</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Advanced workflow automation and process management</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded">Workflow</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
<!-- SHARED KNOWLEDGE BASE Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-yellow-200 hover:border-yellow-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('shared-knowledge-base')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-yellow-500 to-orange-600 p-3 rounded-xl">
<span class="text-3xl">📚</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">SHARED KNOWLEDGE BASE</h3>
<p class="text-xs text-yellow-600">Knowledge Management</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Centralized file repository for all automations - Input & Output management</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Knowledge</span>
<span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded">Active</span>
</div>
</div>
<!-- HUMAN INTERVENTION SYSTEM Block -->
<div class="bg-gray-800 rounded-2xl shadow-lg border-2 border-pink-200 hover:border-pink-400 transition-all cursor-pointer p-6 hover:shadow-xl" onclick="showAutomation('human-intervention-system')">
<div class="flex items-center gap-3 mb-4">
<div class="bg-gradient-to-br from-pink-500 to-rose-600 p-3 rounded-xl">
<span class="text-3xl">👥</span>
</div>
<div>
<h3 class="text-lg font-bold text-white">HUMAN INTERVENTION SYSTEM</h3>
<p class="text-xs text-pink-600">Human-in-the-Loop</p>
</div>
</div>
<p class="text-sm text-gray-200 mb-3">Human-in-the-loop automation and decision support</p>
<div class="flex gap-2 flex-wrap">
<span class="text-xs bg-pink-100 text-pink-700 px-2 py-1 rounded">Human-AI</span>
<span class="text-xs bg-yellow-100 text-yellow-700 px-2 py-1 rounded">Coming Soon</span>
</div>
</div>
</div>
</div>
<!-- Selected Automation Panel -->
<div id="automation-panel" class="hidden"></div>
<!-- META-MINDS Configuration (Initially Hidden) -->
<div id="meta-minds-config" class="hidden">
<!-- Step 1: Number of Datasets -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">1</span>
Number of Datasets
</h3>
<div class="max-w-md">
<label class="block text-sm font-medium text-gray-300 mb-2">How many datasets do you want to analyze?</label>
<input type="number" id="num-datasets" value="1" min="1" max="10" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none" onchange="updateDatasetSelection()">
<p class="text-xs text-gray-400 mt-1">Choose 1-10 datasets for analysis</p>
</div>
</div>
<!-- Step 2: Dataset Selection (Dynamic) -->
<div id="dataset-selection-container" class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">2</span>
Dataset Selection
</h3>
<div id="dataset-selection-grid" class="grid md:grid-cols-2 gap-4">
<!-- Dynamic dataset selection will be generated here -->
</div>
</div>
<!-- Step 3: Business Background -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">3</span>
Business Background Information
</h3>
<div class="grid md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Project Title
<span class="text-xs text-gray-400">(Optional - will auto-fill from business_background.txt if available)</span>
</label>
<div class="flex gap-2">
<input type="text" id="project-title" placeholder="e.g., Airline Financial Performance Risk Assessment" class="flex-1 px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<button onclick="fetchFromKnowledgeBase('business_background.txt', 'project-title')" class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-3 rounded-lg transition-colors" title="Fetch from Shared Knowledge Base">
📚
</button>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Industry/Business Context
<span class="text-xs text-gray-400">(Optional - will auto-fill from business_background.txt if available)</span>
</label>
<div class="flex gap-2">
<input type="text" id="industry-context" placeholder="e.g., Aviation/Airline Industry" class="flex-1 px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<button onclick="fetchFromKnowledgeBase('business_background.txt', 'industry-context')" class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-3 rounded-lg transition-colors" title="Fetch from Shared Knowledge Base">
📚
</button>
</div>
</div>
<div class="md:col-span-2">
<label class="block text-sm font-medium text-gray-300 mb-2">
Analysis Objectives
<span class="text-xs text-gray-400">(Optional - will auto-fill from business_background.txt if available)</span>
</label>
<div class="flex gap-2">
<textarea id="analysis-objectives" rows="3" placeholder="e.g., Risk assessment, performance evaluation, trend forecasting" class="flex-1 px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none"></textarea>
<button onclick="fetchFromKnowledgeBase('business_background.txt', 'analysis-objectives')" class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-3 rounded-lg transition-colors self-start" title="Fetch from Shared Knowledge Base">
📚
</button>
</div>
</div>
</div>
</div>
<!-- Step 4: Dataset Background -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">4</span>
Dataset Background & Context
</h3>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Dataset Description
<span class="text-xs text-gray-400">(Optional - will auto-fill from dataset_background.txt if available)</span>
</label>
<div class="flex gap-2">
<textarea id="dataset-description" rows="3" placeholder="Describe the dataset, its source, time period, key variables..." class="flex-1 px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none"></textarea>
<button onclick="fetchFromKnowledgeBase('dataset_background.txt', 'dataset-description')" class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-3 rounded-lg transition-colors self-start" title="Fetch from Shared Knowledge Base">
📚
</button>
</div>
</div>
<div class="grid md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Data Time Period
<span class="text-xs text-gray-400">(Optional)</span>
</label>
<input type="text" id="time-period" placeholder="e.g., 2020-2024, Q1-Q4 2024" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Key Variables/Metrics
<span class="text-xs text-gray-400">(Optional)</span>
</label>
<input type="text" id="key-variables" placeholder="e.g., Revenue, Assets, Liabilities" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
</div>
</div>
</div>
</div>
<!-- Step 5: Stakeholder Message -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">5</span>
Senior Stakeholder Instructions (Optional)
</h3>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">
Special Instructions or Focus Areas
<span class="text-xs text-gray-400">(Optional - will auto-fill from senior_instructions.txt if available)</span>
</label>
<div class="flex gap-2">
<textarea id="stakeholder-message" rows="4" placeholder="Any specific instructions from senior stakeholders, special focus areas, or particular aspects to emphasize..." class="flex-1 px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none"></textarea>
<button onclick="fetchFromKnowledgeBase('senior_instructions.txt', 'stakeholder-message')" class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-3 rounded-lg transition-colors self-start" title="Fetch from Shared Knowledge Base">
📚
</button>
</div>
</div>
</div>
<!-- Step 6: Analysis Configuration -->
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h3 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<span class="bg-purple-100 text-purple-700 w-8 h-8 rounded-full flex items-center justify-center font-bold">6</span>
Analysis Configuration & Settings
</h3>
<div class="grid md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Business Context</label>
<select id="business-context" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<option value="Financial Analysis">💰 Financial Analysis</option>
<option value="Sales Analytics">📈 Sales Analytics</option>
<option value="Marketing Analytics">📣 Marketing Analytics</option>
<option value="Operations">⚙️ Operations</option>
<option value="Human Resources">👥 HR Analytics</option>
<option value="Customer Analytics">🎯 Customer Analytics</option>
<option value="Product Analytics">📦 Product Analytics</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Analysis Focus</label>
<select id="analysis-focus" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<option value="Performance evaluation">📊 Performance Evaluation</option>
<option value="Risk assessment">⚠️ Risk Assessment</option>
<option value="Trend analysis">📉 Trend Analysis</option>
<option value="Forecasting">🔮 Forecasting</option>
<option value="Optimization">🎯 Optimization</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Target Audience</label>
<select id="target-audience" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<option value="Executives">👔 Executives</option>
<option value="Managers">📋 Managers</option>
<option value="Analysts">🔬 Analysts</option>
<option value="Stakeholders">🤝 Stakeholders</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Individual Dataset Questions</label>
<input type="number" id="num-questions" value="15" min="5" max="30" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<p class="text-xs text-gray-400 mt-1">Questions for each dataset separately</p>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Cross-Dataset Questions (Optional)</label>
<input type="number" id="num-cross-questions" value="5" min="0" max="20" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 outline-none">
<p class="text-xs text-gray-400 mt-1">Questions comparing datasets (only if multiple datasets)</p>
</div>
</div>
<button onclick="runMetaMindsAnalysis()" class="w-full mt-6 bg-gradient-to-r from-indigo-500 to-purple-600 text-white font-semibold py-4 px-6 rounded-xl hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-4 focus:ring-indigo-300 transition-all duration-200 shadow-lg hover:shadow-xl flex items-center justify-center gap-2">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" />
</svg>
<span>🧠 Run META-MINDS Analysis</span>
</button>
</div>
<!-- Analysis Results -->
<div id="analytics-results" class="hidden">
<!-- Results will be dynamically inserted here -->
</div>
</div>
</div>
</div>
<!-- Admin Tab -->
<div id="content-admin" class="tab-content hidden">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-6">
<h2 class="text-2xl font-bold text-white mb-6 flex items-center gap-3">
<span class="bg-red-500 p-2 rounded-lg">🔐</span>
Admin Panel - User Access Management
</h2>
<!-- Authentication Section -->
<div id="admin-auth-section" class="mb-8">
<div class="bg-red-900/30 border border-red-500 rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">🔐 Admin Authentication</h3>
<p class="text-gray-300 mb-4">Enter admin credentials to access user management features</p>
<div class="grid md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Admin Username</label>
<input type="text" id="admin-username" placeholder="Enter admin username" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-red-500 focus:ring-2 focus:ring-red-200 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Admin Password</label>
<div class="relative">
<input type="password" id="admin-password" placeholder="Enter admin password" class="w-full px-4 py-3 pr-12 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-red-500 focus:ring-2 focus:ring-red-200 outline-none">
<button type="button" onclick="togglePasswordVisibility('admin-password', 'password-toggle')" id="password-toggle" class="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
</svg>
</button>
</div>
</div>
</div>
<div class="flex gap-3 mt-4">
<button onclick="authenticateAdmin()" class="bg-red-500 hover:bg-red-600 text-white px-6 py-3 rounded-lg transition-colors">
🔐 Authenticate
</button>
<button onclick="resetAdminAuth()" class="bg-gray-500 hover:bg-gray-600 text-white px-6 py-3 rounded-lg transition-colors">
🔄 Reset
</button>
</div>
<!-- Security Status for Authenticated Users -->
<div id="security-status" class="hidden mt-4 p-4 bg-blue-900/30 border border-blue-500 rounded-lg">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="bg-green-500 p-2 rounded">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
<div>
<p class="text-white font-medium" id="current-user-info">Logged in as: admin</p>
<p class="text-sm text-gray-400">🔄 Auto-validation: Every 5 minutes</p>
<p class="text-xs text-gray-500">🛡️ Admin protection: Always active</p>
</div>
</div>
<button onclick="validateCurrentUser()" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors text-sm">
🔍 Check Security
</button>
</div>
</div>
</div>
</div>
<!-- Admin Dashboard (Hidden until authenticated) -->
<div id="admin-dashboard" class="hidden">
<!-- User Management Section -->
<div class="mb-8">
<div class="bg-blue-900/30 border border-blue-500 rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">👥 User Management</h3>
<!-- Add New User -->
<div class="mb-6">
<h4 class="text-lg font-semibold text-white mb-3">Add New User</h4>
<div class="grid md:grid-cols-3 gap-4">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Username</label>
<input type="text" id="new-username" placeholder="Enter username" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Email</label>
<input type="email" id="new-email" placeholder="Enter email" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Role</label>
<select id="new-role" onchange="toggleCustomRoleInput()" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none">
<option value="user">👤 User</option>
<option value="analyst">📊 Analyst</option>
<option value="manager">👔 Manager</option>
<option value="guest">👻 Guest</option>
<option value="other">🔧 Other</option>
<option value="admin">🔐 Admin</option>
</select>
<!-- Custom Role Input for Add User -->
<div id="new-custom-role-input" class="hidden mt-3">
<label class="block text-sm font-medium text-gray-300 mb-2">Custom Role Name:</label>
<input type="text" id="new-custom-role-name" placeholder="Enter custom role name" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none">
</div>
</div>
</div>
<button onclick="addUser()" class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-3 rounded-lg transition-colors mt-4">
➕ Add User
</button>
</div>
<!-- User List -->
<div>
<h4 class="text-lg font-semibold text-white mb-3">Current Users</h4>
<div id="users-list" class="space-y-2 max-h-64 overflow-y-auto">
<p class="text-gray-400 text-center py-4">Loading users...</p>
</div>
</div>
</div>
</div>
<!-- Access Control Section -->
<div class="mb-8">
<div class="bg-green-900/30 border border-green-500 rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">🔑 Role-Based Access Control</h3>
<p class="text-gray-300 mb-6">Configure permissions for different user roles</p>
<!-- Role Selection -->
<div class="mb-6">
<label class="block text-sm font-medium text-gray-300 mb-3">Select Role to Configure:</label>
<select id="role-selector" onchange="loadRolePermissions()" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white focus:border-green-500 focus:ring-2 focus:ring-green-200 outline-none">
<option value="user">👤 User Role</option>
<option value="analyst">📊 Analyst Role</option>
<option value="manager">👔 Manager Role</option>
<option value="guest">👻 Guest Role</option>
<option value="other">🔧 Other Role</option>
<option value="admin">🔐 Admin Role</option>
</select>
<!-- Custom Role Input (shown when "Other" is selected) -->
<div id="custom-role-input" class="hidden mt-4">
<label class="block text-sm font-medium text-gray-300 mb-2">Custom Role Name:</label>
<input type="text" id="custom-role-name" placeholder="Enter custom role name (e.g., 'supervisor', 'editor')" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white placeholder-gray-400 focus:border-green-500 focus:ring-2 focus:ring-green-200 outline-none">
</div>
</div>
<!-- Role Permissions -->
<div id="role-permissions" class="grid md:grid-cols-2 gap-6">
<div>
<h4 class="text-lg font-semibold text-white mb-3">Feature Access</h4>
<div class="space-y-3">
<label class="flex items-center gap-3">
<input type="checkbox" id="role-mcp-tools" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">MCP Tools Access</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-automations" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">Automations Access</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-files" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">File Management Access</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-monitoring" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">Monitoring Access</span>
</label>
</div>
</div>
<div>
<h4 class="text-lg font-semibold text-white mb-3">User Permissions</h4>
<div class="space-y-3">
<label class="flex items-center gap-3">
<input type="checkbox" id="role-upload" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">File Upload</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-download" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">File Download</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-delete" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">File Delete</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="role-admin" class="w-4 h-4 text-green-500 bg-gray-700 border-gray-500 rounded focus:ring-green-500">
<span class="text-white">Admin Access</span>
</label>
</div>
</div>
</div>
<div class="flex gap-3 mt-6">
<button onclick="saveRolePermissions()" class="bg-green-500 hover:bg-green-600 text-white px-6 py-3 rounded-lg transition-colors">
💾 Save Role Permissions
</button>
<button onclick="resetRolePermissions()" class="bg-gray-500 hover:bg-gray-600 text-white px-6 py-3 rounded-lg transition-colors">
🔄 Reset to Default
</button>
</div>
</div>
</div>
<!-- System Settings -->
<div class="mb-6">
<div class="bg-purple-900/30 border border-purple-500 rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">⚙️ System Settings</h3>
<div class="grid md:grid-cols-2 gap-6">
<div>
<h4 class="text-lg font-semibold text-white mb-3">Server Configuration</h4>
<div class="space-y-3">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Max File Size (MB)</label>
<input type="number" id="max-file-size" value="100" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white focus:border-purple-500 focus:ring-2 focus:ring-purple-200 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Session Timeout (minutes)</label>
<input type="number" id="session-timeout" value="60" class="w-full px-4 py-3 rounded-lg bg-gray-700 border border-gray-500 text-white focus:border-purple-500 focus:ring-2 focus:ring-purple-200 outline-none">
</div>
</div>
</div>
<div>
<h4 class="text-lg font-semibold text-white mb-3">Security Settings</h4>
<div class="space-y-3">
<label class="flex items-center gap-3">
<input type="checkbox" id="require-auth" class="w-4 h-4 text-purple-500 bg-gray-700 border-gray-500 rounded focus:ring-purple-500" checked>
<span class="text-white">Require Authentication</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="enable-logging" class="w-4 h-4 text-purple-500 bg-gray-700 border-gray-500 rounded focus:ring-purple-500" checked>
<span class="text-white">Enable Activity Logging</span>
</label>
<label class="flex items-center gap-3">
<input type="checkbox" id="enable-backup" class="w-4 h-4 text-purple-500 bg-gray-700 border-gray-500 rounded focus:ring-purple-500">
<span class="text-white">Auto Backup</span>
</label>
</div>
</div>
</div>
<button onclick="saveSystemSettings()" class="bg-purple-500 hover:bg-purple-600 text-white px-6 py-3 rounded-lg transition-colors mt-4">
⚙️ Save Configuration
</button>
</div>
</div>
<!-- Admin Actions -->
<div class="flex gap-3">
<button onclick="exportUserData()" class="bg-yellow-500 hover:bg-yellow-600 text-white px-6 py-3 rounded-lg transition-colors">
📊 Export User Data
</button>
<button onclick="clearAllSessions()" class="bg-orange-500 hover:bg-orange-600 text-white px-6 py-3 rounded-lg transition-colors">
🚪 Clear All Sessions
</button>
<button onclick="logoutAdmin()" class="bg-red-500 hover:bg-red-600 text-white px-6 py-3 rounded-lg transition-colors">
🚪 Logout Admin
</button>
</div>
</div>
</div>
</div>
<!-- Help Tab -->
<div id="content-help" class="tab-content hidden">
<div class="bg-gray-800 rounded-2xl shadow-lg border border-gray-200 p-8">
<h1 class="text-3xl font-bold text-white mb-6 flex items-center gap-3">
<span class="text-4xl">📚</span>
MCP Server User Guide
</h1>
<!-- Quick Start -->
<div class="mb-8 bg-gradient-to-r from-indigo-50 to-purple-50 rounded-xl p-6 border border-indigo-200">
<h2 class="text-2xl font-bold text-indigo-800 mb-4">🚀 Quick Start</h2>
<div class="space-y-3 text-gray-300">
<p><strong>1. MCP Tools:</strong> Execute file operations (read, write, list, search)</p>
<p><strong>2. Context:</strong> Manage conversation state and preferences</p>
<p><strong>3. Files:</strong> Upload and manage documents</p>
<p><strong>4. Streaming:</strong> Monitor real-time events</p>
<p><strong>5. Monitoring:</strong> Check server health and performance</p>
</div>
</div>
<!-- MCP Tools Section -->
<div class="mb-8">
<h2 class="text-2xl font-bold text-white mb-4 flex items-center gap-2">
<span>🔧</span> MCP Tools - File Operations
</h2>
<div class="grid md:grid-cols-2 gap-4">
<div class="bg-blue-50 rounded-lg p-4 border border-blue-200">
<h3 class="font-bold text-blue-800 mb-2">📄 read_file</h3>
<p class="text-sm text-gray-300 mb-2">Read contents from any file</p>
<p class="text-xs text-gray-200"><strong>Use:</strong> Let AI read documents, code, configs</p>
<p class="text-xs text-gray-200"><strong>Param:</strong> file_path</p>
</div>
<div class="bg-green-50 rounded-lg p-4 border border-green-200">
<h3 class="font-bold text-green-800 mb-2">✍️ write_file</h3>
<p class="text-sm text-gray-300 mb-2">Create or update files</p>
<p class="text-xs text-gray-200"><strong>Use:</strong> AI generates code, creates documents</p>
<p class="text-xs text-gray-200"><strong>Params:</strong> file_path, content</p>
</div>
<div class="bg-purple-50 rounded-lg p-4 border border-purple-200">
<h3 class="font-bold text-purple-800 mb-2">📁 list_directory</h3>
<p class="text-sm text-gray-300 mb-2">List files in a directory</p>
<p class="text-xs text-gray-200"><strong>Use:</strong> Browse file structure, explore projects</p>
<p class="text-xs text-gray-200"><strong>Param:</strong> directory_path</p>
</div>
<div class="bg-orange-50 rounded-lg p-4 border border-orange-200">
<h3 class="font-bold text-orange-800 mb-2">🔍 search_files</h3>
<p class="text-sm text-gray-300 mb-2">Find files matching pattern</p>
<p class="text-xs text-gray-200"><strong>Use:</strong> Search for specific files</p>
<p class="text-xs text-gray-200"><strong>Params:</strong> directory_path, pattern</p>
</div>
</div>
</div>
<!-- Context Management -->
<div class="mb-8">
<h2 class="text-2xl font-bold text-white mb-4 flex items-center gap-2">
<span>📝</span> Context Management
</h2>
<div class="bg-yellow-50 rounded-lg p-4 border border-yellow-200">
<p class="text-gray-300 mb-3">Store and manage conversation state, user preferences, and session data.</p>
<ul class="list-disc list-inside space-y-2 text-sm text-gray-300">
<li><strong>Add Context:</strong> Store new information for AI to remember</li>
<li><strong>Update Context:</strong> Modify existing context items</li>
<li><strong>Clear Context:</strong> Remove all stored context</li>
<li><strong>View Context:</strong> See current stored data in JSON format</li>
</ul>
</div>
</div>
<!-- File Management -->
<div class="mb-8">
<h2 class="text-2xl font-bold text-white mb-4 flex items-center gap-2">
<span>📁</span> File Management
</h2>
<div class="bg-pink-50 rounded-lg p-4 border border-pink-200">
<p class="text-gray-300 mb-3">Complete file lifecycle management with versioning and metadata.</p>
<ul class="list-disc list-inside space-y-2 text-sm text-gray-300">
<li><strong>Upload:</strong> Drag and drop files or click to browse</li>
<li><strong>Download:</strong> Retrieve uploaded files</li>
<li><strong>Delete:</strong> Remove files from storage</li>
<li><strong>Versioning:</strong> Track file history and changes</li>
<li><strong>Metadata:</strong> Automatic file information extraction</li>
</ul>
</div>
</div>
<!-- Real-time Streaming -->
<div class="mb-8">
<h2 class="text-2xl font-bold text-white mb-4 flex items-center gap-2">
<span>📡</span> Real-time Streaming
</h2>
<div class="bg-cyan-50 rounded-lg p-4 border border-cyan-200">
<p class="text-gray-300 mb-3">Monitor live events and system activity in real-time.</p>
<ul class="list-disc list-inside space-y-2 text-sm text-gray-300">
<li><strong>Start Streaming:</strong> Begin receiving live events</li>
<li><strong>Stop Streaming:</strong> Pause event stream</li>
<li><strong>Event Types:</strong> Context updates, file operations, tool execution</li>
<li><strong>Live Log:</strong> See events as they happen</li>
</ul>
</div>
</div>
<!-- Monitoring -->
<div class="mb-8">
<h2 class="text-2xl font-bold text-white mb-4 flex items-center gap-2">
<span>📊</span> Server Monitoring
</h2>
<div class="grid md:grid-cols-2 gap-4">
<div class="bg-green-50 rounded-lg p-4 border border-green-200">
<h3 class="font-bold text-green-800 mb-2">Server Status</h3>
<ul class="text-sm text-gray-300 space-y-1">
<li>✅ Health status</li>
<li>⏱️ Server uptime</li>
<li>🏷️ Version info</li>
</ul>