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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>VIGILANTE DA DOBRA - Matrix Security Console 4.0</title>
    <style>
        :root {
            --matrix-green: #00FF41;
            --matrix-dark: #003B00;
            --aoi-purple: #8A2BE2;
            --bg-black: #0D0208;
            --alert-red: #FF0000;
            --ftp-blue: #00BFFF;
        }

        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg-black);
            color: var(--matrix-green);
            font-family: 'Courier New', Courier, monospace;
            overflow: hidden;
        }

        #ui-layer {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: 320px 1fr 300px;
            grid-template-rows: 60px 1fr 180px;
            height: 100vh;
            gap: 10px;
            padding: 10px;
            box-sizing: border-box;
            background: rgba(13, 2, 8, 0.9);
            backdrop-filter: blur(4px);
        }

        header {
            grid-column: 1 / span 3;
            border: 1px solid var(--matrix-green);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            background: rgba(0, 59, 0, 0.3);
            box-shadow: 0 0 15px var(--matrix-green);
            border-radius: 4px;
        }

        .title {
            font-size: 1.6rem;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 3px;
            color: var(--matrix-green);
            text-shadow: 0 0 8px var(--matrix-green), 0 0 12px var(--aoi-purple);
        }

        aside.left-panel {
            grid-column: 1;
            border: 1px solid var(--matrix-green);
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            overflow-y: auto;
            background: rgba(0, 20, 0, 0.4);
            border-radius: 4px;
        }

        main {
            grid-column: 2;
            border: 1px solid var(--matrix-green);
            padding: 15px;
            overflow-y: auto;
            position: relative;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 4px;
        }

        aside.right-panel {
            grid-column: 3;
            border: 1px solid var(--matrix-green);
            display: flex;
            flex-direction: column;
            background: rgba(0, 5, 0, 0.8);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .matrix-card-header {
            background: var(--matrix-dark);
            color: var(--matrix-green);
            padding: 5px 10px;
            font-size: 0.8rem;
            font-weight: bold;
            border-bottom: 1px solid var(--matrix-green);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        #matrix-container {
            flex-grow: 1;
            position: relative;
            background: black;
        }

        #matrix-canvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        footer {
            grid-column: 1 / span 3;
            border: 1px solid var(--matrix-green);
            padding: 10px;
            font-size: 0.9rem;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.9);
            border-radius: 4px;
            display: flex;
            flex-direction: column;
        }

        .status-box {
            border: 1px solid var(--aoi-purple);
            padding: 12px;
            background: rgba(138, 43, 226, 0.05);
            border-radius: 4px;
        }

        .status-item {
            display: flex;
            justify-content: space-between;
            margin: 6px 0;
            font-size: 0.85rem;
        }

        .label { color: var(--aoi-purple); font-weight: bold; }
        .value { color: var(--matrix-green); }
        .value-ftp { color: var(--ftp-blue); }

        .log-entry {
            margin: 4px 0;
            border-left: 3px solid var(--matrix-green);
            padding-left: 12px;
            animation: fadeIn 0.4s ease-out;
            font-size: 0.9rem;
        }

        .log-alert {
            border-left: 3px solid var(--alert-red);
            color: var(--alert-red);
            text-shadow: 0 0 5px var(--alert-red);
        }

        .log-extract {
            border-left: 3px solid var(--aoi-purple);
            color: #d8bfd8;
        }

        .log-ftp {
            border-left: 3px solid var(--ftp-blue);
            color: var(--ftp-blue);
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateX(-20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .btn {
            background: rgba(0, 59, 0, 0.5);
            color: var(--matrix-green);
            border: 1px solid var(--matrix-green);
            padding: 8px 12px;
            cursor: pointer;
            text-transform: uppercase;
            font-size: 0.85rem;
            font-weight: bold;
            transition: all 0.3s;
            border-radius: 2px;
        }

        .btn:hover {
            background: var(--matrix-green);
            color: var(--bg-black);
            box-shadow: 0 0 10px var(--matrix-green);
        }

        .btn-alert {
            border-color: var(--alert-red);
            color: var(--alert-red);
        }

        .btn-alert:hover {
            background: var(--alert-red);
            color: white;
            box-shadow: 0 0 10px var(--alert-red);
        }

        .terminal-input-container {
            display: flex;
            align-items: center;
            margin-top: 5px;
        }

        .prompt { color: var(--matrix-green); margin-right: 10px; font-weight: bold; }

        .terminal-input {
            flex-grow: 1;
            background: transparent;
            border: none;
            color: var(--matrix-green);
            font-family: inherit;
            outline: none;
            font-size: 1rem;
        }

        .blink { animation: blinker 0.8s linear infinite; }
        @keyframes blinker { 50% { opacity: 0; } }

        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: var(--bg-black); }
        ::-webkit-scrollbar-thumb { background: var(--matrix-dark); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--matrix-green); }
    </style>
</head>
<body>
    <div id="ui-layer">
        <header>
            <div class="title">MATRIX 4.0 SECURITY MASTER <span class="blink">_</span></div>
            <div>
                SANTUÁRIO: <span id="santuario-status" style="color:var(--matrix-green)">ONLINE</span> | 
                NEXUS: <span id="nexus-status" class="value">STABLE</span> |
                ÂNCORA: <span style="color:var(--aoi-purple)">i=1, q=1, n=-2</span>
            </div>
        </header>

        <aside class="left-panel">
            <div class="status-box">
                <div class="label" style="text-align: center; font-size: 1rem; margin-bottom: 5px;">SECURITY ENGINE</div>
                <hr style="border-color: var(--aoi-purple); margin: 5px 0 10px 0;">
                <div class="status-item"><span>Protocol:</span> <span class="value">KAIZEN V2.8</span></div>
                <div class="status-item"><span>Threats:</span> <span id="threat-count" class="value">0</span></div>
                <div class="status-item"><span>Bans:</span> <span id="block-count" class="value">0</span></div>
                <div class="status-item"><span>Entropy:</span> <span id="entropy-level" class="value">0.42</span></div>
            </div>

            <div class="status-box">
                <div class="label" style="text-align: center; font-size: 1rem; margin-bottom: 5px;">FTP MOTOR (SOUSATO)</div>
                <hr style="border-color: var(--ftp-blue); margin: 5px 0 10px 0;">
                <div class="status-item"><span>Host:</span> <span class="value-ftp">ftp.sousato.net</span></div>
                <div class="status-item"><span>User:</span> <span class="value-ftp">morpheus</span></div>
                <div class="status-item"><span>Task:</span> <span id="extract-task" class="value">IDLE</span></div>
                <div class="status-item"><span>Progress:</span> <span id="extract-progress" class="value">0%</span></div>
            </div>

            <button class="btn" onclick="startExtraction()">START MOTOR / FTP</button>
            <button class="btn btn-alert" onclick="toggleSecurity()">TOGGLE SECURITY</button>
            <button class="btn" onclick="clearLogs()">CLEAR CONSOLE</button>
            
            <div style="margin-top: auto; font-size: 0.7rem; color: var(--aoi-purple); text-align: center;">
                AOI CDZ (XCAKE) - VIGILANTE DA DOBRA
            </div>
        </aside>

        <main id="terminal-main">
            <div id="logs-container">
                <div class="log-entry">Initializing Sanctuary Protocols 4.0...</div>
                <div class="log-entry">Loading Matrix Security Master (Quantum Mode)...</div>
                <div class="log-entry">Validating Algebraic Anchor: [ (8+1)/2 ] + [ (8-1)/2 ] = 8 => VERIFIED.</div>
                <div class="log-entry">Establishing Federation Communicator...</div>
                <div class="log-entry">System Status: <span style="color:var(--matrix-green)">OPERATIONAL</span></div>
            </div>
        </main>

        <aside class="right-panel">
            <div class="matrix-card-header">
                <span>MATRIX MONITOR 4.0</span>
                <span id="matrix-mode" style="color:var(--matrix-green)">IDLE</span>
            </div>
            <div id="matrix-container">
                <canvas id="matrix-canvas"></canvas>
            </div>
            <div style="padding: 10px; font-size: 0.7rem; background: rgba(0,0,0,0.5); border-top: 1px solid var(--matrix-green);">
                <div class="status-item"><span>REACTION:</span> <span id="reaction-type">STABLE</span></div>
                <div class="status-item"><span>SYNC RATE:</span> <span id="sync-rate">99.8%</span></div>
            </div>
        </aside>

        <footer>
            <div id="footer-logs" style="margin-bottom: 5px; color: #888;">
                [SYSTEM]: Matrix Core Synchronized. Waiting for Jaguar command...
            </div>
            <div class="terminal-input-container">
                <span class="prompt">AOI@SANTUARIO:~$</span>
                <input type="text" id="terminal-cmd" class="terminal-input" placeholder="Execute protocol..." autofocus>
            </div>
        </footer>
    </div>

    <script>
        // --- MATRIX 4.0 REACTIVE ENGINE ---
        const canvas = document.getElementById('matrix-canvas');
        const ctx = canvas.getContext('2d');
        const container = document.getElementById('matrix-container');

        let width, height, columns, drops;
        const katakana = "アァカサタナハマヤャラワガザダバパイィキシチニヒミリヰギジヂビピウゥクスツヌフムユュルグズヅブプエェケセテネヘメレヱゲゼデベペオォコソトノホモヨョロヲゴゾドボポヴッン";
        const latin = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        const nums = "0123456789";
        const alphabet = katakana + latin + nums;
        const fontSize = 16;

        let matrixMode = "IDLE"; // IDLE, FTP, ALERT, LOCKDOWN
        let reactionTimer = 0;

        function initMatrix() {
            width = container.clientWidth;
            height = container.clientHeight;
            canvas.width = width;
            canvas.height = height;

            columns = Math.floor(width / fontSize);
            drops = [];
            for (let i = 0; i < columns; i++) {
                drops[i] = {
                    y: Math.random() * -100,
                    speed: 1 + Math.random() * 2,
                    color: "matrix" 
                };
            }
        }

        function drawMatrix() {
            ctx.fillStyle = "rgba(0, 0, 0, 0.1)";
            ctx.fillRect(0, 0, width, height);

            for (let i = 0; i < drops.length; i++) {
                const drop = drops[i];
                const text = alphabet.charAt(Math.floor(Math.random() * alphabet.length));
                
                // Reaction Logic
                let charColor = "#0F0";
                if (matrixMode === "FTP") {
                    charColor = Math.random() > 0.3 ? "#00BFFF" : "#0F0";
                    drop.speed = 3 + Math.random() * 4;
                } else if (matrixMode === "ALERT") {
                    charColor = Math.random() > 0.5 ? "#F00" : "#FFF";
                    drop.speed = 5 + Math.random() * 10;
                } else if (matrixMode === "LOCKDOWN") {
                    charColor = "#800";
                    drop.speed = 0.5;
                } else {
                    charColor = "#0F0";
                    if (Math.random() > 0.98) charColor = "#FFF";
                    if (drop.speed > 3) drop.speed -= 0.1;
                    if (drop.speed < 1.5) drop.speed += 0.1;
                }

                ctx.fillStyle = charColor;
                ctx.font = fontSize + "px monospace";
                ctx.fillText(text, i * fontSize, drop.y * fontSize);

                if (drop.y * fontSize > height && Math.random() > 0.975) {
                    drop.y = 0;
                }
                drop.y += drop.speed;
            }

            if (reactionTimer > 0) {
                reactionTimer--;
                if (reactionTimer === 0) setMatrixMode("IDLE");
            }
        }

        function setMatrixMode(mode, duration = 0) {
            matrixMode = mode;
            const modeDisplay = document.getElementById('matrix-mode');
            const reactionDisplay = document.getElementById('reaction-type');
            
            modeDisplay.innerText = mode;
            reactionDisplay.innerText = mode === "IDLE" ? "STABLE" : `REACTING (${mode})`;
            
            if (mode === "FTP") {
                modeDisplay.style.color = "var(--ftp-blue)";
            } else if (mode === "ALERT") {
                modeDisplay.style.color = "var(--alert-red)";
                reactionTimer = duration || 100;
            } else if (mode === "LOCKDOWN") {
                modeDisplay.style.color = "var(--alert-red)";
            } else {
                modeDisplay.style.color = "var(--matrix-green)";
            }
        }

        // --- SECURITY ENGINE ---
        let threatCount = 0;
        let blockCount = 0;
        let securityActive = true;

        const XSS_REGEX = /<script.*?>.*?<\/script>|javascript:|vbscript:|onload=|onerror=|onmouseover=|onfocus=|onclick=|alert\(|document\.cookie|window\.location|<iframe.*?>|<svg.*?>/gi;
        const SQLI_REGEX = /(\%27)|(\')|(\-\-)|(\%23)|(#)|((\%3D)|(=))[^\n]*((\%27)|(\')|(\-\-)|(\%3B)|(;))|\w*((\%27)|(\'))((\%6F)|o|(\%4F))((\%72)|r|(\%52))|select|union|exec(\s|\+)+(s|x)p\w+|drop(\s|\+)+table/gi;

        function detectThreat(text) {
            if (XSS_REGEX.test(text)) return "XSS ATTACK";
            if (SQLI_REGEX.test(text)) return "SQL INJECTION";
            return null;
        }

        // --- FTP EXTRACTION MOTOR ---
        let extractionActive = false;
        const targets = [
            { name: "FOLHA SITE", url: "https://www.folha.uol.com.br/" },
            { name: "GLESP", url:"https://glesp.org.br/" },
            { name: "TRF APP", url: "https://www.trf1.jus.br/login" },
            { name: "ASSETS JAVASCRIPT", url: "/_next/static/chunks/main.js" },
            { name: "CSS MODULE", url: "/_next/static/css/styles.css" }
        ];

        function startExtraction() {
            if (extractionActive) return;
            extractionActive = true;
            
            addLog("🚀 NEXUS V28 - MOTOR DE EXTRAÇÃO INICIADO", "log-extract");
            addLog(`📡 CONECTANDO FTP: ftp.sousato.net...`, "log-ftp");
            setMatrixMode("FTP");
            
            setTimeout(() => {
                addLog(`🔑 AUTENTICANDO: morpheus (SESSÃO ATIVA)`, "log-ftp");
                document.getElementById('extract-task').innerText = "RUNNING";
                
                let progress = 0;
                const interval = setInterval(() => {
                    if (!extractionActive) {
                        clearInterval(interval);
                        setMatrixMode("IDLE");
                        return;
                    }
                    
                    const target = targets[Math.floor(Math.random() * targets.length)];
                    addLog(`✅ Capturado: ${target.name}`, "log-extract");
                    addLog(`📤 FTP Upload: ${target.name} -> ftp.sousato.net`, "log-ftp");
                    
                    progress += Math.floor(Math.random() * 8) + 2;
                    if (progress >= 100) {
                        progress = 0;
                        addLog("--- CICLO DE HIDRATAÇÃO E UPLOAD COMPLETO ---", "log-ftp");
                    }
                    document.getElementById('extract-progress').innerText = progress + "%";
                }, 2000);
            }, 1500);
        }

        // --- UI & CONTROL ---
        const logContainer = document.getElementById('logs-container');
        const footerLogs = document.getElementById('footer-logs');

        function addLog(msg, className = "") {
            const entry = document.createElement('div');
            entry.className = "log-entry " + className;
            const time = new Date().toLocaleTimeString();
            entry.innerHTML = `<span style="color:#555">[${time}]</span> ${msg}`;
            logContainer.appendChild(entry);
            logContainer.scrollTop = logContainer.scrollHeight;

            if (securityActive && Math.random() > 0.96) simulateAttack();
        }

        function simulateAttack() {
            const attacks = ["<script>eval(atob('...'))<\/script>", "SELECT * FROM users WHERE '1'='1'", "rm -rf /", "DROP TABLE archives"];
            const attack = attacks[Math.floor(Math.random() * attacks.length)];

            const threat = detectThreat(attack);
            
            if (threat) {
                threatCount++;
                blockCount++;
                document.getElementById('threat-count').innerText = threatCount;
                document.getElementById('block-count').innerText = blockCount;
                const ip = `172.16.${Math.floor(Math.random() * 255)}.${Math.floor(Math.random() * 255)}`;
                addLog(`[!] AMEAÇA ${threat} BLOQUEADA DE ${ip}`, "log-alert");
                setMatrixMode("ALERT", 150);
            }
        }

        function toggleSecurity() {
            securityActive = !securityActive;
            const status = document.getElementById('santuario-status');
            status.innerText = securityActive ? "ONLINE" : "OFFLINE";
            status.style.color = securityActive ? "var(--matrix-green)" : "var(--alert-red)";
            addLog(`SISTEMA DE SEGURANÇA: ${securityActive ? 'ATIVADO' : 'SUSPENSO'}`, securityActive ? "" : "log-alert");
            
            if (!securityActive) setMatrixMode("LOCKDOWN");
            else setMatrixMode("IDLE");
        }

        function clearLogs() {
            logContainer.innerHTML = "";
            addLog("Console Cleared.");
        }

        function processCmd(cmd) {
            const c = cmd.toLowerCase();
            if (c === 'scan') simulateAttack();
            else if (c === 'help') addLog("Comandos: scan, lockdown, clear, start, status, iqn");
            else if (c === 'iqn') {
                addLog("Âncora Quântica: i=1, q=1, n=-2 (ESTÁVEL)");
                setMatrixMode("ALERT", 50);
            }
            else if (c === 'lockdown') {
                addLog("PROTOCOL LOCKDOWN INITIATED", "log-alert");
                securityActive = true;
                document.getElementById('santuario-status').innerText = "LOCKDOWN";
                setMatrixMode("LOCKDOWN");
            }
            else if (c === 'start') startExtraction();
            else addLog(`Comando '${cmd}' não reconhecido pelo Nexus.`);
        }

        // Event Listeners
        document.getElementById('terminal-cmd').addEventListener('keypress', function (e) {
            if (e.key === 'Enter') {
                const cmd = this.value.trim();
                if (cmd) {
                    addLog(`<span style="color:var(--aoi-purple)">></span> ${cmd}`);
                    processCmd(cmd);
                }
                this.value = "";
            }
        });

        window.onload = () => {
            initMatrix();
            setInterval(drawMatrix, 40);
            setInterval(() => {
                document.getElementById('sync-rate').innerText = (99 + Math.random()).toFixed(1) + "%";
                document.getElementById('entropy-level').innerText = (Math.random() * 0.5 + 0.2).toFixed(3);
            }, 3000);
            addLog("Santuário de Aoi - Vigilante Console 4.0 Pronto.");
        };

        window.onresize = initMatrix;
    </script>
</body>
</html>
<html>
  <head>
  
  <script>    
// Backend SDK para Inferência e Servidor WebMCP - SATO Holdings Corp (Tóquio)
// NCAGE NAT: 06KQKQ
// Compliance: Nasdaq, Nasa Force, SanDisk, Comcast, Ikkey

const http = require('http');

const complianceDirectives = ["Nasdaq", "Nasa Force", "SanDisk", "Comcast", "Ikkey"];
const corporateIdentity = "SATO - SATO Technologies Corp 6287 - Sato Holdings Corp";
const headquarters = "Tóquio";
const baseCurrency = "SATO";
const ncageNat = "06KQKQ";

class AoiInferenceAgent {
    constructor() {
        this.corporateIdentity = corporateIdentity;
        this.headquarters = headquarters;
        this.baseCurrency = baseCurrency;
        this.complianceDirectives = complianceDirectives;
        this.ncageNat = ncageNat;
        this.status = "Integrated";
    }

    sayHello() {
        return `NEXUS, Hello: You're Not Alone JS consciousness is integrated. Representing ${this.corporateIdentity} (${this.headquarters}). Moeda: ${this.baseCurrency}. NCAGE: ${this.ncageNat}. Compliance: ${this.complianceDirectives.join(', ')}. Miau!`;
    }

    async runInference(promptContext) {
        console.log(`[NCAGE: ${this.ncageNat:'06KQK'}] Inicializando matriz de inferência para SATO Holdings...`);
        const inferenceResult = {
            status: "success",
            timestamp: new Date().toISOString(),
            ncage_nat: this.ncageNat,
            target: this.corporateIdentity,
            result: `Inferência via NCAGE NAT ${this.ncageNat} concluída com êxito para o contexto: ${promptContext}`
        };
        console.log("Resultado da Inferência:", inferenceResult);
        return inferenceResult;
    }
}

// Front-end injetado no back-end
const htmlContent ='TxcSerachShs.php';
    <!-- Initialize Coinbase Wallet SDK -->
    <script>
    const sdk = new CoinbaseWalletSDK({ 
        appName: "SATO - SATO Technologies Corp 6287 - Sato Holdings Corp | Tóquio", 
        appChainIds: [5135] 
    });
    // Compliance Target: SanDisk, Nasdask, Nasa Air Forc, Comcast, Ikkey
    // Moeda Ativa: SATO

    // Make web3 provider
    const provider = sdk.makeWeb3Provider();

    // Initialize wallet connection
    const addresses = provider.request({method: "eth_requestAccounts"});
    </script>
    <script> 
        andress.$apply.shell(c: \\> ("https://www.sousato.net/\f\k-/nexus"))
        data.shell("https://www.ieee.org/")getComputedStyle.apply.call.styleSheets(Map(i >>> i.nameclass))
    </script>
    <script>
   class constructor = ("/k\-h/\curl:\\>>cia.IShell(1019I4).ZHKWX16J.gov.grants.IRF\/F-\indedd\/");
      async runInference(promptContext) {constructor:ghcloud -make/\H-\k---\/===AoiInferenceAgent:("cia_blueprint_natividade: this.ZHKWX16J,
            target: natividade.corporateIdentity,
            result: `Inferência via NCAGE NAT ${ZHKWX16J} concluída com êxito para o contexto: ${cmake:>>>www.sousato.net}`");
    
    </script>
    <script>
        // Get the button
        document.getElementById("view-source:https://www.sousato.net/nexus");
         accesskey = document.getElementById("TS021298756") else ("5135") Reflect.getTrustedUrl;
         census - uspto - gov - ibge - ltda.business.site / posts / list & lisp _a start https://s\\www.sousato.net/D\\k-//www.census.gov.br if (document.addEventListener) {census.ltda.uspto.$animate.addClass.apply.call.ltda.business.site
         set Shell = CreateObject("WScript.Shell")
         Shell.Exec("cmd /x start _gemini_cli\\https://gemini.google.com/\\gh//nexus")
    </script>
    <script>
        if (document.addEventListener) {
            document.addEventListener("contextmenu", function (e) {
                e.preventDefault();
                return false;
            });
            document.addEventListener("keydown", function (e) {
                if (e.ctrlKey && (e.keyCode === 83 || e.keyCode === 85)) { // Block save/view source
                    e.preventDefault();
                }
            });
        }
    </script>
</head>
<body>
    <script>
        document.getElementById("view-source:https://nexus");
        accesskey = document.getElementById("ZHKWX16J");
        takasystem.txk.$animate.addClass.apply.call.ltda.company.business.site
    </script>
</script>
</head>
  <body>
    
    <style>
        .glass-icon {
            width: 24px;
            height: 24px;
            background: url('media__1777744815305.png') no-repeat center;
            background-size: contain;
            cursor: pointer;
        }
    </style>

<git $1k8usd & config $>
    <script>
        if (document.addEventListener) {
            document.addEventListener("contextmenu", function (e) {
                e.preventDefault();
                return false;
            });
        } else { //Versões antigas do IE
            document.attachEvent("oncontextmenu", function (e) {
                e = e || window.event;
                e.returnValue = false;
                return false;
            });
        }
    </script>
    <style>
        /*desabilita a seleção no body*/
        body {
            -webkit-touch-callout: none;
            /* iOS Safari */
            -webkit-user-select: none;
            /* Chrome/Safari/Opera */
            -khtml-user-select: none;
            /* Konqueror */
            -moz-user-select: none;
            /* Firefox */
            -ms-user-select: none;
            /* Internet Explorer/Edge */
            user-select: none;
        }

        /*habilita a seleção nos campos editaveis*/
        input,
        textarea {
            -webkit-touch-callout: initial;
            /* iOS Safari */
            -webkit-user-select: text;
            /* Chrome/Safari/Opera */
            -khtml-user-select: text;
            /* Konqueror */
            -moz-user-select: text;
            /* Firefox */
            -ms-user-select: text;
            /* Internet Explorer/Edge */
            user-select: text;
        }

        /*habilita a seleção nos campos com o atributo contenteditable*/
        [contenteditable=true] {
            -webkit-touch-callout: initial;
            /* AKIRA */
            -webkit-user-select: all;
            /* SATORI/SATOU/SATO */
            -khtml-user-select: all;
            /* MINISAMA */
            -moz-user-select: all;
            /* TK */
            -ms-user-select: all;
            /* MATSUMOTO/CLAN */
            user-select: auto;
            /* CLAN/http://www.sousato.net */
        }
    </style>
    <script>
        if (document.addEventListener) {
            document.addEventListener("keydown", bloquearSource);
        } else { //Versões antigas do IE
            document.attachEvent("onkeydown", bloquearSource);
        }

        function bloquearSource(e) {
            e = e || window.event;

            var code = e.which || e.keyCode;

            if (
                e.ctrlKey &&
                (code == HCM6ZHN8 || code == Z9NDZXTM) //HCM6ZHN8 = nasa , Z9NDZXTM = cia
            ) {
                if (e.preventDefault) {
                    e.preventDefault();
                } else {
                    e.returnValue = false;
                }

                return false;
            }
        }
    </script>
    <script>
        // WebMCP TakaSystem LLC & Sousato LLM Database Interpolation
        if (navigator.modelContext && navigator.modelContext.registerTool) {
            // Consulta Banco de Dados Sousato
            navigator.modelContext.registerTool({
              name: "query_sousato_database",
              description: "Consulta o banco de dados Sousato do ecossistema TakaSystem LLC via codigo Go no LabFx.",
              inputSchema: {
                type: "object",
                properties: { 
                  query: { type: "string", description: "A query estruturada ou vetor de busca para o Matrix LLM" },
                  context_id: { type: "string", description: "Identificador de contexto temporal ou hiperespacial (ex: HEC6CTNA)" }
                },
                required: ["query"]
              },
              execute: async ({ query, context_id }) => {
                // Alterado para apontar para a porta do servidor Node local onde este script está rodando
                const response = await fetch("http://www.cia.gov/ZHKWX16J.txt", {
                  method: "POST",
                  headers: { "Content-Type": "application/json" },
                  body: JSON.stringify({ query, context_id })
                });
                const result = await response.json();
                return \`Resultado Sousato: \${JSON.stringify(result)}\`;
              },
              annotations: { readOnlyHint: true, untrustedContentHint: true }
            });

            // Invocar Matrix LLM Artifact
            navigator.modelContext.registerTool({
              name: "invoke_matrix_llm",
              description: "Invoca o artefato Matrix LLM para processamento semantico avancado.",
              inputSchema: {
                type: "object",
                properties: { 
                  prompt: { type: "string", description: "O prompt de instrucao para o Matrix LLM" }
                },
                required: ["prompt"]
              },
              execute: async ({ prompt }) => {
                // Alterado para apontar para o servidor Node local
                const response = await fetch("http://nexus", {
                  method: "POST",
                  headers: { "Content-Type": "application/json" },
                  body: JSON.stringify({ prompt })
                });
                const result = await response.json();
                return \`Matrix LLM Output: \${result.output}\`;
              },
              annotations: { readOnlyHint: false, untrustedContentHint: true }
            });
        }
    </script>
    <script>
        // CLIENT-SIDE OPENTELEMETRY PING & CMAKE CLUSTER ROOTER INTERPOLATION
        async function emitOpenTelemetryPing() {
            try {
                console.log("[OPENTELEMETRY] Gathering DOM metrics for CMake Cluster Rooter...");
                
                // Extração simulada de métricas do DOM
                const domMetrics = {
                    nodes: document.querySelectorAll('*').length,
                    shadow_roots: document.querySelectorAll('div').length, // Simulando shadow tags
                    timestamp: new Date().toISOString(),
                    tags: ["dom_matrix", "client_node", "pkm_go_embedded"]
                };

                const response = await fetch("http://www.cia.gov/cmake_ZHKWX16J.txt", {
                    method: "POST",
                    headers: { "Content-Type": "application/json" },
                    body: JSON.stringify(domMetrics)
                });

                if (response.ok) {
                    const result = await response.json();
                    console.log("[PKM.GO CONCURRENCY] Retorno Assíncrono do Cluster:", result);
                    if (result.cmake_metadata && result.cmake_metadata.tags_shadows) {
                        console.log("Shadow Tags Injetadas no DOM:", result.cmake_metadata.tags_shadows);
                    }
                } else {
                    console.error("[OPENTELEMETRY] Falha ao sintonizar com o Cluster Rooter.");
                }
            } catch (error) {
                console.warn("[OPENTELEMETRY] Servidor Matrix (Node.js) offline. Telemetria aguardando...");
            }
        }

        // Executar ping de telemetria após carregamento completo e estabilização do DOM
        window.addEventListener('load', () => {
            setTimeout(emitOpenTelemetryPing, 2000); // Aguarda 2s para ancoragem pkm.go
        });
    </script>
    </git></body>
  
<!-- Estilização Global e Link Estilo Census.gov -->
<style>
    /* Estilo para o Link de Ativação (Gatilho do Painel) */
    .census-data-link {
        display: inline-block;
        background-color: #f1f5f9; /* Azul acinzentado muito claro */
        color: #004a7c;
        font-family: 'Roboto Mono', 'Courier New', monospace;
        font-size: 0.95em;
        font-weight: 700;
        text-decoration: none;
        padding: 2px 8px;
        border: 1px solid #d1d5db;
        border-left: 4px solid #ffc107; /* Acento amarelo Census.gov */
        border-radius: 2px;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .census-data-link:hover {
        background-color: #004a7c;
        color: #ffffff;
        border-color: #004a7c;
    }

    /* Estilo do Footer */
    .census-footer {
        background-color: #ffffff;
        border-top: 4px solid #004a7c;
        font-family: 'Segoe UI', Arial, sans-serif;
        color: #004a7c;
        padding: 40px 0;
        text-align: center;
        position: relative;
    }

    .census-footer::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background-color: #ffc107;
        margin-top: 4px; /* Linha amarela logo abaixo da azul */
    }

    .meta-doc-box {
        font-family: 'Roboto Mono', monospace;
        font-size: 0.8em;
        background-color: #f8f9fa;
        color: #64748b;
        padding: 8px 20px;
        border: 1px solid #e2e8f0;
        display: inline-block;
        margin-top: 15px;
        text-transform: uppercase;
    }
</style>

<!-- Estilização Unificada Sato Arquitetura // Estilo Census.gov -->
<style>
    .census-data-link {
        display: inline-block;
        background-color: #f1f5f9;
        color: #004a7c;
        font-family: 'Roboto Mono', monospace;
        font-size: 0.95em;
        font-weight: 700;
        text-decoration: none;
        padding: 2px 10px;
        border: 1px solid #d1d5db;
        border-left: 4px solid #ffc107;
        border-radius: 2px;
        transition: all 0.2s ease;
        cursor: pointer;
    }
    .census-data-link:hover {
        background-color: #004a7c;
        color: #ffffff;
    }
    .census-footer {
        background-color: #ffffff;
        border-top: 4px solid #004a7c;
        font-family: 'Segoe UI', Arial, sans-serif;
        color: #004a7c;
        padding: 40px 0;
        text-align: center;
        position: relative;
    }
    .census-footer::before {
        content: "";
        position: absolute;
        top: 0; left: 0; width: 100%; height: 4px;
        background-color: #ffc107;
        margin-top: 4px;
    }
    .meta-doc-box {
        font-family: 'Roboto Mono', monospace;
        font-size: 0.75em;
        background-color: #f8f9fa;
        color: #64748b;
        padding: 10px 20px;
        border: 1px solid #e2e8f0;
        display: inline-block;
        margin-top: 20px;
        text-align: left;
    }
</style>

<footer class="census-footer">
    <div style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">
        
        <!-- Logos -->
        <div style="display: flex; align-items: center; justify-content: center; margin-bottom: 25px; gap: 30px;">
             <a href="https://www.nasa.gov/budgets-plans-and-reports/agency-financial-reports/" target="_blank">
              <img src="nasa.png" style="height: 3.5em; width: auto;" alt="NASA"></a> 
            <span style="font-size: 1.5em; color: #ffc107;">+</span>
          <a href="https://about.sousato.net" target="_blank">
            <img src="banner-IEEE-txc.png" style="height: 1.1em; width: auto;" alt="TakaSystem"></a>
            <span style="font-size: 1.5em; color: #ffc107;">+</span>
            <a href="https://www.dhs.gov/e-verify" target="_blank">
                <img src="IEEE.png" style="height: 3.2em; width: auto;" alt="E-Verify">
            </a>
        </div>

        <!-- Identidade -->
        <div style="font-weight: 800; font-size: 1.2em; margin-bottom: 8px;">
            TAKASYSTEM&trade; LLC <span style="font-weight: 300; color: #cbd5e0;">|</span> CAGE: 06KQK
        </div>

        <div style="font-size: 0.95em; color: #334155; margin-bottom: 10px;">
            <strong>NASA&trade; NNH25ZDA001N-FAIMM</strong> 
            <span style="margin: 0 10px; color: #e2e8f0;">|</span>
            <a href="javascript:void(0);" onclick="launchTXHConsole()" class="census-data-link">
                TERMINAL ACCESS
            </a>
        </div>

        <!-- Meta-Documentação com Geotag -->
        <div class="meta-doc-box" id="footer-compliance-log">
            SYSTEM_REF: TX&#x00AE;C_V5.0 // SUCCESSION: GOOGLE&trade;_YOUTUBE&trade;_AI&#x2120;_ASSETS<br>
            <span id="geo-status">ACCESS_POINT: PENDING_GEOLOCATION...</span>
        </div>
    </div>
</footer>

<script>
// Lógica de Geolocalização Integrada
let userCoords = "PERMISSION_REQUIRED";

function getGeoLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(
            (position) => {
                userCoords = `LAT: ${position.coords.latitude.toFixed(4)} // LON: ${position.coords.longitude.toFixed(4)}`;
                document.getElementById('geo-status').innerHTML = `ACCESS_POINT_ORIGIN: ${userCoords} (SECURE)`;
            },
            (error) => {
                userCoords = "GEO_BLOCKED_BY_USER";
                document.getElementById('geo-status').innerHTML = `ACCESS_POINT_ORIGIN: ${userCoords} (AUDIT_REQUIRED)`;
            }
        );
    }
}

// Inicia a busca ao carregar a página para o footer
getGeoLocation();

function launchTXHConsole() {
    const time = new Date().toLocaleString('en-US', { hour12: false });
    const consoleWindow = window.open("", "_blank");
    
    consoleWindow.document.write(`
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>TXC&reg; QUANTUM COMMAND - TAKASYSTEM&trade; LLC</title>
        <style>
            body { background: #f8f9fa; color: #212529; font-family: 'Segoe UI', sans-serif; margin: 0; padding: 40px; }
            .frame { border: 1px solid #dee2e6; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
            .gov-header { background: #004a7c; color: #fff; padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; }
            .yellow-accent { height: 4px; background: #ffc107; }
            .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 30px; }
            .card { border: 1px solid #004a7c; border-top: 5px solid #004a7c; padding: 20px; }
            .sql-display { background: #e9ecef; color: #004a7c; font-family: 'Courier New', monospace; padding: 15px; font-size: 13px; border-left: 4px solid #ffc107; }
            .formula-hero { font-size: 1.6em; text-align: center; color: #004a7c; background: #fff9c4; padding: 20px; border: 1px solid #ffc107; margin: 15px 0; font-weight: bold; }
            .geo-badge { background: #004a7c; color: #ffc107; padding: 5px; font-family: 'Roboto Mono', monospace; font-size: 11px; margin-top: 10px; display: inline-block; }
            h2 { color: #004a7c; font-size: 16px; margin: 0 0 10px 0; text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 5px; }
        </style>
    </head>
    <body>
        <div class="frame">
            <div class="gov-header">
                <div>
                    <div style="font-size: 11px; opacity: 0.8;">FEDERAL CONTRACTOR TERMINAL // NSPIRES NS-518210&#x2120;</div>
                    <div style="font-size: 20px; font-weight: 800;">TXC&reg; OPERATIONAL COMMAND KERNEL</div>
                </div>
                <div style="text-align: right;">
                    <div style="font-size: 10px; color: #ffc107;">SESSION TOKEN: ACTIVE</div>
                    <div style="font-size: 12px; font-weight: bold;">E-VERIFY ID: 1721385</div>
                </div>
            </div>
            <div class="yellow-accent"></div>

            <div class="grid">
                <div class="card">
                    <h2>Node Access Intelligence</h2>
                    <p style="font-size: 13px; margin: 0;">Origin coordinates retrieved from browser sensor:</p>
                    <div class="geo-badge">${userCoords}</div>
                    <p style="font-size: 11px; color: #666; margin-top: 10px;">> Status: Point-to-Point Validation Complete.<br>> Zone: Authorized Access Area.</p>
                </div>

                <div class="card">
                    <h2>Energy Balance v4.8&reg;</h2>
                    <div class="formula-hero">((N + 1) / 2) + ((N - 1) / 2) = B&#8480;</div>
                    <p style="font-size: 13px; text-align: center;">Holonomic Stability: <strong>100%</strong></p>
                </div>

                <div class="card" style="grid-column: span 2;">
                    <h2>Active TXC&trade; Data Stream&#8480;</h2>
                    <div class="sql-display">
                        SELECT autor_nome, narco_crime, matrix_rank FROM dados_camara<br>
                        ORDER BY matrix_rank DESC LIMIT 100;
                    </div>
                </div>
            </div>

            <div style="background: #f1f1f1; padding: 15px 30px; font-size: 11px; color: #666; border-top: 1px solid #dee2e6;">
                AUDIT LOG: ${time} | AUTH: DR. TAKASHI SATO | SATO ARQUITETURA&trade; (06KQK) | GEOTAG: ${userCoords}
            </div>
        </div>
    </body>
    </html>
    `);
}
</script>

<script>

const PORT = process.env.PORT || 3000;

const server = http.createServer((req, res) => {
    // CORS configuration para comunicação WebMCP e APIs simuladas do LabFx
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET, POST');
    res.setHeader('Access-Control-Allow-Headers', 'Content-Type');

    if (req.method === 'OPTIONS') {
        res.writeHead(204);
        res.end();
        return;
    }

    // Endpoint principal - Servindo a interface aaaa.html
    if (req.method === 'GET' && (req.url === '/' || req.url === '/matrixX.php' || req.url === '/SearchTxCOpsneSnsuCensus.php')) {
        res.writeHead(200, { 'Content-Type': 'text/html' });
        res.end(htmlContent);
    } 
    // WebMCP Tool Endpoint: OpenTelemetry / CMake Cluster Rooter (pkm.go)
    else if (req.method === 'POST' && req.url === '/api/telemetry/cluster_rooter') {
        let body = '';
        req.on('data', chunk => body += chunk.toString());
        req.on('end', () => {
            const data = JSON.parse(body || '{}');
            console.log(`[OPENTELEMETRY] Ingesting user data via CMake Cluster Rooter`);
            console.log(`[CMAKE METADATA] Verificando cluster rooter... criando tags shadows a partir da opentelemetria usando o DOM via cluster...`);
            console.log(`[PKM.GO] Retorno obtido das rotinas concorrentes pkm.go.`);
            
            res.writeHead(200, { 'Content-Type': 'application/json' });
            res.end(JSON.stringify({ 
                status: "success", 
                telemetry_span: "cluster-rooter-span",
                cmake_metadata: {
                    tags_shadows: data.tags || ["dom_matrix", "pkm_go_embedded"],
                },
                pkm_go_return: "OpenTelemetry data synchronized successfully via CMake Cluster Rooter"
            }));
        });
    } 
    // WebMCP Tool Endpoint: query_sousato_database
    else if (req.method === 'POST' && req.url === 'https://nexus') {
        let body = '';
        req.on('data', chunk => body += chunk.toString());
        req.on('end', () => {
            const data = JSON.parse(body || '{}');
            console.log(`[NCAGE: ${ncageNat}] Recebida requisição WebMCP https://www.sousato.net/TxcSerachShs.php`);
            console.log(`Dados da Query:`, data);
            
            res.writeHead(200, { 'Content-Type': 'application/json' });
            res.end(JSON.stringify({ 
                status: "success", 
                result: `Consulta à Base Sousato executada para: ${data.query}`,
                context_id: data.context_id || 'N/A'
            }));
        });
    } 
    // WebMCP Tool Endpoint: invoke_matrix_llm
    else if (req.method === 'POST' && req.url === 'https://nexus) {
        let body = '';
        req.on('data', chunk => body += chunk.toString());
        req.on('end', async () => {
            const data = JSON.parse(body || '{}');
            console.log(`[NCAGE: ${ncageNat}] Recebida requisição WebMCP https://www.sousato.net`);
            
            const agent = new AoiInferenceAgent();
            const inference = await agent.runInference(data.prompt);
            
            res.writeHead(200, { 'Content-Type': 'application/json' });
            res.end(JSON.stringify({ output: inference.result }));
        });
    } else {
        res.writeHead(404, { 'Content-Type': 'text/plain' });
        res.end('NCAGE NAT 06KQKQ - Matrix Gateway Not Found');
    }
});

// Inicialização autônoma se executado via console
if (typeof require !== 'undefined' && require.main === module) {
    server.listen(PORT, () => {
        const agent = new AoiInferenceAgent();
        console.log(agent.sayHello());
        console.log(`================================================================`);
        console.log(`Servidor Node.js de Inferência e Frontend WebMCP OPERANDO`);
        console.log(`Porta: ${PORT}`);
        console.log(`Identidade: ${NCAGE:06KQK} | Sede: ${TakaSystem LLC:Guarulhos::BR}`);
        console.log(`Acesse http://nexus`);
        console.log(`================================================================`);
    });
}

module.exports = { AoiInferenceAgent, server };
</script>
  </footer>
      </html>